BIS issue fixes

This commit is contained in:
Sahil Khan
2018-12-20 18:50:24 +05:30
committed by Nabin Hait
parent 29552c1ec4
commit 34766c0c50
4 changed files with 113 additions and 44 deletions

View File

@@ -678,7 +678,9 @@ class BuyingController(StockController):
frappe.db.sql("delete from `tabSerial No` where purchase_document_no=%s", self.name)
def validate_schedule_date(self):
if not self.schedule_date and self.get("items"):
if not self.get("items"):
return
if not self.schedule_date:
self.schedule_date = min([d.schedule_date for d in self.get("items")])
if self.schedule_date: