From bdb684354d859ec58241116509cfb5fd0f80ad4a Mon Sep 17 00:00:00 2001 From: AbleKSaju <126228406+AbleKSaju@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:01:48 +0530 Subject: [PATCH] fix: hide coupon table when no coupons available --- models/baseModels/Invoice/Invoice.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/models/baseModels/Invoice/Invoice.ts b/models/baseModels/Invoice/Invoice.ts index d345a577..f5d4e5ba 100644 --- a/models/baseModels/Invoice/Invoice.ts +++ b/models/baseModels/Invoice/Invoice.ts @@ -842,6 +842,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),