Merge remote-tracking branch 'Dolibarr/11.0' into 11

This commit is contained in:
Francis Appels 2020-03-12 20:39:35 +01:00
commit ee3226900c
28 changed files with 73 additions and 49 deletions

View File

@ -156,7 +156,7 @@ if ($action == 'update')
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'int'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'int'), 'chaine', 0, '', $conf->entity);
//dolibarr_set_const($db, "MAIN_SHOW_LOGO", GETPOST("MAIN_SHOW_LOGO", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_SHOW_LOGO", GETPOST("MAIN_SHOW_LOGO", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities

View File

@ -34,6 +34,7 @@ function printBookmarksList()
if (! empty($conf->use_javascript_ajax)) { // Bookmark autosubmit can't work when javascript is off.
require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5;
$langs->load("bookmarks");

View File

@ -306,7 +306,7 @@ if (empty($reshook))
if (empty($array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0;
if (empty($array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code])) $array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] = 0;
$array_of_total_ht_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->total_ht;
$array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->multicurrency_subprice;
$array_of_total_ht_devise_per_vat_rate[$line->tva_tx.'_'.$line->vat_src_code] += $line->multicurrency_total_ht;
}
//var_dump($array_of_total_ht_per_vat_rate);exit;

View File

@ -72,6 +72,7 @@ class box_commandes extends ModeleBoxes
public function loadBox($max = 5)
{
global $user, $langs, $conf;
$langs->load('orders');
$this->max = $max;

View File

@ -77,6 +77,7 @@ class box_shipments extends ModeleBoxes
$this->max = $max;
include_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
$shipmentstatic = new Expedition($this->db);

View File

@ -176,6 +176,7 @@ class Canvas
global $db, $conf, $langs, $user, $canvas;
global $form, $formfile;
//var_dump($this->card.'-'.$action);
include $this->template_dir.(!empty($this->card)?$this->card.'_':'').$this->_cleanaction($action).'.tpl.php'; // Include native PHP template
}

View File

@ -2916,7 +2916,7 @@ abstract class CommonObject
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_ORDER";
elseif ($this->element == 'facture' || $this->element == 'invoice')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_INVOICE";
elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice')
elseif ($this->element == 'facture_fourn' || $this->element == 'supplier_invoice' || $this->element == 'invoice_supplier')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_INVOICE";
elseif ($this->element == 'order_supplier' || $this->element == 'supplier_order')
$MODULE = "MODULE_DISALLOW_UPDATE_PRICE_SUPPLIER_ORDER";
@ -6753,7 +6753,8 @@ abstract class CommonObject
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= '&nbsp;<font color="red">*</font>';
} else {
if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired';
$out .= '">';
$out .= '"';
$out .= '>';
if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]);
else $out .= $labeltoshow;
}

View File

