2
0
mirror of https://github.com/frappe/books.git synced 2025-01-02 22:50:14 +00:00

fix: hide coupon table when no coupons available

This commit is contained in:
AbleKSaju 2024-12-06 12:01:48 +05:30
parent 0b310c2a49
commit bdb684354d

View File

@ -842,6 +842,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,
priceList: () => priceList: () =>
!this.fyo.singles.AccountingSettings?.enablePriceList || !this.fyo.singles.AccountingSettings?.enablePriceList ||
(!this.canEdit && !this.priceList), (!this.canEdit && !this.priceList),