FIX supplier invoice product stats total ht is line total not invoice total
This commit is contained in:
parent
cdfeeafab9
commit
730a2a90ff
@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as total_ht,";
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, d.rowid, d.total_ht as line_total_ht,";
|
||||
$sql .= " f.rowid as facid, f.ref, f.ref_supplier, f.datef, f.libelle, f.total_ht, f.total_ttc, f.total_tva, f.paye, f.fk_statut as statut, d.qty";
|
||||
if (! $user->rights->societe->client->voir && ! $socid)
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
@ -205,7 +205,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print_liste_field_titre("SupplierCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "f.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "f.paye,f.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
@ -215,7 +215,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
$total_ht+=$objp->total_ht;
|
||||
$total_ht+=$objp->line_total_ht;
|
||||
$total_qty+=$objp->qty;
|
||||
|
||||
$supplierinvoicestatic->id = $objp->facid;
|
||||
@ -237,7 +237,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td align="center">';
|
||||
print dol_print_date($db->jdate($objp->datef), 'dayhour') . "</td>";
|
||||
print '<td align="center">' . $objp->qty . "</td>\n";
|
||||
print '<td align="right">' . price($objp->total_ht) . "</td>\n";
|
||||
print '<td align="right">' . price($objp->line_total_ht) . "</td>\n";
|
||||
print '<td align="right">' . $supplierinvoicestatic->LibStatut($objp->paye, $objp->statut, 5) . '</td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user