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

Fixed issue : Payment Entry allocating amount more than invoice amount. #9084

Merged
merged 4 commits into from
Jun 1, 2017

Conversation

ashwinisave35
Copy link
Contributor

  1. Fixed issue mentioned by client for "Payment Entry allocating amount more than invoice amount".

screen shot 2017-05-30 at 6 13 35 pm

  1. Fixed github issue: Payment Entry - One Invoice should not be selectable multiple times Payment Entry - One Invoice should not be selectable multiple times #8045

screen shot 2017-05-30 at 6 15 11 pm

def validate_duplicate_entry(self):
reference_names = []
for d in self.get("references"):
print d.reference_name
Copy link
Member

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

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

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

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
@nabinhait nabinhait merged commit 2020dd3 into frappe:develop Jun 1, 2017
ashwinisave35 added a commit to ashwinisave35/erpnext that referenced this pull request Jun 2, 2017
…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)
  ...
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