fix(purchase_invoice): fix undefined variable

fixes issue while creating purchase invoice

Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay Pai 2019-02-04 16:30:20 +05:30
parent 752f2f1805
commit 125505f2aa
No known key found for this signature in database
GPG Key ID: 75507BE256F40CED

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))