mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-03 13:38:27 +00:00
Merge pull request #50141 from diptanilsaha/fix_st_51018
fix(point-of-sale): render payment methods only when payment component is visible
This commit is contained in:
@@ -502,6 +502,10 @@ erpnext.PointOfSale.Payment = class {
|
||||
const payments = doc.payments;
|
||||
const currency = doc.currency;
|
||||
|
||||
if (!this.$payment_modes.is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$payment_modes.html(
|
||||
`${payments
|
||||
.map((p, i) => {
|
||||
@@ -679,6 +683,10 @@ erpnext.PointOfSale.Payment = class {
|
||||
const currency = doc.currency;
|
||||
const label = doc.paid_amount > grand_total ? __("Change Amount") : __("Remaining Amount");
|
||||
|
||||
if (!this.$totals.is(":visible")) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.$totals.html(
|
||||
`<div class="col">
|
||||
<div class="total-label">${__("Grand Total")}</div>
|
||||
|
||||
Reference in New Issue
Block a user