This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
$carryForward = $preview['carry_forward'] ?? [];
|
||||
$status = (string) ($source['status'] ?? '');
|
||||
$batchStatus = (string) ($latestBatch['status'] ?? '');
|
||||
$missingCarryForwardInvoices = (int) ($missingCarryForwardInvoices ?? 0);
|
||||
$money = static fn ($value): string => '$' . number_format((float) $value, 2);
|
||||
$score = static fn ($value): string => is_numeric($value) ? number_format((float) $value, 2) : '-';
|
||||
$promotionUrl = static function (array $overrides = []) use ($source, $target, $promotionSort, $promotionOrder, $promotionPage, $promotionPerPage): string {
|
||||
@@ -429,6 +430,17 @@
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (in_array($batchStatus, ['executed', 'completed'], true)): ?>
|
||||
<form action="<?= site_url('administrator/school-years/' . (int) $source['id'] . '/closing/execute') ?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
<button class="btn btn-primary" type="submit">
|
||||
<?= $missingCarryForwardInvoices > 0
|
||||
? 'Repair Carry-Forward Invoices (' . $missingCarryForwardInvoices . ')'
|
||||
: 'Re-run Carry-Forward Sync' ?>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($status === 'closing' && ! in_array($batchStatus, ['executed', 'completed'], true)): ?>
|
||||
<form action="<?= site_url('administrator/school-years/' . (int) $source['id'] . '/closing/cancel') ?>" method="post">
|
||||
<?= csrf_field() ?>
|
||||
|
||||
Reference in New Issue
Block a user