From 0c18b669751e0c67ea99c8b13bd21a3472b42d0e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Apr 2006 01:53:51 +0000 Subject: [PATCH] =?UTF-8?q?Look:=20Modif=20esth=E9tiques=20=E9crans=20reca?= =?UTF-8?q?p-client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/comm/fiche.php | 50 +++++++++++-------- htdocs/commande/apercu.php | 6 +-- htdocs/compta/fiche.php | 67 +++++++++++++++---------- htdocs/compta/recap-client.php | 89 +++++++++++++++++++--------------- htdocs/langs/en_US/bills.lang | 1 + htdocs/langs/fr_FR/bills.lang | 1 + 6 files changed, 127 insertions(+), 87 deletions(-) diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 6d01fc00867..44e5f48eaab 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -784,7 +784,7 @@ if ($socidp > 0) * */ print ''; - print ''; + print ''; $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; @@ -828,15 +828,13 @@ if ($socidp > 0) } print '\n"; - print '\n"; - if (date("U",$obj->da) < time()) - { - print ""; - } - else - { - print ''; - } + print ''; + + // Picto warning + print ''; // Status/Percent print ''; @@ -857,7 +855,7 @@ if ($socidp > 0) print $libelle; print ''; } - print ""; + print ''; // Contact pour cette action if ($obj->fk_contact) { @@ -887,12 +885,15 @@ if ($socidp > 0) print '
'.$langs->trans("ActionsToDo").' 
'.$langs->trans("ActionsToDo").' 
'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)."".img_warning("Late")." '.strftime("%H:%M",$obj->da).''; + if (date("U",$obj->da) < time()) print ' '.img_warning("Late"); + else print ' '; + print ' $obj->label'.$obj->label.'
'; print ''; - $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = ".$objsoc->id; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent = 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,"; + $sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,"; + $sql.= " c.code as acode, c.libelle,"; + $sql.= " u.code, u.rowid"; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql.= " WHERE a.fk_soc = ".$objsoc->id; + $sql.= " AND u.rowid = a.fk_user_author"; + $sql.= " AND c.id=a.fk_action AND a.percent = 100"; + $sql.= " ORDER BY a.datea DESC, a.id DESC"; $result=$db->query($sql); if ($result) @@ -932,7 +933,9 @@ if ($socidp > 0) } print '\n"; print '\n"; - print ""; + + // Picto + print ''; // Espace print ''; @@ -946,6 +949,7 @@ if ($socidp > 0) print ''; print ''; + // Objet lié print ''; + // Libellé print ""; // Contact pour cette action @@ -970,7 +981,8 @@ if ($socidp > 0) print ''; } - print ''; + // Auteur + print ''; print "\n"; $i++; } diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 96a388d0bb6..050520ee3bd 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -249,17 +249,17 @@ if ($_GET["id"] > 0) { print ''.$societe->nom.''; print ''; print ''; - + // Statut print ''; print "\n"; print ''; - + // Date print ''; print "\n"; print ''; - + // ligne 6 // partie Gauche print ''; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 1ef77f26100..2e54768db5f 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -547,7 +547,7 @@ if ($socid > 0) * */ print '
'.$langs->trans("ActionsDone").'
'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)."   '; if ($obj->propalrowid) { @@ -953,9 +957,16 @@ if ($socidp > 0) print $langs->trans("Propal"); print ''; } + if ($obj->fk_facture) + { + print ''.img_object($langs->trans("ShowBill"),"bill"); + print $langs->trans("Invoice"); + print ''; + } else print ' '; print '$obj->label '.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'
'.$langs->trans("Status").'".$commande->getLibStatut(4)."
'.$langs->trans("Date").'".dolibarr_print_date($commande->date,"%A %d %B %Y")."
'.$langs->trans('GlobalDiscount').'
'; - print ''; + print ''; $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; @@ -591,22 +591,20 @@ if ($socid > 0) } print '\n"; - print '\n"; - if (date("U",$obj->da) < time()) - { - print ""; - } - else - { - print ''; - } - + print ''; + + // Picto warning + print ''; + // Status/Percent print ''; if ($obj->propalrowid) { - print ''; } - print ""; + + print ''; // Contact pour cette action if ($obj->fk_contact) { $contact = new Contact($db); $contact->fetch($obj->fk_contact); - print ''; + print ''; } else { print ''; } - print ''; + // Auteur + print ''; print "\n"; $i++; } @@ -646,14 +646,17 @@ if ($socid > 0) * Listes des actions effectuées */ print '
'.$langs->trans("ActionsToDo").' 
'.$langs->trans("ActionsToDo").' 
'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)."".img_warning("Late")." '.strftime("%H:%M",$obj->da).''; + if (date("U",$obj->da) < time()) print ' '.img_warning("Late"); + else print ' '; + print ' '.img_object($langs->trans("ShowAction"),"task"); + print ''.img_object($langs->trans("ShowAction"),"task"); $transcode=$langs->trans("Action".$obj->acode); $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); print $libelle; @@ -614,24 +612,26 @@ if ($socid > 0) } else { - print ''.img_object($langs->trans("ShowAction"),"task"); + print ''.img_object($langs->trans("ShowAction"),"task"); $transcode=$langs->trans("Action".$obj->acode); $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); print $libelle; print '$obj->label'.$obj->label.''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.''.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' '.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.''.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'
'; - print ''; + print ''; - $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid "; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = ".$societe->id; - $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action AND a.percent = 100"; - $sql .= " ORDER BY a.datea DESC, a.id DESC"; + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da,"; + $sql.= " a.propalrowid, a.fk_facture, a.fk_user_author, a.fk_contact,"; + $sql.= " c.code as acode, c.libelle,"; + $sql.= " u.code, u.rowid"; + $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql.= " WHERE a.fk_soc = ".$societe->id; + $sql.= " AND u.rowid = a.fk_user_author"; + $sql.= " AND c.id=a.fk_action AND a.percent = 100"; + $sql.= " ORDER BY a.datea DESC, a.id DESC"; $result=$db->query($sql); if ($result) @@ -686,8 +689,11 @@ if ($socid > 0) print '\n"; print '\n"; + // Picto + print ''; + // Espace - print ''; + print ''; // Action print ''; + // Objet lié print ''; + // Libellé + print ""; + // Contact pour cette action if ($obj->fk_contact) { @@ -720,7 +736,8 @@ if ($socid > 0) print ''; } - print ''; + // Auteur + print ''; print "\n"; $i++; } diff --git a/htdocs/compta/recap-client.php b/htdocs/compta/recap-client.php index e8cbca83c85..b53b325edcc 100644 --- a/htdocs/compta/recap-client.php +++ b/htdocs/compta/recap-client.php @@ -193,50 +193,44 @@ if ($socid > 0) print '
'.$langs->trans("ActionsDone").'
'.$langs->trans("ActionsDone").'
'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)."   '; @@ -698,6 +704,7 @@ if ($socid > 0) print ''; print ''; if ($obj->propalrowid) { @@ -705,9 +712,18 @@ if ($socid > 0) print $langs->trans("Propal"); print ''; } + if ($obj->fk_facture) + { + print ''.img_object($langs->trans("ShowBill"),"bill"); + print $langs->trans("Invoice"); + print ''; + } else print ' '; print '$obj->label '.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.''.img_object($langs->trans("ShowUser"),'user').' '.$obj->code.'
'; - $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df"; - $sql .= " , f.paye as paye, f.fk_statut as statut, f.rowid as facid "; - $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id; - $sql .= " ORDER BY f.datef DESC"; + $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df,"; + $sql.= " f.paye as paye, f.fk_statut as statut, f.rowid as facid,"; + $sql.= " u.code"; + $sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f,".MAIN_DB_PREFIX."user as u"; + $sql.= " WHERE f.fk_soc = s.idp AND s.idp = ".$societe->id; + $sql.= " AND f.fk_user_valid = u.rowid"; + $sql.= " ORDER BY f.datef DESC"; $resql=$db->query($sql); if ($resql) { $var=true; $num = $db->num_rows($resql); - if ($num > 0) + + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + if (! $num > 0) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - else - { - print $langs->trans("NoBills"); + print ''; } - $i = 0; - while ($i < $num) - { - $objp = $db->fetch_object($resql); - $facs[$i] = $objp->facid; - $i++; - } - $db->free($resql); - - $solde = 0; // Boucle sur chaque facture for ($i = 0 ; $i < $num ; $i++) { + $objf = $db->fetch_object($resql); + $fac = new Facture($db); - $ret=$fac->fetch($facs[$i]); + $ret=$fac->fetch($objf->facid); if ($ret < 0) { print $fac->error."
"; @@ -255,25 +249,30 @@ if ($socid > 0) print ''; print '\n"; + + // Auteur + print ''; + print "\n"; // Paiements - $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut"; + $sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, pf.amount, p.statut,"; + $sql.= " p.fk_user_creat, u.code"; + $sql.= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf,"; + $sql.= " ".MAIN_DB_PREFIX."paiement as p"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON p.fk_user_creat = u.rowid"; + $sql.= " WHERE pf.fk_paiement = p.rowid"; + $sql.= " AND pf.fk_facture = ".$fac->id; - $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p"; - $sql .= ", ".MAIN_DB_PREFIX."paiement_facture as pf"; - $sql .= " WHERE pf.fk_paiement = p.rowid"; - $sql .= " AND pf.fk_facture = ".$fac->id; - - $resql = $db->query($sql); - if ($resql) + $resqlp = $db->query($sql); + if ($resqlp) { - $nump = $db->num_rows($resql); + $nump = $db->num_rows($resqlp); $j = 0; while ($j < $nump) { - $objp = $db->fetch_object($resql); + $objp = $db->fetch_object($resqlp); //$var=!$var; print ""; print '\n"; @@ -285,10 +284,20 @@ if ($socid > 0) print ''; $solde = $solde - $objp->amount; print '\n"; + + // Auteur + print ''; + print ''; $j++; } + + $db->free($resqlp); + } + else + { + dolibarr_print_error($db); } } } @@ -301,7 +310,7 @@ if ($socid > 0) } else { - print "Erreur"; + dolibarr_print_error($db); } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index fd4fa0a6f70..e95fe149b55 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -103,6 +103,7 @@ DateMaxPayment=Payment due before DateEcheance=Due date limit DateBill=Invoice date DateInvoice=Invoice date +NoInvoice=No invoice ClassifyBill=Classify invoice NoSupplierBillsUnpayed=No suppliers invoices unpayed SupplierBillsToPay=Suppliers invoices to pay diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 392019760c3..c5df66ad1b7 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -103,6 +103,7 @@ DateMaxPayment=Date limite r DateEcheance=Date échéance DateBill=Date facturaction DateInvoice=Date facturation +NoInvoice=Aucune facture ClassifyBill=Classer la facture NoSupplierBillsUnpayed=Aucune facture fournisseur impayée SupplierBillsToPay=Factures fournisseurs à payer
'.$langs->trans("Date").'  '.$langs->trans("Debit").''.$langs->trans("Credit").''.$langs->trans("Balance").' 
'.$langs->trans("Date").'  '.$langs->trans("Debit").''.$langs->trans("Credit").''.$langs->trans("Balance").'
'.$langs->trans("NoInvoice").'
 '.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objf->code.'
'.dolibarr_print_date($objp->dp)."'.price($objp->amount).''.price($solde)."'.img_object($langs->trans("ShowUser"),'user').' '.$objp->code.'