fix parent pages and teachers and admin
API CI/CD / Validate (composer + pint) (push) Successful in 3m8s
API CI/CD / Build frontend assets (push) Successful in 1m2s
API CI/CD / Test (PHPUnit) (push) Failing after 6m5s
API CI/CD / Security audit (push) Failing after 52s
API CI/CD / Deploy to shared hosting (PHP) (push) Has been skipped

This commit is contained in:
root
2026-07-09 13:56:22 -04:00
parent 21c9322127
commit 02ba2fe6b6
34 changed files with 2306 additions and 99 deletions
@@ -15,6 +15,7 @@ class InvoiceResource extends JsonResource
'invoice_number' => $this->resource['invoice_number'] ?? null,
'total_amount' => (float) ($this->resource['total_amount'] ?? 0),
'paid_amount' => (float) ($this->resource['paid_amount'] ?? 0),
'discount' => (float) ($this->resource['discount'] ?? 0),
'balance' => (float) ($this->resource['balance'] ?? 0),
'status' => $this->resource['status'] ?? null,
'school_year' => $this->resource['school_year'] ?? null,
@@ -26,6 +27,19 @@ class InvoiceResource extends JsonResource
'refund_amount' => (float) ($this->resource['refund_amount'] ?? 0),
'last_paid_amount' => (float) ($this->resource['last_paid_amount'] ?? 0),
'last_payment_date' => $this->resource['last_payment_date'] ?? null,
'payments' => collect($this->resource['payments'] ?? [])
->map(static fn ($payment) => [
'id' => (int) ($payment['id'] ?? 0),
'invoice_id' => (int) ($payment['invoice_id'] ?? 0),
'paid_amount' => (float) ($payment['paid_amount'] ?? 0),
'balance' => (float) ($payment['balance'] ?? 0),
'payment_method' => $payment['payment_method'] ?? null,
'payment_date' => $payment['payment_date'] ?? null,
'transaction_id' => $payment['transaction_id'] ?? null,
'status' => $payment['status'] ?? null,
])
->values()
->all(),
];
}
}