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

feat: validate docstatus of selected invoices still saved/submitted #44

Merged
merged 2 commits into from
Feb 15, 2023

Conversation

HKuz
Copy link
Collaborator

@HKuz HKuz commented Jan 31, 2023

Same changes to address #40 for the version-14 branch. With the switch to use frappe.get_value I realized I was able to collapse the for loop into a comprehension. (If it's worth it, I can quickly refactor the v13 code too).

Update: grammar nit fixed in the error message

@HKuz HKuz force-pushed the v14_inv_docstatus branch from 06b92ca to 68dd2ee Compare January 31, 2023 20:53
@agritheory
Copy link
Owner

@HKuz Can you refactor this change into a separate method, like I did here:
#47

@HKuz
Copy link
Collaborator Author

HKuz commented Feb 11, 2023

All set - I caught a few small things during testing and can make the changes in v-13:

  • the ref_number is None for some txns, which would throw an error in the line joining values for invalid_records
  • invalid_records was overwriting itself if there were more than one cancelled transaction -> changed it to a += and added a <br> at the end to separate multiple transactions
  • minor typo in error message 'The follow document(s)' -> 'The following document(s)'

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.

2 participants