-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a reference of Sales Invoice in Serial No #8855
Conversation
01f073e
to
4a7f7cd
Compare
serial_nos = item.serial_no or "" | ||
si_serial_nos = set(serial_nos.split("\n")) | ||
|
||
if si_serial_nos - dn_serial_nos: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For partial invoicing, it will always be different. You need to check for each serial no.
""" | ||
|
||
for item in self.items: | ||
if not item.delivery_note and not item.dn_detail: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be or
@@ -83,6 +83,7 @@ def validate(self): | |||
self.validate_c_form() | |||
self.validate_time_sheets_are_submitted() | |||
self.validate_multiple_billing("Delivery Note", "dn_detail", "amount", "items") | |||
self.validate_serial_numbers() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not self.is_return
@@ -125,6 +126,7 @@ def on_submit(self): | |||
self.update_against_document_in_jv() | |||
|
|||
self.update_time_sheet(self.name) | |||
self.update_serial_no() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not self.is_return
@@ -160,6 +162,7 @@ def on_cancel(self): | |||
|
|||
self.make_gl_entries_on_cancel() | |||
frappe.db.set(self, 'status', 'Cancelled') | |||
self.update_serial_no(in_cancel=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not self.is_return
sales_invoice = item.get("parent", None) | ||
serial_nos = item.get("serial_no", "") | ||
|
||
if not sales_invoice and not serial_no: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be or
fixes for #8804
after