diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 9c9532ababe..0300e641a18 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -259,31 +259,38 @@ if ($conf->commande->enabled && $user->rights->commande->lire) print ''; print ""; print ''; - print ''; + print ''; + print ''; + print ''; + print ''; $var = True; $tot_ht=0; $tot_ttc=0; while ($i < $num) { - $var=!$var; - $obj = $db->fetch_object($resql); - if ($obj->total_ht-$obj->tot_fht) - { - print ""; - print "'; - - print ''; - print ''; - print ''; - $tot_ht += $obj->total_ht-$obj->tot_fht; - $tot_ttc += $obj->total_ttc-$obj->tot_fttc; - } - $i++; + $var=!$var; + $obj = $db->fetch_object($resql); + print ""; + print "'; + + print ''; + print ''; + print ''; + print ''; + $tot_ht += $obj->total_ht; + $tot_ttc += $obj->total_ttc; + $tot_tobill += ($obj->total_ttc-$obj->tot_fttc); + $i++; } - print '"; - print "
'.$langs->trans("OrdersToBill").' ('.$num.')'.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
'.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").'
rowid\">".img_object($langs->trans("ShowOrder"),"order").' '; - print "rowid\">".$obj->ref.''.img_object($langs->trans("ShowCompany"),"company").' '; - print ''.$obj->nom.''.price($obj->total_ht-$obj->tot_fht).''.price($obj->total_ttc-$obj->tot_fttc).'
rowid\">".img_object($langs->trans("ShowOrder"),"order").' '; + print "rowid\">".$obj->ref.''.img_object($langs->trans("ShowCompany"),"company").' '; + print ''.$obj->nom.''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->total_ttc-$obj->tot_fttc).'
'.$langs->trans("Total").'   (Reste à facturer : '.price($tot_ttc).')'.price($tot_ht)."".price($tot_ttc)."

"; + $var=!$var; + print ''.$langs->trans("Total").'   ('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')'; + print ''.price($tot_ht).''; + print ''.price($tot_ttc).''; + print ''.price($tot_tobill).''; + print ''; + print '
'; } $db->free($resql); } @@ -329,7 +336,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); - if ($i < 10) + if ($i < $conf->liste_limit) { $var=!$var; print ''.img_object($langs->trans("ShowBill"),"bill").' '.$obj->facnumber.'';