hide payment button for floating amount

This commit is contained in:
Omair Saleh
2022-09-30 16:09:05 +08:00
parent ff159730e0
commit d1cf06d700
+1 -1
View File
@@ -29,7 +29,7 @@ class TransactionResource extends JsonResource
'amount' => (double) $this->amount,
'payment_method' => (int) $this->payment_method,
'payment_reference' => $this->payment_reference,
'outstanding' => (double) $this->amount - ($this->transactions()->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount')),
'outstanding' => (double) ($this->transactions()->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount')),
'floating' => (double) $this->amount - ($this->transactions()->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION, ApprovalStatus::PENDING_VERIFICATION])->sum('amount')),
'service_charge' => (double) $this->service_charge,
'tax' => (double) $this->tax,