parent
1378aefa9c
commit
b906cf7b88
11 changed files with 96 additions and 13 deletions
|
|
@ -613,6 +613,27 @@ final class SettingsController
|
|||
}
|
||||
exit();
|
||||
}
|
||||
public static function deleteTariff(): void
|
||||
{
|
||||
self::admin();
|
||||
self::postOnly();
|
||||
$id = (int) ($_POST['id'] ?? 0);
|
||||
$label = PricingService::deleteTariff($id);
|
||||
if ($label === null) {
|
||||
http_response_code(404);
|
||||
echo h(t('error.tariff_not_found'));
|
||||
return;
|
||||
}
|
||||
AuditService::log(
|
||||
'tariff_deleted',
|
||||
'/settings/pricing/tariff/delete',
|
||||
'Tarif supprimé : ' . $label,
|
||||
'clinic_tariff',
|
||||
$id,
|
||||
);
|
||||
header('Location: /settings/pricing?saved=1');
|
||||
exit();
|
||||
}
|
||||
public static function saveAdoptionFees(): void
|
||||
{
|
||||
self::admin();
|
||||
|
|
|
|||
Loading…
Reference in a new issue