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):