mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-05 14:38:26 +00:00
fix: ensure backend response is awaited before saving
This commit is contained in:
@@ -64,7 +64,7 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
||||
&& this.frm.doc.is_pos
|
||||
&& this.frm.doc.is_return
|
||||
) {
|
||||
this.set_total_amount_to_default_mop();
|
||||
await this.set_total_amount_to_default_mop();
|
||||
this.calculate_paid_amount();
|
||||
}
|
||||
|
||||
|
||||
@@ -843,8 +843,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
frappe.model.set_value(item.doctype, item.name, "stock_qty", valid_serial_nos.length);
|
||||
}
|
||||
|
||||
validate() {
|
||||
this.calculate_taxes_and_totals(false);
|
||||
async validate() {
|
||||
await this.calculate_taxes_and_totals(false);
|
||||
}
|
||||
|
||||
update_stock() {
|
||||
|
||||
Reference in New Issue
Block a user