-
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
Fixed issue : Payment Entry allocating amount more than invoice amount. #9084
Conversation
ashwinisave35
commented
May 30, 2017
- Fixed issue mentioned by client for "Payment Entry allocating amount more than invoice amount".
- Fixed github issue: Payment Entry - One Invoice should not be selectable multiple times Payment Entry - One Invoice should not be selectable multiple times #8045
def validate_duplicate_entry(self): | ||
reference_names = [] | ||
for d in self.get("references"): | ||
print d.reference_name |
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.
remove print
print d.reference_name | ||
if d.reference_name in reference_names: | ||
frappe.throw(_("Duplicate entry in References {0} {1}").format(d.reference_doctype, d.reference_name)) | ||
reference_names.append(d.reference_name) |
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.
Check based on combination of reference_type and reference_name
if (d.reference_type, d.reference_name) in reference_names:
frappe.throw(_("Row #{0}: Duplicate entry in References {1} {2}").format(d.idx, d.reference_doctype, d.reference_name))
reference_names.append((d.reference_type, d.reference_name))
def validate_allocated_amount(self): | ||
for d in self.get("references"): | ||
if (flt(d.allocated_amount))> 0: | ||
if d.allocated_amount > d.outstanding_amount: |
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 flt(d.allocated_amount) > flt(d.outstanding_amount):
for d in self.get("references"): | ||
if (flt(d.allocated_amount))> 0: | ||
if d.allocated_amount > d.outstanding_amount: | ||
frappe.throw(_("Allocated Amount cannot be greater than outstanding amount.")) |
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.
frappe.throw(_("Row #{0}: Allocated Amount cannot be greater than outstanding amount.").format(d.idx))
…ent_entry_issues * 'develop' of https://github.com/frappe/erpnext: bumped to version 8.0.42 [minor] fixed a unexpected token error for opportunity
…t_issue * 'develop' of https://github.com/frappe/erpnext: (25 commits) bumped to version 8.0.43 Fix contact form if email is both customer and lead (frappe#9075) Weekly digest subject translation (frappe#9003) Arabic language shows Errors onSubmit in maintenance_schedule (frappe#9082) [translation] translation updates (frappe#9081) Fixed issue : Payment Entry allocating amount more than invoice amount. (frappe#9084) Set website route field as No Copy field (frappe#9106) [Fix] Employees working on a holiday report's date filter not working (frappe#9108) [minor] install node v7 (frappe#9109) Fix the demo for the schools (frappe#8879) Rate validation in return entry Fixes in the patch (frappe#9027) [minor] fixes typo (frappe#9093) bumped to version 8.0.42 [minor] fixed a unexpected token error for opportunity bumped to version 8.0.41 Correction in the validation message (frappe#9079) Fix grammar error in HR Training Results (frappe#9076) link for timesheet, fix frappe#9042 (frappe#9071) field for the naming series should have no copy attribute (frappe#9067) ...