191 lines
15 KiB
PHP
Executable File
191 lines
15 KiB
PHP
Executable File
|
|
<?php
|
|
$codeSourceFondGarantAppelFond = $gc['codeSourceFondGarantAppelFond'];
|
|
$codeSourceFondGarantHonoraire = $gc['codeSourceFondGarantHonoraire'];
|
|
?>
|
|
|
|
<div class="page-content animate__animated animate__fadeIn">
|
|
<div class="header-section mb-1">
|
|
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow border-start border-warning border-4" style="border-radius: var(--radius-md);">
|
|
<div class="d-flex align-items-center">
|
|
<div class="icon-shape bg-warning-light text-warning rounded-circle me-3" style="width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;">
|
|
<i class="fas fa-edit fs-4"></i>
|
|
</div>
|
|
<div>
|
|
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase text-warning"><?= _("Modification Paramètres Facturation Garant") ?></h4>
|
|
<p class="text-muted small mb-0"><?= _("Garant :") ?> <span class="fw-bold text-muted"><?= $this->nettoyer($gc['libelle']) ?></span></p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex gap-2">
|
|
<button type="button" class="btn btn-light rounded-pill px-3 fw-bold text-muted border shadow-sm btn-sm" onclick="consulter_param_fact_garant();">
|
|
<i class="fas fa-times me-1"></i> <?= _("Annuler") ?>
|
|
</button>
|
|
<button type="button" id="btn_enreg" class="btn btn-warning rounded-pill px-4 fw-bold shadow-sm btn-sm" onclick="maj_paramfacturegarant();">
|
|
<i class="fas fa-save me-1"></i> <?= _("Mettre à jour") ?>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" id="idGc" name="idGc" value="<?= $this->nettoyer($gc['id']) ?>">
|
|
<input type="hidden" id="nomForm" name="nomForm" value="parametrefacturationgarant">
|
|
|
|
<form id="form_maj_facturation">
|
|
<div class="row g-2">
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white py-3 border-bottom border-2 border-primary-light">
|
|
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-shield-alt me-2"></i><?= _("Fonds Sinistres & Caution") ?></h6>
|
|
</div>
|
|
<div class="card-body p-4">
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Source Fonds Sinistres") ?></label>
|
|
<select class="form-select shadow-none border-2" id="codeSourceFondGarantAppelFond" name="codeSourceFondGarantAppelFond" onchange="control_param_facturation_garant(); filtre_assiette_fond();">
|
|
<?php liste_options($sourcefonds, $gc['codeSourceFondGarantAppelFond'], false); ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold required"><?= _("Périodicité Fonds Sinistres") ?></label>
|
|
<select class="form-select shadow-none border-2" id="codePeriodiciteAppelFond" name="codePeriodiciteAppelFond" required onchange="change_periodicite_honoraire();">
|
|
<?php liste_options($periodicitesappelfond, $gc['codePeriodiciteAppelFond'], false); ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Assiette Fonds Sinistres") ?></label>
|
|
<div id="div_assiette_fonds">
|
|
<select class="form-select shadow-none border-2" id="codeAssietteFacturationGarantAppelFond" name="codeAssietteFacturationGarantAppelFond">
|
|
<?php liste_options($assiettefonds, $gc['codeAssietteFacturationGarantAppelFond'], false); ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold required"><?= _("Périodicité Facturation Déficit") ?></label>
|
|
<select class="form-select shadow-none border-2" id="codePeriodiciteFacturationDeficit" name="codePeriodiciteFacturationDeficit" required>
|
|
<?php liste_options($periodicitesfactDeficit, $gc['codePeriodiciteFacturationDeficit'], false); ?>
|
|
</select>
|
|
</div>
|
|
|
|
<hr class="my-3 opacity-10">
|
|
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Fraction Caution (Nb mois/12)") ?></label>
|
|
<input class="form-control border-2" type="text" id="nbMoisCaution" name="nbMoisCaution" value="<?= format_N($gc['nbMoisCaution']) ?>">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Seuil Complément (%)") ?></label>
|
|
<input class="form-control border-2" type="text" id="seuilComplementCaution" name="seuilComplementCaution" value="<?= format_N($gc['seuilComplementCaution']) ?>">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Source Fonds Caution Permanent") ?></label>
|
|
<select class="form-select shadow-none border-2" id="codeSourceFondGarantCaution" name="codeSourceFondGarantCaution" onchange="control_param_facturation_garant();">
|
|
<?php liste_options($sourcecaution, $gc['codeSourceFondGarantCaution'], false); ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Forfait Caution Permanente (HT)") ?></label>
|
|
<input class="form-control border-2" type="text" id="forfaitCautionPermanant" name="forfaitCautionPermanant" value="<?= format_N($gc['forfaitCautionPermanant']) ?>" onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-6">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-header bg-white py-3 border-bottom border-2 border-primary-light">
|
|
<h6 class="mb-0 fw-bold text-primary text-uppercase"><i class="fas fa-hand-holding-usd me-2"></i><?= _("Honoraires & Commissions") ?></h6>
|
|
</div>
|
|
<div class="card-body p-4">
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Source Fonds Honoraires") ?></label>
|
|
<select class="form-select shadow-none border-2" id="codeSourceFondGarantHonoraire" name="codeSourceFondGarantHonoraire" onchange="control_param_facturation_garant(); filtre_assiette_honoraire();">
|
|
<?php liste_options($sourcehonoraire, $gc['codeSourceFondGarantHonoraire'], false); ?>
|
|
</select>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Forfait Fonds Honoraires (HT)") ?></label>
|
|
<input class="form-control border-2 fw-bold" type="text" id="forfaitHonoraire" name="forfaitHonoraire"
|
|
value="<?= ($codeSourceFondGarantHonoraire == "FOR") ? format_N($gc['forfaitHonoraire']) : '0' ?>"
|
|
<?= ($codeSourceFondGarantHonoraire != "FOR") ? 'disabled' : '' ?>
|
|
onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Assiette Fonds Honoraires") ?></label>
|
|
<div id="div_assiette_honoraire">
|
|
<select class="form-select shadow-none border-2" id="codeAssietteFacturationGarantHonoraire" name="codeAssietteFacturationGarantHonoraire">
|
|
<?php liste_options($assiettehonoraire, $gc['codeAssietteFacturationGarantHonoraire'], false); ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Périodicité Fonds Honoraires") ?></label>
|
|
<select class="form-select shadow-none border-2 bg-light" id="codePeriodiciteHonoraire" name="codePeriodiciteHonoraire" disabled>
|
|
<?php liste_options($periodicites, $gc['codePeriodiciteHonoraire'], false); ?>
|
|
</select>
|
|
</div>
|
|
|
|
<hr class="my-3 opacity-10">
|
|
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Taux TVA (%)") ?></label>
|
|
<input class="form-control border-2" type="number" id="gcTauxTva" name="gcTauxTva" value="<?= $this->nettoyer($gc['gcTauxTva']) ?>" min="0" max="100">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Taux Redressement (%)") ?></label>
|
|
<input class="form-control border-2" type="number" id="gcTauxRedressement" name="gcTauxRedressement" value="<?= $this->nettoyer($gc['gcTauxRedressement']) ?>" min="0" max="100">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Commission sur Primes (%)") ?></label>
|
|
<input class="form-control border-2 fw-bold text-primary" type="number" id="gcTauxCommissionGerant" name="gcTauxCommissionGerant"
|
|
value="<?= ($codeSourceFondGarantHonoraire == "PRI") ? $this->nettoyer($gc['gcTauxCommissionGerant']) : '0' ?>"
|
|
<?= ($codeSourceFondGarantHonoraire != "PRI") ? 'disabled' : '' ?>>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Commission Prov./Sinistres (%)") ?></label>
|
|
<input class="form-control border-2 fw-bold text-primary" type="number" id="gcTauxFraisReel" name="gcTauxFraisReel"
|
|
value="<?= ($codeSourceFondGarantHonoraire == "BUD" || $codeSourceFondGarantHonoraire == "SIN") ? $this->nettoyer($gc['gcTauxFraisReel']) : '0' ?>"
|
|
<?= ($codeSourceFondGarantHonoraire != "BUD" && $codeSourceFondGarantHonoraire != "SIN") ? 'disabled' : '' ?>>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-lg-12">
|
|
<div class="card border-0 shadow-sm bg-primary-ghost-light">
|
|
<div class="card-body p-4">
|
|
<div class="row g-3">
|
|
<div class="col-md-3">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Total Familles Estimé") ?></label>
|
|
<input class="form-control border-2 fw-bold" type="text" id="nbAdherent" name="nbAdherent" value="<?= format_N($gc['nbAdherent']) ?>" onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
|
|
</div>
|
|
<div class="col-md-3 border-end">
|
|
<label class="form-label small text-muted fw-bold"><?= _("Total Bénéficiaires Estimé") ?></label>
|
|
<input class="form-control border-2 fw-bold" type="text" id="nbBeneficiaire" name="nbBeneficiaire" value="<?= format_N($gc['nbBeneficiaire']) ?>" onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted fw-bold text-primary"><?= _("Montant Provision Garant (HT)") ?></label>
|
|
<input class="form-control border-2 border-primary fw-bold text-primary fs-5" type="text" id="montantBudget" name="montantBudget"
|
|
value="<?= format_N($gc['montantBudget']) ?>"
|
|
<?= ($codeSourceFondGarantAppelFond != "BUD" && $codeSourceFondGarantHonoraire != "BUD") ? 'disabled' : '' ?>
|
|
onfocus="formatNumerique(this);" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<style>
|
|
.bg-warning-light { background-color: rgba(255, 193, 7, 0.1) !important; }
|
|
.bg-primary-ghost-light { background-color: rgba(33, 46, 83, 0.02) !important; }
|
|
.border-primary-light { border-color: rgba(33, 46, 83, 0.1) !important; }
|
|
.form-control:disabled, .form-select:disabled { background-color: #f8f9fa !important; opacity: 0.7; cursor: not-allowed; }
|
|
.form-control:focus, .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 0.25rem rgba(33, 46, 83, 0.1); }
|
|
</style>
|