From 9c946eb168f7ed451a0a2e4b00e5b69e4fa085b1 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:58:24 +0530 Subject: [PATCH] fix: recover failed POS closings (backport #57203) (#57572) Co-authored-by: Krishna Pramod Shirsath <91021227+krishna-254@users.noreply.github.com> Co-authored-by: diptanilsaha --- .../accounts/doctype/pos_closing_entry/pos_closing_entry.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py index ea93b23aa11..7b2b9e922bd 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -217,7 +217,8 @@ class POSClosingEntry(StatusUpdater): self.update_sales_invoices_closing_entry() def before_cancel(self): - self.check_pce_is_cancellable() + if self.status != "Failed": + self.check_pce_is_cancellable() def on_cancel(self): unconsolidate_pos_invoices(closing_entry=self)