2
0
mirror of https://github.com/frappe/books.git synced 2024-12-23 03:19:01 +00:00

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
commit 6440527999
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,
};