From 1316e0e5202d65590141b3e19a4db91fc385b8b0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 May 2005 16:02:22 +0000 Subject: [PATCH] Look: Utilisation du picto "Rechercher" plutot que le bouton "Rechercher" --- htdocs/comm/clients.php | 12 ++-- htdocs/comm/contact.php | 28 ++++---- htdocs/comm/prospect/prospects.php | 20 +++--- htdocs/compta/bank/account.php | 2 +- htdocs/compta/bank/search.php | 90 +++++++++++++++----------- htdocs/compta/facture.php | 16 ++--- htdocs/compta/resultat/clientfourn.php | 17 +++-- htdocs/contact/index.php | 30 ++++----- htdocs/fourn/contact.php | 7 +- htdocs/fourn/facture/index.php | 18 +++--- htdocs/fourn/index.php | 23 +++---- htdocs/langs/en_US/banks.lang | 1 + htdocs/langs/fr_FR/banks.lang | 1 + htdocs/societe.php | 25 +++---- 14 files changed, 152 insertions(+), 138 deletions(-) diff --git a/htdocs/comm/clients.php b/htdocs/comm/clients.php index 4ad4c3c1307..d38bbd5b736 100644 --- a/htdocs/comm/clients.php +++ b/htdocs/comm/clients.php @@ -105,16 +105,18 @@ if ($result) print_liste_field_titre($langs->trans("Town"),"clients.php","s.ville",$addu,"","",$sortfield); print_liste_field_titre($langs->trans("CustomerCode"),"clients.php","s.code_client",$addu,"","",$sortfield); print_liste_field_titre($langs->trans("DateCreation"),"clients.php","datec",$addu,"","",$sortfield); - print " \n"; + print ' '; + print "\n"; print '
'; print ''; - print ''; + print ''; print ''; - print ' '; - print ''; + print ' '; + print ''; print ''; - print ' '; + print ' '; + print ''; print ""; print "\n"; diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index fead1460fa6..1dbb901cd35 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Éric Seigne - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,10 +23,10 @@ */ /** - \file htdocs/comm/contact.php - \ingroup commercial - \brief Liste des contacts - \version $Revision$ + \file htdocs/comm/contact.php + \ingroup commercial + \brief Liste des contacts + \version $Revision$ */ require("./pre.inc.php"); @@ -83,10 +83,8 @@ if ($type == "f") } /* - * * Mode liste * - * */ $sql = "SELECT s.idp, s.nom, st.libelle as stcomm"; @@ -146,22 +144,22 @@ if ($result) print_barre_liste($langs->trans("ListOfContacts").($label?" (".$label.")":""),$page, "contact.php", "&type=$type",$sortfield,$sortorder,"",$num); - print ''; + print '
'; print ''; print_liste_field_titre($langs->trans("Lastname"),"contact.php","p.name", $begin,"&type=$type","",$sortfield); print_liste_field_titre($langs->trans("Firstname"),"contact.php","p.firstname", $begin,"&type=$type","",$sortfield); print_liste_field_titre($langs->trans("Company"),"contact.php","s.nom", $begin,"&type=$type","",$sortfield); - print ''; - print ''; + print ''; + print ''; print "\n"; print ''; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; print ''; diff --git a/htdocs/comm/prospect/prospects.php b/htdocs/comm/prospect/prospects.php index c56bf3d9f02..42fe61d2a95 100644 --- a/htdocs/comm/prospect/prospects.php +++ b/htdocs/comm/prospect/prospects.php @@ -127,26 +127,26 @@ if ($result) $i = 0; - print '
'.$langs->trans("Email").''.$langs->trans("Phone").''.$langs->trans("Email").''.$langs->trans("Phone").'
  
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),"prospects.php","s.nom","","","valign=\"center\"",$sortfield); print_liste_field_titre($langs->trans("Town"),"prospects.php","s.ville","","","",$sortfield); print_liste_field_titre($langs->trans("State"),"prospects.php","s.fk_departement","","","align=\"center\"",$sortfield); print_liste_field_titre($langs->trans("DateCreation"),"prospects.php","s.datec","","","align=\"center\"",$sortfield); print_liste_field_titre($langs->trans("Status"),"prospects.php","s.fk_stcomm","","","align=\"center\"",$sortfield); - print ''; + print ''; print "\n"; print ''; print ''; - print '"; - print "'; + print ''; + print ''; print "\n"; @@ -159,7 +159,7 @@ if ($result) $var=!$var; print ""; - print ''; print ""; @@ -174,7 +174,7 @@ if ($result) print ""; $sts = array(-1,0,1,2,3); - print ''; print ''; print ''; - print ''; + print ''; print '
  
