From 812b7e45d2b0bac7b0fb3f11cbf1b804fb21d7c2 Mon Sep 17 00:00:00 2001 From: akshayitzme Date: Fri, 2 Feb 2024 11:51:46 +0530 Subject: [PATCH] feat: hide pricingRuleDetail when unapplied and not enabled --- models/baseModels/Invoice/Invoice.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/baseModels/Invoice/Invoice.ts b/models/baseModels/Invoice/Invoice.ts index 5a347dede..b3a291d03 100644 --- a/models/baseModels/Invoice/Invoice.ts +++ b/models/baseModels/Invoice/Invoice.ts @@ -724,6 +724,9 @@ export abstract class Invoice extends Transactional { priceList: () => !this.fyo.singles.AccountingSettings?.enablePriceList, returnAgainst: () => (this.isSubmitted || this.isCancelled) && !this.returnAgainst, + pricingRuleDetail: () => + !this.fyo.singles.AccountingSettings?.enablePricingRule || + !this.pricingRuleDetail?.length, }; static defaults: DefaultMap = {