@ -202,7 +202,7 @@ class Form
$ret .= '<input type="hidden" name="'.$paramid.'" value="'.$object->id.'">';
if (empty($notabletag)) $ret .= '<table class="nobordernopadding centpercent" cellpadding="0" cellspacing="0">';
if (empty($notabletag)) $ret .= '<tr><td>';
if (preg_match('/^(string|email)/', $typeofdata))
if (preg_match('/^(string|safehtmlstring|email)/', $typeofdata))
{
$tmp = explode(':', $typeofdata);
$ret .= '<input type="text" id="'.$htmlname.'" name="'.$htmlname.'" value="'.($editvalue ? $editvalue : $value).'"'.($tmp[1] ? ' size="'.$tmp[1].'"' : '').'>';
@ -276,6 +276,7 @@ class Form
if (preg_match('/^(email)/', $typeofdata)) $ret .= dol_print_email($value, 0, 0, 0, 0, 1);
elseif (preg_match('/^(amount|numeric)/', $typeofdata)) $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : '');
elseif (preg_match('/^text/', $typeofdata) || preg_match('/^note/', $typeofdata)) $ret .= dol_htmlentitiesbr($value);
elseif (preg_match('/^safehtmlstring/', $typeofdata)) $ret .= dol_string_onlythesehtmltags($value);
elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') $ret .= dol_print_date($value, 'day');
elseif ($typeofdata == 'dayhour' || $typeofdata == 'datehourpicker') $ret .= dol_print_date($value, 'dayhour');
elseif (preg_match('/^select;/', $typeofdata))
@ -2906,7 +2907,7 @@ class Form
$objp->fprice = $price_result;
if ($objp->quantity >= 1)
{
$objp->unitprice = $objp->fprice / $objp->quantity;
$objp->unitprice = $objp->fprice / $objp->quantity; // Replace dynamically unitprice
}
}
}
@ -2973,7 +2974,7 @@ class Form
if (empty($objp->idprodfournprice) && empty($alsoproductwithnosupplierprice)) $opt .= ' disabled';
if (!empty($objp->idprodfournprice) && $objp->idprodfournprice > 0)
{
$opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqpercent="'.$objp->remise_percent.'"';
$opt .= ' pbq="'.$objp->idprodfournprice.'" data-pbq="'.$objp->idprodfournprice.'" data-pbqqty="'.$objp->quantity.'" data-pbqup="'.$objp->unitprice.'" data-pbqpercent="'.$objp->remise_percent.'"';
}
$opt .= ' data-html="'.dol_escape_htmltag($optlabel).'"';
$opt .= '>';
@ -2988,7 +2989,7 @@ class Form
// "key" value of json key array is used by jQuery automatically as selected value
// "label" value of json key array is used by jQuery automatically as text for combo box
$out .= $opt;
array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false)));
array_push($outarray, array('key'=>$outkey, 'value'=>$outref, 'label'=>$outval, 'qty'=>$outqty, 'up'=>$objp->unitprice, 'discount'=>$outdiscount, 'type'=>$outtype, 'duration_value'=>$outdurationvalue, 'duration_unit'=>$outdurationunit, 'disabled'=>(empty($objp->idprodfournprice) ?true:false)));
// Exemple of var_dump $outarray
// array(1) {[0]=>array(6) {[key"]=>string(1) "2" ["value"]=>string(3) "ppp"
// ["label"]=>string(76) "ppp (<strong>f</strong>ff2) - ppp - 20,00 Euros/1unité (20,00 Euros/unité)"

View File

@ -5983,7 +5983,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
$substitutionarray = array_merge($substitutionarray, array(
'__USER_ID__' => (string) $user->id,
'__USER_LOGIN__' => (string) $user->login,
'__USER_LASTNAME__' => (string) $user->lastname,
'__USER_EMAIL__' => (string) $user->email,
'__USER_LASTNAME__' => (string) $user->lastname,
'__USER_FIRSTNAME__' => (string) $user->firstname,
'__USER_FULLNAME__' => (string) $user->getFullName($outputlangs),
'__USER_SUPERVISOR_ID__' => (string) ($user->fk_user ? $user->fk_user : '0'),

View File

@ -163,7 +163,7 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c
$content = str_replace('href="'.DOL_URL_ROOT.'/document.php', 'href="!~!~!~'.DOL_URL_ROOT.'/document.php', $content);
// Replace relative link '/' with dolibarr URL
$content = preg_replace('/(href=")\/\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'"', $content, -1, $nbrep);
$content = preg_replace('/(href=")\/(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageid='.$website->fk_default_home.'\2"', $content, -1, $nbrep);
// Replace relative link /xxx.php#aaa or /xxx.php with dolibarr URL (we discard param ?...)
$content = preg_replace('/(href=")\/?([^:\"\!]*)\.php(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/website/index.php?website='.$website->ref.'&pageref=\2\3"', $content, -1, $nbrep);
// Replace relative link /xxx.php?a=b&c=d#aaa or /xxx.php?a=b&c=d with dolibarr URL

View File

@ -281,7 +281,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
-- Balance
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Export accounting documents
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/compta-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__);
-- Reports
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);

View File

@ -1372,7 +1372,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if (!empty($conf->comptabilite->enabled))
{
// Files
if ((!empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 1) || !empty($conf->global->ACCOUNTANCY_SHOW_EXPORT_FILES_MENU))
if (empty($conf->global->ACCOUNTANCY_HIDE_EXPORT_FILES_MENU))
{
$newmenu->add("/compta/accounting-files.php?mainmenu=accountancy&amp;leftmenu=accountancy_files", $langs->trans("AccountantFiles"), 0, $user->rights->compta->resultat->lire, '', $mainmenu, 'files');
}

View File

@ -37,11 +37,14 @@ if (empty($conf) || !is_object($conf))
<?php
// Other attributes
$parameters = array();
if (! isset($parameters)) $parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
$params = isset($tpl_context) ? array('tpl_context' => $tpl_context) : array(); // BUG #11554 : Add tpl_context in params
$params = array();
if (isset($tpl_context)) $params['tpl_context'] = $tpl_context;
$params['cols']=$parameters['colspanvalue'];
print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params
}

View File

@ -37,11 +37,13 @@ if (empty($conf) || ! is_object($conf))
<?php
// Other attributes
$parameters = array();
if (! isset($parameters)) $parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook)) {
print $object->showOptionals($extrafields, 'edit');
$params=array();
$params['cols']=$parameters['colspanvalue'];
print $object->showOptionals($extrafields, 'edit', $params);
}
?>

