diff --git a/ChangeLog b/ChangeLog
index 1a123336552..25688ef0ccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,7 +29,7 @@ The following changes may create regressions for some external modules, but were
* Use of dol_eval with parameter $returnvalue=0 is deprecated.
* The signature for all ->delete() method has been modified to match the modulebuilder template (so first paramis now always $user), except
the delete for thirdparty (still accept the id of thirdparty to delete as first parameter). Will probably be modified into another version.
-
+* Route for API /thirdparties/gateways has been renamed into /thirdparties/accounts
***** ChangeLog for 19.0.1 compared to 19.0.0 *****
diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt
index 5ddee3b9244..94c67e08f75 100644
--- a/dev/tools/codespell/codespell-lines-ignore.txt
+++ b/dev/tools/codespell/codespell-lines-ignore.txt
@@ -56,7 +56,7 @@
$this->datea = $this->db->jdate($obj->datea);
$this->datee = $this->db->jdate($obj->datee);
$this->periode = $this->db->jdate($obj->period);
- $tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
+ $tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment
//si les reponses ne concerne pas la colonne effacée, on concatenate
GETPOST("mouvement", 'alpha'),
@@ -73,6 +73,8 @@
$datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12);
$datesubscription = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"));
$ensemblereponses = $obj->reponses;
+ $field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit); // the name of the field
+ $newcrit = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '', $tmpcrit);
$object->datee = $datee;
$object->periode = $dateperiod;
$return .= ''.$langs->trans("Payement").' : '.$this->type_payment.' ';
@@ -97,16 +99,19 @@
$taskstatic->datee = $db->jdate($obj->date_end);
$this->category->childs = array();
$this->datea = dol_now();
+ $tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit); // the condition after the name of the field
'datee' => $date_end,
// mise a jour des reponses utilisateurs dans la base
if (!empty($arrayfields['t.datee']['checked'])) {
if ($user->hasRight('stock', 'mouvement', 'lire')) {
if (empty($reyear) || empty($remonth) || empty($reday)) {
jQuery("#mouvement").change(function() {
+ preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg);
print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
print ''.$langs->trans("TransferStock").' ';
print ''.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).' ';
print '
'.dol_print_date($db->jdate($obj->periode), 'day').' ';
+ print ''.$langs->trans("AddIn").' ';
print dol_print_date($object->periode, "day");
$TWeek[$week_number] = $week_number;
$action = 'transfert';
@@ -174,6 +179,8 @@
if (in_array('01', $TWeek) && in_array('52', $TWeek) && $weekNb == '01') {
print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0);
print $object->datee ? dol_print_date($object->datee, 'daytext') : ' ';
+ print ' ';
+ print ' '.$langs->trans("AddIn").' ';
print ' '.$langs->trans("Datee").' ';
print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "t.datee", '', $param, '', $sortfield, $sortorder, 'center ');
* @param string $datee End date (ex 23:59:59)
@@ -189,6 +196,8 @@
$datepaye = dol_mktime(GETPOSTINT("rehour"), GETPOSTINT("remin"), GETPOSTINT("resec"), GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"), 'tzuserrel');
$ensemblereponses = $obj->reponses;
$head[$h][1] = $langs->trans('Referers');
+ $inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $tmpval);
+ $inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $val);
$morewherefilterarray[] = " t.datee <= '".$db->idate($search_date_end_end)."'";
$morewherefilterarray[] = " t.datee >= '".$db->idate($search_date_end_start)."'";
$opensurveysondage->mail_admin = $_SESSION['adresse'];
@@ -221,7 +230,8 @@
$sql2 .= " s.logo, s.email, s.entity, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee";
$title = $langs->trans('Batch')." ".$shortlabel." - ".$langs->trans('Referers');
$totalforvisibletasks = projectLinesPerMonth($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable, 0, $TWeek);
- 'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50),
+ $value = preg_replace('/([a-z\.]+)\s*([!<>=]+|in|notin|like|notlike)\s*/', '\1:\2:', $value); // Clean string 'x < 10' into 'x:<:10' so we can then explode on space to get all AND tests to do
+ 'cs.periode' => array('label' => "PeriodEndDate", 'checked' => 1, 'position' => 50),
't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>101),
't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>5),
// Ligne de la periode d'analyse du rapport
@@ -233,6 +243,7 @@
foreach ($TWeek as $week_number) {
if (!empty($arrayfields['t.datee']['checked'])) {
if ($action == "transfert") {
+ if ($object->id > 0 && $action == 'addin') {
if (GETPOST('reday')) {
if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) {
print $form->selectDate($datee, 'datee', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
@@ -240,6 +251,7 @@
print '';
print ''.$langs->trans("Referers").' ';
print ''.$langs->trans("NbOfMembers").' ('.$langs->trans("AllTime").') ';
+ print ''.$langs->trans("AddIn").' ';
print ' '.$langs->trans("Period")." ".dol_print_date($charge->periode, 'day')." \n";
print ajax_combobox("mouvement");
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname,cs.periode", "", $param, 'class="left"', $sortfield, $sortorder);
diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt
index dad508e8cf6..3ccb13ee599 100644
--- a/dev/tools/phan/baseline.txt
+++ b/dev/tools/phan/baseline.txt
@@ -9,231 +9,100 @@
*/
return [
// # Issue statistics:
- // PhanPluginSuspiciousParamPosition : 160+ occurrences
- // PhanPluginSuspiciousParamOrder : 130+ occurrences
- // PhanParamSignatureMismatch : 45+ occurrences
- // PhanPluginDuplicateIfStatements : 40+ occurrences
- // PhanPluginDuplicateExpressionBinaryOp : 15+ occurrences
+ // PhanPluginSuspiciousParamPosition : 45+ occurrences
+ // PhanPluginDuplicateIfStatements : 30+ occurrences
+ // PhanParamSignatureMismatch : 25+ occurrences
// PhanUndeclaredConstant : 15+ occurrences
- // PhanUnreferencedUseNormal : 15+ occurrences
- // PhanParamSuspiciousOrder : 10+ occurrences
- // PhanPluginSuspiciousParamOrderInternal : 10+ occurrences
+ // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences
// PhanTypeArraySuspiciousNull : 10+ occurrences
- // PhanTypeInvalidUnaryOperandNumeric : 10+ occurrences
- // PhanRedefineFunctionInternal : 9 occurrences
- // PhanPluginUnsafeEval : 7 occurrences
+ // PhanTypeInvalidUnaryOperandNumeric : 8 occurrences
// PhanPluginDuplicateIfCondition : 6 occurrences
- // PhanUndeclaredTypeParameter : 6 occurrences
+ // PhanRedefineFunctionInternal : 6 occurrences
+ // PhanPluginUnsafeEval : 5 occurrences
+ // PhanParamSuspiciousOrder : 4 occurrences
// PhanParamTooMany : 4 occurrences
- // PhanPluginDuplicateArrayKey : 4 occurrences
- // PhanPluginInvalidPregRegexReplacement : 4 occurrences
+ // PhanPluginSuspiciousParamOrder : 4 occurrences
// PhanUndeclaredFunctionInCallable : 4 occurrences
- // PhanNoopArrayAccess : 2 occurrences
- // PhanTypeMismatchForeach : 2 occurrences
// PhanAccessMethodProtected : 1 occurrence
// PhanAccessPropertyStaticAsNonStatic : 1 occurrence
// PhanNoopArray : 1 occurrence
+ // PhanNoopArrayAccess : 1 occurrence
// PhanNoopStringLiteral : 1 occurrence
- // PhanParamTooFew : 1 occurrence
- // PhanPowerOfZero : 1 occurrence
- // PhanUnextractableAnnotationSuffix : 1 occurrence
+ // PhanPluginAlwaysReturnFunction : 1 occurrence
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
- 'htdocs/accountancy/admin/account.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/class/bookkeeping.class.php' => ['PhanUndeclaredTypeParameter'],
- 'htdocs/accountancy/class/lettering.class.php' => ['PhanParamSuspiciousOrder'],
- 'htdocs/accountancy/customer/lines.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/customer/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/expensereport/lines.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/expensereport/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
- 'htdocs/accountancy/journal/sellsjournal.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
- 'htdocs/accountancy/supplier/lines.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/accountancy/supplier/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/adherents/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
- 'htdocs/adherents/list.php' => ['PhanPluginSuspiciousParamOrder'],
+ 'htdocs/adherents/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/adherents/stats/geo.php' => ['PhanTypeArraySuspiciousNull'],
- 'htdocs/adherents/subscription.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/adherents/type.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
- 'htdocs/admin/agenda_extsites.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/admin/dict.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/admin/emailcollector_card.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/admin/mails_templates.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/admin/receiptprinter.php' => ['PhanRedefineFunctionInternal'],
- 'htdocs/admin/system/database.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/admin/system/modules.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/admin/tools/listevents.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/admin/translation.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/admin/triggers.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/api/class/api.class.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanUnreferencedUseNormal'],
+ 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/bom/bom_list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected'],
- 'htdocs/categories/viewcat.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginSuspiciousParamOrder'],
+ 'htdocs/categories/viewcat.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
'htdocs/collab/index.php' => ['PhanParamTooMany'],
- 'htdocs/comm/action/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
+ 'htdocs/comm/action/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/comm/action/index.php' => ['PhanPluginSuspiciousParamPosition', 'PhanTypeArraySuspiciousNull', 'PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/comm/action/pertype.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/comm/action/peruser.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/comm/action/rapport/index.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/comm/mailing/advtargetemailing.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/comm/mailing/card.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/comm/mailing/cibles.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
+ 'htdocs/comm/mailing/cibles.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/comm/mailing/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/comm/propal/list.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/commande/list.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
- 'htdocs/commande/list_det.php' => ['PhanPluginSuspiciousParamOrder'],
+ 'htdocs/commande/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/compta/accounting-files.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
- 'htdocs/compta/bank/bankentries_list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/bank/various_payment/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
- 'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanUndeclaredTypeParameter'],
- 'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/facture/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/facture/class/facture.class.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
- 'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/compta/facture/list.php' => ['PhanPluginDuplicateIfCondition', 'PhanPluginSuspiciousParamOrder'],
- 'htdocs/compta/facture/prelevement.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/paiement/cheque/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
- 'htdocs/compta/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/compta/prelevement/card.php' => ['PhanPluginSuspiciousParamOrder'],
+ 'htdocs/compta/facture/list.php' => ['PhanPluginDuplicateIfCondition'],
'htdocs/compta/prelevement/class/bonprelevement.class.php' => ['PhanParamTooMany'],
'htdocs/compta/prelevement/create.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/prelevement/fiche-rejet.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/sociales/document.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/sociales/info.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/sociales/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/compta/sociales/note.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/compta/tva/document.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/compta/tva/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/compta/tva/payments.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/actions_massactions.inc.php' => ['PhanParamTooFew', 'PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
+ 'htdocs/core/actions_massactions.inc.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamOrder'],
'htdocs/core/class/commondocgenerator.class.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/core/class/commonobject.class.php' => ['PhanPluginDuplicateIfCondition', 'PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/class/commonstickergenerator.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/class/dolreceiptprinter.class.php' => ['PhanUnreferencedUseNormal'],
'htdocs/core/class/evalmath.class.php' => ['PhanPluginUnsafeEval'],
'htdocs/core/class/html.form.class.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
'htdocs/core/class/html.formmail.class.php' => ['PhanNoopArray'],
'htdocs/core/class/rssparser.class.php' => ['PhanPluginDuplicateIfStatements', 'PhanUndeclaredFunctionInCallable'],
- 'htdocs/core/class/translate.class.php' => ['PhanTypeMismatchForeach'],
- 'htdocs/core/class/utils.class.php' => ['PhanPluginSuspiciousParamPosition', 'PhanUnextractableAnnotationSuffix'],
'htdocs/core/db/mysqli.class.php' => ['PhanParamSignatureMismatch', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/db/pgsql.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/db/sqlite3.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/lib/company.lib.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginDuplicateIfCondition','PhanDeprecatedFunctionInternal'],
+ 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginDuplicateIfCondition'],
'htdocs/core/lib/ftp.lib.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/core/lib/functions.lib.php' => ['PhanParamTooMany', 'PhanPluginDuplicateIfCondition', 'PhanPluginInvalidPregRegexReplacement', 'PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'],
- 'htdocs/core/lib/functions2.lib.php' => ['PhanParamSuspiciousOrder', 'PhanPluginUnsafeEval'],
- 'htdocs/core/lib/json.lib.php' => ['PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'],
- 'htdocs/core/lib/modulebuilder.lib.php' => ['PhanPluginSuspiciousParamPosition'],
+ 'htdocs/core/lib/functions.lib.php' => ['PhanParamTooMany', 'PhanPluginAlwaysReturnFunction', 'PhanPluginDuplicateIfCondition', 'PhanPluginUnsafeEval', 'PhanRedefineFunctionInternal'],
'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/lib/usergroups.lib.php' => ['PhanNoopArrayAccess'],
- 'htdocs/core/lib/website.lib.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/login/functions_ldap.php' => ['PhanPluginSuspiciousParamOrderInternal'],
'htdocs/core/menus/standard/auguria_menu.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/menus/standard/eldy_menu.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
'htdocs/core/menus/standard/empty.php' => ['PhanParamSuspiciousOrder', 'PhanPluginDuplicateIfStatements'],
- 'htdocs/core/modules/bank/doc/pdf_ban.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredTypeParameter'],
- 'htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanUndeclaredTypeParameter'],
- 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/expensereport/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/hrm/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/import/import_csv.modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/import/import_xlsx.modules.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/core/modules/member/doc/pdf_standard.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/core/modules/movement/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal', 'PhanTypeArraySuspiciousNull'],
- 'htdocs/core/modules/oauth/generic_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/oauth/google_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/oauth/microsoft_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/oauth/stripelive_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/oauth/stripetest_oauthcallback.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/project/doc/pdf_baleine.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/project/doc/pdf_beluga.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/rapport/pdf_paiement.class.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanPluginSuspiciousParamOrder'],
+ 'htdocs/core/modules/movement/doc/pdf_standard.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp'],
+ 'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeArraySuspiciousNull'],
'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/core/modules/societe/modules_societe.class.php' => ['PhanPluginDuplicateIfCondition'],
- 'htdocs/core/modules/stock/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanUndeclaredTypeParameter'],
- 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/supplier_payment/doc/pdf_standard.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanParamSignatureMismatch', 'PhanParamSuspiciousOrder', 'PhanPluginDuplicateArrayKey'],
+ 'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanParamSignatureMismatch', 'PhanParamSuspiciousOrder'],
'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/debugbar/class/DataCollector/DolPhpCollector.php' => ['PhanPowerOfZero'],
- 'htdocs/debugbar/class/DataCollector/DolQueryCollector.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/debugbar/class/DataCollector/DolibarrCollector.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/don/card.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/don/class/api_donations.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/don/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/don/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
+ 'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
'htdocs/ecm/index_auto.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUnreferencedUseNormal'],
- 'htdocs/eventorganization/class/conferenceorbooth.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/expedition/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/expensereport/card.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
- 'htdocs/expensereport/payment/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/exports/export.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/exports/index.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/fichinter/card-rec.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/fichinter/list.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/fourn/commande/card.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/fourn/facture/card-rec.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/fourn/facture/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/fourn/facture/list-rec.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/fourn/facture/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/fourn/paiement/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/holiday/view_log.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/imports/import.php' => ['PhanPluginDuplicateIfStatements', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/imports/index.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-corporate/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-homesubmenu/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-noimg/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-onepageblackpurple/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-restaurant/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/doctemplates/websites/website_template-stellar/containers/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/install/fileconf.php' => ['PhanParamSuspiciousOrder'],
'htdocs/intracommreport/list.php' => ['PhanAccessPropertyStaticAsNonStatic'],
'htdocs/loan/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/class/paymentloan.class.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
@@ -242,86 +111,23 @@ return [
'htdocs/loan/note.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/payment/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/loan/schedule.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/main.inc.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/margin/agentMargins.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/margin/checkMargins.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/margin/customerMargins.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/margin/productMargins.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/margin/tabs/thirdpartyMargins.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/master.inc.php' => ['PhanRedefineFunctionInternal'],
- 'htdocs/modulebuilder/index.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/mrp/class/mo.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/product/admin/product_tools.php' => ['PhanNoopStringLiteral'],
- 'htdocs/product/agenda.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/card.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/product/class/product.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/product/inventory/inventory.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/product/popuprop.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/product/price.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
'htdocs/product/stats/card.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/product/stats/commande.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/commande_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/contrat.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/facture.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/facture_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/facturerec.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/mo.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/propal.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stats/supplier_proposal.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stock/class/mouvementstock.class.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/product/stock/movement_list.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/product/stock/product.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/product/stock/stats/commande_fournisseur.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stock/stats/expedition.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stock/stats/mo.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/product/stock/stats/reception.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/projet/list.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/projet/tasks/list.php' => ['PhanTypeArraySuspiciousNull'],
- 'htdocs/projet/tasks/time.php' => ['PhanPluginDuplicateIfStatements'],
'htdocs/public/bookcal/index.php' => ['PhanTypeInvalidUnaryOperandNumeric'],
'htdocs/public/opensurvey/index.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/public/payment/newpayment.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/public/recruitment/index.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/public/webportal/webportal.main.inc.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/public/website/index.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/reception/list.php' => ['PhanNoopArrayAccess', 'PhanPluginSuspiciousParamOrder'],
- 'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamOrderInternal'],
- 'htdocs/salaries/class/salary.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/salaries/list.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/societe/class/companybankaccount.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/societe/class/societe.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/societe/list.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/societe/notify/card.php' => ['PhanPluginSuspiciousParamOrder'],
- 'htdocs/societe/paymentmodes.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/societe/price.php' => ['PhanPluginSuspiciousParamOrder'],
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/takepos/invoice.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/ticket/class/ticketstats.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/ticket/list.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/user/agenda_extsites.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/user/bank.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/user/card.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/user/class/user.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/user/list.php' => ['PhanPluginDuplicateIfStatements'],
- 'htdocs/user/notify/card.php' => ['PhanPluginSuspiciousParamOrder', 'PhanPluginSuspiciousParamPosition'],
- 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanParamSignatureMismatch'],
'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'],
'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/webportal/controllers/default.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/document.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/invoicelist.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/login.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/membercard.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/orderlist.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/partnershipcard.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/webportal/controllers/propallist.controller.class.php' => ['PhanParamSignatureMismatch'],
- 'htdocs/website/class/website.class.php' => ['PhanPluginSuspiciousParamOrder', 'PhanTypeArraySuspiciousNull'],
- 'htdocs/website/index.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/website/samples/wrapper.php' => ['PhanPluginSuspiciousParamPosition'],
- 'htdocs/core/lib/json.lib.php' => ['PhanCompatibleNegativeStringOffset'],
+ 'internal' => ['PhanUndeclaredConstant'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php
index 682a8b42b26..085d4daba12 100644
--- a/dev/tools/phan/config.php
+++ b/dev/tools/phan/config.php
@@ -277,7 +277,7 @@ return [
__DIR__.'/plugins/ParamMatchRegexPlugin.php',
// checks if a function, closure or method unconditionally returns.
// can also be written as 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'
- //'DeprecateAliasPlugin',
+ 'DeprecateAliasPlugin',
//'EmptyMethodAndFunctionPlugin',
'InvalidVariableIssetPlugin',
//'MoreSpecificElementTypePlugin',
diff --git a/dev/tools/phan/config_fixer.php b/dev/tools/phan/config_fixer.php
index a9daacfc676..11daf743c09 100644
--- a/dev/tools/phan/config_fixer.php
+++ b/dev/tools/phan/config_fixer.php
@@ -1,8 +1,10 @@
*/
@@ -118,7 +120,7 @@ return [
],
'plugins' => [
__DIR__.'/plugins/ParamMatchRegexPlugin.php',
- //'DeprecateAliasPlugin',
+ 'DeprecateAliasPlugin',
// __DIR__.'/plugins/NoVarDumpPlugin.php',
//__DIR__.'/plugins/GetPostFixerPlugin.php',
//'PHPDocToRealTypesPlugin',
diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php
index 5225ccb4e93..889f1212547 100644
--- a/htdocs/adherents/class/api_members.class.php
+++ b/htdocs/adherents/class/api_members.class.php
@@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
+
/**
* API class for members
*
@@ -431,7 +432,12 @@ class Members extends DolibarrApi
private function _validate($data)
{
$member = array();
- foreach (Members::$FIELDS as $field) {
+
+ $mandatoryfields = array(
+ 'morphy',
+ 'typeid'
+ );
+ foreach ($mandatoryfields as $field) {
if (!isset($data[$field])) {
throw new RestException(400, "$field field missing");
}
@@ -723,7 +729,7 @@ class Members extends DolibarrApi
* @param array $request_data Request data
* @return int ID of member type
*
- * @url POST /types/{id}
+ * @url POST /types/
*
* @throws RestException 403 Access denied
* @throws RestException 500 Error when creating Member Type
@@ -856,7 +862,10 @@ class Members extends DolibarrApi
private function _validateType($data)
{
$membertype = array();
- foreach (MembersTypes::$FIELDS as $field) {
+
+ $mandatoryfields = array('label');
+
+ foreach ($mandatoryfields as $field) {
if (!isset($data[$field])) {
throw new RestException(400, "$field field missing");
}
diff --git a/htdocs/api/admin/explorer_withredoc.php b/htdocs/api/admin/explorer_withredoc.php
index 8c94e7a6f62..fa370d54c9c 100644
--- a/htdocs/api/admin/explorer_withredoc.php
+++ b/htdocs/api/admin/explorer_withredoc.php
@@ -14,14 +14,14 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
- *
- * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php.
*/
/**
* \defgroup api Module DolibarrApi
* \brief API explorer using the swagger.json file
* \file htdocs/api/admin/explorer_withredoc.php
+ *
+ * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php.
*/
require_once '../../main.inc.php';
diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php
index 7eeae3336c0..9c034a3340b 100644
--- a/htdocs/asset/class/asset.class.php
+++ b/htdocs/asset/class/asset.class.php
@@ -95,36 +95,36 @@ class Asset extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'validate'=>'1', 'comment'=>"Reference of object"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2', 'validate'=>'1',),
- 'fk_asset_model' => array('type'=>'integer:AssetModel:asset/class/assetmodel.class.php:1:((status:=:1) and (entity:IN:__SHARED_ENTITIES__))', 'label'=>'AssetModel', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'validate'=>'1',),
- 'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>0, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp', 'validate'=>'1',),
- 'acquisition_type' => array('type'=>'smallint', 'label'=>'AssetAcquisitionType', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('0'=>'AssetAcquisitionTypeNew', '1'=>'AssetAcquisitionTypeOccasion'), 'validate'=>'1',),
- 'asset_type' => array('type'=>'smallint', 'label'=>'AssetType', 'enabled'=>'1', 'position'=>70, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('0'=>'AssetTypeIntangible', '1'=>'AssetTypeTangible', '2'=>'AssetTypeInProgress', '3'=>'AssetTypeFinancial'), 'validate'=>'1',),
- 'not_depreciated' => array('type'=>'boolean', 'label'=>'AssetNotDepreciated', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'default'=>'0', 'visible'=>1, 'validate'=>'1',),
- 'date_acquisition' => array('type'=>'date', 'label'=>'AssetDateAcquisition', 'enabled'=>'1', 'position'=>90, 'notnull'=>1, 'visible'=>1,),
- 'date_start' => array('type'=>'date', 'label'=>'AssetDateStart', 'enabled'=>'1', 'position'=>100, 'notnull'=>0, 'visible'=>-1,),
- 'acquisition_value_ht' => array('type'=>'price', 'label'=>'AssetAcquisitionValueHT', 'enabled'=>'1', 'position'=>110, 'notnull'=>1, 'visible'=>1, 'isameasure'=>'1', 'validate'=>'1',),
- 'recovered_vat' => array('type'=>'price', 'label'=>'AssetRecoveredVAT', 'enabled'=>'1', 'position'=>120, 'notnull'=>0, 'visible'=>1, 'isameasure'=>'1', 'validate'=>'1',),
- 'reversal_date' => array('type'=>'date', 'label'=>'AssetReversalDate', 'enabled'=>'1', 'position'=>130, 'notnull'=>0, 'visible'=>1,),
- 'reversal_amount_ht' => array('type'=>'price', 'label'=>'AssetReversalAmountHT', 'enabled'=>'1', 'position'=>140, 'notnull'=>0, 'visible'=>1, 'isameasure'=>'1', 'validate'=>'1',),
- 'disposal_date' => array('type'=>'date', 'label'=>'AssetDisposalDate', 'enabled'=>'1', 'position'=>200, 'notnull'=>0, 'visible'=>-2,),
- 'disposal_amount_ht' => array('type'=>'price', 'label'=>'AssetDisposalAmount', 'enabled'=>'1', 'position'=>210, 'notnull'=>0, 'visible'=>-2, 'default'=>'0', 'isameasure'=>'1', 'validate'=>'1',),
- 'fk_disposal_type' => array('type'=>'sellist:c_asset_disposal_type:label:rowid::active=1', 'label'=>'AssetDisposalType', 'enabled'=>'1', 'position'=>220, 'notnull'=>0, 'visible'=>-2, 'index'=>1, 'validate'=>'1',),
- 'disposal_depreciated' => array('type'=>'boolean', 'label'=>'AssetDisposalDepreciated', 'enabled'=>'1', 'position'=>230, 'notnull'=>0, 'default'=>'0', 'visible'=>-2, 'validate'=>'1',),
- 'disposal_subject_to_vat' => array('type'=>'boolean', 'label'=>'AssetDisposalSubjectToVat', 'enabled'=>'1', 'position'=>240, 'notnull'=>0, 'default'=>'0', 'visible'=>-2, 'validate'=>'1',),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>0, 'validate'=>'1',),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>301, 'notnull'=>0, 'visible'=>0, 'validate'=>'1',),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>'0', 'visible'=>2, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Canceled'), 'validate'=>'1',),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'noteditable' => '0', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'validate' => '1', 'comment' => "Reference of object"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => '2', 'validate' => '1',),
+ 'fk_asset_model' => array('type' => 'integer:AssetModel:asset/class/assetmodel.class.php:1:((status:=:1) and (entity:IN:__SHARED_ENTITIES__))', 'label' => 'AssetModel', 'enabled' => '1', 'position' => 40, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',),
+ 'qty' => array('type' => 'real', 'label' => 'Qty', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 0, 'default' => '1', 'isameasure' => '1', 'css' => 'maxwidth75imp', 'validate' => '1',),
+ 'acquisition_type' => array('type' => 'smallint', 'label' => 'AssetAcquisitionType', 'enabled' => '1', 'position' => 60, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array('0' => 'AssetAcquisitionTypeNew', '1' => 'AssetAcquisitionTypeOccasion'), 'validate' => '1',),
+ 'asset_type' => array('type' => 'smallint', 'label' => 'AssetType', 'enabled' => '1', 'position' => 70, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array('0' => 'AssetTypeIntangible', '1' => 'AssetTypeTangible', '2' => 'AssetTypeInProgress', '3' => 'AssetTypeFinancial'), 'validate' => '1',),
+ 'not_depreciated' => array('type' => 'boolean', 'label' => 'AssetNotDepreciated', 'enabled' => '1', 'position' => 80, 'notnull' => 0, 'default' => '0', 'visible' => 1, 'validate' => '1',),
+ 'date_acquisition' => array('type' => 'date', 'label' => 'AssetDateAcquisition', 'enabled' => '1', 'position' => 90, 'notnull' => 1, 'visible' => 1,),
+ 'date_start' => array('type' => 'date', 'label' => 'AssetDateStart', 'enabled' => '1', 'position' => 100, 'notnull' => 0, 'visible' => -1,),
+ 'acquisition_value_ht' => array('type' => 'price', 'label' => 'AssetAcquisitionValueHT', 'enabled' => '1', 'position' => 110, 'notnull' => 1, 'visible' => 1, 'isameasure' => '1', 'validate' => '1',),
+ 'recovered_vat' => array('type' => 'price', 'label' => 'AssetRecoveredVAT', 'enabled' => '1', 'position' => 120, 'notnull' => 0, 'visible' => 1, 'isameasure' => '1', 'validate' => '1',),
+ 'reversal_date' => array('type' => 'date', 'label' => 'AssetReversalDate', 'enabled' => '1', 'position' => 130, 'notnull' => 0, 'visible' => 1,),
+ 'reversal_amount_ht' => array('type' => 'price', 'label' => 'AssetReversalAmountHT', 'enabled' => '1', 'position' => 140, 'notnull' => 0, 'visible' => 1, 'isameasure' => '1', 'validate' => '1',),
+ 'disposal_date' => array('type' => 'date', 'label' => 'AssetDisposalDate', 'enabled' => '1', 'position' => 200, 'notnull' => 0, 'visible' => -2,),
+ 'disposal_amount_ht' => array('type' => 'price', 'label' => 'AssetDisposalAmount', 'enabled' => '1', 'position' => 210, 'notnull' => 0, 'visible' => -2, 'default' => '0', 'isameasure' => '1', 'validate' => '1',),
+ 'fk_disposal_type' => array('type' => 'sellist:c_asset_disposal_type:label:rowid::active=1', 'label' => 'AssetDisposalType', 'enabled' => '1', 'position' => 220, 'notnull' => 0, 'visible' => -2, 'index' => 1, 'validate' => '1',),
+ 'disposal_depreciated' => array('type' => 'boolean', 'label' => 'AssetDisposalDepreciated', 'enabled' => '1', 'position' => 230, 'notnull' => 0, 'default' => '0', 'visible' => -2, 'validate' => '1',),
+ 'disposal_subject_to_vat' => array('type' => 'boolean', 'label' => 'AssetDisposalSubjectToVat', 'enabled' => '1', 'position' => 240, 'notnull' => 0, 'default' => '0', 'visible' => -2, 'validate' => '1',),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 300, 'notnull' => 0, 'visible' => 0, 'validate' => '1',),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 301, 'notnull' => 0, 'visible' => 0, 'validate' => '1',),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'last_main_doc' => array('type' => 'varchar(255)', 'label' => 'LastMainDoc', 'enabled' => '1', 'position' => 600, 'notnull' => 0, 'visible' => 0,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => '1', 'position' => 1010, 'notnull' => -1, 'visible' => 0,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'default' => '0', 'visible' => 2, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '9' => 'Canceled'), 'validate' => '1',),
);
public $rowid;
public $ref;
@@ -418,7 +418,7 @@ class Asset extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -1403,7 +1403,7 @@ class Asset extends CommonObject
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php
index 8bbfda125e7..811f50252d7 100644
--- a/htdocs/asset/class/assetmodel.class.php
+++ b/htdocs/asset/class/assetmodel.class.php
@@ -101,19 +101,19 @@ class AssetModel extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'validate'=>'1'),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2', 'validate'=>'1',),
- 'asset_type' => array('type'=>'smallint', 'label'=>'AssetType', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('0'=>'AssetTypeIntangible', '1'=>'AssetTypeTangible', '2'=>'AssetTypeInProgress', '3'=>'AssetTypeFinancial'), 'validate'=>'1',),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>0, 'validate'=>'1',),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>301, 'notnull'=>0, 'visible'=>0, 'validate'=>'1',),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>'1', 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Enabled', '9'=>'Disabled'), 'validate'=>'1',),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'validate' => '1'),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => '2', 'validate' => '1',),
+ 'asset_type' => array('type' => 'smallint', 'label' => 'AssetType', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array('0' => 'AssetTypeIntangible', '1' => 'AssetTypeTangible', '2' => 'AssetTypeInProgress', '3' => 'AssetTypeFinancial'), 'validate' => '1',),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 300, 'notnull' => 0, 'visible' => 0, 'validate' => '1',),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 301, 'notnull' => 0, 'visible' => 0, 'validate' => '1',),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'default' => '1', 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Enabled', '9' => 'Disabled'), 'validate' => '1',),
);
public $rowid;
public $ref;
@@ -368,7 +368,7 @@ class AssetModel extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -663,7 +663,7 @@ class AssetModel extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('assetmodeldao'));
- $parameters = array('id'=>$this->id, 'getnomurl'=>$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => $result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 566298ea8df..a2199a42f97 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -113,29 +113,29 @@ class BOM extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=> 1, 'default'=>1, 'index'=>1, 'position'=>5),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1', 'csslist'=>'nowraponall'),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'2', 'autofocusoncreate'=>1, 'css'=>'minwidth300 maxwidth400', 'csslist'=>'tdoverflowmax200'),
- 'bomtype' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>33, 'notnull'=>1, 'default'=>'0', 'arrayofkeyval'=>array(0=>'Manufacturing', 1=>'Disassemble'), 'css'=>'minwidth175', 'csslist'=>'minwidth175 center'),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'notnull' => 1, 'default' => 1, 'index' => 1, 'position' => 5),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => 1, 'noteditable' => 1, 'visible' => 4, 'position' => 10, 'notnull' => 1, 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'comment' => "Reference of BOM", 'showoncombobox' => '1', 'csslist' => 'nowraponall'),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'notnull' => 1, 'searchall' => 1, 'showoncombobox' => '2', 'autofocusoncreate' => 1, 'css' => 'minwidth300 maxwidth400', 'csslist' => 'tdoverflowmax200'),
+ 'bomtype' => array('type' => 'integer', 'label' => 'Type', 'enabled' => 1, 'visible' => 1, 'position' => 33, 'notnull' => 1, 'default' => '0', 'arrayofkeyval' => array(0 => 'Manufacturing', 1 => 'Disassemble'), 'css' => 'minwidth175', 'csslist' => 'minwidth175 center'),
//'bomtype' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'position'=>32, 'notnull'=>1, 'default'=>'0', 'arrayofkeyval'=>array(0=>'Manufacturing')),
- 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:1:((finished:is:null) or (finished:!=:0))', 'label'=>'Product', 'picto'=>'product', 'enabled'=>1, 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax100'),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
- 'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth50imp right'),
+ 'fk_product' => array('type' => 'integer:Product:product/class/product.class.php:1:((finished:is:null) or (finished:!=:0))', 'label' => 'Product', 'picto' => 'product', 'enabled' => 1, 'visible' => 1, 'position' => 35, 'notnull' => 1, 'index' => 1, 'help' => 'ProductBOMHelp', 'css' => 'maxwidth500', 'csslist' => 'tdoverflowmax100'),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'visible' => -1, 'position' => 60, 'notnull' => -1,),
+ 'qty' => array('type' => 'real', 'label' => 'Quantity', 'enabled' => 1, 'visible' => 1, 'default' => 1, 'position' => 55, 'notnull' => 1, 'isameasure' => '1', 'css' => 'maxwidth50imp right'),
//'efficiency' => array('type'=>'real', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>-1, 'default'=>1, 'position'=>100, 'notnull'=>0, 'css'=>'maxwidth50imp', 'help'=>'ValueOfMeansLossForProductProduced'),
- 'duration' => array('type'=>'duration', 'label'=>'EstimatedDuration', 'enabled'=>1, 'visible'=>-1, 'position'=>101, 'notnull'=>-1, 'css'=>'maxwidth50imp', 'help'=>'EstimatedDurationDesc'),
- 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php:0', 'label'=>'WarehouseForProduction', 'picto'=>'stock', 'enabled'=>1, 'visible'=>-1, 'position'=>102, 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax100'),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>-2, 'position'=>161, 'notnull'=>-1,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>-2, 'position'=>162, 'notnull'=>-1,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>300, 'notnull'=>1,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,),
- 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502, 'notnull'=>0,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserCreation', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1, 'csslist'=>'tdoverflowmax100'),
- 'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'picto'=>'user', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0, 'csslist'=>'tdoverflowmax100'),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
- 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Enabled', 9=>'Disabled')),
+ 'duration' => array('type' => 'duration', 'label' => 'EstimatedDuration', 'enabled' => 1, 'visible' => -1, 'position' => 101, 'notnull' => -1, 'css' => 'maxwidth50imp', 'help' => 'EstimatedDurationDesc'),
+ 'fk_warehouse' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php:0', 'label' => 'WarehouseForProduction', 'picto' => 'stock', 'enabled' => 1, 'visible' => -1, 'position' => 102, 'css' => 'maxwidth500', 'csslist' => 'tdoverflowmax100'),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'visible' => -2, 'position' => 161, 'notnull' => -1,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => 1, 'visible' => -2, 'position' => 162, 'notnull' => -1,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'position' => 300, 'notnull' => 1,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -2, 'position' => 501, 'notnull' => 1,),
+ 'date_valid' => array('type' => 'datetime', 'label' => 'DateValidation', 'enabled' => 1, 'visible' => -2, 'position' => 502, 'notnull' => 0,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserCreation', 'picto' => 'user', 'enabled' => 1, 'visible' => -2, 'position' => 510, 'notnull' => 1, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax100'),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'picto' => 'user', 'enabled' => 1, 'visible' => -2, 'position' => 511, 'notnull' => -1, 'csslist' => 'tdoverflowmax100'),
+ 'fk_user_valid' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserValidation', 'picto' => 'user', 'enabled' => 1, 'visible' => -2, 'position' => 512, 'notnull' => 0, 'csslist' => 'tdoverflowmax100'),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 1010),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 1000, 'notnull' => 1, 'default' => 0, 'index' => 1, 'arrayofkeyval' => array(0 => 'Draft', 1 => 'Enabled', 9 => 'Disabled')),
);
/**
@@ -514,7 +514,7 @@ class BOM extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -1182,7 +1182,7 @@ class BOM extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('bomdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
@@ -1414,7 +1414,7 @@ class BOM extends CommonObject
$this->unit_cost = 0;
$this->total_cost = 0;
- $parameters=array();
+ $parameters = array();
$reshook = $hookmanager->executeHooks('calculateCostsBom', $parameters, $this); // Note that $action and $object may have been modified by hook
if ($reshook > 0) {
@@ -1541,13 +1541,13 @@ class BOM extends CommonObject
foreach ($this->lines as $line) {
if (!empty($line->childBom)) {
foreach ($line->childBom as $childBom) {
- $childBom->getNetNeeds($TNetNeeds, $line->qty*$qty);
+ $childBom->getNetNeeds($TNetNeeds, $line->qty * $qty);
}
} else {
if (empty($TNetNeeds[$line->fk_product])) {
$TNetNeeds[$line->fk_product] = 0;
}
- $TNetNeeds[$line->fk_product] += $line->qty*$qty;
+ $TNetNeeds[$line->fk_product] += $line->qty * $qty;
}
}
}
@@ -1569,9 +1569,9 @@ class BOM extends CommonObject
foreach ($line->childBom as $childBom) {
$TNetNeeds[$childBom->id]['bom'] = $childBom;
$TNetNeeds[$childBom->id]['parentid'] = $this->id;
- $TNetNeeds[$childBom->id]['qty'] = $line->qty*$qty;
+ $TNetNeeds[$childBom->id]['qty'] = $line->qty * $qty;
$TNetNeeds[$childBom->id]['level'] = $level;
- $childBom->getNetNeedsTree($TNetNeeds, $line->qty*$qty, $level+1);
+ $childBom->getNetNeedsTree($TNetNeeds, $line->qty * $qty, $level + 1);
}
} else {
$TNetNeeds[$this->id]['product'][$line->fk_product]['qty'] += $line->qty * $qty;
@@ -1598,7 +1598,7 @@ class BOM extends CommonObject
}
if (empty($bom_id)) {
- $bom_id=$this->id;
+ $bom_id = $this->id;
}
$sql = 'SELECT l.fk_bom, b.label
@@ -1610,7 +1610,7 @@ class BOM extends CommonObject
if (!empty($resql)) {
while ($res = $this->db->fetch_object($resql)) {
$TParentBom[$res->fk_bom] = $res->fk_bom;
- $this->getParentBomTreeRecursive($TParentBom, $res->fk_bom, $level+1);
+ $this->getParentBomTreeRecursive($TParentBom, $res->fk_bom, $level + 1);
}
}
}
@@ -1717,19 +1717,19 @@ class BOMLine extends CommonObjectLine
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' => array('type'=>'integer', 'label'=>'LineID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
- 'fk_bom' => array('type'=>'integer:BillOfMaterials:societe/class/bom.class.php', 'label'=>'BillOfMaterials', 'enabled'=>1, 'visible'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1,),
- 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,),
- 'fk_bom_child' => array('type'=>'integer:BOM:bom/class/bom.class.php', 'label'=>'BillOfMaterials', 'enabled'=>1, 'visible'=>-1, 'position'=>40, 'notnull'=>-1,),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
- 'qty' => array('type'=>'double(24,8)', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'position'=>100, 'notnull'=>1, 'isameasure'=>'1',),
- 'qty_frozen' => array('type'=>'smallint', 'label'=>'QuantityFrozen', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>105, 'css'=>'maxwidth50imp', 'help'=>'QuantityConsumedInvariable'),
- 'disable_stock_change' => array('type'=>'smallint', 'label'=>'DisableStockChange', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>108, 'css'=>'maxwidth50imp', 'help'=>'DisableStockChangeHelp'),
- 'efficiency' => array('type'=>'double(24,8)', 'label'=>'ManufacturingEfficiency', 'enabled'=>1, 'visible'=>0, 'default'=>1, 'position'=>110, 'notnull'=>1, 'css'=>'maxwidth50imp', 'help'=>'ValueOfEfficiencyConsumedMeans'),
- 'fk_unit' => array('type'=>'integer', 'label'=>'Unit', 'enabled'=>1, 'visible'=>1, 'position'=>120, 'notnull'=>-1,),
- 'position' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>1, 'visible'=>0, 'default'=>0, 'position'=>200, 'notnull'=>1,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
- 'fk_default_workstation' =>array('type'=>'integer', 'label'=>'DefaultWorkstation', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'position'=>1050)
+ 'rowid' => array('type' => 'integer', 'label' => 'LineID', 'enabled' => 1, 'visible' => -1, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
+ 'fk_bom' => array('type' => 'integer:BillOfMaterials:societe/class/bom.class.php', 'label' => 'BillOfMaterials', 'enabled' => 1, 'visible' => 1, 'position' => 10, 'notnull' => 1, 'index' => 1,),
+ 'fk_product' => array('type' => 'integer:Product:product/class/product.class.php', 'label' => 'Product', 'enabled' => 1, 'visible' => 1, 'position' => 20, 'notnull' => 1, 'index' => 1,),
+ 'fk_bom_child' => array('type' => 'integer:BOM:bom/class/bom.class.php', 'label' => 'BillOfMaterials', 'enabled' => 1, 'visible' => -1, 'position' => 40, 'notnull' => -1,),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'visible' => -1, 'position' => 60, 'notnull' => -1,),
+ 'qty' => array('type' => 'double(24,8)', 'label' => 'Quantity', 'enabled' => 1, 'visible' => 1, 'position' => 100, 'notnull' => 1, 'isameasure' => '1',),
+ 'qty_frozen' => array('type' => 'smallint', 'label' => 'QuantityFrozen', 'enabled' => 1, 'visible' => 1, 'default' => 0, 'position' => 105, 'css' => 'maxwidth50imp', 'help' => 'QuantityConsumedInvariable'),
+ 'disable_stock_change' => array('type' => 'smallint', 'label' => 'DisableStockChange', 'enabled' => 1, 'visible' => 1, 'default' => 0, 'position' => 108, 'css' => 'maxwidth50imp', 'help' => 'DisableStockChangeHelp'),
+ 'efficiency' => array('type' => 'double(24,8)', 'label' => 'ManufacturingEfficiency', 'enabled' => 1, 'visible' => 0, 'default' => 1, 'position' => 110, 'notnull' => 1, 'css' => 'maxwidth50imp', 'help' => 'ValueOfEfficiencyConsumedMeans'),
+ 'fk_unit' => array('type' => 'integer', 'label' => 'Unit', 'enabled' => 1, 'visible' => 1, 'position' => 120, 'notnull' => -1,),
+ 'position' => array('type' => 'integer', 'label' => 'Rank', 'enabled' => 1, 'visible' => 0, 'default' => 0, 'position' => 200, 'notnull' => 1,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,),
+ 'fk_default_workstation' => array('type' => 'integer', 'label' => 'DefaultWorkstation', 'enabled' => 1, 'visible' => 1, 'notnull' => 0, 'position' => 1050)
);
/**
@@ -1914,7 +1914,7 @@ class BOMLine extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -1932,7 +1932,7 @@ class BOMLine extends CommonObjectLine
while ($obj = $this->db->fetch_object($resql)) {
$record = new self($this->db);
$record->setVarsFromFetchObj($obj);
- $record->fetch_optionals();
+ $record->fetch_optionals();
$records[$record->id] = $record;
}
@@ -2041,7 +2041,7 @@ class BOMLine extends CommonObjectLine
global $action, $hookmanager;
$hookmanager->initHooks(array('bomlinedao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php
index f24d258e987..e3320b531c7 100644
--- a/htdocs/bookcal/class/availabilities.class.php
+++ b/htdocs/bookcal/class/availabilities.class.php
@@ -113,26 +113,26 @@ class Availabilities extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax150', 'cssview'=>'wordbreak', 'help'=>"BookcalLabelAvailabilityHelp", 'showoncombobox'=>'2', 'validate'=>'1',),
- 'fk_bookcal_calendar' => array('type'=>'integer:Calendar:bookcal/class/calendar.class.php:1', 'label'=>'Calendar', 'enabled'=>'1', 'position'=>25, 'notnull'=>1, 'visible'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax100'),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>0,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
- 'start' => array('type'=>'date', 'label'=>'Start Date', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>1, 'searchall'=>1,),
- 'end' => array('type'=>'date', 'label'=>'End Date', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'searchall'=>1,),
- 'duration' => array('type'=>'integer', 'label'=>'DurationOfRange', 'enabled'=>'1', 'position'=>47, 'notnull'=>1, 'visible'=>1, 'default'=>'30', 'css'=>'width50 right'),
- 'startHour' => array('type'=>'integer', 'label'=>'Start Hour', 'enabled'=>'1', 'position'=>46, 'notnull'=>1, 'visible'=>1,),
- 'endHour' => array('type'=>'integer', 'label'=>'End Hour', 'enabled'=>'1', 'position'=>46.5, 'notnull'=>1, 'visible'=>1,),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Closed'), 'default'=>1, 'validate'=>'1'),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 2, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 20, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'csslist' => 'tdoverflowmax150', 'cssview' => 'wordbreak', 'help' => "BookcalLabelAvailabilityHelp", 'showoncombobox' => '2', 'validate' => '1',),
+ 'fk_bookcal_calendar' => array('type' => 'integer:Calendar:bookcal/class/calendar.class.php:1', 'label' => 'Calendar', 'enabled' => '1', 'position' => 25, 'notnull' => 1, 'visible' => 1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax100'),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3, 'validate' => '1',),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'picto' => 'user', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'picto' => 'user', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'last_main_doc' => array('type' => 'varchar(255)', 'label' => 'LastMainDoc', 'enabled' => '1', 'position' => 600, 'notnull' => 0, 'visible' => 0,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => '1', 'position' => 1010, 'notnull' => -1, 'visible' => 0,),
+ 'start' => array('type' => 'date', 'label' => 'Start Date', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'searchall' => 1,),
+ 'end' => array('type' => 'date', 'label' => 'End Date', 'enabled' => '1', 'position' => 45, 'notnull' => 1, 'visible' => 1, 'searchall' => 1,),
+ 'duration' => array('type' => 'integer', 'label' => 'DurationOfRange', 'enabled' => '1', 'position' => 47, 'notnull' => 1, 'visible' => 1, 'default' => '30', 'css' => 'width50 right'),
+ 'startHour' => array('type' => 'integer', 'label' => 'Start Hour', 'enabled' => '1', 'position' => 46, 'notnull' => 1, 'visible' => 1,),
+ 'endHour' => array('type' => 'integer', 'label' => 'End Hour', 'enabled' => '1', 'position' => 46.5, 'notnull' => 1, 'visible' => 1,),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => '1', 'position' => 2000, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '9' => 'Closed'), 'default' => 1, 'validate' => '1'),
);
public $rowid;
public $label;
@@ -412,7 +412,7 @@ class Availabilities extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -772,7 +772,7 @@ class Availabilities extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('availabilitiesdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php
index 8d05d2739ea..cad6ca0eeb2 100644
--- a/htdocs/bookcal/class/calendar.class.php
+++ b/htdocs/bookcal/class/calendar.class.php
@@ -113,23 +113,23 @@ class Calendar extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'right', 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'validate'=>'1', 'comment'=>"Reference of object", 'css'=>'width100'),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'alwayseditable'=>'1', 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>"Help text", 'showoncombobox'=>'2', 'validate'=>'1',),
- 'visibility' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Owner', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>1, 'picto'=>'user', 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',),
- 'type' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>'1', 'position'=>42, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('0'=>'Customer', '1'=>'Supplier', '3'=>'Other'),),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'isModEnabled("societe")', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150', 'help'=>"ThirdPartyBookCalHelp", 'validate'=>'1',),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'isModEnabled("project")', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150', 'validate'=>'1',),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'picto'=>'user', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax150',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'picto'=>'user', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2, 'csslist'=>'tdoverflowmax150',),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'default'=>0, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '9'=>'Closed'), 'validate'=>'1',),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'right', 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'validate' => '1', 'comment' => "Reference of object", 'css' => 'width100'),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => 1, 'alwayseditable' => '1', 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'help' => "Help text", 'showoncombobox' => '2', 'validate' => '1',),
+ 'visibility' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Owner', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'picto' => 'user', 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',),
+ 'type' => array('type' => 'integer', 'label' => 'Type', 'enabled' => '1', 'position' => 42, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array('0' => 'Customer', '1' => 'Supplier', '3' => 'Other'),),
+ 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label' => 'ThirdParty', 'picto' => 'company', 'enabled' => 'isModEnabled("societe")', 'position' => 50, 'notnull' => -1, 'visible' => 1, 'index' => 1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150', 'help' => "ThirdPartyBookCalHelp", 'validate' => '1',),
+ 'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1', 'label' => 'Project', 'picto' => 'project', 'enabled' => 'isModEnabled("project")', 'position' => 52, 'notnull' => -1, 'visible' => -1, 'index' => 1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150', 'validate' => '1',),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3, 'validate' => '1',),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'picto' => 'user', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax150',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'picto' => 'user', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2, 'csslist' => 'tdoverflowmax150',),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => '1', 'position' => 2000, 'notnull' => 1, 'default' => 0, 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '9' => 'Closed'), 'validate' => '1',),
);
public $rowid;
public $ref;
@@ -370,7 +370,7 @@ class Calendar extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php
index 9cd365428f5..62bbc69953d 100644
--- a/htdocs/categories/class/categorie.class.php
+++ b/htdocs/categories/class/categorie.class.php
@@ -130,7 +130,7 @@ class Categorie extends CommonObject
public $MAP_CAT_TABLE = array(
'customer' => 'societe',
'supplier' => 'fournisseur',
- 'bank_account'=> 'account',
+ 'bank_account' => 'account',
);
/**
@@ -148,7 +148,7 @@ class Categorie extends CommonObject
'account' => 'Account', // old for bank account
'bank_account' => 'Account',
'project' => 'Project',
- 'warehouse'=> 'Entrepot',
+ 'warehouse' => 'Entrepot',
'actioncomm' => 'ActionComm',
'website_page' => 'WebsitePage',
'ticket' => 'Ticket',
@@ -170,7 +170,7 @@ class Categorie extends CommonObject
'account' => 'AccountsCategoriesArea', // old for bank account
'bank_account' => 'AccountsCategoriesArea',
'project' => 'ProjectsCategoriesArea',
- 'warehouse'=> 'StocksCategoriesArea',
+ 'warehouse' => 'StocksCategoriesArea',
'actioncomm' => 'ActioncommCategoriesArea',
'website_page' => 'WebsitePageCategoriesArea'
);
@@ -186,7 +186,7 @@ class Categorie extends CommonObject
'contact' => 'socpeople',
'account' => 'bank_account', // old for bank account
'project' => 'projet',
- 'warehouse'=> 'entrepot',
+ 'warehouse' => 'entrepot',
'knowledgemanagement' => 'knowledgemanagement_knowledgerecord'
);
@@ -779,7 +779,7 @@ class Categorie extends CommonObject
}
// Call trigger
- $this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
+ $this->context = array('linkto' => $obj); // Save object we want to link category to into category instance to provide information to trigger
$result = $this->call_trigger('CATEGORY_LINK', $user);
if ($result < 0) {
$error++;
@@ -839,7 +839,7 @@ class Categorie extends CommonObject
dol_syslog(get_class($this).'::del_type', LOG_DEBUG);
if ($this->db->query($sql)) {
// Call trigger
- $this->context = array('unlinkoff'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
+ $this->context = array('unlinkoff' => $obj); // Save object we want to link category to into category instance to provide information to trigger
$result = $this->call_trigger('CATEGORY_UNLINK', $user);
if ($result < 0) {
$error++;
@@ -904,7 +904,7 @@ class Categorie extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -1788,7 +1788,7 @@ class Categorie extends CommonObject
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 7a3b3c13cba..6d6ac13c58d 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -834,7 +834,7 @@ if (empty($reshook)) {
} elseif ($action == 'import_lines_from_object'
&& $user->hasRight('propal', 'creer')
&& $object->statut == Propal::STATUS_DRAFT
- ) {
+ ) {
// add lines from objectlinked
$fromElement = GETPOST('fromelement');
$fromElementid = GETPOST('fromelementid');
@@ -964,7 +964,7 @@ if (empty($reshook)) {
// Define margin
$margin_rate = (GETPOST('marginforalllines') ? GETPOST('marginforalllines') : 0);
foreach ($object->lines as &$line) {
- $subprice = price2num($line->pa_ht * (1 + $margin_rate/100), 'MU');
+ $subprice = price2num($line->pa_ht * (1 + $margin_rate / 100), 'MU');
$prod = new Product($db);
$prod->fetch($line->fk_product);
if ($prod->price_min > $subprice) {
@@ -1083,7 +1083,7 @@ if (empty($reshook)) {
$pu_ttc_devise = 0;
$price_min = 0;
$price_min_ttc = 0;
- $tva_npr=0;
+ $tva_npr = 0;
$price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT');
$db->begin();
@@ -1245,8 +1245,8 @@ if (empty($reshook)) {
}
//If text set in desc is the same as product description (as now it's preloaded) we add it only one time
- if ($product_desc==$desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
- $product_desc='';
+ if ($product_desc == $desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
+ $product_desc = '';
}
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
@@ -2884,35 +2884,35 @@ if ($action == 'create') {
print '';
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_ht, '', $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
print '';
print '' . $langs->trans('AmountVAT') . ' ';
- print '' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_tva, '', $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
print '';
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax1, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax1, '', $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
print '';
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax2, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax2, '', $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
}
@@ -2920,9 +2920,9 @@ if ($action == 'create') {
print '';
print '' . $langs->trans('AmountTTC') . ' ';
- print '' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_ttc, '', $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index 39c01663d93..868a16ed304 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -409,8 +409,6 @@ class Propal extends CommonObject
*/
public function __construct($db, $socid = 0, $propalid = 0)
{
- global $conf, $langs;
-
$this->db = $db;
$this->socid = $socid;
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 0a03d0cc1cd..2bc33b37f3f 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -2256,14 +2256,14 @@ if ($search_date_signature_endyear) {
}
// Total margin rate
if (!empty($arrayfields['total_margin_rate']['checked'])) {
- print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Total mark rate
if (!empty($arrayfields['total_mark_rate']['checked'])) {
- print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 92621cdfcac..9722ca53344 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -933,8 +933,8 @@ if (empty($reshook)) {
}
//If text set in desc is the same as product descpription (as now it's preloaded) we add it only one time
- if ($product_desc==$desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
- $product_desc='';
+ if ($product_desc == $desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
+ $product_desc = '';
}
if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
@@ -1523,7 +1523,7 @@ if (empty($reshook)) {
if ($action == 'import_lines_from_object'
&& $usercancreate
&& $object->statut == Commande::STATUS_DRAFT
- ) {
+ ) {
$fromElement = GETPOST('fromelement');
$fromElementid = GETPOST('fromelementid');
$importLines = GETPOST('line_checkbox');
@@ -2782,19 +2782,19 @@ if ($action == 'create' && $usercancreate) {
print '';
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
- print '' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
print '';
print '' . $langs->trans('AmountVAT') . ' ';
- print '' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount VAT
- print '' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -2802,9 +2802,9 @@ if ($action == 'create' && $usercancreate) {
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
print '';
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -2812,9 +2812,9 @@ if ($action == 'create' && $usercancreate) {
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
print '';
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
}
@@ -2963,7 +2963,7 @@ if ($action == 'create' && $usercancreate) {
$arrayforbutaction = array();
// Create a purchase order
- $arrayforbutaction[] = array('lang'=>'orders', 'enabled'=>(isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfServicesLines() > 0), 'perm'=>$usercancreatepurchaseorder, 'label'=>'AddPurchaseOrder', 'url'=>'/fourn/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id);
+ $arrayforbutaction[] = array('lang' => 'orders', 'enabled' => (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfServicesLines() > 0), 'perm' => $usercancreatepurchaseorder, 'label' => 'AddPurchaseOrder', 'url' => '/fourn/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id);
/*if (isModEnabled("supplier_order") && $object->statut > Commande::STATUS_DRAFT && $object->getNbOfServicesLines() > 0) {
if ($usercancreatepurchaseorder) {
print dolGetButtonAction('', $langs->trans('AddPurchaseOrder'), 'default', DOL_URL_ROOT.'/fourn/commande/card.php?action=create&origin='.$object->element.'&originid='.$object->id, '');
@@ -2971,7 +2971,7 @@ if ($action == 'create' && $usercancreate) {
}*/
// Create intervention
- $arrayforbutaction[] = array('lang'=>'interventions', 'enabled'=>(isModEnabled("intervention") && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0), 'perm'=>$user->hasRight('ficheinter', 'creer'), 'label'=>'AddIntervention', 'url'=>'/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid);
+ $arrayforbutaction[] = array('lang' => 'interventions', 'enabled' => (isModEnabled("intervention") && $object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0), 'perm' => $user->hasRight('ficheinter', 'creer'), 'label' => 'AddIntervention', 'url' => '/fichinter/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid);
/*if (isModEnabled('ficheinter')) {
$langs->load("interventions");
@@ -2985,7 +2985,7 @@ if ($action == 'create' && $usercancreate) {
}*/
// Create contract
- $arrayforbutaction[] = array('lang'=>'contracts', 'enabled'=>(isModEnabled("contract") && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)), 'perm'=>$user->hasRight('contrat', 'creer'), 'label'=>'AddContract', 'url'=>'/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid);
+ $arrayforbutaction[] = array('lang' => 'contracts', 'enabled' => (isModEnabled("contract") && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)), 'perm' => $user->hasRight('contrat', 'creer'), 'label' => 'AddContract', 'url' => '/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid);
/*if (isModEnabled('contrat') && ($object->statut == Commande::STATUS_VALIDATED || $object->statut == Commande::STATUS_SHIPMENTONPROCESS || $object->statut == Commande::STATUS_CLOSED)) {
$langs->load("contracts");
@@ -3002,7 +3002,7 @@ if ($action == 'create' && $usercancreate) {
// Create shipment
if ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) {
if ((getDolGlobalInt('MAIN_SUBMODULE_EXPEDITION') && $user->hasRight('expedition', 'creer')) || (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') && $user->hasRight('expedition', 'delivery', 'creer'))) {
- $arrayforbutaction[] = array('lang'=>'sendings', 'enabled'=>(isModEnabled("delivery_note") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), 'perm'=>$user->hasRight('expedition', 'creer'), 'label'=>'CreateShipment', 'url'=>'/expedition/shipment.php?id='.$object->id);
+ $arrayforbutaction[] = array('lang' => 'sendings', 'enabled' => (isModEnabled("delivery_note") && ($object->statut > Commande::STATUS_DRAFT && $object->statut < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), 'perm' => $user->hasRight('expedition', 'creer'), 'label' => 'CreateShipment', 'url' => '/expedition/shipment.php?id='.$object->id);
/*
if ($user->hasRight('expedition', 'creer')) {
print dolGetButtonAction('', $langs->trans('CreateShipment'), 'default', DOL_URL_ROOT.'/expedition/shipment.php?id='.$object->id, '');
@@ -3017,11 +3017,11 @@ if ($action == 'create' && $usercancreate) {
// Create bill
$arrayforbutaction[] = array(
- 'lang'=>'bills',
- 'enabled'=>(isModEnabled('invoice') && $object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0),
- 'perm'=>($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')),
- 'label'=>'CreateBill',
- 'url'=>'/compta/facture/card.php?action=create&token='.newToken().'&origin='.urlencode($object->element).'&originid='.$object->id.'&socid='.$object->socid
+ 'lang' => 'bills',
+ 'enabled' => (isModEnabled('invoice') && $object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0),
+ 'perm' => ($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')),
+ 'label' => 'CreateBill',
+ 'url' => '/compta/facture/card.php?action=create&token='.newToken().'&origin='.urlencode($object->element).'&originid='.$object->id.'&socid='.$object->socid
);
/*
if (isModEnabled('facture') && $object->statut > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) {
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index ea017fbef3b..b84de3413f5 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -2554,7 +2554,7 @@ while ($i < $imaxinloop) {
// Total margin rate
if (!empty($arrayfields['total_margin_rate']['checked'])) {
- print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
@@ -2562,7 +2562,7 @@ while ($i < $imaxinloop) {
// Total mark rate
if (!empty($arrayfields['total_mark_rate']['checked'])) {
- print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php
index 3c0f25f74ac..0eec5b4bb58 100644
--- a/htdocs/commande/list_det.php
+++ b/htdocs/commande/list_det.php
@@ -1997,14 +1997,14 @@ if ($resql) {
}
// Total margin rate
if (!empty($arrayfields['total_margin_rate']['checked'])) {
- print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Total mark rate
if (!empty($arrayfields['total_mark_rate']['checked'])) {
- print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index 97e855217a6..56eb4e93a6c 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -387,7 +387,7 @@ if (empty($numref)) {
$balancestart[$objp->numr] = $obj->amount;
$db->free($resql);
}
- print ''.price($balancestart[$objp->numr], '', $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).' ';
+ print ''.price($balancestart[$objp->numr], 0, $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).' ';
// Calculate end amount
$sql = "SELECT sum(b.amount) as amount";
@@ -400,7 +400,7 @@ if (empty($numref)) {
$content[$objp->numr] = $obj->amount;
$db->free($resql);
}
- print ''.price(($balancestart[$objp->numr] + $content[$objp->numr]), '', $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).' ';
+ print ''.price(($balancestart[$objp->numr] + $content[$objp->numr]), 0, $langs, 1, -1, -1, empty($object->currency_code) ? $conf->currency : $object->currency_code).' ';
print '';
if ($user->hasRight('banque', 'consolidate') && $action != 'editbankreceipt') {
diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php
index ab544c4ff70..954b0eb3077 100644
--- a/htdocs/compta/facture/card-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -1129,7 +1129,7 @@ if ($action == 'create') {
// Frequency + unit
print ' '.$form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency'))." ";
print " ";
- print $form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency') ? GETPOST('unit_frequency') : 'm'));
+ print $form->selectarray('unit_frequency', array('d' => $langs->trans('Day'), 'm' => $langs->trans('Month'), 'y' => $langs->trans('Year')), (GETPOST('unit_frequency') ? GETPOST('unit_frequency') : 'm'));
print " ";
// Date next run
@@ -1145,14 +1145,14 @@ if ($action == 'create') {
// Auto validate the invoice
print "".$langs->trans("StatusOfAutoGeneratedInvoices")." ";
- $select = array('0'=>$langs->trans('BillStatusDraft'), '1'=>$langs->trans('BillStatusValidated'));
+ $select = array('0' => $langs->trans('BillStatusDraft'), '1' => $langs->trans('BillStatusValidated'));
print $form->selectarray('auto_validate', $select, GETPOST('auto_validate'));
print " ";
// Auto generate document
if (getDolGlobalString('INVOICE_REC_CAN_DISABLE_DOCUMENT_FILE_GENERATION')) {
print "".$langs->trans("StatusOfGeneratedDocuments")." ";
- $select = array('0'=>$langs->trans('DoNotGenerateDoc'), '1'=>$langs->trans('AutoGenerateDoc'));
+ $select = array('0' => $langs->trans('DoNotGenerateDoc'), '1' => $langs->trans('AutoGenerateDoc'));
print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf'));
print " ";
} else {
@@ -1308,11 +1308,11 @@ if ($action == 'create') {
// Amount (excl. tax)
print ''.$langs->trans("AmountHT").' ';
- print ''.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).' ';
+ print ''.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).' ';
print ' ';
// Amount tax
- print ''.$langs->trans("AmountVAT").' '.price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency).' ';
+ print ''.$langs->trans("AmountVAT").' '.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).' ';
print ' ';
// Amount Local Taxes
@@ -1325,7 +1325,7 @@ if ($action == 'create') {
print ''.price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency).' ';
}
- print ''.$langs->trans("AmountTTC").' '.price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency).' ';
+ print ''.$langs->trans("AmountTTC").' '.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).' ';
print ' ';
@@ -1543,7 +1543,7 @@ if ($action == 'create') {
print '';
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 7127c824434..9d277f17bc3 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -1625,7 +1625,7 @@ if (empty($reshook)) {
$descline = '(DEPOSIT)';
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
if ($typeamount == 'amount') {
- $descline .= ' ('.price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
+ $descline .= ' ('.price($valuedeposit, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
} elseif ($typeamount == 'variable') {
$descline .= ' ('.$valuedeposit.'%)';
}
@@ -3356,12 +3356,12 @@ if ($action == 'create') {
$arrayoutstandingbills = $soc->getOutstandingBills();
$outstandingBills = $arrayoutstandingbills['opened'];
print ' - '.$langs->trans('CurrentOutstandingBill').': ';
- print ''.price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency).' ';
+ print ''.price($outstandingBills, 0, $langs, 0, 0, -1, $conf->currency).' ';
if ($soc->outstanding_limit != '') {
if ($outstandingBills > $soc->outstanding_limit) {
print img_warning($langs->trans("OutstandingBillReached"));
}
- print ' / '.price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
+ print ' / '.price($soc->outstanding_limit, 0, $langs, 0, 0, -1, $conf->currency);
}
print '';
print ''."\n";
@@ -4987,20 +4987,20 @@ if ($action == 'create') {
print '';
// Amount HT
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($sign * $object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($sign * $object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
- print '' . price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($sign * $object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
print '';
// Amount VAT
print '' . $langs->trans('AmountVAT') . ' ';
- print '' . price($sign * $object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($sign * $object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount VAT
- print '' . price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($sign * $object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -5008,18 +5008,18 @@ if ($action == 'create') {
if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) {
print '';
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ';
- print '' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($sign * $object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($sign * $object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) {
print '';
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ';
- print '' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($sign * $object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($sign * $object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
}
@@ -5082,10 +5082,10 @@ if ($action == 'create') {
print '';
// Amount TTC
print '' . $langs->trans('AmountTTC') . ' ';
- print '' . price($sign * $object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($sign * $object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount TTC
- print '' . price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($sign * $object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index 6155dfd9c8a..e897ebd198b 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -2614,14 +2614,14 @@ if ($num > 0) {
}
// Total margin rate
if (!empty($arrayfields['total_margin_rate']['checked'])) {
- print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Total mark rate
if (!empty($arrayfields['total_mark_rate']['checked'])) {
- print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2).'%').' ';
+ print ''.(($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, null, null, null, 2).'%').' ';
if (!$i) {
$totalarray['nbfield']++;
$totalarray['pos'][$totalarray['nbfield']] = 'total_mark_rate';
diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php
index 7912337feeb..33ec278f646 100644
--- a/htdocs/compta/facture/prelevement.php
+++ b/htdocs/compta/facture/prelevement.php
@@ -640,17 +640,17 @@ if ($object->id > 0) {
if (isModEnabled('multicurrency') && ($object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
print ''.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_ht, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
// Multicurrency Amount VAT
print ''.$form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_tva, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
// Multicurrency Amount TTC
print ''.$form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_ttc, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
}
diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php
index 34b08386bca..535d07b84dd 100644
--- a/htdocs/compta/paiement/card.php
+++ b/htdocs/compta/paiement/card.php
@@ -97,7 +97,7 @@ $error = 0;
/*
* Actions
*/
-$parameters = array('socid'=>$socid);
+$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@@ -314,7 +314,7 @@ print $object->num_payment ? ' - '.$object->num_payment : '';
print '';
// Amount
-print ''.$langs->trans('Amount').' '.price($object->amount, '', $langs, 0, -1, -1, $conf->currency).' ';
+print ''.$langs->trans('Amount').' '.price($object->amount, 0, $langs, 0, -1, -1, $conf->currency).' ';
$disable_delete = 0;
// Bank account
@@ -563,7 +563,7 @@ if ($resql) {
// Status
print ''.$invoice->getLibStatut(5, $alreadypayed).' ';
- $parameters = array('fk_paiement'=> (int) $object->id);
+ $parameters = array('fk_paiement' => (int) $object->id);
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objp, $action); // Note that $action and $object may have been modified by hook
print "\n";
diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php
index 8848d70c325..9b42490727d 100644
--- a/htdocs/compta/paymentbybanktransfer/index.php
+++ b/htdocs/compta/paymentbybanktransfer/index.php
@@ -113,7 +113,7 @@ if (isModEnabled('salaries')) {
print ''.$langs->trans("Total").' ';
print '';
-print price($totaltoshow, '', '', 1, -1, -1, 'auto');
+print price($totaltoshow, 0, '', 1, -1, -1, 'auto');
print ' ';
@@ -226,7 +226,7 @@ if (isModEnabled('salaries')) {
print ''.$langs->trans("SalaryInvoiceWaitingWithdraw").' ('.$numRow.') ';
if ($numRow) {
- while ($j < $numRow && $j<10) {
+ while ($j < $numRow && $j < 10) {
$objSalary = $db->fetch_object($resql2);
$user->fetch($objSalary->fk_user);
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 9b3b16b60fc..abda85280a0 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -92,7 +92,7 @@ class BonPrelevement extends CommonObject
*/
public $file;
- /*
+ /**
* @var string filename
*/
public $filename;
@@ -146,21 +146,21 @@ class BonPrelevement extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>0,),
- 'ref' => array('type'=>'varchar(12)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax150', 'showoncombobox'=>'1',),
- 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>25, 'notnull'=>0, 'visible'=>-1,),
- 'amount' => array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>-1,),
- 'statut' => array('type'=>'smallint(6)', 'label'=>'Statut', 'enabled'=>'1', 'position'=>500, 'notnull'=>0, 'visible'=>-1, 'arrayofkeyval'=>array(0=>'Wait', 1=>'Transfered', 2=>'Credited')),
- 'credite' => array('type'=>'smallint(6)', 'label'=>'Credite', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>-1,),
- 'note' => array('type'=>'text', 'label'=>'Note', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>-1,),
- 'date_trans' => array('type'=>'datetime', 'label'=>'Datetrans', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>-1,),
- 'method_trans' => array('type'=>'smallint(6)', 'label'=>'Methodtrans', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1,),
- 'fk_user_trans' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkusertrans', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',),
- 'date_credit' => array('type'=>'datetime', 'label'=>'Datecredit', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>-1,),
- 'fk_user_credit' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkusercredit', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',),
- 'type' => array('type'=>'varchar(16)', 'label'=>'Type', 'enabled'=>'1', 'position'=>75, 'notnull'=>0, 'visible'=>-1,),
- 'fk_bank_account' => array('type'=>'integer', 'label'=>'Fkbankaccount', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1, 'css'=>'maxwidth500 widthcentpercentminusxx',),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 0,),
+ 'ref' => array('type' => 'varchar(12)', 'label' => 'Ref', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => -1, 'csslist' => 'tdoverflowmax150', 'showoncombobox' => '1',),
+ 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 25, 'notnull' => 0, 'visible' => -1,),
+ 'amount' => array('type' => 'double(24,8)', 'label' => 'Amount', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => -1,),
+ 'statut' => array('type' => 'smallint(6)', 'label' => 'Statut', 'enabled' => '1', 'position' => 500, 'notnull' => 0, 'visible' => -1, 'arrayofkeyval' => array(0 => 'Wait', 1 => 'Transfered', 2 => 'Credited')),
+ 'credite' => array('type' => 'smallint(6)', 'label' => 'Credite', 'enabled' => '1', 'position' => 40, 'notnull' => 0, 'visible' => -1,),
+ 'note' => array('type' => 'text', 'label' => 'Note', 'enabled' => '1', 'position' => 45, 'notnull' => 0, 'visible' => -1,),
+ 'date_trans' => array('type' => 'datetime', 'label' => 'Datetrans', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => -1,),
+ 'method_trans' => array('type' => 'smallint(6)', 'label' => 'Methodtrans', 'enabled' => '1', 'position' => 55, 'notnull' => 0, 'visible' => -1,),
+ 'fk_user_trans' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Fkusertrans', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',),
+ 'date_credit' => array('type' => 'datetime', 'label' => 'Datecredit', 'enabled' => '1', 'position' => 65, 'notnull' => 0, 'visible' => -1,),
+ 'fk_user_credit' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Fkusercredit', 'enabled' => '1', 'position' => 70, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',),
+ 'type' => array('type' => 'varchar(16)', 'label' => 'Type', 'enabled' => '1', 'position' => 75, 'notnull' => 0, 'visible' => -1,),
+ 'fk_bank_account' => array('type' => 'integer', 'label' => 'Fkbankaccount', 'enabled' => '1', 'position' => 80, 'notnull' => 0, 'visible' => -1, 'css' => 'maxwidth500 widthcentpercentminusxx',),
);
public $rowid;
public $ref;
@@ -1565,7 +1565,7 @@ class BonPrelevement extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('banktransferdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php
index b8c75847372..e123c7692f6 100644
--- a/htdocs/compta/prelevement/index.php
+++ b/htdocs/compta/prelevement/index.php
@@ -93,7 +93,7 @@ print '';
print ''.$langs->trans("AmountToWithdraw").' ';
print '';
-print price($bprev->SommeAPrelever('direct-debit'), '', '', 1, -1, -1, 'auto');
+print price($bprev->SommeAPrelever('direct-debit'), 0, '', 1, -1, -1, 'auto');
print ' ';
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index 96e58140742..8501ef26165 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -101,7 +101,7 @@ $search_sale = GETPOSTINT('search_sale');
$search_categ = GETPOSTINT("search_categ");
$search_categ_thirdparty = GETPOSTINT("search_categ_thirdparty");
$search_categ_supplier = GETPOSTINT("search_categ_supplier");
-$search_status = GETPOSTINT("search_status");
+$search_status = GETPOST("search_status", "intcomma");
$search_type = GETPOST('search_type', 'alpha');
$search_address = GETPOST('search_address', 'alpha');
$search_zip = GETPOST('search_zip', 'alpha');
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index cac72ca1e49..ff537ee7891 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -10311,7 +10311,7 @@ abstract class CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/core/class/defaultvalues.class.php b/htdocs/core/class/defaultvalues.class.php
index db0d57f63ec..cdb14b5bd5a 100644
--- a/htdocs/core/class/defaultvalues.class.php
+++ b/htdocs/core/class/defaultvalues.class.php
@@ -89,13 +89,13 @@ class DefaultValues extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
- 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1),
- 'type' =>array('type'=>'varchar(10)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'position'=>20),
- 'user_id' =>array('type'=>'integer', 'label'=>'Userid', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
- 'page' =>array('type'=>'varchar(255)', 'label'=>'RelativeURL', 'enabled'=>1, 'visible'=>-1, 'position'=>30),
- 'param' =>array('type'=>'varchar(255)', 'label'=>'Field', 'enabled'=>1, 'visible'=>-1, 'position'=>35),
- 'value' =>array('type'=>'varchar(128)', 'label'=>'Value', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
+ 'type' => array('type' => 'varchar(10)', 'label' => 'Type', 'enabled' => 1, 'visible' => -1, 'position' => 20),
+ 'user_id' => array('type' => 'integer', 'label' => 'Userid', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 25),
+ 'page' => array('type' => 'varchar(255)', 'label' => 'RelativeURL', 'enabled' => 1, 'visible' => -1, 'position' => 30),
+ 'param' => array('type' => 'varchar(255)', 'label' => 'Field', 'enabled' => 1, 'visible' => -1, 'position' => 35),
+ 'value' => array('type' => 'varchar(128)', 'label' => 'Value', 'enabled' => 1, 'visible' => -1, 'position' => 40),
);
/**
@@ -293,7 +293,7 @@ class DefaultValues extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php
index 4d8c8b0f785..bc5d8fc9d4e 100644
--- a/htdocs/core/class/dolreceiptprinter.class.php
+++ b/htdocs/core/class/dolreceiptprinter.class.php
@@ -129,7 +129,7 @@ class dolReceiptPrinter extends Printer
*/
public $db;
- /*
+ /**
* @var string[] array of tags
*/
public $tags;
@@ -800,7 +800,7 @@ class dolReceiptPrinter extends Printer
$this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n");
break;
case 'DOL_PRINT_CURR_DATE':
- if (strlen($vals[$tplline]['value'])<2) {
+ if (strlen($vals[$tplline]['value']) < 2) {
$this->printer->text(date('d/m/Y H:i:s')."\n");
} else {
$this->printer->text(date($vals[$tplline]['value'])."\n");
@@ -1056,7 +1056,7 @@ class dolReceiptPrinter extends Printer
$this->connector = new CupsPrintConnector($parameter);
break;
default:
- $found = false;;
+ $found = false;
break;
}
if ($found) {
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 630602e2c75..4a43106e8dc 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -349,7 +349,7 @@ class Form
} elseif (preg_match('/^url/', $typeofdata)) {
$ret .= dol_print_url($value, '_blank', 32, 1);
} elseif (preg_match('/^(amount|numeric)/', $typeofdata)) {
- $ret .= ($value != '' ? price($value, '', $langs, 0, -1, -1, $conf->currency) : '');
+ $ret .= ($value != '' ? price($value, 0, $langs, 0, -1, -1, $conf->currency) : '');
} elseif (preg_match('/^checkbox/', $typeofdata)) {
$tmp = explode(':', $typeofdata);
$ret .= ' ';
diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php
index 1d3e3330032..c99648c9993 100644
--- a/htdocs/core/class/html.formmargin.class.php
+++ b/htdocs/core/class/html.formmargin.class.php
@@ -272,10 +272,10 @@ class FormMargin
print '' . price($marginInfo['pa_products']) . ' ';
print '' . price($marginInfo['margin_on_products']) . ' ';
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
- print '' . (($marginInfo['margin_rate_products'] == '') ? '' : price($marginInfo['margin_rate_products'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['margin_rate_products'] == '') ? '' : price($marginInfo['margin_rate_products'], 0, null, null, null, 2) . '%') . ' ';
}
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
- print '' . (($marginInfo['mark_rate_products'] == '') ? '' : price($marginInfo['mark_rate_products'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['mark_rate_products'] == '') ? '' : price($marginInfo['mark_rate_products'], 0, null, null, null, 2) . '%') . ' ';
}
print '';
}
@@ -287,10 +287,10 @@ class FormMargin
print '' . price($marginInfo['pa_services']) . ' ';
print '' . price($marginInfo['margin_on_services']) . ' ';
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
- print '' . (($marginInfo['margin_rate_services'] == '') ? '' : price($marginInfo['margin_rate_services'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['margin_rate_services'] == '') ? '' : price($marginInfo['margin_rate_services'], 0, null, null, null, 2) . '%') . ' ';
}
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
- print '' . (($marginInfo['mark_rate_services'] == '') ? '' : price($marginInfo['mark_rate_services'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['mark_rate_services'] == '') ? '' : price($marginInfo['mark_rate_services'], 0, null, null, null, 2) . '%') . ' ';
}
print '';
}
@@ -302,10 +302,10 @@ class FormMargin
print '' . price($marginInfo['pa_total']) . ' ';
print '' . price($marginInfo['total_margin']) . ' ';
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
- print '' . (($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['total_margin_rate'] == '') ? '' : price($marginInfo['total_margin_rate'], 0, null, null, null, 2) . '%') . ' ';
}
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
- print '' . (($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], null, null, null, null, 2) . '%') . ' ';
+ print '' . (($marginInfo['total_mark_rate'] == '') ? '' : price($marginInfo['total_mark_rate'], 0, null, null, null, 2) . '%') . ' ';
}
print '';
}
diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php
index d8ae597f9d3..c16cc2d3007 100644
--- a/htdocs/core/class/rssparser.class.php
+++ b/htdocs/core/class/rssparser.class.php
@@ -503,13 +503,13 @@ class RssParser
// Add record to result array
$this->_rssarray[$i] = array(
- 'link'=>$itemLink,
- 'title'=>$itemTitle,
- 'description'=>$itemDescription,
- 'pubDate'=>$itemPubDate,
- 'category'=>$itemCategory,
- 'id'=>$itemId,
- 'author'=>$itemAuthor
+ 'link' => $itemLink,
+ 'title' => $itemTitle,
+ 'description' => $itemDescription,
+ 'pubDate' => $itemPubDate,
+ 'category' => $itemCategory,
+ 'id' => $itemId,
+ 'author' => $itemAuthor
);
//var_dump($this->_rssarray);
@@ -812,7 +812,7 @@ class RssParser
}
}
-
+// @phan-suppress PhanPluginPHPDocInWrongComment
/*
* A method for the xml_set_external_entity_ref_handler()
*
diff --git a/htdocs/core/class/timespent.class.php b/htdocs/core/class/timespent.class.php
index 23544f73edd..a4327d55ae9 100644
--- a/htdocs/core/class/timespent.class.php
+++ b/htdocs/core/class/timespent.class.php
@@ -113,25 +113,25 @@ class TimeSpent extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>17, 'notnull'=>0, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'import_key', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1,),
- 'fk_element' => array('type'=>'integer', 'label'=>'fk_element', 'enabled'=>'1', 'position'=>2, 'notnull'=>1, 'visible'=>-1,),
- 'elementtype' => array('type'=>'varchar(32)', 'label'=>'elementtype', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>-1,),
- 'element_date' => array('type'=>'date', 'label'=>'element_date', 'enabled'=>'1', 'position'=>4, 'notnull'=>0, 'visible'=>-1,),
- 'element_datehour' => array('type'=>'datetime', 'label'=>'element_datehour', 'enabled'=>'1', 'position'=>5, 'notnull'=>0, 'visible'=>-1,),
- 'element_date_withhour' => array('type'=>'integer', 'label'=>'element_date_withhour', 'enabled'=>'1', 'position'=>6, 'notnull'=>0, 'visible'=>-1,),
- 'element_duration' => array('type'=>'double', 'label'=>'element_duration', 'enabled'=>'1', 'position'=>7, 'notnull'=>0, 'visible'=>-1,),
- 'fk_product' => array('type'=>'integer', 'label'=>'fk_product', 'enabled'=>'1', 'position'=>8, 'notnull'=>0, 'visible'=>-1,),
- 'fk_user' => array('type'=>'integer', 'label'=>'fk_user', 'enabled'=>'1', 'position'=>9, 'notnull'=>0, 'visible'=>-1,),
- 'thm' => array('type'=>'double(24,8)', 'label'=>'thm', 'enabled'=>'1', 'position'=>10, 'notnull'=>0, 'visible'=>-1,),
- 'invoice_id' => array('type'=>'integer', 'label'=>'invoice_id', 'enabled'=>'1', 'position'=>11, 'notnull'=>0, 'visible'=>-1, 'default'=>'NULL',),
- 'invoice_line_id' => array('type'=>'integer', 'label'=>'invoice_line_id', 'enabled'=>'1', 'position'=>12, 'notnull'=>0, 'visible'=>-1, 'default'=>'NULL',),
- 'intervention_id' => array('type'=>'integer', 'label'=>'intervention_id', 'enabled'=>'1', 'position'=>13, 'notnull'=>0, 'visible'=>-1, 'default'=>'NULL',),
- 'intervention_line_id' => array('type'=>'integer', 'label'=>'intervention_line_id', 'enabled'=>'1', 'position'=>14, 'notnull'=>0, 'visible'=>-1, 'default'=>'NULL',),
- 'datec' => array('type'=>'datetime', 'label'=>'datec', 'enabled'=>'1', 'position'=>16, 'notnull'=>0, 'visible'=>-1,),
- 'note' => array('type'=>'text', 'label'=>'note', 'enabled'=>'1', 'position'=>18, 'notnull'=>0, 'visible'=>-1,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 17, 'notnull' => 0, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'import_key', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => -1,),
+ 'fk_element' => array('type' => 'integer', 'label' => 'fk_element', 'enabled' => '1', 'position' => 2, 'notnull' => 1, 'visible' => -1,),
+ 'elementtype' => array('type' => 'varchar(32)', 'label' => 'elementtype', 'enabled' => '1', 'position' => 3, 'notnull' => 1, 'visible' => -1,),
+ 'element_date' => array('type' => 'date', 'label' => 'element_date', 'enabled' => '1', 'position' => 4, 'notnull' => 0, 'visible' => -1,),
+ 'element_datehour' => array('type' => 'datetime', 'label' => 'element_datehour', 'enabled' => '1', 'position' => 5, 'notnull' => 0, 'visible' => -1,),
+ 'element_date_withhour' => array('type' => 'integer', 'label' => 'element_date_withhour', 'enabled' => '1', 'position' => 6, 'notnull' => 0, 'visible' => -1,),
+ 'element_duration' => array('type' => 'double', 'label' => 'element_duration', 'enabled' => '1', 'position' => 7, 'notnull' => 0, 'visible' => -1,),
+ 'fk_product' => array('type' => 'integer', 'label' => 'fk_product', 'enabled' => '1', 'position' => 8, 'notnull' => 0, 'visible' => -1,),
+ 'fk_user' => array('type' => 'integer', 'label' => 'fk_user', 'enabled' => '1', 'position' => 9, 'notnull' => 0, 'visible' => -1,),
+ 'thm' => array('type' => 'double(24,8)', 'label' => 'thm', 'enabled' => '1', 'position' => 10, 'notnull' => 0, 'visible' => -1,),
+ 'invoice_id' => array('type' => 'integer', 'label' => 'invoice_id', 'enabled' => '1', 'position' => 11, 'notnull' => 0, 'visible' => -1, 'default' => 'NULL',),
+ 'invoice_line_id' => array('type' => 'integer', 'label' => 'invoice_line_id', 'enabled' => '1', 'position' => 12, 'notnull' => 0, 'visible' => -1, 'default' => 'NULL',),
+ 'intervention_id' => array('type' => 'integer', 'label' => 'intervention_id', 'enabled' => '1', 'position' => 13, 'notnull' => 0, 'visible' => -1, 'default' => 'NULL',),
+ 'intervention_line_id' => array('type' => 'integer', 'label' => 'intervention_line_id', 'enabled' => '1', 'position' => 14, 'notnull' => 0, 'visible' => -1, 'default' => 'NULL',),
+ 'datec' => array('type' => 'datetime', 'label' => 'datec', 'enabled' => '1', 'position' => 16, 'notnull' => 0, 'visible' => -1,),
+ 'note' => array('type' => 'text', 'label' => 'note', 'enabled' => '1', 'position' => 18, 'notnull' => 0, 'visible' => -1,),
);
public $rowid;
public $import_key;
@@ -352,7 +352,7 @@ class TimeSpent extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -772,7 +772,7 @@ class TimeSpent extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array($this->element.'dao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 7fca6289c95..7caa6533194 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -197,9 +197,6 @@ function societe_prepare_head(Societe $object)
$title = $langs->trans("PaymentModes");
if (isModEnabled('stripe')) {
- //$langs->load("stripe");
- //$title = $langs->trans("BankAccountsAndGateways");
-
$servicestatus = 0;
if (getDolGlobalString('STRIPE_LIVE') && !GETPOST('forcesandbox', 'alpha')) {
$servicestatus = 1;
@@ -1001,7 +998,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '', $showuserl
$sortorder = GETPOST('sortorder', 'aZ09comma');
$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
- $search_status = GETPOSTINT("search_status");
+ $search_status = GETPOST("search_status", "intcomma");
if ($search_status == '') {
$search_status = 1; // always display active customer first
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index d2d4a4558f8..7e3823d2ac5 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4272,6 +4272,7 @@ function isValidEmail($address, $acceptsupervisorkey = 0, $acceptuserkey = 0)
* @param string $domain Domain name (Ex: "yahoo.com", "yhaoo.com", "dolibarr.fr")
* @return int -1 if error (function not available), 0=Not valid, 1=Valid
* @see isValidEmail()
+ * @suppress PhanDeprecatedFunctionInternal Error in Phan plugins incorrectly tags some functions here
*/
function isValidMXRecord($domain)
{
diff --git a/htdocs/core/lib/json.lib.php b/htdocs/core/lib/json.lib.php
index b5a53c7f888..15f54b75f97 100644
--- a/htdocs/core/lib/json.lib.php
+++ b/htdocs/core/lib/json.lib.php
@@ -267,7 +267,7 @@ function dol_json_decode($json, $assoc = false)
} else {
$out .= $json[$i];
}
- if ($i > 0 && $json[$i] == '"' && $json[($i - 1)] != "\\") {
+ if ($i >= 1 && $json[$i] == '"' && $json[$i - 1] != "\\") {
$comment = !$comment;
}
}
diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index d925aa68368..06546f208d1 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -453,12 +453,12 @@ if ($action == 'create') {
$arrayoutstandingbills = $soc->getOutstandingBills();
$outstandingBills = $arrayoutstandingbills['opened'];
print ' ('.$langs->trans('CurrentOutstandingBill').': ';
- print price($outstandingBills, '', $langs, 0, 0, -1, $conf->currency);
+ print price($outstandingBills, 0, $langs, 0, 0, -1, $conf->currency);
if ($soc->outstanding_limit != '') {
if ($outstandingBills > $soc->outstanding_limit) {
print img_warning($langs->trans("OutstandingBillReached"));
}
- print ' / '.price($soc->outstanding_limit, '', $langs, 0, 0, -1, $conf->currency);
+ print ' / '.price($soc->outstanding_limit, 0, $langs, 0, 0, -1, $conf->currency);
}
print ')';
print '';
diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index 97497ced70a..0ff0e06936f 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -114,22 +114,22 @@ class ConferenceOrBooth extends ActionComm
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'id' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'csslist'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'integer', 'label'=>'Ref', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'csslist'=>'left', 'comment'=>"Id"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax150', 'help'=>"OrganizationEvenLabelName", 'showoncombobox'=>'1', 'autofocusoncreate'=>1),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:(t.usage_organize_event:=:1)', 'label'=>'Project', 'enabled'=>"isModEnabled('project')", 'position'=>52, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'project', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax100'),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'ThirdParty', 'enabled'=>'$conf->societe->enabled', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"OrganizationEventLinkToThirdParty", 'picto'=>'company', 'csslist'=>'tdoverflowmax100', 'css'=>'maxwidth500'),
- 'note' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3),
- 'fk_action' => array('type'=>"sellist:c_actioncomm:libelle:id::(module:LIKE:'%@eventorganization')", 'label'=>'Format', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>1, 'css'=>'width100', 'csslist'=>'tdoverflowmax100'),
- 'datep' => array('type'=>'datetime', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'2',),
- 'datep2' => array('type'=>'datetime', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>1, 'showoncombobox'=>'3',),
- 'datec' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2, 'csslist'=>'nowraponall'),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'),
- 'fk_user_author' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'),
- 'fk_user_mod' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2, 'csslist'=>'tdoverflowmax100'),
- 'num_vote' => array('type'=>'smallint', 'label'=>'NbVotes', 'enabled'=>'1', 'position'=>800, 'notnull'=>-1, 'visible'=>5, 'default'=>'0', 'index'=>0),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>1, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'EvntOrgDraft', '1'=>'EvntOrgSuggested', '2'=> 'EvntOrgConfirmed', '3' =>'EvntOrgNotQualified', '4' =>'EvntOrgDone', '9'=>'EvntOrgCancelled'),),
+ 'id' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'csslist' => 'left', 'comment' => "Id"),
+ 'ref' => array('type' => 'integer', 'label' => 'Ref', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 2, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'csslist' => 'left', 'comment' => "Id"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'csslist' => 'tdoverflowmax150', 'help' => "OrganizationEvenLabelName", 'showoncombobox' => '1', 'autofocusoncreate' => 1),
+ 'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1:(t.usage_organize_event:=:1)', 'label' => 'Project', 'enabled' => "isModEnabled('project')", 'position' => 52, 'notnull' => -1, 'visible' => 1, 'index' => 1, 'picto' => 'project', 'css' => 'maxwidth500', 'csslist' => 'tdoverflowmax100'),
+ 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label' => 'ThirdParty', 'enabled' => '$conf->societe->enabled', 'position' => 50, 'notnull' => -1, 'visible' => 1, 'index' => 1, 'help' => "OrganizationEventLinkToThirdParty", 'picto' => 'company', 'csslist' => 'tdoverflowmax100', 'css' => 'maxwidth500'),
+ 'note' => array('type' => 'html', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3),
+ 'fk_action' => array('type' => "sellist:c_actioncomm:libelle:id::(module:LIKE:'%@eventorganization')", 'label' => 'Format', 'enabled' => '1', 'position' => 60, 'notnull' => 1, 'visible' => 1, 'css' => 'width100', 'csslist' => 'tdoverflowmax100'),
+ 'datep' => array('type' => 'datetime', 'label' => 'DateStart', 'enabled' => '1', 'position' => 70, 'notnull' => 0, 'visible' => 1, 'showoncombobox' => '2',),
+ 'datep2' => array('type' => 'datetime', 'label' => 'DateEnd', 'enabled' => '1', 'position' => 71, 'notnull' => 0, 'visible' => 1, 'showoncombobox' => '3',),
+ 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2, 'csslist' => 'nowraponall'),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2, 'csslist' => 'nowraponall'),
+ 'fk_user_author' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax100'),
+ 'fk_user_mod' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2, 'csslist' => 'tdoverflowmax100'),
+ 'num_vote' => array('type' => 'smallint', 'label' => 'NbVotes', 'enabled' => '1', 'position' => 800, 'notnull' => -1, 'visible' => 5, 'default' => '0', 'index' => 0),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'index' => 1, 'arrayofkeyval' => array('0' => 'EvntOrgDraft', '1' => 'EvntOrgSuggested', '2' => 'EvntOrgConfirmed', '3' => 'EvntOrgNotQualified', '4' => 'EvntOrgDone', '9' => 'EvntOrgCancelled'),),
);
public $rowid;
public $id;
@@ -306,7 +306,7 @@ class ConferenceOrBooth extends ActionComm
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -603,7 +603,7 @@ class ConferenceOrBooth extends ActionComm
global $action, $hookmanager;
$hookmanager->initHooks(array('conferenceorboothdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index ea292e437d2..29f7fb8eafa 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -431,7 +431,7 @@ class ConferenceOrBoothAttendee extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php
index 06fb0af4299..77ee9b6abd5 100644
--- a/htdocs/eventorganization/conferenceorbooth_card.php
+++ b/htdocs/eventorganization/conferenceorbooth_card.php
@@ -273,7 +273,7 @@ if (!empty($withproject)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/eventorganization/conferenceorbooth_contact.php b/htdocs/eventorganization/conferenceorbooth_contact.php
index bb19456cd2c..201dc52710b 100644
--- a/htdocs/eventorganization/conferenceorbooth_contact.php
+++ b/htdocs/eventorganization/conferenceorbooth_contact.php
@@ -261,7 +261,7 @@ if (!empty($withproject)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/eventorganization/conferenceorbooth_document.php b/htdocs/eventorganization/conferenceorbooth_document.php
index 16ab981af3b..788128a6906 100644
--- a/htdocs/eventorganization/conferenceorbooth_document.php
+++ b/htdocs/eventorganization/conferenceorbooth_document.php
@@ -234,7 +234,7 @@ if (!empty($withproject)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index a2b370ba6f4..9ee0be54b58 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -389,7 +389,7 @@ if ($projectid > 0) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($project->budget_amount, '')) {
- print ''.price($project->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($project->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index a83218f0a12..b57b5180bf5 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -309,7 +309,7 @@ if (!empty($withproject)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index afb8f29d942..cbaf93a8f45 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -488,7 +488,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 7a3347098ab..fe20c6ed008 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -547,17 +547,17 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled("multicurrency") && ($object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
print ''.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_ht, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
// Multicurrency Amount VAT
print ''.$form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_tva, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
// Multicurrency Amount TTC
print ''.$form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0).' ';
- print ''.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
+ print ''.price($object->multicurrency_total_ttc, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' ';
print ' ';
}
@@ -772,7 +772,7 @@ if ($id > 0 || !empty($ref)) {
// Qty remains to ship
print '';
- if ($type == 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')|| getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
+ if ($type == 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES') || getDolGlobalString('SHIPMENT_SUPPORTS_SERVICES')) {
$toBeShipped[$objp->fk_product] = $objp->qty - $qtyAlreadyShipped;
$toBeShippedTotal += $toBeShipped[$objp->fk_product];
print $toBeShipped[$objp->fk_product];
diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
index 5998b330c14..ce869f06617 100644
--- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
@@ -236,7 +236,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine
if (!$notrigger) {
// Call triggers
- $result=$this->call_trigger('LINERECEPTION_CREATE', $user);
+ $result = $this->call_trigger('LINERECEPTION_CREATE', $user);
if ($result < 0) {
$error++;
}
@@ -703,7 +703,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index 0171b5d597d..85de2e7fb6f 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -2340,20 +2340,20 @@ if ($action == 'create') {
print ' ';
// Amount HT
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
- print '' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
print '';
// Amount VAT
print '' . $langs->trans('AmountVAT') . ' ';
- print '' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount VAT
- print '' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -2361,18 +2361,18 @@ if ($action == 'create') {
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
print '';
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
print '';
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
}
@@ -2386,10 +2386,10 @@ if ($action == 'create') {
print '';
// Amount TTC
print '' . $langs->trans('AmountTTC') . ' ';
- print '' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . $alert . ' ';
+ print '' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . $alert . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount TTC
- print '' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
diff --git a/htdocs/fourn/facture/card-rec.php b/htdocs/fourn/facture/card-rec.php
index d4581c706b3..c3d748e81d1 100644
--- a/htdocs/fourn/facture/card-rec.php
+++ b/htdocs/fourn/facture/card-rec.php
@@ -1205,10 +1205,10 @@ if ($action == 'create') {
print '';
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
print ' ';
- print '' . $langs->trans("AmountVAT") . ' ' . price($object->total_tva, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . $langs->trans("AmountVAT") . ' ' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
print ' ';
// Amount Local Taxes
@@ -1221,7 +1221,7 @@ if ($action == 'create') {
print '' . price($object->total_localtax2, 1, '', 1, -1, -1, $conf->currency) . ' ';
}
- print '' . $langs->trans("AmountTTC") . ' ' . price($object->total_ttc, '', $langs, 1, -1, -1, $conf->currency) . ' ';
+ print '' . $langs->trans("AmountTTC") . ' ' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . ' ';
print ' ';
// Payment term
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index c6b9c6457e5..8244ed6e8af 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1224,7 +1224,7 @@ if (empty($reshook)) {
$descline = '(DEPOSIT)';
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
if ($typeamount == 'amount') {
- $descline .= ' ('.price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
+ $descline .= ' ('.price($valuedeposit, 0, $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';
} elseif ($typeamount == 'variable') {
$descline .= ' ('.$valuedeposit.'%)';
}
@@ -3535,9 +3535,9 @@ if ($action == 'create') {
print '';
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -3568,7 +3568,7 @@ if ($action == 'create') {
print price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency);
print '';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print '';
@@ -3587,9 +3587,9 @@ if ($action == 'create') {
print '';
print '' . $langs->trans('AmountTTC') . ' ';
- print '' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php
index 0987ec11c6f..966cde2511b 100644
--- a/htdocs/fourn/paiement/card.php
+++ b/htdocs/fourn/paiement/card.php
@@ -221,7 +221,7 @@ if ($result > 0) {
// Amount
print ''.$langs->trans('Amount').' ';
- print ''.price($object->amount, '', $langs, 0, 0, -1, $conf->currency).' ';
+ print ''.price($object->amount, 0, $langs, 0, 0, -1, $conf->currency).' ';
// Status of validation of payment
if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
diff --git a/htdocs/fourn/paiement/document.php b/htdocs/fourn/paiement/document.php
index b407c489822..db152d3eb47 100644
--- a/htdocs/fourn/paiement/document.php
+++ b/htdocs/fourn/paiement/document.php
@@ -126,7 +126,7 @@ if ($object->id > 0) {
$morehtmlref .= ' '.$object->thirdparty->getNomUrl(1);
// Amount
- $morehtmlref .= ' '.$langs->trans('Amount').' : '. price($object->amount, '', $langs, 0, 0, -1, $conf->currency);
+ $morehtmlref .= ' '.$langs->trans('Amount').' : '. price($object->amount, 0, $langs, 0, 0, -1, $conf->currency);
$allow_delete = 1;
// Bank account
diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php
index 30dfb7863f2..fe3dc78df7f 100644
--- a/htdocs/hrm/class/evaluation.class.php
+++ b/htdocs/hrm/class/evaluation.class.php
@@ -105,22 +105,22 @@ class Evaluation extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2',),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3,),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'default'=>0, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '6' => 'Closed'),),
- 'date_eval' => array('type'=>'date', 'label'=>'DateEval', 'enabled'=>'1', 'position'=>502, 'notnull'=>1, 'visible'=>1,),
- 'fk_user' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'Employee', 'enabled'=>'1', 'position'=>504, 'notnull'=>1, 'visible'=>1, 'picto'=>'user', 'css'=>'maxwidth300 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobProfile', 'enabled'=>'1', 'position'=>505, 'notnull'=>1, 'visible'=>1, 'picto'=>'jobprofile', 'css'=>'maxwidth300 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 4, 'noteditable' => '1', 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Reference of object"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => '2',),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3,),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'default' => 0, 'visible' => 5, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '6' => 'Closed'),),
+ 'date_eval' => array('type' => 'date', 'label' => 'DateEval', 'enabled' => '1', 'position' => 502, 'notnull' => 1, 'visible' => 1,),
+ 'fk_user' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'Employee', 'enabled' => '1', 'position' => 504, 'notnull' => 1, 'visible' => 1, 'picto' => 'user', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'fk_job' => array('type' => 'integer:Job:/hrm/class/job.class.php', 'label' => 'JobProfile', 'enabled' => '1', 'position' => 505, 'notnull' => 1, 'visible' => 1, 'picto' => 'jobprofile', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
);
public $rowid;
public $ref;
@@ -194,7 +194,7 @@ class Evaluation extends CommonObject
}
if (!$user->hasRight('hrm', 'evaluation', 'readall')) {
- $this->fields['fk_user']['type'].= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
+ $this->fields['fk_user']['type'] .= ':rowid IN('.$this->db->sanitize(implode(", ", $user->getAllChildIds(1))).')';
}
$this->date_eval = dol_now();
@@ -415,7 +415,7 @@ class Evaluation extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -630,9 +630,9 @@ class Evaluation extends CommonObject
public function getLastEvaluationForUser($fk_user)
{
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."hrm_evaluation ";
- $sql.= "WHERE fk_user=".((int) $fk_user)." ";
- $sql.= "ORDER BY date_eval DESC ";
- $sql.= "LIMIT 1 ";
+ $sql .= "WHERE fk_user=".((int) $fk_user)." ";
+ $sql .= "ORDER BY date_eval DESC ";
+ $sql .= "LIMIT 1 ";
$res = $this->db->query($sql);
if (!$res) {
@@ -807,7 +807,7 @@ class Evaluation extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('evaluationdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php
index 5d0794abd5e..5a2d230bf59 100644
--- a/htdocs/hrm/class/evaluationdet.class.php
+++ b/htdocs/hrm/class/evaluationdet.class.php
@@ -104,17 +104,17 @@ class EvaluationLine extends CommonObjectLine
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
- 'fk_evaluation' => array('type'=>'integer:Evaluation:hrm/class/evaluation.class.php:1', 'label'=>'Evaluation', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
- 'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1,),
- 'required_rank' => array('type'=>'integer', 'label'=>'requiredRank', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>1,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'fk_skill' => array('type' => 'integer:Skill:hrm/class/skill.class.php:1', 'label' => 'Skill', 'enabled' => '1', 'position' => 3, 'notnull' => 1, 'visible' => 1, 'index' => 1,),
+ 'fk_evaluation' => array('type' => 'integer:Evaluation:hrm/class/evaluation.class.php:1', 'label' => 'Evaluation', 'enabled' => '1', 'position' => 3, 'notnull' => 1, 'visible' => 1, 'index' => 1,),
+ 'rankorder' => array('type' => 'integer', 'label' => 'Rank', 'enabled' => '1', 'position' => 4, 'notnull' => 1, 'visible' => 1,),
+ 'required_rank' => array('type' => 'integer', 'label' => 'requiredRank', 'enabled' => '1', 'position' => 5, 'notnull' => 1, 'visible' => 1,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
);
public $rowid;
public $date_creation;
@@ -383,7 +383,7 @@ class EvaluationLine extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -777,7 +777,7 @@ class EvaluationLine extends CommonObjectLine
global $action, $hookmanager;
$hookmanager->initHooks(array('evaluationlinedao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php
index dbed9cad902..08ef1dc33de 100644
--- a/htdocs/hrm/class/job.class.php
+++ b/htdocs/hrm/class/job.class.php
@@ -103,17 +103,17 @@ class Job extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'label' => array('type'=>'varchar(128)', 'label'=>'Label', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Label of object"),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>2,),
- 'deplacement' => array('type'=>'select', 'required'=> 1,'label'=> 'NeedBusinessTravels', 'enabled'=> 1, 'position'=> 90, 'notnull'=> 1, 'visible'=> 1, 'arrayofkeyval'=> array(0 =>"No", 1=>"Yes"), 'default'=>0),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>0,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'label' => array('type' => 'varchar(128)', 'label' => 'Label', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Label of object"),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 21, 'notnull' => 0, 'visible' => 1,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => 2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => 2,),
+ 'deplacement' => array('type' => 'select', 'required' => 1,'label' => 'NeedBusinessTravels', 'enabled' => 1, 'position' => 90, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array(0 => "No", 1 => "Yes"), 'default' => 0),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 70, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 71, 'notnull' => 0, 'visible' => 0,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
);
public $rowid;
public $ref;
@@ -385,7 +385,7 @@ class Job extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -811,7 +811,7 @@ class Job extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('jobdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php
index 5ed5f467ad3..a65fc43e564 100644
--- a/htdocs/hrm/class/position.class.php
+++ b/htdocs/hrm/class/position.class.php
@@ -103,22 +103,22 @@ class Position extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 2, 'index' => 1, 'css' => 'left', 'comment' => "Id"),
//'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_contrat' => array('type'=>'integer:Contrat:contrat/class/contrat.class.php', 'label'=>'fk_contrat', 'enabled'=>'isModEnabled("contract")', 'position'=>50, 'notnull'=>0, 'visible'=>0,),
- 'fk_user' => array('type'=>'integer:User:user/class/user.class.php:0:(t.statut:=:1)', 'label'=>'Employee', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'default'=>0, 'picto'=>'user', 'css'=>'maxwidth300 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'fk_job' => array('type'=>'integer:Job:/hrm/class/job.class.php', 'label'=>'JobProfile', 'enabled'=>'1', 'position'=>56, 'notnull'=>1, 'visible'=>1, 'picto'=>'jobprofile', 'css'=>'maxwidth300 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'date_start' => array('type'=>'date', 'label'=>'DateStart', 'enabled'=>'1', 'position'=>101, 'notnull'=>1, 'visible'=>1,),
- 'date_end' => array('type'=>'date', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>102, 'notnull'=>0, 'visible'=>1,),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>120, 'notnull'=>0, 'visible'=>3,),
- 'abort_comment' => array('type'=>'varchar(255)', 'label'=>'AbandonmentComment', 'enabled'=>'getDolGlobalInt("HRM_JOB_POSITON_ENDING_COMMENT")', 'position'=>502, 'notnull'=>0, 'visible'=>1,),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>151, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>152, 'notnull'=>0, 'visible'=>0,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_contrat' => array('type' => 'integer:Contrat:contrat/class/contrat.class.php', 'label' => 'fk_contrat', 'enabled' => 'isModEnabled("contract")', 'position' => 50, 'notnull' => 0, 'visible' => 0,),
+ 'fk_user' => array('type' => 'integer:User:user/class/user.class.php:0:(t.statut:=:1)', 'label' => 'Employee', 'enabled' => '1', 'position' => 55, 'notnull' => 1, 'visible' => 1, 'default' => 0, 'picto' => 'user', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'fk_job' => array('type' => 'integer:Job:/hrm/class/job.class.php', 'label' => 'JobProfile', 'enabled' => '1', 'position' => 56, 'notnull' => 1, 'visible' => 1, 'picto' => 'jobprofile', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'date_start' => array('type' => 'date', 'label' => 'DateStart', 'enabled' => '1', 'position' => 101, 'notnull' => 1, 'visible' => 1,),
+ 'date_end' => array('type' => 'date', 'label' => 'DateEnd', 'enabled' => '1', 'position' => 102, 'notnull' => 0, 'visible' => 1,),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 120, 'notnull' => 0, 'visible' => 3,),
+ 'abort_comment' => array('type' => 'varchar(255)', 'label' => 'AbandonmentComment', 'enabled' => 'getDolGlobalInt("HRM_JOB_POSITON_ENDING_COMMENT")', 'position' => 502, 'notnull' => 0, 'visible' => 1,),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 151, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 152, 'notnull' => 0, 'visible' => 0,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
);
public $rowid;
public $ref;
@@ -394,7 +394,7 @@ class Position extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php
index f3cdd4a1178..a7e799e7c47 100644
--- a/htdocs/hrm/class/skill.class.php
+++ b/htdocs/hrm/class/skill.class.php
@@ -109,20 +109,20 @@ class Skill extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2',),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php:0', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'required_level' => array('type'=>'integer', 'label'=>'requiredLevel', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>0,),
- 'date_validite' => array('type'=>'integer', 'label'=>'date_validite', 'enabled'=>'1', 'position'=>52, 'notnull'=>1, 'visible'=>0,),
- 'temps_theorique' => array('type'=>'double(24,8)', 'label'=>'temps_theorique', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0,),
- 'skill_type' => array('type'=>'integer', 'label'=>'SkillType', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'css'=>'minwidth200', 'arrayofkeyval'=>array('0'=>'TypeKnowHow', '1'=>'TypeHowToBe', '9'=>'TypeKnowledge'), 'default'=>0),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>70, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>71, 'notnull'=>0, 'visible'=>0,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'showoncombobox' => '2',),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'required_level' => array('type' => 'integer', 'label' => 'requiredLevel', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 0,),
+ 'date_validite' => array('type' => 'integer', 'label' => 'date_validite', 'enabled' => '1', 'position' => 52, 'notnull' => 1, 'visible' => 0,),
+ 'temps_theorique' => array('type' => 'double(24,8)', 'label' => 'temps_theorique', 'enabled' => '1', 'position' => 54, 'notnull' => 1, 'visible' => 0,),
+ 'skill_type' => array('type' => 'integer', 'label' => 'SkillType', 'enabled' => '1', 'position' => 55, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'css' => 'minwidth200', 'arrayofkeyval' => array('0' => 'TypeKnowHow', '1' => 'TypeHowToBe', '9' => 'TypeKnowledge'), 'default' => 0),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 70, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 71, 'notnull' => 0, 'visible' => 0,),
);
public $rowid;
public $label;
@@ -453,7 +453,7 @@ class Skill extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -852,7 +852,7 @@ class Skill extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('skilldao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
@@ -1110,9 +1110,12 @@ class Skill extends CommonObject
global $langs;
$result = '';
switch ($code) {
- case 0: $result = $langs->trans("TypeKnowHow"); break; //"Savoir Faire"
- case 1: $result = $langs->trans("TypeHowToBe"); break; // "Savoir ĂŞtre"
- case 9: $result = $langs->trans("TypeKnowledge"); break; //"Savoir"
+ case 0: $result = $langs->trans("TypeKnowHow");
+ break; //"Savoir Faire"
+ case 1: $result = $langs->trans("TypeHowToBe");
+ break; // "Savoir ĂŞtre"
+ case 9: $result = $langs->trans("TypeKnowledge");
+ break; //"Savoir"
}
return $result;
}
diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php
index ea61efb2f9a..905ce049df9 100644
--- a/htdocs/hrm/class/skilldet.class.php
+++ b/htdocs/hrm/class/skilldet.class.php
@@ -103,13 +103,13 @@ class Skilldet extends CommonObjectLine
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'fk_skill' => array('type'=>'integer:Skill:/hrm/class/skill.class.php', 'label'=>'fk_skill', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>0,),
- 'rankorder' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>10, 'notnull'=>0, 'visible'=>2,),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>0,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'fk_skill' => array('type' => 'integer:Skill:/hrm/class/skill.class.php', 'label' => 'fk_skill', 'enabled' => '1', 'position' => 5, 'notnull' => 1, 'visible' => 0,),
+ 'rankorder' => array('type' => 'integer', 'label' => 'rank', 'enabled' => '1', 'position' => 10, 'notnull' => 0, 'visible' => 2,),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 1,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => 0,),
);
public $rowid;
public $fk_skill;
@@ -376,7 +376,7 @@ class Skilldet extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -765,7 +765,7 @@ class Skilldet extends CommonObjectLine
global $action, $hookmanager;
$hookmanager->initHooks(array('skilldetdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php
index 90c64b8fb42..4f820c3a62f 100644
--- a/htdocs/hrm/class/skillrank.class.php
+++ b/htdocs/hrm/class/skillrank.class.php
@@ -105,16 +105,16 @@ class SkillRank extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'fk_skill' => array('type'=>'integer:Skill:hrm/class/skill.class.php:1', 'label'=>'Skill', 'enabled'=>'1', 'position'=>3, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
- 'rankorder' => array('type'=>'integer', 'label'=>'Rank', 'enabled'=>'1', 'position'=>4, 'notnull'=>1, 'visible'=>1, 'default' => 0),
- 'fk_object' => array('type'=>'integer', 'label'=>'object', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'objecttype' => array('type'=>'varchar(128)', 'label'=>'objecttype', 'enabled'=>'1', 'position'=>6, 'notnull'=>1, 'visible'=>0,),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'fk_skill' => array('type' => 'integer:Skill:hrm/class/skill.class.php:1', 'label' => 'Skill', 'enabled' => '1', 'position' => 3, 'notnull' => 1, 'visible' => 1, 'index' => 1,),
+ 'rankorder' => array('type' => 'integer', 'label' => 'Rank', 'enabled' => '1', 'position' => 4, 'notnull' => 1, 'visible' => 1, 'default' => 0),
+ 'fk_object' => array('type' => 'integer', 'label' => 'object', 'enabled' => '1', 'position' => 5, 'notnull' => 1, 'visible' => 0,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'objecttype' => array('type' => 'varchar(128)', 'label' => 'objecttype', 'enabled' => '1', 'position' => 6, 'notnull' => 1, 'visible' => 0,),
);
public $rowid;
public $fk_skill;
@@ -425,7 +425,7 @@ class SkillRank extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -814,7 +814,7 @@ class SkillRank extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('skillrankdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php
index 476a429d972..d1bde9d79c5 100644
--- a/htdocs/modulebuilder/template/myobject_list.php
+++ b/htdocs/modulebuilder/template/myobject_list.php
@@ -249,6 +249,7 @@ if (empty($reshook)) {
$search[$key.'_dtend'] = '';
}
}
+ $search_all = '';
$toselect = array();
$search_array_options = array();
}
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index 1d84352bdc8..29ada1293c7 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -96,30 +96,30 @@ class Mo extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>'1', 'noteditable'=>1),
- 'fk_bom' => array('type'=>'integer:Bom:bom/class/bom.class.php:0:(t.status:=:1)', 'filter'=>'active=1', 'label'=>'BOM', 'enabled'=>'$conf->bom->enabled', 'visible'=>1, 'position'=>33, 'notnull'=>-1, 'index'=>1, 'comment'=>"Original BOM", 'css'=>'minwidth100 maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'bom'),
- 'mrptype' => array('type'=>'integer', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'position'=>34, 'notnull'=>1, 'default'=>'0', 'arrayofkeyval'=>array(0=>'Manufacturing', 1=>'Disassemble'), 'css'=>'minwidth150', 'csslist'=>'minwidth150 center'),
- 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php:0', 'label'=>'Product', 'enabled'=>'isModEnabled("product")', 'visible'=>1, 'position'=>35, 'notnull'=>1, 'index'=>1, 'comment'=>"Product to produce", 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax100', 'picto'=>'product'),
- 'qty' => array('type'=>'real', 'label'=>'QtyToProduce', 'enabled'=>1, 'visible'=>1, 'position'=>40, 'notnull'=>1, 'comment'=>"Qty to produce", 'css'=>'width75', 'default'=>1, 'isameasure'=>1),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>42, 'notnull'=>-1, 'searchall'=>1, 'showoncombobox'=>'2', 'css'=>'maxwidth300', 'csslist'=>'tdoverflowmax200', 'alwayseditable'=>1),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1', 'label'=>'ThirdParty', 'picto'=>'company', 'enabled'=>'isModEnabled("societe")', 'visible'=>-1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'css'=>'maxwidth400', 'csslist'=>'tdoverflowmax150'),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)', 'label'=>'Project', 'picto'=>'project', 'enabled'=>'$conf->project->enabled', 'visible'=>-1, 'position'=>51, 'notnull'=>-1, 'index'=>1, 'css'=>'minwidth200 maxwidth400', 'csslist'=>'tdoverflowmax100'),
- 'fk_warehouse' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php:0', 'label'=>'WarehouseForProduction', 'picto'=>'stock', 'enabled'=>'isModEnabled("stock")', 'visible'=>1, 'position'=>52, 'css'=>'maxwidth400', 'csslist'=>'tdoverflowmax200'),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>61, 'notnull'=>-1,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>62, 'notnull'=>-1,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'position'=>500, 'notnull'=>1,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-2, 'position'=>501, 'notnull'=>1,),
- 'date_valid' => array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>502,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'position'=>510, 'notnull'=>1, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'position'=>511, 'notnull'=>-1, 'csslist'=>'tdoverflowmax100'),
- 'date_start_planned' => array('type'=>'datetime', 'label'=>'DateStartPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>55, 'notnull'=>-1, 'index'=>1, 'help'=>'KeepEmptyForAsap', 'alwayseditable'=>1, 'csslist'=>'nowraponall'),
- 'date_end_planned' => array('type'=>'datetime', 'label'=>'DateEndPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>56, 'notnull'=>-1, 'index'=>1, 'alwayseditable'=>1, 'csslist'=>'nowraponall'),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
- 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'default'=>0, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'InProgress', '3'=>'StatusMOProduced', '9'=>'Canceled')),
- 'fk_parent_line' => array('type'=>'integer:MoLine:mrp/class/mo.class.php', 'label'=>'ParentMo', 'enabled'=>1, 'visible'=>0, 'position'=>1020, 'default'=>0, 'notnull'=>0, 'index'=>1,'showoncombobox'=>0),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'position' => 1, 'notnull' => 1, 'index' => 1, 'comment' => "Id",),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'position' => 5, 'notnull' => 1, 'default' => '1', 'index' => 1),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => 1, 'visible' => 4, 'position' => 10, 'notnull' => 1, 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'comment' => "Reference of object", 'showoncombobox' => '1', 'noteditable' => 1),
+ 'fk_bom' => array('type' => 'integer:Bom:bom/class/bom.class.php:0:(t.status:=:1)', 'filter' => 'active=1', 'label' => 'BOM', 'enabled' => '$conf->bom->enabled', 'visible' => 1, 'position' => 33, 'notnull' => -1, 'index' => 1, 'comment' => "Original BOM", 'css' => 'minwidth100 maxwidth500', 'csslist' => 'tdoverflowmax150', 'picto' => 'bom'),
+ 'mrptype' => array('type' => 'integer', 'label' => 'Type', 'enabled' => 1, 'visible' => 1, 'position' => 34, 'notnull' => 1, 'default' => '0', 'arrayofkeyval' => array(0 => 'Manufacturing', 1 => 'Disassemble'), 'css' => 'minwidth150', 'csslist' => 'minwidth150 center'),
+ 'fk_product' => array('type' => 'integer:Product:product/class/product.class.php:0', 'label' => 'Product', 'enabled' => 'isModEnabled("product")', 'visible' => 1, 'position' => 35, 'notnull' => 1, 'index' => 1, 'comment' => "Product to produce", 'css' => 'maxwidth300', 'csslist' => 'tdoverflowmax100', 'picto' => 'product'),
+ 'qty' => array('type' => 'real', 'label' => 'QtyToProduce', 'enabled' => 1, 'visible' => 1, 'position' => 40, 'notnull' => 1, 'comment' => "Qty to produce", 'css' => 'width75', 'default' => 1, 'isameasure' => 1),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'visible' => 1, 'position' => 42, 'notnull' => -1, 'searchall' => 1, 'showoncombobox' => '2', 'css' => 'maxwidth300', 'csslist' => 'tdoverflowmax200', 'alwayseditable' => 1),
+ 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php:1', 'label' => 'ThirdParty', 'picto' => 'company', 'enabled' => 'isModEnabled("societe")', 'visible' => -1, 'position' => 50, 'notnull' => -1, 'index' => 1, 'css' => 'maxwidth400', 'csslist' => 'tdoverflowmax150'),
+ 'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1:(fk_statut:=:1)', 'label' => 'Project', 'picto' => 'project', 'enabled' => '$conf->project->enabled', 'visible' => -1, 'position' => 51, 'notnull' => -1, 'index' => 1, 'css' => 'minwidth200 maxwidth400', 'csslist' => 'tdoverflowmax100'),
+ 'fk_warehouse' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php:0', 'label' => 'WarehouseForProduction', 'picto' => 'stock', 'enabled' => 'isModEnabled("stock")', 'visible' => 1, 'position' => 52, 'css' => 'maxwidth400', 'csslist' => 'tdoverflowmax200'),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'visible' => 0, 'position' => 61, 'notnull' => -1,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => 1, 'visible' => 0, 'position' => 62, 'notnull' => -1,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'position' => 500, 'notnull' => 1,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -2, 'position' => 501, 'notnull' => 1,),
+ 'date_valid' => array('type' => 'datetime', 'label' => 'DateValidation', 'enabled' => 1, 'visible' => -2, 'position' => 502,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => -2, 'position' => 510, 'notnull' => 1, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax100'),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => 1, 'visible' => -2, 'position' => 511, 'notnull' => -1, 'csslist' => 'tdoverflowmax100'),
+ 'date_start_planned' => array('type' => 'datetime', 'label' => 'DateStartPlannedMo', 'enabled' => 1, 'visible' => 1, 'position' => 55, 'notnull' => -1, 'index' => 1, 'help' => 'KeepEmptyForAsap', 'alwayseditable' => 1, 'csslist' => 'nowraponall'),
+ 'date_end_planned' => array('type' => 'datetime', 'label' => 'DateEndPlannedMo', 'enabled' => 1, 'visible' => 1, 'position' => 56, 'notnull' => -1, 'index' => 1, 'alwayseditable' => 1, 'csslist' => 'nowraponall'),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 1010),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 1000, 'default' => 0, 'notnull' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'InProgress', '3' => 'StatusMOProduced', '9' => 'Canceled')),
+ 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => 0, 'notnull' => 0, 'index' => 1,'showoncombobox' => 0),
);
public $rowid;
public $entity;
@@ -578,8 +578,8 @@ class Mo extends CommonObject
$obj = $this->db->fetch_object($resql);
if ($obj) {
$resarray[] = array(
- 'rowid'=> $obj->rowid,
- 'date'=> $this->db->jdate($obj->date_creation),
+ 'rowid' => $obj->rowid,
+ 'date' => $this->db->jdate($obj->date_creation),
'qty' => $obj->qty,
'role' => $obj->role,
'fk_product' => $obj->fk_product,
@@ -1487,7 +1487,7 @@ class Mo extends CommonObject
//if ($withpicto != 2) $result.=(($addlabel && $this->label) ? $sep . dol_trunc($this->label, ($addlabel > 1 ? $addlabel : 0)) : '');
$hookmanager->initHooks(array('modao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
@@ -1752,7 +1752,7 @@ class Mo extends CommonObject
foreach ($this->lines as $line) {
$reshook = 0;
if (is_object($hookmanager)) {
- $parameters = array('line'=>$line, 'i'=>$i, 'restrictlist'=>$restrictlist, 'selectedLines'=> $selectedLines);
+ $parameters = array('line' => $line, 'i' => $i, 'restrictlist' => $restrictlist, 'selectedLines' => $selectedLines);
if (!empty($line->fk_parent_line)) {
$parameters['fk_parent_line'] = $line->fk_parent_line;
}
@@ -1843,9 +1843,9 @@ class Mo extends CommonObject
$error = 0;
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."mrp_mo as mo_child";
- $sql.= " WHERE fk_parent_line IN ";
- $sql.= " (SELECT rowid FROM ".MAIN_DB_PREFIX."mrp_production as line_parent";
- $sql.= " WHERE fk_mo=".((int) $this->id).")";
+ $sql .= " WHERE fk_parent_line IN ";
+ $sql .= " (SELECT rowid FROM ".MAIN_DB_PREFIX."mrp_production as line_parent";
+ $sql .= " WHERE fk_mo=".((int) $this->id).")";
$resql = $this->db->query($sql);
@@ -1929,8 +1929,8 @@ class Mo extends CommonObject
$error = 0;
$sql = "SELECT lineparent.fk_mo as id_moparent FROM ".MAIN_DB_PREFIX."mrp_mo as mo";
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_production lineparent ON mo.fk_parent_line = lineparent.rowid";
- $sql.= " WHERE mo.rowid = ".((int) $this->id);
+ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."mrp_production lineparent ON mo.fk_parent_line = lineparent.rowid";
+ $sql .= " WHERE mo.rowid = ".((int) $this->id);
$resql = $this->db->query($sql);
@@ -2024,27 +2024,27 @@ class MoLine extends CommonObjectLine
public $isextrafieldmanaged = 1;
public $fields = array(
- 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
- 'fk_mo' =>array('type'=>'integer', 'label'=>'Mo', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15),
- 'origin_id' =>array('type'=>'integer', 'label'=>'Origin', 'enabled'=>1, 'visible'=>-1, 'notnull'=>0, 'position'=>17),
- 'origin_type' =>array('type'=>'varchar(10)', 'label'=>'Origin type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>0, 'position'=>18),
- 'position' =>array('type'=>'integer', 'label'=>'Position', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
- 'fk_product' =>array('type'=>'integer', 'label'=>'Product', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
- 'fk_warehouse' =>array('type'=>'integer', 'label'=>'Warehouse', 'enabled'=>1, 'visible'=>-1, 'position'=>30),
- 'qty' =>array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>35),
- 'qty_frozen' => array('type'=>'smallint', 'label'=>'QuantityFrozen', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>105, 'css'=>'maxwidth50imp', 'help'=>'QuantityConsumedInvariable'),
- 'disable_stock_change' => array('type'=>'smallint', 'label'=>'DisableStockChange', 'enabled'=>1, 'visible'=>1, 'default'=>0, 'position'=>108, 'css'=>'maxwidth50imp', 'help'=>'DisableStockChangeHelp'),
- 'batch' =>array('type'=>'varchar(30)', 'label'=>'Batch', 'enabled'=>1, 'visible'=>-1, 'position'=>140),
- 'role' =>array('type'=>'varchar(10)', 'label'=>'Role', 'enabled'=>1, 'visible'=>-1, 'position'=>145),
- 'fk_mrp_production' =>array('type'=>'integer', 'label'=>'Fk mrp production', 'enabled'=>1, 'visible'=>-1, 'position'=>150),
- 'fk_stock_movement' =>array('type'=>'integer', 'label'=>'StockMovement', 'enabled'=>1, 'visible'=>-1, 'position'=>155),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>160),
- 'tms' =>array('type'=>'timestamp', 'label'=>'Tms', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>165),
- 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>170),
- 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
- 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
- 'fk_default_workstation' =>array('type'=>'integer', 'label'=>'DefaultWorkstation', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'position'=>185),
- 'fk_unit' =>array('type'=>'int', 'label'=>'Unit', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'position'=>186)
+ 'rowid' => array('type' => 'integer', 'label' => 'ID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
+ 'fk_mo' => array('type' => 'integer', 'label' => 'Mo', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 15),
+ 'origin_id' => array('type' => 'integer', 'label' => 'Origin', 'enabled' => 1, 'visible' => -1, 'notnull' => 0, 'position' => 17),
+ 'origin_type' => array('type' => 'varchar(10)', 'label' => 'Origin type', 'enabled' => 1, 'visible' => -1, 'notnull' => 0, 'position' => 18),
+ 'position' => array('type' => 'integer', 'label' => 'Position', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 20),
+ 'fk_product' => array('type' => 'integer', 'label' => 'Product', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 25),
+ 'fk_warehouse' => array('type' => 'integer', 'label' => 'Warehouse', 'enabled' => 1, 'visible' => -1, 'position' => 30),
+ 'qty' => array('type' => 'real', 'label' => 'Qty', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 35),
+ 'qty_frozen' => array('type' => 'smallint', 'label' => 'QuantityFrozen', 'enabled' => 1, 'visible' => 1, 'default' => 0, 'position' => 105, 'css' => 'maxwidth50imp', 'help' => 'QuantityConsumedInvariable'),
+ 'disable_stock_change' => array('type' => 'smallint', 'label' => 'DisableStockChange', 'enabled' => 1, 'visible' => 1, 'default' => 0, 'position' => 108, 'css' => 'maxwidth50imp', 'help' => 'DisableStockChangeHelp'),
+ 'batch' => array('type' => 'varchar(30)', 'label' => 'Batch', 'enabled' => 1, 'visible' => -1, 'position' => 140),
+ 'role' => array('type' => 'varchar(10)', 'label' => 'Role', 'enabled' => 1, 'visible' => -1, 'position' => 145),
+ 'fk_mrp_production' => array('type' => 'integer', 'label' => 'Fk mrp production', 'enabled' => 1, 'visible' => -1, 'position' => 150),
+ 'fk_stock_movement' => array('type' => 'integer', 'label' => 'StockMovement', 'enabled' => 1, 'visible' => -1, 'position' => 155),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 160),
+ 'tms' => array('type' => 'timestamp', 'label' => 'Tms', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 165),
+ 'fk_user_creat' => array('type' => 'integer', 'label' => 'UserCreation', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 170),
+ 'fk_user_modif' => array('type' => 'integer', 'label' => 'UserModification', 'enabled' => 1, 'visible' => -1, 'position' => 175),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -1, 'position' => 180),
+ 'fk_default_workstation' => array('type' => 'integer', 'label' => 'DefaultWorkstation', 'enabled' => 1, 'visible' => 1, 'notnull' => 0, 'position' => 185),
+ 'fk_unit' => array('type' => 'int', 'label' => 'Unit', 'enabled' => 1, 'visible' => 1, 'notnull' => 0, 'position' => 186)
);
public $rowid;
@@ -2193,7 +2193,7 @@ class MoLine extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php
index 1fe88d65be8..8d0d577cce7 100644
--- a/htdocs/opensurvey/class/opensurveysondage.class.php
+++ b/htdocs/opensurvey/class/opensurveysondage.class.php
@@ -102,23 +102,23 @@ class Opensurveysondage extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'id_sondage' => array('type'=>'varchar(16)', 'label'=>'Idsondage', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>-1,),
- 'commentaires' => array('type'=>'mediumtext', 'label'=>'Comments', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>-1,),
- 'mail_admin' => array('type'=>'varchar(128)', 'label'=>'Mailadmin', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>-1,),
- 'nom_admin' => array('type'=>'varchar(64)', 'label'=>'Nomadmin', 'enabled'=>'1', 'position'=>25, 'notnull'=>0, 'visible'=>-1,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>-2, 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150',),
- 'titre' => array('type'=>'mediumtext', 'label'=>'Title', 'enabled'=>'1', 'position'=>35, 'notnull'=>1, 'visible'=>-1,),
- 'date_fin' => array('type'=>'datetime', 'label'=>'DateEnd', 'enabled'=>'1', 'position'=>40, 'notnull'=>1, 'visible'=>-1,),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>500, 'notnull'=>0, 'visible'=>-1,),
- 'format' => array('type'=>'varchar(2)', 'label'=>'Format', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>-1,),
- 'mailsonde' => array('type'=>'integer', 'label'=>'Mailsonde', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>-1,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>60, 'notnull'=>1, 'visible'=>-1,),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>'1', 'position'=>65, 'notnull'=>1, 'visible'=>-2, 'default'=>'1', 'index'=>1,),
- 'allow_comments' => array('type'=>'integer', 'label'=>'Allowcomments', 'enabled'=>'1', 'position'=>70, 'notnull'=>1, 'visible'=>-1,),
- 'allow_spy' => array('type'=>'integer', 'label'=>'Allowspy', 'enabled'=>'1', 'position'=>75, 'notnull'=>1, 'visible'=>-1,),
- 'sujet' => array('type'=>'mediumtext', 'label'=>'Sujet', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,),
- 'id_sondage_admin' => array('type'=>'char(24)', 'label'=>'Idsondageadmin', 'enabled'=>'1', 'position'=>85, 'notnull'=>0, 'visible'=>-1,),
+ public $fields = array(
+ 'id_sondage' => array('type' => 'varchar(16)', 'label' => 'Idsondage', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => -1,),
+ 'commentaires' => array('type' => 'mediumtext', 'label' => 'Comments', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => -1,),
+ 'mail_admin' => array('type' => 'varchar(128)', 'label' => 'Mailadmin', 'enabled' => '1', 'position' => 20, 'notnull' => 0, 'visible' => -1,),
+ 'nom_admin' => array('type' => 'varchar(64)', 'label' => 'Nomadmin', 'enabled' => '1', 'position' => 25, 'notnull' => 0, 'visible' => -1,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => -2, 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150',),
+ 'titre' => array('type' => 'mediumtext', 'label' => 'Title', 'enabled' => '1', 'position' => 35, 'notnull' => 1, 'visible' => -1,),
+ 'date_fin' => array('type' => 'datetime', 'label' => 'DateEnd', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => -1,),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => '1', 'position' => 500, 'notnull' => 0, 'visible' => -1,),
+ 'format' => array('type' => 'varchar(2)', 'label' => 'Format', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => -1,),
+ 'mailsonde' => array('type' => 'integer', 'label' => 'Mailsonde', 'enabled' => '1', 'position' => 55, 'notnull' => 1, 'visible' => -1,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 60, 'notnull' => 1, 'visible' => -1,),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => '1', 'position' => 65, 'notnull' => 1, 'visible' => -2, 'default' => '1', 'index' => 1,),
+ 'allow_comments' => array('type' => 'integer', 'label' => 'Allowcomments', 'enabled' => '1', 'position' => 70, 'notnull' => 1, 'visible' => -1,),
+ 'allow_spy' => array('type' => 'integer', 'label' => 'Allowspy', 'enabled' => '1', 'position' => 75, 'notnull' => 1, 'visible' => -1,),
+ 'sujet' => array('type' => 'mediumtext', 'label' => 'Sujet', 'enabled' => '1', 'position' => 80, 'notnull' => 0, 'visible' => -1,),
+ 'id_sondage_admin' => array('type' => 'char(24)', 'label' => 'Idsondageadmin', 'enabled' => '1', 'position' => 85, 'notnull' => 0, 'visible' => -1,),
);
/**
@@ -566,7 +566,7 @@ class Opensurveysondage extends CommonObject
global $action;
$hookmanager->initHooks(array($this->element . 'dao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
@@ -599,7 +599,7 @@ class Opensurveysondage extends CommonObject
$i = 0;
while ($i < $num) {
$obj = $this->db->fetch_object($resql);
- $tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
+ $tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
$this->lines[] = $tmp;
$i++;
@@ -832,7 +832,7 @@ class Opensurveysondage extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php
index 3ef52447968..335009e0e29 100644
--- a/htdocs/partnership/class/partnership_type.class.php
+++ b/htdocs/partnership/class/partnership_type.class.php
@@ -69,12 +69,12 @@ class PartnershipType extends CommonObject
public $active;
- public $fields=array(
- 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
- 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1),
- 'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
- 'label' =>array('type'=>'varchar(64)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25, 'showoncombobox'=>1),
- 'active' =>array('type'=>'integer', 'label'=>'Active', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'position' => 15, 'index' => 1),
+ 'code' => array('type' => 'varchar(32)', 'label' => 'Code', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 20),
+ 'label' => array('type' => 'varchar(64)', 'label' => 'Label', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 25, 'showoncombobox' => 1),
+ 'active' => array('type' => 'integer', 'label' => 'Active', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 30),
);
@@ -182,7 +182,7 @@ class PartnershipType extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -348,7 +348,7 @@ class PartnershipType extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('myobjectdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index 54310e0d759..0292732aefc 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -446,7 +446,7 @@ if ($id > 0 || !empty($ref)) {
$total += $totalline;
print '';
- print($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x ' : '').''.price($unitline, '', '', 0, 0, -1, $conf->currency)).' ';
+ print($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x ' : '').''.price($unitline, 0, '', 0, 0, -1, $conf->currency)).' ';
print ' ';
// Best selling price
@@ -460,7 +460,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print($notdefined ? '' : ($value['nb'] > 1 ? $value['nb'].'x ' : ''));
if (is_numeric($pricesell)) {
- print ''.price($pricesell, '', '', 0, 0, -1, $conf->currency).' ';
+ print ''.price($pricesell, 0, '', 0, 0, -1, $conf->currency).' ';
} else {
print ''.$langs->trans($pricesell).' ';
}
@@ -567,7 +567,7 @@ if ($id > 0 || !empty($ref)) {
if ($atleastonenotdefined) {
print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')';
}
- print($atleastonenotdefined ? '' : price($total, '', '', 0, 0, -1, $conf->currency));
+ print($atleastonenotdefined ? '' : price($total, 0, '', 0, 0, -1, $conf->currency));
print ' ';
// Minimum selling price
@@ -579,7 +579,7 @@ if ($id > 0 || !empty($ref)) {
if ($atleastonenotdefined) {
print $langs->trans("Unknown").' ('.$langs->trans("SomeSubProductHaveNoPrices").')';
}
- print($atleastonenotdefined ? '' : price($totalsell, '', '', 0, 0, -1, $conf->currency));
+ print($atleastonenotdefined ? '' : price($totalsell, 0, '', 0, 0, -1, $conf->currency));
print '';
// Stock
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 28af89a6246..9abf9bd5326 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php';
-$type = GETPOSTINT("type");
+$type = GETPOST("type", 'intcomma');
if ($type == '' && !$user->hasRight('produit', 'lire') && $user->hasRight('service', 'lire')) {
$type = '1'; // Force global page on service page only
}
@@ -69,15 +69,15 @@ if ($type == '0') {
$transAreaType = $langs->trans("ProductsAndServicesArea");
$helpurl = '';
-if (!isset($_GET["type"])) {
+if (!GETPOSTISSET("type")) {
$transAreaType = $langs->trans("ProductsAndServicesArea");
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
}
-if ((isset($_GET["type"]) && $_GET["type"] == 0) || !isModEnabled("service")) {
+if ((GETPOSTISSET("type") && GETPOST("type") == '0') || !isModEnabled("service")) {
$transAreaType = $langs->trans("ProductsArea");
$helpurl = 'EN:Module_Products|FR:Module_Produits|ES:Módulo_Productos';
}
-if ((isset($_GET["type"]) && $_GET["type"] == 1) || !isModEnabled("product")) {
+if ((GETPOSTISSET("type") && GETPOST("type") == '1') || !isModEnabled("product")) {
$transAreaType = $langs->trans("ServicesArea");
$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios';
}
@@ -310,10 +310,10 @@ if ((isModEnabled("product") || isModEnabled("service")) && ($user->hasRight("pr
if ($num > 0) {
$transRecordedType = $langs->trans("LastModifiedProductsAndServices", $max);
- if (isset($_GET["type"]) && $_GET["type"] == 0) {
+ if (GETPOSTISSET("type") && GETPOST("type") == '0') {
$transRecordedType = $langs->trans("LastRecordedProducts", $max);
}
- if (isset($_GET["type"]) && $_GET["type"] == 1) {
+ if (GETPOSTISSET("type") && GETPOST("type") == '1') {
$transRecordedType = $langs->trans("LastRecordedServices", $max);
}
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index ca5bcb5fded..787cc14f779 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -52,7 +52,7 @@ $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hier
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST("sref", "alpha") ? GETPOST("sref", "alpha") : GETPOST("search_ref", "alpha");
$search_label = GETPOST("snom", "alpha") ? GETPOST("snom", "alpha") : GETPOST("search_label", "alpha");
-$search_status = GETPOSTINT("search_status");
+$search_status = GETPOST("search_status", "intcomma");
$search_category_list = array();
if (isModEnabled('category')) {
diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
index 4d1111f1d84..7ba9d0105dc 100644
--- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
+++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php
@@ -125,32 +125,32 @@ class StockTransfer extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>'1', 'position'=>1, 'default'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'css'=>'minwidth100', 'csslist'=>'tdoverflowmax125', 'autofocusoncreate'=>1),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>3,),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>32, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'picto'=>'project', 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax125'),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1/*, 'help'=>"LinkToThirdparty"*/, 'picto'=>'company', 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax125'),
- 'fk_warehouse_source' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'EntrepĂ´t source', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'help'=>'HelpWarehouseStockTransferSource', 'picto'=>'stock', 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'fk_warehouse_destination' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'EntrepĂ´t de destination', 'enabled'=>'1', 'position'=>51, 'notnull'=>0, 'visible'=>1, 'help'=>'HelpWarehouseStockTransferDestination', 'picto'=>'stock', 'css'=>'maxwidth500 widthcentpercentminusxx', 'csslist'=>'tdoverflowmax150'),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'date_prevue_depart' => array('type'=>'date', 'label'=>'DatePrevueDepart', 'enabled'=>'1', 'position'=>100, 'notnull'=>0, 'visible'=>1,),
- 'date_reelle_depart' => array('type'=>'date', 'label'=>'DateReelleDepart', 'enabled'=>'1', 'position'=>101, 'notnull'=>0, 'visible'=>5,),
- 'date_prevue_arrivee' => array('type'=>'date', 'label'=>'DatePrevueArrivee', 'enabled'=>'1', 'position'=>102, 'notnull'=>0, 'visible'=>1,),
- 'date_reelle_arrivee' => array('type'=>'date', 'label'=>'DateReelleArrivee', 'enabled'=>'1', 'position'=>103, 'notnull'=>0, 'visible'=>5,),
- 'lead_time_for_warning' => array('type'=>'integer', 'label'=>'LeadTimeForWarning', 'enabled'=>'1', 'position'=>200, 'default'=>0, 'notnull'=>0, 'visible'=>1),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'ChangedBy', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
- 'fk_incoterms' => array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-2, 'position'=>220),
- 'location_incoterms' => array('type'=>'varchar(255)', 'label'=>'IncotermLabel', 'enabled'=>'$conf->incoterm->enabled', 'visible'=>-2, 'position'=>225),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>5, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'StockStransferDecremented', '3'=>'StockStransferIncremented'),),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'comment' => "Id"),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => '1', 'position' => 1, 'default' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 4, 'noteditable' => '1', 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Reference of object"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'css' => 'minwidth100', 'csslist' => 'tdoverflowmax125', 'autofocusoncreate' => 1),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 31, 'notnull' => 0, 'visible' => 3,),
+ 'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1', 'label' => 'Project', 'enabled' => '$conf->project->enabled', 'position' => 32, 'notnull' => -1, 'visible' => -1, 'index' => 1, 'picto' => 'project', 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax125'),
+ 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label' => 'ThirdParty', 'enabled' => '1', 'position' => 50, 'notnull' => -1, 'visible' => 1, 'index' => 1/*, 'help'=>"LinkToThirdparty"*/, 'picto' => 'company', 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax125'),
+ 'fk_warehouse_source' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'EntrepĂ´t source', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => 1, 'help' => 'HelpWarehouseStockTransferSource', 'picto' => 'stock', 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'fk_warehouse_destination' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'EntrepĂ´t de destination', 'enabled' => '1', 'position' => 51, 'notnull' => 0, 'visible' => 1, 'help' => 'HelpWarehouseStockTransferDestination', 'picto' => 'stock', 'css' => 'maxwidth500 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'date_prevue_depart' => array('type' => 'date', 'label' => 'DatePrevueDepart', 'enabled' => '1', 'position' => 100, 'notnull' => 0, 'visible' => 1,),
+ 'date_reelle_depart' => array('type' => 'date', 'label' => 'DateReelleDepart', 'enabled' => '1', 'position' => 101, 'notnull' => 0, 'visible' => 5,),
+ 'date_prevue_arrivee' => array('type' => 'date', 'label' => 'DatePrevueArrivee', 'enabled' => '1', 'position' => 102, 'notnull' => 0, 'visible' => 1,),
+ 'date_reelle_arrivee' => array('type' => 'date', 'label' => 'DateReelleArrivee', 'enabled' => '1', 'position' => 103, 'notnull' => 0, 'visible' => 5,),
+ 'lead_time_for_warning' => array('type' => 'integer', 'label' => 'LeadTimeForWarning', 'enabled' => '1', 'position' => 200, 'default' => 0, 'notnull' => 0, 'visible' => 1),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'ChangedBy', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => '1', 'position' => 1010, 'notnull' => -1, 'visible' => 0,),
+ 'fk_incoterms' => array('type' => 'integer', 'label' => 'IncotermCode', 'enabled' => '$conf->incoterm->enabled', 'visible' => -2, 'position' => 220),
+ 'location_incoterms' => array('type' => 'varchar(255)', 'label' => 'IncotermLabel', 'enabled' => '$conf->incoterm->enabled', 'visible' => -2, 'position' => 225),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'visible' => 5, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'StockStransferDecremented', '3' => 'StockStransferIncremented'),),
);
public $rowid;
public $ref;
@@ -397,7 +397,7 @@ class StockTransfer extends CommonObject
}
if (!empty($this->lines)) {
foreach ($this->lines as $l) {
- $total_pmp+= ($l->pmp * $l->qty);
+ $total_pmp += ($l->pmp * $l->qty);
}
}
@@ -436,7 +436,7 @@ class StockTransfer extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -830,7 +830,7 @@ class StockTransfer extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('stocktransferdao'));
- $parameters = array('id'=>$this->id, 'getnomurl'=>$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => $result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php
index dbd2db3bce4..8eb2c92c8cb 100644
--- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php
+++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php
@@ -95,17 +95,17 @@ class StockTransferLine extends CommonObjectLine
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
- 'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>'1', 'position'=>40, 'notnull'=>0, 'visible'=>1, 'default'=>'null', 'isameasure'=>'1', 'help'=>"Help text for amount",),
- 'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>1, 'default'=>'0', 'isameasure'=>'1', 'css'=>'maxwidth75imp', 'help'=>"Help text for quantity",),
- 'fk_warehouse_destination' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'EntrepĂ´t de destination', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,),
- 'fk_warehouse_source' => array('type'=>'integer:Entrepot:product/stock/class/entrepot.class.php', 'label'=>'EntrepĂ´t source', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,),
- 'fk_stocktransfer' => array('type'=>'integer:StockTransfer:stocktransfer/stock/class/stocktransfer.class.php', 'label'=>'StockTransfer', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>0,),
- 'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,),
- 'batch' => array('type'=>'varchar(128)', 'label'=>'Batch', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>1,),
- 'pmp' => array('type'=>'double'/*, 'help'=>'THMEstimatedHelp'*/, 'label'=>'PMP', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,),
- 'rang' => array('type'=>'integer', 'label'=>'Qty', 'enabled'=>'1', 'position'=>45, 'notnull'=>0, 'visible'=>0, 'default'=>'0', 'isameasure'=>'1', 'css'=>'maxwidth75imp', 'help'=>"Help text for quantity",),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'comment' => "Id"),
+ 'amount' => array('type' => 'price', 'label' => 'Amount', 'enabled' => '1', 'position' => 40, 'notnull' => 0, 'visible' => 1, 'default' => 'null', 'isameasure' => '1', 'help' => "Help text for amount",),
+ 'qty' => array('type' => 'real', 'label' => 'Qty', 'enabled' => '1', 'position' => 45, 'notnull' => 0, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'css' => 'maxwidth75imp', 'help' => "Help text for quantity",),
+ 'fk_warehouse_destination' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'EntrepĂ´t de destination', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 1,),
+ 'fk_warehouse_source' => array('type' => 'integer:Entrepot:product/stock/class/entrepot.class.php', 'label' => 'EntrepĂ´t source', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 1,),
+ 'fk_stocktransfer' => array('type' => 'integer:StockTransfer:stocktransfer/stock/class/stocktransfer.class.php', 'label' => 'StockTransfer', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 0,),
+ 'fk_product' => array('type' => 'integer:Product:product/class/product.class.php', 'label' => 'Product', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 1,),
+ 'batch' => array('type' => 'varchar(128)', 'label' => 'Batch', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => 1,),
+ 'pmp' => array('type' => 'double'/*, 'help'=>'THMEstimatedHelp'*/, 'label' => 'PMP', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => 1,),
+ 'rang' => array('type' => 'integer', 'label' => 'Qty', 'enabled' => '1', 'position' => 45, 'notnull' => 0, 'visible' => 0, 'default' => '0', 'isameasure' => '1', 'css' => 'maxwidth75imp', 'help' => "Help text for quantity",),
);
public $rowid;
public $amount;
@@ -328,7 +328,7 @@ class StockTransferLine extends CommonObjectLine
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -817,7 +817,7 @@ class StockTransferLine extends CommonObjectLine
global $action, $hookmanager;
$hookmanager->initHooks(array('stocktransferlinedao'));
- $parameters = array('id'=>$this->id, 'getnomurl'=>$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => $result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/projet/comment.php b/htdocs/projet/comment.php
index 48803930572..299b15c12fa 100644
--- a/htdocs/projet/comment.php
+++ b/htdocs/projet/comment.php
@@ -143,7 +143,7 @@ print '';
// Budget
print ''.$langs->trans("Budget").' ';
if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
- print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index dd053b04549..310ecd4704e 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -306,14 +306,14 @@ if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
// Opportunity percent
print ''.$langs->trans("OpportunityProbability").' ';
if (!is_null($object->opp_percent) && strcmp($object->opp_percent, '')) {
- print price($object->opp_percent, '', $langs, 1, 0).' %';
+ print price($object->opp_percent, 0, $langs, 1, 0).' %';
}
print ' ';
// Opportunity Amount
print ''.$langs->trans("OpportunityAmount").' ';
if (!is_null($object->opp_amount) && strcmp($object->opp_amount, '')) {
- print ''.price($object->opp_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($object->opp_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
if (strcmp($object->opp_percent, '')) {
print ' '.$langs->trans("Weighted").' : '.price($object->opp_amount * $object->opp_percent / 100, 0, $langs, 1, 0, -1, $conf->currency).' ';
}
@@ -324,7 +324,7 @@ if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
// Budget
print ' '.$langs->trans("Budget").' ';
if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
- print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php
index 63bbbc3ff6e..6b0e853937f 100644
--- a/htdocs/projet/ganttview.php
+++ b/htdocs/projet/ganttview.php
@@ -188,7 +188,7 @@ if (($id > 0 && is_numeric($id)) || !empty($ref)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
- print price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php
index 4ae290dcf7a..c5b496273f9 100644
--- a/htdocs/projet/tasks.php
+++ b/htdocs/projet/tasks.php
@@ -638,7 +638,7 @@ if ($id > 0 || !empty($ref)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (!is_null($object->budget_amount) && strcmp($object->budget_amount, '')) {
- print ''.price($object->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/projet/tasks/comment.php b/htdocs/projet/tasks/comment.php
index 8363c284ba2..4656f02dbed 100644
--- a/htdocs/projet/tasks/comment.php
+++ b/htdocs/projet/tasks/comment.php
@@ -224,7 +224,7 @@ if ($id > 0 || !empty($ref)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php
index 3ae0f6d39e5..f8cc28e05a2 100644
--- a/htdocs/projet/tasks/contact.php
+++ b/htdocs/projet/tasks/contact.php
@@ -260,7 +260,7 @@ if ($id > 0 || !empty($ref)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php
index 207f331d327..7507cafa4b3 100644
--- a/htdocs/projet/tasks/document.php
+++ b/htdocs/projet/tasks/document.php
@@ -217,7 +217,7 @@ if ($object->id > 0) {
// Budget
print ''.$langs->trans("Budget").' ';
if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php
index 5ef996d2ae5..dfd36d12df7 100644
--- a/htdocs/projet/tasks/note.php
+++ b/htdocs/projet/tasks/note.php
@@ -207,7 +207,7 @@ if ($object->id > 0) {
// Budget
print ''.$langs->trans("Budget").' ';
if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
- print price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency);
+ print price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency);
}
print ' ';
diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php
index d9face5c16a..39a8f5dd7db 100644
--- a/htdocs/projet/tasks/task.php
+++ b/htdocs/projet/tasks/task.php
@@ -332,7 +332,7 @@ if ($id > 0 || !empty($ref)) {
// Budget
print ''.$langs->trans("Budget").' ';
if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
- print ''.price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency).' ';
+ print ''.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).' ';
}
print ' ';
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index d4a18ca5fcc..5f079bb44e9 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -1009,7 +1009,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser
// Budget
print '' . $langs->trans("Budget") . ' ';
if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) {
- print '' . price($projectstatic->budget_amount, '', $langs, 1, 0, 0, $conf->currency) . ' ';
+ print '' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . ' ';
}
print ' ';
diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php
index 22be8d3b914..bf874a1fa1f 100644
--- a/htdocs/recruitment/class/recruitmentcandidature.class.php
+++ b/htdocs/recruitment/class/recruitmentcandidature.class.php
@@ -109,31 +109,31 @@ class RecruitmentCandidature extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of candidature", 'csslist'=>'nowraponall'),
- 'fk_recruitmentjobposition' => array('type'=>'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php:0:(t.status:=:1)', 'label'=>'Job', 'enabled'=>'1', 'position'=>15, 'notnull'=>0, 'visible'=>1, 'index'=>1, 'picto'=>'recruitmentjobposition', 'css'=>'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist'=>'minwidth100 nowraponall'),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid', 'csslist'=>'tdoverflowmax100'),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2, 'csslist'=>'tdoverflowmax100'),
- 'lastname' => array('type'=>'varchar(128)', 'label'=>'Lastname', 'enabled'=>'1', 'position'=>20, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'),
- 'firstname' => array('type'=>'varchar(128)', 'label'=>'Firstname', 'enabled'=>'1', 'position'=>21, 'notnull'=>0, 'visible'=>1, 'csslist'=>'tdoverflowmax150'),
- 'email' => array('type'=>'email', 'label'=>'EMail', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'picto'=>'email', 'csslist'=>'tdoverflowmax150'),
- 'phone' => array('type'=>'phone', 'label'=>'Phone', 'enabled'=>'1', 'position'=>31, 'notnull'=>0, 'visible'=>1, 'picto'=>'phone', 'csslist'=>'tdoverflowmax150'),
- 'date_birth' => array('type'=>'date', 'label'=>'DateOfBirth', 'enabled'=>'1', 'position'=>70, 'visible'=>-1,),
- 'email_msgid' => array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'visible'=>-2, 'enabled'=>1, 'position'=>540, 'notnull'=>-1, 'help'=>'EmailMsgIDDesc'),
- 'email_date' => array('type'=>'datetime', 'label'=>'EmailDate', 'visible'=>-2, 'enabled'=>1, 'position'=>541),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'comment' => "Id"),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'position' => 5, 'notnull' => 1, 'default' => '1', 'index' => 1),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 4, 'noteditable' => '1', 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Reference of candidature", 'csslist' => 'nowraponall'),
+ 'fk_recruitmentjobposition' => array('type' => 'integer:RecruitmentJobPosition:recruitment/class/recruitmentjobposition.class.php:0:(t.status:=:1)', 'label' => 'Job', 'enabled' => '1', 'position' => 15, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'picto' => 'recruitmentjobposition', 'css' => 'minwidth300 maxwidth500 widthcentpercentminusx', 'csslist' => 'minwidth100 nowraponall'),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid', 'csslist' => 'tdoverflowmax100'),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2, 'csslist' => 'tdoverflowmax100'),
+ 'lastname' => array('type' => 'varchar(128)', 'label' => 'Lastname', 'enabled' => '1', 'position' => 20, 'notnull' => 0, 'visible' => 1, 'csslist' => 'tdoverflowmax150'),
+ 'firstname' => array('type' => 'varchar(128)', 'label' => 'Firstname', 'enabled' => '1', 'position' => 21, 'notnull' => 0, 'visible' => 1, 'csslist' => 'tdoverflowmax150'),
+ 'email' => array('type' => 'email', 'label' => 'EMail', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'picto' => 'email', 'csslist' => 'tdoverflowmax150'),
+ 'phone' => array('type' => 'phone', 'label' => 'Phone', 'enabled' => '1', 'position' => 31, 'notnull' => 0, 'visible' => 1, 'picto' => 'phone', 'csslist' => 'tdoverflowmax150'),
+ 'date_birth' => array('type' => 'date', 'label' => 'DateOfBirth', 'enabled' => '1', 'position' => 70, 'visible' => -1,),
+ 'email_msgid' => array('type' => 'varchar(255)', 'label' => 'EmailMsgID', 'visible' => -2, 'enabled' => 1, 'position' => 540, 'notnull' => -1, 'help' => 'EmailMsgIDDesc'),
+ 'email_date' => array('type' => 'datetime', 'label' => 'EmailDate', 'visible' => -2, 'enabled' => 1, 'position' => 541),
//'fk_recruitment_origin' => array('type'=>'integer:CRecruitmentOrigin:recruitment/class/crecruitmentorigin.class.php', 'label'=>'Origin', 'enabled'=>'1', 'position'=>45, 'visible'=>1, 'index'=>1),
- 'remuneration_requested' => array('type'=>'integer', 'label'=>'RequestedRemuneration', 'enabled'=>'1', 'position'=>80, 'notnull'=>0, 'visible'=>-1,),
- 'remuneration_proposed' => array('type'=>'integer', 'label'=>'ProposedRemuneration', 'enabled'=>'1', 'position'=>81, 'notnull'=>0, 'visible'=>-1,),
- 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>300, 'notnull'=>0, 'visible'=>3, 'cssview'=>'wordbreak'),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-4, 'csslist'=>'nowraponall'),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'),
- 'fk_user' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'LinkedToDolibarrUser', 'enabled'=>'1', 'position'=>600, 'notnull'=>0, 'visible'=>-1, 'csslist'=>'tdoverflowmax100'),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'default'=>0, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Received', '3'=>'ContractProposed', '5'=>'ContractSigned', '8'=>'Refused', '9'=>'Canceled')),
+ 'remuneration_requested' => array('type' => 'integer', 'label' => 'RequestedRemuneration', 'enabled' => '1', 'position' => 80, 'notnull' => 0, 'visible' => -1,),
+ 'remuneration_proposed' => array('type' => 'integer', 'label' => 'ProposedRemuneration', 'enabled' => '1', 'position' => 81, 'notnull' => 0, 'visible' => -1,),
+ 'description' => array('type' => 'html', 'label' => 'Description', 'enabled' => '1', 'position' => 300, 'notnull' => 0, 'visible' => 3, 'cssview' => 'wordbreak'),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -4, 'csslist' => 'nowraponall'),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2, 'csslist' => 'nowraponall'),
+ 'fk_user' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'LinkedToDolibarrUser', 'enabled' => '1', 'position' => 600, 'notnull' => 0, 'visible' => -1, 'csslist' => 'tdoverflowmax100'),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => '1', 'position' => 1010, 'notnull' => -1, 'visible' => 0,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'visible' => 2, 'index' => 1, 'default' => 0, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Received', '3' => 'ContractProposed', '5' => 'ContractSigned', '8' => 'Refused', '9' => 'Canceled')),
);
public $rowid;
public $entity;
@@ -385,7 +385,7 @@ class RecruitmentCandidature extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -792,7 +792,7 @@ class RecruitmentCandidature extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('recruitmentcandidaturedao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php
index c5acff1ab8a..a288bc65f97 100644
--- a/htdocs/recruitment/class/recruitmentjobposition.class.php
+++ b/htdocs/recruitment/class/recruitmentjobposition.class.php
@@ -115,30 +115,30 @@ class RecruitmentJobPosition extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'comment'=>"Id"),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object", 'css'=>'nowraponall'),
- 'label' => array('type'=>'varchar(255)', 'label'=>'JobLabel', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth500', 'csslist'=>'tdoverflowmax300', 'showoncombobox'=>'2', 'autofocusoncreate'=>1),
- 'qty' => array('type'=>'integer', 'label'=>'NbOfEmployeesExpected', 'enabled'=>'1', 'position'=>45, 'notnull'=>1, 'visible'=>1, 'default'=>'1', 'isameasure'=>'1', 'css'=>'maxwidth75imp'),
- 'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'$conf->project->enabled', 'position'=>52, 'notnull'=>-1, 'visible'=>-1, 'index'=>1, 'css'=>'maxwidth500', 'picto'=>'project'),
- 'fk_user_recruiter' => array('type'=>'integer:User:user/class/user.class.php:1:(statut:=:1)', 'label'=>'ResponsibleOfRecruitement', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'),
- 'email_recruiter' => array('type'=>'varchar(255)', 'label'=>'EmailRecruiter', 'enabled'=>'1', 'position'=>54, 'notnull'=>0, 'visible'=>-1, 'help'=>'ToUseAGenericEmail', 'picto'=>'email'),
- 'fk_user_supervisor' => array('type'=>'integer:User:user/class/user.class.php:1:(statut:=:1)', 'label'=>'FutureManager', 'enabled'=>'1', 'position'=>55, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'user.rowid', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150', 'picto'=>'user'),
- 'fk_establishment' => array('type'=>'integer:Establishment:hrm/class/establishment.class.php', 'label'=>'Establishment', 'enabled'=>'$conf->hrm->enabled', 'position'=>56, 'notnull'=>0, 'visible'=>-1, 'foreignkey'=>'establishment.rowid',),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label'=>'WorkPlace', 'enabled'=>'isModEnabled("societe")', 'position'=>57, 'notnull'=>-1, 'visible'=>-1, 'css'=>'maxwidth500', 'index'=>1, 'help'=>"IfJobIsLocatedAtAPartner", 'picto'=>'company'),
- 'date_planned' => array('type'=>'date', 'label'=>'DateExpected', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>1,),
- 'remuneration_suggested' => array('type'=>'varchar(255)', 'label'=>'Remuneration', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>1,),
- 'description' => array('type'=>'html', 'label'=>'Description', 'enabled'=>'1', 'position'=>65, 'notnull'=>0, 'visible'=>3,),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>101, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>102, 'notnull'=>0, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-4,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>'1', 'position'=>900, 'notnull'=>0, 'visible'=>0,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>'1', 'position'=>1010, 'notnull'=>-1, 'visible'=>0,),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'notnull'=>1, 'visible'=>5, 'default'=>'0', 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '3'=>'Recruited', '9'=>'Canceled'),),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'comment' => "Id"),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'position' => 5, 'notnull' => 1, 'default' => '1', 'index' => 1),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 4, 'noteditable' => '1', 'default' => '(PROV)', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Reference of object", 'css' => 'nowraponall'),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'JobLabel', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth500', 'csslist' => 'tdoverflowmax300', 'showoncombobox' => '2', 'autofocusoncreate' => 1),
+ 'qty' => array('type' => 'integer', 'label' => 'NbOfEmployeesExpected', 'enabled' => '1', 'position' => 45, 'notnull' => 1, 'visible' => 1, 'default' => '1', 'isameasure' => '1', 'css' => 'maxwidth75imp'),
+ 'fk_project' => array('type' => 'integer:Project:projet/class/project.class.php:1', 'label' => 'Project', 'enabled' => '$conf->project->enabled', 'position' => 52, 'notnull' => -1, 'visible' => -1, 'index' => 1, 'css' => 'maxwidth500', 'picto' => 'project'),
+ 'fk_user_recruiter' => array('type' => 'integer:User:user/class/user.class.php:1:(statut:=:1)', 'label' => 'ResponsibleOfRecruitement', 'enabled' => '1', 'position' => 54, 'notnull' => 1, 'visible' => 1, 'foreignkey' => 'user.rowid', 'css' => 'maxwidth500', 'csslist' => 'tdoverflowmax150', 'picto' => 'user'),
+ 'email_recruiter' => array('type' => 'varchar(255)', 'label' => 'EmailRecruiter', 'enabled' => '1', 'position' => 54, 'notnull' => 0, 'visible' => -1, 'help' => 'ToUseAGenericEmail', 'picto' => 'email'),
+ 'fk_user_supervisor' => array('type' => 'integer:User:user/class/user.class.php:1:(statut:=:1)', 'label' => 'FutureManager', 'enabled' => '1', 'position' => 55, 'notnull' => 0, 'visible' => -1, 'foreignkey' => 'user.rowid', 'css' => 'maxwidth500', 'csslist' => 'tdoverflowmax150', 'picto' => 'user'),
+ 'fk_establishment' => array('type' => 'integer:Establishment:hrm/class/establishment.class.php', 'label' => 'Establishment', 'enabled' => '$conf->hrm->enabled', 'position' => 56, 'notnull' => 0, 'visible' => -1, 'foreignkey' => 'establishment.rowid',),
+ 'fk_soc' => array('type' => 'integer:Societe:societe/class/societe.class.php:1:((status:=:1) AND (entity:IN:__SHARED_ENTITIES__))', 'label' => 'WorkPlace', 'enabled' => 'isModEnabled("societe")', 'position' => 57, 'notnull' => -1, 'visible' => -1, 'css' => 'maxwidth500', 'index' => 1, 'help' => "IfJobIsLocatedAtAPartner", 'picto' => 'company'),
+ 'date_planned' => array('type' => 'date', 'label' => 'DateExpected', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 1,),
+ 'remuneration_suggested' => array('type' => 'varchar(255)', 'label' => 'Remuneration', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 1,),
+ 'description' => array('type' => 'html', 'label' => 'Description', 'enabled' => '1', 'position' => 65, 'notnull' => 0, 'visible' => 3,),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 101, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 102, 'notnull' => 0, 'visible' => 0,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -4,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'last_main_doc' => array('type' => 'varchar(255)', 'label' => 'LastMainDoc', 'enabled' => '1', 'position' => 900, 'notnull' => 0, 'visible' => 0,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => '1', 'position' => 1010, 'notnull' => -1, 'visible' => 0,),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'notnull' => 1, 'visible' => 5, 'default' => '0', 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '3' => 'Recruited', '9' => 'Canceled'),),
);
public $rowid;
@@ -400,7 +400,7 @@ class RecruitmentJobPosition extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -869,7 +869,7 @@ class RecruitmentJobPosition extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('recruitmentjobpositiondao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index aa8e03f9d5e..134d68a3eab 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -93,7 +93,8 @@ if (isModEnabled('accounting')) {
$langs->load("products");
}
-$error = 0; $errors = array();
+$error = 0;
+$errors = array();
// Get parameters
@@ -171,7 +172,7 @@ $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'ro
* Actions
*/
-$parameters = array('id'=>$socid, 'objcanvas'=>$objcanvas);
+$parameters = array('id' => $socid, 'objcanvas' => $objcanvas);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@@ -292,12 +293,12 @@ if (empty($reshook)) {
$error++;
}
- if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOSTINT('contact_no_email')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
+ if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOSTINT('contact_no_email') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
}
- if (isModEnabled('mailing') && GETPOSTINT("private") == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOSTINT('contact_no_email')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
+ if (isModEnabled('mailing') && GETPOSTINT("private") == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOSTINT('contact_no_email') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
}
@@ -1413,7 +1414,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Status
print ''.$form->editfieldkey('Status', 'status', '', $object, 0).' ';
- print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), 1, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
+ print $form->selectarray('status', array('0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity')), 1, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
print ' ';
// Barcode
@@ -1728,7 +1729,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
}
// Other attributes
- $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
+ $parameters = array('socid' => $socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
// Parent company
@@ -2167,7 +2168,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
// Status
print ''.$form->editfieldkey('Status', 'status', '', $object, 0).' ';
- print $form->selectarray('status', array('0'=>$langs->trans('ActivityCeased'), '1'=>$langs->trans('InActivity')), $object->status, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
+ print $form->selectarray('status', array('0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity')), $object->status, 0, 0, 0, '', 0, 0, 0, '', 'minwidth100', 1);
print ' ';
// Address
@@ -2487,7 +2488,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
}
// Other attributes
- $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
+ $parameters = array('socid' => $socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
// Parent company
@@ -2945,9 +2946,9 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print ''.$langs->trans('Capital').' ';
if ($object->capital) {
if (isModEnabled("multicurrency") && !empty($object->multicurrency_code)) {
- print price($object->capital, '', $langs, 0, -1, -1, $object->multicurrency_code);
+ print price($object->capital, 0, $langs, 0, -1, -1, $object->multicurrency_code);
} else {
- print price($object->capital, '', $langs, 0, -1, -1, $conf->currency);
+ print price($object->capital, 0, $langs, 0, -1, -1, $conf->currency);
}
} else {
print ' ';
@@ -3048,7 +3049,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
}
// Other attributes
- $parameters = array('socid'=>$socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
+ $parameters = array('socid' => $socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3');
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
// Parent company
diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php
index 0f88fefbd2c..612c9c7852c 100644
--- a/htdocs/societe/class/api_thirdparties.class.php
+++ b/htdocs/societe/class/api_thirdparties.class.php
@@ -1371,7 +1371,7 @@ class Thirdparties extends DolibarrApi
}
/**
- * Get a specific gateway attached to a thirdparty (by specifying the site key)
+ * Get a specific account attached to a thirdparty (by specifying the site key)
*
* @param int $id ID of thirdparty
* @param string $site Site key
@@ -1380,7 +1380,7 @@ class Thirdparties extends DolibarrApi
* @throws RestException 401 Unauthorized: User does not have permission to read thirdparties
* @throws RestException 404 Not Found: Specified thirdparty ID does not belongs to an existing thirdparty
*
- * @url GET {id}/gateways/
+ * @url GET {id}/accounts/
*/
public function getSocieteAccounts($id, $site = null)
{
@@ -1404,7 +1404,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
if ($result && $this->db->num_rows($result) == 0) {
- throw new RestException(404, 'This thirdparty does not have any gateway attached or does not exist.');
+ throw new RestException(404, 'This thirdparty does not have any account attached or does not exist.');
}
$i = 0;
@@ -1440,7 +1440,7 @@ class Thirdparties extends DolibarrApi
}
/**
- * Create and attach a new gateway to an existing thirdparty
+ * Create and attach a new account to an existing thirdparty
*
* Possible fields for request_data (request body) are specified in llx_societe_account table.
* See Table llx_societe_account wiki page for more information
@@ -1452,11 +1452,11 @@ class Thirdparties extends DolibarrApi
* @return array|mixed
*
* @throws RestException 401 Unauthorized: User does not have permission to read thirdparties
- * @throws RestException 409 Conflict: A SocieteAccount entity (gateway) already exists for this company and site.
+ * @throws RestException 409 Conflict: An Account already exists for this company and site.
* @throws RestException 422 Unprocessable Entity: You must pass the site attribute in your request data !
* @throws RestException 500 Internal Server Error: Error creating SocieteAccount account
*
- * @url POST {id}/gateways
+ * @url POST {id}/accounts
*/
public function createSocieteAccount($id, $request_data = null)
{
@@ -1501,10 +1501,10 @@ class Thirdparties extends DolibarrApi
}
/**
- * Create and attach a new (or replace an existing) specific site gateway to a thirdparty
+ * Create and attach a new (or replace an existing) specific site account to a thirdparty
*
* You MUST pass all values to keep (otherwise, they will be deleted) !
- * If you just need to update specific fields prefer PATCH /thirdparties/{id}/gateways/{site} endpoint.
+ * If you just need to update specific fields prefer PATCH /thirdparties/{id}/accounts/{site} endpoint.
* When a SocieteAccount entity does not exist for the id and site
* supplied, a new one will be created. In that case fk_soc and site members form
* request body payload will be ignored and id and site query strings parameters
@@ -1520,7 +1520,7 @@ class Thirdparties extends DolibarrApi
* @throws RestException 422 Unprocessable Entity: You must pass the site attribute in your request data !
* @throws RestException 500 Internal Server Error: Error updating SocieteAccount entity
*
- * @url PUT {id}/gateways/{site}
+ * @url PUT {id}/accounts/{site}
*/
public function putSocieteAccount($id, $site, $request_data = null)
{
@@ -1564,7 +1564,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
if ($result && $this->db->num_rows($result) !== 0) {
- throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) from $site to ".$request_data['site']." but another SocieteAccount entity already exists with this site key.");
+ throw new RestException(409, "You are trying to update this thirdparty Account for $site to ".$request_data['site']." but another Account already exists with this site key.");
}
}
@@ -1601,7 +1601,7 @@ class Thirdparties extends DolibarrApi
}
/**
- * Update specified values of a specific gateway attached to a thirdparty
+ * Update specified values of a specific account attached to a thirdparty
*
* @param int $id Id of thirdparty
* @param string $site Site key
@@ -1614,7 +1614,7 @@ class Thirdparties extends DolibarrApi
* @throws RestException 409 Conflict: Another SocieteAccount entity already exists for this thirdparty with this site key.
* @throws RestException 500 Internal Server Error: Error updating SocieteAccount entity
*
- * @url PATCH {id}/gateways/{site}
+ * @url PATCH {id}/accounts/{site}
*/
public function patchSocieteAccount($id, $site, $request_data = null)
{
@@ -1626,7 +1626,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
if ($result && $this->db->num_rows($result) == 0) {
- throw new RestException(404, "This thirdparty does not have $site gateway attached or does not exist.");
+ throw new RestException(404, "This thirdparty does not have $site account attached or does not exist.");
} else {
// If the user tries to edit the site member, we check first if
if (isset($request_data['site']) && $request_data['site'] !== $site) {
@@ -1634,7 +1634,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
if ($result && $this->db->num_rows($result) !== 0) {
- throw new RestException(409, "You are trying to update this thirdparty SocieteAccount (gateway record) site member from ".$site." to ".$request_data['site']." but another SocieteAccount entity already exists for this thirdparty with this site key.");
+ throw new RestException(409, "You are trying to update this thirdparty Account for ".$site." to ".$request_data['site']." but another Account already exists for this thirdparty with this site key.");
}
}
@@ -1663,17 +1663,17 @@ class Thirdparties extends DolibarrApi
}
/**
- * Delete a specific site gateway attached to a thirdparty (by gateway id)
+ * Delete a specific site account attached to a thirdparty (by account id)
*
* @param int $id ID of thirdparty
* @param int $site Site key
*
* @return void
- * @throws RestException 401 Unauthorized: User does not have permission to delete thirdparties gateways
+ * @throws RestException 401 Unauthorized: User does not have permission to delete thirdparties accounts
* @throws RestException 404 Not Found: Specified thirdparty ID does not belongs to an existing thirdparty
* @throws RestException 500 Internal Server Error: Error deleting SocieteAccount entity
*
- * @url DELETE {id}/gateways/{site}
+ * @url DELETE {id}/accounts/{site}
*/
public function deleteSocieteAccount($id, $site)
{
@@ -1692,22 +1692,22 @@ class Thirdparties extends DolibarrApi
$account->fetch($obj->rowid);
if ($account->delete(DolibarrApiAccess::$user) < 0) {
- throw new RestException(500, "Error while deleting $site gateway attached to this third party");
+ throw new RestException(500, "Error while deleting $site account attached to this third party");
}
}
}
/**
- * Delete all gateways attached to a thirdparty
+ * Delete all accounts attached to a thirdparty
*
* @param int $id ID of thirdparty
*
* @return void
- * @throws RestException 401 Unauthorized: User does not have permission to delete thirdparties gateways
+ * @throws RestException 401 Unauthorized: User does not have permission to delete thirdparties accounts
* @throws RestException 404 Not Found: Specified thirdparty ID does not belongs to an existing thirdparty
* @throws RestException 500 Internal Server Error: Error deleting SocieteAccount entity
*
- * @url DELETE {id}/gateways
+ * @url DELETE {id}/accounts
*/
public function deleteSocieteAccounts($id)
{
@@ -1725,7 +1725,7 @@ class Thirdparties extends DolibarrApi
$result = $this->db->query($sql);
if ($result && $this->db->num_rows($result) == 0) {
- throw new RestException(404, 'This third party does not have any gateway attached or does not exist.');
+ throw new RestException(404, 'This third party does not have any account attached or does not exist.');
} else {
$i = 0;
@@ -1736,7 +1736,7 @@ class Thirdparties extends DolibarrApi
$account->fetch($obj->rowid);
if ($account->delete(DolibarrApiAccess::$user) < 0) {
- throw new RestException(500, 'Error while deleting gateways attached to this third party');
+ throw new RestException(500, 'Error while deleting account attached to this third party');
}
$i++;
}
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 19e620f7b8a..c0baeb41882 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -120,7 +120,7 @@ $search_country = GETPOST("search_country", 'intcomma');
$search_type_thirdparty = GETPOSTINT("search_type_thirdparty");
$search_price_level = GETPOSTINT('search_price_level');
$search_staff = GETPOSTINT("search_staff");
-$search_status = GETPOSTINT("search_status");
+$search_status = GETPOST("search_status", 'intcomma');
$search_type = GETPOST('search_type', 'alpha');
$search_level = GETPOST("search_level", "array:alpha");
$search_stcomm = GETPOST('search_stcomm', "array:int");
@@ -446,6 +446,8 @@ if (empty($reshook)) {
$search_level = '';
$search_parent_name = '';
$search_import_key = '';
+
+ $search_all = '';
$toselect = array();
$search_array_options = array();
}
@@ -472,8 +474,8 @@ if (empty($reshook)) {
}
}
-if ($search_status == '') {
- $search_status = 1; // always display active thirdparty first
+if ($search_status == '' && empty($search_all)) {
+ $search_status = 1; // display active thirdparty only by default
}
diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php
index e8fc5bf25d1..f072cf540c4 100644
--- a/htdocs/supplier_proposal/card.php
+++ b/htdocs/supplier_proposal/card.php
@@ -1825,20 +1825,20 @@ if ($action == 'create') {
print ' ';
// Amount HT
print '' . $langs->trans('AmountHT') . ' ';
- print '' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount HT
- print '' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
print '';
// Amount VAT
print '' . $langs->trans('AmountVAT') . ' ';
- print '' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount VAT
- print '' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
@@ -1846,18 +1846,18 @@ if ($action == 'create') {
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
print '';
print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
print '';
print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ' ';
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
- print '' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
}
@@ -1866,10 +1866,10 @@ if ($action == 'create') {
print '';
// Amount TTC
print '' . $langs->trans('AmountTTC') . ' ';
- print '' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . ' ';
+ print '' . price($object->total_ttc, 0, $langs, 0, -1, -1, $conf->currency) . ' ';
if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
// Multicurrency Amount TTC
- print '' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
+ print '' . price($object->multicurrency_total_ttc, 0, $langs, 0, -1, -1, $object->multicurrency_code) . ' ';
}
print ' ';
diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php
index f852ca9b717..1bc4f15c5bf 100644
--- a/htdocs/ticket/class/cticketcategory.class.php
+++ b/htdocs/ticket/class/cticketcategory.class.php
@@ -99,18 +99,18 @@ class CTicketCategory extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10),
- 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'position'=>15, 'index'=>1),
- 'code' =>array('type'=>'varchar(32)', 'label'=>'Code', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20),
- 'pos' =>array('type'=>'integer', 'label'=>'Pos', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>25),
- 'label' =>array('type'=>'varchar(128)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>30, 'showoncombobox'=>1),
- 'active' =>array('type'=>'integer', 'label'=>'Active', 'enabled'=>1, 'visible'=>-1, 'position'=>35),
- 'use_default' =>array('type'=>'integer', 'label'=>'Usedefault', 'enabled'=>1, 'visible'=>-1, 'position'=>40),
- 'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>45),
- 'fk_parent' =>array('type'=>'integer', 'label'=>'Fkparent', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>50),
- 'force_severity' =>array('type'=>'varchar(32)', 'label'=>'Forceseverity', 'enabled'=>1, 'visible'=>-1, 'position'=>55),
- 'public' =>array('type'=>'integer', 'label'=>'Public', 'enabled'=>1, 'visible'=>-1, 'position'=>60),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 10),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'default' => 1, 'enabled' => 1, 'visible' => -2, 'position' => 15, 'index' => 1),
+ 'code' => array('type' => 'varchar(32)', 'label' => 'Code', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 20),
+ 'pos' => array('type' => 'integer', 'label' => 'Pos', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 25),
+ 'label' => array('type' => 'varchar(128)', 'label' => 'Label', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 30, 'showoncombobox' => 1),
+ 'active' => array('type' => 'integer', 'label' => 'Active', 'enabled' => 1, 'visible' => -1, 'position' => 35),
+ 'use_default' => array('type' => 'integer', 'label' => 'Usedefault', 'enabled' => 1, 'visible' => -1, 'position' => 40),
+ 'description' => array('type' => 'varchar(255)', 'label' => 'Description', 'enabled' => 1, 'visible' => -1, 'position' => 45),
+ 'fk_parent' => array('type' => 'integer', 'label' => 'Fkparent', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 50),
+ 'force_severity' => array('type' => 'varchar(32)', 'label' => 'Forceseverity', 'enabled' => 1, 'visible' => -1, 'position' => 55),
+ 'public' => array('type' => 'integer', 'label' => 'Public', 'enabled' => 1, 'visible' => -1, 'position' => 60),
);
/**
@@ -389,7 +389,7 @@ class CTicketCategory extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -542,7 +542,7 @@ class CTicketCategory extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('cticketcategorydao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 535452175f1..20fa770194a 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -441,7 +441,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
// Salary
print ''.$langs->trans("Salary").' ';
print '';
- print($object->salary != '' ? img_picto('', 'salary', 'class="pictofixedwidth paddingright"').''.price($object->salary, '', $langs, 1, -1, -1, $conf->currency) : '').' ';
+ print($object->salary != '' ? img_picto('', 'salary', 'class="pictofixedwidth paddingright"').''.price($object->salary, 0, $langs, 1, -1, -1, $conf->currency) : '').' ';
print ' ';
print " \n";
@@ -451,7 +451,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print '';
print '';
- print($object->thm != '' ? price($object->thm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->thm != '' ? price($object->thm, 0, $langs, 1, -1, -1, $conf->currency) : '');
print ' ';
print "\n";
@@ -461,7 +461,7 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
print '';
print '';
- print($object->tjm != '' ? price($object->tjm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->tjm != '' ? price($object->tjm, 0, $langs, 1, -1, -1, $conf->currency) : '');
print ' ';
print "\n";
}
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index 94447146dbf..984bed16d5c 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1657,7 +1657,7 @@ if ($action == 'create' || $action == 'adduserldap') {
// Salary
print ''.$langs->trans("Salary").' ';
print '';
- print($object->salary != '' ? img_picto('', 'salary', 'class="pictofixedwidth paddingright"').''.price($object->salary, '', $langs, 1, -1, -1, $conf->currency) : '').' ';
+ print($object->salary != '' ? img_picto('', 'salary', 'class="pictofixedwidth paddingright"').''.price($object->salary, 0, $langs, 1, -1, -1, $conf->currency) : '').' ';
print ' ';
print " \n";
@@ -1667,7 +1667,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print $form->textwithpicto($text, $langs->trans("THMDescription"), 1, 'help', 'classthm');
print '';
print '';
- print($object->thm != '' ? price($object->thm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->thm != '' ? price($object->thm, 0, $langs, 1, -1, -1, $conf->currency) : '');
print ' ';
print "\n";
@@ -1677,7 +1677,7 @@ if ($action == 'create' || $action == 'adduserldap') {
print $form->textwithpicto($text, $langs->trans("TJMDescription"), 1, 'help', 'classtjm');
print '';
print '';
- print($object->tjm != '' ? price($object->tjm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->tjm != '' ? price($object->tjm, 0, $langs, 1, -1, -1, $conf->currency) : '');
print ' ';
print "\n";
}
@@ -2861,7 +2861,7 @@ if ($action == 'create' || $action == 'adduserldap') {
if ($caneditfield) {
print ' ';
} else {
- print($object->thm != '' ? price($object->thm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->thm != '' ? price($object->thm, 0, $langs, 1, -1, -1, $conf->currency) : '');
}
print '';
print "\n";
@@ -2875,7 +2875,7 @@ if ($action == 'create' || $action == 'adduserldap') {
if ($caneditfield) {
print ' ';
} else {
- print($object->tjm != '' ? price($object->tjm, '', $langs, 1, -1, -1, $conf->currency) : '');
+ print($object->tjm != '' ? price($object->tjm, 0, $langs, 1, -1, -1, $conf->currency) : '');
}
print '';
print "\n";
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 316f21b482e..fd6b5d6dc3a 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -382,11 +382,11 @@ class User extends CommonObject
public $egroupware_id;
public $fields = array(
- 'rowid'=>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
- 'lastname'=>array('type'=>'varchar(50)', 'label'=>'Lastname', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20, 'searchall'=>1),
- 'firstname'=>array('type'=>'varchar(50)', 'label'=>'Firstname', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1),
- 'ref_employee'=>array('type'=>'varchar(50)', 'label'=>'RefEmployee', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>30, 'searchall'=>1),
- 'national_registration_number'=>array('type'=>'varchar(50)', 'label'=>'NationalRegistrationNumber', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>40, 'searchall'=>1)
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -2, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id'),
+ 'lastname' => array('type' => 'varchar(50)', 'label' => 'Lastname', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'showoncombobox' => 1, 'index' => 1, 'position' => 20, 'searchall' => 1),
+ 'firstname' => array('type' => 'varchar(50)', 'label' => 'Firstname', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'showoncombobox' => 1, 'index' => 1, 'position' => 10, 'searchall' => 1),
+ 'ref_employee' => array('type' => 'varchar(50)', 'label' => 'RefEmployee', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'showoncombobox' => 1, 'index' => 1, 'position' => 30, 'searchall' => 1),
+ 'national_registration_number' => array('type' => 'varchar(50)', 'label' => 'NationalRegistrationNumber', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'showoncombobox' => 1, 'index' => 1, 'position' => 40, 'searchall' => 1)
);
@@ -1016,7 +1016,7 @@ class User extends CommonObject
if (!$error && !$notrigger) {
$langs->load("other");
- $this->context = array('audit'=>$langs->trans("PermissionsAdd").($rid ? ' (id='.$rid.')' : ''));
+ $this->context = array('audit' => $langs->trans("PermissionsAdd").($rid ? ' (id='.$rid.')' : ''));
// Call trigger
$result = $this->call_trigger('USER_MODIFY', $user);
@@ -1139,7 +1139,7 @@ class User extends CommonObject
if (!$error && !$notrigger) {
$langs->load("other");
- $this->context = array('audit'=>$langs->trans("PermissionsDelete").($rid ? ' (id='.$rid.')' : ''));
+ $this->context = array('audit' => $langs->trans("PermissionsDelete").($rid ? ' (id='.$rid.')' : ''));
// Call trigger
$result = $this->call_trigger('USER_MODIFY', $user);
@@ -2703,7 +2703,7 @@ class User extends CommonObject
$result = $this->db->query($sql);
if ($result) {
if (!$error && !$notrigger) {
- $this->context = array('audit'=>$langs->trans("UserSetInGroup"), 'newgroupid'=>$group);
+ $this->context = array('audit' => $langs->trans("UserSetInGroup"), 'newgroupid' => $group);
// Call trigger
$result = $this->call_trigger('USER_MODIFY', $user);
@@ -2758,7 +2758,7 @@ class User extends CommonObject
$result = $this->db->query($sql);
if ($result) {
if (!$error && !$notrigger) {
- $this->context = array('audit'=>$langs->trans("UserRemovedFromGroup"), 'oldgroupid'=>$group);
+ $this->context = array('audit' => $langs->trans("UserRemovedFromGroup"), 'oldgroupid' => $group);
// Call trigger
$result = $this->call_trigger('USER_MODIFY', $user);
@@ -3056,7 +3056,7 @@ class User extends CommonObject
global $action;
$hookmanager->initHooks(array('userdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
@@ -3289,7 +3289,7 @@ class User extends CommonObject
'LDAP_FIELD_NAME' => 'lastname',
'LDAP_FIELD_FIRSTNAME' => 'firstname',
'LDAP_FIELD_LOGIN' => 'login',
- 'LDAP_FIELD_LOGIN_SAMBA'=> 'login',
+ 'LDAP_FIELD_LOGIN_SAMBA' => 'login',
'LDAP_FIELD_PHONE' => 'office_phone',
'LDAP_FIELD_MOBILE' => 'user_mobile',
'LDAP_FIELD_FAX' => 'office_fax',
@@ -4072,7 +4072,7 @@ class User extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php
index 0b8446e329f..484991e1dc7 100644
--- a/htdocs/webhook/class/target.class.php
+++ b/htdocs/webhook/class/target.class.php
@@ -102,21 +102,21 @@ class Target extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>20, 'notnull'=>1, 'visible'=>4, 'noteditable'=>'1', 'index'=>1, 'searchall'=>1, 'validate'=>'1', 'comment'=>"Reference of object"),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>"Help text", 'showoncombobox'=>'2', 'validate'=>'1',),
- 'url' => array('type'=>'varchar(255)', 'label'=>'Url', 'enabled'=>'1', 'position'=>50, 'notnull'=>1, 'visible'=>1,),
- 'trigger_codes' => array('type'=>'text', 'label'=>'TriggerCodes', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'help'=>"TriggerCodeInfo",),
- 'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0, 'cssview'=>'wordbreak', 'validate'=>'1',),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2,),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2,),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>1000, 'notnull'=>-1, 'visible'=>-2,),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>'1', 'position'=>2000, 'notnull'=>1, 'default'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'), 'validate'=>'1',),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 4, 'noteditable' => '1', 'index' => 1, 'searchall' => 1, 'validate' => '1', 'comment' => "Reference of object"),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 0, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'help' => "Help text", 'showoncombobox' => '2', 'validate' => '1',),
+ 'url' => array('type' => 'varchar(255)', 'label' => 'Url', 'enabled' => '1', 'position' => 50, 'notnull' => 1, 'visible' => 1,),
+ 'trigger_codes' => array('type' => 'text', 'label' => 'TriggerCodes', 'enabled' => '1', 'position' => 55, 'notnull' => 1, 'visible' => 1, 'help' => "TriggerCodeInfo",),
+ 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => '1', 'position' => 60, 'notnull' => 0, 'visible' => 3, 'validate' => '1',),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0, 'cssview' => 'wordbreak', 'validate' => '1',),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2,),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2,),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
+ 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => '1', 'position' => 2000, 'notnull' => 1, 'default' => 1, 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Disabled', '1' => 'Enabled'), 'validate' => '1',),
);
public $rowid;
public $ref;
@@ -388,7 +388,7 @@ class Target extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -748,7 +748,7 @@ class Target extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('targetdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php
index ea4debb2348..6b6c73e9944 100644
--- a/htdocs/webportal/class/html.formwebportal.class.php
+++ b/htdocs/webportal/class/html.formwebportal.class.php
@@ -2,6 +2,7 @@
/* Copyright (C) 2023-2024 Laurent Destailleur
* Copyright (C) 2023-2024 Lionel Vessiller
* Copyright (C) 2023-2024 Patrice Andreani
+ * Copyright (C) 2024 MDW
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -707,44 +708,44 @@ class FormWebPortal extends Form
$out = $this->inputType('number', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
break;
- case 'text' :
- case 'html' :
+ case 'text':
+ case 'html':
$moreparam .= ($size > 0 ? ' maxlength="' . $size . '"' : '');
$out = $this->inputType('text', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
break;
- case 'email' :
+ case 'email':
$out = $this->inputType('email', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
break;
- case 'tel' :
+ case 'tel':
$out = $this->inputType('tel', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
break;
- case 'url' :
+ case 'url':
$out = $this->inputType('url', $htmlName, dol_escape_htmltag($value), $htmlId, $morecss, $moreparam);
break;
- case 'price' :
+ case 'price':
if (!empty($value)) {
$value = price($value); // $value in memory is a php numeric, we format it into user number format.
}
$addInputLabel = ' ' . $langs->getCurrencySymbol($conf->currency);
- $out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam, $addInputLabel);
+ $out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam, '', $addInputLabel);
break;
- case 'double' :
+ case 'double':
if (!empty($value)) {
$value = price($value); // $value in memory is a php numeric, we format it into user number format.
}
$out = $this->inputType('text', $htmlName, $value, $htmlId, $morecss, $moreparam);
break;
- case 'password' :
+ case 'password':
$out = $this->inputType('password', $htmlName, $value, $htmlId, $morecss, $moreparam);
break;
- case 'radio' :
+ case 'radio':
foreach ($param['options'] as $keyopt => $valopt) {
$htmlId = $htmlName . '_' . $keyopt;
$htmlMoreParam = $moreparam . ($value == $keyopt ? ' checked' : '');
@@ -752,7 +753,7 @@ class FormWebPortal extends Form
}
break;
- case 'select' :
+ case 'select':
$out = '';
if ($default == '' || $notNull != 1) {
$out .= ' ';
@@ -771,7 +772,7 @@ class FormWebPortal extends Form
}
$out .= ' ';
break;
- case 'sellist' :
+ case 'sellist':
$out = '';
$param_list = array_keys($param['options']);
@@ -923,7 +924,7 @@ class FormWebPortal extends Form
$out .= ' ';
break;
- case 'link' :
+ case 'link':
$param_list = array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter[:Sortfield]]]'
$showempty = (($required && $default != '') ? 0 : 1);
@@ -931,7 +932,7 @@ class FormWebPortal extends Form
break;
- default :
+ default:
if (!empty($hidden)) {
$out = $this->inputType('hidden', $htmlName, $value, $htmlId);
}
@@ -947,7 +948,7 @@ class FormWebPortal extends Form
* @param CommonObject $object Common object
* @param array $val Array of properties of field to show
* @param string $key Key of attribute
- * @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value)
+ * @param string|string[] $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value)
* @param string $moreparam To add more parameters on html input tag
* @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names)
* @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)
@@ -1025,6 +1026,9 @@ class FormWebPortal extends Form
}
// Format output value differently according to properties of field
+ //
+ // First the cases that do not use $value from the arguments:
+ //
if (in_array($key, array('rowid', 'ref'))) {
if (property_exists($object, 'ref')) {
$value = $object->ref;
@@ -1035,6 +1039,20 @@ class FormWebPortal extends Form
}
} elseif ($key == 'status' && method_exists($object, 'getLibStatut')) {
$value = $object->getLibStatut(3);
+ //
+ // Then the cases where $value is an array
+ //
+ } elseif (is_array($value)) {
+ // Handle array early to get type identification solve for static
+ // analysis
+ if ($type == 'array') {
+ $value = implode(' ', $value);
+ } else {
+ dol_syslog(__METHOD__ . 'ERROR unexpected type=$type for array value='.((string) json_encode($value)), LOG_ERR);
+ }
+ //
+ // Then the cases where $value is not an array (hence string)
+ //
} elseif ($type == 'date') {
if (!empty($value)) {
$value = dol_print_date($value, 'day'); // We suppose dates without time are always gmt (storage of course + output)
@@ -1304,8 +1322,6 @@ class FormWebPortal extends Form
}
} elseif ($type == 'password') {
$value = preg_replace('/./i', '*', $value);
- } elseif ($type == 'array') {
- $value = implode(' ', $value);
} else { // text|html|varchar
$value = dol_htmlentitiesbr($value);
}
diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php
index 0b78a35107b..fd684229dd1 100644
--- a/htdocs/website/class/websitepage.class.php
+++ b/htdocs/website/class/websitepage.class.php
@@ -165,32 +165,32 @@ class WebsitePage extends CommonObject
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array(
- 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'index'=>1, 'position'=>1, 'comment'=>'Id'),
- 'pageurl' =>array('type'=>'varchar(16)', 'label'=>'WEBSITE_PAGENAME', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Ref/alias of page'),
- 'aliasalt' =>array('type'=>'varchar(255)', 'label'=>'AliasAlt', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'index'=>0, 'position'=>11, 'searchall'=>0, 'comment'=>'Alias alternative of page'),
- 'type_container' =>array('type'=>'varchar(16)', 'label'=>'Type', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'index'=>0, 'position'=>12, 'comment'=>'Type of container'),
- 'title' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'help'=>'UseTextBetween5And70Chars'),
- 'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1),
- 'image' =>array('type'=>'varchar(255)', 'label'=>'Image', 'enabled'=>1, 'visible'=>1, 'position'=>32, 'searchall'=>0, 'help'=>'Relative path of media. Used if Type is "blogpost"'),
- 'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
- 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'notnull'=>-1, 'visible'=>1, 'position'=>45, 'searchall'=>0),
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'index' => 1, 'position' => 1, 'comment' => 'Id'),
+ 'pageurl' => array('type' => 'varchar(16)', 'label' => 'WEBSITE_PAGENAME', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'index' => 1, 'position' => 10, 'searchall' => 1, 'comment' => 'Ref/alias of page'),
+ 'aliasalt' => array('type' => 'varchar(255)', 'label' => 'AliasAlt', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'index' => 0, 'position' => 11, 'searchall' => 0, 'comment' => 'Alias alternative of page'),
+ 'type_container' => array('type' => 'varchar(16)', 'label' => 'Type', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'index' => 0, 'position' => 12, 'comment' => 'Type of container'),
+ 'title' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'searchall' => 1, 'help' => 'UseTextBetween5And70Chars'),
+ 'description' => array('type' => 'varchar(255)', 'label' => 'Description', 'enabled' => 1, 'visible' => 1, 'position' => 30, 'searchall' => 1),
+ 'image' => array('type' => 'varchar(255)', 'label' => 'Image', 'enabled' => 1, 'visible' => 1, 'position' => 32, 'searchall' => 0, 'help' => 'Relative path of media. Used if Type is "blogpost"'),
+ 'keywords' => array('type' => 'varchar(255)', 'label' => 'Keywords', 'enabled' => 1, 'visible' => 1, 'position' => 45, 'searchall' => 0),
+ 'lang' => array('type' => 'varchar(6)', 'label' => 'Lang', 'enabled' => 1, 'notnull' => -1, 'visible' => 1, 'position' => 45, 'searchall' => 0),
//'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000),
- 'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'),
- 'fk_page' =>array('type'=>'integer', 'label'=>'ParentPageId', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'position'=>45, 'searchall'=>0, 'foreignkey'=>'website.rowid'),
- 'allowed_in_frames' =>array('type'=>'integer', 'label'=>'AllowedInFrames', 'enabled'=>1, 'visible'=>-1, 'position'=>48, 'searchall'=>0, 'default'=>0),
- 'htmlheader' =>array('type'=>'html', 'label'=>'HtmlHeader', 'enabled'=>1, 'visible'=>0, 'position'=>50, 'searchall'=>0),
- 'content' =>array('type'=>'mediumtext', 'label'=>'Content', 'enabled'=>1, 'visible'=>0, 'position'=>51, 'searchall'=>0),
- 'grabbed_from' =>array('type'=>'varchar(255)', 'label'=>'GrabbedFrom', 'enabled'=>1, 'visible'=>1, 'index'=>1, 'position'=>400, 'comment'=>'URL page content was grabbed from'),
- 'date_creation' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500),
- 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>501),
+ 'fk_website' => array('type' => 'integer', 'label' => 'WebsiteId', 'enabled' => 1, 'visible' => 1, 'notnull' => 1, 'position' => 40, 'searchall' => 0, 'foreignkey' => 'websitepage.rowid'),
+ 'fk_page' => array('type' => 'integer', 'label' => 'ParentPageId', 'enabled' => 1, 'visible' => 1, 'notnull' => -1, 'position' => 45, 'searchall' => 0, 'foreignkey' => 'website.rowid'),
+ 'allowed_in_frames' => array('type' => 'integer', 'label' => 'AllowedInFrames', 'enabled' => 1, 'visible' => -1, 'position' => 48, 'searchall' => 0, 'default' => 0),
+ 'htmlheader' => array('type' => 'html', 'label' => 'HtmlHeader', 'enabled' => 1, 'visible' => 0, 'position' => 50, 'searchall' => 0),
+ 'content' => array('type' => 'mediumtext', 'label' => 'Content', 'enabled' => 1, 'visible' => 0, 'position' => 51, 'searchall' => 0),
+ 'grabbed_from' => array('type' => 'varchar(255)', 'label' => 'GrabbedFrom', 'enabled' => 1, 'visible' => 1, 'index' => 1, 'position' => 400, 'comment' => 'URL page content was grabbed from'),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 500),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'visible' => -1, 'notnull' => 1, 'position' => 501),
//'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>502),
- 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'notnull'=>true, 'position'=>510),
- 'author_alias' =>array('type'=>'varchar(64)', 'label'=>'AuthorAlias', 'enabled'=>1, 'visible'=>-1, 'index'=>0, 'position'=>511, 'comment'=>'Author alias'),
- 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
+ 'fk_user_creat' => array('type' => 'integer', 'label' => 'UserAuthor', 'enabled' => 1, 'visible' => -1, 'notnull' => true, 'position' => 510),
+ 'author_alias' => array('type' => 'varchar(64)', 'label' => 'AuthorAlias', 'enabled' => 1, 'visible' => -1, 'index' => 0, 'position' => 511, 'comment' => 'Author alias'),
+ 'fk_user_modif' => array('type' => 'integer', 'label' => 'UserModif', 'enabled' => 1, 'visible' => -1, 'position' => 512),
//'fk_user_valid' =>array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512),
- 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-1, 'index'=>1, 'position'=>1000, 'notnull'=>-1),
- 'object_type' => array('type' => 'varchar(255)', 'label' => 'ObjectType', 'enabled'=>1, 'visible'=>0, 'position'=>46, 'searchall'=>0, 'help'=>''),
- 'fk_object' => array('type' => 'varchar(255)', 'label' => 'ObjectId', 'enabled'=>1, 'visible'=>0, 'position'=>47, 'searchall'=>0, 'help'=>'')
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -1, 'index' => 1, 'position' => 1000, 'notnull' => -1),
+ 'object_type' => array('type' => 'varchar(255)', 'label' => 'ObjectType', 'enabled' => 1, 'visible' => 0, 'position' => 46, 'searchall' => 0, 'help' => ''),
+ 'fk_object' => array('type' => 'varchar(255)', 'label' => 'ObjectId', 'enabled' => 1, 'visible' => 0, 'position' => 47, 'searchall' => 0, 'help' => '')
);
// END MODULEBUILDER PROPERTIES
@@ -441,7 +441,7 @@ class WebsitePage extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php
index 82f2e02468e..ad650d6c7b0 100644
--- a/htdocs/workstation/class/workstation.class.php
+++ b/htdocs/workstation/class/workstation.class.php
@@ -97,23 +97,23 @@ class Workstation extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
- public $fields=array(
- 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
- 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
- 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'default'=>'', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object", 'csslist'=>'nowraponall'),
- 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'csslist'=>'tdoverflowmax125', 'showoncombobox'=>'2',),
- 'type' => array('type'=>'varchar(8)', 'label'=>'Type', 'enabled'=>'1', 'position'=>32, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'arrayofkeyval'=>array('HUMAN'=>'Human', 'MACHINE'=>'Machine', 'BOTH'=>'HumanMachine'),),
- 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>'1', 'position'=>61, 'notnull'=>0, 'visible'=>0,),
- 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'enabled'=>'1', 'position'=>62, 'notnull'=>0, 'visible'=>0,),
- 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>'1', 'position'=>500, 'notnull'=>1, 'visible'=>-2, 'csslist'=>'nowraponall'),
- 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>'1', 'position'=>501, 'notnull'=>0, 'visible'=>-2, 'csslist'=>'nowraponall'),
- 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>'1', 'position'=>510, 'notnull'=>1, 'visible'=>-2, 'foreignkey'=>'user.rowid',),
- 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
- 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>512, 'notnull'=>-1, 'visible'=>-2,),
- 'nb_operators_required' => array('type'=>'integer', 'label'=>'NbOperatorsRequired', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right', 'csslist'=>'maxwidth75imp'),
- 'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp','label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right', 'csslist'=>'maxwidth75imp'),
- 'thm_machine_estimated' => array('type'=>'double', 'help'=>'THMMachineEstimatedHelp', 'label'=>'THMMachineEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right', 'csslist'=>'maxwidth75imp'),
- 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'),),
+ public $fields = array(
+ 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => '1', 'position' => 1, 'notnull' => 1, 'visible' => 0, 'noteditable' => '1', 'index' => 1, 'css' => 'left', 'comment' => "Id"),
+ 'entity' => array('type' => 'integer', 'label' => 'Entity', 'enabled' => 1, 'visible' => 0, 'position' => 5, 'notnull' => 1, 'default' => '1', 'index' => 1),
+ 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 1, 'noteditable' => '0', 'default' => '', 'index' => 1, 'searchall' => 1, 'showoncombobox' => '1', 'comment' => "Reference of object", 'csslist' => 'nowraponall'),
+ 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'csslist' => 'tdoverflowmax125', 'showoncombobox' => '2',),
+ 'type' => array('type' => 'varchar(8)', 'label' => 'Type', 'enabled' => '1', 'position' => 32, 'default' => 1, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array('HUMAN' => 'Human', 'MACHINE' => 'Machine', 'BOTH' => 'HumanMachine'),),
+ 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => '1', 'position' => 61, 'notnull' => 0, 'visible' => 0,),
+ 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => '1', 'position' => 62, 'notnull' => 0, 'visible' => 0,),
+ 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => '1', 'position' => 500, 'notnull' => 1, 'visible' => -2, 'csslist' => 'nowraponall'),
+ 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => '1', 'position' => 501, 'notnull' => 0, 'visible' => -2, 'csslist' => 'nowraponall'),
+ 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => '1', 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',),
+ 'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => '1', 'position' => 511, 'notnull' => -1, 'visible' => -2,),
+ 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => '1', 'position' => 512, 'notnull' => -1, 'visible' => -2,),
+ 'nb_operators_required' => array('type' => 'integer', 'label' => 'NbOperatorsRequired', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
+ 'thm_operator_estimated' => array('type' => 'double', 'help' => 'THMOperatorEstimatedHelp','label' => 'THMOperatorEstimated', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
+ 'thm_machine_estimated' => array('type' => 'double', 'help' => 'THMMachineEstimatedHelp', 'label' => 'THMMachineEstimated', 'enabled' => '1', 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
+ 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => '1', 'position' => 1000, 'default' => 1, 'notnull' => 1, 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Disabled', '1' => 'Enabled'),),
);
/**
@@ -435,7 +435,7 @@ class Workstation extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}
@@ -484,7 +484,7 @@ class Workstation extends CommonObject
// Usergroups
$groups = GETPOST('groups', 'array:int');
WorkstationUserGroup::deleteAllGroupsOfWorkstation($this->id);
- $this->usergroups=array();
+ $this->usergroups = array();
foreach ($groups as $id_group) {
$ws_usergroup = new WorkstationUserGroup($this->db);
@@ -497,7 +497,7 @@ class Workstation extends CommonObject
// Resources
$resources = GETPOST('resources', 'array:int');
WorkstationResource::deleteAllResourcesOfWorkstation($this->id);
- $this->resources=array();
+ $this->resources = array();
if (!empty($resources)) {
foreach ($resources as $id_resource) {
$ws_resource = new WorkstationResource($this->db);
@@ -714,7 +714,7 @@ class Workstation extends CommonObject
global $action, $hookmanager;
$hookmanager->initHooks(array('workstationdao'));
- $parameters = array('id'=>$this->id, 'getnomurl' => &$result);
+ $parameters = array('id' => $this->id, 'getnomurl' => &$result);
$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) {
$result = $hookmanager->resPrint;
diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php
index 98c8c06af93..b5a25699205 100644
--- a/htdocs/zapier/class/hook.class.php
+++ b/htdocs/zapier/class/hook.class.php
@@ -416,7 +416,7 @@ class Hook extends CommonObject
$sql .= forgeSQLFromUniversalSearchCriteria($filter, $errormessage);
if ($errormessage) {
$this->errors[] = $errormessage;
- dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR);
+ dol_syslog(__METHOD__.' '.implode(',', $this->errors), LOG_ERR);
return -1;
}