mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 15:12:51 +00:00
Merge pull request #48675 from aerele/item-price-internal-transaction
feat(internal-transaction): fetch valuation rate for internal transaction
This commit is contained in:
@@ -42,6 +42,7 @@
|
|||||||
"show_payment_schedule_in_print",
|
"show_payment_schedule_in_print",
|
||||||
"item_price_settings_section",
|
"item_price_settings_section",
|
||||||
"maintain_same_internal_transaction_rate",
|
"maintain_same_internal_transaction_rate",
|
||||||
|
"fetch_valuation_rate_for_internal_transaction",
|
||||||
"column_break_feyo",
|
"column_break_feyo",
|
||||||
"maintain_same_rate_action",
|
"maintain_same_rate_action",
|
||||||
"role_to_override_stop_action",
|
"role_to_override_stop_action",
|
||||||
@@ -644,6 +645,12 @@
|
|||||||
"fieldname": "drop_ar_procedures",
|
"fieldname": "drop_ar_procedures",
|
||||||
"fieldtype": "Button",
|
"fieldtype": "Button",
|
||||||
"label": "Drop Procedures"
|
"label": "Drop Procedures"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "fetch_valuation_rate_for_internal_transaction",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Fetch Valuation Rate for Internal Transaction"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"grid_page_length": 50,
|
"grid_page_length": 50,
|
||||||
@@ -652,7 +659,7 @@
|
|||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"issingle": 1,
|
"issingle": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2025-06-23 15:55:33.346398",
|
"modified": "2025-07-18 13:56:47.192437",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Accounts Settings",
|
"name": "Accounts Settings",
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ class AccountsSettings(Document):
|
|||||||
enable_immutable_ledger: DF.Check
|
enable_immutable_ledger: DF.Check
|
||||||
enable_party_matching: DF.Check
|
enable_party_matching: DF.Check
|
||||||
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
|
exchange_gain_loss_posting_date: DF.Literal["Invoice", "Payment", "Reconciliation Date"]
|
||||||
|
fetch_valuation_rate_for_internal_transaction: DF.Check
|
||||||
frozen_accounts_modifier: DF.Link | None
|
frozen_accounts_modifier: DF.Link | None
|
||||||
general_ledger_remarks_length: DF.Int
|
general_ledger_remarks_length: DF.Int
|
||||||
ignore_account_closing_balance: DF.Check
|
ignore_account_closing_balance: DF.Check
|
||||||
|
|||||||
@@ -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