'; + print ''; print ''; - print ''; - + print ''; print ''; - print ""; - print ' '; + print ''; + print '
'; + print ''; print img_object($langs->trans("ShowProspect"),"company"); print ' '.$obj->nom.'".$obj->ville." '; + print ''; foreach ($sts as $key => $value) { if ($value <> $obj->fk_stcomm) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 1dd7acb68d9..77f65be05ea 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -215,7 +215,7 @@ if ($account > 0) print ''; if ($user->rights->banque->modifier) { diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index f67d36e44fa..70ad8c86838 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -35,42 +35,47 @@ $user->getrights('banque'); if (!$user->rights->banque->lire) accessforbidden(); +$description=$_POST["description"]; +$debit=$_POST["debit"]; +$credit=$_POST["credit"]; +$type=$_POST["type"]; +$account=$_POST["account"]; + llxHeader(); -if ($vline) { - $viewline = $vline; -} else { - $viewline = 50; -} +if ($vline) $viewline = $vline; +else $viewline = 50; -print_titre("Recherche écriture bancaire"); + +print_titre($langs->trans("SearchBankMovement")); print '
'; -print ''; -print ""; -print ''; -print ''; -print ''; -print ""; -print ''; +print '
Date'.$langs->trans("Description").''.$langs->trans("Debit").''.$langs->trans("Credit").'".$langs->trans("Type")."'.$langs->trans("Account").'
'; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; print "\n"; ?> - - + - - -\n"; - - - '; +print ''; +print ''; +print ''; +print ''; + // Compte le nombre total d'écritures $sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."bank"; if ($account) { $sql .= " WHERE b.fk_account=$account"; } -if ( $db->query($sql) ) + +$resql=$db->query($sql); +if ($resql) { - $nbline = $db->result (0, 0); - $db->free(); + $nbline = $db->result (0, 0); + $db->free($resql); } - +else { + dolibarr_print_error($db); +} + // Defini la liste des catégories dans $options $sql = "SELECT rowid, label FROM ".MAIN_DB_PREFIX."bank_categ;"; $result = $db->query($sql); if ($result) { - $var=True; - $num = $db->num_rows(); - $i = 0; + $var=True; + $num = $db->num_rows($result); + $i = 0; $options = ""; while ($i < $num) { - $obj = $db->fetch_object($result); - $options .= "\n"; $i++; + $obj = $db->fetch_object($result); + $options .= "\n"; $i++; } - $db->free(); + $db->free($result); +} +else { + dolibarr_print_error($db); } $sql = "SELECT b.rowid,".$db->pdate("b.dateo")." as do, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_account, b.fk_type, ba.label as labelaccount"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account=ba.rowid"; - $sql .= " AND fk_type like '" . $type . "'"; $si=0; @@ -139,11 +152,10 @@ for ($i = 1 ; $i <= $si; $i++) { $sql .= " ORDER BY b.dateo ASC"; $result = $db->query($sql); - if ($result) { $var=True; - $num = $db->num_rows(); + $num = $db->num_rows($result); $i = 0; while ($i < $num) { @@ -174,7 +186,7 @@ if ($result) $i++; } - $db->free(); + $db->free($result); } else { @@ -184,7 +196,7 @@ else print "
'.$langs->trans("Date").''.$langs->trans("Description").''.$langs->trans("Debit").''.$langs->trans("Credit").''.$langs->trans("Type").''.$langs->trans("Account").'
  +  > + > + > - +
