mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-17 16:45:02 +00:00
Merge pull request #48794 from diptanilsaha/internal_trans_valuation_rate
fix: fetch item valuation rate for internal transactions when server side reactivity is disabled
This commit is contained in:
@@ -674,9 +674,12 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
me.apply_product_discount(d);
|
||||
}
|
||||
},
|
||||
() => {
|
||||
async () => {
|
||||
// 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.frm.doc.doctype, me.frm.doc.company);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user