fix: pos closing entry cancellation test (#27099)
* fix: pos closing entry cancellation test * fix: invalid imports * fix: sider issue
This commit is contained in:
parent
6cf9254ee5
commit
9e82c24b27
@ -85,9 +85,15 @@ class TestPOSClosingEntry(unittest.TestCase):
|
|||||||
|
|
||||||
pcv_doc.load_from_db()
|
pcv_doc.load_from_db()
|
||||||
pcv_doc.cancel()
|
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()
|
pos_inv1.load_from_db()
|
||||||
self.assertEqual(si_doc.docstatus, 2)
|
|
||||||
self.assertEqual(pos_inv1.status, 'Paid')
|
self.assertEqual(pos_inv1.status, 'Paid')
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ erpnext.selling.POSInvoiceController = class POSInvoiceController extends erpnex
|
|||||||
|
|
||||||
onload(doc) {
|
onload(doc) {
|
||||||
super.onload();
|
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') {
|
if(doc.__islocal && doc.is_pos && frappe.get_route_str() !== 'point-of-sale') {
|
||||||
this.frm.script_manager.trigger("is_pos");
|
this.frm.script_manager.trigger("is_pos");
|
||||||
this.frm.refresh_fields();
|
this.frm.refresh_fields();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user