-"> -
"; // Si accès issu d'une recherche et rien de trouvé -if ($_POST["submit"] && ! $num) { +if ($_POST["action"] == "search" && ! $num) { print "Aucune écriture bancaire répondant aux critères n'a été trouvée."; } diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e3d409282b4..1c51f67d34b 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1636,7 +1636,7 @@ else print_barre_liste($langs->trans("BillsCustomers")." ".($socidp?" $soc->nom":""),$page,"facture.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); $i = 0; - print ''; + print '
'; print ''; 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); @@ -1650,17 +1650,17 @@ else // Lignes des champs de filtre print ''; print ''; - print ''; - print ''; + print ''; print "\n"; print ''; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 72d87c0bf65..a80310e741a 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -147,7 +147,7 @@ if ($modecompta != 'CREANCES-DETTES') { $var=!$var; print ""; - print "\n"; print "\n"; @@ -158,17 +158,20 @@ if ($modecompta != 'CREANCES-DETTES') { $i++; } } - else { - $var=!$var; - print ""; - print ''; - print ''; - } $db->free($result); } else { dolibarr_print_error($db); } } + +if ($total_ttc == 0) +{ + $var=!$var; + print ""; + print ''; + print ''; +} + print ''; if ($modecompta == 'CREANCES-DETTES') print ''; print ''; diff --git a/htdocs/contact/index.php b/htdocs/contact/index.php index c83560557c9..6ca392b5f2e 100644 --- a/htdocs/contact/index.php +++ b/htdocs/contact/index.php @@ -152,7 +152,7 @@ if ($result) print_barre_liste($titre ,$page, "index.php", '&begin='.$_GET["begin"].'&view='.$_GET["view"].'&userid='.$_GET["userid"], $sortfield, $sortorder,'',$num); - print '
'; + print ''; print ''; - print ' '; + print ' '; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print '
 ".$langs->trans("Bills")." ".$langs->trans("Other")."\n"; + print "".$langs->trans("Bills")." ".$langs->trans("Other")." (anciens paiements liés à aucune facture)\n"; if ($modecompta == 'CREANCES-DETTES') print "".price($objp->amount_ht)."".price($objp->amount_ttc)."
 '.$langs->trans("None").'
 '.$langs->trans("None").'
