Display amount of line not total amount
This commit is contained in:
parent
9a7a5b9b20
commit
eea4815312
@ -128,7 +128,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($user->rights->commande->lire)
|
||||
{
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client, c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client, c.rowid, d.total_ht as total_ht, c.ref,";
|
||||
$sql .= " c.ref_client,";
|
||||
$sql.= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
|
||||
@ -136,7 +136,7 @@ if ($id > 0 || ! empty($ref)) {
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire) {
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql .= " c.rowid, c.total_ht as total_ht, c.ref,";
|
||||
$sql .= " c.rowid, d.total_ht as total_ht, c.ref,";
|
||||
$sql .= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.qty";
|
||||
if (! $user->rights->societe->client->voir && ! $socid)
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
|
||||
@ -130,7 +130,7 @@ if ($id > 0 || ! empty($ref))
|
||||
|
||||
if ($user->rights->facture->lire) {
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql.= " f.facnumber, f.total as total_ht,";
|
||||
$sql.= " f.facnumber, d.total_ht as total_ht,";
|
||||
$sql.= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql.= ", sc.fk_soc, sc.fk_user ";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
|
||||
@ -130,7 +130,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, f.ref, f.total_ht as total_ht,";
|
||||
$sql = "SELECT distinct s.nom as name, s.rowid as socid, s.code_client, f.ref, d.total_ht as total_ht,";
|
||||
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.rowid as facid, d.qty";
|
||||
if (! $user->rights->societe->client->voir && ! $socid)
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
|
||||
@ -127,7 +127,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</div>';
|
||||
|
||||
if ($user->rights->propale->lire) {
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, p.total_ht as amount,";
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
|
||||
$sql .= " p.ref_client,";
|
||||
$sql .= "p.datep, p.fk_statut as statut, d.qty";
|
||||
if (! $user->rights->societe->client->voir && ! $socid)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user