From 5acffc5229485d978e0d9ea34422dc54a5126672 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 26 Nov 2004 00:54:45 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Quelques=20corrections=20sur=20la=20fich?= =?UTF-8?q?e=20facture=20(style=20du=20champ=20de=20tri=20et=20mauvaise=20?= =?UTF-8?q?r=E9cup=20param=E8tre=20socidp)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture.php | 50 ++++++++++++++++++++++++++------------- htdocs/compta/fiche.php | 4 ++-- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 8618b9573ac..ee16c4df1e3 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -39,13 +39,24 @@ if (!$user->rights->facture->lire) $langs->load("bills"); require("../facture.class.php"); -require("../lib/CMailFile.class.php"); require("../paiement.class.php"); -require("../project.class.php"); -require("../propal.class.php"); -require("../contrat/contrat.class.php"); -require("../commande/commande.class.php"); +if ($conf->projet->enabled) { + require("../project.class.php"); +} +if ($conf->propal->enabled) { + require("../propal.class.php"); +} +if ($conf->contrat->enabled) { + require("../contrat/contrat.class.php"); +} +if ($conf->commande->enabled) { + require("../commande/commande.class.php"); +} +require("../lib/CMailFile.class.php"); + + +if ($_GET["socidp"]) { $socidp=$_GET["socidp"]; } /* * Sécurité accés client */ @@ -811,7 +822,7 @@ else /* * Facture */ - print ''; + print '
'; print ''; print ''; @@ -860,7 +871,7 @@ else $num = $db->num_rows(); $i = 0; $total = 0; print '
'.$langs->trans("Customer").''; print ''.$soc->nom.'
'; - print ''; + print ''; print ''; $var=True; @@ -925,7 +936,7 @@ else { print ''; print ''; - print '
Date'.$langs->trans("Type").'
'.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans("Amount").' 
Remise'; + print '
Remise'; print '%'; print ''; print '
'; @@ -1272,7 +1283,7 @@ else /* - * + * Choix d'un projet * */ if ($_GET["action"] == 'classer') @@ -1291,6 +1302,7 @@ else print '

'; } + /* * * @@ -1522,18 +1534,22 @@ else if ($result) { $num = $db->num_rows(); - print_barre_liste("Factures clients",$page,$_SERVER["PHP_SELF"],"&socidp=$socidp",$sortfield,$sortorder,'',$num); + if ($socidp) { + $soc = new Societe($db); + $soc->fetch($socidp); + } + print_barre_liste("Factures client".($socidp?" $soc->nom":""),$page,$_SERVER["PHP_SELF"],"&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; print ''; print ''; - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp"); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp",'align="center"'); - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp"); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp",'align="right"'); - print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp",'align="right"'); - print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","","&socidp=$socidp",'align="right"'); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye","","&socidp=$socidp",'align="right"'); + print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","","&socidp=$socidp","",$sortfield); + print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","","&socidp=$socidp",'align="center"',$sortfield); + print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socidp=$socidp","",$sortfield); + print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total","","&socidp=$socidp",'align="right"',$sortfield); + print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","","&socidp=$socidp",'align="right"',$sortfield); + print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","","&socidp=$socidp",'align="right"',$sortfield); + print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye","","&socidp=$socidp",'align="right"',$sortfield); print "\n"; if ($num > 0) diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 88b6245a6e5..8b3f71aecf6 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -297,13 +297,13 @@ if ($socid > 0) $sql .= " FROM ".MAIN_DB_PREFIX."projet as p WHERE p.fk_soc = $societe->id"; if ( $db->query($sql) ) { - print '
'; + print '
'; $i = 0 ; $num = $db->num_rows(); if ($num > 0) { $tag = !$tag; print ""; - print ""; + print ""; } while ($i < $num && $i < 5) {
id\">liste des projets ($num)
id\">Liste des projets ($num)