'.price($total_ht).''.price($total_ttc).'
'; + print '
'; if ($contactname) { @@ -164,18 +164,18 @@ if ($result) print_liste_field_titre($langs->trans("Lastname"),"index.php","p.name", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", "", $sortfield); print_liste_field_titre($langs->trans("Firstname"),"index.php","p.firstname", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", "", $sortfield); print_liste_field_titre($langs->trans("Company"),"index.php","s.nom", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", "", $sortfield); - print ''; + print ''; if ($_GET["view"] == 'phone') { - print ''; - print ''; + print ''; + print ''; } else { print_liste_field_titre($langs->trans("EMail"),"index.php","p.email", $begin, "&type=$type&view=$view&search_nom=$search_nom&search_prenom=$search_prenom&search_societe=$search_societe&search_email=$search_email", "", $sortfield); } - print ''; + print ''; print "\n"; // Ligne des champs de filtres @@ -184,38 +184,38 @@ if ($result) print ''; print ''; print ''; - print ''; - print ''; - print ''; - print ''; if ($_GET["view"] == 'phone') { - print ''; - print ''; } else { - print ''; } - print ''; print ''; print ''; diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index e3f05d9f1a9..bdd50d6cbaa 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -89,12 +89,13 @@ if ($result) { print_barre_liste($langs->trans("ListOfContacts")." (".$langs->trans("Suppliers").")",$page, "contact.php", "",$sortfield,$sortorder,"",$num); - print '
'.$langs->trans("Phone").''.$langs->trans("Phone").''.$langs->trans("Mobile").''.$langs->trans("Fax").''.$langs->trans("Mobile").''.$langs->trans("Fax").'  
'; + print ''; print ''; print ''; + print ''; print ''; print ''; + print ''; print ''; print ''; + print ''; print ' '; print ''; + print ''; print ' '; print ''; + print ''; print ' '; print ''; + print ''; print ''; print ''; - print ''; - print '  '; + print ''; + print ''; + print '  '; print '
'; - print ""; + print '
'; + print ''; print_liste_field_titre($langs->trans("Lastname"),"contact.php","lower(p.name)", $begin, "", "", $sortfield); print_liste_field_titre($langs->trans("Firstname"),"contact.php","lower(p.firstname)", $begin, "", "", $sortfield); print_liste_field_titre($langs->trans("Company"),"contact.php","lower(s.nom)", $begin, "", "", $sortfield); - print ''; + print ''; + print ''; print "\n"; $var=True; $i = 0; diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index f7be089c41b..4e7e81e469d 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -152,7 +152,7 @@ if ($result) print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->nom":""),$page,"index.php","&socidp=$socidp",$sortfield,$sortorder,'',$num); - print '
'.$langs->trans("Email").''.$langs->trans("Phone").''.$langs->trans("Email").''.$langs->trans("Phone").'
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Ref"),"index.php","facnumber","&socid=$socid","","",$sortfield); print_liste_field_titre($langs->trans("Date"),"index.php","fac.datef","&socid=$socid","","",$sortfield); @@ -166,20 +166,20 @@ if ($result) // Lignes des champs de filtre print ''; print ''; - print ''; - print ''; + print ''; - print ''; print "\n"; print ''; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 64ae3d7d219..234844da1af 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -57,15 +57,8 @@ if ($page == -1) { $page = 0 ; } $offset = $conf->liste_limit * $page ; $pageprev = $page - 1; $pagenext = $page + 1; - -if ($sortorder == "") -{ - $sortorder="ASC"; -} -if ($sortfield == "") -{ - $sortfield="nom"; -} +if (! $sortorder) $sortorder="ASC"; +if (! $sortfield) $sortfield="nom"; /* @@ -105,19 +98,19 @@ if ($result) print_barre_liste($langs->trans("ListOfSuppliers"), $page, "index.php", "", $sortfield, $sortorder, '', $num); - print '
'; + print ''; print ''; - print ' '; + print ' '; print ''; print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; - print ''; + print ''; + print ''; print '
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),"index.php","s.nom","","",'valign="center"',$sortfield); - print ''; - print ''; + print ''; + print ''; print "\n"; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 7a1dc399dc2..ddb553d1c9b 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -27,3 +27,4 @@ StandingOrderProcessed=Processed NewAccount=New account NewFinancialAccount=New financial account AccountSetup=Account setup +SearchBankMovement=search bank movement \ No newline at end of file diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 22fea5585f4..24a938c0f3f 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -27,3 +27,4 @@ StandingOrderProcessed=Trait NewAccount=Nouveau compte NewFinancialAccount=Nouveau compte financier AccountSetup=Configuration des comptes +SearchBankMovement=Recherche écriture bancaire diff --git a/htdocs/societe.php b/htdocs/societe.php index a640e51ebe2..9fceab686b4 100644 --- a/htdocs/societe.php +++ b/htdocs/societe.php @@ -102,7 +102,10 @@ if ($mode == 'search') $socid = $user->societe_id; } } -if ($_POST["button_removefilter"] == $langs->trans("RemoveFilter")) { + +// As-t-on cliqué sur purge des criètres de recherche +if (isset($_POST["button_removefilter_x"])) +{ $socname=""; $search_nom=""; $search_ville=""; @@ -161,29 +164,29 @@ if ($result) print_barre_liste($title, $page, "societe.php",$params,$sortfield,$sortorder,'',$num); // Lignes des titres - print '
'.$langs->trans("Town").' '.$langs->trans("Town").' 
'; + print '
'; print ''; print_liste_field_titre($langs->trans("Company"),"societe.php","s.nom", $params,"&search_nom=$search_nom&search_ville=$search_ville","",$sortfield); print_liste_field_titre($langs->trans("Town"),"societe.php","s.ville",$params,"&search_nom=$search_nom&search_ville=$search_ville",'',$sortfield); print_liste_field_titre($langs->trans("SIREN"),"societe.php","s.siren",$params,"&search_nom=$search_nom&search_ville=$search_ville",'',$sortfield); - print ''; + print ''; print "\n"; // Lignes des champs de filtre - print ''; + print ''; print ''; print ''; print ''; - print ''; print "\n"; print '';
  
'; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - - print ''; - print ''; - print '  '; + print ''; + print ''; + print '  '; + print ''; print '