Skip to content

Commit

Permalink
Merge pull request #845 from akshayitzme/fix-price-list
Browse files Browse the repository at this point in the history
fix: hide pricelist field when its empty and doc is submitted/cancelled
  • Loading branch information
Isaac-GC authored Feb 8, 2024
2 parents 8db453c + 99b1b08 commit 6440527
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion models/baseModels/Invoice/Invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 6440527

Please sign in to comment.