Delivery Note fixes
This commit is contained in:
parent
64b4d98778
commit
bc4574b59d
@ -120,6 +120,12 @@ class DeliveryNote(SellingController):
|
|||||||
|
|
||||||
if not self.installation_status: self.installation_status = 'Not Installed'
|
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):
|
def validate_with_previous_doc(self):
|
||||||
super(DeliveryNote, self).validate_with_previous_doc({
|
super(DeliveryNote, self).validate_with_previous_doc({
|
||||||
"Sales Order": {
|
"Sales Order": {
|
||||||
@ -202,6 +208,7 @@ class DeliveryNote(SellingController):
|
|||||||
|
|
||||||
def on_submit(self):
|
def on_submit(self):
|
||||||
self.validate_packed_qty()
|
self.validate_packed_qty()
|
||||||
|
self.validate_qty()
|
||||||
|
|
||||||
# Check for Approving Authority
|
# Check for Approving Authority
|
||||||
frappe.get_doc('Authorization Control').validate_approving_authority(self.doctype, self.company, self.base_grand_total, self)
|
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