add test batches
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user