fix: 'stock_rbnb_currency' referenced before assignment (#23528)

This commit is contained in:
Saqib
2020-10-08 13:49:07 +05:30
committed by GitHub
parent f64adc8acf
commit 7c760f62c3

View File

@@ -207,6 +207,8 @@ class PurchaseReceipt(BuyingController):
from erpnext.accounts.general_ledger import process_gl_map
stock_rbnb = self.get_company_default("stock_received_but_not_billed")
stock_rbnb_currency = get_account_currency(stock_rbnb)
cogs_account = self.get_company_default("default_expense_account")
landed_cost_entries = get_item_account_wise_additional_cost(self.name)
expenses_included_in_valuation = self.get_company_default("expenses_included_in_valuation")
@@ -242,7 +244,6 @@ class PurchaseReceipt(BuyingController):
# stock received but not billed
if d.base_net_amount:
stock_rbnb_currency = get_account_currency(stock_rbnb)
gl_entries.append(self.get_gl_dict({
"account": stock_rbnb,
"against": warehouse_account[d.warehouse]["account"],