94 lines
5.9 KiB
PHP
Executable File
94 lines
5.9 KiB
PHP
Executable File
<div class="row g-2">
|
|
<div class="col-lg-5">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-light py-3 d-flex justify-content-between align-items-center">
|
|
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-list me-2"></i><?= _("Garanties Disponibles") ?></h6>
|
|
<button class="btn btn-xs btn-outline-primary rounded-pill fw-bold" onclick="ajouter_tous_garantie_produit();">
|
|
<?= _("Tout ajouter") ?> <i class="fas fa-angle-double-right ms-1"></i>
|
|
</button>
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive" style="max-height: 600px; overflow-y: auto;">
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 9.5pt;">
|
|
<thead class="bg-white sticky-top">
|
|
<tr>
|
|
<th class="ps-3 py-2 border-bottom"><?= _("Libellé Garantie") ?></th>
|
|
<th class="text-center border-bottom" width="15%"><?= _("Action") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($garanties_sans_seuils as $v): $code = $v['codeGarantie']; ?>
|
|
<tr>
|
|
<td class="ps-3"><?= $this->nettoyer($v['garantie']) ?></td>
|
|
<td class="text-center">
|
|
<button class="btn btn-sm btn-primary-ghost rounded-circle action-btn" onclick="ajouter_un_garantie_produit('<?=$code?>');" title="<?= _("Ajouter") ?>">
|
|
<i class="fas fa-chevron-right"></i>
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-7">
|
|
<div class="card border-0 shadow-sm h-100 border-start border-primary border-4">
|
|
<div class="card-header bg-white py-3 d-flex justify-content-between align-items-center border-bottom border-2">
|
|
|
|
<h6 class="mb-0 fw-bold text-danger text-uppercase"><i class="fas fa-check-circle me-2"></i><?= _("Garanties affectées au Produit Santé") ?></h6>
|
|
<button class="btn btn-xs btn-outline-danger rounded-pill fw-bold" onclick="retirer_tous_garantie_produit();">
|
|
<i class="fas fa-angle-double-left me-1"></i> <?= _("Tout retirer") ?>
|
|
</button>
|
|
|
|
</div>
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive" style="max-height: 600px; overflow-y: auto;">
|
|
<table class="table table-hover align-middle mb-0" style="font-size: 9pt;">
|
|
<thead class="bg-primary-ghost text-primary sticky-top">
|
|
<tr>
|
|
<th class="ps-3 py-2 border-bottom" width="10%"><?= _("Retirer") ?></th>
|
|
<th class="py-2 border-bottom"><?= _("Libellé") ?></th>
|
|
<th class="text-center border-bottom" width="20%"><?= _("Seuil Taux (%)") ?></th>
|
|
<th class="text-center border-bottom" width="25%"><?= _("Seuil Valeur") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($garanties_avec_seuils as $v): $id = $v['id']; ?>
|
|
<tr>
|
|
<?php if ($isEditable): ?>
|
|
<td class="ps-3 text-center">
|
|
<button class="btn btn-sm btn-danger-light rounded-circle action-btn" onclick="retirer_un_garantie_produit('<?=$id?>');" title="<?= _("Retirer") ?>">
|
|
<i class="fas fa-chevron-left"></i>
|
|
</button>
|
|
</td>
|
|
<?php endif; ?>
|
|
<td class="fw-bold"><?= $this->nettoyer($v['garantie']) ?></td>
|
|
|
|
<td>
|
|
<div class="input-group input-group-sm">
|
|
<input class="form-control text-center border-2 fw-bold input-editable"
|
|
type="number" value="<?= $v['tauxSeuilAlerte'] ?>"
|
|
onchange="this.value=supprimer_espace_nombre(this.value); if(controle_numerique(this)){maj_taux_seuil_alerte_garantie('<?=$id?>', this.value);}">
|
|
<span class="input-group-text bg-white border-2 border-start-0">%</span>
|
|
</div>
|
|
</td>
|
|
|
|
<td class="pe-3">
|
|
<input class="form-control form-control-sm text-center border-2 fw-bold text-primary input-editable"
|
|
type="text" value="<?= format_N($v['seuilAlerte']) ?>"
|
|
onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);"
|
|
onblur="formatMonetaire(this); maj_seuil_alerte_garantie('<?=$id?>', supprimer_espace_string(this.value));">
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|