mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-15 04:45:09 +00:00
fix: fetch item valuation rate for internal transactions
This commit is contained in:
@@ -652,9 +652,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
me.apply_product_discount(d);
|
me.apply_product_discount(d);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
() => {
|
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) && me.frm.doc.represents_company === me.frm.doc.company) {
|
const fetch_valuation_rate_for_internal_transactions = await frappe.db.get_single_value(
|
||||||
|
"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) {
|
||||||
me.get_incoming_rate(item, me.frm.posting_date, me.frm.posting_time,
|
me.get_incoming_rate(item, me.frm.posting_date, me.frm.posting_time,
|
||||||
me.frm.doc.doctype, me.frm.doc.company);
|
me.frm.doc.doctype, me.frm.doc.company);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user