From 1e457ddcf22f32988e648e6e2c6bb0b4dcf24719 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Mon, 24 Oct 2022 13:55:24 +0530 Subject: [PATCH] fix: hide pay ref if no refs and sub or canc --- models/baseModels/Payment/Payment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/baseModels/Payment/Payment.ts b/models/baseModels/Payment/Payment.ts index f80f1a77..fd5dd865 100644 --- a/models/baseModels/Payment/Payment.ts +++ b/models/baseModels/Payment/Payment.ts @@ -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 = {