Added Make Receipt (Update Stock) and IsCash option on Purchase Invoice

This commit is contained in:
jof2jc
2016-02-08 23:44:55 +07:00
committed by Nabin Hait
parent 092b43bff2
commit 524ebbcbb9
7 changed files with 715 additions and 21 deletions

View File

@@ -169,7 +169,7 @@ class StockController(AccountsController):
else:
is_expense_account = frappe.db.get_value("Account",
item.get("expense_account"), "report_type")=="Profit and Loss"
if self.doctype not in ("Purchase Receipt", "Stock Reconciliation", "Stock Entry") and not is_expense_account:
if self.doctype not in ("Purchase Receipt", "Purchase Invoice", "Stock Reconciliation", "Stock Entry") and not is_expense_account:
frappe.throw(_("Expense / Difference account ({0}) must be a 'Profit or Loss' account")
.format(item.get("expense_account")))
if is_expense_account and not item.get("cost_center"):