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

fix: pos item cart dom updates #26459

Merged

Conversation

nextchamp-saqib
Copy link
Member

Problem:

  • Changing discount from POS screen, doesn't update the Grand Total, Net Total etc

Why?

  • If discount is applied on the invoice, grand_total, net_total and other fields on the pos invoice are changed.
  • Those change doesn't trigger an event. For eg. frm.doc.grand_total = 600 doesn't triggers grand_total event on the form
  • Hence it not possible to listen for these updates to change the Cart dom.

Fix:

  • On any field change of the POS Invoice, the frm.refresh_field event is manually triggered almost in every case.
  • Hence, listening for that event and triggering cart refresh solves the issue.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 42.844% when pulling 7bd4c6f on nextchamp-saqib:pos-item-cart-update-fix into a8b6cf8 on frappe:develop.

@nextchamp-saqib nextchamp-saqib merged commit 7c5711d into frappe:develop Jul 13, 2021
nextchamp-saqib added a commit to nextchamp-saqib/erpnext that referenced this pull request Jul 13, 2021
nextchamp-saqib added a commit to nextchamp-saqib/erpnext that referenced this pull request Jul 13, 2021
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants