Merge pull request #845 from akshayitzme/fix-price-list

fix: hide pricelist field when its empty and doc is submitted/cancelled
This commit is contained in:
Isaac-GC
2024-02-07 16:33:17 -08:00
committed by GitHub
+3 -1
View File
@@ -692,7 +692,9 @@ export abstract class Invoice extends Transactional {
!(this.attachment || !(this.isSubmitted || this.isCancelled)),
backReference: () => !this.backReference,
quote: () => !this.quote,
priceList: () => !this.fyo.singles.AccountingSettings?.enablePriceList,
priceList: () =>
!this.fyo.singles.AccountingSettings?.enablePriceList ||
(!this.canEdit && !this.priceList),
returnAgainst: () =>
(this.isSubmitted || this.isCancelled) && !this.returnAgainst,
};