table where commande='$commande->id' AND parent='$parent'";
$resul = $venteprod->query($query);
$memFin = "";
while($resul && $row = $venteprod->fetch_object($resul)) {
$venteprod->charger($row->id);
$baseIndentation = 25;
$paddingIndentation = 5; //base
$largeurDesignation = 399;
$indentation = "";
if($debutLie) {
$indentation = "╓";
}
elseif($grandParent!=0 && $grandParent==$venteprod->id) {
$indentation = "╙";
}
elseif($niveau>0) {
/*for($niv=0;$niv<$niveau;$niv++)
{
$indentation .= " ";
}*/
$paddingIndentation += $baseIndentation * $niveau;
$indentation .= "↳";
}
$largeurDesignation -= $paddingIndentation;
$produit = new Produit();
$produitdesc = new Produitdesc();
$produit->charger($venteprod->ref);
$produitdesc->charger($produit->id);
$rubrique = new Rubrique();
$rubrique->charger($produit->rubrique);
$rubriquedesc = new Rubriquedesc();
$rubriquedesc->charger($rubrique->id);
if($rubriquedesc->titre !="") $titrerub = $rubriquedesc->titre;
else $titrerub = "//";
if(!($deco%2)) $fond="ligne_fonce_BlocDescription";
else $fond="ligne_claire_BlocDescription";
$listePassee[] = $venteprod->id;
if($grandParent!=0 && $grandParent==$venteprod->id) {
$memFin="
- $indentation $venteprod->ref - $titrerub - ".str_replace("\n", "
", $venteprod->titre)."
- ".round($venteprod->prixu, 2)."
- ".$venteprod->quantite."
- ".round($venteprod->quantite*$venteprod->prixu, 2)."
";
}
else {
$deco++;
?>
- ref . " - " . $titrerub; ?> - ", $venteprod->titre)); ?>
- prixu, 2)); ?>
- quantite); ?>
- quantite*$venteprod->prixu, 2)); ?>
id)
{
liste_parent($venteprod->id, $niveau+1, $commande, $parent);
}
}
if($memFin!="") {
if(!($deco%2))
$fond="ligne_fonce_BlocDescription";
else
$fond="ligne_claire_BlocDescription";
$deco++;
echo str_replace("__COULEUR_FOND__", $fond, $memFin);
}
}
$deco = 0;
$listePassee = array();
liste_parent(0, 0, $commande, 0);
$venteprod = new Venteprod();
do {
$q = "SELECT parent FROM $venteprod->table WHERE commande='$commande->id'";
if(count($listePassee)>0)
$q .= " AND id NOT IN(" . implode(',', $listePassee) . ")";
$q .= " LIMIT 1";
$r = $venteprod->query($q);
$nbRestant = $venteprod->num_rows($r);
if($nbRestant>0) {
liste_parent($venteprod->get_result($r, 0), 0, $commande, 0, 1);
}
} while($nbRestant>0);
$client = new Client();
$client->charger_id($commande->client);
$total = $commande->total();
$totalremise = $total - $commande->remise;
$port = $commande->port;
if($port<0) $port=0;
$statutdesc = new Statutdesc();
$statutdesc->charger($commande->statut);
$time = strtotime($commande->date);
$dateaff = strftime("%d/%m/%y", $time);
$heureaff = strftime("%H:%M:%S", $time);
?>
charger_id($commande->transport);
$moduletransportdesc = new Modulesdesc();
$moduletransportdesc->charger($moduletransport->nom);
?>
- Type de règlement
- instancier($modules->nom);
echo $tmpobj->getTitre();
} catch (Exception $ex) {
echo trad('Inconnu', 'admin');
}
?>
- remise, 2)); ?> symbole; ?>
- charger_commande($commande->id)){
$promo = new Promo();
$promo->charger_id($promoutil->promo);
if($promoutil->code == $promo->code && $promoutil->type == $promo->type && $promoutil->valeur == $promo->valeur)
{
?>
code; ?>
code; ?> (valeur; echo($promoutil->type==Promo::TYPE_SOMME)?'€':'%'; ?>)
charger($commande->adrfact);
$nompays = new Paysdesc();
$nompays->charger($adr->pays);
?>
charger($commande->adrlivr);
$nompays = new Paysdesc();
$nompays->charger($adr->pays);
?>
inclure_module_admin("commandedetails");
?>