From 2761c3ea7f41633cc39253d2de05db16ebd06ccc Mon Sep 17 00:00:00 2001 From: Wilson Gomez Date: Thu, 3 Aug 2023 08:33:42 -0500 Subject: [PATCH] minor fix invoice manual --- app/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 8253bf4..cda5574 100644 --- a/app/main.py +++ b/app/main.py @@ -416,6 +416,9 @@ class AppWindow(FrontWindow): if self.shop.get('electronic_authorization'): invoice_type.append(('1', ('VENTA ELECTRONICA'))) + if self.shop.get('manual_authorization'): + invoice_type.append(('M', ('MANUAL'))) + self.field_invoice_type = ComboBox(self, 'invoice_type', { 'values': invoice_type, 'on_change': 'action_invoice_type_selection_changed' @@ -1462,7 +1465,10 @@ class AppWindow(FrontWindow): def action_invoice_type_selection_changed(self, index): val = self.field_invoice_type.get_id() if val and self._sale and self._sale.get('id'): - self.Sale.write([self._sale['id']], {'invoice_type': val}) + args = {'invoice_type': val} + if val == 'M': + args['invoice_method'] = 'manual' + self.Sale.write([self._sale['id']], args) self.label_input.setFocus() def action_tax_selection_changed(self):