Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/filefunc.inc.php
This commit is contained in:
commit
9b7c0a9246
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2020 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2005-2021 Laurent Destailleur <eldy@users.sourceforge.org>
|
||||
* Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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 '<input class="quatrevingtpercent" type="text" id="CLICKTODIAL_URL" name="
|
||||
print ajax_autoselect('CLICKTODIAL_URL');
|
||||
print '<br>';
|
||||
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
||||
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">';
|
||||
print $langs->trans("Example").':<br>';
|
||||
print 'http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__<br>';
|
||||
print 'sip:__PHONETO__@my.sip.server';
|
||||
print '</span>';
|
||||
|
||||
//if (! empty($user->clicktodial_url))
|
||||
//{
|
||||
|
||||
@ -2594,9 +2594,14 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Close as accepted/refused
|
||||
if ($object->statut == Propal::STATUS_VALIDATED && $usercanclose) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas'.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close').'"';
|
||||
print '>'.$langs->trans('SetAcceptedRefused').'</a>';
|
||||
if ($object->statut == Propal::STATUS_VALIDATED) {
|
||||
if ($usercanclose) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas'.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#close').'"';
|
||||
print '>'.$langs->trans('SetAcceptedRefused').'</a>';
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'"';
|
||||
print '>'.$langs->trans('SetAcceptedRefused').'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Clone
|
||||
|
||||
@ -229,9 +229,6 @@ if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
|
||||
$permissiontosendbymail = $user->rights->propale->lire;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
@ -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 '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->socid.'&fac_avoir='.$object->id.'&action=create&type=2'.($object->fk_project > 0 ? '&projectid='.$object->fk_project : '').($object->entity > 0 ? '&originentity='.$object->entity : '').'">'.$langs->trans("CreateCreditNote").'</a>';
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 '<td class="linecoledit center">';
|
||||
$coldisplay++;
|
||||
if (($line->info_bits & 2) == 2 || !empty($disableedit)) {
|
||||
@ -365,7 +374,7 @@ if ($this->statut == 0 && ($object_rights->creer) && $action != 'selectlines') {
|
||||
|
||||
print '<td class="linecoldelete center">';
|
||||
$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 '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$this->id.'&action=ask_deleteline&lineid='.$line->id.'">';
|
||||
print img_delete();
|
||||
print '</a>';
|
||||
|
||||
@ -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)) {
|
||||
|
||||
@ -1407,7 +1407,7 @@ if ($resql) {
|
||||
// Type ent
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (count($typenArray) == 0) {
|
||||
if (empty($typenArray)) {
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
}
|
||||
print $typenArray[$obj->typent_code];
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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<br><b>__PHONETO__</b> that will be replaced with the phone number of person to call<br><b>__PHONEFROM__</b> that will be replaced with phone number of calling person (yours)<br><b>__LOGIN__</b> that will be replaced with clicktodial login (defined on user card)<br><b>__PASS__</b> 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
|
||||
|
||||
@ -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 ?
|
||||
@ -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
|
||||
|
||||
@ -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++;
|
||||
|
||||
@ -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'];
|
||||
}*/
|
||||
|
||||
@ -1030,7 +1030,7 @@ foreach ($listofreferent as $key => $value) {
|
||||
$addform .= '<input type="hidden" name="dateerfc" value="'.dol_print_date($datee, 'dayhourrfc').'">';
|
||||
$addform .= '<table><tr><td><span class="hideonsmartphone opacitymedium">'.$langs->trans("SelectElement").'</span></td>';
|
||||
$addform .= '<td>'.$selectList.'</td>';
|
||||
$addform .= '<td><input type="submit" class="button" value="'.dol_escape_htmltag($langs->trans("LinkToElementShort")).'"></td>';
|
||||
$addform .= '<td><input type="submit" class="button smallpaddingimp" value="'.dol_escape_htmltag($langs->trans("LinkToElementShort")).'"></td>';
|
||||
$addform .= '</tr></table>';
|
||||
$addform .= '</form>';
|
||||
$addform .= '</div>';
|
||||
@ -1039,7 +1039,7 @@ foreach ($listofreferent as $key => $value) {
|
||||
if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) {
|
||||
$addform .= '<div class="inline-block valignmiddle">';
|
||||
if ($testnew) {
|
||||
$addform .= '<a class="buttonxxx" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
$addform .= '<a class="buttonxxx marginleftonly" href="'.$urlnew.'"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
} elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) {
|
||||
$addform .= '<a class="buttonxxx buttonRefused" disabled="disabled" href="#"><span class="valignmiddle text-plus-circle hideonsmartphone">'.($buttonnew ? $langs->trans($buttonnew) : $langs->trans("Create")).'</span><span class="fa fa-plus-circle valignmiddle paddingleft"></span></a>';
|
||||
}
|
||||
|
||||
@ -502,6 +502,9 @@ class Salary extends CommonObject
|
||||
if ($this->datesp && $this->dateep) {
|
||||
$label .= '<br><b>'.$langs->trans('Period').':</b> '.dol_print_date($this->datesp, 'day').' - '.dol_print_date($this->dateep, 'day');
|
||||
}
|
||||
if (isset($this->amount)) {
|
||||
$label .= '<br><b>'.$langs->trans('Amount').':</b> '.price($this->amount);
|
||||
}
|
||||
|
||||
$url = DOL_URL_ROOT.'/salaries/card.php?id='.$this->id;
|
||||
|
||||
|
||||
@ -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 '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -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 '<table class="noborder centpercent">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"><table width="100%" class="nobordernopadding"><tr><td>'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/salaries/list.php?search_user='.$object->login.'">'.$langs->trans("AllSalaries").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '<td colspan="5"><table class="nobordernopadding centpercent"><tr><td>'.$langs->trans("LastSalaries", ($num <= $MAXLIST ? "" : $MAXLIST)).'</td><td class="right"><a class="notasortlink" href="'.DOL_URL_ROOT.'/salaries/list.php?search_user='.$object->login.'">'.$langs->trans("AllSalaries").'<span class="badge marginleftonlyshort">'.$num.'</span></a></td>';
|
||||
print '</tr></table></td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -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 '<tr class="oddeven">';
|
||||
print '<td class="nowraponall">';
|
||||
@ -407,7 +408,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
||||
|
||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->datesp), 'day')."</td>\n";
|
||||
print '<td class="right" width="80px">'.dol_print_date($db->jdate($objp->dateep), 'day')."</td>\n";
|
||||
//print '<td class="right" class="nowraponall"><span class="ampount">'.price($objp->amount).'</span></td>';
|
||||
print '<td class="right" class="nowraponall"><span class="amount">'.price($objp->amount).'</span></td>';
|
||||
print '<td class="right" class="nowraponall">'.$salary->getLibStatut(5, $objp->alreadypaid).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
@ -416,7 +417,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
|
||||
$db->free($resql);
|
||||
|
||||
if ($num <= 0) {
|
||||
print '<td colspan="4" class="opacitymedium">'.$langs->trans("None").'</a>';
|
||||
print '<td colspan="5" class="opacitymedium">'.$langs->trans("None").'</a>';
|
||||
}
|
||||
print "</table>";
|
||||
} 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 '<td class="nowrap">';
|
||||
print $exp->getNomUrl(1);
|
||||
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";
|
||||
print '<td class="right" style="min-width: 60px">'.price($objp->total_ttc).'</td>';
|
||||
print '<td class="right" style="min-width: 60px"><span class="amount">'.price($objp->total_ttc).'</span></td>';
|
||||
print '<td class="right nowrap" style="min-width: 60px">'.$exp->LibStatut($objp->status, 5).'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -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 .= '<div class="centpercent">';
|
||||
$label .= '<u>'.$langs->trans("Group").'</u><br>';
|
||||
$label .= img_picto('', 'group').' <u>'.$langs->trans("Group").'</u><br>';
|
||||
$label .= '<b>'.$langs->trans('Name').':</b> '.$this->name;
|
||||
$label .= '<br><b>'.$langs->trans("Description").':</b> '.$this->note;
|
||||
$label .= '</div>';
|
||||
|
||||
$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
|
||||
|
||||
@ -428,6 +428,7 @@ if ($action == 'create') {
|
||||
* Group members
|
||||
*/
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">'.$langs->trans("Login").'</td>';
|
||||
@ -440,7 +441,7 @@ if ($action == 'create') {
|
||||
if (!empty($object->members)) {
|
||||
foreach ($object->members as $useringroup) {
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>';
|
||||
print '<td class="tdoverflowmax150">';
|
||||
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 '<tr><td colspan="6" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print "<br>";
|
||||
|
||||
@ -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 "</tr>\n";
|
||||
|
||||
@ -222,8 +223,11 @@ if ($resql) {
|
||||
print '<td class="center">'.$mc->label.'</td>';
|
||||
}
|
||||
print '<td class="center">'.$obj->nb.'</td>';
|
||||
print '<td class="center">'.$obj->nbpermissions.'</td>';
|
||||
print '<td class="center">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/group/perms.php?id='.$obj->rowid.'">'.$obj->nbpermissions.'</a>';
|
||||
print '</td>';
|
||||
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->datec), "dayhour").'</td>';
|
||||
print '<td class="center nowrap">'.dol_print_date($db->jdate($obj->datem), "dayhour").'</td>';
|
||||
print '<td></td>';
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user