Add occurrence checklist submodule

This commit is contained in:
gitea_admin committed 2026-09-30 10:02:29 +02:00
1 parent 5dbbac35c3
commit 6ac6ed85b2
12 files changed
+254 -2

No files matched your search

+3
View File
@@ -2,6 +2,7 @@
declare(strict_types=1);
require_once __DIR__ . '/../shared/db.php';
require_once __DIR__ . '/occurrence_checklist.php';
const MARKET_MANAGEMENT_STATUSES = [
'open',
@@ -956,6 +957,7 @@ function market_management_create_occurrence(PDO $pdo, array $input): array
'tax_status' => $taxStatus,
'tax_rate' => $taxRate,
]);
market_management_checklist_initialize($pdo, (int) $occurrence['id']);
if ($startedTransaction) {
$pdo->commit();
}
@@ -1132,6 +1134,7 @@ function market_management_get_occurrence(PDO $pdo, int $occurrenceId, bool $inc
? null
: round((float) $summary['gross_amount'] - (float) $occurrence['paid_amount'], 2),
];
$occurrence['checklist'] = market_management_get_occurrence_checklist($pdo, $occurrenceId, $includeArchived);
return $occurrence;
}