49 lines
2.7 KiB
PHP
Executable File
49 lines
2.7 KiB
PHP
Executable File
<?php
|
|
$nomFicAppelant = basename(__FILE__);
|
|
|
|
$lineItemPrixHT=array();
|
|
$lineItemPrixTTC=array();
|
|
$quantiteOptTab=array();
|
|
$libTraduitOptTab=array();
|
|
$tvaMontantOptTab=array();
|
|
$lineItemPrixHtTOT=array();
|
|
$tabResult=array();
|
|
|
|
// ---------------------------------------------------
|
|
// Recup options pour calcul ( pour affichage la requete est differente [ idLgCde en critere ] 29/05/2022 = plus pour assistant : 1 form à la fois)
|
|
// ---------------------------------------------------
|
|
if ($idCde!='') {
|
|
$reqSelect="SELECT * from prdOptions WHERE idCde =" .$idCde. " and idLgCde=" .$idLgCde. " order by itemNumber;";
|
|
if (isset($debug[15]) && $debug[15] == '1' && isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(2, ['Requête Select options_options from cde' => $reqSelect ], 'reqSelectOptions_Options.php'); }
|
|
$resConn='';
|
|
$resConn=$idPdo->query($reqSelect);
|
|
if ($resConn) {
|
|
$o=0;
|
|
while($tabResult=$resConn->fetch(PDO::FETCH_ASSOC)) {
|
|
$numListe[$o]=$tabResult['numListe'];
|
|
$lineItemNumber[$o]=$tabResult['itemNumber'];
|
|
$lineItemPrixHT[$o]=$tabResult['prixHT'];
|
|
$lineItemPrixTTC[$o]=$tabResult['prixTTC'];
|
|
$lineItemQuantite[$o]=$tabResult['quantite'];
|
|
$lineItemLibelle[$o]=$tabResult['libTraduit'];
|
|
$tvaMontantOptTab[$o]=$tabResult['tvaMontant'];
|
|
$lineItemPrixHtTOT[$o]=$tabResult['prixTotHT'];
|
|
$lineItemPrixTtcTOT[$o]=$tabResult['prixTotTTC'];
|
|
$lineItemTvaTaux[$o]=$tabResult['tvaTaux'];
|
|
if (isset($debug[15]) && $debug[15] == '1' && isset($debug[2]) && $debug[2] == '1' ) { $debugMsg .= monDebug(1, ['libTraduitOptTab' => $lineItemLibelle[$o], 'lineItemPrixHtTOT' => $lineItemPrixHtTOT[$o], 'lineItemPrixTtcTOT' => $lineItemPrixTtcTOT[$o], 'lineItemQuantite' => $lineItemQuantite[$o] ], 'reqSelectOptions_Options.php'); }
|
|
|
|
// ---------------------------------------------------
|
|
// Formattage
|
|
// ---------------------------------------------------
|
|
if ($lineItemPrixHT[$o]!='') $lineItemPrixHT[$o] = formatNB($lineItemPrixHT[$o] , 'MYSQL');
|
|
if ($lineItemPrixTTC[$o]!='') $lineItemPrixTTC[$o] = formatNB($lineItemPrixTTC[$o] , 'MYSQL');
|
|
if ($tvaMontantOptTab[$o]!='') $tvaMontantOptTab[$o] = formatNB($tvaMontantOptTab[$o] , 'MYSQL');
|
|
if ($lineItemPrixHtTOT[$o]!='') $lineItemPrixHtTOT[$o] = formatNB($lineItemPrixHtTOT[$o] , 'MYSQL');
|
|
if ($lineItemPrixTtcTOT[$o]!='') $lineItemPrixTtcTOT[$o] = formatNB($lineItemPrixTtcTOT[$o] , 'MYSQL');
|
|
$o++;
|
|
}
|
|
}
|
|
else if (isset($debug[15]) && $debug[15] == '1' ) { $debugMsg .= monDebug(2, ['Requête Select options from cde = ko !' => $reqSelect ], ''); }
|
|
}
|
|
else if (isset($debug[15]) && $debug[15] == '1' ) { $debugMsg .= monDebug(2, ['idCde vide dans options.lignes.php' => '' ], ''); }
|
|
?>
|