diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index 0f541b93708..0fd34788adf 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -148,7 +148,7 @@ foreach ($modulesdir as $dir) }*/ //$listofapis[]=array('classname'=>$classname, 'fullpath'=>$file_searched); - /* } + /* } }*/ } diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index c0e81bc77cb..7660144f7ca 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -262,9 +262,9 @@ class DolibarrApi if ($tmp[$i]==')') $counter--; if ($counter < 0) { - $error="Bad sqlfilters=".$sqlfilters; - dol_syslog($error, LOG_WARNING); - return false; + $error="Bad sqlfilters=".$sqlfilters; + dol_syslog($error, LOG_WARNING); + return false; } $i++; } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 1d4bb6a8cb7..60f5a54eeba 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -383,7 +383,7 @@ class Setup extends DolibarrApi return $list; } - + /** * Get the list of contacts types. * @@ -533,13 +533,15 @@ class Setup extends DolibarrApi if (!empty($multicurrency)) $sql.= " , cr.date_sync, cr.rate "; $sql.= " FROM ".MAIN_DB_PREFIX."c_currencies as t"; if (!empty($multicurrency)) { - $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; - $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; + $sql.= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; } $sql.= " WHERE t.active = ".$active; if (!empty($multicurrency)) { - $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; - if (!empty($multicurrency) && $multicurrency != 2) $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + $sql.= " AND m.entity IN (".getEntity('multicurrency').")"; + if (!empty($multicurrency) && $multicurrency != 2) { + $sql.= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + } } // Add sql filters @@ -924,7 +926,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid, code, pos, label, use_default, description"; $sql.= " FROM ".MAIN_DB_PREFIX."c_ticket_category as t"; - $sql.= " WHERE t.active = ".$active; + $sql.= " WHERE t.active = ".$active; // Add sql filters if ($sqlfilters) { diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 1f0c82e780b..6ce788a5790 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -574,7 +574,7 @@ jQuery(document).ready(function () { if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) { -?> + ?> -thirdparty as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'name','name_alias','ref_ext','address','zip','town','state_code','country_code','idprof1','idprof2','idprof3','idprof4','idprof5','idprof6','phone','fax','email','barcode', 'tva_intra', 'localtax1_assuj', 'localtax1_value', 'localtax2_assuj', 'localtax2_value', 'managers', 'capital', 'typent_code', 'forme_juridique_code', 'code_client', 'code_fournisseur' ))) continue; // Discard if not into a dedicated list @@ -592,7 +592,7 @@ class BlockedLog foreach($tmpobject as $key=>$value) { if (in_array($key, $arrayoffieldstoexclude)) continue; // Discard some properties - if (! in_array($key, array( + if (! in_array($key, array( 'ref','ref_client','ref_supplier','date','datef','type','total_ht','total_tva','total_ttc','localtax1','localtax2','revenuestamp','datepointoftax','note_public' ))) continue; // Discard if not into a dedicated list if (!is_object($value)) diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index b7eb1608e9e..cd654c7a596 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -47,22 +47,20 @@ $colspan = 3; // Columns: total ht + col edit + col delete // Lines for extrafield $objectline = new BOMLine($this->db); -?> - -\n"; + $nolinesbefore=(count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { -?> - - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - - -
trans('AddNewLine'); ?>trans("FreeZone"); ?> - - trans('Qty'); ?> - '; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; + print '
'.$langs->trans('AddNewLine').''; + // echo $langs->trans("FreeZone"); + print ''; + print ''.$langs->trans('Qty').''; if ($conf->global->PRODUCT_USE_UNITS) { print ''; @@ -70,76 +68,68 @@ if ($nolinesbefore) { print $langs->trans('Unit'); print ''; } - ?> - textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')); ?> -   - -'.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).''; + print ' '; + print ''; } -?> - -global->MAIN_VIEW_LINE_NUMBER)) { - $coldisplay++; - echo ''; - } +print ''; +$coldisplay=0; +// Adds a line numbering column +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $coldisplay++; - ?> - + echo ''; +} - product->enabled) || ! empty($conf->service->enabled)) +$coldisplay++; +print ''; + +// Predefined product/service +if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) +{ + if ($forceall >= 0 && $freelines) echo '
'; + echo ''; + $filtertype=''; + if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; + + $statustoshow = -1; + if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) { - if ($forceall >= 0 && $freelines) echo '
'; - echo ''; - $filtertype=''; - if (! empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype='1'; - - $statustoshow = -1; - if (! empty($conf->global->ENTREPOT_EXTRA_STATUS)) - { - // hide products in closed warehouse, but show products for internal transfer - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); - } - else - { - $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); - } - - echo ''; + // hide products in closed warehouse, but show products for internal transfer + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); + } + else + { + $form->select_produits(GETPOST('idprod'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } - $coldisplay++; - ?> - "> - - global->PRODUCT_USE_UNITS) - { - $coldisplay++; - print ''; - print $form->selectUnits($line->fk_unit, "units"); - print ''; - } + echo '
'; +} - $coldisplay++; - ?> - "> - '; +print ''; +if($conf->global->PRODUCT_USE_UNITS) +{ + $coldisplay++; + print ''; + print $form->selectUnits($line->fk_unit, "units"); + print ''; +} - $coldisplay+=$colspan; - ?> - - - - +$coldisplay++; + +print ''; +print ''; +print ''; + + +$coldisplay += $colspan; +print ''; +print ''; +print ''; +print ''; -showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 05b9094d10e..d887b9ab68d 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -49,22 +49,19 @@ $colspan = 3; // Columns: total ht + col edit + col delete // Lines for extrafield $objectline = new BOMLine($this->db); -?> - +print "\n"; - - - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - '; +// Adds a line numbering column +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''.($i+1).''; $coldisplay++; - ?> +} + +$coldisplay++; +?>
@@ -74,72 +71,66 @@ $coldisplay=0; - fk_product > 0) { - $tmpproduct = new Product($object->db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - } - - if (is_object($hookmanager)) - { - $fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line); - $parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer); - $reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); - } - - ?> - - - element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines - { - $coldisplay++; - ?> - - - - info_bits & 2) != 2) { - // I comment this because it shows info even when not required - // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated - // must also not be output for most entities (proposal, intervention, ...) - //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; - print ''; - } - ?> - - - global->PRODUCT_USE_UNITS) - { - $coldisplay++; - print ''; - print $form->selectUnits($line->fk_unit, "units"); - print ''; - } - - $coldisplay++; - ?> - - - - ">
- "> - - - fk_product > 0) { + $tmpproduct = new Product($object->db); + $tmpproduct->fetch($line->fk_product); + print $tmpproduct->getNomUrl(1); +} + +if (is_object($hookmanager)) +{ + $fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line); + $parameters=array('line'=>$line,'fk_parent_line'=>$fk_parent_line,'var'=>$var,'dateSelector'=>$dateSelector,'seller'=>$seller,'buyer'=>$buyer); + $reshook=$hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action); +} + +print ''; + +/*if ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier') // We must have same test in printObjectLines +{ + $coldisplay++; +?> + +'; +if (($line->info_bits & 2) != 2) { + // I comment this because it shows info even when not required + // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated + // must also not be output for most entities (proposal, intervention, ...) + //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; + print ''; +} +print ''; + +if ($conf->global->PRODUCT_USE_UNITS) +{ + $coldisplay++; + print ''; + print $form->selectUnits($line->fk_unit, "units"); + print ''; +} + +$coldisplay++; +print ''; +print ''; + +$coldisplay+=$colspan; +print ''; +$coldisplay+=$colspan; +print ''; +print '
'; +print ''; +print ''; +print ''; + if (is_object($objectline)) { print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } -?> - +print "\n"; diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php index 26010a70eb8..721cc5b501f 100644 --- a/htdocs/bom/tpl/objectline_title.tpl.php +++ b/htdocs/bom/tpl/objectline_title.tpl.php @@ -39,9 +39,7 @@ if (empty($object) || ! is_object($object)) print "Error, template page can't be called as URL"; exit; } -?> - -\n"; // Title line print "\n"; @@ -79,6 +77,5 @@ if ($action == 'selectlines') print "\n"; print "\n"; -?> - +print "\n"; diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 9582e69f967..f569516e535 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -59,100 +59,93 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; // Lines for extrafield $objectline = new BOMLine($object->db); -?> - - - > - global->MAIN_VIEW_LINE_NUMBER)) { ?> - - -
- db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - ?> - - - qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price - ?> - +$coldisplay=0; +print "\n"; +print ''; +if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''.($i+1).''; + $coldisplay++; +} +print ''; +print '
'; +$coldisplay++; +$tmpproduct = new Product($object->db); +$tmpproduct->fetch($line->fk_product); +print $tmpproduct->getNomUrl(1); +print ''; +print ''; +$coldisplay++; +echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price +print ''; - global->PRODUCT_USE_UNITS) - { - print ''; - $label = $line->getLabelOfUnit('short'); - if ($label !== '') { - print $langs->trans($label); +if($conf->global->PRODUCT_USE_UNITS) +{ + print ''; + $label = $line->getLabelOfUnit('short'); + if ($label !== '') { + print $langs->trans($label); + } + print ''; +} +print ''; +$coldisplay++; +echo $line->efficiency; +print ''; + +if ($this->statut == 0 && ($object_rights->write) && $action != 'selectlines' ) { + print ''; + $coldisplay++; + if (($line->info_bits & 2) == 2 || ! empty($disableedit)) { + } else { + print 'id.'#line_'.$line->id.'">'.img_edit().''; + } + print ''; + + print ''; + $coldisplay++; + if (($line->fk_prev_id == null ) && empty($disableremove)) { + //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation + print 'id . '">'; + print img_delete(); + print ''; + } + print ''; + + if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { + print ''; + $coldisplay++; + if ($i > 0) { + print 'id.'">'; + echo img_up('default', 0, 'imgupforline'); + print ''; + } + if ($i < $num-1) { + print 'id.'">'; + echo img_down('default', 0, 'imgdownforline'); + print ''; } print ''; + } else { + print 'browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"').'>'; + $coldisplay++; } - ?> - - efficiency; - ?> - - '; + $coldisplay=$coldisplay+3; +} - if ($this->statut == 0 && ($object_rights->write) && $action != 'selectlines' ) { ?> - - info_bits & 2) == 2 || ! empty($disableedit)) { ?> - - id.'#line_'.$line->id; ?>"> - - - - +if ($action == 'selectlines') { + print ''; + print ''; + print ''; +} - - fk_prev_id == null ) && empty($disableremove)) { //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation - print 'id . '">'; - print img_delete(); - print ''; - } - ?> - +print ''; - 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { ?> - - 0) { ?> - id; ?>"> - - - - - id; ?>"> - - - - - - browser->layout != 'phone' && empty($disablemove)) ?' class="linecolmove tdlineupdown center"':' class="linecolmove center"'); ?>> - - - - - - - - - -showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } -?> - +print "\n"; diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index f1f42266735..d6a2ba77f05 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -155,8 +155,8 @@ $type='directory'; // This test if file exists should be useless. We keep it to find bug more easily if (! dol_is_dir($upload_dir)) { -// dol_mkdir($upload_dir); -/* $langs->load("install"); + //dol_mkdir($upload_dir); + /*$langs->load("install"); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); exit;*/ } diff --git a/htdocs/core/ajax/box.php b/htdocs/core/ajax/box.php index d37374e45a5..200c6208896 100644 --- a/htdocs/core/ajax/box.php +++ b/htdocs/core/ajax/box.php @@ -73,7 +73,7 @@ if ($boxorder && $zone != '' && $userid > 0) $langs->load("boxes"); if (! GETPOST('closing')) { - setEventMessages($langs->trans("BoxAdded"), null); + setEventMessages($langs->trans("BoxAdded"), null); } } } diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index 9e26e1583a6..2f6dbf16943 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -318,7 +318,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') else { //issue the CKEditor Callback -SendCKEditorResults( + SendCKEditorResults( $CKEcallback, $sFileUrl, ($sErrorNumber != 0 ? 'Error '. $sErrorNumber. ' upload failed.' : 'Upload Successful') diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 17f847b9a37..b66f2abcd8b 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -401,11 +401,11 @@ EOF; */ function SendCKEditorResults($callback, $sFileUrl, $customMsg = '') { - echo ''; + echo ''; } diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index c35318dc7ae..54c0f02abde 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1039,16 +1039,16 @@ function price2numjs(amount) { if (amount == '') return ''; transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") { - $dec = $langs->transnoentitiesnoconv("SeparatorDecimal"); - } - if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") { - $thousand = $langs->transnoentitiesnoconv("SeparatorThousand"); - } - if ($thousand == 'Space') $thousand=' '; - print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript + $dec = ','; + $thousand = ' '; + if ($langs->transnoentitiesnoconv("SeparatorDecimal") != "SeparatorDecimal") { + $dec = $langs->transnoentitiesnoconv("SeparatorDecimal"); + } + if ($langs->transnoentitiesnoconv("SeparatorThousand") != "SeparatorThousand") { + $thousand = $langs->transnoentitiesnoconv("SeparatorThousand"); + } + if ($thousand == 'Space') $thousand=' '; + print "var dec='" . dol_escape_js($dec) . "'; var thousand='" . dol_escape_js($thousand) . "';\n"; // Set var in javascript ?> var main_max_dec_shown = global->MAIN_MAX_DECIMALS_SHOWN); ?>; diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 6c7f3e2c35c..cb8a80bbd78 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -140,5 +140,5 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H time_js_next_test += time_auto_update; console.log('Updated time_js_next_test. New value is '+time_js_next_test); } -id=$obj->id; print ''.$staticaction->getNomUrl(1, 34).''; - // print ''.dol_trunc($obj->label,22).''; + // print ''.dol_trunc($obj->label,22).''; print ''; if ($obj->rowid > 0) @@ -414,10 +414,10 @@ function agenda_prepare_head() if ($conf->global->MAIN_FEATURES_LEVEL > 0) { - $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; - $head[$h][1] = $langs->trans("Reminders"); - $head[$h][2] = 'reminders'; - $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/agenda_reminder.php"; + $head[$h][1] = $langs->trans("Reminders"); + $head[$h][2] = 'reminders'; + $h++; } $head[$h][0] = DOL_URL_ROOT."/admin/agenda_xcal.php"; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 2230bfac5a1..91e0b719734 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -47,13 +47,13 @@ function bank_prepare_head(Account $object) $head[$h][2] = 'journal'; $h++; -// if ($conf->global->MAIN_FEATURES_LEVEL >= 1) -// { + // if ($conf->global->MAIN_FEATURES_LEVEL >= 1) + // { $head[$h][0] = DOL_URL_ROOT . "/compta/bank/treso.php?account=" . $object->id; $head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][2] = 'cash'; $h++; -// } + // } $head[$h][0] = DOL_URL_ROOT . "/compta/bank/annuel.php?account=" . $object->id; $head[$h][1] = $langs->trans("IOMonthlyReporting"); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1730d51383d..f1fd6ed220f 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -624,7 +624,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask if (empty($arrayreplacementisregex)) { - $content = make_substitutions($content, $arrayreplacement, null); + $content = make_substitutions($content, $arrayreplacement, null); } else { @@ -1044,8 +1044,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $checkvirusarray=dolCheckVirus($src_file); if (count($checkvirusarray)) { - dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING); - return 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray); + dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING); + return 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray); } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8a17b961adb..ecdebb1c27a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -464,36 +464,36 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti $maxloop=20; $loopnb=0; // Protection against infinite loop while (preg_match('/__([A-Z0-9]+_?[A-Z0-9]+)__/i', $out, $reg) && ($loopnb < $maxloop)) // Detect '__ABCDEF__' as key 'ABCDEF' and '__ABC_DEF__' as key 'ABC_DEF'. Detection is also correct when 2 vars are side by side. { - $loopnb++; $newout = ''; + $loopnb++; $newout = ''; - if ($reg[1] == 'DAY') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mday']; } - elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; } - elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; } - elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } - elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } - elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') - { - $newout = $mysoc->country_id; - } - elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') - { - $newout = $user->id; - } - elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') - { - $newout = $user->fk_user; - } - elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') - { - $newout = $conf->entity; - } - else $newout = ''; // Key not found, we replace with empty string - //var_dump('__'.$reg[1].'__ -> '.$newout); - $out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out); + if ($reg[1] == 'DAY') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mday']; } + elseif ($reg[1] == 'MONTH') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['mon']; } + elseif ($reg[1] == 'YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = $tmp['year']; } + elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } + elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } + elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } + elseif ($reg[1] == 'NEXT_DAY') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } + elseif ($reg[1] == 'NEXT_MONTH') { $tmp=dol_getdate(dol_now(), true); $tmp2=dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } + elseif ($reg[1] == 'NEXT_YEAR') { $tmp=dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } + elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') + { + $newout = $mysoc->country_id; + } + elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') + { + $newout = $user->id; + } + elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') + { + $newout = $user->fk_user; + } + elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') + { + $newout = $conf->entity; + } + else $newout = ''; // Key not found, we replace with empty string + //var_dump('__'.$reg[1].'__ -> '.$newout); + $out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out); } } @@ -876,7 +876,7 @@ function dol_string_unaccent($str) else { // See http://www.ascii-code.com/ -$string = strtr( + $string = strtr( $str, "\xC0\xC1\xC2\xC3\xC4\xC5\xC7 \xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1 @@ -3829,7 +3829,7 @@ function dol_print_error($db = '', $error = '', $errors = null) if (! empty($conf->modules)) { - $out.="".$langs->trans("Modules").": ".join(', ', $conf->modules)."
\n"; + $out.="".$langs->trans("Modules").": ".join(', ', $conf->modules)."
\n"; } if (is_object($db)) @@ -5867,7 +5867,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, // Add SIGNATURE into substitutionarray first, so, when we will make the substitution, // this will include signature content first and then replace var found into content of signature $signature = $user->signature; -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__USER_SIGNATURE__' => (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : '') ) ); @@ -5877,7 +5877,7 @@ $substitutionarray=array_merge($substitutionarray, array( $substitutionarray['__SIGNATURE__'] = (string) (($signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? ($onlykey == 2 ? dol_trunc(dol_string_nohtmltag($signature), 30) : $signature) : ''); } -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__USER_ID__' => (string) $user->id, '__USER_LOGIN__' => (string) $user->login, '__USER_LASTNAME__' => (string) $user->lastname, @@ -5890,7 +5890,7 @@ $substitutionarray=array_merge($substitutionarray, array( } if ((empty($exclude) || ! in_array('mycompany', $exclude)) && is_object($mysoc)) { -$substitutionarray=array_merge($substitutionarray, array( + $substitutionarray=array_merge($substitutionarray, array( '__MYCOMPANY_NAME__' => $mysoc->name, '__MYCOMPANY_EMAIL__' => $mysoc->email, '__MYCOMPANY_PROFID1__' => $mysoc->idprof1, @@ -6388,11 +6388,11 @@ function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) } elseif ($nameorder == 2 || $nameorder == 3) { - $ret.=$firstname; - if (empty($ret) && $nameorder == 3) - { - $ret.=$lastname; - } + $ret.=$firstname; + if (empty($ret) && $nameorder == 3) + { + $ret.=$lastname; + } } else { diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php index 5eb45b261a0..2ec1532a9a9 100644 --- a/htdocs/core/lib/json.lib.php +++ b/htdocs/core/lib/json.lib.php @@ -317,19 +317,19 @@ function utf162utf8($utf16) switch(true) { case ((0x7F & $bytes) == $bytes): - // this case should never be reached, because we are in ASCII range - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // this case should never be reached, because we are in ASCII range + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr($bytes); case (0x07FF & $bytes) == $bytes: - // return a 2-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // return a 2-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr(0xC0 | (($bytes >> 6) & 0x1F)) . chr(0x80 | ($bytes & 0x3F)); case (0xFFFF & $bytes) == $bytes: - // return a 3-byte UTF-8 character - // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 + // return a 3-byte UTF-8 character + // see: http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 return chr(0xE0 | (($bytes >> 12) & 0x0F)) . chr(0x80 | (($bytes >> 6) & 0x3F)) . chr(0x80 | ($bytes & 0x3F)); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index d6dc59d1dcc..106ce8336a8 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -780,171 +780,171 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec //if ($lines[$i]->fk_task_parent == $parent) //{ - // If we want all or we have a role on task, we show it - if (empty($mine) || ! empty($tasksrole[$lines[$i]->id])) + // If we want all or we have a role on task, we show it + if (empty($mine) || ! empty($tasksrole[$lines[$i]->id])) + { + //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); + + // Break on a new project + if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) { - //dol_syslog("projectLinesPerWeek Found line ".$i.", a qualified task (i have role or want to show all tasks) with id=".$lines[$i]->id." project id=".$lines[$i]->fk_project); - - // Break on a new project - if ($parent == 0 && $lines[$i]->fk_project != $lastprojectid) + $lastprojectid=$lines[$i]->fk_project; + if ($preselectedday) { - $lastprojectid=$lines[$i]->fk_project; - if ($preselectedday) - { - $projectstatic->id = $lines[$i]->fk_project; - } + $projectstatic->id = $lines[$i]->fk_project; } - - if (empty($workloadforid[$projectstatic->id])) - { - if ($preselectedday) - { - $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week - $workloadforid[$projectstatic->id]=1; - } - } - - $projectstatic->id=$lines[$i]->fk_project; - $projectstatic->ref=$lines[$i]->project_ref; - $projectstatic->title=$lines[$i]->project_label; - $projectstatic->public=$lines[$i]->public; - - $taskstatic->id=$lines[$i]->task_id; - $taskstatic->ref=($lines[$i]->task_ref?$lines[$i]->task_ref:$lines[$i]->task_id); - $taskstatic->label=$lines[$i]->task_label; - $taskstatic->date_start=$lines[$i]->date_start; - $taskstatic->date_end=$lines[$i]->date_end; - - $thirdpartystatic->id=$lines[$i]->socid; - $thirdpartystatic->name=$lines[$i]->thirdparty_name; - $thirdpartystatic->email=$lines[$i]->thirdparty_email; - - if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) - { - print ''."\n"; - print ''; - print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - if ($projectstatic->title) - { - print ' - '; - print $projectstatic->title; - } - print ''; - print ''; - } - - if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; - - print ''."\n"; - - // User - /* - print ''; - print $fuser->getNomUrl(1, 'withproject', 'time'); - print ''; - */ - - // Project - print ""; - if ($oldprojectforbreak == -1) - { - print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); - print '
'.$projectstatic->title; - } - print ""; - - // Thirdparty - print ''; - if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); - print ''; - - // Ref - print ''; - print ''; - for ($k = 0 ; $k < $level ; $k++) print "   "; - print $taskstatic->getNomUrl(1, 'withproject', 'time'); - // Label task - print '
'; - for ($k = 0 ; $k < $level ; $k++) print "   "; - print $taskstatic->label; - //print "
"; - //for ($k = 0 ; $k < $level ; $k++) print "   "; - //print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0); - print "\n"; - - // Date - print ''; - print dol_print_date($lines[$i]->timespent_datehour, 'day'); - print ''; - - $disabledproject=1;$disabledtask=1; - //print "x".$lines[$i]->fk_project; - //var_dump($lines[$i]); - //var_dump($projectsrole[$lines[$i]->fk_project]); - // If at least one role for project - if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) - { - $disabledproject=0; - $disabledtask=0; - } - // If $restricteditformytask is on and I have no role on task, i disable edit - if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) - { - $disabledtask=1; - } - - // Hour - print ''; - print dol_print_date($lines[$i]->timespent_datehour, 'hour'); - print ''; - - $cssonholiday=''; - if (! $isavailable[$preselectedday]['morning'] && ! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayallday '; - elseif (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning '; - elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon '; - - // Duration - print ''; - - $dayWorkLoad = $lines[$i]->timespent_duration; - $totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration; - - $alreadyspent=''; - if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); - - print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); - - $modeinput='hours'; - - print ''; - - print ''; - - // Note - print ''; - print ''; - print ''; - - // Warning - print ''; - /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); - else if ($disabledtask) - { - $titleassigntask = $langs->trans("AssignTaskToMe"); - if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); - - print $form->textwithpicto('',$langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); - }*/ - print ''; - - print "\n"; } + + if (empty($workloadforid[$projectstatic->id])) + { + if ($preselectedday) + { + $projectstatic->loadTimeSpent($preselectedday, 0, $fuser->id); // Load time spent from table projet_task_time for the project into this->weekWorkLoad and this->weekWorkLoadPerTask for all days of a week + $workloadforid[$projectstatic->id]=1; + } + } + + $projectstatic->id=$lines[$i]->fk_project; + $projectstatic->ref=$lines[$i]->project_ref; + $projectstatic->title=$lines[$i]->project_label; + $projectstatic->public=$lines[$i]->public; + + $taskstatic->id=$lines[$i]->task_id; + $taskstatic->ref=($lines[$i]->task_ref?$lines[$i]->task_ref:$lines[$i]->task_id); + $taskstatic->label=$lines[$i]->task_label; + $taskstatic->date_start=$lines[$i]->date_start; + $taskstatic->date_end=$lines[$i]->date_end; + + $thirdpartystatic->id=$lines[$i]->socid; + $thirdpartystatic->name=$lines[$i]->thirdparty_name; + $thirdpartystatic->email=$lines[$i]->thirdparty_email; + + if (empty($oldprojectforbreak) || ($oldprojectforbreak != -1 && $oldprojectforbreak != $projectstatic->id)) + { + print ''."\n"; + print ''; + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + if ($projectstatic->title) + { + print ' - '; + print $projectstatic->title; + } + print ''; + print ''; + } + + if ($oldprojectforbreak != -1) $oldprojectforbreak = $projectstatic->id; + + print ''."\n"; + + // User + /* + print ''; + print $fuser->getNomUrl(1, 'withproject', 'time'); + print ''; + */ + + // Project + print ""; + if ($oldprojectforbreak == -1) + { + print $projectstatic->getNomUrl(1, '', 0, $langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project]); + print '
'.$projectstatic->title; + } + print ""; + + // Thirdparty + print ''; + if ($thirdpartystatic->id > 0) print $thirdpartystatic->getNomUrl(1, 'project', 10); + print ''; + + // Ref + print ''; + print ''; + for ($k = 0 ; $k < $level ; $k++) print "   "; + print $taskstatic->getNomUrl(1, 'withproject', 'time'); + // Label task + print '
'; + for ($k = 0 ; $k < $level ; $k++) print "   "; + print $taskstatic->label; + //print "
"; + //for ($k = 0 ; $k < $level ; $k++) print "   "; + //print get_date_range($lines[$i]->date_start,$lines[$i]->date_end,'',$langs,0); + print "\n"; + + // Date + print ''; + print dol_print_date($lines[$i]->timespent_datehour, 'day'); + print ''; + + $disabledproject=1;$disabledtask=1; + //print "x".$lines[$i]->fk_project; + //var_dump($lines[$i]); + //var_dump($projectsrole[$lines[$i]->fk_project]); + // If at least one role for project + if ($lines[$i]->public || ! empty($projectsrole[$lines[$i]->fk_project]) || $user->rights->projet->all->creer) + { + $disabledproject=0; + $disabledtask=0; + } + // If $restricteditformytask is on and I have no role on task, i disable edit + if ($restricteditformytask && empty($tasksrole[$lines[$i]->id])) + { + $disabledtask=1; + } + + // Hour + print ''; + print dol_print_date($lines[$i]->timespent_datehour, 'hour'); + print ''; + + $cssonholiday=''; + if (! $isavailable[$preselectedday]['morning'] && ! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayallday '; + elseif (! $isavailable[$preselectedday]['morning']) $cssonholiday.='onholidaymorning '; + elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon '; + + // Duration + print ''; + + $dayWorkLoad = $lines[$i]->timespent_duration; + $totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration; + + $alreadyspent=''; + if ($dayWorkLoad > 0) $alreadyspent=convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + + print convertSecondToTime($lines[$i]->timespent_duration, 'allhourmin'); + + $modeinput='hours'; + + print ''; + + print ''; + + // Note + print ''; + print ''; + print ''; + + // Warning + print ''; + /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); + else if ($disabledtask) + { + $titleassigntask = $langs->trans("AssignTaskToMe"); + if ($fuser->id != $user->id) $titleassigntask = $langs->trans("AssignTaskToUser", '...'); + + print $form->textwithpicto('',$langs->trans("TaskIsNotAssignedToUser", $titleassigntask)); + }*/ + print ''; + + print "\n"; + } //} //else //{ diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index af27cea4292..15ca4de37e0 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -105,18 +105,18 @@ function reception_admin_prepare_head() if (! empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes_reception'; + $h++; } if (! empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines_reception'; + $h++; } diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index a4ddb68dbd3..b45eaa4b7a9 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -180,7 +180,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) if (! empty($location)) fwrite($calfileh, "LOCATION:".$encoding.$location."\n"); if ($fulldayevent) fwrite($calfileh, "X-FUNAMBOL-ALLDAY:1\n"); - + // see https://docs.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcical/0f262da6-c5fd-459e-9f18-145eba86b5d2 if ($fulldayevent) fwrite($calfileh, "X-MICROSOFT-CDO-ALLDAYEVENT:TRUE\n"); @@ -320,7 +320,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, $form); $form=''."\n". -// 'fr'."\n". + // 'fr'."\n". 'Dolibarr'."\n". ''.$date.''."\n". 'Dolibarr'."\n"; diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index 6be5e3904ab..93d1b37c690 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -177,13 +177,13 @@ class InterfaceLogevents extends DolibarrTriggers } // If not found -/* + /* else { dol_syslog("Trigger '".$this->name."' for action '$action' was ran by ".__FILE__." but no handler found for this action."); return 0; } -*/ + */ // Add more information into desc from the context property if (! empty($desc) && ! empty($object->context['audit'])) $desc.=' - '.$object->context['audit']; diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 5676bb82cfb..e72da40d6b0 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -251,7 +251,7 @@ class InterfaceActionsAuto extends DolibarrTriggers } elseif ($action == 'BILL_UNVALIDATE') { - // Load translation files required by the page + // Load translation files required by the page $langs->loadLangs(array("agenda","other","bills")); if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InvoiceBackToDraftInDolibarr", $object->ref); @@ -808,9 +808,9 @@ class InterfaceActionsAuto extends DolibarrTriggers $object->actionmsg=$langs->transnoentities("TICKET_ASSIGNEDInDolibarr", $object->ref); if ($object->oldcopy->fk_user_assign > 0) { - $tmpuser=new User($this->db); - $tmpuser->fetch($object->oldcopy->fk_user_assign); - $object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$tmpuser->getFullName($langs); + $tmpuser=new User($this->db); + $tmpuser->fetch($object->oldcopy->fk_user_assign); + $object->actionmsg.="\n".$langs->transnoentities("OldUser").': '.$tmpuser->getFullName($langs); } else { diff --git a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php index 301d565c2ba..b9dbd340d88 100644 --- a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php +++ b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php @@ -181,7 +181,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers case 'CONTACT_MODIFY': case 'CONTACT_DELETE': case 'CONTACT_ENABLEDISABLE': - + break; // Products // case 'PRODUCT_CREATE': // case 'PRODUCT_MODIFY': @@ -221,7 +221,7 @@ class InterfaceZapierTriggers extends DolibarrTriggers case 'LINEORDER_INSERT': case 'LINEORDER_UPDATE': case 'LINEORDER_DELETE': - + break; // Supplier orders // case 'ORDER_SUPPLIER_CREATE': // case 'ORDER_SUPPLIER_CLONE':