fix: Taxes getting overriden from mapped to target doc

This commit is contained in:
Deepesh Garg 2022-03-31 12:14:16 +05:30
parent b981fae5a4
commit 4720969ce6
2 changed files with 5 additions and 0 deletions

View File

@ -276,6 +276,8 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying.
if(this.frm.updating_party_details || this.frm.doc.inter_company_invoice_reference) if(this.frm.updating_party_details || this.frm.doc.inter_company_invoice_reference)
return; return;
if (this.frm.doc.__onload && this.frm.doc.__onload.load_after_mapping) return;
erpnext.utils.get_party_details(this.frm, "erpnext.accounts.party.get_party_details", erpnext.utils.get_party_details(this.frm, "erpnext.accounts.party.get_party_details",
{ {
posting_date: this.frm.doc.posting_date, posting_date: this.frm.doc.posting_date,

View File

@ -280,6 +280,9 @@ erpnext.accounts.SalesInvoiceController = class SalesInvoiceController extends e
} }
var me = this; var me = this;
if(this.frm.updating_party_details) return; if(this.frm.updating_party_details) return;
if (this.frm.doc.__onload && this.frm.doc.__onload.load_after_mapping) return;
erpnext.utils.get_party_details(this.frm, erpnext.utils.get_party_details(this.frm,
"erpnext.accounts.party.get_party_details", { "erpnext.accounts.party.get_party_details", {
posting_date: this.frm.doc.posting_date, posting_date: this.frm.doc.posting_date,