View File

@ -261,7 +261,7 @@ if ($nolinesbefore) {
if ($senderissupplier != 2)
{
$ajaxoptions = array(
'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
'update' => array('qty'=>'qty', 'remise_percent' => 'discount', 'idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for example shown we select a disabled option into combo)
);
@ -761,7 +761,7 @@ if (!empty($usemargins) && $user->rights->margins->creer)
/* To process customer price per quantity (CUSTOMER_PRICE_PER_QTY works only if combo product is not an ajax after x key pressed) */
var pbq = parseInt($('option:selected', this).attr('data-pbq'));
var pbqup = parseInt($('option:selected', this).attr('data-pbqup'));
var pbqup = parseFloat($('option:selected', this).attr('data-pbqup'));
var pbqbase = $('option:selected', this).attr('data-pbqbase');
var pbqqty = parseFloat($('option:selected', this).attr('data-pbqqty'));
var pbqpercent = parseFloat($('option:selected', this).attr('data-pbqpercent'));

View File

@ -1967,7 +1967,7 @@ elseif ($id || $ref)
// Tracking Number
print '<tr><td class="titlefield">'.$form->editfieldkey("TrackingNumber", 'tracking_number', $object->tracking_number, $object, $user->rights->expedition->creer).'</td><td colspan="3">';
print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->rights->expedition->creer, 'string', $object->tracking_number);
print $form->editfieldval("TrackingNumber", 'tracking_number', $object->tracking_url, $object, $user->rights->expedition->creer, 'safehtmlstring', $object->tracking_number);
print '</td></tr>';
// Incoterms

View File

@ -1061,9 +1061,11 @@ if ($action == 'create')
}
else
{
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
print '<input type="hidden" name="token" value="'.newToken().'">';
dol_fiche_head('');
print '<form name="fichinter" action="'.$_SERVER['PHP_SELF'].'" method="POST">';
if (is_object($objectsrc))
{
print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">';

View File

@ -1364,7 +1364,7 @@ class CommandeFournisseur extends CommonOrder
false,
$this->lines[$i]->date_start,
$this->lines[$i]->date_end,
0,
$this->lines[$i]->array_options,
$this->lines[$i]->fk_unit
);
if ($result < 0)
@ -1474,9 +1474,9 @@ class CommandeFournisseur extends CommonOrder
$this->db->begin();
// get lines so they will be clone
foreach($this->lines as $line)
$line->fetch_optionals();
// get extrafields so they will be clone
foreach($this->lines as $line)
$line->fetch_optionals();
// Load source object
$objFrom = clone $this;

View File

@ -859,7 +859,10 @@ class FactureFournisseur extends CommonInvoice
$line->multicurrency_total_tva = $obj->multicurrency_total_tva;
$line->multicurrency_total_ttc = $obj->multicurrency_total_ttc;
$this->lines[$i] = $line;
// Extra fields
$line->fetch_optionals();
$this->lines[$i] = $line;
$i++;
}

View File

@ -522,6 +522,7 @@ if ($step == 3 && $datatoimport)
print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', '');
print '<div class="underbanner clearboth"></div>';
print '<div class="fichecenter">';
print '<table width="100%" class="border tableforfield">';
@ -540,6 +541,13 @@ if ($step == 3 && $datatoimport)
dol_fiche_end();
if ($format == 'xlsx' && ! class_exists('XMLWriter')) {
$langs->load("install");
print info_admin($langs->trans("ErrorPHPDoesNotSupport", 'php-xml'), 0, 0, 1, 'error');
}
print '<br>';
print '<form name="userfile" action="'.$_SERVER["PHP_SELF"].'" enctype="multipart/form-data" METHOD="POST">';

View File

@ -25,6 +25,7 @@ ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl.
ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions.
ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr.
ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions.
ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions.
ErrorDirDoesNotExists=Directory %s does not exist.
ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters.
ErrorWrongValueForParameter=You may have typed a wrong value for parameter '%s'.

View File

@ -268,7 +268,7 @@ WEBSITE_PAGEURL=URL of page
WEBSITE_TITLE=Title
WEBSITE_DESCRIPTION=Description
WEBSITE_IMAGE=Image
WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITEKEY__ in the path if path depends on website name.
WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png).
WEBSITE_KEYWORDS=Keywords
LinesToImport=Lines to import

