From c15b3cc76661d362424ebfb88919d685a3b65136 Mon Sep 17 00:00:00 2001 From: Oscar Alvarez Date: Mon, 4 Jan 2021 20:32:31 -0500 Subject: [PATCH] Minor fix --- app/buttonpad.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/buttonpad.py b/app/buttonpad.py index db9bf7d..6e18963 100644 --- a/app/buttonpad.py +++ b/app/buttonpad.py @@ -124,16 +124,20 @@ class ButtonsFunction(QGridLayout): ) if self.parent.enviroment == 'restaurant': - self.values.extend([ + rest_options = [ ['button_comment', self.tr('NOTE'), 'action_comment'], ['button_tip', self.tr('TIP'), 'action_tip'], ['button_tables', self.tr('TABLES'), 'action_tables'], ['button_consumer', self.tr('CONSUMER'), 'action_consumer'], ['button_print_order', self.tr('ORDER'), 'action_print_order'], ['button_delivery', self.tr('DELIVERY'), 'action_delivery'], - ['button_global_discount', self.tr('GLOBAL DISCOUNT'), 'action_global_discount'], # ['button_reservations', self.tr('RESERVATIONS'), 'action_reservations'], - ]) + ] + self.values.extend(rest_options) + if self.parent.type_pos_user in ('cashier', 'frontend', 'frontend_admin'): + self.values.append( + ['button_global_discount', self.tr('GLOBAL DISCOUNT'), 'action_global_discount'], + ) class ButtonsStacked(QHBoxLayout):