From fd3ba131307c9cc54f69d8f7186b2786e73da9a6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 18 Oct 2015 21:33:47 +0200 Subject: [PATCH 01/31] FIX #3541 Bypass authentication when user was created using LDAP --- htdocs/core/login/functions_dolibarr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index 36596165191..c421fdb1aeb 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -91,7 +91,7 @@ function check_user_password_dolibarr($usertotest,$passwordtotest,$entitytotest= if (! $passok) { if ((! $passcrypted || $passtyped) - && ($passtyped == $passclear)) + && ($passclear && ($passtyped == $passclear))) { $passok=true; dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - found pass in database"); From 6a90431cf1d4f0853041538203f461a05ff91d3b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Oct 2015 14:04:47 +0200 Subject: [PATCH 02/31] Prepare 3.8.2 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index ea369d8aff3..415a7addf4a 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -30,7 +30,7 @@ * \brief File that include conf.php file and commons lib like functions.lib.php */ -if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.1'); +if (! defined('DOL_VERSION')) define('DOL_VERSION','3.8.2'); if (! defined('EURO')) define('EURO',chr(128)); From 9e9f32e3bf848dc965de0a55c99c89ff6798d7bc Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 19 Oct 2015 15:38:28 +0200 Subject: [PATCH 03/31] FIX : project was not retrieved on invoice creation form --- htdocs/compta/facture.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index de0a591cf98..6368dd00831 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1877,7 +1877,7 @@ if ($action == 'create') $objectsrc->fetch_lines(); $objectsrc->fetch_thirdparty(); - $projectid = (! empty($objectsrc->fk_project) ? $objectsrc->fk_project : ''); + $projectid = (! empty($projectid) ? $projectid : $objectsrc->fk_project); $ref_client = (! empty($objectsrc->ref_client) ? $objectsrc->ref_client : ''); $ref_int = (! empty($objectsrc->ref_int) ? $objectsrc->ref_int : ''); @@ -2257,9 +2257,6 @@ if ($action == 'create') // Project if (! empty($conf->projet->enabled) && $socid > 0) { - $projectid = GETPOST('projectid')?GETPOST('projectid'):0; - if ($origin == 'project') $projectid = ($originid ? $originid : 0); - $langs->load('projects'); print '' . $langs->trans('Project') . ''; $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); From 5fb6705b5c57e14523c71f655b3231d0ab394ece Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 19 Oct 2015 15:53:13 +0200 Subject: [PATCH 04/31] FIX : Search status not saved into list --- htdocs/compta/facture/list.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2f87ff09e8b..2adab72dc1c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -270,6 +270,7 @@ if ($resql) if ($search_user > 0) $param.='&search_user=' .$search_user; if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc; + if ($search_status != '') $param.='&search_status='.$search_status; print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy.png'); $i = 0; From 572be23fc1e2716b64ae584d5ea288b4b9831e72 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 19 Oct 2015 15:57:23 +0200 Subject: [PATCH 05/31] FIX : filters on supplier invoices list are not used, search_status instead --- htdocs/fourn/facture/list.php | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index dc8adddec39..a2b48c253df 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -81,7 +81,6 @@ $year = GETPOST("year","int"); $day_lim = GETPOST('day_lim','int'); $month_lim = GETPOST('month_lim','int'); $year_lim = GETPOST('year_lim','int'); -$filter = GETPOST("filtre"); if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test must be present to be compatible with all browsers { @@ -91,9 +90,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_company=""; $search_amount_no_tax=""; $search_amount_all_tax=""; + $search_status=""; $year=""; $month=""; - $filter=""; } /* @@ -147,15 +146,6 @@ if ($socid) { $sql .= " AND s.rowid = ".$socid; } -if ($filter && $filter != -1) // GETPOST('filtre') may be a string -{ - $filtrearr = explode(",", $filter); - foreach ($filtrearr as $fil) - { - $filt = explode(":", $fil); - $sql .= " AND " . $filt[0] . " = " . $filt[1]; - } -} if ($search_ref) { @@ -214,7 +204,7 @@ if ($search_amount_all_tax != '') if ($search_status != '') { - $sql.= " AND fac.fk_statut = '".$db->escape($search_status)."'"; + $sql.= " AND fac.fk_statut = ".$search_status; } $nbtotalofrecords = 0; @@ -248,7 +238,7 @@ if ($resql) if ($search_company) $param.='&search_company='.urlencode($search_company); if ($search_amount_no_tax) $param.='&search_amount_no_tax='.urlencode($search_amount_no_tax); if ($search_amount_all_tax) $param.='&search_amount_all_tax='.urlencode($search_amount_all_tax); - if ($filter && $filter != -1) $param.='&filtre='.urlencode($filter); + if ($search_status >= 0) $param.="&search_status=".$search_status; print_barre_liste($langs->trans("BillsSuppliers").($socid?" $soc->name.":""),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); print '
'; @@ -305,8 +295,8 @@ if ($resql) print ''; print ''; print ''; - $liststatus=array('fac.fk_statut:0'=>$langs->trans("Draft"),'fac.fk_statut:1,paye:0'=>$langs->trans("Unpaid"), 'paye:1'=>$langs->trans("Paid")); - print $form->selectarray('filtre', $liststatus, $filter, 1); + $liststatus=array('0'=>$langs->trans("Draft"),'1'=>$langs->trans("Unpaid"), '2'=>$langs->trans("Paid")); + print $form->selectarray('filtre', $liststatus, $search_status, 1); print ''; print ''; print ''; From d79fb7198762e09f0c07055f1086211878dc7f8b Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Mon, 19 Oct 2015 16:17:47 +0200 Subject: [PATCH 06/31] FIX : search_status not used in mergefusiontool --- htdocs/compta/facture/mergepdftool.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/compta/facture/mergepdftool.php b/htdocs/compta/facture/mergepdftool.php index 5acca49d1b1..ea0eedfa36a 100644 --- a/htdocs/compta/facture/mergepdftool.php +++ b/htdocs/compta/facture/mergepdftool.php @@ -417,6 +417,7 @@ $search_societe = GETPOST("search_societe"); $search_paymentmode = GETPOST("search_paymentmode"); $search_montant_ht = GETPOST("search_montant_ht"); $search_montant_ttc = GETPOST("search_montant_ttc"); +$search_status = GETPOST("search_status"); $late = GETPOST("late"); // Do we click on purge search criteria ? @@ -428,6 +429,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_paymentmode=''; $search_montant_ht=''; $search_montant_ttc=''; + $search_status=''; } $sortfield = GETPOST("sortfield",'alpha'); @@ -483,6 +485,7 @@ if ($search_paymentmode) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmo if ($search_montant_ht) $sql .= " AND f.total = '".$db->escape($search_montant_ht)."'"; if ($search_montant_ttc) $sql .= " AND f.total_ttc = '".$db->escape($search_montant_ttc)."'"; if (GETPOST('sf_ref')) $sql .= " AND f.facnumber LIKE '%".$db->escape(GETPOST('sf_ref'))."%'"; +if ($search_status) $sql .= " AND f.fk_statut = ".$search_status; if ($month > 0) { if ($year > 0) @@ -528,6 +531,7 @@ if ($resql) if ($search_societe) $param.='&search_paymentmode='.urlencode($search_paymentmode); if ($search_montant_ht) $param.='&search_montant_ht='.urlencode($search_montant_ht); if ($search_montant_ttc) $param.='&search_montant_ttc='.urlencode($search_montant_ttc); + if ($search_status) $param.='&search_status='.urlencode($search_status); if ($late) $param.='&late='.urlencode($late); if ($mode) $param.='&mode='.urlencode($mode); $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; From 7d382f7997fec9d9fbdb5e199c8e5befb18dfa11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 19 Oct 2015 18:16:28 +0200 Subject: [PATCH 07/31] FIX Revert option WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES into option WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED for better compatibility with old versions --- htdocs/comm/propal.php | 2 +- htdocs/langs/en_US/workflow.lang | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index bcfaa747cab..fd6794c3d44 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2223,7 +2223,7 @@ if ($action == 'create') } $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); - if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || ! empty($conf->global->WORKFLOW_PROPAL_CAN_CLASSIFIED_BILLED_WITHOUT_INVOICES)) + if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || empty($conf->global->WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED)) { print ''; } diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang index 7414fcb7e62..14be1a6ade6 100644 --- a/htdocs/langs/en_US/workflow.lang +++ b/htdocs/langs/en_US/workflow.lang @@ -3,9 +3,9 @@ WorkflowSetup=Workflow module setup WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed -descWORKFLOW_PROPAL_AUTOCREATE_INVOICEAutomatically create a customer invoice after a commercial proposal is signed -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICEAutomatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICEAutomatically create a customer invoice after a customer order is closed +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal to billed when customer order is set to paid descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated From 5237a2afc7bf155cbdc8a73bcaeefb90264084ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 20 Oct 2015 17:45:24 +0200 Subject: [PATCH 08/31] Fix lost searchstatus on next page list --- htdocs/compta/facture/list.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2f87ff09e8b..87b27ef8199 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -69,7 +69,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_ttc=GETPOST('search_montant_ttc','alpha'); -$search_status=GETPOST('search_status','alpha'); +$search_status=GETPOST('search_status','int'); $sortfield = GETPOST("sortfield",'alpha'); $sortorder = GETPOST("sortorder",'alpha'); @@ -270,6 +270,7 @@ if ($resql) if ($search_user > 0) $param.='&search_user=' .$search_user; if ($search_montant_ht != '') $param.='&search_montant_ht='.$search_montant_ht; if ($search_montant_ttc != '') $param.='&search_montant_ttc='.$search_montant_ttc; + if ($search_status > 0) $param.='&search_status='.$search_status; print_barre_liste($langs->trans('BillsCustomers').' '.($socid?' '.$soc->name:''),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_accountancy.png'); $i = 0; From 4689b0cc11846010f43b29aeb64db4d298994c39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 21 Oct 2015 17:31:51 +0200 Subject: [PATCH 09/31] Update fournisseur.commande.class.php --- htdocs/fourn/class/fournisseur.commande.class.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 492663295b8..51602cafe1c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1571,6 +1571,7 @@ class CommandeFournisseur extends CommonOrder $result=$this->call_trigger('ORDER_SUPPLIER_DELETE',$user); if ($result < 0) { + $this->errors[]='ErrorWhenRunningTrigger'; dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); return -1; } @@ -1583,6 +1584,8 @@ class CommandeFournisseur extends CommonOrder dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql) ) { + $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } @@ -1593,12 +1596,14 @@ class CommandeFournisseur extends CommonOrder if ($this->db->affected_rows($resql) < 1) { $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } } else { $this->error=$this->db->lasterror(); + $this->errors[]=$this->db->lasterror(); $error++; } @@ -1608,6 +1613,8 @@ class CommandeFournisseur extends CommonOrder $result=$this->deleteExtraFields(); if ($result < 0) { + $this->error='FailToDeleteExtraFields'; + $this->errors[]='FailToDeleteExtraFields'; $error++; dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } @@ -1615,7 +1622,11 @@ class CommandeFournisseur extends CommonOrder // Delete linked object $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; + if ($res < 0) { + $this->error='FailToDeleteObjectLinked'; + $this->errors[]='FailToDeleteObjectLinked'; + $error++; + } if (! $error) { @@ -1630,6 +1641,7 @@ class CommandeFournisseur extends CommonOrder if (! dol_delete_file($file,0,0,0,$this)) // For triggers { $this->error='ErrorFailToDeleteFile'; + $this->errors[]='ErrorFailToDeleteFile'; $error++; } } @@ -1639,6 +1651,7 @@ class CommandeFournisseur extends CommonOrder if (! $res) { $this->error='ErrorFailToDeleteDir'; + $this->errors[]='ErrorFailToDeleteDir'; $error++; } } From 2a412af00b3ea57ed2e2d3e72a77044275d9a44f Mon Sep 17 00:00:00 2001 From: Sergio Sanchis Climent Date: Fri, 23 Oct 2015 13:04:33 +0200 Subject: [PATCH 10/31] Fix: Bug: if $this->employe no exist Fix: if this->employee no exist default 0 --- htdocs/install/mysql/tables/llx_user.sql | 3 +-- htdocs/user/class/user.class.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 796566fb638..c9673ceb360 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -26,7 +26,7 @@ create table llx_user ref_ext varchar(50), -- reference into an external system (not used by dolibarr) ref_int varchar(50), -- reference into an internal system (deprecated) - employee tinyint DEFAULT 0, -- employee 0/1 + employee tinyint DEFAULT 0, -- 1 if user is an employee datec datetime, tms timestamp, @@ -76,7 +76,6 @@ create table llx_user nb_holiday integer DEFAULT 0, thm double(24,8), tjm double(24,8), - employee tinyint DEFAULT 1, -- 1 if user is an employee salary double(24,8), salaryextra double(24,8), weeklyhours double(16,8) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 85a96ebe415..066da9c18da 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1156,7 +1156,7 @@ class User extends CommonObject // Clean parameters $this->lastname = trim($this->lastname); $this->firstname = trim($this->firstname); - $this->employee = trim($this->employee); + $this->employee = $this->employee?$this->employee:0; $this->login = trim($this->login); $this->gender = trim($this->gender); $this->pass = trim($this->pass); From 8d24adc97ee54640a716258be36c9c5379246dc8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Oct 2015 13:52:51 +0200 Subject: [PATCH 11/31] Remove 2 other duplicated pages. There is only one page now for all list of thirdarties (with a parameter type to have it specialized per customer, prospect or supplier profile). --- htdocs/comm/list.php | 348 ------------ htdocs/comm/prospect/list.php | 613 --------------------- htdocs/core/class/html.formother.class.php | 2 +- htdocs/core/menus/init_menu_auguria.sql | 4 +- htdocs/core/menus/standard/eldy.lib.php | 14 +- htdocs/index.php | 5 +- htdocs/societe/index.php | 4 +- htdocs/societe/list.php | 251 +++++++-- 8 files changed, 233 insertions(+), 1008 deletions(-) delete mode 100644 htdocs/comm/list.php delete mode 100644 htdocs/comm/prospect/list.php diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php deleted file mode 100644 index 1cc0f2fa968..00000000000 --- a/htdocs/comm/list.php +++ /dev/null @@ -1,348 +0,0 @@ - - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013-2015 Florian Henry - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Marcos García - * - * This program is freei software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/comm/list.php - * \ingroup commercial societe - * \brief List of customers - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - -$langs->load("companies"); -$langs->load("customers"); -$langs->load("suppliers"); -$langs->load("commercial"); - -// Security check -$socid = GETPOST('socid','int'); -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user,'societe',$socid,''); - -$sortfield = GETPOST('sortfield','alpha'); -$sortorder = GETPOST('sortorder','alpha'); -$page=GETPOST('page','int'); -if ($page == -1) { $page = 0 ; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="s.nom"; - -$search_company = GETPOST("search_company"); -$search_zipcode = GETPOST("search_zipcode"); -$search_town = GETPOST("search_town"); -$search_code = GETPOST("search_code"); -$search_compta = GETPOST("search_compta"); -$search_status = GETPOST("search_status",'int'); -$search_country = GETPOST("search_country",'int'); -$search_type_thirdparty = GETPOST("search_type_thirdparty",'int'); -$optioncss = GETPOST('optioncss','alpha'); - -// Load sale and categ filters -$search_sale = GETPOST("search_sale",'int'); -$search_categ = GETPOST("search_categ",'int'); -$catid = GETPOST("catid",'int'); -// If the internal user must only see his customers, force searching by him -if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$hookmanager->initHooks(array('customerlist')); -$extrafields = new ExtraFields($db); - - -/* - * Actions - */ - -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -// Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ - $search_sale=""; - $search_categ=""; - $catid=""; - $search_company=""; - $search_zipcode=""; - $search_town=""; - $search_code=''; - $search_compta=''; - $search_status=''; - $search_country=""; - $search_type_thirdparty=''; -} - -if ($search_status=='') $search_status=1; // always display activ customer first - - -/* - * view - */ - -$formother=new FormOther($db); -$form = new Form($db); -$thirdpartystatic=new Societe($db); -$formcompany=new FormCompany($db); - -$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty"),$help_url); - -$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.client, s.zip, s.town, st.libelle as stcomm, s.prefix_comm, s.code_client, s.code_compta, s.status as status,"; -$sql.= " s.datec, s.canvas"; -$sql.= ",s.fk_pays"; -$sql.= ",typent.code as typent_code"; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) -// Add fields for extrafields -foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; -// Add fields from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; -if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays) "; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent) "; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale -$sql.= ", ".MAIN_DB_PREFIX."c_stcomm as st"; -$sql.= " WHERE s.fk_stcomm = st.id"; -$sql.= " AND s.client IN (1, 3)"; -$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale) $sql.= " AND s.rowid = sc.fk_soc"; -if ($socid) $sql.= " AND s.rowid = ".$socid; -if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; // Join for the needed table to filter by sale -if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; -if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; -if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_company) $sql.= natural_search(array('s.nom', 's.name_alias'), $search_company); -if ($search_zipcode) $sql.= natural_search("s.zip", $search_zipcode); -if ($search_town) $sql.= natural_search('s.town', $search_town); -if ($search_code) $sql.= natural_search("s.code_client", $search_code); -if ($search_compta) $sql.= natural_search("s.code_compta", $search_compta); -if ($search_status!='') $sql.= " AND s.status = ".$db->escape($search_status); -if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -if ($search_sale > 0) $sql.= " AND sc.fk_user = ".$search_sale; -// Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; - -// Count total nb of records -$nbtotalofrecords = 0; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); -} - -$sql.= $db->order($sortfield,$sortorder); -$sql.= $db->plimit($conf->liste_limit +1, $offset); - -dol_syslog('comm/list.php:', LOG_DEBUG); -$result = $db->query($sql); -if ($result) -{ - $num = $db->num_rows($result); - - $param = "&search_company=".htmlspecialchars($search_company); - $param.="&search_code=".htmlspecialchars($search_code); - $param.="&search_zipcode=".htmlspecialchars($search_zipcode); - $param.="&search_town=".htmlspecialchars($search_town); - if ($search_categ != '') $param.='&search_categ='.htmlspecialchars($search_categ); - if ($search_sale > 0) $param.='&search_sale='.htmlspecialchars($search_sale); - if ($search_status != '') $param.='&search_status='.htmlspecialchars($search_status); - if ($search_country != '') $param.='&search_country='.htmlspecialchars($search_country); - if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.htmlspecialchars($search_type_thirdparty); - if ($optioncss != '') $param.='&optioncss='.$optioncss; - - print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies.png'); - - $i = 0; - - print ''."\n"; - if ($optioncss != '') print ''; - - // Filter on categories - $moreforfilter=''; - if (! empty($conf->categorie->enabled)) - { - $moreforfilter.='
'; - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1); - $moreforfilter.='
'; - } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $moreforfilter.='
'; - $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='
'; - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; - } - - print ''; - - print ''; - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("CustomerCode"),$_SERVER["PHP_SELF"],"s.code_client","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AccountancyCode"),$_SERVER["PHP_SELF"],"s.code_compta","",$param,'align="left"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"datec","",$param,'align="right"',$sortfield,$sortorder); - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - print ''; - - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print ''."\n"; - - - $var=True; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($result); - - $var=!$var; - - print ""; - print ''; - print ''; - print ''; - //Country - print ''; - //Type ent - print ''; - print ''; - print ''; - print ''; - - $parameters=array('obj' => $obj); - $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print "\n"; - $i++; - } - $db->free($result); - - $parameters=array('sql' => $sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print $form->select_country($search_country,'search_country','',0,'maxwidth100'); - print ''; - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); - print ''; - print ''; - print ''; - print ''; - print ''; - print ' '; - print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; - print ''; - print '
'; - $thirdpartystatic->id=$obj->rowid; - $thirdpartystatic->name=$obj->name; - $thirdpartystatic->client=$obj->client; - $thirdpartystatic->code_client=$obj->code_client; - $thirdpartystatic->canvas=$obj->canvas; - $thirdpartystatic->status=$obj->status; - $thirdpartystatic->name_alias=$obj->name_alias; - print $thirdpartystatic->getNomUrl(1); - print ''.$obj->zip.''.$obj->town.''; - $tmparray=getCountry($obj->fk_pays,'all'); - print $tmparray['label']; - print ''; - if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); - print $typenArray[$obj->typent_code]; - print ''.$obj->code_client.''.$obj->code_compta.''.dol_print_date($db->jdate($obj->datec),'day').''.$thirdpartystatic->getLibStatut(3); - print '
\n"; - print "\n"; -} -else -{ - dol_print_error($db); -} - -llxFooter(); -$db->close(); diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php deleted file mode 100644 index 8ec43d955a4..00000000000 --- a/htdocs/comm/prospect/list.php +++ /dev/null @@ -1,613 +0,0 @@ - - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Philippe Grand - * Copyright (C) 2013-2015 Florian Henry - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2015 Marcos García - * - * 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 - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/comm/prospect/list.php - * \ingroup prospect - * \brief Page to list prospects - */ - -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; - -$langs->load("propal"); -$langs->load("companies"); - -// Security check -$socid = GETPOST("socid",'int'); -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'societe',$socid,''); - -$action = GETPOST('action','alpha'); -$socname = GETPOST("socname",'alpha'); -$stcomm = GETPOST("stcomm",'alpha'); // code -$search_stcomm = GETPOST("search_stcomm",'int'); -$search_nom = GETPOST("search_nom"); -$search_zipcode = GETPOST("search_zipcode"); -$search_town = GETPOST("search_town"); -$search_state = GETPOST("search_state"); -$search_datec = GETPOST("search_datec"); -$search_categ = GETPOST("search_categ",'int'); -$search_status = GETPOST("search_status",'int'); -$catid = GETPOST("catid",'int'); -$search_country = GETPOST("search_country",'int'); -$search_type_thirdparty = GETPOST("search_type_thirdparty",'int'); - -$sortfield = GETPOST("sortfield",'alpha'); -$sortorder = GETPOST("sortorder",'alpha'); -$page = GETPOST("page",'int'); -if ($page == -1) { $page = 0; } -$offset = $conf->liste_limit * $page; -$pageprev = $page - 1; -$pagenext = $page + 1; -if (! $sortorder) $sortorder="ASC"; -if (! $sortfield) $sortfield="s.nom"; - -$search_level_from = GETPOST("search_level_from","alpha"); -$search_level_to = GETPOST("search_level_to","alpha"); - -// If both parameters are set, search for everything BETWEEN them -if ($search_level_from != '' && $search_level_to != '') -{ - // Ensure that these parameters are numbers - $search_level_from = (int) $search_level_from; - $search_level_to = (int) $search_level_to; - - // If from is greater than to, reverse orders - if ($search_level_from > $search_level_to) - { - $tmp = $search_level_to; - $search_level_to = $search_level_from; - $search_level_from = $tmp; - } - - // Generate the SQL request - $sortwhere = '(sortorder BETWEEN '.$search_level_from.' AND '.$search_level_to.') AS is_in_range'; -} -// If only "from" parameter is set, search for everything GREATER THAN it -else if ($search_level_from != '') -{ - // Ensure that this parameter is a number - $search_level_from = (int) $search_level_from; - - // Generate the SQL request - $sortwhere = '(sortorder >= '.$search_level_from.') AS is_in_range'; -} -// If only "to" parameter is set, search for everything LOWER THAN it -else if ($search_level_to != '') -{ - // Ensure that this parameter is a number - $search_level_to = (int) $search_level_to; - - // Generate the SQL request - $sortwhere = '(sortorder <= '.$search_level_to.') AS is_in_range'; -} -// If no parameters are set, dont search for anything -else -{ - $sortwhere = '0 as is_in_range'; -} - -// Select every potentiels, and note each potentiels which fit in search parameters -dol_syslog('prospects::prospects_prospect_level',LOG_DEBUG); -$sql = "SELECT code, label, sortorder, ".$sortwhere; -$sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; -$sql.= " WHERE active > 0"; -$sql.= " ORDER BY sortorder"; - -$resql = $db->query($sql); -if ($resql) -{ - $tab_level = array(); - $search_levels = array(); - - while ($obj = $db->fetch_object($resql)) - { - // Compute level text - $level=$langs->trans($obj->code); - if ($level == $obj->code) $level=$langs->trans($obj->label); - - // Put it in the array sorted by sortorder - $tab_level[$obj->sortorder] = $level; - - // If this potentiel fit in parameters, add its code to the $search_levels array - if ($obj->is_in_range == 1) - { - $search_levels[] = '"'.preg_replace('[^A-Za-z0-9_-]', '', $obj->code).'"'; - } - } - - // Implode the $search_levels array so that it can be use in a "IN (...)" where clause. - // If no paramters was set, $search_levels will be empty - $search_levels = implode(',', $search_levels); -} -else dol_print_error($db); - -// Load sale and categ filters -$search_sale = GETPOST('search_sale','int'); -$search_categ = GETPOST('search_categ','int'); -// If the internal user must only see his prospect, force searching by him -if (!$user->rights->societe->client->voir && !$socid) $search_sale = $user->id; - -// List of available states; we'll need that for each lines (quick changing prospect states) and for search bar (filter by prospect state) -$sts = array(-1,0,1,2,3); - - -// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array -$contextpage='prospectlist'; -$hookmanager->initHooks(array($contextpage)); -$extrafields = new ExtraFields($db); - -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('thirdparty'); -$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); - -// Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers -{ - $socname=""; - $stcomm=""; - $search_stcomm=""; - $search_nom=""; - $search_zipcode=""; - $search_town=""; - $search_state=""; - $search_datec=""; - $search_categ=""; - $search_status=""; - $search_country=""; - $search_type_thirdparty=""; - $search_array_options=array(); -} - -if ($search_status=='') $search_status=1; // always display active customer first - - - -/* - * Actions - */ - -$parameters=array(); -$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - -if (empty($reshook)) -{ - if ($action == 'setstcomm') - { - $object = new Client($db); - $result=$object->fetch($socid); - $object->stcomm_id=dol_getIdFromCode($db, GETPOST('stcomm','alpha'), 'c_stcomm'); - $result=$object->set_commnucation_level($user); - if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); - - $action=''; $socid=0; - } -} - - -/* - * View - */ - -$formother=new FormOther($db); -$form=new Form($db); -$formcompany=new FormCompany($db); -$prospectstatic=new Client($db); -$prospectstatic->client=2; -$prospectstatic->loadCacheOfProspStatus(); - -$sql = "SELECT s.rowid as socid, s.nom as name, s.name_alias, s.zip, s.town, s.datec, s.status as status, s.code_client, s.client,"; -$sql.= " s.prefix_comm, s.fk_prospectlevel, s.fk_stcomm as stcomm_id,"; -$sql.= " st.libelle as stcomm_label,"; -$sql.= " d.nom as departement"; -$sql.= " ,s.fk_pays"; -$sql.= " ,typent.code as typent_code"; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) -// Add fields for extrafields -if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) foreach ($extrafields->attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; -// Add fields from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -$sql .= " FROM ".MAIN_DB_PREFIX."c_stcomm as st"; -$sql.= ", ".MAIN_DB_PREFIX."societe as s"; -if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_extrafields as ef on (s.rowid = ef.fk_object)"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d on (d.rowid = s.fk_departement)"; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays) "; -$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent) "; -if (! empty($search_categ) || ! empty($catid)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale -$sql.= " WHERE s.fk_stcomm = st.id"; -$sql.= " AND s.client IN (2, 3)"; -$sql.= ' AND s.entity IN ('.getEntity('societe', 1).')'; -if ((!$user->rights->societe->client->voir && !$socid) || $search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc"; -if ($socid) $sql.= " AND s.rowid = " .$socid; -if ($search_stcomm != '' && $search_stcomm != -2) $sql.= natural_search("s.fk_stcomm",$search_stcomm,2); -if ($catid > 0) $sql.= " AND cs.fk_categorie = ".$catid; -if ($catid == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_categ > 0) $sql.= " AND cs.fk_categorie = ".$search_categ; -if ($search_categ == -2) $sql.= " AND cs.fk_categorie IS NULL"; -if ($search_nom) $sql .= natural_search(array('s.nom','s.name_alias'), $search_nom); -if ($search_zipcode) $sql .= " AND s.zip LIKE '".$db->escape(strtolower($search_zipcode))."%'"; -if ($search_town) $sql .= natural_search('s.town', $search_town); -if ($search_state) $sql .= natural_search('d.nom', $search_state); -if ($search_datec) $sql .= " AND s.datec LIKE '%".$db->escape($search_datec)."%'"; -if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); -// Insert levels filters -if ($search_levels) $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')'; -if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; -// Insert sale filter -if ($search_sale > 0) $sql .= " AND sc.fk_user = ".$db->escape($search_sale); -if ($socname) -{ - $sql .= natural_search('s.nom', $search_nom); - $sortfield = "s.nom"; - $sortorder = "ASC"; -} -// Add where from extra fields -foreach ($search_array_options as $key => $val) -{ - $crit=$val; - $tmpkey=preg_replace('/search_options_/','',$key); - $typ=$extrafields->attribute_type[$tmpkey]; - $mode=0; - if (in_array($typ, array('int'))) $mode=1; // Search on a numeric - if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) - { - $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); - } -} -// Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -// Count total nb of records -$nbtotalofrecords = 0; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); -} -$sql.= " ORDER BY $sortfield $sortorder, s.nom ASC"; -$sql.= $db->plimit($conf->liste_limit+1, $offset); -//print $sql; - -dol_syslog('comm/prospect/list.php', LOG_DEBUG); -$resql = $db->query($sql); -if ($resql) -{ - $num = $db->num_rows($resql); - - if ($num == 1 && $socname) - { - $obj = $db->fetch_object($resql); - header("Location: card.php?socid=".$obj->socid); - exit; - } - else - { - $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; - llxHeader('',$langs->trans("ThirdParty"),$help_url); - } - - $param='&search_stcomm='.$search_stcomm; - $param.='&search_nom='.urlencode($search_nom); - $param.='&search_zipcode='.urlencode($search_zipcode); - $param.='&search_town='.urlencode($search_town); - // Store the status filter in the URL - if (isSet($search_setstcomm)) - { - foreach ($search_setstcomm as $key => $value) - { - if ($value == 'true') - $param.='&search_setstcomm['.((int) $key).']=true'; - else - $param.='&search_setstcomm['.((int) $key).']=false'; - } - } - if ($search_level_from != '') $param.='&search_level_from='.$search_level_from; - if ($search_level_to != '') $param.='&search_level_to='.$search_level_to; - if ($search_categ != '') $param.='&search_categ='.urlencode($search_categ); - if ($search_sale > 0) $param.='&search_sale='.$search_sale; - if ($search_status != '') $param.='&search_status='.$search_status; - if ($search_country != '') $param.='&search_country='.$search_country; - if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.$search_type_thirdparty; - // Add $param from extra fields - foreach ($search_array_options as $key => $val) - { - $crit=$val; - $tmpkey=preg_replace('/search_options_/','',$key); - $param.='&search_options_'.$tmpkey.'='.urlencode($val); - } - - print_barre_liste($langs->trans("ListOfProspects"), $page, $_SERVER["PHP_SELF"], $param, $sortfield,$sortorder,'',$num,$nbtotalofrecords,'title_companies.png'); - - - // Print the search-by-sale and search-by-categ filters - print '
'; - - // Filter on categories - $moreforfilter=''; - if (! empty($conf->categorie->enabled)) - { - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $moreforfilter.='
'; - $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1); - $moreforfilter.='
'; - } - // If the user can view prospects other than his' - if ($user->rights->societe->client->voir || $socid) - { - $moreforfilter.='
'; - $moreforfilter.=$langs->trans('SalesRepresentatives'). ': '; - $moreforfilter.=$formother->select_salesrepresentatives($search_sale,'search_sale',$user); - $moreforfilter.='
'; - } - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldPreListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
'; - } - - print ''; - - print ''; - print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Zip"),$_SERVER["PHP_SELF"],"s.zip","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("StateShort"),$_SERVER["PHP_SELF"],"s.fk_departement","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Country"),$_SERVER["PHP_SELF"],"country.code_iso","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdPartyType"),$_SERVER["PHP_SELF"],"typent.code","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ProspectLevelShort"),$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("StatusProsp"),$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre(''); - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,"",$sortfield,$sortorder); - } - } - } - // Hook fields - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); - print "\n"; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - // Prospect level - print ''; - - // Prospect status - print ''; - - print ''; - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - $crit=$search_array_options['search_options_'.$key]; - print ''; - } - } - } - // Hook fields - $parameters=array(); - $reshook=$hookmanager->executeHooks('printFieldListSearch',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - // Status - print ''; - - // Print the search button - print '\n"; - - print "\n"; - - $i = 0; - $var=true; - - while ($i < min($num,$conf->liste_limit)) - { - $obj = $db->fetch_object($resql); - - $var=!$var; - - print ''; - print ''; - print ""; - print ""; - print ''; - //Country - print ''; - //Type ent - print ''; - // Creation date - print ''; - // Level - print '"; - // Statut - print '"; - - print ''; - - // Extrafields - if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) - { - foreach($extrafields->attribute_list as $key => $val) - { - if ($val) - { - print ''; - } - } - } - // Hook fields - $parameters=array('obj' => $obj); - $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print ''; - - print ''; - - print "\n"; - $i++; - } - - if ($num > $conf->liste_limit || $page > 0) print_barre_liste('', $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords); - - print "
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print $form->select_country($search_country,'search_country','',0,'maxwidth100'); - print ''; - print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); - print ''; - print ''; - print ''; - $options_from = ''; // Generate in $options_from the list of each option sorted - foreach ($tab_level as $tab_level_sortorder => $tab_level_label) - { - $options_from .= ''; - } - array_reverse($tab_level, true); // Reverse the list - $options_to = ''; // Generate in $options_to the list of each option sorted in the reversed order - foreach ($tab_level as $tab_level_sortorder => $tab_level_label) - { - $options_to .= ''; - } - - // Print these two select - print $langs->trans("From").' '; - print ' '; - print $langs->trans("to").' '; - - print ''; - $arraystcomm=array(); - foreach($prospectstatic->cacheprospectstatus as $key => $val) - { - $arraystcomm[$val['id']]=$val['label']; - } - print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); - print ''; - print ' '; - print ''; - print $extrafields->showInputField($key, $crit, '', '', 'search_', 4); - print ''; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; - print ''; - print "
'; - $prospectstatic->id=$obj->socid; - $prospectstatic->name=$obj->name; - $prospectstatic->status=$obj->status; - $prospectstatic->code_client=$obj->code_client; - $prospectstatic->client=$obj->client; - $prospectstatic->fk_prospectlevel=$obj->fk_prospectlevel; - $prospectstatic->name_alias=$obj->name_alias; - print $prospectstatic->getNomUrl(1,'prospect'); - print '".$obj->zip."".$obj->town."'.$obj->departement.''; - $tmparray=getCountry($obj->fk_pays,'all'); - print $tmparray['label']; - print ''; - if (count($typenArray)==0) $typenArray = $formcompany->typent_array(1); - print $typenArray[$obj->typent_code]; - print ''.dol_print_date($db->jdate($obj->datec)).''; - print $prospectstatic->getLibProspLevel(); - print "'; - print $prospectstatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']); - print "'; - foreach($prospectstatic->cacheprospectstatus as $key => $val) - { - $titlealt='default'; - if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label']; - if ($obj->stcomm_id != $val['id']) print ''.img_action($titlealt,$val['code']).''; - } - print ''; - $paramkey='options_'.$key; - print $extrafields->showOutputField($key, $obj->$paramkey); - print ''; - print $prospectstatic->LibStatut($prospectstatic->status,5); - print '
"; - - print "
"; - - $db->free($resql); - - $parameters=array('sql' => $sql); - $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; -} -else -{ - dol_print_error($db); -} - - -llxFooter(); -$db->close(); diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 7adabcf819b..51cf8a9c7a7 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -302,7 +302,7 @@ class FormOther /** * Return select list for categories (to use in form search selectors) * - * @param int $type Type of categories (0=product, 1=suppliers, 2=customers, 3=members) + * @param int $type Type of categories (0=product, 1=supplier, 2=customer, 3=member, 4=contact) * @param integer $selected Preselected value * @param string $htmlname Name of combo list * @param int $nocateg Show also an entry "Not categorized" diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index ffcb21e6535..df0b9e46488 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -71,9 +71,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?action=create', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/soc.php?leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/prospect/list.php?leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/soc.php?leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/comm/list.php?leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?type=c&leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 510__+MAX_llx_menu__, 'companies', '', 509__+MAX_llx_menu__, '/societe/soc.php?leftmenu=customers&action=create&type=c', 'MenuNewCustomer', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); -- Third parties - Contacts insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 600__+MAX_llx_menu__, 'companies', 'contacts', 2__+MAX_llx_menu__, '/contact/list.php?leftmenu=contacts', 'ContactsAddresses', 0, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 42701456c6e..49c076de4c8 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -590,13 +590,13 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { $langs->load("commercial"); - $newmenu->add("/comm/prospect/list.php?leftmenu=prospects", $langs->trans("ListProspectsShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'prospects'); + $newmenu->add("/societe/list.php?type=p&leftmenu=prospects", $langs->trans("ListProspectsShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'prospects'); /* no more required, there is a filter that can do more - if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire); - if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire); - if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->rights->societe->lire); - if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire); - if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/comm/prospect/list.php?sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire); + if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=-1", $langs->trans("LastProspectDoNotContact"), 2, $user->rights->societe->lire); + if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=0", $langs->trans("LastProspectNeverContacted"), 2, $user->rights->societe->lire); + if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=1", $langs->trans("LastProspectToContact"), 2, $user->rights->societe->lire); + if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=2", $langs->trans("LastProspectContactInProcess"), 2, $user->rights->societe->lire); + if (empty($leftmenu) || $leftmenu=="prospects") $newmenu->add("/societe/list.php?type=p&sortfield=s.datec&sortorder=desc&begin=&search_stcomm=3", $langs->trans("LastProspectContactDone"), 2, $user->rights->societe->lire); */ $newmenu->add("/societe/soc.php?leftmenu=prospects&action=create&type=p", $langs->trans("MenuNewProspect"), 2, $user->rights->societe->creer); //$newmenu->add("/contact/list.php?leftmenu=customers&type=p", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); @@ -606,7 +606,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { $langs->load("commercial"); - $newmenu->add("/comm/list.php?leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers'); + $newmenu->add("/societe/list.php?type=c&leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers'); $newmenu->add("/societe/soc.php?leftmenu=customers&action=create&type=c", $langs->trans("MenuNewCustomer"), 2, $user->rights->societe->creer); //$newmenu->add("/contact/list.php?leftmenu=customers&type=c", $langs->trans("Contacts"), 2, $user->rights->societe->contact->lire); diff --git a/htdocs/index.php b/htdocs/index.php index 2e1d019d2e7..5db358aa34b 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -231,8 +231,9 @@ if (empty($user->societe_id)) "SuppliersInvoices", "ExpenseReports"); // Dashboard Link lines - $links=array(DOL_URL_ROOT.'/comm/list.php', - DOL_URL_ROOT.'/comm/prospect/list.php', + $links=array( + DOL_URL_ROOT.'/societe/list.php?type=c', + DOL_URL_ROOT.'/societe/list.php?type=p', DOL_URL_ROOT.'/societe/list.php?type=f', DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 86de804c6a1..ebe4b4c0342 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -143,13 +143,13 @@ else if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS)) { $statstring = ""; - $statstring.= ''.$langs->trans("Prospects").''.round($third['prospect']).''; + $statstring.= ''.$langs->trans("Prospects").''.round($third['prospect']).''; $statstring.= ""; } if (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS)) { $statstring.= ""; - $statstring.= ''.$langs->trans("Customers").''.round($third['customer']).''; + $statstring.= ''.$langs->trans("Customers").''.round($third['customer']).''; $statstring.= ""; } if (! empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS)) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 19301efd6e0..98795e27667 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -31,10 +31,12 @@ include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; $langs->load("companies"); $langs->load("customers"); $langs->load("suppliers"); +$langs->load("bills"); // Security check $socid = GETPOST('socid','int'); @@ -64,10 +66,14 @@ $search_country=GETPOST("search_country",'int'); $search_type_thirdparty=GETPOST("search_type_thirdparty",'int'); $search_type=GETPOST('search_type','alpha'); $search_status=GETPOST("search_status",'int'); +$search_level_from = GETPOST("search_level_from","alpha"); +$search_level_to = GETPOST("search_level_to","alpha"); +$search_stcomm=GETPOST('search_stcomm','int'); $type=GETPOST('type'); $optioncss=GETPOST('optioncss','alpha'); $mode=GETPOST("mode"); +$action=GETPOST('action'); $sortfield=GETPOST("sortfield",'alpha'); $sortorder=GETPOST("sortorder",'alpha'); @@ -116,6 +122,7 @@ if (($tmp = $langs->transnoentities("ProfId6".$mysoc->country_code)) && $tmp != if (!empty($conf->barcode->enabled)) $fieldstosearchall['s.barcode']='Gencod'; + /* * Actions */ @@ -126,6 +133,20 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +if (empty($reshook)) +{ + if ($action == 'setstcomm') + { + $object = new Client($db); + $result=$object->fetch(GETPOST('stcommsocid')); + $object->stcomm_id=dol_getIdFromCode($db, GETPOST('stcomm','alpha'), 'c_stcomm'); + $result=$object->set_commnucation_level($user); + if ($result < 0) setEventMessages($object->error,$object->errors,'errors'); + + $action=''; + } +} + // special search /*if ($mode == 'search') { @@ -176,20 +197,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; } */ - -/* - * View - */ - -$form=new Form($db); -$formother=new FormOther($db); -$companystatic=new Societe($db); -$formcompany=new FormCompany($db); - -$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty"),$help_url); - - // Do we click on purge search criteria ? if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { @@ -212,14 +219,18 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $search_country=''; $search_type_thirdparty=''; $search_status=''; + $search_stcomm=''; + $search_level_from=''; + $search_level_to=''; $search_array_options=array(); } if ($search_status=='') $search_status=1; // always display active thirdparty first + /* - * Mode List + * View */ /* @@ -230,13 +241,103 @@ if ($search_status=='') $search_status=1; // always display active thirdparty fi External user socid=x + Permission to see ALL customers => Can see only himself External user socid=x + No permission to see ALL customers => Can see only himself */ + +$form=new Form($db); +$formother=new FormOther($db); +$companystatic=new Societe($db); +$formcompany=new FormCompany($db); +$prospectstatic=new Client($db); +$prospectstatic->client=2; +$prospectstatic->loadCacheOfProspStatus(); + +$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; +llxHeader('',$langs->trans("ThirdParty"),$help_url); + + $title=$langs->trans("ListOfThirdParties"); if ($type == 'c' && (empty($search_type) || ($search_type == '1,3'))) $title=$langs->trans("ListOfCustomers"); if ($type == 'p' && (empty($search_type) || ($search_type == '2,3'))) $title=$langs->trans("ListOfProspects"); if ($type == 'f' && (empty($search_type) || ($search_type == '4'))) $title=$langs->trans("ListOfSuppliers"); -$sql = "SELECT s.rowid, s.nom as name, s.barcode, s.town, s.zip, s.datec, s.code_client, s.code_fournisseur, "; -$sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; +// If both parameters are set, search for everything BETWEEN them +if ($search_level_from != '' && $search_level_to != '') +{ + // Ensure that these parameters are numbers + $search_level_from = (int) $search_level_from; + $search_level_to = (int) $search_level_to; + + // If from is greater than to, reverse orders + if ($search_level_from > $search_level_to) + { + $tmp = $search_level_to; + $search_level_to = $search_level_from; + $search_level_from = $tmp; + } + + // Generate the SQL request + $sortwhere = '(sortorder BETWEEN '.$search_level_from.' AND '.$search_level_to.') AS is_in_range'; +} +// If only "from" parameter is set, search for everything GREATER THAN it +else if ($search_level_from != '') +{ + // Ensure that this parameter is a number + $search_level_from = (int) $search_level_from; + + // Generate the SQL request + $sortwhere = '(sortorder >= '.$search_level_from.') AS is_in_range'; +} +// If only "to" parameter is set, search for everything LOWER THAN it +else if ($search_level_to != '') +{ + // Ensure that this parameter is a number + $search_level_to = (int) $search_level_to; + + // Generate the SQL request + $sortwhere = '(sortorder <= '.$search_level_to.') AS is_in_range'; +} +// If no parameters are set, dont search for anything +else +{ + $sortwhere = '0 as is_in_range'; +} + +// Select every potentiels, and note each potentiels which fit in search parameters +dol_syslog('societe/list.php',LOG_DEBUG); +$sql = "SELECT code, label, sortorder, ".$sortwhere; +$sql.= " FROM ".MAIN_DB_PREFIX."c_prospectlevel"; +$sql.= " WHERE active > 0"; +$sql.= " ORDER BY sortorder"; + +$resql = $db->query($sql); +if ($resql) +{ + $tab_level = array(); + $search_levels = array(); + + while ($obj = $db->fetch_object($resql)) + { + // Compute level text + $level=$langs->trans($obj->code); + if ($level == $obj->code) $level=$langs->trans($obj->label); + + // Put it in the array sorted by sortorder + $tab_level[$obj->sortorder] = $level; + + // If this potentiel fit in parameters, add its code to the $search_levels array + if ($obj->is_in_range == 1) + { + $search_levels[] = '"'.preg_replace('[^A-Za-z0-9_-]', '', $obj->code).'"'; + } + } + + // Implode the $search_levels array so that it can be use in a "IN (...)" where clause. + // If no paramters was set, $search_levels will be empty + $search_levels = implode(',', $search_levels); +} +else dol_print_error($db); + +$sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.barcode, s.town, s.zip, s.datec, s.code_client, s.code_fournisseur, "; +$sql.= " st.libelle as stcomm, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4,"; $sql.= " s.fk_pays, s.tms as date_update, s.datec as date_creation,"; $sql.= " typent.code as typent_code"; @@ -291,6 +392,8 @@ if ($search_status!='') $sql .= " AND s.status = ".$db->escape($search_status); if (!empty($conf->barcode->enabled) && $search_barcode) $sql.= " AND s.barcode LIKE '%".$db->escape($search_barcode)."%'"; if ($search_country) $sql .= " AND s.fk_pays IN (".$search_country.')'; if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$search_type_thirdparty.')'; +if ($search_levels) $sql .= " AND s.fk_prospectlevel IN (".$search_levels.')'; +if ($search_stcomm != '' && $search_stcomm != -2) $sql.= natural_search("s.fk_stcomm",$search_stcomm,2); // Add where from extra fields foreach ($search_array_options as $key => $val) { @@ -348,6 +451,9 @@ if ($resql) if ($search_type_thirdparty != '') $param.='&search_type_thirdparty='.urlencode($search_type_thirdparty); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($search_status != '') $param.='&search_status='.urlencode($search_status); + if ($search_stcomm != '') $param.='&search_stcomm='.$search_stcomm; + if ($search_level_from != '') $param.='&search_level_from='.$search_level_from; + if ($search_level_to != '') $param.='&search_level_to='.$search_level_to; if ($type != '') $param.='&type='.urlencode($type); // Add $param from extra fields foreach ($search_array_options as $key => $val) @@ -400,7 +506,7 @@ if ($resql) require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; $moreforfilter.='
'; $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1); + $moreforfilter.=$formother->select_categories('customer',$search_categ,'search_categ',1); $moreforfilter.='
'; } // If the user can view prospects other than his' @@ -419,7 +525,7 @@ if ($resql) require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; $moreforfilter.='
'; $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1); + $moreforfilter.=$formother->select_categories('supplier',$search_categ,'search_categ',1); $moreforfilter.='
'; } } @@ -436,16 +542,21 @@ if ($resql) // Define list of fields to show into list $checkedcustomercode=(in_array($contextpage, array('thirdpartylist', 'customerlist', 'prospectlist')) ? 1 : 0); $checkedsuppliercode=(in_array($contextpage, array('supplierlist')) ? 1 : 0); - $checkedcustomeraccountcode=(in_array($contextpage, array('thirdpartylist', 'customerlist', 'prospectlist')) ? 1 : 0); + $checkedcustomeraccountcode=(in_array($contextpage, array('customerlist')) ? 1 : 0); $checkedsupplieraccountcode=(in_array($contextpage, array('supplierlist')) ? 1 : 0); $checkedtypetiers=1; + $checkedprofid1=0; + $checkedprofid2=0; + $checkedprofid3=0; $checkedprofid4=0; $checkedprofid5=0; $checkedprofid6=0; //$checkedprofid4=((($tmp = $langs->transnoentities("ProfId4".$mysoc->country_code)) && $tmp != "ProfId4".$mysoc->country_code && $tmp != '-') ? 1 : 0); //$checkedprofid5=((($tmp = $langs->transnoentities("ProfId5".$mysoc->country_code)) && $tmp != "ProfId5".$mysoc->country_code && $tmp != '-') ? 1 : 0); //$checkedprofid6=((($tmp = $langs->transnoentities("ProfId6".$mysoc->country_code)) && $tmp != "ProfId6".$mysoc->country_code && $tmp != '-') ? 1 : 0); - $arrayfields=array( + $checkprospectlevel=(in_array($contextpage, array('prospectlist')) ? 1 : 0); + $checkstcomm=(in_array($contextpage, array('prospectlist')) ? 1 : 0); + $arrayfields=array( 's.nom'=>array('label'=>$langs->trans("Company"), 'checked'=>1), 's.barcode'=>array('label'=>$langs->trans("Gencod"), 'checked'=>1, 'enabled'=>(! empty($conf->barcode->enabled))), 's.code_client'=>array('label'=>$langs->trans("CustomerCodeShort"), 'checked'=>$checkedcustomercode), @@ -456,12 +567,14 @@ if ($resql) 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>1), - 's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>1), - 's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>1), + 's.siren'=>array('label'=>$langs->trans("ProfId1Short"), 'checked'=>$checkedprofid1), + 's.siret'=>array('label'=>$langs->trans("ProfId2Short"), 'checked'=>$checkedprofid2), + 's.ape'=>array('label'=>$langs->trans("ProfId3Short"), 'checked'=>$checkedprofid3), 's.idprof4'=>array('label'=>$langs->trans("ProfId4Short"), 'checked'=>$checkedprofid4), 's.idprof5'=>array('label'=>$langs->trans("ProfId5Short"), 'checked'=>$checkedprofid5), 's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6), + 's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), + 's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm), 's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>200), 's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), @@ -488,7 +601,9 @@ if ($resql) if (! empty($arrayfields['s.idprof5']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof5","",$param,'class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.idprof6']['checked'])) print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"),$textprofid[4],1,0),$_SERVER["PHP_SELF"],"s.idprof6","",$param,'class="nowrap"',$sortfield,$sortorder); print_liste_field_titre(''); // type of customer - // Extra fields + if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) print_liste_field_titre($arrayfields['s.fk_prospectlevel']['label'],$_SERVER["PHP_SELF"],"s.fk_prospectlevel","",$param,'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['s.fk_stcomm']['checked'])) print_liste_field_titre($arrayfields['s.fk_stcomm']['label'],$_SERVER["PHP_SELF"],"s.fk_stcomm","",$param,'align="center"',$sortfield,$sortorder); + // Extra fields if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) { foreach($extrafields->attribute_list as $key => $val) @@ -623,6 +738,7 @@ if ($resql) print ''; print ''; } + // Type (customer/prospect/supplier) print ''; print ''; + + if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) + { + // Prospect level + print ''; + $options_from = ''; // Generate in $options_from the list of each option sorted + foreach ($tab_level as $tab_level_sortorder => $tab_level_label) + { + $options_from .= ''; + } + array_reverse($tab_level, true); // Reverse the list + $options_to = ''; // Generate in $options_to the list of each option sorted in the reversed order + foreach ($tab_level as $tab_level_sortorder => $tab_level_label) + { + $options_to .= ''; + } + + // Print these two select + print $langs->trans("From").' '; + print ' '; + print $langs->trans("to").' '; + + print ''; + } + + if (! empty($arrayfields['s.fk_stcomm']['checked'])) + { + // Prospect status + print ''; + $arraystcomm=array(); + foreach($prospectstatic->cacheprospectstatus as $key => $val) + { + $arraystcomm[$val['id']]=$val['label']; + } + print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2); + print ''; + } + // Fields from hook $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook @@ -671,18 +829,22 @@ if ($resql) { $obj = $db->fetch_object($resql); $var=!$var; + + $companystatic->id=$obj->rowid; + $companystatic->name=$obj->name; + $companystatic->canvas=$obj->canvas; + $companystatic->client=$obj->client; + $companystatic->status=$obj->status; + $companystatic->fournisseur=$obj->fournisseur; + $companystatic->code_client=$obj->code_client; + $companystatic->code_fournisseur=$obj->code_fournisseur; + $companystatic->fk_prospectlevel=$obj->fk_prospectlevel; + $companystatic->name_alias=$obj->name_alias; + print ""; if (! empty($arrayfields['s.nom']['checked'])) { print ""; - $companystatic->id=$obj->rowid; - $companystatic->name=$obj->name; - $companystatic->canvas=$obj->canvas; - $companystatic->client=$obj->client; - $companystatic->status=$obj->status; - $companystatic->fournisseur=$obj->fournisseur; - $companystatic->code_client=$obj->code_client; - $companystatic->code_fournisseur=$obj->code_fournisseur; print $companystatic->getNomUrl(1,'',100); print "\n"; } @@ -761,6 +923,7 @@ if ($resql) { print "".$obj->idprof6."\n"; } + // Type print ''; $s=''; if (($obj->client==1 || $obj->client==3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) @@ -782,6 +945,28 @@ if ($resql) } print $s; print ''; + if (! empty($arrayfields['s.fk_prospectlevel']['checked'])) + { + // Prospect level + print ''; + print $companystatic->getLibProspLevel(); + print ""; + } + if (! empty($arrayfields['s.fk_stcomm']['checked'])) + { + // Prospect status + print '
'; + print '
'.$companystatic->LibProspCommStatut($obj->stcomm_id,2,$prospectstatic->cacheprospectstatus[$obj->stcomm_id]['label']); + print '
-
'; + foreach($prospectstatic->cacheprospectstatus as $key => $val) + { + $titlealt='default'; + if (! empty($val['code']) && ! in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt=$val['label']; + if ($obj->stcomm_id != $val['id']) print ''.img_action($titlealt,$val['code']).''; + } + print '
'; + } + // Fields from hook $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook From f6d30d8b9e908c7d44ff9862ff7dbe19c990582c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Oct 2015 14:40:45 +0200 Subject: [PATCH 12/31] Fix: W3C no form into table --- htdocs/admin/mailman.php | 30 +++++++++++----- htdocs/admin/spip.php | 66 +++++++++++++++++++++-------------- htdocs/core/lib/admin.lib.php | 6 ++-- 3 files changed, 63 insertions(+), 39 deletions(-) diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index 686da7fc68c..e3aab979a41 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -99,7 +99,7 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con if (! isValidEmail($email)) { $langs->load("errors"); - setEventMessage($langs->trans("ErrorBadEMail",$email),'errors'); + setEventMessages($langs->trans("ErrorBadEMail",$email), null, 'errors'); } else { @@ -118,11 +118,11 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con if ($result < 0) { $error++; - setEventMessage($mailmanspip->error,'errors'); + setEventMessages($mailmanspip->error,$mailmanspip->errors,'errors'); } else { - setEventMessage($langs->trans("MailmanCreationSuccess")); + setEventMessages($langs->trans("MailmanCreationSuccess"), null); } } if ($action == 'testunsubscribe') @@ -131,11 +131,11 @@ if (($action == 'testsubscribe' || $action == 'testunsubscribe') && ! empty($con if ($result < 0) { $error++; - setEventMessage($mailmanspip->error,'errors'); + setEventMessages($mailmanspip->error,$mailmanspip->errors,'errors'); } else { - setEventMessage($langs->trans("MailmanDeletionSuccess")); + setEventMessages($langs->trans("MailmanDeletionSuccess"), null); } } } @@ -156,12 +156,15 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup' $head = mailmanspip_admin_prepare_head(); -dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user'); $var=true; if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { + print '
'; + + dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user'); + //$link=img_picto($langs->trans("Active"),'tick').' '; $link=''; //$link.=$langs->trans("Disable"); @@ -200,21 +203,30 @@ if (! empty($conf->global->ADHERENT_USE_MAILMAN)) }); '; - form_constantes($constantes,1); - + form_constantes($constantes,2); + print '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'
'; print '%LISTE%, %MAILMAN_ADMINPW%, %EMAIL%
'; + + dol_fiche_end(); + + print '
'; + + print ''; } else { + dol_fiche_head($head, 'mailman', $langs->trans("Setup"), 0, 'user'); + $link='
'; //$link.=img_$langs->trans("Activate") $link.=img_picto($langs->trans("Disabled"),'switch_off'); $link.=''; print load_fiche_titre($langs->trans('MailmanTitle'), $link,''); + + dol_fiche_end(); } -dol_fiche_end(); if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index e46d9b8f5b7..13d959eb38c 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -54,28 +54,30 @@ if ($action == 'update' || $action == 'add') $constname=GETPOST("constname"); $constvalue=GETPOST("constvalue"); - if (($constname=='ADHERENT_CARD_TYPE' || $constname=='ADHERENT_ETIQUETTE_TYPE') && $constvalue == -1) $constvalue=''; - if ($constname=='ADHERENT_LOGIN_NOT_REQUIRED') // Invert choice - { - if ($constvalue) $constvalue=0; - else $constvalue=1; - } + // Action mise a jour ou ajout d'une constante + if ($action == 'update' || $action == 'add') + { + foreach($_POST['constname'] as $key => $val) + { + $constname=$_POST["constname"][$key]; + $constvalue=$_POST["constvalue"][$key]; + $consttype=$_POST["consttype"][$key]; + $constnote=$_POST["constnote"][$key]; - if (in_array($constname,array('ADHERENT_MAIL_VALID','ADHERENT_MAIL_COTIS','ADHERENT_MAIL_RESIL'))) $constvalue=$_POST["constvalue".$constname]; - $consttype=$_POST["consttype"]; - $constnote=GETPOST("constnote"); - $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); - - if (! $res > 0) $error++; - - if (! $error) - { - setEventMessage($langs->trans("SetupSaved")); - } - else - { - setEventMessage($langs->trans("Error"),'errors'); - } + $res=dolibarr_set_const($db,$constname,$constvalue,$type[$consttype],0,$constnote,$conf->entity); + + if (! $res > 0) $error++; + } + + if (! $error) + { + setEventMessage($langs->trans("SetupSaved")); + } + else + { + setEventMessage($langs->trans("Error"),'errors'); + } + } } // Action activation d'un sous module du module adherent @@ -115,7 +117,6 @@ print load_fiche_titre($langs->trans("MailmanSpipSetup"),$linkback,'title_setup' $head = mailmanspip_admin_prepare_head(); -dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); $var=true; @@ -124,6 +125,10 @@ $var=true; */ if (! empty($conf->global->ADHERENT_USE_SPIP)) { + print '
'; + + dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); + //$link=img_picto($langs->trans("Active"),'tick').' '; $link=''; //$link.=$langs->trans("Disable"); @@ -139,21 +144,28 @@ if (! empty($conf->global->ADHERENT_USE_SPIP)) print load_fiche_titre($langs->trans('SPIPTitle'), $link, ''); print '
'; - form_constantes($constantes); - print '
'; + + form_constantes($constantes,2); + + dol_fiche_end(); + + print '
'; + + print ''; } else { + dol_fiche_head($head, 'spip', $langs->trans("Setup"), 0, 'user'); + $link='
'; //$link.=$langs->trans("Activate"); $link.=img_picto($langs->trans("Disabled"),'switch_off'); $link.=''; print load_fiche_titre($langs->trans('SPIPTitle'), $link, ''); + + dol_fiche_end(); } - -dol_fiche_end(); - llxFooter(); $db->close(); diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 3d887f1bd18..7b22a2e8dbe 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1053,7 +1053,7 @@ function complete_elementList_with_modules(&$elementList) * Show array with constants to edit * * @param array $tableau Array of constants - * @param int $strictw3c Respect W3C (no form into table) + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all * @return void */ function form_constantes($tableau,$strictw3c=0) @@ -1062,7 +1062,7 @@ function form_constantes($tableau,$strictw3c=0) $form = new Form($db); - if (! empty($strictw3c)) print "\n".'
'; + if (! empty($strictw3c) && $strictw3c == 1) print "\n".''; print ''; print ''; @@ -1199,7 +1199,7 @@ function form_constantes($tableau,$strictw3c=0) } print '
'; - if (! empty($strictw3c)) + if (! empty($strictw3c) && $strictw3c == 1) { print '
'; print "
\n"; From a01a85c3f6eb7afc589f7c666a2533647d8e9d32 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Oct 2015 15:13:02 +0200 Subject: [PATCH 13/31] FIX tag object_total_vat_x need x to be a string with unknown decimal lenght. Now use for x the real vat real with no more decimal (x = 20 or x = 8.5 or x = 5.99, ...) --- htdocs/core/class/commondocgenerator.class.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 41ae45ef638..24c2fe34a93 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -388,11 +388,16 @@ abstract class CommonDocGenerator // Add vat by rates foreach ($object->lines as $line) { + // $line->tva_tx format depends on database field accuraty, no reliable. This is kept for backward comaptibility if (empty($resarray[$array_key.'_total_vat_'.$line->tva_tx])) $resarray[$array_key.'_total_vat_'.$line->tva_tx]=0; $resarray[$array_key.'_total_vat_'.$line->tva_tx]+=$line->total_tva; $resarray[$array_key.'_total_vat_locale_'.$line->tva_tx]=price($resarray[$array_key.'_total_vat_'.$line->tva_tx]); + // $vatformated is vat without not expected chars (so 20, or 8.5 or 5.99 for example) + $vatformated=vatrate($line->tva_tx); + if (empty($resarray[$array_key.'_total_vat_'.$vatformated])) $resarray[$array_key.'_total_vat_'.$vatformated]=0; + $resarray[$array_key.'_total_vat_'.$vatformated]+=$line->total_tva; + $resarray[$array_key.'_total_vat_locale_'.$vatformated]=price($resarray[$array_key.'_total_vat_'.$vatformated]); } - // Retrieve extrafields if (is_array($object->array_options) && count($object->array_options)) { From 016dbd39ee6535bb8099a9b2a2d3ed31305e951f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Oct 2015 15:24:47 +0200 Subject: [PATCH 14/31] Fix sql phpunit regression --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 2 -- htdocs/install/mysql/tables/llx_user.sql | 2 +- htdocs/user/class/user.class.php | 10 +++++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 231b89ee507..accf65266c1 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -86,5 +86,3 @@ CREATE TABLE IF NOT EXISTS llx_establishment ( status tinyint DEFAULT 1 ) ENGINE=InnoDB; -ALTER TABLE llx_user ADD COLUMN employee tinyint DEFAULT 0 AFTER ref_int; - diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index c9673ceb360..e1fc421c911 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -26,7 +26,7 @@ create table llx_user ref_ext varchar(50), -- reference into an external system (not used by dolibarr) ref_int varchar(50), -- reference into an internal system (deprecated) - employee tinyint DEFAULT 0, -- 1 if user is an employee + employee tinyint DEFAULT 1, -- 1 if user is an employee datec datetime, tms timestamp, diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 066da9c18da..ae56be28aec 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -126,13 +126,17 @@ class User extends CommonObject { $this->db = $db; - // Preference utilisateur + // User preference $this->liste_limit = 0; $this->clicktodial_loaded = 0; + // For cache usage $this->all_permissions_are_loaded = 0; - $this->admin=0; - + + // Force some default values + $this->admin = 0; + $this->employee = 1; + $this->conf = new stdClass(); $this->rights = new stdClass(); $this->rights->user = new stdClass(); From 2cbfb69f9b70c851cd2e13a25010d91ab472f843 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 23 Oct 2015 15:28:14 +0200 Subject: [PATCH 15/31] Update template --- .../invoices/template_invoice.odt | Bin 25534 -> 37996 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/htdocs/install/doctemplates/invoices/template_invoice.odt b/htdocs/install/doctemplates/invoices/template_invoice.odt index e9cd7c836fb0363394d73d3579ca7f84cb33cb01..dad29a292efcae907c1af651f8caae0fba453ec1 100644 GIT binary patch delta 36631 zcmaf4<5%b1+s!q3GADOu+qP}je6x*DZnA5#ZQGMQ*|zO^=Jyvoug;rmt#j5nm-fE) z=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ad5(x`V^M_4lwnl!3o(Y3W_2Fc1iVe zAx#*y0W$$x7|l1Kw`)DkF&_H6G`{|{Dr;4W73Vb29|o4;MHVKh2we?3_Tw*wBu9mVjb zwNqG4pkQoR_8=tQFaw{C>^}6>^ocUAnhXxfa997LiLt~+L0>0;@oCcB0jW)bX z4`Aj`rUlfUTBjyH0V)8gKT83VB=u2Cr&=(fG zRVY@V^BYercrVj+S=Z(d4drCq!)V>8vQ2Aml+0xG4L~YQbSjJxS_$Ow2%;ua<(Kw=G}1KJv1hGD zqCVk$O+H|8Icwa~$ey^f>Wa!&`-Xfde)p?13`PQtjO<0u(v!UjlzZu#MPY}%e#WKO z-fJwqPPvV>6LGj0P9n}uXiGEPfaS9Tzbu};e}yOUg6 z7j8Lf`DQsLafe!|gFeHr9+0`&{{FO_n_9#s3uZ{8Wx*{XY$cf8VY?c}jA=H`r7+H4wdl02Jy z!qVtTN)5m@z_xmJ2&E^>fK)_(E?Pma&MGW@kul)Iijnb|Ag$9|^kVNCk$9e|zvy6u z>!bTH|5Jj2Na__N)J0ij6eU^z%-!L+MzOk_-A78m>?+}%>7F4AjSN1WryE#MRQcTr zQQtOSst}N&fR(UDT#sg@sn<@kF}h}QtZTAN6X5%E^kUKXdNGrQBG!I3DWgT2IA-A(|J4?6FE3~yKXg$r5$qgzHX0u%=qz0 z*H!$i*=i5|sWR3P=F-ZswjM+MPTB1tmjTjwDh0Cqc+0kZgIqJga%Cs3mu6Ao9yj@< zo^S_P`p}t?TSTSe+o0@CtX4X>25z08jnQ@_WNzhwpO^?$<#nDuyn_M$q)*C*k;1mv zOdIsA&%x`$tSA|aP<*U+t9J_B$|ia7E;S1gi61@&=TmdXFz=gd-ueV-l096qQIoPx zk!()k^{#v_!CD*Ryp>ldi1v Date: Sat, 24 Oct 2015 13:16:59 +0200 Subject: [PATCH 16/31] Fix php code not executed with some php version --- htdocs/theme/eldy/style.css.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 45ca3a5b728..1307304d1d6 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -699,7 +699,7 @@ div#tmenu_tooltip { display:none; - padding-: px; + padding-: px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 0fa988c16e8..4749d52f89c 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -731,7 +731,7 @@ div#tmenu_tooltip { display:none; - /* padding-: px; */ + /* padding-: px; */ } From 43c80bec7d81a61c4f38759e3232562a6826f9fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Oct 2015 13:52:35 +0200 Subject: [PATCH 17/31] A better responsive menu for very small screen --- htdocs/main.inc.php | 12 ++++-------- htdocs/theme/eldy/style.css.php | 21 +++++++++++++++++---- htdocs/theme/md/style.css.php | 20 +++++++++++++++++--- htdocs/user/class/user.class.php | 31 +++++++++++++++++++++---------- 4 files changed, 59 insertions(+), 25 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ffc7d7c4777..4ece8af95c2 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1485,14 +1485,10 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a // Add login user link $toprightmenu.=''; dol_fiche_end(); + + if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { $prodcustprice = new Productcustomerprice($db); From b88a28b660f6073416575c2370b69c7ea88366d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Oct 2015 19:45:41 +0200 Subject: [PATCH 21/31] Restore compatibility with old version --- htdocs/user/class/user.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 965ac2544b8..2addea47f87 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1862,6 +1862,7 @@ class User extends CommonObject $result = ''; $companylink = ''; + $link = ''; $label = '' . $langs->trans("User") . ''; $label.= '
'; @@ -1914,7 +1915,7 @@ class User extends CommonObject $link.= '>'; $linkend=''; - if (abs($withpictoimg) == 1) $result.='
'; + //if ($withpictoimg == -1) $result.='
'; $result.=$link; if ($withpictoimg) { @@ -1929,7 +1930,7 @@ class User extends CommonObject $result.='
'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'
'; } $result.=$linkend; - if (abs($withpictoimg) == 1) $result.='
'; + //if ($withpictoimg == -1) $result.='
'; $result.=$companylink; return $result; } From 9d26d0fa4d09bdd8289e7592d477628099c6cafa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Oct 2015 21:13:28 +0200 Subject: [PATCH 22/31] Restore compatibility with old version --- htdocs/core/class/html.form.class.php | 11 ++++++----- htdocs/user/class/user.class.php | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7b472b2a163..bc26812bd29 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5255,9 +5255,10 @@ class Form * @param int $caneditfield Add edit fields * @param string $cssclass CSS name to use on img for photo * @param int $genericifundef Use a generic image if no image avaiable + * @param int $addlinktofullsize Add link to fullsize image * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0,$addlinktofullsize=1) { global $conf,$langs; @@ -5303,15 +5304,15 @@ class Form $cache='0'; if ($file && file_exists($dir."/".$file)) { - $ret.=''; + if ($addlinktofullsize) $ret.=''; $ret.='Photo'; - $ret.=''; + if ($addlinktofullsize) $ret.=''; } else if ($altfile && file_exists($dir."/".$altfile)) { - $ret.=''; + if ($addlinktofullsize) $ret.=''; $ret.='Photo alt'; - $ret.=''; + if ($addlinktofullsize) $ret.=''; } else { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2addea47f87..ae985b22be5 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1922,7 +1922,7 @@ class User extends CommonObject $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"'; if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'
'; - else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto').'
'; + else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto',0,0).'
'; $result.=$picto; } if (abs($withpictoimg) != 2) From 461771d4885892f26df470ce5357785d491f2f93 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Oct 2015 21:13:28 +0200 Subject: [PATCH 23/31] Currency is on title only. --- htdocs/compta/bank/account.php | 8 ++++---- htdocs/core/class/html.form.class.php | 11 ++++++----- htdocs/user/class/user.class.php | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 500cf63b021..e3bc2a3fc2c 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -952,7 +952,7 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("CurrentBalance"); print ' '.$object->currency_code.''; - print ''.price($total, 0, $langs, 0, 0, -1, $object->currency_code).''; + print ''.price($total).''; print ' '; print ''; } else { @@ -961,9 +961,9 @@ if ($id > 0 || ! empty($ref)) if ($sep > 0) print ' '; // If we had at least one line in future else print $langs->trans("Total"); print ' '.$object->currency_code.''; - print ''.price($total_deb*-1, 0, $langs, 0, 0, -1, $object->currency_code).''; - print ''.price($total_cred, 0, $langs, 0, 0, -1, $object->currency_code).''; - print ''.price($total_cred-($total_deb*-1), 0, $langs, 0, 0, -1, $object->currency_code).''; + print ''.price($total_deb*-1).''; + print ''.price($total_cred).''; + print ''.price($total_cred-($total_deb*-1)).''; print ' '; print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7b472b2a163..bc26812bd29 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5255,9 +5255,10 @@ class Form * @param int $caneditfield Add edit fields * @param string $cssclass CSS name to use on img for photo * @param int $genericifundef Use a generic image if no image avaiable + * @param int $addlinktofullsize Add link to fullsize image * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0,$addlinktofullsize=1) { global $conf,$langs; @@ -5303,15 +5304,15 @@ class Form $cache='0'; if ($file && file_exists($dir."/".$file)) { - $ret.=''; + if ($addlinktofullsize) $ret.=''; $ret.='Photo'; - $ret.=''; + if ($addlinktofullsize) $ret.=''; } else if ($altfile && file_exists($dir."/".$altfile)) { - $ret.=''; + if ($addlinktofullsize) $ret.=''; $ret.='Photo alt'; - $ret.=''; + if ($addlinktofullsize) $ret.=''; } else { diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 2addea47f87..ae985b22be5 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1922,7 +1922,7 @@ class User extends CommonObject $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"'; if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'
'; - else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto').'
'; + else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto',0,0).'
'; $result.=$picto; } if (abs($withpictoimg) != 2) From 1b8234d9fe416d531d7951ead1ef830893c672d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 11:09:50 +0100 Subject: [PATCH 24/31] Bette behaviour for blind people --- htdocs/contact/class/contact.class.php | 11 +++++++++-- htdocs/core/boxes/box_contacts.php | 22 +++++++++++++++++----- htdocs/index.php | 4 ++-- htdocs/langs/en_US/companies.lang | 2 +- htdocs/societe/class/societe.class.php | 18 +++++++++++++++--- htdocs/user/class/user.class.php | 16 ++++++++++++++-- 6 files changed, 58 insertions(+), 15 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 9a887bf9fdb..723784d9a5d 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -908,7 +908,7 @@ class Contact extends CommonObject */ function getNomUrl($withpicto=0,$option='',$maxlen=0,$moreparam='') { - global $langs; + global $conf, $langs; $result=''; $label = '' . $langs->trans("ShowContact") . ''; @@ -923,7 +923,14 @@ class Contact extends CommonObject $label.= '
' . $langs->trans("Phone") . ': '.join(', ',$phonelist); $label.= '
' . $langs->trans("Address") . ': '.dol_format_address($this, 1, ' ', $langs); - $link = ''; + $link = 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowContact"); + $link.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $link.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $link.= ' class="classfortooltip">'; $linkend=''; if ($option == 'xxx') diff --git a/htdocs/core/boxes/box_contacts.php b/htdocs/core/boxes/box_contacts.php index 18a09af6ace..a1fc2768ba1 100644 --- a/htdocs/core/boxes/box_contacts.php +++ b/htdocs/core/boxes/box_contacts.php @@ -63,8 +63,9 @@ class box_contacts extends ModeleBoxes if ($user->rights->societe->lire) { $sql = "SELECT sp.rowid as id, sp.lastname, sp.firstname, sp.civility as civility_id, sp.datec, sp.tms, sp.fk_soc, sp.statut as status"; - $sql.= ", s.nom as socname"; - $sql.= ", s.code_client"; + $sql.= ", sp.address, sp.zip, sp.town, sp.phone, sp.phone_perso, sp.phone_mobile"; + $sql.= ", s.nom as socname, s.name_alias"; + $sql.= ", s.client, s.fournisseur, s.code_client, s.code_fournisseur"; $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON sp.fk_soc = s.rowid"; if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -93,10 +94,21 @@ class box_contacts extends ModeleBoxes $contactstatic->firstname=$objp->firstname; $contactstatic->civility_id=$objp->civility_id; $contactstatic->statut=$objp->status; - $societestatic->id = $objp->fk_soc; - $societestatic->code_client = $objp->code_client; + $contactstatic->phone_pro = $objp->phone; + $contactstatic->phone_perso = $objp->phone_perso; + $contactstatic->phone_mobile = $objp->phone_mobile; + $contactstatic->address = $objp->address; + $contactstatic->zip = $objp->zip; + $contactstatic->town = $objp->town; + + $societestatic->id = $objp->fk_soc; $societestatic->name = $objp->socname; - + $societestatic->name_alias = $objp->name_alias; + $societestatic->code_client = $objp->code_client; + $societestatic->code_fournisseur = $objp->code_fournisseur; + $societestatic->client = $objp->client; + $societestatic->fournisseur = $objp->fournisseur; + $this->info_box_contents[$line][] = array( 'td' => 'align="left"', 'text' => $contactstatic->getNomUrl(1), diff --git a/htdocs/index.php b/htdocs/index.php index 5db358aa34b..818da8f9ecd 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -103,7 +103,7 @@ print '
'; * Informations area */ -print ''; +print '
'; print ''; print ''; print ''; @@ -129,7 +129,7 @@ $langs->load("contracts"); if (empty($user->societe_id)) { print '
'; - print '
'.$langs->trans("Informations").'
'.$langs->trans("User").''.$user->getNomUrl(0).'
'; + print '
'; print ''; print ''; print ''; diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index e3fd6fadeec..3e93a48d7b5 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -305,7 +305,7 @@ ListOfCustomersContacts=List of customer contacts ListOfSuppliersContacts=List of supplier contacts ListOfCompanies=List of companies ListOfThirdParties=List of third parties -ShowCompany=Show company +ShowCompany=Show thirdparty ShowContact=Show contact ContactsAllShort=All (No filter) ContactType=Contact type diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 1f5f10c9178..fb99f819af2 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1824,10 +1824,13 @@ class Societe extends CommonObject } if (! empty($this->name)) + { $label.= '
' . $langs->trans('Name') . ': '. $this->name; - if (! empty($this->code_client)) + if (! empty($this->name_alias)) $label.=' ('.$this->name_alias.')'; + } + if (! empty($this->code_client) && $this->client) $label.= '
' . $langs->trans('CustomerCode') . ': '. $this->code_client; - if (! empty($this->code_fournisseur)) + if (! empty($this->code_fournisseur) && $this->fournisseur) $label.= '
' . $langs->trans('SupplierCode') . ': '. $this->code_fournisseur; if (! empty($this->logo)) @@ -1841,7 +1844,16 @@ class Societe extends CommonObject // Add type of canvas $link.=(!empty($this->canvas)?'&canvas='.$this->canvas:'').'"'; - $link.=($notooltip?'':' title="'.dol_escape_htmltag($label, 1).'" class="classfortooltip"'); + if (empty($notooltip)) + { + if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label=$langs->trans("ShowCompany"); + $link.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $link.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $link.=' class="classfortooltip"'; + } $link.='>'; $linkend=''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ae985b22be5..a165a735f84 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1911,7 +1911,17 @@ class User extends CommonObject } $link.= 'global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $langs->load("users"); + $label=$langs->trans("ShowUser"); + $link.=' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $link.= ' title="'.dol_escape_htmltag($label, 1).'"'; + $link.= ' class="classfortooltip'.($morecss?' '.$morecss:'').'"'; + } $link.= '>'; $linkend=''; @@ -1927,7 +1937,9 @@ class User extends CommonObject } if (abs($withpictoimg) != 2) { - $result.='
'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'
'; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; + $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen); + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; } $result.=$linkend; //if ($withpictoimg == -1) $result.=''; From 1261ad43a1d30bd3703083aad451bb9e4f52a6d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 18:15:37 +0100 Subject: [PATCH 25/31] NEW Can select which field to show into list of users. --- htdocs/societe/list.php | 44 ++--- htdocs/user/index.php | 426 ++++++++++++++++++++++++++++++---------- 2 files changed, 340 insertions(+), 130 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 98795e27667..0e102af33f9 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -338,8 +338,8 @@ else dol_print_error($db); $sql = "SELECT s.rowid, s.nom as name, s.name_alias, s.barcode, s.town, s.zip, s.datec, s.code_client, s.code_fournisseur, "; $sql.= " st.libelle as stcomm, s.fk_stcomm as stcomm_id, s.fk_prospectlevel, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; -$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4,"; -$sql.= " s.fk_pays, s.tms as date_update, s.datec as date_creation,"; +$sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4, s.fk_pays,"; +$sql.= " s.tms as date_update, s.datec as date_creation,"; $sql.= " typent.code as typent_code"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) if ($search_sale) $sql .= ", sc.fk_soc, sc.fk_user"; @@ -575,10 +575,10 @@ if ($resql) 's.idprof6'=>array('label'=>$langs->trans("ProfId6Short"), 'checked'=>$checkedprofid6), 's.fk_prospectlevel'=>array('label'=>$langs->trans("ProspectLevelShort"), 'checked'=>$checkprospectlevel), 's.fk_stcomm'=>array('label'=>$langs->trans("StatusProsp"), 'checked'=>$checkstcomm), - 's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>200), 's.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), 's.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - ); + 's.status'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + ); $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'.$langs->trans("DolibarrStateBoard").' 
'; @@ -618,9 +618,9 @@ if ($resql) $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (! empty($arrayfields['s.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); if (! empty($arrayfields['s.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"s.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['s.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"s.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['s.status']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"s.status","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; @@ -795,25 +795,25 @@ if ($resql) $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - if (! empty($arrayfields['s.status']['checked'])) - { - // Status - print ''; - } + // Date creation if (! empty($arrayfields['s.datec']['checked'])) { - // Date creation print ''; } + // Date modification if (! empty($arrayfields['s.tms']['checked'])) { - // Date modification print ''; } + // Status + if (! empty($arrayfields['s.status']['checked'])) + { + print ''; + } // Action column print ''; - } - if (! empty($arrayfields['s.datec']['checked'])) - { - // Date creation print ''; } + // Date modification if (! empty($arrayfields['s.tms']['checked'])) { - // Date modification print ''; + } + // Status + if (! empty($arrayfields['s.status']['checked'])) + { + print ''; } // Action column print ''; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 921697ade51..40fe8353093 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -47,6 +47,8 @@ $search_lastname=GETPOST('search_lastname','alpha'); $search_firstname=GETPOST('search_firstname','alpha'); $search_statut=GETPOST('search_statut','alpha'); $search_thirdparty=GETPOST('search_thirdparty','alpha'); +$search_supervisor=GETPOST('search_supervisor','alpha'); +$search_previousconn=GETPOST('search_previousconn','alpha'); $optioncss = GETPOST('optioncss','alpha'); if ($search_statut == '') $search_statut='1'; @@ -62,6 +64,14 @@ $limit = $conf->liste_limit; if (! $sortfield) $sortfield="u.login"; if (! $sortorder) $sortorder="ASC"; +// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array +$hookmanager->initHooks(array('userlist')); +$extrafields = new ExtraFields($db); + +// fetch optionals attributes and labels +$extralabels = $extrafields->fetch_name_optionals_label('user'); +$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_'); + $userstatic=new User($db); $companystatic = new Societe($db); $form = new Form($db); @@ -74,8 +84,35 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both $search_firstname=""; $search_statut=""; $search_thirdparty=""; + $search_supervisor=""; + $search_datelastlogin=""; + $search_datepreviouslogin=""; + $search_date_creation=""; + $search_date_update=""; } +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'u.login'=>"Login", + 'u.firstname'=>"Firstname", + 'u.lastname'=>"Lastname", + 'u.accountancy_code'=>"AccountancyCode", + 'u.email'=>"EMail", + 'u.note'=>"Note" +); + + +/* + * Actions + */ + +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + /* * View @@ -88,12 +125,17 @@ $buttonviewhierarchy='attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; +// Add fields from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON u.fk_soc = s.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u2 ON u.fk_user = u2.rowid"; @@ -106,14 +148,33 @@ else $sql.= " WHERE u.entity IN (".getEntity('user',1).")"; } if ($socid > 0) $sql.= " AND u.fk_soc = ".$socid; -if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user); +if ($search_user != '') $sql.=natural_search(array('u.login', 'u.lastname', 'u.firstname'), $search_user); +if ($search_supervisor > 0) $sql.= " AND u.fk_user = ".$search_supervisor; if ($search_thirdparty != '') $sql.=natural_search(array('s.nom'), $search_thirdparty); -if ($search_login != '') $sql.= natural_search("u.login", $search_login); -if ($search_lastname != '') $sql.= natural_search("u.lastname", $search_lastname); -if ($search_firstname != '') $sql.= natural_search("u.firstname", $search_firstname); +if ($search_login != '') $sql.= natural_search("u.login", $search_login); +if ($search_lastname != '') $sql.= natural_search("u.lastname", $search_lastname); +if ($search_firstname != '') $sql.= natural_search("u.firstname", $search_firstname); if ($search_statut != '' && $search_statut >= 0) $sql.= " AND (u.statut=".$search_statut.")"; -if ($sall) $sql.= natural_search(array('u.login', 'u.lastname', 'u.firstname', 'u.email', 'u.note'), $sall); +if ($sall) $sql.= natural_search($fieldstosearchall, $sall); +// Add where from extra fields +foreach ($search_array_options as $key => $val) +{ + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + $typ=$extrafields->attribute_type[$tmpkey]; + $mode=0; + if (in_array($typ, array('int'))) $mode=1; // Search on a numeric + if ($val && ( ($crit != '' && ! in_array($typ, array('select'))) || ! empty($crit))) + { + $sql .= natural_search('ef.'.$tmpkey, $crit, $mode); + } +} +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql.=$db->order($sortfield,$sortorder); +//$sql.= $db->plimit($conf->liste_limit+1, $offset); $result = $db->query($sql); if ($result) @@ -121,54 +182,153 @@ if ($result) $num = $db->num_rows($result); $i = 0; + $param=''; + if ($sall != '') $param.='&sall='.urlencode($sall); + if ($search_user != '') $param.="&search_user=".$search_user; + if ($search_login != '') $param.="&search_login=".$search_login; + if ($search_lastname != '') $param.="&search_lastname=".$search_lastname; + if ($search_firstname != '') $param.="&search_firstname=".$search_firstname; + if ($search_supervisor > 0) $param.="&search_supervisor=".$search_supervisor; + if ($search_statut != '') $param.="&search_statut=".$search_statut; + if ($optioncss != '') $param.='&optioncss='.$optioncss; + // Add $param from extra fields + foreach ($search_array_options as $key => $val) + { + $crit=$val; + $tmpkey=preg_replace('/search_options_/','',$key); + if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val); + } + + print ''."\n"; if ($optioncss != '') print ''; - - $param="search_user=".$search_user."&sall=".$sall; - $param.="&search_statut=".$search_statut; - if ($optioncss != '') $param.='&optioncss='.$optioncss; - + print ''; + print ''; + print ''; + print ''; + + if ($sall) + { + foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val); + print $langs->trans("FilterOnInto", $sall, join(', ',$fieldstosearchall)); + } + + $arrayfields=array( + 'u.login'=>array('label'=>$langs->trans("Login"), 'checked'=>1), + 'u.lastname'=>array('label'=>$langs->trans("Lastname"), 'checked'=>1), + 'u.firstname'=>array('label'=>$langs->trans("Firstname"), 'checked'=>1), + 'u.fk_soc'=>array('label'=>$langs->trans("Company"), 'checked'=>1), + 'u.entity'=>array('label'=>$langs->trans("Entity"), 'checked'=>1, 'enabled'=>(! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode))), + 'u.fk_user'=>array('label'=>$langs->trans("HierarchicalResponsible"), 'checked'=>1), + 'u.datelastlogin'=>array('label'=>$langs->trans("LastConnexion"), 'checked'=>1, 'position'=>100), + 'u.datepreviouslogin'=>array('label'=>$langs->trans("PreviousConnexion"), 'checked'=>0, 'position'=>110), + 'u.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), + 'u.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), + 'u.statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + ); + $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; + $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields print '
'; - print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); - print ''; print ''; print ''; + print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); + print ''; if ($type != '') print ''; @@ -971,24 +971,24 @@ if ($resql) $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; - // Status - if (! empty($arrayfields['s.status']['checked'])) + // Date creation + if (! empty($arrayfields['s.datec']['checked'])) { - print ''.$companystatic->getLibStatut(3).''; print dol_print_date($obj->date_creation, 'dayhour'); print ''; print dol_print_date($obj->date_update, 'dayhour'); print ''.$companystatic->getLibStatut(3).'
'; print ''; - print_liste_field_titre($langs->trans("Login"),$_SERVER['PHP_SELF'],"u.login",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("LastName"),$_SERVER['PHP_SELF'],"u.lastname",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("FirstName"),$_SERVER['PHP_SELF'],"u.firstname",$param,"","",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Company"),$_SERVER['PHP_SELF'],"u.fk_soc",$param,"","",$sortfield,$sortorder); - if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode)) - { - print_liste_field_titre($langs->trans("Entity"),$_SERVER['PHP_SELF'],"u.entity",$param,"","",$sortfield,$sortorder); - } - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER['PHP_SELF'],"u.datec",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("LastConnexion"),$_SERVER['PHP_SELF'],"u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("HierarchicalResponsible"),$_SERVER['PHP_SELF'],"u2.login",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER['PHP_SELF'],"u.statut",$param,"",'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); + if (! empty($arrayfields['u.login']['checked'])) print_liste_field_titre($langs->trans("Login"),$_SERVER['PHP_SELF'],"u.login",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.lastname']['checked'])) print_liste_field_titre($langs->trans("Lastname"),$_SERVER['PHP_SELF'],"u.lastname",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.firstname']['checked'])) print_liste_field_titre($langs->trans("FirstName"),$_SERVER['PHP_SELF'],"u.firstname",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.fk_soc']['checked'])) print_liste_field_titre($langs->trans("Company"),$_SERVER['PHP_SELF'],"u.fk_soc",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.entity']['checked'])) print_liste_field_titre($langs->trans("Entity"),$_SERVER['PHP_SELF'],"u.entity",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.fk_user']['checked'])) print_liste_field_titre($langs->trans("HierarchicalResponsible"),$_SERVER['PHP_SELF'],"u.fk_user",$param,"","",$sortfield,$sortorder); + if (! empty($arrayfields['u.datelastlogin']['checked'])) print_liste_field_titre($langs->trans("LastConnexion"),$_SERVER['PHP_SELF'],"u.datelastlogin",$param,"",'align="center"',$sortfield,$sortorder); + if (! empty($arrayfields['u.datepreviouslogin']['checked'])) print_liste_field_titre($langs->trans("PreviousConnexion"),$_SERVER['PHP_SELF'],"u.datepreviouslogin",$param,"",'align="center"',$sortfield,$sortorder); + // Extra fields + if (is_array($extrafields->attribute_list) && count($extrafields->attribute_list)) + { + foreach($extrafields->attribute_list as $key => $val) + { + if ($val) + { + if (! empty($arrayfields["ef.".$key]['checked'])) print_liste_field_titre($extralabels[$key],$_SERVER["PHP_SELF"],"ef.".$key,"",$param,"",$sortfield,$sortorder); + } + } + } + // Hook fields + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListTitle',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['u.datec']['checked'])) print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"u.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['u.tms']['checked'])) print_liste_field_titre($langs->trans("DateModificationShort"),$_SERVER["PHP_SELF"],"u.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); + if (! empty($arrayfields['u.statut']['checked'])) print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"u.statut","",$param,'align="center"',$sortfield,$sortorder); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); print "\n"; // Search bar - $colspan=3; - if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode)) $colspan++; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - // Status - print ''; - - print ''; + } + if (! empty($arrayfields['u.lastname']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.firstname']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.fk_soc']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.entity']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.fk_user']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.datelastlogin']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.datepreviouslogin']['checked'])) + { + print ''; + } + + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields); + $reshook=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + if (! empty($arrayfields['u.datec']['checked'])) + { + // Date creation + print ''; + } + if (! empty($arrayfields['u.tms']['checked'])) + { + // Date modification + print ''; + } + if (! empty($arrayfields['u.statut']['checked'])) + { + // Status + print ''; + } + // Action column + print ''; - + print "\n"; $user2=new User($db); $var=True; + //while ($i < min($num,$conf->liste_limit)) while ($i < $num) { $obj = $db->fetch_object($result); @@ -183,87 +343,137 @@ if ($result) $userstatic->societe_id=$obj->fk_soc; $userstatic->firstname=''; $userstatic->lastname=$obj->login; - + $li=$userstatic->getNomUrl(1,'',0,0,24,1); print ""; - print ''; - print ''; - print ''; - print "'; - + if (! empty($arrayfields['u.login']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.lastname']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.firstname']['checked'])) + { + print ''; + } + if (! empty($arrayfields['u.fk_soc']['checked'])) + { + print "'; + } // Multicompany enabled if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode)) { - print ''; + if (! empty($arrayfields['u.entity']['checked'])) + { + print ''; + } } - - // Date creation - print ''; - + // Supervisor + if (! empty($arrayfields['u.fk_user']['checked'])) + { + // Resp + print ''; + } + // Date last login - print ''; - - // Resp - print ''; + } + // Date previous login + if (! empty($arrayfields['u.datepreviouslogin']['checked'])) + { + print ''; + } + + // Fields from hook + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook=$hookmanager->executeHooks('printFieldListValue',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Date creation + if (! empty($arrayfields['u.datec']['checked'])) { - $user2->login=$obj->login2; - //$user2->lastname=$obj->lastname2; - //$user2->firstname=$obj->firstname2; - $user2->lastname=$user2->login; - $user2->firstname=''; - print $user2->getNomUrl(1); + print ''; } - print ''; + // Date modification + if (! empty($arrayfields['u.tms']['checked'])) + { + print ''; + } + // Status + if (! empty($arrayfields['u.statut']['checked'])) + { + $userstatic->statut=$obj->statut; + print ''; + } + // Action column + print ''; - // Statut - $userstatic->statut=$obj->statut; - print ''; - print ''; print "\n"; $i++; } + + $parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql); + $reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print "
 '; - print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); - print ''; + if (! empty($arrayfields['u.login']['checked'])) + { + print ''; + print ''; + print ''; + print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); + print ''; + print ''; print ''; print '
