fix(pos): mode of payments disappear on loading draft pos invoice (#24917)
This commit is contained in:
parent
575f8f226b
commit
dd39a6b47c
@ -376,6 +376,12 @@ class POSInvoice(SalesInvoice):
|
||||
"campaign": profile.get("campaign"),
|
||||
"allow_print_before_pay": profile.get("allow_print_before_pay")
|
||||
}
|
||||
|
||||
def reset_mode_of_payments(self):
|
||||
if self.pos_profile:
|
||||
pos_profile = frappe.get_cached_doc('POS Profile', self.pos_profile)
|
||||
update_multi_mode_option(self, pos_profile)
|
||||
self.paid_amount = 0
|
||||
|
||||
def set_account_for_mode_of_payment(self):
|
||||
self.payments = [d for d in self.payments if d.amount or d.base_amount or d.default]
|
||||
|
@ -397,6 +397,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
this.recent_order_list.toggle_component(false);
|
||||
frappe.run_serially([
|
||||
() => this.frm.refresh(name),
|
||||
() => this.frm.call('reset_mode_of_payments'),
|
||||
() => this.cart.load_invoice(),
|
||||
() => this.item_selector.toggle_component(true)
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user