mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 09:54:47 +00:00
feat: fetch valuation rate for internal transaction
This commit is contained in:
@@ -316,9 +316,12 @@ class TransactionBase(StatusUpdater):
|
|||||||
setattr(item_obj, k, v)
|
setattr(item_obj, k, v)
|
||||||
|
|
||||||
def handle_internal_parties(self, item_obj: object, item_details: dict) -> None:
|
def handle_internal_parties(self, item_obj: object, item_details: dict) -> None:
|
||||||
|
fetch_valuation_rate_for_internal_transaction = cint(
|
||||||
|
frappe.get_single_value("Accounts Settings", "fetch_valuation_rate_for_internal_transaction")
|
||||||
|
)
|
||||||
if (
|
if (
|
||||||
self.get("is_internal_customer") or self.get("is_internal_supplier")
|
self.get("is_internal_customer") or self.get("is_internal_supplier")
|
||||||
) and self.represents_company == self.company:
|
) and fetch_valuation_rate_for_internal_transaction:
|
||||||
args = frappe._dict(
|
args = frappe._dict(
|
||||||
{
|
{
|
||||||
"item_code": item_obj.item_code,
|
"item_code": item_obj.item_code,
|
||||||
|
|||||||
Reference in New Issue
Block a user