diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index c6fc2187a4e..ab5a22827c0 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -726,6 +726,81 @@ else } print "

\n"; + + print '
'; + /* + * Liste des expéditions + */ + $sql = "SELECT e.rowid,e.ref,".$db->pdate("e.date_expedition")." as de"; + $sql .= " FROM llx_expedition as e"; + $sql .= " WHERE e.fk_commande = ". $commande->id; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows(); + if ($num) + { + print_titre("Expéditions"); + $i = 0; $total = 0; + print ''; + print "\n"; + + $var=True; + while ($i < $num) + { + $objp = $db->fetch_object( $i); + $var=!$var; + print ""; + print ''; + print "\n"; + $i++; + } + print "
ExpéditionDate
'.stripslashes($objp->ref).'".strftime("%d %B %Y",$objp->de)."
"; + } + } + else + { + print $db->error(); + } + print " 
"; + /* + * Liste des factures + */ + $sql = "SELECT f.rowid,f.facnumber,".$db->pdate("f.datef")." as df"; + $sql .= " FROM llx_facture as f, llx_co_fa as cf"; + $sql .= " WHERE f.rowid = cf.fk_facture AND cf.fk_commande = ". $commande->id; + + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows(); + if ($num) + { + print_titre("Factures"); + $i = 0; $total = 0; + print ''; + print "\n"; + + $var=True; + while ($i < $num) + { + $objp = $db->fetch_object( $i); + $var=!$var; + print ""; + print ''; + print "\n"; + $i++; + } + print "
FactureDate
'.stripslashes($objp->facnumber).'".strftime("%d %B %Y",$objp->df)."
"; + } + } + else + { + print $db->error(); + } + print " 
"; + /* * Documents générés * @@ -734,7 +809,7 @@ else if (file_exists($file)) { - print "
"; + print_titre("Documents"); print ''; @@ -751,43 +826,13 @@ else * Liste des actions * */ - $sql = "SELECT ".$db->pdate("a.datea")." as da, a.note"; - $sql .= " FROM llx_actioncomm as a WHERE a.fk_soc = $commande->socidp AND a.fk_action in (9,10) AND a.fk_commande = $id"; - - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows(); - if ($num) - { - $i = 0; $total = 0; - print '
'; - print "\n"; - - $var=True; - while ($i < $num) - { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - print ''; - print ""; - $i++; - } - print "
DateAction
".strftime("%d %B %Y",$objp->da)."'.stripslashes($objp->note).'
"; - } - } - else - { - print $db->error(); - } + /* * * */ - print "
"; + } /* *