cid) { $datesplit = explode("-", $currentDevis->date); $year = (int) $datesplit[0]; $month = (int) $datesplit[1]; $checkClient = false; $filterType = "group"; if (array_key_exists('filterType', $_GET) && $_GET['filterType'] == 'client') { $filterType = "client"; } $clientIsNotSelected = strcmp($_GET['cli'], '') == 0; if ($clientIsNotSelected) { if ($filterType == "group") { $checkClient = $_['clients'][0]->fk_client_group_facturation_id == $currentDevis->cid; } else { $checkClient = $_['clients'][0]->id == $currentDevis->cid; } } else { if ($filterType == "group") { $checkClient = $currentDevis->fk_client_group_facturation_id == $_GET['cli']; } else { $checkClient = $currentDevis->cid == $_GET['cli']; } } $checkYear = ((int) ($_GET['annee']) == -1) ? (true) : ($year == ((int) $_GET['annee'])); $checkMounth = (((int) $_GET['mois']) == 0) ? (true) : ($month == ((int) $_GET['mois'])); return $checkClient && $checkYear && $checkMounth; } return false; }); if (strcmp($_GET['cli'], '') != 0 && sizeof($devis) > 0) { ?> 0) { ?>

$currentDevis) { ?>

t('Quote')); ?>
sur le defunt nom_defunt; ?>

num; ?>
date; ?>
Defunt : nom_defunt; ?> Lieu : lieu; ?> (adresse_soin; ?>)
order_number == "") ? "-" : $currentDevis->order_number ; ?>

case_number == "") ? "-" : $currentDevis->case_number ; ?>

dproduits as $key => $produit) { // Récupérer le taux de TVA du produit (défaut 20%) $tvaValue = isset($produit->tva) && $produit->tva !== null ? floatval($produit->tva) : 20.00; $totalHT = $produit->prix_unitaire * $produit->quantite; $totalTTC = $totalHT * (1 + $tvaValue / 100); // Grouper par taux if (!isset($totalsByTva[$tvaValue])) { $totalsByTva[$tvaValue] = [ 'totalHT' => 0, 'totalTVA' => 0, 'totalTTC' => 0 ]; } $totalsByTva[$tvaValue]['totalHT'] += $totalHT; $totalsByTva[$tvaValue]['totalTVA'] += ($totalTTC - $totalHT); $totalsByTva[$tvaValue]['totalTTC'] += $totalTTC; ?> 0) { ?> $totals) { ?>
t('Reference')); ?> t('Designation')); ?> t('Comment')); ?> t('TVA'));?> t('Quantity')); ?> t('Unit price without VAT'));?> t('Total without VAT'));?> Total TTC
reference ?> description ?> comment ?> % quantite ?> prix_unitaire, 2) ?>

Total TVA %
t('Total without VAT')); ?> t('Total VAT')); ?> t('Total Price')); ?>

t('Please set in global configuration')); ?>


entreprise; ?>
adresse; ?>
legal_one; ?>
legal_two; ?>