mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-14 12:38:46 +00:00
fix: set correct account currency for deferred expence account in PI
(cherry picked from commit 398083853c)
This commit is contained in:
@@ -969,7 +969,6 @@ class PurchaseInvoice(BuyingController):
|
|||||||
|
|
||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if flt(item.base_net_amount):
|
if flt(item.base_net_amount):
|
||||||
account_currency = get_account_currency(item.expense_account)
|
|
||||||
if item.item_code:
|
if item.item_code:
|
||||||
frappe.get_cached_value("Item", item.item_code, "asset_category")
|
frappe.get_cached_value("Item", item.item_code, "asset_category")
|
||||||
|
|
||||||
@@ -978,6 +977,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
and self.auto_accounting_for_stock
|
and self.auto_accounting_for_stock
|
||||||
and (item.item_code in stock_items or item.is_fixed_asset)
|
and (item.item_code in stock_items or item.is_fixed_asset)
|
||||||
):
|
):
|
||||||
|
account_currency = get_account_currency(item.expense_account)
|
||||||
# warehouse account
|
# warehouse account
|
||||||
warehouse_debit_amount = self.make_stock_adjustment_entry(
|
warehouse_debit_amount = self.make_stock_adjustment_entry(
|
||||||
gl_entries, item, voucher_wise_stock_value, account_currency
|
gl_entries, item, voucher_wise_stock_value, account_currency
|
||||||
@@ -1112,6 +1112,7 @@ class PurchaseInvoice(BuyingController):
|
|||||||
else item.deferred_expense_account
|
else item.deferred_expense_account
|
||||||
)
|
)
|
||||||
|
|
||||||
|
account_currency = get_account_currency(expense_account)
|
||||||
amount, base_amount = self.get_amount_and_base_amount(item, None)
|
amount, base_amount = self.get_amount_and_base_amount(item, None)
|
||||||
|
|
||||||
if provisional_accounting_for_non_stock_items:
|
if provisional_accounting_for_non_stock_items:
|
||||||
|
|||||||
Reference in New Issue
Block a user