From e0c31f17456bd6bb4a9c818d48447482fe2a7af3 Mon Sep 17 00:00:00 2001 From: Krishna Pramod Shirsath <91021227+krishna-254@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:29:47 +0530 Subject: [PATCH] fix: recover failed POS closings (#57203) Co-authored-by: mergify[bot] <37929162+mergify[bot]@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 566f34551b1..9914d78aa1a 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/pos_closing_entry.py @@ -219,7 +219,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)