Merge pull request #16571 from Thunderbottom/purchase-invoice-fix

fix(purchase_invoice): fix undefined variable
This commit is contained in:
Nabin Hait 2019-02-05 10:26:41 +05:30 committed by GitHub
commit 56bff95e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -231,7 +231,7 @@ class PurchaseInvoice(BuyingController):
item.expense_account = warehouse_account[item.warehouse]["account"]
else:
item.expense_account = stock_not_billed_account
elif item.is_fixed_asset and d.pr_detail:
elif item.is_fixed_asset and item.pr_detail:
item.expense_account = asset_received_but_not_billed
elif not item.expense_account and for_validate:
throw(_("Expense account is mandatory for item {0}").format(item.item_code or item.item_name))