require_once $path . '/model/DocLibelleManager.php'; require_once $path . '/model/BonLigne.php'; require_once $path . '/model/BonLigneManager.php'; require_once $path . '/model/ReferenceManager.php'; require_once $path . '/model/Lot.php'; require_once $path . '/model/LotManager.php'; require_once $path . '/model/Ligne.php'; require_once $path . '/model/LigneManager.php'; require_once $path . '/model/CompteManager.php'; //-----------------------Initialisation---------------------------------// ob_start(); //------------------------Récupération des données----------------------// //On récupère l'id du bon passé en paramètre $bonId = $_REQUEST['bonId']; //On appel le manager pour récupéré le Bon $oBon = BonManager::getBon($bonId); //Et le manager pour l'intitulé $oDocLbl = DocLibelleManager::getDocLibelle($oBon->doclbl_id); //On récupère le compte associé if ($oBon->cpt_id != '') { $oCompte = CompteManager::getCompte($oBon->cpt_id); } else { $oCompte = 0; } //On initialise notre variable type bon $sTypeBon = $oDocLbl->doclbl_lbl; //On récupére toutes les ligne du bon $resAllBonLignes = BonLigneManager::getBonLignesFromBon($bonId); //On vérifie que le résultat récupéré soit bien un tableau (si aucune donnée ce n'est pas un tableau) if (is_array($resAllBonLignes)) { //Tableau pour les lignes