diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 7b1c94de1ec..25ada4d2d89 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005-2020 Laurent Destailleur + * Copyright (C) 2005-2021 Laurent Destailleur * Copyright (C) 2011-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify @@ -20,7 +20,7 @@ /** * \file htdocs/admin/clicktodial.php * \ingroup clicktodial - * \brief Page to setup module clicktodial + * \brief Page to setup module ClickToDial */ require '../main.inc.php'; @@ -99,7 +99,12 @@ print ''; -print $langs->trans("Example").':
http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__'; +print '
'; +print ''; +print $langs->trans("Example").':
'; +print 'http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__
'; +print 'sip:__PHONETO__@my.sip.server'; +print '
'; //if (! empty($user->clicktodial_url)) //{ diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 8b5f757ad0e..78d139bb764 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2594,9 +2594,14 @@ if ($action == 'create') { } // Close as accepted/refused - if ($object->statut == Propal::STATUS_VALIDATED && $usercanclose) { - print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; - print '>'.$langs->trans('SetAcceptedRefused').''; + if ($object->statut == Propal::STATUS_VALIDATED) { + if ($usercanclose) { + print 'global->MAIN_JUMP_TAG) ? '' : '#close').'"'; + print '>'.$langs->trans('SetAcceptedRefused').''; + } else { + print ''.$langs->trans('SetAcceptedRefused').''; + } } // Clone diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 1b0b57afc7a..7a05a5b2f64 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -229,9 +229,6 @@ if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $permissiontosendbymail = $user->rights->propale->lire; } - - - /* * Actions */ diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index d2c6a9bd643..00653473cba 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -5393,7 +5393,7 @@ if ($action == 'create') { } // Create a credit note - if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate) { + if (($object->type == Facture::TYPE_STANDARD || ($object->type == Facture::TYPE_DEPOSIT && empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) || $object->type == Facture::TYPE_PROFORMA) && $object->statut > 0 && $usercancreate) { if (!$objectidnext) { print ''.$langs->trans("CreateCreditNote").''; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5467490ea0e..4b38de413e9 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6254,10 +6254,12 @@ abstract class CommonObject $this->array_options["options_".$key] = price2num($this->array_options["options_".$key]); break; case 'date': - $this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]); - break; case 'datetime': - $this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]); + if (empty($this->array_options["options_".$key])) { + $this->array_options["options_".$key] = null; + } else { + $this->array_options["options_".$key] = $this->db->idate($this->array_options["options_".$key]); + } break; /* case 'link': @@ -6305,7 +6307,11 @@ abstract class CommonObject } if ($linealreadyfound) { - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element."_extrafields SET ".$key." = '".$this->db->escape($this->array_options["options_".$key])."'"; + if ($this->array_options["options_".$key] === null) { + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element."_extrafields SET ".$key." = null"; + } else { + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element."_extrafields SET ".$key." = '".$this->db->escape($this->array_options["options_".$key])."'"; + } $sql .= " WHERE fk_object = ".$this->id; } else { $result = $this->insertExtraFields('', $user); diff --git a/htdocs/core/modules/modClickToDial.class.php b/htdocs/core/modules/modClickToDial.class.php index f28659bbd5d..18f1e6befeb 100644 --- a/htdocs/core/modules/modClickToDial.class.php +++ b/htdocs/core/modules/modClickToDial.class.php @@ -18,7 +18,7 @@ /** * \defgroup clicktodial Module clicktodial - * \brief Module pour gerer l'appel automatique + * \brief Module to manage a ClickToDial system * \file htdocs/core/modules/modClickToDial.class.php * \ingroup clicktodial * \brief Description and activation file for the module Click to Dial @@ -46,7 +46,8 @@ class modClickToDial extends DolibarrModules $this->family = "interface"; // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) $this->name = preg_replace('/^mod/i', '', get_class($this)); - $this->description = "Gestion du Click To Dial"; + $this->description = "Integration of a ClickToDial system (Asterisk, ...)"; + $this->descriptionlong = "Support a Click To Dial feature with a SIP system. When clicking on a phone number, your phone system automatically call the callee."; $this->version = 'dolibarr'; // 'development' or 'experimental' or 'dolibarr' or version diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index c0339c28fc4..3f7e1616aff 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -354,6 +354,15 @@ if ($outputalsopricetotalwithtax) { } if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines') { + + $situationinvoicelinewithparent = 0; + if ($line->fk_prev_id != null && in_array($object->element, array('facture', 'facturedet'))) { + if ($object->type == $object::TYPE_SITUATION) { // The constant TYPE_SITUATION exists only for object invoice + // Set constant to disallow editing during a situation cycle + $situationinvoicelinewithparent = 1; + } + } + print ''; $coldisplay++; if (($line->info_bits & 2) == 2 || !empty($disableedit)) { @@ -365,7 +374,7 @@ if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines') { print ''; $coldisplay++; - if (($line->fk_prev_id == null) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation + if (!$situationinvoicelinewithparent && empty($disableremove)) { // For situation invoice, deletion is not possible if there is a parent company. print 'id.'">'; print img_delete(); print ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index daa943ffee9..f315661b90c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3017,13 +3017,13 @@ class CommandeFournisseur extends CommonOrder $response->warning_delay = $conf->commande->fournisseur->warning_delay / 60 / 60 / 24; $response->label = $langs->trans("SuppliersOrdersToProcess"); $response->labelShort = $langs->trans("Opened"); - $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?search_status=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img = img_object('', "order"); if ($mode === 'awaiting') { $response->label = $langs->trans("SuppliersOrdersAwaitingReception"); $response->labelShort = $langs->trans("AwaitingReception"); - $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3,4&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?search_status=3,4&mainmenu=commercial&leftmenu=orders_suppliers'; } while ($obj = $this->db->fetch_object($resql)) { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index bf8e53e8b82..d1946cc9b4c 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1407,7 +1407,7 @@ if ($resql) { // Type ent if (!empty($arrayfields['typent.code']['checked'])) { print ''; - if (count($typenArray) == 0) { + if (empty($typenArray)) { $typenArray = $formcompany->typent_array(1); } print $typenArray[$obj->typent_code]; diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index c62185d5f2a..ece1f9c9ec7 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -117,7 +117,7 @@ $search_month_end = GETPOST('search_month_end', 'int'); $search_year_end = GETPOST('search_year_end', 'int'); $search_employee = GETPOST('search_employee', 'int'); $search_valideur = GETPOST('search_valideur', 'int'); -$search_status = GETPOST('search_status', 'int'); +$search_status = GETPOSTISSET('search_status') ? GETPOST('search_status', 'int') : GETPOST('search_statut', 'int'); $search_type = GETPOST('search_type', 'int'); // Initialize technical objects diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index cc7e207ad4c..551fb3bd8c1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1779,7 +1779,7 @@ ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
__PHONETO__ that will be replaced with the phone number of person to call
__PHONEFROM__ that will be replaced with phone number of calling person (yours)
__LOGIN__ that will be replaced with clicktodial login (defined on user card)
__PASS__ that will be replaced with clicktodial password (defined on user card). ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers -ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. +ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface, installed on the same computer as the browser, and called when you click on a link starting with "tel:" in your browser. If you need link that start with "sip:" or a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### CashDesk=Point of Sale CashDeskSetup=Point of Sales module setup diff --git a/htdocs/langs/en_US/salaries.lang b/htdocs/langs/en_US/salaries.lang index 6b4fdc94163..504f0fbcc16 100644 --- a/htdocs/langs/en_US/salaries.lang +++ b/htdocs/langs/en_US/salaries.lang @@ -17,8 +17,8 @@ TJM=Average daily rate CurrentSalary=Current salary THMDescription=This value may be used to calculate the cost of time consumed on a project entered by users if module project is used TJMDescription=This value is currently for information only and is not used for any calculation -LastSalaries=Latest %s salary payments -AllSalaries=All salary payments +LastSalaries=Latest %s salaries +AllSalaries=All salaries SalariesStatistics=Salary statistics -# Export SalariesAndPayments=Salaries and payments +ConfirmDeleteSalaryPayment=Do you want to delete this salary payment ? \ No newline at end of file diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index a14db3882b0..841ee0f3daf 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -97,8 +97,8 @@ LoginToCreate=Login to create NameToCreate=Name of third party to create YourRole=Your roles YourQuotaOfUsersIsReached=Your quota of active users is reached ! -NbOfUsers=No. of users -NbOfPermissions=No. of permissions +NbOfUsers=Number of users +NbOfPermissions=Number of permissions DontDowngradeSuperAdmin=Only a superadmin can downgrade a superadmin HierarchicalResponsible=Supervisor HierarchicView=Hierarchical view diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 115844c916d..6c08d75d9cf 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -672,7 +672,7 @@ class Mo extends CommonObject if ($line->qty_frozen) { $moline->qty = $line->qty; // Qty to consume does not depends on quantity to produce } else { - $moline->qty = price2num(($line->qty / $bom->qty) * $this->qty / $line->efficiency, 'MS'); // Calculate with Qty to produce and more presition + $moline->qty = price2num(($line->qty / ( ! empty($bom->qty) ? $bom->qty : 1 ) ) * $this->qty / ( ! empty($line->efficiency) ? $line->efficiency : 1 ), 'MS'); // Calculate with Qty to produce and more presition } if ($moline->qty <= 0) { $error++; diff --git a/htdocs/mrp/tpl/originproductline.tpl.php b/htdocs/mrp/tpl/originproductline.tpl.php index fb1c1c0c1ee..478c6504979 100644 --- a/htdocs/mrp/tpl/originproductline.tpl.php +++ b/htdocs/mrp/tpl/originproductline.tpl.php @@ -26,7 +26,7 @@ if (!is_object($form)) { $form = new Form($db); } -$qtytoconsumeforline = $this->tpl['qty'] / $this->tpl['efficiency']; +$qtytoconsumeforline = $this->tpl['qty'] / ( ! empty($this->tpl['efficiency']) ? $this->tpl['efficiency'] : 1 ); /*if ((empty($this->tpl['qty_frozen']) && $this->tpl['qty_bom'] > 1)) { $qtytoconsumeforline = $qtytoconsumeforline / $this->tpl['qty_bom']; }*/ diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index a6e3af11979..7fcfe3bc92b 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -1030,7 +1030,7 @@ foreach ($listofreferent as $key => $value) { $addform .= ''; $addform .= ''; $addform .= ''; - $addform .= ''; + $addform .= ''; $addform .= '
'.$langs->trans("SelectElement").''.$selectList.'
'; $addform .= ''; $addform .= ''; @@ -1039,7 +1039,7 @@ foreach ($listofreferent as $key => $value) { if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) { $addform .= '
'; if ($testnew) { - $addform .= ''.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).''; + $addform .= ''.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).''; } elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { $addform .= ''.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).''; } diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 2f87fdd99d2..35ceb8a1931 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -502,6 +502,9 @@ class Salary extends CommonObject if ($this->datesp && $this->dateep) { $label .= '
'.$langs->trans('Period').': '.dol_print_date($this->datesp, 'day').' - '.dol_print_date($this->dateep, 'day'); } + if (isset($this->amount)) { + $label .= '
'.$langs->trans('Amount').': '.price($this->amount); + } $url = DOL_URL_ROOT.'/salaries/card.php?id='.$this->id; diff --git a/htdocs/salaries/payments.php b/htdocs/salaries/payments.php index bfc795ebcef..c2805cfbd93 100644 --- a/htdocs/salaries/payments.php +++ b/htdocs/salaries/payments.php @@ -124,6 +124,22 @@ foreach ($object->fields as $key => $val) { } } +// Definition of array of fields for columns +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=>$val['help'] + ); + } +} + $permissiontoread = $user->rights->salaries->read; $permissiontoadd = $user->rights->salaries->write; $permissiontodelete = $user->rights->salaries->delete; @@ -666,11 +682,13 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; // If no record found if ($num == 0) { - $colspan = 1; - foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) { + /*$colspan = 1; + foreach ($arrayfields as $key => $val) { + if (!empty($val['checked'])) { $colspan++; - } - } + } + }*/ + $colspan = 12; print ''.$langs->trans("NoRecordFound").''; } diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 0b179653487..fc9002e13fb 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -366,12 +366,12 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac $payment_salary = new PaymentSalary($db); $salary = new Salary($db); - $sql = "SELECT s.rowid as sid, s.ref as sref, s.label, s.datesp, s.dateep, s.paye, SUM(ps.amount) as alreadypaid"; + $sql = "SELECT s.rowid as sid, s.ref as sref, s.label, s.datesp, s.dateep, s.paye, s.amount, SUM(ps.amount) as alreadypaid"; $sql .= " FROM ".MAIN_DB_PREFIX."salary as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."payment_salary as ps ON (s.rowid = ps.fk_salary)"; $sql .= " WHERE s.fk_user = ".$object->id; $sql .= " AND s.entity IN (".getEntity('salary').")"; - $sql .= " GROUP BY s.rowid, s.ref, s.label, s.datesp, s.dateep, s.paye"; + $sql .= " GROUP BY s.rowid, s.ref, s.label, s.datesp, s.dateep, s.paye, s.amount"; $sql .= " ORDER BY s.dateep DESC"; $resql = $db->query($sql); @@ -381,7 +381,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print ''; print ''; - print '\n"; - print ''; + print ''; print ''; $i++; } diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 083b1bcc18c..1f0bb2891c6 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -711,7 +711,7 @@ class UserGroup extends CommonObject * Use this->id,this->lastname, this->firstname * * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo, -3=Only photo very small) - * @param string $option On what the link point to ('nolink', ) + * @param string $option On what the link point to ('nolink', 'permissions') * @param integer $notooltip 1=Disable tooltip on picto and name * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking @@ -730,12 +730,16 @@ class UserGroup extends CommonObject $result = ''; $label = ''; $label .= '
'; - $label .= ''.$langs->trans("Group").'
'; + $label .= img_picto('', 'group').' '.$langs->trans("Group").'
'; $label .= ''.$langs->trans('Name').': '.$this->name; $label .= '
'.$langs->trans("Description").': '.$this->note; $label .= '
'; - $url = DOL_URL_ROOT.'/user/group/card.php?id='.$this->id; + if ($option == 'permissions') { + $url = DOL_URL_ROOT.'/user/group/perms.php?id='.$this->id; + } else { + $url = DOL_URL_ROOT.'/user/group/card.php?id='.$this->id; + } if ($option != 'nolink') { // Add param to save lastsearch_values or not diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index 0e60e70e42a..5c1e16e4a0c 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -428,6 +428,7 @@ if ($action == 'create') { * Group members */ + print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '
'; + print ''; print ''; @@ -389,16 +389,17 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac while ($i < $num && $i < $MAXLIST) { $objp = $db->fetch_object($resql); - $payment_salary->id = $objp->rowid; - $payment_salary->ref = $objp->ref; - $payment_salary->datep = $db->jdate($objp->datep); - $salary->id = $objp->sid; $salary->ref = $objp->sref ? $objp->sref : $objp->sid; $salary->label = $objp->label; $salary->datesp = $db->jdate($objp->datesp); $salary->dateep = $db->jdate($objp->dateep); $salary->paye = $objp->paye; + $salary->amount = $objp->amount; + + $payment_salary->id = $objp->rowid; + $payment_salary->ref = $objp->ref; + $payment_salary->datep = $db->jdate($objp->datep); print ''; print '\n"; print '\n"; - //print ''; + print ''; print ''; print ''; @@ -416,7 +417,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac $db->free($resql); if ($num <= 0) { - print '
'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllSalaries").''.$num.''; print '
'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).''.$langs->trans("AllSalaries").''.$num.'
'; @@ -407,7 +408,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print ''.dol_print_date($db->jdate($objp->datesp), 'day')."'.dol_print_date($db->jdate($objp->dateep), 'day')."'.price($objp->amount).''.price($objp->amount).''.$salary->getLibStatut(5, $objp->alreadypaid).'
'.$langs->trans("None").''; + print ''.$langs->trans("None").''; } print "
"; } else { @@ -424,9 +425,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac } } - /* - * Last holidays - */ + // Latest leave requests if (!empty($conf->holiday->enabled) && ($user->rights->holiday->readall || ($user->rights->holiday->read && $object->id == $user->id)) ) { @@ -478,9 +477,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac } } - /* - * Last expense report - */ + // Latest expense report if (!empty($conf->expensereport->enabled) && ($user->rights->expensereport->readall || ($user->rights->expensereport->lire && $object->id == $user->id)) ) { @@ -516,7 +513,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac print '
'; print $exp->getNomUrl(1); print ''.dol_print_date($db->jdate($objp->date_debut), 'day')."'.price($objp->total_ttc).''.price($objp->total_ttc).''.$exp->LibStatut($objp->status, 5).'
'; print ''; print ''; @@ -440,7 +441,7 @@ if ($action == 'create') { if (!empty($object->members)) { foreach ($object->members as $useringroup) { print ''; - print ''; } print "
'.$langs->trans("Login").'
'; + print ''; print $useringroup->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); if ($useringroup->admin && !$useringroup->entity) { print img_picto($langs->trans("SuperAdministrator"), 'redstar'); @@ -465,6 +466,7 @@ if ($action == 'create') { print '
'.$langs->trans("None").'
"; + print '
'; } print "
"; diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 302d697c563..493383076b0 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -122,7 +122,7 @@ if (empty($reshook)) { llxHeader(); -$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions"; +$sql = "SELECT g.rowid, g.nom as name, g.note, g.entity, g.datec, g.tms as datem, COUNT(DISTINCT ugu.fk_user) as nb, COUNT(DISTINCT ugr.fk_id) as nbpermissions"; $sql .= " FROM ".MAIN_DB_PREFIX."usergroup as g"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ugu ON ugu.fk_usergroup = g.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_rights as ugr ON ugr.fk_usergroup = g.rowid"; @@ -137,7 +137,7 @@ if (!empty($search_group)) { if ($sall) { $sql .= natural_search(array("g.nom", "g.note"), $sall); } -$sql .= " GROUP BY g.rowid, g.nom, g.note, g.entity, g.datec"; +$sql .= " GROUP BY g.rowid, g.nom, g.note, g.entity, g.datec, g.tms"; $sql .= $db->order($sortfield, $sortorder); $resql = $db->query($sql); @@ -197,6 +197,7 @@ if ($resql) { print_liste_field_titre("NbOfUsers", $_SERVER["PHP_SELF"], "nb", $param, "", '', $sortfield, $sortorder, 'center '); print_liste_field_titre("NbOfPermissions", $_SERVER["PHP_SELF"], "nbpermissions", $param, "", '', $sortfield, $sortorder, 'center '); print_liste_field_titre("DateCreationShort", $_SERVER["PHP_SELF"], "g.datec", $param, "", '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("DateLastModification", $_SERVER["PHP_SELF"], "g.tms", $param, "", '', $sortfield, $sortorder, 'center '); print_liste_field_titre("", $_SERVER["PHP_SELF"]); print "\n"; @@ -222,8 +223,11 @@ if ($resql) { print ''.$mc->label.''; } print ''.$obj->nb.''; - print ''.$obj->nbpermissions.''; + print ''; + print ''.$obj->nbpermissions.''; + print ''; print ''.dol_print_date($db->jdate($obj->datec), "dayhour").''; + print ''.dol_print_date($db->jdate($obj->datem), "dayhour").''; print ''; print "\n"; $i++;