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: update payment amount for partial pos return #44065

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: update payment amount for partial pos return
  • Loading branch information
kavin-114 committed Nov 11, 2024
commit 53ef6336b62fab0dedc19b74dc1e5c293bf933c3
14 changes: 7 additions & 7 deletions erpnext/public/js/controllers/taxes_and_totals.js
Original file line number Diff line number Diff line change
Expand Up @@ -845,13 +845,13 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
);
}

if(!this.frm.doc.is_return){
this.frm.doc.payments.find(payment => {
if (payment.default) {
payment.amount = total_amount_to_pay;
}
});
}
this.frm.doc.payments.find(payment => {
if (payment.default) {
payment.amount = total_amount_to_pay;
} else {
payment.amount = 0
}
});

this.frm.refresh_fields();
}
Expand Down
Loading