$comptesRows) { $nbrRows++; if ($nbrRows % 2 == 0) { $rowClass = "resa-row-2"; } else { $rowClass = "resa-row-1"; } if ($resaEnOption && in_array($idRes, $resaEnOption)) { $config->modeFactureOuExtrait = 0; } $nbrFacts = 0; //conteur if ($deuxDossier) { $totalSoldesScoped = 0; $totalDebits = 0; $totalCredits = 0; $factureIds = array(); } ?> 1 && !empty($reservations[$idRes])) { ?> $value) { $lastItem = $index == $lastIndex; //on affiche pas la facture frais generer lors de l affectation if ($resaEnOption && in_array($value->idReservation, $resaEnOption) && $value->idADP) { continue; } // var_dump($value); ## prb N nombres après virgules $dStr = sprintf("%.3f", $value->debit); $value->debit = (float)$dStr; $cStr = sprintf("%.3f", $value->credit); $value->credit = (float)$cStr; $sStr = sprintf("%.3f", $value->solde); $value->solde = (float)$sStr; //si pas de nofac et sens D => encaissement if (property_exists($value, "nofac") && !$value->nofac && $value->type == 1) $value->type = 6; //on verife si prelevement on affiche au lieu de CBE, CBE PRLVT if (!empty($listeTransactions) && $value->nature == 'CBE') { foreach ($listeTransactions as $numTrans) { if (strpos($value->libelle, $numTrans) !== false) { $value->nature = 'CBE PRLVT'; } } } $nbrFacts++; if ($nbrFacts > 1) $rowClass = ""; //on applique la classe qu au premier ligne if ($value->solde != 0 || ($value->type != 4 && $value->solde == 0) || $value->etat == 100) { if ($modeEss == 1 && $value->solde == 0 && !$value->hasEncais) { //$value->solde = $value->credit*(-1); } $totalSoldesScoped += $value->solde; // var_dump($docTable);die(); $doc = $docTable->getDocument($value->idDoc); // comment lolo test $docName = $doc ? $doc->nom : ""; //on affiche les checkbox si pas mode extrait, ou si mode extrait et type=3 ou 4 if ($config->modeFactureOuExtrait == 1) { //mode extrait $condition = $value->type == 3 || $value->type == 10 || ($value->type == 4 && !$modeFraisInitiaux); if (!$condition) { $totalSoldesScoped += $value->solde; $totalDebits += $value->debit; $totalCredits += $value->credit; $totalSoldesStr = sprintf("%.3f", $totalSoldesScoped); $totalSoldesScoped = (float)$totalSoldesStr; $totalDebitsStr = sprintf("%.3f", $totalDebits); $totalDebits = (float)$totalDebitsStr; $totalCreditsStr = sprintf("%.3f", $totalCredits); $totalCredits = (float)$totalCreditsStr; $factureIds[$value->idReservation] = $value->idReservation; $idLastResa = $value->idReservation; if ($typeSolde == "progressif") { $value->solde = $totalDebits - $totalCredits; $sStr = sprintf("%.3f", $value->solde); $value->solde = (float)$sStr; } } else { $totalSoldesScoped += $value->solde; $totalSoldesStr = sprintf("%.3f", $totalSoldesScoped); $totalSoldesScoped = (float)$totalSoldesStr; //$config->modeFactureOuExtrait = 0; } } elseif ($mode2 == "0") { //mode facture $condition = true; $totalSoldesScoped += $value->solde; $totalSoldesStr = sprintf("%.3f", $totalSoldesScoped); $totalSoldesScoped = (float)$totalSoldesStr; } else { $condition = true; } //regroupement par couleur //$class="odd"; if ($config->modeFactureOuExtrait == 1) { if ($j == 0) { $class = "odd"; } elseif ($value->hasEncais == 1 && !$value->noFacture && $j > 0) { if ($class == "odd") { $class = "even"; } } elseif ($value->noFacture && $comptesRows[$j - 1]->idADP == $value->noFacture) { } elseif ($value->noFacture && $comptesRows[$j - 1]->noFacture == $value->noFacture) { } else { if ($class == "odd") { $class = "even"; } else { $class = "odd"; } } } else { $class = ""; } ?> modeFactureOuExtrait == 1 && $value->hasEncais == 1) { // //echo 'data-toggle="collapse" data-target=".accordion'.$value->idADP.'" class="link ouvert '.$class.'"'; } elseif ($config->modeFactureOuExtrait == 1 && $value->noFacture != "") { //echo ' class="accordion'.$value->noFacture.' collapse in '.$class.'"'; } else { //echo ' class="'.$class.'"'; } if ($value->noFacture != "") { $afficherPriseAlias = 1; } if (preg_match("@^([a-zA-Z])_([0-9]+)_([0-9]+)_([0-9]+)@", $value->idADP, $regs)) { $idADP = $regs[4]; } else { $idADP = $value->idADP; } ?>> modeFactureOuExtrait == 1 && $lastItem) { $totalSoldesScoped = number_format((float)$totalDebits, 2, '.', '') - number_format((float)$totalCredits, 2, '.', ''); // $totalSoldes = $totalSoldes + $totalSoldesScoped; ?> mode == "ESSEC" && $lastItem) { ?>

translate('t_compte_resa_du')); ?> dateArrivee != "") { if ($locale == "fr_FR") { echo date('d/m/Y', strtotime($reservations[$idRes]->dateArrivee)); } else { echo $reservations[$idRes]->dateArrivee; } } ?> translate('t_compte_resa_au')); ?> dateDepart != "") { if ($locale == "fr_FR") { echo date('d/m/Y', strtotime($reservations[$idRes]->dateDepart)); } else { echo $reservations[$idRes]->dateDepart; } } ?>

translate('t_compte_resa_logement')); ?> numeroChambre ?>

translate('t_compte_resa_du')); ?> translate('t_compte_resa_au')); ?>

translate('t_compte_resa_logement')); ?>

dateM && $value->fraisResa == '1' && substr($value->dateM, 0, 2) != '00' && !$value->dateFacture) { echo $locale == "fr_FR" ? date('d/m/Y', strtotime($value->dateM)) : $value->dateFacture; } elseif ($value->dateFacture) { echo substr($value->dateFacture, -9) == " 00:00:00" ? ($locale == "fr_FR" ? date('d/m/Y', strtotime($value->dateFacture)) : substr($value->dateFacture, 0, 10)) : ($locale == "fr_FR" ? date('d/m/Y', strtotime($value->dateFacture)) : $value->dateFacture); } ?> type] ?> nature ? $value->nature : '' ?>debit != 0 ? (number_format(($soldeSigne * $value->debit * -1), 2, ".", " ") . ' €') : (number_format(($soldeSigne * $value->credit), 2, ".", " ") . ' €'); ?>
idLocataire . "/factures/" . $docName)) { ?> idLocataire . "/factures/" . $docName ?>" target="_blank" class="nostyle align-self-center red disbled"> type == 1 && $value->idADP && $value->solde > 0 && $value->hasEncais != 1) { ?> type == 1 && $value->idADP && ($value->solde <= 0 || $value->hasEncais == 1)) { ?> credit > 0 && $value->idADP && $value->type == 6 && !empty($modelesRecu)) { ?> type == 2 && $value->idADP) { ?>

libelle . ' ' . $idADP ?>