} } $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);