mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 10:11:20 +00:00
Merge branch 'master' of github.com:webnotes/erpnext into responsive
Conflicts: accounts/search_criteria/trend_analyzer/trend_analyzer.py buying/doctype/purchase_common/purchase_common.js
This commit is contained in:
@@ -65,16 +65,7 @@ class BuyingController(StockController):
|
||||
raise_exception=WrongWarehouseCompany)
|
||||
|
||||
def validate_stock_or_nonstock_items(self):
|
||||
items = [d.item_code for d in self.doclist.get({"parentfield": self.fname})]
|
||||
if self.stock_items:
|
||||
nonstock_items = list(set(items) - set(self.stock_items))
|
||||
if nonstock_items:
|
||||
webnotes.msgprint(_("Stock and non-stock items can not be entered in the same ") +
|
||||
self.doc.doctype + _(""". You should make separate documents for them.
|
||||
Stock Items: """) + ", ".join(self.stock_items) + _("""
|
||||
Non-stock Items: """) + ", ".join(nonstock_items), raise_exception=1)
|
||||
|
||||
elif items and not self.stock_items:
|
||||
if not self.stock_items:
|
||||
tax_for_valuation = [d.account_head for d in
|
||||
self.doclist.get({"parentfield": "purchase_tax_details"})
|
||||
if d.category in ["Valuation", "Valuation and Total"]]
|
||||
@@ -288,4 +279,4 @@ class BuyingController(StockController):
|
||||
from `tabItem` where name in (%s) and is_purchase_item='Yes'""" % \
|
||||
(", ".join((["%s"]*len(item_codes))),), item_codes)]
|
||||
|
||||
return self._purchase_items
|
||||
return self._purchase_items
|
||||
|
||||
Reference in New Issue
Block a user