From 3074d0710e94abf9f13736573af96bcc52a78be3 Mon Sep 17 00:00:00 2001 From: MarcusStill <69536339+MarcusStill@users.noreply.github.com> Date: Wed, 12 Aug 2026 13:19:04 +0000 Subject: [PATCH 1/3] fix: correct offline payment condition and error messages - Fix the condition for Offline payment to allow non-fiscalized sales (`not in (0, 9)` instead of `in (0, 9)`). - Correct the copy-paste error in the info window message for Offline payment. - Correct the copy-paste error in the info window message for Cash payment. --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 13b3d4c..36d1e6d 100644 --- a/main.py +++ b/main.py @@ -2362,7 +2362,7 @@ def open_pay_form(self, txt): if system.sale_status != 0: windows.info_window( "Внимание", - "Оплата картой доступна только для новых продаж.", + "Оплата наличными доступна только для новых продаж.", "" ) return @@ -2398,10 +2398,10 @@ def open_pay_form(self, txt): self.sale_transaction(payment_type, system.print_check) elif res == Payment.Offline: # Offline только для не фискализированных продаж - if system.sale_status in (0, 9): + if system.sale_status not in (0, 9): windows.info_window( "Внимание", - "Оплата картой доступна только для новых продаж.", + "Оплата offline доступна только для не фискализированных продаж.", "" ) return From 1be66e7e3757461b8dbde20bfe5b9e7d4db7b381 Mon Sep 17 00:00:00 2001 From: MarcusStill <69536339+MarcusStill@users.noreply.github.com> Date: Thu, 13 Aug 2026 05:40:22 +0000 Subject: [PATCH 2/3] fix: correct offline payment check and status 9 handling - Updates the offline payment check to `not in (0, 9)` to allow offline payment for new and unfiscalized sales. - Fixes copy-paste error messages for Cash and Offline payments. - Ensures the sale status is updated to 9 (unfiscalized) when a bank check is saved but before the fiscal check is printed. --- main.py | 4 ++-- modules/worker.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 36d1e6d..fe0bfb0 100644 --- a/main.py +++ b/main.py @@ -2362,7 +2362,7 @@ def open_pay_form(self, txt): if system.sale_status != 0: windows.info_window( "Внимание", - "Оплата наличными доступна только для новых продаж.", + "Оплата картой доступна только для новых продаж.", "" ) return @@ -2389,7 +2389,7 @@ def open_pay_form(self, txt): if system.sale_status != 0: windows.info_window( "Внимание", - "Оплата картой доступна только для новых продаж.", + "Оплата наличными доступна только для новых продаж.", "" ) return diff --git a/modules/worker.py b/modules/worker.py index f4413f9..d83a6e7 100644 --- a/modules/worker.py +++ b/modules/worker.py @@ -318,7 +318,7 @@ def process_payment(self, timer: QElapsedTimer): bank_status = 1 # Обязательно сохраняем банковский слип-чек try: - self.db_handler.update_sale(self.system.sale_id, bank_pay=check) + self.db_handler.update_sale(self.system.sale_id, bank_pay=check, status=9) except Exception as e: logger.warning(f"Ошибка сохранения банковского чека: {e}") self.log_step(timer, "save in db finished") From 921c44d87ee480096ba1bd9af051e45e1c45e780 Mon Sep 17 00:00:00 2001 From: MarcusStill <69536339+MarcusStill@users.noreply.github.com> Date: Thu, 13 Aug 2026 12:46:07 +0000 Subject: [PATCH 3/3] fix: correct offline payment check and status 9 handling - Updates the offline payment check to `not in (0, 9)` to allow offline payment for new and unfiscalized sales. - Fixes copy-paste error messages for Cash and Offline payments. - Ensures the sale status is updated to 9 (unfiscalized) when a bank check is saved but before the fiscal check is printed.