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

fix: hide pay ref if no refs and sub or canc

This commit is contained in:
18alantom 2022-10-24 13:55:24 +05:30
parent 3b229321a9
commit 1e457ddcf2

View File

@ -564,7 +564,7 @@ export class Payment extends Transactional {
amountPaid: () => this.writeoff?.isZero() ?? true,
attachment: () =>
!(this.attachment || !(this.isSubmitted || this.isCancelled)),
for: () => !((this.isSubmitted || this.isCancelled) && this.for?.length),
for: () => !!((this.isSubmitted || this.isCancelled) && !this.for?.length),
};
static filters: FiltersMap = {