mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
[Minor Fix] Force toggle display Net Total field when default taxes are fetched (#15532)
* Minor fix for the problem that Net Total, Net Rate, Net Amount field would not be shown when default taxes were fetched * Prevent net_rate from becoming NaN * -Fixed problem that party_account_currency was not set in mapped document -Fixed problem that discount amount was not recalculated (in mapped document) -Fixed problem that set_dynamic_fields would work only on certain condition that led to showing Total (Company Currency) field even when using company currency
This commit is contained in:
@@ -286,6 +286,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
me.frm.set_value("taxes", r.message.taxes);
|
||||
}
|
||||
},
|
||||
() => me.set_dynamic_labels(),
|
||||
() => me.calculate_taxes_and_totals()
|
||||
]);
|
||||
}
|
||||
@@ -845,16 +846,10 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
||||
this.frm.toggle_reqd("plc_conversion_rate",
|
||||
!!(this.frm.doc.price_list_name && this.frm.doc.price_list_currency));
|
||||
|
||||
if(this.frm.doc_currency!==this.frm.doc.currency
|
||||
|| this.frm.doc_currency!==this.frm.doc.price_list_currency) {
|
||||
// reset names only when the currency is different
|
||||
|
||||
var company_currency = this.get_company_currency();
|
||||
this.change_form_labels(company_currency);
|
||||
this.change_grid_labels(company_currency);
|
||||
this.frm.refresh_fields();
|
||||
this.frm.doc_currency = this.frm.doc.currency;
|
||||
}
|
||||
var company_currency = this.get_company_currency();
|
||||
this.change_form_labels(company_currency);
|
||||
this.change_grid_labels(company_currency);
|
||||
this.frm.refresh_fields();
|
||||
},
|
||||
|
||||
change_form_labels: function(company_currency) {
|
||||
|
||||
Reference in New Issue
Block a user