From db318a4e9bbc79a25e97af7814417f3457aecaf5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 15:09:48 +0530 Subject: [PATCH] fix: pos invoice status not updating on cancel (backport #47556) (#47657) fix: pos invoice status not updating on cancel (#47556) (cherry picked from commit 8c86def018fb733e2e155db09e5e00024cb1cb33) Co-authored-by: Diptanil Saha --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 58c14a2bc5d..b0c69be4a1c 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -273,6 +273,8 @@ class POSInvoice(SalesInvoice): against_psi_doc.delete_loyalty_point_entry() against_psi_doc.make_loyalty_point_entry() + self.db_set("status", "Cancelled") + if self.coupon_code: from erpnext.accounts.doctype.pricing_rule.utils import update_coupon_code_count