mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 04:39:11 +00:00
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
This commit is contained in:
@@ -418,7 +418,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onload_post_render() {
|
onload_post_render() {
|
||||||
if(this.frm.doc.__islocal && !(this.frm.doc.taxes || []).length
|
if(this.frm.doc.__islocal && !(this.frm.doc.taxes || []).length
|
||||||
&& !this.frm.doc.__onload?.load_after_mapping) {
|
&& !this.frm.doc.__onload?.load_after_mapping) {
|
||||||
@@ -659,15 +658,23 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
},
|
},
|
||||||
async () => {
|
async () => {
|
||||||
// for internal customer instead of pricing rule directly apply valuation rate on item
|
// for internal customer instead of pricing rule directly apply valuation rate on item
|
||||||
|
if ((me.frm.doc.is_internal_customer || me.frm.doc.is_internal_supplier)) {
|
||||||
const fetch_valuation_rate_for_internal_transactions = await frappe.db.get_single_value(
|
const fetch_valuation_rate_for_internal_transactions = await frappe.db.get_single_value(
|
||||||
"Accounts Settings", "fetch_valuation_rate_for_internal_transaction"
|
"Accounts Settings", "fetch_valuation_rate_for_internal_transaction"
|
||||||
);
|
);
|
||||||
if ((me.frm.doc.is_internal_customer || me.frm.doc.is_internal_supplier) && fetch_valuation_rate_for_internal_transactions) {
|
if (fetch_valuation_rate_for_internal_transactions) {
|
||||||
me.get_incoming_rate(item, me.frm.posting_date, me.frm.posting_time,
|
me.get_incoming_rate(
|
||||||
me.frm.doc.doctype, me.frm.doc.company);
|
item,
|
||||||
} else {
|
me.frm.posting_date,
|
||||||
me.frm.script_manager.trigger("price_list_rate", cdt, cdn);
|
me.frm.posting_time,
|
||||||
|
me.frm.doc.doctype,
|
||||||
|
me.frm.doc.company
|
||||||
|
);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
me.frm.script_manager.trigger("price_list_rate", cdt, cdn);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
if (me.frm.doc.is_internal_customer || me.frm.doc.is_internal_supplier) {
|
if (me.frm.doc.is_internal_customer || me.frm.doc.is_internal_supplier) {
|
||||||
|
|||||||
Reference in New Issue
Block a user