Skip to content
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

Merged
merged 4 commits into from
May 23, 2017

Conversation

mbauskar
Copy link
Contributor

@mbauskar mbauskar commented May 16, 2017

fixes for #8804

after

after

@mbauskar mbauskar force-pushed the serial-nos branch 2 times, most recently from 01f073e to 4a7f7cd Compare May 16, 2017 09:04
serial_nos = item.serial_no or ""
si_serial_nos = set(serial_nos.split("\n"))

if si_serial_nos - dn_serial_nos:
Copy link
Member

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:
Copy link
Member

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()
Copy link
Member

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()
Copy link
Member

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)
Copy link
Member

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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be or

@nabinhait nabinhait merged commit 3b9c2a4 into frappe:develop May 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants