add test batches

This commit is contained in:
root
2026-06-08 23:45:55 -04:00
parent c792b8be05
commit 8d4d610b82
1480 changed files with 22587 additions and 10762 deletions
@@ -15,7 +15,8 @@ class RefundOverpaymentService
public function __construct(
private RefundNotificationService $notifications,
private ApplicationUrlService $urls,
) {}
) {
}
public function recalculate(bool $triggerEvents = false, ?string $invoiceNumber = null, ?int $actorId = null): array
{
@@ -76,7 +77,7 @@ class RefundOverpaymentService
private function recalculateForInvoice(string $invoiceNumber, bool $triggerEvents, ?int $actorId): array
{
$invoice = Invoice::query()->where('invoice_number', $invoiceNumber)->first();
if (! $invoice) {
if (!$invoice) {
return ['ok' => false, 'message' => 'Invoice not found.'];
}
@@ -120,7 +121,6 @@ class RefundOverpaymentService
'updated_at' => utc_now(),
'updated_by' => $actorId,
]);
return ['ok' => true, 'message' => 'Overpayment updated for invoice.'];
}
@@ -204,7 +204,6 @@ class RefundOverpaymentService
'updated_by' => $actorId,
]);
$updated[] = (int) $openRow->id;
continue;
}
@@ -225,7 +224,6 @@ class RefundOverpaymentService
'updated_by' => $actorId,
]);
$updated[] = (int) $parentLevelOpen->id;
continue;
}
@@ -236,7 +234,7 @@ class RefundOverpaymentService
->orderByDesc('id')
->first();
if (! $existing || $existing->status === Refund::STATUS_PAID) {
if (!$existing || $existing->status === Refund::STATUS_PAID) {
$refund = Refund::query()->create([
'parent_id' => $pid,
'school_year' => $schoolYear,