View File

@ -545,7 +545,7 @@ if (empty($reshook))
if ($result < 1)
{
$db->rollback();
setEventMessage($langs->trans('ErrorProductClone'), null, 'errors');
setEventMessages($langs->trans('ErrorProductClone'), null, 'errors');
header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId);
exit;
}

View File

@ -665,9 +665,9 @@ if ($action == 'charge' && !empty($conf->stripe->enabled))
if ($paymentintent->status != 'succeeded')
{
$error++;
$errormessage = "StatusOfRetreivedIntent is not succeeded: ".$e->getMessage();
$errormessage = "StatusOfRetreivedIntent is not succeeded: ".$paymentintent->status;
dol_syslog($errormessage, LOG_WARNING, 0, '_stripe');
setEventMessages($e->getMessage(), null, 'errors');
setEventMessages($paymentintent->status, null, 'errors');
$action = '';
}
else

View File

@ -1557,14 +1557,9 @@ else
print '</td></tr>';
}
// Other attributes
$parameters = array('colspan' => ' colspan="3"', 'cols' => '3');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
// Other attributes
$parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_create.tpl.php';
// Assign a sale representative
print '<tr>';
@ -2218,14 +2213,9 @@ else
print '</td></tr>';
}
// Other attributes
$parameters = array('colspan' => ' colspan="3"', 'cols' => '3');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook))
{
print $object->showOptionals($extrafields, 'edit', $parameters);
}
// Other attributes
$parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
// Webservices url/key
if (!empty($conf->syncsupplierwebservices->enabled)) {

View File

@ -1696,7 +1696,7 @@ class Ticket extends CommonObject
// Cache already loaded
$sql = "SELECT id as rowid, fk_user_author, datec, label, note as message, visibility";
$sql = "SELECT id as rowid, fk_user_author, datec, label, note as message, code";
$sql .= " FROM ".MAIN_DB_PREFIX."actioncomm";
$sql .= " WHERE fk_element = ".(int) $this->id;
$sql .= " AND elementtype = 'ticket'";
@ -1714,7 +1714,7 @@ class Ticket extends CommonObject
$this->cache_msgs_ticket[$i]['datec'] = $this->db->jdate($obj->datec);
$this->cache_msgs_ticket[$i]['subject'] = $obj->label;
$this->cache_msgs_ticket[$i]['message'] = $obj->message;
$this->cache_msgs_ticket[$i]['private'] = ($obj->visibility == 'private' ? 1 : 0);
$this->cache_msgs_ticket[$i]['private'] = ($obj->code == 'TICKET_MSG_PRIVATE' ? 1 : 0);
$i++;
}
return $num;

View File

@ -639,7 +639,7 @@ while ($i < min($num, $limit))
$cssforfield = '';
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center';
if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
if ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowraponall';
if (in_array($key, array('ref', 'fk_project'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowraponall';
if ($key == 'fk_statut') $cssforfield .= ($cssforfield ? ' ' : '').'center';
if (!empty($arrayfields['t.'.$key]['checked']))
{

View File

@ -841,6 +841,13 @@ if ($action == 'addcontainer')
{
$error++;
setEventMessages($object->error, $object->errors, 'errors');
} else {
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
// Generate the index.php page to be the home page
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
if ($result <= 0) setEventMessages('Failed to write file '.$fileindex, null, 'errors');
}
}
}
@ -1312,8 +1319,9 @@ if ($action == 'setashome')
{
$db->commit();
$filetpl = $pathofwebsite.'/page'.$pageid.'.tpl.php';
// Generate the index.php page to be the home page
//-------------------------------------------------
$result = dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper);
if ($result) setEventMessages($langs->trans("Saved"), null, 'mesgs');