Delivery Note fixes
This commit is contained in:
parent
64b4d98778
commit
bc4574b59d
@ -119,6 +119,12 @@ class DeliveryNote(SellingController):
|
||||
self.update_current_stock()
|
||||
|
||||
if not self.installation_status: self.installation_status = 'Not Installed'
|
||||
|
||||
def validate_qty(self):
|
||||
data = frappe.get_all("Delivery Note Item", filters={"parent" : self.name}, fields=["qty"])
|
||||
for quant in data:
|
||||
if quant.qty == 0:
|
||||
frappe.throw("Item quantity can not be zero")
|
||||
|
||||
def validate_with_previous_doc(self):
|
||||
super(DeliveryNote, self).validate_with_previous_doc({
|
||||
@ -202,6 +208,7 @@ class DeliveryNote(SellingController):
|
||||
|
||||
def on_submit(self):
|
||||
self.validate_packed_qty()
|
||||
self.validate_qty()
|
||||
|
||||
# Check for Approving Authority
|
||||
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.base_grand_total, self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user