Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
08ac0e9ee4
49 changed files with 117 additions and 110 deletions
|
|
@ -74,7 +74,7 @@ print dol_get_fiche_head($head, 'info', $langs->trans($title), -1, 'category');
|
|||
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
|
||||
$linkback = '<a href="'.dol_sanitizeUrl($backtolist).'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
$object->next_prev_filter = 'type = '.((int) $object->type);
|
||||
$object->ref = $object->label;
|
||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type).'">'.$langs->trans("Root").'</a> >> ';
|
||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ if ($object->id) {
|
|||
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
|
||||
$linkback = '<a href="'.dol_sanitizeUrl($backtolist).'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
$object->next_prev_filter = 'type = '.((int) $object->type);
|
||||
$object->ref = $object->label;
|
||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ print dol_get_fiche_head($head, 'translation', $langs->trans($title), -1, 'categ
|
|||
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
|
||||
$linkback = '<a href="'.dol_sanitizeUrl($backtolist).'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
$object->next_prev_filter = 'type = '.((int) $object->type);
|
||||
$object->ref = $object->label;
|
||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type.'">'.$langs->trans("Root").'</a> >> ';
|
||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ print dol_get_fiche_head($head, 'card', $langs->trans($title), -1, 'category');
|
|||
|
||||
$backtolist = (GETPOST('backtolist') ? GETPOST('backtolist') : DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type));
|
||||
$linkback = '<a href="'.dol_sanitizeUrl($backtolist).'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = ' type = '.$object->type;
|
||||
$object->next_prev_filter = 'type = '.((int) $object->type);
|
||||
$object->ref = $object->label;
|
||||
$morehtmlref = '<br><div class="refidno"><a href="'.DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.urlencode($type).'">'.$langs->trans("Root").'</a> >> ';
|
||||
$ways = $object->print_all_ways(" >> ", '', 1);
|
||||
|
|
|
|||
|
|
@ -713,9 +713,10 @@ if ($object->fetch($id) >= 0) {
|
|||
print '</td>';
|
||||
|
||||
//Statut
|
||||
print '<td class="liste_titre right">';
|
||||
print $formmailing->selectDestinariesStatus($search_dest_status, 'search_dest_status', 1);
|
||||
print '<td class="liste_titre center parentonrightofpage">';
|
||||
print $formmailing->selectDestinariesStatus($search_dest_status, 'search_dest_status', 1, 'width100 onrightofpage');
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
|
|
@ -739,12 +740,12 @@ if ($object->fetch($id) >= 0) {
|
|||
print_liste_field_titre("Lastname", $_SERVER["PHP_SELF"], "mc.lastname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Firstname", $_SERVER["PHP_SELF"], "mc.firstname", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("OtherInformations", $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Source", $_SERVER["PHP_SELF"], "", $param, "", '', $sortfield, $sortorder, 'center ');
|
||||
// Date last update
|
||||
print_liste_field_titre("DateLastModification", $_SERVER["PHP_SELF"], "mc.tms", $param, "", 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateLastModification", $_SERVER["PHP_SELF"], "mc.tms", $param, "", '', $sortfield, $sortorder, 'center ');
|
||||
// Date sending
|
||||
print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, '', 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "mc.statut", $param, '', 'class="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("DateSending", $_SERVER["PHP_SELF"], "mc.date_envoi", $param, '', '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "mc.statut", $param, '', '', $sortfield, $sortorder, 'center ');
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
|
|
@ -830,22 +831,22 @@ if ($object->fetch($id) >= 0) {
|
|||
print dol_print_date(dol_stringtotime($obj->tms), 'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Status of recipient sending email (Warning != status of emailing)
|
||||
if ($obj->statut == $object::STATUS_DRAFT) {
|
||||
// Date sent
|
||||
print '<td class="center nowraponall">';
|
||||
if ($obj->statut != $object::STATUS_DRAFT) {
|
||||
// Date sent
|
||||
print '<td align="center"></td>';
|
||||
|
||||
print '<td class="nowrap right">';
|
||||
print $object::libStatutDest($obj->statut, 2, '');
|
||||
print '</td>';
|
||||
} else {
|
||||
// Date sent
|
||||
print '<td class="center nowraponall">'.$obj->date_envoi.'</td>';
|
||||
|
||||
print '<td class="nowrap right">';
|
||||
print $object::libStatutDest($obj->statut, 2, $obj->error_text);
|
||||
print '</td>';
|
||||
print $obj->date_envoi;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Status of recipient sending email (Warning != status of emailing)
|
||||
print '<td class="nowrap center">';
|
||||
if ($obj->statut == $object::STATUS_DRAFT) {
|
||||
print $object::libStatutDest($obj->statut, 2, '');
|
||||
} else {
|
||||
print $object::libStatutDest($obj->statut, 2, $obj->error_text);
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
|
|
|
|||
|
|
@ -223,11 +223,11 @@ class Mailing extends CommonObject
|
|||
$this->statuts[2] = 'MailingStatusSentPartialy';
|
||||
$this->statuts[3] = 'MailingStatusSentCompletely';
|
||||
|
||||
$this->statut_dest[-1] = 'MailingStatusError';
|
||||
$this->statut_dest[0] = 'MailingStatusNotSent';
|
||||
$this->statut_dest[1] = 'MailingStatusSent';
|
||||
$this->statut_dest[2] = 'MailingStatusRead';
|
||||
$this->statut_dest[3] = 'MailingStatusReadAndUnsubscribe'; // Read but ask to not be contacted anymore
|
||||
$this->statut_dest[-1] = 'MailingStatusError';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -111,8 +111,8 @@ $search_town = GETPOST('search_town', 'alpha');
|
|||
$search_zip = GETPOST('search_zip', 'alpha');
|
||||
$search_state = GETPOST("search_state");
|
||||
$search_country = GETPOST("search_country", 'alpha');
|
||||
$search_customer_code = GETPOST("search_customer_code", 'alphanohtml');
|
||||
$search_type_thirdparty = GETPOST("search_type_thirdparty", 'int');
|
||||
$search_company_code_client = GETPOST("search_type_thirdparty", 'alpha');
|
||||
$search_user = GETPOST('search_user', 'int');
|
||||
$search_sale = GETPOST('search_sale', 'int');
|
||||
$search_date_startday = GETPOST('search_date_startday', 'int');
|
||||
|
|
@ -348,6 +348,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter',
|
|||
$search_state = "";
|
||||
$search_country = '';
|
||||
$search_type_thirdparty = '';
|
||||
$search_customer_code = '';
|
||||
$search_date_startday = '';
|
||||
$search_date_startmonth = '';
|
||||
$search_date_startyear = '';
|
||||
|
|
@ -697,8 +698,8 @@ if (empty($arrayfields['s.name_alias']['checked']) && $search_company) {
|
|||
if ($search_parent_name) {
|
||||
$sql .= natural_search('s2.nom', $search_parent_name);
|
||||
}
|
||||
if ($search_company_code_client) {
|
||||
$sql .= natural_search('s.code_client', $search_company_code_client);
|
||||
if ($search_customer_code) {
|
||||
$sql .= natural_search('s.code_client', $search_customer_code);
|
||||
}
|
||||
if ($search_town) {
|
||||
$sql .= natural_search('s.town', $search_town);
|
||||
|
|
@ -1093,6 +1094,9 @@ if ($resql) {
|
|||
if ($search_type_thirdparty != '') {
|
||||
$param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty);
|
||||
}
|
||||
if ($search_customer_code) {
|
||||
$param .= '&search_customer_code='.urlencode($search_customer_code);
|
||||
}
|
||||
if ($search_sale > 0) {
|
||||
$param .= '&search_sale='.urlencode($search_sale);
|
||||
}
|
||||
|
|
@ -1422,7 +1426,7 @@ if ($resql) {
|
|||
}
|
||||
// Customer Code
|
||||
if (!empty($arrayfields['s.code_client']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company_code_client" value="'.dol_escape_htmltag($search_company_code_client).'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_customer_code" value="'.dol_escape_htmltag($search_customer_code).'"></td>';
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
|
|
|
|||
|
|
@ -2090,7 +2090,8 @@ abstract class CommonObject
|
|||
/**
|
||||
* Load properties id_previous and id_next by comparing $fieldid with $this->ref
|
||||
*
|
||||
* @param string $filter Optional filter. Example: " AND (t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
|
||||
* @param string $filter Optional SQL filter. Example: "(t.field1 = 'aa' OR t.field2 = 'bb')". Do not allow user input data here.
|
||||
* Use SQL and not Universal Search Filter. @TODO Replace this with an USF string after changing all ->next_prev_filter
|
||||
* @param string $fieldid Name of field to use for the select MAX and MIN
|
||||
* @param int $nodbprefix Do not include DB prefix to forge table name
|
||||
* @return int <0 if KO, >0 if OK
|
||||
|
|
@ -2155,7 +2156,7 @@ abstract class CommonObject
|
|||
}
|
||||
if (!empty($filter)) {
|
||||
if (!preg_match('/^\s*AND/i', $filter)) {
|
||||
$sql .= " AND "; // For backward compatibility
|
||||
$sql .= " AND ";
|
||||
}
|
||||
$sql .= $filter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4622,20 +4622,20 @@ class Form
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a HTML select list of shipping mode
|
||||
* Return a HTML select list of shipping mode
|
||||
*
|
||||
* @param string $selected Id shipping mode pre-selected
|
||||
* @param string $htmlname Name of select zone
|
||||
* @param string $filtre To filter list. This parameter must not come from input of users
|
||||
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
||||
* @param string $moreattrib To add more attribute on select
|
||||
* @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
|
||||
* @param string $morecss More CSS
|
||||
* @return void
|
||||
* @param string $selected Id shipping mode pre-selected
|
||||
* @param string $htmlname Name of select zone
|
||||
* @param string $filtre To filter list. This parameter must not come from input of users
|
||||
* @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries.
|
||||
* @param string $moreattrib To add more attribute on select
|
||||
* @param int $noinfoadmin 0=Add admin info, 1=Disable admin info
|
||||
* @param string $morecss More CSS
|
||||
* @return void
|
||||
*/
|
||||
public function selectShippingMethod($selected = '', $htmlname = 'shipping_method_id', $filtre = '', $useempty = 0, $moreattrib = '', $noinfoadmin = 0, $morecss = '')
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
global $langs, $user;
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("deliveries");
|
||||
|
|
@ -8241,7 +8241,7 @@ class Form
|
|||
}
|
||||
}
|
||||
$idname = str_replace(array('[', ']'), array('', ''), $htmlname);
|
||||
$out .= '<select id="' . preg_replace('/^\./', '', $idname) . '" ' . ($disabled ? 'disabled="disabled" ' : '') . 'class="flat ' . (preg_replace('/^\./', '', $htmlname)) . ($morecss ? ' ' . $morecss : '') . ' xxxselectformat"';
|
||||
$out .= '<select id="' . preg_replace('/^\./', '', $idname) . '" ' . ($disabled ? 'disabled="disabled" ' : '') . 'class="flat ' . (preg_replace('/^\./', '', $htmlname)) . ($morecss ? ' ' . $morecss : '') . ' selectformat"';
|
||||
$out .= ' name="' . preg_replace('/^\./', '', $htmlname) . '" ' . ($moreparam ? $moreparam : '');
|
||||
$out .= '>'."\n";
|
||||
|
||||
|
|
@ -9986,7 +9986,7 @@ class Form
|
|||
*/
|
||||
public function showCheckAddButtons($cssclass = 'checkforaction', $calljsfunction = 0, $massactionname = "massaction")
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf;
|
||||
|
||||
$out = '';
|
||||
|
||||
|
|
@ -10377,7 +10377,7 @@ class Form
|
|||
*/
|
||||
public function selectInvoiceRec($selected = '', $htmlname = 'facrecid', $maxlength = 24, $option_only = 0, $show_empty = '1', $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500')
|
||||
{
|
||||
global $user, $conf, $langs;
|
||||
global $conf, $langs;
|
||||
|
||||
$out = '';
|
||||
|
||||
|
|
|
|||
|
|
@ -36,12 +36,13 @@ class FormMailing extends Form
|
|||
/**
|
||||
* Output a select with destinaries status
|
||||
*
|
||||
* @param string $selectedid The selected id
|
||||
* @param string $htmlname Name of controm
|
||||
* @param integer $show_empty Show empty option
|
||||
* @param string $selectedid The selected id
|
||||
* @param string $htmlname Name of controm
|
||||
* @param integer $show_empty Show empty option
|
||||
* @param string $morecss More CSS
|
||||
* @return string HTML select
|
||||
*/
|
||||
public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0)
|
||||
public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0, $morecss = 'minwidth75')
|
||||
{
|
||||
global $langs;
|
||||
|
||||
|
|
@ -55,6 +56,6 @@ class FormMailing extends Form
|
|||
$options = $options + $mailing->statut_dest;
|
||||
|
||||
// Note -1 is used for error, so we use -2 for tempty value
|
||||
return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1);
|
||||
return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1, 0, 0, '', $morecss);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->project->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->project->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->project->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@ if ($projectid > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->project->all->lire)) {
|
||||
$objectsListId = $project->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$project->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$project->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($project, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ if (!empty($withproject)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ class Partnership extends CommonObject
|
|||
'date_partnership_end' => array('type'=>'date', 'label'=>'DatePartnershipEnd', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>1,),
|
||||
'url_to_check' => array('type'=>'url', 'label'=>'UrlToCheck', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150'),
|
||||
'count_last_url_check_error' => array('type'=>'integer', 'label'=>'CountLastUrlCheckError', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>71, 'notnull'=>0, 'visible'=>-4, 'default'=>'0',),
|
||||
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>72, 'notnull'=>0, 'visible'=>-4,),
|
||||
'last_check_backlink' => array('type'=>'datetime', 'label'=>'LastCheckBacklink', 'enabled'=>'getDolGlobalString("PARTNERSHIP_BACKLINKS_TO_CHECK")', 'position'=>72, 'notnull'=>0, 'visible'=>-4, 'csslist'=>'nowraponall'),
|
||||
'reason_decline_or_cancel' => array('type'=>'text', 'label'=>'ReasonDeclineOrCancel', 'enabled'=>'1', 'position'=>73, 'notnull'=>0, 'visible'=>-2,),
|
||||
'ip' => array('type'=>'ip', 'label'=>'IPOfApplicant', 'enabled'=>'1', 'position'=>74, 'notnull'=>0, 'visible'=>-2,),
|
||||
'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>2, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'Approved', '3'=>'Refused', '9'=>'Terminated'),),
|
||||
|
|
|
|||
|
|
@ -444,12 +444,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
}
|
||||
*/
|
||||
$morehtmlref .= '</div>';
|
||||
if (!isset($npfilter)) {
|
||||
$npfilter = "";
|
||||
}
|
||||
|
||||
if ($managedfor == 'member') $npfilter .= " AND te.fk_member > 0 "; else $npfilter .= " AND te.fk_soc > 0 ";
|
||||
$object->next_prev_filter = $npfilter;
|
||||
if ($managedfor == 'member') {
|
||||
$object->next_prev_filter = "te.fk_member > 0";
|
||||
} else {
|
||||
$object->next_prev_filter = "te.fk_soc > 0";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ if ($id > 0 || $ref) {
|
|||
print dol_get_fiche_head($head, 'agenda', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
|
|||
print dol_get_fiche_head($head, 'card', $titre, -1, 'product');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
|
|||
print dol_get_fiche_head($head, 'card', $titre, -1, 'service');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = " fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -2353,7 +2353,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print dol_get_fiche_head($head, 'card', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ if ($object->id) {
|
|||
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ if ($id > 0 || $ref) {
|
|||
print dol_get_fiche_head($head, 'suppliers', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print dol_get_fiche_head($head, 'note', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -873,7 +873,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
|
|||
print dol_get_fiche_head($head, 'price', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
$shownav = 1;
|
||||
if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -1251,7 +1251,7 @@ if ($action == 'create' && $user->rights->projet->creer) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " te.rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "te.rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ $morehtmlref .= '</div>';
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -292,9 +292,9 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id);
|
||||
$object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -326,9 +326,9 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = ".$projectstatic->id;
|
||||
$object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -284,9 +284,9 @@ if ($object->id > 0) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = ".$projectstatic->id;
|
||||
$object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ if ($object->id > 0) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
@ -270,7 +270,7 @@ if ($object->id > 0) {
|
|||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = ".$projectstatic->id;
|
||||
$object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ?join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||
|
|
@ -537,9 +537,9 @@ if ($id > 0 || !empty($ref)) {
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
$object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = ".((int) $projectstatic->id);
|
||||
$object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -953,7 +953,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$projectstatic->next_prev_filter = " rowid IN (" . $db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0') . ")";
|
||||
$projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0') . ")";
|
||||
}
|
||||
|
||||
dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param);
|
||||
|
|
@ -1137,9 +1137,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
|
|||
|
||||
if (!GETPOST('withproject') || empty($projectstatic->id)) {
|
||||
$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
|
||||
$object->next_prev_filter = " fk_projet IN (" . $db->sanitize($projectsListId) . ")";
|
||||
$object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")";
|
||||
} else {
|
||||
$object->next_prev_filter = " fk_projet = " . ((int) $projectstatic->id);
|
||||
$object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id);
|
||||
}
|
||||
|
||||
$morehtmlref = '';
|
||||
|
|
|
|||
|
|
@ -166,9 +166,9 @@ if ($socid > 0) {
|
|||
}
|
||||
|
||||
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
|
||||
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
|
||||
$object->next_prev_filter = "te.fk_user_assign = ".((int) $user->id);
|
||||
} elseif ($user->socid > 0) {
|
||||
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";
|
||||
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
$head = ticket_prepare_head($object);
|
||||
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ if ($action == 'create' || $action == 'presend') {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $projectstat->getProjectsAuthorizedForUser($user, $mine, 0);
|
||||
$projectstat->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$projectstat->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
print $form->showrefnav($projectstat, 'ref', $linkback, 1, 'ref', 'ref', '');
|
||||
print '</td></tr>';
|
||||
|
|
@ -926,9 +926,9 @@ if ($action == 'create' || $action == 'presend') {
|
|||
}
|
||||
|
||||
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
|
||||
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
|
||||
$object->next_prev_filter = "te.fk_user_assign = ".((int) $user->id);
|
||||
} elseif ($user->socid > 0) {
|
||||
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";
|
||||
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
|
||||
$head = ticket_prepare_head($object);
|
||||
|
|
|
|||
|
|
@ -195,9 +195,9 @@ if ($id > 0 || !empty($track_id) || !empty($ref)) {
|
|||
}
|
||||
|
||||
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
|
||||
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
|
||||
$object->next_prev_filter = "te.fk_user_assign ='".((int) $user->id);
|
||||
} elseif ($user->socid > 0) {
|
||||
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";
|
||||
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
|
||||
$head = ticket_prepare_head($object);
|
||||
|
|
|
|||
|
|
@ -133,9 +133,9 @@ if ($object->id) {
|
|||
}
|
||||
|
||||
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
|
||||
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
|
||||
$object->next_prev_filter = "te.fk_user_assign = ".((int) $user->id);
|
||||
} elseif ($user->socid > 0) {
|
||||
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";
|
||||
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
|
||||
$head = ticket_prepare_head($object);
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ if ($projectid > 0 || $project_ref) {
|
|||
// Define a complementary filter for search of next/prev ref.
|
||||
if (empty($user->rights->projet->all->lire)) {
|
||||
$objectsListId = $object->getProjectsAuthorizedForUser($user, 0, 0);
|
||||
$object->next_prev_filter = " rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
$object->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? join(',', array_keys($objectsListId)) : '0').")";
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
|
|
|||
|
|
@ -162,9 +162,9 @@ if ($socid > 0) {
|
|||
}
|
||||
|
||||
if (!$user->socid && !empty($conf->global->TICKET_LIMIT_VIEW_ASSIGNED_ONLY)) {
|
||||
$object->next_prev_filter = "te.fk_user_assign = '".$user->id."'";
|
||||
$object->next_prev_filter = "te.fk_user_assign = ".((int) $user->id);
|
||||
} elseif ($user->socid > 0) {
|
||||
$object->next_prev_filter = "te.fk_soc = '".$user->socid."'";
|
||||
$object->next_prev_filter = "te.fk_soc = ".((int) $user->socid);
|
||||
}
|
||||
$head = ticket_prepare_head($object);
|
||||
|
||||
|
|
|
|||
|
|
@ -416,8 +416,8 @@ if (!empty($id) || !empty($ref)) {
|
|||
|
||||
print dol_get_fiche_head($head, 'combinations', $titre, -1, $picto);
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = " fk_product_type = ".$object->type;
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?type='.((int) $object->type).'">'.$langs->trans("BackToList").'</a>';
|
||||
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', '', '', '', 0, '', '');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue