diff --git a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py index b596c0cf25a..5b18ebb40dd 100644 --- a/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py +++ b/erpnext/accounts/doctype/pos_closing_entry/test_pos_closing_entry.py @@ -85,9 +85,15 @@ class TestPOSClosingEntry(unittest.TestCase): pcv_doc.load_from_db() pcv_doc.cancel() - si_doc.load_from_db() + + cancelled_invoice = frappe.db.get_value( + 'POS Invoice Merge Log', {'pos_closing_entry': pcv_doc.name}, + 'consolidated_invoice' + ) + docstatus = frappe.db.get_value("Sales Invoice", cancelled_invoice, 'docstatus') + self.assertEqual(docstatus, 2) + pos_inv1.load_from_db() - self.assertEqual(si_doc.docstatus, 2) self.assertEqual(pos_inv1.status, 'Paid') diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js index e3175464813..15c292211c0 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.js +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.js @@ -16,7 +16,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex onload(doc) { super.onload(); - this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log']; + this.frm.ignore_doctypes_on_cancel_all = ['POS Invoice Merge Log', 'POS Closing Entry']; if(doc.__islocal && doc.is_pos && frappe.get_route_str() !== 'point-of-sale') { this.frm.script_manager.trigger("is_pos"); this.frm.refresh_fields();