15 lines
1 KiB
PHP
15 lines
1 KiB
PHP
<div class="col-12"><label class="form-label"><?= h(t('animal.tariff_record')) ?> <span
|
||
class="text-muted">(<?= h(mb_strtolower(t('common.optional'))) ?>)</span></label><select class="form-select"
|
||
name="tariff_id">
|
||
<option value=""><?= h(t('animal.no_expense')) ?></option><?php $expenseClinic = '';
|
||
foreach (($expenseTariffs ?? []) as $t):if ($expenseClinic !== $t['clinic_name']):if ($expenseClinic !== ''):?>
|
||
</optgroup><?php endif;
|
||
$expenseClinic = $t['clinic_name'];?><optgroup label="<?= h($expenseClinic) ?>"><?php endif;?><option
|
||
value="<?= (int)$t['id'] ?>"><?= h($t['label']) ?> ·
|
||
<?= number_format($t['effective_cents'] / 100, 2, ',', ' ') ?> €
|
||
<?= h(t('animal.net')) ?><?= (float)$t['discount_percent'] > 0 ? ' (−' . number_format((float)$t['discount_percent'], 0) . ' %)' : '' ?>
|
||
</option><?php endforeach;
|
||
if ($expenseClinic !== ''):?></optgroup><?php endif;?>
|
||
</select>
|
||
<div class="form-hint"><?= h(t('animal.expense_hint')) ?></div>
|
||
</div>
|