Merge remote-tracking branch 'upstream/develop' into 18a7
This commit is contained in:
commit
fb6abd40e9
@ -1931,10 +1931,10 @@ class Contrat extends CommonObject
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi label of a given contrat status
|
* Return the label of a given contrat status
|
||||||
*
|
*
|
||||||
* @param int $status Id status
|
* @param int $status Id status
|
||||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto, 7=Same than 6 with fixed length
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label (status of services), 5=Short label + Picto, 6=Long label + Picto (status of services), 7=Same than 6 with fixed length (status of services)
|
||||||
* @return string Label
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
public function LibStatut($status, $mode)
|
public function LibStatut($status, $mode)
|
||||||
@ -2859,14 +2859,15 @@ class Contrat extends CommonObject
|
|||||||
$return .= '<div class="info-box-content">';
|
$return .= '<div class="info-box-content">';
|
||||||
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
if (property_exists($this, 'societe')) {
|
if (!empty($arraydata['thirdparty'])) {
|
||||||
$return .= '<br><span class="info-box-label ">'.$this->societe.'</span>';
|
$tmpthirdparty = $arraydata['thirdparty'];
|
||||||
|
$return .= '<br><div class="info-box-label inline-block">'.$tmpthirdparty->getNomUrl(1).'</div>';
|
||||||
}
|
}
|
||||||
if (property_exists($this, 'date_contrat')) {
|
if (property_exists($this, 'date_contrat')) {
|
||||||
$return .= '<br><span class="opacitymedium">'.$langs->trans("DateContract").' : </span><span class="info-box-label">'.dol_print_date($this->date_contrat, 'day').'</span>';
|
$return .= '<br><span class="opacitymedium">'.$langs->trans("DateContract").' : </span><span class="info-box-label">'.dol_print_date($this->date_contrat, 'day').'</span>';
|
||||||
}
|
}
|
||||||
if (method_exists($this, 'getLibStatut')) {
|
if (method_exists($this, 'getLibStatut')) {
|
||||||
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(3).'</div>';
|
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(7).'</div>';
|
||||||
}
|
}
|
||||||
$return .= '</div>';
|
$return .= '</div>';
|
||||||
$return .= '</div>';
|
$return .= '</div>';
|
||||||
|
|||||||
@ -964,10 +964,12 @@ while ($i < $imaxinloop) {
|
|||||||
$contracttmp->ref_customer = $obj->ref_customer;
|
$contracttmp->ref_customer = $obj->ref_customer;
|
||||||
$contracttmp->ref_supplier = $obj->ref_supplier;
|
$contracttmp->ref_supplier = $obj->ref_supplier;
|
||||||
|
|
||||||
if ($obj->socid > 0) {
|
$contracttmp->nbofserviceswait = $obj->nb_initial;
|
||||||
$result = $socstatic->fetch($obj->socid);
|
$contracttmp->nbofservicesopened = $obj->nb_running;
|
||||||
}
|
$contracttmp->nbofservicesexpired = $obj->nb_expired;
|
||||||
/*$socstatic->id = $obj->socid;
|
$contracttmp->nbofservicesclosed = $obj->nb_closed;
|
||||||
|
|
||||||
|
$socstatic->id = $obj->socid;
|
||||||
$socstatic->name = $obj->name;
|
$socstatic->name = $obj->name;
|
||||||
$socstatic->name_alias = $obj->name_alias;
|
$socstatic->name_alias = $obj->name_alias;
|
||||||
$socstatic->email = $obj->email;
|
$socstatic->email = $obj->email;
|
||||||
@ -975,7 +977,8 @@ while ($i < $imaxinloop) {
|
|||||||
$socstatic->logo = $obj->logo;
|
$socstatic->logo = $obj->logo;
|
||||||
$socstatic->country_id = $obj->country_id;
|
$socstatic->country_id = $obj->country_id;
|
||||||
$socstatic->country_code = '';
|
$socstatic->country_code = '';
|
||||||
$socstatic->country = '';*/
|
$socstatic->country = '';
|
||||||
|
|
||||||
if ($obj->country_id > 0) {
|
if ($obj->country_id > 0) {
|
||||||
if (!isset($cacheCountryIDCode[$obj->country_id]['code'])) {
|
if (!isset($cacheCountryIDCode[$obj->country_id]['code'])) {
|
||||||
$tmparray = getCountry($obj->country_id, 'all');
|
$tmparray = getCountry($obj->country_id, 'all');
|
||||||
@ -991,9 +994,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
$contracttmp->societe = $socstatic->getNomUrl();
|
$arraydata['thirdparty'] = $socstatic;
|
||||||
$contracttmp->date_contrat = $obj->date_contrat;
|
$contracttmp->date_contrat = $obj->date_contrat;
|
||||||
print $contracttmp->getKanbanView('');
|
print $contracttmp->getKanbanView('', $arraydata);
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -1292,4 +1292,22 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Hacky fix for a bug in select2 with jQuery 3.6.0's new nested-focus "protection"
|
||||||
|
* see: https://github.com/select2/select2/issues/5993
|
||||||
|
* see: https://github.com/jquery/jquery/issues/4382
|
||||||
|
*
|
||||||
|
* TODO: Recheck with the select2 GH issue and remove once this is fixed on their side
|
||||||
|
*/
|
||||||
|
|
||||||
|
$(document).on('select2:open', (e) => {
|
||||||
|
console.log("Execute the focus (click on combo or use space when on component");
|
||||||
|
const target = $(e.target);
|
||||||
|
if (target && target.length) {
|
||||||
|
const id = target[0].id || target[0].name;
|
||||||
|
document.querySelector(`input[aria-controls*='${id}']`).focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// End of lib_head.js.php
|
// End of lib_head.js.php
|
||||||
|
|||||||
@ -8040,6 +8040,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
// Set the online payment url link into __ONLINE_PAYMENT_URL__ key
|
// Set the online payment url link into __ONLINE_PAYMENT_URL__ key
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
||||||
$outputlangs->loadLangs(array('paypal', 'other'));
|
$outputlangs->loadLangs(array('paypal', 'other'));
|
||||||
|
|
||||||
|
$amounttouse = 0;
|
||||||
$typeforonlinepayment = 'free';
|
$typeforonlinepayment = 'free';
|
||||||
if (is_object($object) && $object->element == 'commande') {
|
if (is_object($object) && $object->element == 'commande') {
|
||||||
$typeforonlinepayment = 'order';
|
$typeforonlinepayment = 'order';
|
||||||
@ -8049,7 +8051,6 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
}
|
}
|
||||||
if (is_object($object) && $object->element == 'member') {
|
if (is_object($object) && $object->element == 'member') {
|
||||||
$typeforonlinepayment = 'member';
|
$typeforonlinepayment = 'member';
|
||||||
$amounttouse = 0;
|
|
||||||
if (!empty($object->last_subscription_amount)) {
|
if (!empty($object->last_subscription_amount)) {
|
||||||
$amounttouse = $object->last_subscription_amount;
|
$amounttouse = $object->last_subscription_amount;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -187,12 +187,12 @@ function getValidOnlinePaymentMethods($paymentmethod = '')
|
|||||||
/**
|
/**
|
||||||
* Return string with full online payment Url
|
* Return string with full online payment Url
|
||||||
*
|
*
|
||||||
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
|
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
|
||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @param int $amount Amount of money to request for
|
* @param int|float $amount Amount of money to request for
|
||||||
* @return string Url string
|
* @return string Url string
|
||||||
*/
|
*/
|
||||||
function showOnlinePaymentUrl($type, $ref, $amount = '9.99')
|
function showOnlinePaymentUrl($type, $ref, $amount = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -213,13 +213,13 @@ function showOnlinePaymentUrl($type, $ref, $amount = '9.99')
|
|||||||
/**
|
/**
|
||||||
* Return string with HTML link for online payment
|
* Return string with HTML link for online payment
|
||||||
*
|
*
|
||||||
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
|
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member' ...)
|
||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @param string $label Text or HTML tag to display, if empty it display the URL
|
* @param string $label Text or HTML tag to display, if empty it display the URL
|
||||||
* @param int $amount Amount of money to request for
|
* @param int|float $amount Amount of money to request for
|
||||||
* @return string Url string
|
* @return string Url string
|
||||||
*/
|
*/
|
||||||
function getHtmlOnlinePaymentLink($type, $ref, $label = '', $amount = '9.99')
|
function getHtmlOnlinePaymentLink($type, $ref, $label = '', $amount = 0)
|
||||||
{
|
{
|
||||||
$url = getOnlinePaymentUrl(0, $type, $ref, $amount);
|
$url = getOnlinePaymentUrl(0, $type, $ref, $amount);
|
||||||
$label = $label ? $label : $url;
|
$label = $label ? $label : $url;
|
||||||
@ -230,15 +230,15 @@ function getHtmlOnlinePaymentLink($type, $ref, $label = '', $amount = '9.99')
|
|||||||
/**
|
/**
|
||||||
* Return string with full Url
|
* Return string with full Url
|
||||||
*
|
*
|
||||||
* @param int $mode 0=True url, 1=Url formated with colors
|
* @param int $mode 0=True url, 1=Url formated with colors
|
||||||
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member', 'boothlocation', ...)
|
* @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'member', 'boothlocation', ...)
|
||||||
* @param string $ref Ref of object
|
* @param string $ref Ref of object
|
||||||
* @param int $amount Amount of money to request for
|
* @param int|float $amount Amount of money to request for
|
||||||
* @param string $freetag Free tag (required and used for $type='free' only)
|
* @param string $freetag Free tag (required and used for $type='free' only)
|
||||||
* @param string $localorexternal 0=Url for browser, 1=Url for external access
|
* @param string $localorexternal 0=Url for browser, 1=Url for external access
|
||||||
* @return string Url string
|
* @return string Url string
|
||||||
*/
|
*/
|
||||||
function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag = 'your_tag', $localorexternal = 1)
|
function getOnlinePaymentUrl($mode, $type, $ref = '', $amount = 0, $freetag = 'your_tag', $localorexternal = 1)
|
||||||
{
|
{
|
||||||
global $conf, $dolibarr_main_url_root;
|
global $conf, $dolibarr_main_url_root;
|
||||||
|
|
||||||
|
|||||||
@ -1501,8 +1501,9 @@ class Fichinter extends CommonObject
|
|||||||
$return .= '<div class="info-box-content">';
|
$return .= '<div class="info-box-content">';
|
||||||
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
if (property_exists($this, 'socid')) {
|
if (!empty($arraydata['thirdparty'])) {
|
||||||
$return .= '<br><span class="info-box-label">'.$this->socid.'</span>';
|
$tmpthirdparty = $arraydata['thirdparty'];
|
||||||
|
$return .= '<br><span class="info-box-label">'.$tmpthirdparty->getNomUrl(1).'</span>';
|
||||||
}
|
}
|
||||||
if (property_exists($this, 'duration')) {
|
if (property_exists($this, 'duration')) {
|
||||||
$return .= '<br><span class="info-box-label ">'.$langs->trans("Duration").' : '.convertSecondToTime($this->duration, 'allhourmin').'</span>';
|
$return .= '<br><span class="info-box-label ">'.$langs->trans("Duration").' : '.convertSecondToTime($this->duration, 'allhourmin').'</span>';
|
||||||
|
|||||||
@ -93,7 +93,7 @@ if (!$sortfield) {
|
|||||||
|
|
||||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
$object = new Fichinter($db);
|
$object = new Fichinter($db);
|
||||||
$hookmanager->initHooks(array('interventionlist'));
|
$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
@ -148,6 +148,7 @@ if ($user->socid) {
|
|||||||
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
$result = restrictedArea($user, 'ficheinter', $id, 'fichinter');
|
||||||
|
|
||||||
$permissiontoread = $user->rights->ficheinter->lire;
|
$permissiontoread = $user->rights->ficheinter->lire;
|
||||||
|
$permissiontoadd = $user->rights->ficheinter->creer;
|
||||||
$permissiontodelete = $user->rights->ficheinter->supprimer;
|
$permissiontodelete = $user->rights->ficheinter->supprimer;
|
||||||
|
|
||||||
|
|
||||||
@ -213,8 +214,8 @@ if (isModEnabled('contrat')) {
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
$help_url = '';
|
|
||||||
$title = $langs->trans("Interventions");
|
$title = $langs->trans("Interventions");
|
||||||
|
$help_url = '';
|
||||||
$morejs = array();
|
$morejs = array();
|
||||||
$morecss = array();
|
$morecss = array();
|
||||||
|
|
||||||
@ -250,7 +251,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
|||||||
}
|
}
|
||||||
// Add fields from hooks
|
// Add fields from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
$sqlfields = $sql; // $sql fields to remove for count total
|
$sqlfields = $sql; // $sql fields to remove for count total
|
||||||
@ -271,7 +272,7 @@ if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines)
|
|||||||
|
|
||||||
// Add table from hooks
|
// Add table from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
if (empty($user->rights->societe->client->voir) && empty($socid)) {
|
if (empty($user->rights->societe->client->voir) && empty($socid)) {
|
||||||
@ -318,7 +319,7 @@ if ($search_all) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
// Add GroupBy from hooks
|
// Add GroupBy from hooks
|
||||||
$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall);
|
$parameters = array('search_all' => $search_all, 'fieldstosearchall' => $fieldstosearchall);
|
||||||
@ -339,7 +340,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
@ -373,7 +374,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $
|
|||||||
// Output page
|
// Output page
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');
|
llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
|
||||||
|
|
||||||
|
|
||||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||||
@ -394,7 +395,7 @@ if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
|||||||
$param .= '&contextpage='.urlencode($contextpage);
|
$param .= '&contextpage='.urlencode($contextpage);
|
||||||
}
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.((int) $limit);
|
||||||
}
|
}
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
$param .= "&search_all=".urlencode($search_all);
|
$param .= "&search_all=".urlencode($search_all);
|
||||||
@ -427,7 +428,7 @@ if ($optioncss != '') {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||||
// Add $param from hooks
|
// Add $param from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$param .= $hookmanager->resPrint;
|
$param .= $hookmanager->resPrint;
|
||||||
|
|
||||||
// List of mass actions available
|
// List of mass actions available
|
||||||
@ -454,7 +455,10 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
|
print '<input type="hidden" name="page_y" value="">';
|
||||||
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$url = DOL_URL_ROOT.'/fichinter/card.php?action=create';
|
$url = DOL_URL_ROOT.'/fichinter/card.php?action=create';
|
||||||
@ -464,6 +468,7 @@ if (!empty($socid)) {
|
|||||||
$newcardbutton = '';
|
$newcardbutton = '';
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
|
$newcardbutton .= dolGetButtonTitleSeparator();
|
||||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer);
|
$newcardbutton .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer);
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
@ -475,16 +480,19 @@ $trackid = 'int'.$object->id;
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||||
|
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
|
$setupstring = '';
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
|
$setupstring .= $key."=".$val.";";
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
print '<!-- Search done like if MYOBJECT_QUICKSEARCH_ON_FIELDS = '.$setupstring.' -->'."\n";
|
||||||
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$moreforfilter = '';
|
$moreforfilter = '';
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$moreforfilter .= $hookmanager->resPrint;
|
$moreforfilter .= $hookmanager->resPrint;
|
||||||
} else {
|
} else {
|
||||||
@ -494,22 +502,25 @@ if (empty($reshook)) {
|
|||||||
if (!empty($moreforfilter)) {
|
if (!empty($moreforfilter)) {
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||||
print $moreforfilter;
|
print $moreforfilter;
|
||||||
|
$parameters = array();
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
print '</div>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre center maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons('left');
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -549,7 +560,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields);
|
$parameters = array('arrayfields'=>$arrayfields);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||||
// Date creation
|
// Date creation
|
||||||
@ -598,7 +609,7 @@ if (!empty($arrayfields['fd.duree']['checked'])) {
|
|||||||
}
|
}
|
||||||
// Action column
|
// Action column
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre center maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons();
|
$searchpicto = $form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -614,72 +625,88 @@ print '<tr class="liste_titre">';
|
|||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref']['checked'])) {
|
if (!empty($arrayfields['f.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref_client']['checked'])) {
|
if (!empty($arrayfields['f.ref_client']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], "f.ref_client", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.ref_client']['label'], $_SERVER["PHP_SELF"], "f.ref_client", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.nom']['checked'])) {
|
if (!empty($arrayfields['s.nom']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['pr.ref']['checked'])) {
|
if (!empty($arrayfields['pr.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], "pr.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['c.ref']['checked'])) {
|
if (!empty($arrayfields['c.ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.description']['checked'])) {
|
if (!empty($arrayfields['f.description']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['f.description']['label'], $_SERVER["PHP_SELF"], "f.description", "", $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
// Extra fields
|
// Extra fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!empty($arrayfields['f.datec']['checked'])) {
|
if (!empty($arrayfields['f.datec']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.tms']['checked'])) {
|
if (!empty($arrayfields['f.tms']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.note_public']['checked'])) {
|
if (!empty($arrayfields['f.note_public']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.note_private']['checked'])) {
|
if (!empty($arrayfields['f.note_private']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.fk_statut']['checked'])) {
|
if (!empty($arrayfields['f.fk_statut']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.description']['checked'])) {
|
if (!empty($arrayfields['fd.description']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], '');
|
print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], '');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.date']['checked'])) {
|
if (!empty($arrayfields['fd.date']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['fd.duree']['checked'])) {
|
if (!empty($arrayfields['fd.duree']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
|
|
||||||
// Loop on record
|
// Loop on record
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
$total = 0;
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$savnbfield = $totalarray['nbfield'];
|
$savnbfield = $totalarray['nbfield'];
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalarray['val'] = array();
|
$totalarray['val'] = array();
|
||||||
$totalarray['val']['fd.duree'] = 0;
|
$totalarray['val']['fd.duree'] = 0;
|
||||||
|
$total = 0;
|
||||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
while ($i < $imaxinloop) {
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
@ -706,21 +733,29 @@ while ($i < $imaxinloop) {
|
|||||||
//mode kanban
|
//mode kanban
|
||||||
if ($mode == 'kanban') {
|
if ($mode == 'kanban') {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
print '<tr><td colspan="12">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
$objectstatic->duration = $obj->duree;
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
$objectstatic->socid = $companystatic->getNomUrl(1, '', 44);
|
$selected = 0;
|
||||||
|
if (in_array($object->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print $objectstatic->getKanbanView('');
|
$objectstatic->duration = $obj->duree;
|
||||||
|
$arraydata['thirdparty'] = $companystatic;
|
||||||
|
print $objectstatic->getKanbanView('', $arraydata);
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<tr class="oddeven">';
|
// Show here line of result
|
||||||
|
$j = 0;
|
||||||
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
print '<td class="nowrap center">';
|
||||||
@ -732,6 +767,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['f.ref']['checked'])) {
|
if (!empty($arrayfields['f.ref']['checked'])) {
|
||||||
print "<td>";
|
print "<td>";
|
||||||
@ -906,9 +944,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
if (!$i) {
|
||||||
if (!$i) {
|
$totalarray['nbfield']++;
|
||||||
$totalarray['nbfield']++;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
@ -958,8 +996,8 @@ if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $n
|
|||||||
$urlsource .= str_replace('&', '&', $param);
|
$urlsource .= str_replace('&', '&', $param);
|
||||||
|
|
||||||
$filedir = $diroutputmassaction;
|
$filedir = $diroutputmassaction;
|
||||||
$genallowed = $user->rights->ficheinter->lire;
|
$genallowed = $permissiontoread;
|
||||||
$delallowed = $user->rights->ficheinter->creer;
|
$delallowed = $permissiontoadd;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -751,9 +751,9 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
|
|
||||||
// Select warehouse to force it everywhere
|
// Select warehouse to force it everywhere
|
||||||
if (count($listwarehouses) > 1) {
|
if (count($listwarehouses) > 1) {
|
||||||
print '<br><span class="opacitymedium">'.$langs->trans("ForceTo").'</span> '.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled, '', 'minwidth100 maxwidth300', 1);
|
print '<br>'.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, $langs->trans("ForceTo"), 0, 0, '', 0, 0, $disabled, '', 'minwidth100 maxwidth300', 1);
|
||||||
} elseif (count($listwarehouses) == 1) {
|
} elseif (count($listwarehouses) == 1) {
|
||||||
print '<br><span class="opacitymedium">'.$langs->trans("ForceTo").'</span> '.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled, '', 'minwidth100 maxwidth300', 1);
|
print '<br>'.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled, '', 'minwidth100 maxwidth300', 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -838,7 +838,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
print $linktoprod;
|
print $linktoprod;
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '<td class="dispatch_batch_number">';
|
print '<td class="dispatch_batch_number">';
|
||||||
print $langs->trans("ProductDoesNotUseBatchSerial");
|
print '<span class="opacitymedium small">'.$langs->trans("ProductDoesNotUseBatchSerial").'</small>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) {
|
||||||
print '<td class="dispatch_dlc"></td>';
|
print '<td class="dispatch_dlc"></td>';
|
||||||
|
|||||||
@ -3014,7 +3014,7 @@ if ($action == 'create') {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'supplier');
|
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1, 'supplier');
|
||||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
$morehtmlref .= ' <div class="inline-block valignmiddle">(<a class="valignmiddle" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.((int) $object->thirdparty->id).'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)</div>';
|
||||||
}
|
}
|
||||||
// Project
|
// Project
|
||||||
if (isModEnabled('project')) {
|
if (isModEnabled('project')) {
|
||||||
@ -3023,7 +3023,7 @@ if ($action == 'create') {
|
|||||||
if ($permissiontoadd) {
|
if ($permissiontoadd) {
|
||||||
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
|
$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
|
||||||
if ($action != 'classify') {
|
if ($action != 'classify') {
|
||||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.((int) $object->id).'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||||
}
|
}
|
||||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -138,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
||||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
$morehtmlref .= ' <div class="inline-block valignmiddle">(<a class="valignmiddle" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)</div>';
|
||||||
}
|
}
|
||||||
// Project
|
// Project
|
||||||
if (isModEnabled('project')) {
|
if (isModEnabled('project')) {
|
||||||
|
|||||||
@ -114,7 +114,7 @@ if ($object->id > 0) {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
||||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
$morehtmlref .= ' <div class="inline-block valignmiddle">(<a class="valignmiddle" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)</div>';
|
||||||
}
|
}
|
||||||
// Project
|
// Project
|
||||||
if (isModEnabled('project')) {
|
if (isModEnabled('project')) {
|
||||||
|
|||||||
@ -80,7 +80,7 @@ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
||||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
$morehtmlref .= ' <div class="inline-block valignmiddle">(<a class="valignmiddle" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)</div>';
|
||||||
}
|
}
|
||||||
// Project
|
// Project
|
||||||
if (isModEnabled('project')) {
|
if (isModEnabled('project')) {
|
||||||
|
|||||||
@ -110,7 +110,7 @@ if ($object->id > 0) {
|
|||||||
// Thirdparty
|
// Thirdparty
|
||||||
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
|
||||||
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) {
|
||||||
$morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)';
|
$morehtmlref .= ' <div class="inline-block valignmiddle">(<a class="valignmiddle" href="'.DOL_URL_ROOT.'/fourn/facture/list.php?socid='.$object->thirdparty->id.'&search_company='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherBills").'</a>)</div>';
|
||||||
}
|
}
|
||||||
// Project
|
// Project
|
||||||
if (isModEnabled('project')) {
|
if (isModEnabled('project')) {
|
||||||
|
|||||||
@ -905,8 +905,8 @@ ConfirmMassClone=Bulk clone confirmation
|
|||||||
ConfirmMassCloneQuestion=Select project to clone to
|
ConfirmMassCloneQuestion=Select project to clone to
|
||||||
ConfirmMassCloneToOneProject=Clone to project %s
|
ConfirmMassCloneToOneProject=Clone to project %s
|
||||||
RelatedObjects=Related Objects
|
RelatedObjects=Related Objects
|
||||||
ClassifyBilled=Classify billed
|
ClassifyBilled=Classify Billed
|
||||||
ClassifyUnbilled=Classify unbilled
|
ClassifyUnbilled=Classify Unbilled
|
||||||
Progress=Progress
|
Progress=Progress
|
||||||
ProgressShort=Progr.
|
ProgressShort=Progr.
|
||||||
FrontOffice=Front office
|
FrontOffice=Front office
|
||||||
|
|||||||
@ -54,7 +54,7 @@ Notify_WITHDRAW_TRANSMIT=Transmission withdrawal
|
|||||||
Notify_WITHDRAW_CREDIT=Credit withdrawal
|
Notify_WITHDRAW_CREDIT=Credit withdrawal
|
||||||
Notify_WITHDRAW_EMIT=Perform withdrawal
|
Notify_WITHDRAW_EMIT=Perform withdrawal
|
||||||
Notify_COMPANY_CREATE=Third party created
|
Notify_COMPANY_CREATE=Third party created
|
||||||
Notify_COMPANY_SENTBYMAIL=Mails sent from third party card
|
Notify_COMPANY_SENTBYMAIL=Mails sent from the page of third party
|
||||||
Notify_BILL_VALIDATE=Customer invoice validated
|
Notify_BILL_VALIDATE=Customer invoice validated
|
||||||
Notify_BILL_UNVALIDATE=Customer invoice unvalidated
|
Notify_BILL_UNVALIDATE=Customer invoice unvalidated
|
||||||
Notify_BILL_PAYED=Customer invoice paid
|
Notify_BILL_PAYED=Customer invoice paid
|
||||||
|
|||||||
@ -202,7 +202,7 @@ InputPerMonth=Input per month
|
|||||||
InputDetail=Input detail
|
InputDetail=Input detail
|
||||||
TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s
|
TimeAlreadyRecorded=This is time spent already recorded for this task/day and user %s
|
||||||
ProjectsWithThisUserAsContact=Projects with this user as contact
|
ProjectsWithThisUserAsContact=Projects with this user as contact
|
||||||
ProjectsWithThisContact=Projects with this contact
|
ProjectsWithThisContact=Projects with this third-party contact
|
||||||
TasksWithThisUserAsContact=Tasks assigned to this user
|
TasksWithThisUserAsContact=Tasks assigned to this user
|
||||||
ResourceNotAssignedToProject=Not assigned to project
|
ResourceNotAssignedToProject=Not assigned to project
|
||||||
ResourceNotAssignedToTheTask=Not assigned to the task
|
ResourceNotAssignedToTheTask=Not assigned to the task
|
||||||
|
|||||||
@ -48,7 +48,7 @@ DateDeliveryPlanned=Planned date of delivery
|
|||||||
RefDeliveryReceipt=Ref delivery receipt
|
RefDeliveryReceipt=Ref delivery receipt
|
||||||
StatusReceipt=Status delivery receipt
|
StatusReceipt=Status delivery receipt
|
||||||
DateReceived=Date delivery received
|
DateReceived=Date delivery received
|
||||||
ClassifyReception=Classify reception
|
ClassifyReception=Classify Received
|
||||||
SendShippingByEMail=Send shipment by email
|
SendShippingByEMail=Send shipment by email
|
||||||
SendShippingRef=Submission of shipment %s
|
SendShippingRef=Submission of shipment %s
|
||||||
ActionsOnShipping=Events on shipment
|
ActionsOnShipping=Events on shipment
|
||||||
|
|||||||
@ -83,7 +83,7 @@ BlogPost=Blog post
|
|||||||
WebsiteAccount=Website account
|
WebsiteAccount=Website account
|
||||||
WebsiteAccounts=Website accounts
|
WebsiteAccounts=Website accounts
|
||||||
AddWebsiteAccount=Create web site account
|
AddWebsiteAccount=Create web site account
|
||||||
BackToListForThirdParty=Back to list for the third-party
|
BackToListForThirdParty=Back to list for the third parties
|
||||||
DisableSiteFirst=Disable website first
|
DisableSiteFirst=Disable website first
|
||||||
MyContainerTitle=My web site title
|
MyContainerTitle=My web site title
|
||||||
AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists)
|
AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists)
|
||||||
|
|||||||
@ -2472,8 +2472,14 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
|
|||||||
console.log("Click on .butAction.dropdown-toggle");
|
console.log("Click on .butAction.dropdown-toggle");
|
||||||
var parentholder = jQuery(".butAction.dropdown-toggle").closest(".dropdown");
|
var parentholder = jQuery(".butAction.dropdown-toggle").closest(".dropdown");
|
||||||
var offset = parentholder.offset();
|
var offset = parentholder.offset();
|
||||||
|
var widthdocument = $(document).width();
|
||||||
var left = offset.left;
|
var left = offset.left;
|
||||||
var right = $(document).width() - offset.left - parentholder.width();
|
var right = widthdocument - offset.left - parentholder.width();
|
||||||
|
var widthpopup = parentholder.children(".dropdown-content").width();
|
||||||
|
console.log("left="+left+" right="+right+" width="+widthpopup+" widthdocument="+widthdocument);
|
||||||
|
if (widthpopup + right >= widthdocument) {
|
||||||
|
right = 10;
|
||||||
|
}
|
||||||
parentholder.toggleClass("open");
|
parentholder.toggleClass("open");
|
||||||
parentholder.children(".dropdown-content").css({"right": right+"px", "left": "auto"});
|
parentholder.children(".dropdown-content").css({"right": right+"px", "left": "auto"});
|
||||||
});
|
});
|
||||||
|
|||||||
@ -149,7 +149,6 @@ if ($object->fk_project > 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -875,9 +874,11 @@ if ($action == 'confirm_generateinter') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$formproject = new FormProjets($db);
|
$formproject = new FormProjets($db);
|
||||||
@ -1304,7 +1305,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
if ($search_year > 0) {
|
if ($search_year > 0) {
|
||||||
$param .= '&search_year='.urlencode($search_year);
|
$param .= '&search_year='.urlencode($search_year);
|
||||||
}
|
}
|
||||||
if ($search_user > 0) {
|
if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set
|
||||||
$param .= '&search_user='.urlencode($search_user);
|
$param .= '&search_user='.urlencode($search_user);
|
||||||
}
|
}
|
||||||
if ($search_task_ref != '') {
|
if ($search_task_ref != '') {
|
||||||
@ -1564,6 +1565,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||||
|
|
||||||
|
$sqlfields = $sql; // $sql fields to remove for count total
|
||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."element_time as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX."element_time as t";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facturedet as il ON il.rowid = t.invoice_line_id";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facturedet as il ON il.rowid = t.invoice_line_id";
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as inv ON inv.rowid = il.fk_facture";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as inv ON inv.rowid = il.fk_facture";
|
||||||
@ -1657,39 +1661,42 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
$sql .= $db->order($sortfield, $sortorder);
|
|
||||||
|
|
||||||
// Count total nb of records
|
// Count total nb of records
|
||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
$resql = $db->query($sql);
|
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
||||||
|
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
|
||||||
if (! $resql) {
|
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
|
||||||
|
$resql = $db->query($sqlforcount);
|
||||||
|
if ($resql) {
|
||||||
|
$objforcount = $db->fetch_object($resql);
|
||||||
|
$nbtotalofrecords = $objforcount->nbtotalofrecords;
|
||||||
|
} else {
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
exit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbtotalofrecords = $db->num_rows($resql);
|
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||||
if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0
|
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set.
|
|
||||||
if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) {
|
// Complete request and execute it with limit
|
||||||
$num = $nbtotalofrecords;
|
$sql .= $db->order($sortfield, $sortorder);
|
||||||
} else {
|
if ($limit) {
|
||||||
$sql .= $db->plimit($limit + 1, $offset);
|
$sql .= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
if (!$resql) {
|
|
||||||
dol_print_error($db);
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
if (!$resql) {
|
||||||
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
if ($num >= 0) {
|
if ($num >= 0) {
|
||||||
if (!empty($projectidforalltimes)) {
|
if (!empty($projectidforalltimes)) {
|
||||||
print '<!-- List of time spent for project -->'."\n";
|
print '<!-- List of time spent for project -->'."\n";
|
||||||
@ -1870,6 +1877,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
@ -1918,7 +1926,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
// Author
|
// Author
|
||||||
if (!empty($arrayfields['author']['checked'])) {
|
if (!empty($arrayfields['author']['checked'])) {
|
||||||
print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250').'</td>';
|
print '<td class="liste_titre">'.$form->select_dolusers(($search_user > 0 ? $search_user : -1), 'search_user', 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth150').'</td>';
|
||||||
}
|
}
|
||||||
// Note
|
// Note
|
||||||
if (!empty($arrayfields['t.note']['checked'])) {
|
if (!empty($arrayfields['t.note']['checked'])) {
|
||||||
@ -1977,54 +1985,72 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
$totalarray = array();
|
||||||
|
$totalarray['nbfield'] = 0;
|
||||||
|
|
||||||
|
// Fields title label
|
||||||
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.element_date']['checked'])) {
|
if (!empty($arrayfields['t.element_date']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.element_date']['label'], $_SERVER['PHP_SELF'], 't.element_date,t.element_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.element_date']['label'], $_SERVER['PHP_SELF'], 't.element_date,t.element_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($arrayfields['p.fk_soc']['checked'])) {
|
if (!empty($arrayfields['p.fk_soc']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER['PHP_SELF'], 't.element_date,t.element_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER['PHP_SELF'], 't.element_date,t.element_datehour,t.rowid', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($allprojectforuser)) {
|
if (!empty($allprojectforuser)) {
|
||||||
if (!empty($arrayfields['p.project_ref']['checked'])) {
|
if (!empty($arrayfields['p.project_ref']['checked'])) {
|
||||||
print_liste_field_titre("Project", $_SERVER['PHP_SELF'], 'p.ref', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("Project", $_SERVER['PHP_SELF'], 'p.ref', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['p.project_label']['checked'])) {
|
if (!empty($arrayfields['p.project_label']['checked'])) {
|
||||||
print_liste_field_titre("ProjectLabel", $_SERVER['PHP_SELF'], 'p.title', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre("ProjectLabel", $_SERVER['PHP_SELF'], 'p.title', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task
|
||||||
if (!empty($arrayfields['t.element_ref']['checked'])) {
|
if (!empty($arrayfields['t.element_ref']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.element_ref']['label'], $_SERVER['PHP_SELF'], 'pt.ref', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.element_ref']['label'], $_SERVER['PHP_SELF'], 'pt.ref', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.element_label']['checked'])) {
|
if (!empty($arrayfields['t.element_label']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.element_label']['label'], $_SERVER['PHP_SELF'], 'pt.label', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.element_label']['label'], $_SERVER['PHP_SELF'], 'pt.label', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['author']['checked'])) {
|
if (!empty($arrayfields['author']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['author']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['author']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.note']['checked'])) {
|
if (!empty($arrayfields['t.note']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.note']['label'], $_SERVER['PHP_SELF'], 't.note', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.note']['label'], $_SERVER['PHP_SELF'], 't.note', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.element_duration']['checked'])) {
|
if (!empty($arrayfields['t.element_duration']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.element_duration']['label'], $_SERVER['PHP_SELF'], 't.element_duration', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['t.element_duration']['label'], $_SERVER['PHP_SELF'], 't.element_duration', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.fk_product']['checked'])) {
|
if (!empty($arrayfields['t.fk_product']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['t.fk_product']['label'], $_SERVER['PHP_SELF'], 't.fk_product', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['t.fk_product']['label'], $_SERVER['PHP_SELF'], 't.fk_product', '', $param, '', $sortfield, $sortorder);
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($arrayfields['value']['checked'])) {
|
if (!empty($arrayfields['value']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['value']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['value']['label'], $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['valuebilled']['checked'])) {
|
if (!empty($arrayfields['valuebilled']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['valuebilled']['label'], $_SERVER['PHP_SELF'], 'il.total_ht', '', $param, '', $sortfield, $sortorder, 'center ', $langs->trans("SelectLinesOfTimeSpentToInvoice"));
|
print_liste_field_titre($arrayfields['valuebilled']['label'], $_SERVER['PHP_SELF'], 'il.total_ht', '', $param, '', $sortfield, $sortorder, 'center ', $langs->trans("SelectLinesOfTimeSpentToInvoice"));
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
// Extra fields
|
// Extra fields
|
||||||
@ -2036,6 +2062,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'width="80"', $sortfield, $sortorder, 'center maxwidthsearch ');
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
@ -2043,10 +2070,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
$tmpinvoice = new Facture($db);
|
$tmpinvoice = new Facture($db);
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$total = 0;
|
$total = 0;
|
||||||
$totalvalue = 0;
|
$totalvalue = 0;
|
||||||
$totalarray = array('nbfield'=>0);
|
|
||||||
|
$savnbfield = $totalarray['nbfield'];
|
||||||
|
$totalarray = array();
|
||||||
|
$totalarray['nbfield'] = 0;
|
||||||
|
//$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
foreach ($tasks as $task_time) {
|
foreach ($tasks as $task_time) {
|
||||||
if ($i >= $limit) {
|
if ($i >= $limit) {
|
||||||
break;
|
break;
|
||||||
@ -2055,11 +2085,13 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
$date1 = $db->jdate($task_time->element_date);
|
$date1 = $db->jdate($task_time->element_date);
|
||||||
$date2 = $db->jdate($task_time->element_datehour);
|
$date2 = $db->jdate($task_time->element_datehour);
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
// Show here line of result
|
||||||
|
$j = 0;
|
||||||
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
|
|
||||||
// Action column
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="center nowraponall">';
|
print '<td class="center nowraponall maxwidth75">';
|
||||||
if (($action == 'editline' || $action == 'splitline') && GETPOST('lineid', 'int') == $task_time->rowid) {
|
if (($action == 'editline' || $action == 'splitline') && GETPOST('lineid', 'int') == $task_time->rowid) {
|
||||||
print '<input type="hidden" name="lineid" value="'.GETPOST('lineid', 'int').'">';
|
print '<input type="hidden" name="lineid" value="'.GETPOST('lineid', 'int').'">';
|
||||||
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
|
print '<input type="submit" class="button buttongen margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||||
@ -2092,6 +2124,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Date
|
// Date
|
||||||
if (!empty($arrayfields['t.element_date']['checked'])) {
|
if (!empty($arrayfields['t.element_date']['checked'])) {
|
||||||
@ -2113,7 +2149,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
|
|
||||||
// Thirdparty
|
// Thirdparty
|
||||||
if (!empty($arrayfields['p.fk_soc']['checked'])) {
|
if (!empty($arrayfields['p.fk_soc']['checked'])) {
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap tdoverflowmax150">';
|
||||||
if ($task_time->fk_soc > 0) {
|
if ($task_time->fk_soc > 0) {
|
||||||
if (empty($conf->cache['thridparty'][$task_time->fk_soc])) {
|
if (empty($conf->cache['thridparty'][$task_time->fk_soc])) {
|
||||||
$tmpsociete = new Societe($db);
|
$tmpsociete = new Societe($db);
|
||||||
@ -2132,7 +2168,6 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
|
|
||||||
// Thirdparty alias
|
// Thirdparty alias
|
||||||
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
if (!empty($arrayfields['s.name_alias']['checked'])) {
|
||||||
print '<td class="nowrap">';
|
|
||||||
if ($task_time->fk_soc > 0) {
|
if ($task_time->fk_soc > 0) {
|
||||||
if (empty($conf->cache['thridparty'][$task_time->fk_soc])) {
|
if (empty($conf->cache['thridparty'][$task_time->fk_soc])) {
|
||||||
$tmpsociete = new Societe($db);
|
$tmpsociete = new Societe($db);
|
||||||
@ -2141,8 +2176,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
} else {
|
} else {
|
||||||
$tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc];
|
$tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc];
|
||||||
}
|
}
|
||||||
print $tmpsociete->name_alias;
|
$valtoshow = $tmpsociete->name_alias;
|
||||||
}
|
}
|
||||||
|
print '<td class="nowrap tdoverflowmax150" title="'.dol_escape_htmltag($valtoshow).'">';
|
||||||
|
print $valtoshow;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
@ -2309,6 +2346,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value spent
|
// Value spent
|
||||||
@ -2422,10 +2462,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
print '</td>';
|
||||||
print '</td>';
|
if (!$i) {
|
||||||
if (!$i) {
|
$totalarray['nbfield']++;
|
||||||
$totalarray['nbfield']++;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -2724,7 +2764,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||||||
if ($num < $limit && empty($offset)) {
|
if ($num < $limit && empty($offset)) {
|
||||||
print '<td class="left">'.$langs->trans("Total").'</td>';
|
print '<td class="left">'.$langs->trans("Total").'</td>';
|
||||||
} else {
|
} else {
|
||||||
print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>';
|
||||||
}
|
}
|
||||||
} elseif ($totalarray['totaldurationfield'] == $i) {
|
} elseif ($totalarray['totaldurationfield'] == $i) {
|
||||||
print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
|
print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>';
|
||||||
|
|||||||
@ -6546,7 +6546,7 @@ span#select2-boxbookmark-container {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.select2-container-multi-dolibarr .select2-choices-dolibarr li {
|
.select2-container-multi-dolibarr .select2-choices-dolibarr li {
|
||||||
float: left;
|
float: <?php echo $left; ?>;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
.select2-container-multi-dolibarr .select2-choices-dolibarr {
|
.select2-container-multi-dolibarr .select2-choices-dolibarr {
|
||||||
|
|||||||
@ -6453,7 +6453,7 @@ span#select2-boxbookmark-container, span#select2-boxcombo-container {
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
.select2-container-multi-dolibarr .select2-choices-dolibarr li {
|
.select2-container-multi-dolibarr .select2-choices-dolibarr li {
|
||||||
float: left;
|
float: <?php echo $left; ?>;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
.select2-container-multi-dolibarr .select2-choices-dolibarr {
|
.select2-container-multi-dolibarr .select2-choices-dolibarr {
|
||||||
|
|||||||
@ -2378,25 +2378,25 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact
|
if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact
|
||||||
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' ');
|
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' ', 0, 0, null, 0, 'maxwidth300');
|
||||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
||||||
if ($object->ldap_sid) {
|
if ($object->ldap_sid) {
|
||||||
print ' ('.$langs->trans("DomainUser").')';
|
print ' ('.$langs->trans("DomainUser").')';
|
||||||
}
|
}
|
||||||
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
|
} elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact
|
||||||
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' ', 0, 0, null, 0, 'maxwidth300'); // We keep thirdparty empty, contact is already set
|
||||||
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
||||||
if ($object->ldap_sid) {
|
if ($object->ldap_sid) {
|
||||||
print ' ('.$langs->trans("DomainUser").')';
|
print ' ('.$langs->trans("DomainUser").')';
|
||||||
}
|
}
|
||||||
} elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact
|
} elseif (!($object->socid > 0) && $object->contact_id > 0) { // internal user with a link to a contact
|
||||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' ', 0, 0, null, 0, 'maxwidth300'); // We keep thirdparty empty, contact is already set
|
||||||
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
||||||
if ($object->ldap_sid) {
|
if ($object->ldap_sid) {
|
||||||
print ' ('.$langs->trans("DomainUser").')';
|
print ' ('.$langs->trans("DomainUser").')';
|
||||||
}
|
}
|
||||||
} else { // $object->socid is not > 0 here
|
} else { // $object->socid is not > 0 here
|
||||||
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set
|
print img_picto('', 'company').$form->select_company(0, 'socid', '', ' ', 0, 0, null, 0, 'maxwidth300'); // We keep thirdparty empty, contact is already set
|
||||||
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, 'maxwidth300', false, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user