2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 19:09:01 +00:00

fix: hide coupons table when no coupons are available after submission

This commit is contained in:
AbleKSaju 2024-12-07 12:38:51 +05:30
parent 7ff492adfc
commit 614d8931f5

View File

@ -843,7 +843,7 @@ export abstract class Invoice extends Transactional {
loyaltyProgram: () => !this.loyaltyProgram, loyaltyProgram: () => !this.loyaltyProgram,
loyaltyPoints: () => !this.redeemLoyaltyPoints || this.isReturn, loyaltyPoints: () => !this.redeemLoyaltyPoints || this.isReturn,
redeemLoyaltyPoints: () => !this.loyaltyProgram || this.isReturn, redeemLoyaltyPoints: () => !this.loyaltyProgram || this.isReturn,
coupons: () => !this.coupons?.length, coupons: () => this.isSubmitted && !this.coupons?.length,
priceList: () => priceList: () =>
!this.fyo.singles.AccountingSettings?.enablePriceList || !this.fyo.singles.AccountingSettings?.enablePriceList ||
(!this.canEdit && !this.priceList), (!this.canEdit && !this.priceList),