'; - print $li; - if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) - { - print img_picto($langs->trans("SuperAdministrator"),'redstar'); - } - else if ($obj->admin) - { - print img_picto($langs->trans("Administrator"),'star'); - } - print ''.ucfirst($obj->lastname).''.ucfirst($obj->firstname).'"; - if ($obj->fk_soc) - { - $companystatic->id=$obj->fk_soc; - $companystatic->name=$obj->name; - $companystatic->canvas=$obj->canvas; - print $companystatic->getNomUrl(1); - } - else if ($obj->ldap_sid) - { - print $langs->trans("DomainUser"); - } - else - { - print $langs->trans("InternalUser"); - } - print ''; + print $li; + if (! empty($conf->multicompany->enabled) && $obj->admin && ! $obj->entity) + { + print img_picto($langs->trans("SuperAdministrator"),'redstar'); + } + else if ($obj->admin) + { + print img_picto($langs->trans("Administrator"),'star'); + } + print ''.ucfirst($obj->lastname).''.ucfirst($obj->firstname).'"; + if ($obj->fk_soc) + { + $companystatic->id=$obj->fk_soc; + $companystatic->name=$obj->name; + $companystatic->canvas=$obj->canvas; + print $companystatic->getNomUrl(1); + } + else if ($obj->ldap_sid) + { + print $langs->trans("DomainUser"); + } + else + { + print $langs->trans("InternalUser"); + } + print ''; - if (! $obj->entity) - { - print $langs->trans("AllEntities"); - } - else - { - // $mc is defined in conf.class.php if multicompany enabled. - if (is_object($mc)) - { - $mc->getInfo($obj->entity); - print $mc->label; - } - } - print ''; + if (! $obj->entity) + { + print $langs->trans("AllEntities"); + } + else + { + // $mc is defined in conf.class.php if multicompany enabled. + if (is_object($mc)) + { + $mc->getInfo($obj->entity); + print $mc->label; + } + } + print ''.dol_print_date($db->jdate($obj->datec),"dayhour").''; + if ($obj->login2) + { + $user2->login=$obj->login2; + //$user2->lastname=$obj->lastname2; + //$user2->firstname=$obj->firstname2; + $user2->lastname=$user2->login; + $user2->firstname=''; + print $user2->getNomUrl(1); + } + print ''.dol_print_date($db->jdate($obj->datelastlogin),"dayhour").''; - if ($obj->login2) + if (! empty($arrayfields['u.datelastlogin']['checked'])) + { + print ''.dol_print_date($db->jdate($obj->datelastlogin),"dayhour").''.dol_print_date($db->jdate($obj->datepreviouslogin),"dayhour").''; + print dol_print_date($obj->date_creation, 'dayhour'); + print ''; + print dol_print_date($obj->date_update, 'dayhour'); + print ''.$userstatic->getLibStatut(3).''.$userstatic->getLibStatut(5).' 
"; print "\n"; $db->free($result); From b49d63c12f2389d310c03d9908f528feae4062a5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 19:31:13 +0100 Subject: [PATCH 26/31] NEW Show photo of user into user list. A new function getImageFileNameForSize was also introduced to choose image best size according to usage to save bandwith. --- htdocs/core/class/html.form.class.php | 39 ++++++++++++++++++++------ htdocs/core/lib/functions.lib.php | 30 ++++++++++++++++++++ htdocs/core/lib/images.lib.php | 4 +-- htdocs/theme/eldy/img/object_user.png | Bin 607 -> 651 bytes htdocs/user/class/user.class.php | 12 ++++---- htdocs/user/group/index.php | 2 +- htdocs/user/hierarchy.php | 8 ++++-- htdocs/user/index.php | 33 +++++++++++++++------- 8 files changed, 99 insertions(+), 29 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bc26812bd29..6bb8049f6f6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5254,11 +5254,11 @@ class Form * @param int $height Height of photo (auto if 0) * @param int $caneditfield Add edit fields * @param string $cssclass CSS name to use on img for photo - * @param int $genericifundef Use a generic image if no image avaiable + * @param string $imagesize 'mini', 'small' or '' (original) * @param int $addlinktofullsize Add link to fullsize image * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0,$addlinktofullsize=1) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='',$addlinktofullsize=1) { global $conf,$langs; @@ -5272,29 +5272,52 @@ class Form $dir=$conf->societe->multidir_output[$entity]; $smallfile=$object->logo; $smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile); - if (! empty($object->logo)) $file=$id.'/logos/thumbs/'.$smallfile; + if (! empty($object->logo)) + { + if ($imagesize == 'mini') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_mini'); + else if ($imagesize == 'small') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_small'); + else $file=$id.'/logos/thumbs/'.$smallfile; + } } else if ($modulepart=='contact') { $dir=$conf->societe->multidir_output[$entity].'/contact'; - $file=$id.'/photos/'.$object->photo; + if (! empty($object->photo)) + { + if ($imagesize == 'mini') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_mini'); + else if ($imagesize == 'small') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_small'); + else $file=$id.'/photos/'.$object->photo; + } } else if ($modulepart=='userphoto') { $dir=$conf->user->dir_output; - if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; + if (! empty($object->photo)) + { + //var_dump(getImageFileNameForSize($object->photo, '_mini')); + if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); + else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); + else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; + } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } else if ($modulepart=='memberphoto') { $dir=$conf->adherent->dir_output; - if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'invoice_supplier').'photos/'.$object->photo; + if (! empty($object->photo)) + { + if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_mini'); + else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); + else $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.$object->photo; + } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; - } else { + } + else + { $dir=$conf->$modulepart->dir_output; - if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.$object->photo; + if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 896cc0824d0..0750d1d24b0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5223,3 +5223,33 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) return $res; } + +/** + * Return the filename of file to get the thumbs + * + * @param string $file Original filename + * @param string $extName Extension to differenciate thumb file name ('', '_small', '_mini') + * @param string $extImgTarget Force image format for thumbs. Use '' to keep same extension than original image. + * @return string New file name + */ +function getImageFileNameForSize($file, $extName, $extImgTarget='') +{ + $dirName = dirname($file); + if ($dirName == '.') $dirName=''; + + $fileName = preg_replace('/(\.gif|\.jpeg|\.jpg|\.png|\.bmp)$/i','',$file); // On enleve extension quelquesoit la casse + $fileName = basename($fileName); + + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.jpg$/i',$file)?'.jpg':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.jpeg$/i',$file)?'.jpeg':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.gif$/i',$file)?'.gif':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.png$/i',$file)?'.png':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.bmp$/i',$file)?'.bmp':''); + + if (! $extImgTarget) return $file; + + $subdir=''; + if ($extName) $subdir = 'thumbs/'; + + return $dirName.$subdir.$fileName.$extName.$extImgTarget; // New filename for thumb +} diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 7e47f755a7e..e61dc22eeb0 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -483,7 +483,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ break; case IMAGETYPE_JPEG: // 2 $trans_colour = imagecolorallocatealpha($imgThumb, 255, 255, 255, 0); - $extImgTarget = (preg_match('/\.jpeg$/',$file)?'.jpeg':'.jpg'); + $extImgTarget = (preg_match('/\.jpeg$/i',$file)?'.jpeg':'.jpg'); $newquality=$quality; break; case IMAGETYPE_PNG: // 3 @@ -512,7 +512,7 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName='_small', $ $fileName = preg_replace('/(\.gif|\.jpeg|\.jpg|\.png|\.bmp)$/i','',$file); // On enleve extension quelquesoit la casse $fileName = basename($fileName); - $imgThumbName = $dirthumb.'/'.$fileName.$extName.$extImgTarget; // Chemin complet du fichier de la vignette + $imgThumbName = $dirthumb.'/'.getImageFileNameForSize($file, $extName, $extImgTarget); // Chemin complet du fichier de la vignette // Check if permission are ok //$fp = fopen($imgThumbName, "w"); diff --git a/htdocs/theme/eldy/img/object_user.png b/htdocs/theme/eldy/img/object_user.png index d26d8899ee80f1e4976260b265a3e7d75ebab61d..6452b94da6803fa598cfacb8c6bbe0b61232a0b1 100644 GIT binary patch delta 637 zcmV-@0)qYD1d9cb8Gi-<0019IEztk~00v@9M??Vs0RI60puMM)00009a7bBm000XU z000XU0RWnu7ytkO2XskIMF-ys84(~Mj1>7*0006QNkl$@!A=uV6o$WhXUdeO z&;o*Bi3^BOT@;w25H_+maigwWn7G0xa3@c|Gxz{J0S{nIG=I)Q)EO{dwa3(`vgG%fZGRr z-=|P0xDOw#?##}XUWLsNi?Fm@c`ITIz?(h8usW5uz#!C7~(IXgS+Dy^&{ zc51cSU&oD&wf=4N!o7vEo5|cy(lk~|0bqyp?yGt#;?)qPZnv$3cytbY2uWP@V=X5-X98Sh=(!ms-)DTbSoJ X@GAtI0IY4*00000NkvXXu0mjfk?J6G literal 607 zcmb`C&ubGw6vwx=AvHCnNGddzqJm)cVo^$q7qcXqge1h6Rtz3m7V$@{s9Or@s-SGu z+713-5yjDiFhbKzAmD&0OfSMvQT8CXD&k&R9MjA6)Zh<@v;GZ!c<=jt?;RfR&8AaF z{l1`2k|cjD8qNssbhEux=$=R4R)l#cW66m3i??^{?tMO1d@DwqFGWwPlH^-=vqdf+ zd@P1-XF|!4BvtQq{2BL%el4BIMuz+2@<2u&$i;{Axww+cXo`~0E1Ih4YTi^;O;dGE zH4R-ibi>ers7%BB2Lgr$OdYsD2y_Sx2oQ7;iV-xCs}#9lgeZnU7{($5gg}E}NH8VD zBm@ycDAXx|lv2wAmSx#Cwr$(7f#YDuaTrpWLl}dMA;vIcqP7@goFUFI=a6%ugmcQd z%{gyy+~Bm)5YcEho5dixD85cjW>UvR`~Q&2$={aP{5%#8W!pa~>z+;ioep)mIc>bvd1gCc@!dZp*SqI`po8=photo)) { $label.= '
'; - $label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip'); + $label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small'); $label.= '
'; } @@ -1932,13 +1932,14 @@ class User extends CommonObject $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"'; if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'
'; - else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto',0,0).'
'; + else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto', 0, 0, 'mini').'
'; $result.=$picto; } if (abs($withpictoimg) != 2) { if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; - $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen); + if ($mode == 'login') $result.=dol_trunc($this->login, $maxlen); + else $result.=$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen); if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $result.='
'; } $result.=$linkend; @@ -2398,7 +2399,7 @@ class User extends CommonObject $this->load_parentof(); // Init $this->users array - $sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.fk_soc, u.login, u.email, u.gender, u.admin, u.statut, u.entity"; // Distinct reduce pb with old tables with duplicates + $sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.fk_soc, u.login, u.email, u.gender, u.admin, u.statut, u.photo, u.entity"; // Distinct reduce pb with old tables with duplicates $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; if(! empty($conf->multicompany->enabled) && $conf->entity == 1 && (! empty($conf->multicompany->transverse_mode) || (! empty($user->admin) && empty($user->entity)))) { @@ -2429,6 +2430,7 @@ class User extends CommonObject $this->users[$obj->rowid]['email'] = $obj->email; $this->users[$obj->rowid]['gender'] = $obj->gender; $this->users[$obj->rowid]['admin'] = $obj->admin; + $this->users[$obj->rowid]['photo'] = $obj->photo; $i++; } } diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 058f3ac92e2..f515c8307e7 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -94,7 +94,7 @@ if ($resql) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("DateCreationShort"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; while ($i < $num) diff --git a/htdocs/user/hierarchy.php b/htdocs/user/hierarchy.php index a9aef6ed783..14b8ec4265b 100644 --- a/htdocs/user/hierarchy.php +++ b/htdocs/user/hierarchy.php @@ -82,6 +82,7 @@ foreach($fulltree as $key => $val) { $userstatic->id=$val['id']; $userstatic->ref=$val['label']; + $userstatic->login=$val['login']; $userstatic->firstname=$val['firstname']; $userstatic->lastname=$val['lastname']; $userstatic->statut=$val['statut']; @@ -90,6 +91,7 @@ foreach($fulltree as $key => $val) $userstatic->societe_id=$val['fk_soc']; $userstatic->admin=$val['admin']; $userstatic->entity=$val['entity']; + $userstatic->photo=$val['photo']; $entity=$val['entity']; $entitystring=''; @@ -111,7 +113,7 @@ foreach($fulltree as $key => $val) } } - $li=$userstatic->getNomUrl(1,'',0,1); + $li=$userstatic->getNomUrl(-1,'',0,1); if (! empty($conf->multicompany->enabled) && $userstatic->admin && ! $userstatic->entity) { $li.=img_picto($langs->trans("SuperAdministrator"),'redstar'); @@ -121,12 +123,12 @@ foreach($fulltree as $key => $val) $li.=img_picto($langs->trans("Administrator"),'star'); } $li.=' ('.$val['login'].($entitystring?' - '.$entitystring:'').')'; - + $data[] = array( 'rowid'=>$val['rowid'], 'fk_menu'=>$val['fk_user'], 'statut'=>$val['statut'], - 'entry'=>'
'.$li.''.$userstatic->getLibStatut(5).'
' + 'entry'=>'
'.$li.''.$userstatic->getLibStatut(3).'
' ); } diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 40fe8353093..7688cadbe05 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -124,11 +124,11 @@ $buttonviewhierarchy='
attribute_list as $key => $val) $sql.=",ef.".$key.' as options_'.$key; @@ -341,10 +341,11 @@ if ($result) $userstatic->email=$obj->email; $userstatic->gender=$obj->gender; $userstatic->societe_id=$obj->fk_soc; - $userstatic->firstname=''; - $userstatic->lastname=$obj->login; + $userstatic->firstname=$obj->firstname; + $userstatic->lastname=$obj->lastname; + $userstatic->photo=$obj->photo; - $li=$userstatic->getNomUrl(1,'',0,0,24,1); + $li=$userstatic->getNomUrl(-1,'',0,0,24,1,'login'); print ""; if (! empty($arrayfields['u.login']['checked'])) @@ -418,12 +419,24 @@ if ($result) print ''; if ($obj->login2) { + $user2->id=$obj->id2; $user2->login=$obj->login2; - //$user2->lastname=$obj->lastname2; - //$user2->firstname=$obj->firstname2; - $user2->lastname=$user2->login; - $user2->firstname=''; - print $user2->getNomUrl(1); + $user2->lastname=$obj->lastname2; + $user2->firstname=$obj->firstname2; + $user2->gender=$obj->gender2; + $user2->photo=$obj->photo2; + $user2->admin=$obj->admin2; + $user2->email=$obj->email2; + $user2->societe_id=$obj->fk_soc2; + print $user2->getNomUrl(-1,'',0,0,24,0,''); + if (! empty($conf->multicompany->enabled) && $obj->admin2 && ! $obj->entity2) + { + print img_picto($langs->trans("SuperAdministrator"),'redstar'); + } + else if ($obj->admin2) + { + print img_picto($langs->trans("Administrator"),'star'); + } } print ''; } From 48ed8d440869b64f532c079055660bbb42fefe8b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 19:42:00 +0100 Subject: [PATCH 27/31] FIX The thumb of user into top menu was using the image in full size. This make a large download at each page call. We must use the mini thumbs. --- htdocs/core/class/html.form.class.php | 10 +++++++-- htdocs/core/lib/functions.lib.php | 29 +++++++++++++++++++++++++++ htdocs/main.inc.php | 2 +- htdocs/user/class/user.class.php | 5 +++-- 4 files changed, 41 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b75bd01d2aa..9b0ef17b465 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5134,10 +5134,11 @@ class Form * @param int $width Width of photo * @param int $height Height of photo (auto if 0) * @param int $caneditfield Add edit fields + * @param string $imagesize 'mini', 'small' or '' (original) * @param string $cssclass CSS name to use on img for photo * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin') + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='') { global $conf,$langs; @@ -5156,7 +5157,12 @@ class Form else if ($modulepart=='userphoto') { $dir=$conf->user->dir_output; - if ($object->photo) $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; + if (! empty($object->photo)) + { + if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); + else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); + else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; + } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 290cdb2300b..04c2c02a7d5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5118,3 +5118,32 @@ function natural_search($fields, $value, $mode=0, $nofirstand=0) return $res; } +/** + * Return the filename of file to get the thumbs + * + * @param string $file Original filename + * @param string $extName Extension to differenciate thumb file name ('', '_small', '_mini') + * @param string $extImgTarget Force image format for thumbs. Use '' to keep same extension than original image. + * @return string New file name + */ +function getImageFileNameForSize($file, $extName, $extImgTarget='') +{ + $dirName = dirname($file); + if ($dirName == '.') $dirName=''; + + $fileName = preg_replace('/(\.gif|\.jpeg|\.jpg|\.png|\.bmp)$/i','',$file); // On enleve extension quelquesoit la casse + $fileName = basename($fileName); + + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.jpg$/i',$file)?'.jpg':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.jpeg$/i',$file)?'.jpeg':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.gif$/i',$file)?'.gif':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.png$/i',$file)?'.png':''); + if (empty($extImgTarget)) $extImgTarget = (preg_match('/\.bmp$/i',$file)?'.bmp':''); + + if (! $extImgTarget) return $file; + + $subdir=''; + if ($extName) $subdir = 'thumbs/'; + + return $dirName.$subdir.$fileName.$extName.$extImgTarget; // New filename for thumb +} diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 51147a03a9c..92d421d42cb 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1443,7 +1443,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a // User photo $toprightmenu.='
'; // Login name with tooltip diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e375a3c3d80..4459dfc3fc0 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1813,14 +1813,15 @@ class User extends CommonObject * @param int $width Width of image * @param int $height Height of image * @param string $cssclass Force a css class + * @param string $imagesize 'mini', 'small' or '' (original) * @return string String with URL link */ - function getPhotoUrl($width, $height, $cssclass='') + function getPhotoUrl($width, $height, $cssclass='', $imagesize='') { $result=''; $result.=''; - $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass); + $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass, $imagesize); $result.=''; return $result; From d7761ece58ea0cfaf8ede926b3e3a5dc42427cdd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 19:42:54 +0100 Subject: [PATCH 28/31] FIX The thumb of user into top menu was using the image in full size. This make a large download at each page call. We must use the mini thumbs. --- htdocs/core/class/html.form.class.php | 3 +-- htdocs/user/class/user.class.php | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6bb8049f6f6..a192b54c200 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5258,7 +5258,7 @@ class Form * @param int $addlinktofullsize Add link to fullsize image * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='',$addlinktofullsize=1) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1) { global $conf,$langs; @@ -5294,7 +5294,6 @@ class Form $dir=$conf->user->dir_output; if (! empty($object->photo)) { - //var_dump(getImageFileNameForSize($object->photo, '_mini')); if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index dd63a144226..e281f4002f3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1825,14 +1825,15 @@ class User extends CommonObject * @param int $width Width of image * @param int $height Height of image * @param string $cssclass Force a css class + * @param string $imagesize 'mini', 'small' or '' (original) * @return string String with URL link */ - function getPhotoUrl($width, $height, $cssclass='') + function getPhotoUrl($width, $height, $cssclass='', $imagesize='') { $result=''; $result.=''; - $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass); + $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass, $imagesize); $result.=''; return $result; From 24732cf454405793f35ddae77d02f343bb4824bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 20:01:39 +0100 Subject: [PATCH 29/31] Fix to avoid duplicate tooltip --- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/user/class/user.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index e828117327b..77437667c33 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -1575,7 +1575,7 @@ class Adherent extends CommonObject $picto='user'; - if ($withpicto) $result.=($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); + if ($withpicto) $result.=($link.img_object('', $picto, 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result.=' '; $result.=$link.($maxlen?dol_trunc($this->ref,$maxlen):$this->ref).$linkend; return $result; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e281f4002f3..d4358bb2b0a 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1845,7 +1845,7 @@ class User extends CommonObject * * @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo) * @param string $option On what the link point to - * @param integer $infologin Add connection info to the tooltip + * @param integer $infologin Add complete info tooltip * @param integer $notooltip 1=Disable tooltip on picto and name * @param int $maxlen Max length of visible user name * @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user From 54883f2d84c788182fadf10a4c11f1bcf990b604 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 20:14:57 +0100 Subject: [PATCH 30/31] FIX Bad picto for expense report --- htdocs/expensereport/class/expensereport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 920c6aa16d7..0dba68b5b5c 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1534,7 +1534,7 @@ class ExpenseReport extends CommonObject $response->warning_delay=$conf->expensereport->payment->warning_delay/60/60/24; $response->label=$langs->trans("ExpenseReportsToPay"); $response->url=DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&statut=5'; - $response->img=img_object($langs->trans("ExpenseReports"),"user"); + $response->img=img_object($langs->trans("ExpenseReports"),"trip"); while ($obj=$this->db->fetch_object($resql)) { From 9a4b62c279dc0c16c1457c787ea0c7a5fdeb67a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 25 Oct 2015 20:15:52 +0100 Subject: [PATCH 31/31] NEW Introduce use of cache for thumbs images of users --- htdocs/core/class/html.form.class.php | 27 ++++++++++++++++----------- htdocs/user/class/user.class.php | 4 ++-- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a192b54c200..5f714a85bcd 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5256,9 +5256,10 @@ class Form * @param string $cssclass CSS name to use on img for photo * @param string $imagesize 'mini', 'small' or '' (original) * @param int $addlinktofullsize Add link to fullsize image + * @param int $cache 1=Accept to use image in cache * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1, $cache=0) { global $conf,$langs; @@ -5274,8 +5275,8 @@ class Form $smallfile=preg_replace('/(\.png|\.gif|\.jpg|\.jpeg|\.bmp)/i','_small\\1',$smallfile); if (! empty($object->logo)) { - if ($imagesize == 'mini') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_mini'); - else if ($imagesize == 'small') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_small'); + if ((string) $imagesize == 'mini') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_mini'); + else if ((string) $imagesize == 'small') $file=$id.'/logos/thumbs/'.getImageFileNameForSize($object->logo, '_small'); else $file=$id.'/logos/thumbs/'.$smallfile; } } @@ -5284,8 +5285,8 @@ class Form $dir=$conf->societe->multidir_output[$entity].'/contact'; if (! empty($object->photo)) { - if ($imagesize == 'mini') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_mini'); - else if ($imagesize == 'small') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_small'); + if ((string) $imagesize == 'mini') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_mini'); + else if ((string) $imagesize == 'small') $file=$id.'/photos/thumbs/'.getImageFileNameForSize($object->photo, '_small'); else $file=$id.'/photos/'.$object->photo; } } @@ -5294,8 +5295,8 @@ class Form $dir=$conf->user->dir_output; if (! empty($object->photo)) { - if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); - else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); + if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); + else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility @@ -5306,8 +5307,8 @@ class Form $dir=$conf->adherent->dir_output; if (! empty($object->photo)) { - if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_mini'); - else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); + if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_mini'); + else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, 'member').'photos/'.$object->photo; } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility @@ -5316,14 +5317,18 @@ class Form else { $dir=$conf->$modulepart->dir_output; - if (! empty($object->photo)) $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; + if (! empty($object->photo)) + { + if ((string) $imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_mini'); + else if ((string) $imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.getImageFileNameForSize($object->photo, '_small'); + else $file=get_exdir($id, 2, 0, 0, $object, $modulepart).'photos/'.$object->photo; + } if (! empty($conf->global->MAIN_OLD_IMAGE_LINKS)) $altfile=$object->id.".jpg"; // For backward compatibility $email=$object->email; } if ($dir) { - $cache='0'; if ($file && file_exists($dir."/".$file)) { if ($addlinktofullsize) $ret.=''; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index d4358bb2b0a..f16af2ee72d 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1886,7 +1886,7 @@ class User extends CommonObject if (! empty($this->photo)) { $label.= '
'; - $label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small'); + $label.= Form::showphoto('userphoto', $this, 80, 0, 0, 'photowithmargin photologintooltip', 'small', 0, 1); $label.= '
'; } @@ -1933,7 +1933,7 @@ class User extends CommonObject $paddafterimage=''; if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"'; if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'
'; - else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto', 0, 0, 'mini').'
'; + else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto', 'mini', 0, 1).'
'; $result.=$picto; } if (abs($withpictoimg) != 2)