From 20fb7f79c01b52d99fbab2aa51e6459734d15d54 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 1 Apr 2013 22:58:54 +0200 Subject: [PATCH] fix: some issue on the road to numbering supplier invoice --- htdocs/compta/index.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index aad8dbbc19f..f3e496b4c02 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -121,9 +121,9 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; print ""; print ''; - print "'; + print "'; print ''; - print "'; + print "'; print ''; print "
'.$langs->trans("SearchACustomerInvoice").'
".$langs->trans("Ref").':
".$langs->trans("Ref").':
".$langs->trans("Other").':
".$langs->trans("Other").':

"; } @@ -140,7 +140,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) print ""; print "".$langs->trans("Ref").':'; print ''; - print "".$langs->trans("RefSupplier").':'; + print "".$langs->trans("RefSupplier").':'; print ''; print "
"; } @@ -258,7 +258,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) */ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) { - $sql = "SELECT f.ref_supplier, f.rowid, f.total_ttc, f.type,"; + $sql = "SELECT f.ref, f.rowid, f.total_ttc, f.type,"; $sql.= " s.nom, s.rowid as socid"; $sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -432,7 +432,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $langs->load("boxes"); $facstatic=new FactureFournisseur($db); - $sql = "SELECT ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye"; + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye"; $sql.= ", s.nom, s.rowid as socid"; $sql.= ", SUM(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; @@ -442,7 +442,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $sql.= " AND ff.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; - $sql.= " GROUP BY ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid"; + $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.tms, ff.paye, s.nom, s.rowid"; $sql.= " ORDER BY ff.tms DESC "; $sql.= $db->plimit($max, 0); @@ -930,7 +930,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- { $facstatic=new FactureFournisseur($db); - $sql = "SELECT ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,"; + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, ff.paye,"; $sql.= " s.nom, s.rowid as socid,"; $sql.= " sum(pf.amount) as am"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture_fourn as ff"; @@ -942,7 +942,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture- $sql.= " AND ff.fk_statut = 1"; if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql.= " AND ff.fk_soc = ".$socid; - $sql.= " GROUP BY ff.rowid, ff.ref_supplier, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, s.nom, s.rowid"; + $sql.= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.total_ttc, s.nom, s.rowid"; $resql=$db->query($sql); if ($resql)