From 4b05f6ab69c2c2f222b1537fa4513219f3d48720 Mon Sep 17 00:00:00 2001 From: Wilson Gomez Date: Tue, 23 May 2023 08:51:29 -0500 Subject: [PATCH] minor fix --- app/frontwindow.py | 5 +++-- app/main.py | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/frontwindow.py b/app/frontwindow.py index b75266b..9fe53ab 100644 --- a/app/frontwindow.py +++ b/app/frontwindow.py @@ -239,8 +239,9 @@ class FrontWindow(QMainWindow): self.sale_automatic = False if self.enviroment == 'retail' and self._config.get('new_sale_automatic'): self.sale_automatic = True - res = self.Sale.fields_get(['commision']) - self._commission_activated = True if res.get('commision') else False + res = self.Sale.fields_get(['commission']) + print(res, 'this is res') + self._commission_activated = True if res.get('commission') else False # self._source = self.Module.find([ # ('name', '=', 'sale_source'), # ('state', '=', 'activated'), diff --git a/app/main.py b/app/main.py index 854701a..23fac56 100644 --- a/app/main.py +++ b/app/main.py @@ -222,7 +222,7 @@ class AppWindow(FrontWindow): logo=locale_logo, environment=self.enviroment ) - + self.receipt_order = None # Printing order context if self.print_order: self.receipt_order = Receipt(ctx_printing, environment=self.enviroment) @@ -1669,6 +1669,7 @@ class AppWindow(FrontWindow): orders, sale_number = self.Sale.get_reversion(args) self.receipt_order.print_orders(orders, reversion=True) except Exception as e: + print(self.print_order, 'validar variable en opcion print_order=True en config_pos.ini') logging.error('Printing order reversion fail!', e) def _print_order(self, sale_id, kind, reversion=False): @@ -3181,6 +3182,7 @@ class AppWindow(FrontWindow): def keyPressEvent(self, event): key = event.key() print('key press event', key, self._state) + print(self._commission_activated, 'validate') self._keyStates[key] = True if self._state == 'add' and key not in self.keys_input and \ key not in (Qt.Key_Enter, Qt.Key_End): @@ -3248,6 +3250,7 @@ class AppWindow(FrontWindow): self.action_position() elif key == Qt.Key_Semicolon and self._commission_activated: sale = self.get_current_sale() + print(sale, 'validate') if sale['state'] == 'draft' and self._state not in ['checkout', 'payment']: self.action_agent() elif key == Qt.Key_QuoteDbl: