add amount on orders list lines and total at the bottom of table

This commit is contained in:
Christophe Battarel 2013-01-03 11:06:05 +01:00
parent 4e27969317
commit 1f973548ca

View File

@ -4,6 +4,7 @@
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Christophe Battarel <christophe.battarel@altairis.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -275,6 +276,7 @@ if ($resql)
print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder);
print '</tr>';
print '<tr class="liste_titre">';
@ -286,6 +288,7 @@ if ($resql)
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
print '</td><td class="liste_titre">&nbsp;';
print '</td><td class="liste_titre">&nbsp;';
print '</td><td class="liste_titre">&nbsp;';
print '</td><td align="right" class="liste_titre">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
print '</td></tr>';
@ -370,6 +373,9 @@ if ($resql)
print ' <a href="'.$_SERVER['PHP_SELF'].'?deliveryyear='.$y.'">'.$y.'</a>';
print '</td>';
// Amount HT
print '<td align="right" nowrap="nowrap">'.price($objp->total_ht).'</td>';
// Statut
print '<td align="right" nowrap="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
@ -379,6 +385,13 @@ if ($resql)
$subtotal+=$objp->total_ht;
$i++;
}
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap" colspan="5">'.$langs->trans('TotalHT').'</td>';
// Total HT
print '<td align="right" nowrap="nowrap">'.price($total).'</td>';
print '<td nowrap="nowrap">&nbsp;</td>';
print '</tr>';
print '</table>';
print '</form>';