2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

Merge pull request #1042 from AbleKSaju/fix-hideCouponTable

fix: hide coupon table when no coupons available
This commit is contained in:
Akshay 2024-12-06 15:02:54 +05:30 committed by GitHub
commit 22f71b215f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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