From 55bd7a33a4484b5ce4bc7be713416e0719ab26c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 24 Sep 2024 16:29:53 +0200 Subject: [PATCH 001/329] Fix migration 12-13 --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index e89b5ade7ba54..d0636d8afa0af 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -370,6 +370,7 @@ ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (status); ALTER TABLE llx_inventorydet ADD COLUMN fk_warehouse integer DEFAULT 0; +ALTER TABLE llx_inventorydet ADD COLUMN batch varchar(128) DEFAULT NULL; ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch); ALTER TABLE llx_commandedet ADD COLUMN ref_ext varchar(255) AFTER label; From ef5f56ddf47096fe5c60adb2e109e629e4eb2587 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 01:10:45 +0200 Subject: [PATCH 002/329] Fix avoid sql error --- htdocs/accountancy/closure/index.php | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 772d1672542bb..0b6739bf742c8 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -123,14 +123,28 @@ $separate_auxiliary_account = GETPOST('separate_auxiliary_account', 'aZ09'); $generate_bookkeeping_records = GETPOST('generate_bookkeeping_records', 'aZ09'); - $result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, $separate_auxiliary_account, $generate_bookkeeping_records); - if ($result < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } else { - setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs'); + $error = 0; + if ($generate_bookkeeping_records) { + if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')) { + $error++; + setEventMessages($langs->trans("ErrorSetupNotComplete"), null, 'errors'); + } + if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) { + $error++; + setEventMessages($langs->trans("ErrorSetupNotComplete"), null, 'errors'); + } + } - header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : '')); - exit; + if (!$error) { + $result = $object->closeFiscalPeriod($current_fiscal_period['id'], $new_fiscal_period_id, $separate_auxiliary_account, $generate_bookkeeping_records); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } else { + setEventMessages($langs->trans("AccountancyClosureCloseSuccessfully"), null, 'mesgs'); + + header("Location: " . $_SERVER['PHP_SELF'] . (isset($current_fiscal_period) ? '?fiscal_period_id=' . $current_fiscal_period['id'] : '')); + exit; + } } } elseif ($action == 'confirm_step_3' && $confirm == "yes") { $inventory_journal_id = GETPOST('inventory_journal_id', 'int'); From ae6e35cc845a095c377c4d86aabe643863b21c8f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 02:35:56 +0200 Subject: [PATCH 003/329] Look and feel v21 enhancement on smartphone --- htdocs/adherents/agenda.php | 11 +++++- htdocs/adherents/messaging.php | 2 +- htdocs/bookcal/calendar_agenda.php | 1 + htdocs/compta/facture/agenda.php | 8 ++++- htdocs/compta/facture/card.php | 5 ++- htdocs/compta/facture/messaging.php | 8 ++++- htdocs/contrat/agenda.php | 7 +++- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formactions.class.php | 9 +++-- htdocs/core/lib/company.lib.php | 19 +++++++++-- htdocs/core/lib/functions.lib.php | 34 +++++++++---------- htdocs/core/lib/signature.lib.php | 19 +++++++++++ .../template/myobject_agenda.php | 3 ++ htdocs/projet/agenda.php | 3 ++ htdocs/projet/messaging.php | 3 ++ htdocs/ticket/agenda.php | 3 ++ htdocs/ticket/messaging.php | 3 ++ 17 files changed, 110 insertions(+), 30 deletions(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index bd40ed7166e7a..cc81b058d87e7 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -192,7 +192,16 @@ $param .= '&limit='.$limit; } - print_barre_liste($langs->trans("ActionsOnMember"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0); + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_events_member_'.$object->id; + $nbEvent = dol_getcache($cachekey); + + $titlelist = $langs->trans("ActionsOnMember").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/adherents/messaging.php b/htdocs/adherents/messaging.php index 2ea8397391919..e5aaa491bb204 100644 --- a/htdocs/adherents/messaging.php +++ b/htdocs/adherents/messaging.php @@ -193,7 +193,7 @@ // Try to know count of actioncomm from cache require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; - $cachekey = 'count_events_user_'.$object->id; + $cachekey = 'count_events_member_'.$object->id; $nbEvent = dol_getcache($cachekey); // TODO Add nb into badge in menu so we can get it from cache also here $titlelist = $langs->trans("ActionsOnMember").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); diff --git a/htdocs/bookcal/calendar_agenda.php b/htdocs/bookcal/calendar_agenda.php index e72b5e691a3d2..74d31b5c80d1a 100644 --- a/htdocs/bookcal/calendar_agenda.php +++ b/htdocs/bookcal/calendar_agenda.php @@ -265,6 +265,7 @@ //$cachekey = 'count_events_myobject_'.$object->id; //$nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions diff --git a/htdocs/compta/facture/agenda.php b/htdocs/compta/facture/agenda.php index b91bcdc9cabb9..681b5b4746e7e 100644 --- a/htdocs/compta/facture/agenda.php +++ b/htdocs/compta/facture/agenda.php @@ -239,7 +239,13 @@ //print_barre_liste($langs->trans("ActionsOnBill").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); //print_barre_liste($langs->trans("ActionsOnBill"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); - print load_fiche_titre($langs->trans("ActionsOnBill"), $morehtmlright, ''); + $titlelist = $langs->trans("ActionsOnBill").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + // List of all actions $filters = array(); $filters['search_agenda_label'] = $search_agenda_label; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index eb9584b775f32..b9625644c02dd 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -6125,7 +6125,10 @@ function js_recalculate_revenuestamp(){ $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/compta/facture/agenda.php?id='.$object->id); + $morehtmlcenter = '
'; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/compta/facture/messaging.php?id='.$object->id); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/compta/facture/agenda.php?id='.$object->id); + $morehtmlcenter .= '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/compta/facture/messaging.php b/htdocs/compta/facture/messaging.php index 34df3dbe284d5..6a1264c39d1b3 100644 --- a/htdocs/compta/facture/messaging.php +++ b/htdocs/compta/facture/messaging.php @@ -236,7 +236,13 @@ //print_barre_liste($langs->trans("ActionsOnBill").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); //print_barre_liste($langs->trans("ActionsOnBill"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); - print load_fiche_titre($langs->trans("ActionsOnBill"), $morehtmlright, ''); + $titlelist = $langs->trans("ActionsOnBill").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + // List of all actions $filters = array(); $filters['search_agenda_label'] = $search_agenda_label; diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 5387ccd0a6bd5..1ab24f2c28c4d 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -277,7 +277,12 @@ $cachekey = 'count_events_thirdparty_'.$object->id; $nbEvent = dol_getcache($cachekey); - print_barre_liste($langs->trans("ActionsOnContract"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0); + $titlelist = $langs->trans("ActionsOnContract").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3c9266c1fdc14..038a73f5018b9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8669,7 +8669,7 @@ public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $sh * @param string $htmlname Name of html select area. Try to start name with "multi" or "search_multi" if this is a multiselect * @param array{label:string,data-html:string,disable?:int<0,1>,css?:string} $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) * @param string|string[]|int $id Preselected key or array of preselected keys for multiselect. Use 'ifone' to autoselect record if there is only one record. - * @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or ' ', If placeholder string: key is -1 and value is the string), <0 to add an empty value with key that is this value. + * @param int<0,1>|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or ' ', If 'Placeholder string': key is -1 and value is the string), <0 to add an empty value with key that is this value. * @param int<0,1> $key_in_label 1 to show key into label with format "[key] value" * @param int<0,1> $value_as_key 1 to use value as key * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 2c75db69e1136..96f4a3b778000 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -365,9 +365,10 @@ public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = * @param int $multiselect 1=Allow multiselect of action type * @param int $nooutput 1=No output * @param string $morecss More css to add to SELECT component. + * @param int<0,1>|string $showempty 0 or 1 or 'Placeholder string' * @return string */ - public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300') + public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300', $showempty = 0) { // phpcs:enable global $langs, $user, $form; @@ -382,10 +383,12 @@ public function select_type_actions($selected = '', $htmlname = 'actioncode', $e // Suggest a list with manual events or all auto events $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. + /* Removed. The empty line must now be managed with param showempty if (empty($multiselect)) { // Add empty line at start only if no multiselect array_unshift($arraylist, ' '); } + */ //asort($arraylist); if ($selected == 'manual') { @@ -415,9 +418,9 @@ public function select_type_actions($selected = '', $htmlname = 'actioncode', $e if (!is_array($selected) && !empty($selected)) { $selected = explode(',', $selected); } - $out .= $form->multiselectarray($htmlname, $newarraylist, $selected, 0, 0, 'centpercent', 0, 0); + $out .= $form->multiselectarray($htmlname, $newarraylist, $selected, 0, 0, 'centpercent', 0, 0, '', '', (is_numeric($showempty) ? '' : $showempty)); } else { - $out .= $form->selectarray($htmlname, $newarraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', $morecss, 1); + $out .= $form->selectarray($htmlname, $newarraylist, $selected, $showempty, 0, 0, '', 0, 0, 0, '', $morecss, 1); } if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) { diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 076c4de211748..b51e17fd1c19c 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1922,6 +1922,11 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr if ($filterobj->id) { $sql .= " AND a.fk_element = ".((int) $filterobj->id); } + } elseif (is_object($filterobj) && get_class($filterobj) == 'FactureFournisseur') { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'invoice_supplier'"; + if ($filterobj->id) { + $sql .= " AND a.fk_element = ".((int) $filterobj->id); + } } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; if ($filterobj->id) { @@ -1977,6 +1982,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr if (is_array($actioncode) && !empty($actioncode)) { $sql .= ' AND ('; foreach ($actioncode as $key => $code) { + if ((string) $code == '-1') { + continue; + } if ($key != 0) { $sql .= " OR "; } @@ -1985,7 +1993,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr } } $sql .= ')'; - } elseif (!empty($actioncode)) { + } elseif (!empty($actioncode) && $actioncode != '-1') { addEventTypeSQL($sql, $actioncode); } @@ -2173,7 +2181,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr $out .= ''; // Type $out .= ''; - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, (getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 1 : 0), 1, 'combolargeelem minwidth100 maxwidth150'); + $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, (getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 1 : 0), 1, 'combolargeelem minwidth100 maxwidth150', 1); $out .= ''; $out .= ''; $out .= ''; @@ -2517,9 +2525,14 @@ function show_subsidiaries($conf, $langs, $db, $object) */ function addEventTypeSQL(&$sql, $actioncode, $sqlANDOR = "AND") { - global $conf, $db; + global $db; + // Condition on actioncode + if ((string) $actioncode == '-1') { + return $sql; + } + if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) { if ($actioncode == 'AC_NON_AUTO') { $sql .= " $sqlANDOR c.type <> 'systemauto'"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a8377a1870d5e..1d7f03167a7a4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13941,15 +13941,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $sql .= ", sp.lastname, sp.firstname"; } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') { $sql .= ", m.lastname, m.firstname"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') { - $sql .= ", o.ref"; - } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') { + } elseif (is_object($filterobj) && in_array(get_class($filterobj), array('Commande', 'CommandeFournisseur', 'Product', 'Ticket', 'BOM', 'Contrat', 'Facture', 'FactureFournisseur'))) { $sql .= ", o.ref"; } $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; @@ -14000,6 +13992,11 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, if ($filterobj->id) { $sql .= " AND a.fk_element = ".((int) $filterobj->id); } + } elseif (is_object($filterobj) && get_class($filterobj) == 'Commande') { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order'"; + if ($filterobj->id) { + $sql .= " AND a.fk_element = ".((int) $filterobj->id); + } } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') { $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; if ($filterobj->id) { @@ -14031,9 +14028,14 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $sql .= " AND a.fk_contact = ".((int) $filterobj->id); } } elseif (is_object($filterobj) && get_class($filterobj) == 'Facture') { - $sql .= "AND a.fk_element = o.rowid"; + $sql .= " AND a.fk_element = o.rowid"; if ($filterobj->id) { - $sql .= " AND a.fk_element = ".((int) $filterobj->id); + $sql .= " AND a.fk_element = ".((int) $filterobj->id)." AND a.elementtype = 'invoice'"; + } + } elseif (is_object($filterobj) && get_class($filterobj) == 'FactureFournisseur') { + $sql .= " AND a.fk_element = o.rowid"; + if ($filterobj->id) { + $sql .= " AND a.fk_element = ".((int) $filterobj->id)." AND a.elementtype = 'invoice_supplier'"; } } } else { @@ -14041,7 +14043,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, } // Condition on actioncode - if (!empty($actioncode)) { + if (!empty($actioncode) && $actioncode != '-1') { if (!getDolGlobalString('AGENDA_USE_EVENT_TYPE')) { if ($actioncode == 'AC_NON_AUTO') { $sql .= " AND c.type != 'systemauto'"; @@ -14258,14 +14260,13 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n"; - $out .= ''.$langs->trans("Search").' : '; + $out .= ''.$langs->trans("Search").' : '; if ($donetodo) { $out .= ''; } $out .= ''; - $out .= ''; - //$out .= img_picto($langs->trans("Type"), 'type'); - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', !getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : -1, 0, 0, 1, 'minwidth200imp'); + $out .= ''; + $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, 0, 1, 'minwidth200imp', $langs->trans("Type")); $out .= ''; $out .= ''; $out .= ''; @@ -14281,7 +14282,6 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $out .= ''; - $out .= ''; $out .= ''; diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index ee2ac8d39c533..76b464a508fb7 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -96,6 +96,10 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1, $o if ($type == 'proposal') { $securekeyseed = getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN'); + if (strpos($securekeyseed, "\0") !== false) { + // String contains a null character that can't be encoded. Return an error to avoid fatal error later. + return 'Invalid parameter PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN. Contains a null character.'; + } $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=proposal&ref='.($mode ? '' : ''); if ($mode == 1) { @@ -136,6 +140,11 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1, $o }*/ } elseif ($type == 'contract') { $securekeyseed = getDolGlobalString('CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN'); + if (strpos($securekeyseed, "\0") !== false) { + // String contains a null character that can't be encoded. Return an error to avoid fatal error later. + return 'Invalid parameter CONTRACT_ONLINE_SIGNATURE_SECURITY_TOKEN. Contains a null character.'; + } + $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=contract&ref='.($mode ? '' : ''); if ($mode == 1) { $out .= 'contract_ref'; @@ -151,6 +160,11 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1, $o } } elseif ($type == 'fichinter') { $securekeyseed = getDolGlobalString('FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN'); + if (strpos($securekeyseed, "\0") !== false) { + // String contains a null character that can't be encoded. Return an error to avoid fatal error later. + return 'Invalid parameter FICHINTER_ONLINE_SIGNATURE_SECURITY_TOKEN. Contains a null character.'; + } + $out = $urltouse.'/public/onlinesign/newonlinesign.php?source=fichinter&ref='.($mode ? '' : ''); if ($mode == 1) { $out .= 'fichinter_ref'; @@ -166,6 +180,11 @@ function getOnlineSignatureUrl($mode, $type, $ref = '', $localorexternal = 1, $o } } else { // For example $type = 'societe_rib' $securekeyseed = getDolGlobalString(dol_strtoupper($type).'_ONLINE_SIGNATURE_SECURITY_TOKEN'); + if (strpos($securekeyseed, "\0") !== false) { + // String contains a null character that can't be encoded. Return an error to avoid fatal error later. + return 'Invalid parameter '.dol_strtoupper($type).'_ONLINE_SIGNATURE_SECURITY_TOKEN. Contains a null character.'; + } + $out = $urltouse.'/public/onlinesign/newonlinesign.php?source='.$type.'&ref='.($mode ? '' : ''); if ($mode == 1) { $out .= $type.'_ref'; diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index b3cbeea107c87..6f88f76fc09c5 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -317,6 +317,9 @@ //$cachekey = 'count_events_myobject_'.$object->id; //$nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php index f3be10dfb26d2..6b4f2898100e3 100644 --- a/htdocs/projet/agenda.php +++ b/htdocs/projet/agenda.php @@ -222,6 +222,9 @@ $nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("ActionsOnProject").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); diff --git a/htdocs/projet/messaging.php b/htdocs/projet/messaging.php index 30bc60584f609..c308f6c673eaa 100644 --- a/htdocs/projet/messaging.php +++ b/htdocs/projet/messaging.php @@ -222,6 +222,9 @@ $nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("ActionsOnProject").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php index e9116ef9ffcb2..efa23b058978d 100644 --- a/htdocs/ticket/agenda.php +++ b/htdocs/ticket/agenda.php @@ -278,6 +278,9 @@ $nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("ActionsOnTicket").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 32492112f8ec9..4d04841e87590 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -275,6 +275,9 @@ $nbEvent = dol_getcache($cachekey); $titlelist = $langs->trans("ActionsOnTicket").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''); + } print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); From 0222221a1092c6c9020c85030a90867367c3b525 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 12:13:55 +0200 Subject: [PATCH 004/329] Look and feel v21 --- htdocs/core/lib/company.lib.php | 3 ++- htdocs/core/lib/functions.lib.php | 7 +++++-- htdocs/theme/eldy/global.inc.php | 15 +++++++++++---- htdocs/theme/md/style.css.php | 16 ++++++++++++---- 4 files changed, 30 insertions(+), 11 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index b51e17fd1c19c..f687e80cab101 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -2181,8 +2181,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr $out .= ''; // Type $out .= ''; - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, (getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 1 : 0), 1, 'combolargeelem minwidth100 maxwidth150', 1); + $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, (getDolGlobalString('AGENDA_USE_MULTISELECT_TYPE') ? 1 : 0), 1, 'selecttype combolargeelem minwidth100 maxwidth150', 1); $out .= ''; + // Label $out .= ''; $out .= ''; $out .= ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1d7f03167a7a4..53c4ed1fcf780 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -14258,16 +14258,19 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $out .= ''; } - $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, '')."\n"; + // Date + $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, 'nowraponall nopaddingleftimp ')."\n"; $out .= ''.$langs->trans("Search").' : '; if ($donetodo) { $out .= ''; } + // Type of event $out .= ''; $out .= ''; - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, 0, 1, 'minwidth200imp', $langs->trans("Type")); + $out .= $formactions->select_type_actions($actioncode, "actioncode", '', getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1, 0, 0, 1, 'selecttype minwidth100', $langs->trans("Type")); $out .= ''; + // Label $out .= ''; $out .= ''; $out .= ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 1b9fe598387e5..72652906641e0 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6718,6 +6718,7 @@ padding-top: 0px !important; } + /* ============================================================================== */ /* Select2 */ /* ============================================================================== */ @@ -6726,10 +6727,6 @@ opacity: 0.5; } -span#select2-taskid-container[title^='--'] { - opacity: 0.3; -} - .select2-container--default .select2-results__option--highlighted[aria-selected] { background-color: var(--colorbackhmenu1); color: var(--colortextbackhmenu); @@ -6996,7 +6993,17 @@ max-height: 400px; } +/* special case for some select2 component */ + +.selecttype span.select2-dropdown.ui-dialog { + min-width: 200px; +} +span#select2-taskid-container[title^='--'] { + opacity: 0.3; +} + /* Special case for the select2 add widget */ + #addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen { text-align: ; opacity: 0.4; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 1df9c65157d4d..82374fe0c43e9 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6704,10 +6704,6 @@ /* Select2 */ /* ============================================================================== */ -span#select2-taskid-container[title^='--'] { - opacity: 0.3; -} - input.select2-input { border-bottom: none ! important; } @@ -6918,7 +6914,17 @@ max-height: 400px; } +/* special case for some select2 component */ + +.selecttype span.select2-dropdown.ui-dialog { + min-width: 200px; +} +span#select2-taskid-container[title^='--'] { + opacity: 0.3; +} + /* Special case for the select2 add widget */ + #addbox .select2-container .select2-choice > .select2-chosen, #actionbookmark .select2-container .select2-choice > .select2-chosen { text-align: ; opacity: 0.3; @@ -6934,7 +6940,9 @@ .select2-container .select2-selection--single .select2-selection__rendered { padding-left: 6px; } + /* Style used before the select2 js is executed on boxcombo */ + #boxbookmark.boxcombo, #boxcombo.boxcombo { text-align: left; opacity: 0.3; From 6bd128071bc9584e3c04085010b4bfbff8bb1a8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 12:48:23 +0200 Subject: [PATCH 005/329] NEW Default PDF format is PDF/A-3 --- htdocs/admin/pdf.php | 4 +++- htdocs/core/lib/pdf.lib.php | 12 +++++------- htdocs/langs/en_US/admin.lang | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 0dc8cda23f523..7d9ab7b730f4e 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -638,7 +638,9 @@ print ''; print ''.$langs->trans("PDF_USE_A").''; -print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, getDolGlobalString('PDF_USE_A', '0')); +//$pdfa = false; // PDF default version +$pdfa = getDolGlobalString('PDF_USE_A', '3'); // PDF/A-1 ou PDF/A-3 +print $form->selectarray('PDF_USE_A', $arraylistofpdfformat, $pdfa); print ''; print ''; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index ae6a8e40d997b..8a5d3f6c7d1df 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -180,10 +180,8 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') //$format=array($arrayformat['width'],$arrayformat['height']); //$metric=$arrayformat['unit']; - $pdfa = false; // PDF-1.3 - if (getDolGlobalString('PDF_USE_A')) { - $pdfa = getDolGlobalString('PDF_USE_A'); // PDF/A-1 ou PDF/A-3 - } + //$pdfa = false; // PDF default version + $pdfa = getDolGlobalString('PDF_USE_A', '3'); // PDF/A-1 ou PDF/A-3 if (!getDolGlobalString('MAIN_DISABLE_TCPDI') && class_exists('TCPDI')) { $pdf = new TCPDI($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa); @@ -209,13 +207,13 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') $pdfrights = (getDolGlobalString('PDF_SECURITY_ENCRYPTION_RIGHTS') ? json_decode($conf->global->PDF_SECURITY_ENCRYPTION_RIGHTS, true) : array('modify', 'copy')); // Json format in llx_const // Password for the end user - $pdfuserpass = (getDolGlobalString('PDF_SECURITY_ENCRYPTION_USERPASS') ? $conf->global->PDF_SECURITY_ENCRYPTION_USERPASS : ''); + $pdfuserpass = getDolGlobalString('PDF_SECURITY_ENCRYPTION_USERPASS'); // Password of the owner, created randomly if not defined - $pdfownerpass = (getDolGlobalString('PDF_SECURITY_ENCRYPTION_OWNERPASS') ? $conf->global->PDF_SECURITY_ENCRYPTION_OWNERPASS : null); + $pdfownerpass = (getDolGlobalString('PDF_SECURITY_ENCRYPTION_OWNERPASS') ? getDolGlobalString('PDF_SECURITY_ENCRYPTION_OWNERPASS') : null); // For encryption strength: 0 = RC4 40 bit; 1 = RC4 128 bit; 2 = AES 128 bit; 3 = AES 256 bit - $encstrength = (getDolGlobalString('PDF_SECURITY_ENCRYPTION_STRENGTH') ? $conf->global->PDF_SECURITY_ENCRYPTION_STRENGTH : 0); + $encstrength = getDolGlobalInt('PDF_SECURITY_ENCRYPTION_STRENGTH', 0); // Array of recipients containing public-key certificates ('c') and permissions ('p'). // For example: array(array('c' => 'file://../examples/data/cert/tcpdf.crt', 'p' => array('print'))) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 9d3c614b9f09f..a8b1009ed0f53 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2289,7 +2289,7 @@ THIRDPARTY_ALIAS=Third-party name - Third-party alias ALIAS_THIRDPARTY=Third-party alias - Third-party name PDFIn2Languages=Show labels in the PDF in 2 different languages (this feature may not work for some couple of languages) PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. -PDF_USE_A=Generate PDF documents with format PDF/A instead of default format PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard JumpToBoxes=Jump to Setup -> Widgets From 3f00ea3d6bf2e33788488a7e894e225d6a8e71b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 13:01:35 +0200 Subject: [PATCH 006/329] FIX Position of box for shipping address in PDF --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 6 ++++-- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index f40b2279de6ec..8c57ef9dc9ed3 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -928,7 +928,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $heightforfooter = 0) { // phpcs:enable - global $conf; $sign = 1; if ($object->type == 2 && getDolGlobalString('INVOICE_POSITIVE_CREDIT_NOTE')) { @@ -2176,6 +2175,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output if (!empty($carac_client_shipping)) { $posy += $hautcadre; + $hautcadre = $hautcadre - 10; // Height for the shipping address does not need to be as high as main box + // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); @@ -2193,7 +2194,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $pdf->SetXY($posx + 2, $posy); $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); - $top_shift += $hautcadre; + + $top_shift += $hautcadre + 10; } } } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 167b2d661cd51..03946b9361c8e 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2455,6 +2455,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output if (!empty($carac_client_shipping)) { $posy += $hautcadre; + $hautcadre = $hautcadre - 10; // Height for the shipping address does not need to be as high as main box + // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); @@ -2472,7 +2474,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $pdf->SetXY($posx + 2, $posy); $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); - $shipp_shift += $hautcadre; + + $shipp_shift += $hautcadre + 10; } } } From 6e2589e981e2e6cdf6ab1b143f0a76eefef61b0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 13:01:35 +0200 Subject: [PATCH 007/329] FIX Position of box for shipping address in PDF --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 6 ++++-- htdocs/core/modules/facture/doc/pdf_sponge.modules.php | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c153a9f081695..e6eb38ee6122c 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -928,7 +928,6 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $heightforfooter = 0) { // phpcs:enable - global $conf; $sign = 1; if ($object->type == 2 && getDolGlobalString('INVOICE_POSITIVE_CREDIT_NOTE')) { @@ -2176,6 +2175,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output if (!empty($carac_client_shipping)) { $posy += $hautcadre; + $hautcadre = $hautcadre - 10; // Height for the shipping address does not need to be as high as main box + // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); @@ -2193,7 +2194,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $pdf->SetXY($posx + 2, $posy); $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); - $top_shift += $hautcadre; + + $top_shift += $hautcadre + 10; } } } diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index e0ac96ff8d77b..c89ea0ef4d91d 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -2457,6 +2457,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output if (!empty($carac_client_shipping)) { $posy += $hautcadre; + $hautcadre = $hautcadre - 10; // Height for the shipping address does not need to be as high as main box + // Show shipping frame $pdf->SetXY($posx + 2, $posy - 5); $pdf->SetFont('', '', $default_font_size - 2); @@ -2474,7 +2476,8 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $pdf->SetXY($posx + 2, $posy); $pdf->SetFont('', '', $default_font_size - 1); $pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L'); - $shipp_shift += $hautcadre; + + $shipp_shift += $hautcadre + 10; } } } From 59dadd88a3eaeb68452c7e0a2a178d4859977dc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 13:43:11 +0200 Subject: [PATCH 008/329] FIX Duplicate trigger printFieldPreListTitle --- htdocs/accountancy/admin/productaccount.php | 2 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- htdocs/adherents/list.php | 3 --- htdocs/adherents/subscription/list.php | 3 --- htdocs/admin/emailcollector_list.php | 2 +- htdocs/admin/mails_senderprofile_list.php | 3 --- htdocs/admin/modules.php | 2 +- htdocs/asset/list.php | 2 +- htdocs/asset/model/list.php | 2 +- htdocs/bom/bom_list.php | 3 --- htdocs/bookcal/availabilities_list.php | 3 --- htdocs/bookcal/calendar_list.php | 3 --- htdocs/bookmarks/list.php | 2 +- htdocs/comm/mailing/list.php | 3 --- htdocs/commande/list_det.php | 2 +- htdocs/compta/bank/list.php | 3 --- htdocs/compta/cashcontrol/cashcontrol_list.php | 2 +- htdocs/compta/prelevement/list.php | 3 --- htdocs/compta/prelevement/orders_list.php | 3 --- htdocs/compta/tva/list.php | 3 --- htdocs/contrat/services_list.php | 3 --- htdocs/eventorganization/conferenceorbooth_list.php | 3 --- htdocs/eventorganization/conferenceorboothattendee_list.php | 3 --- htdocs/expensereport/list.php | 3 --- htdocs/expensereport/payment/list.php | 3 --- htdocs/fichinter/list.php | 3 --- htdocs/fourn/commande/list.php | 2 +- htdocs/fourn/facture/list.php | 3 --- htdocs/fourn/paiement/list.php | 2 +- htdocs/holiday/list.php | 5 ----- htdocs/hrm/evaluation_list.php | 3 --- htdocs/hrm/skill_list.php | 3 --- htdocs/intracommreport/list.php | 3 --- htdocs/knowledgemanagement/knowledgerecord_list.php | 3 --- htdocs/loan/list.php | 3 --- htdocs/mrp/mo_list.php | 3 --- htdocs/mrp/mo_movements.php | 2 +- htdocs/multicurrency/multicurrency_rate.php | 2 +- htdocs/opensurvey/list.php | 2 +- htdocs/partnership/partnership_list.php | 3 --- htdocs/product/reassort.php | 2 +- htdocs/product/reassortlot.php | 2 +- htdocs/product/stock/list.php | 3 --- htdocs/product/stock/productlot_list.php | 5 +---- htdocs/product/stock/stocktransfer/stocktransfer_list.php | 3 --- htdocs/projet/activity/perday.php | 2 +- htdocs/projet/activity/permonth.php | 2 +- htdocs/projet/activity/perweek.php | 2 +- htdocs/projet/list.php | 2 +- htdocs/public/test/test_arrays.php | 2 +- htdocs/reception/list.php | 2 +- htdocs/recruitment/recruitmentjobposition_list.php | 2 +- htdocs/salaries/list.php | 3 --- htdocs/societe/website.php | 3 --- htdocs/supplier_proposal/list.php | 2 +- htdocs/ticket/list.php | 2 +- htdocs/user/group/list.php | 3 --- htdocs/user/list.php | 2 +- htdocs/variants/list.php | 3 --- htdocs/webhook/target_list.php | 3 --- htdocs/workstation/workstation_list.php | 3 --- 62 files changed, 28 insertions(+), 135 deletions(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index afbf52d24ea47..05e81886fe145 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -566,7 +566,7 @@ } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 1a99927053d3f..f7f53f341409f 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -393,7 +393,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 0f57f63f1a1a2..a3d3cb67c942b 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -800,7 +800,7 @@ $moreforfilter .= ''; $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 958e6d9940dfe..cf444f1b06a38 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -849,9 +849,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 9cffab343ff86..90652107064ca 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -409,9 +409,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index be297d9423dd6..5b68a60fde84c 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -401,7 +401,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 404d15d607bd6..27a206f94eade 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -529,9 +529,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index d5b28c0683830..88cd966913045 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -684,7 +684,7 @@ if (!empty($moreforfilter)) { print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; } diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index 8e1057d0bc81a..e6ea3b98dbd07 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -438,7 +438,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/asset/model/list.php b/htdocs/asset/model/list.php index f9418a51f5758..98c772d76007c 100644 --- a/htdocs/asset/model/list.php +++ b/htdocs/asset/model/list.php @@ -441,7 +441,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index 1d57797083b84..3300a8a030596 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -533,9 +533,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/bookcal/availabilities_list.php b/htdocs/bookcal/availabilities_list.php index 75f95910f8493..4438c271a495f 100644 --- a/htdocs/bookcal/availabilities_list.php +++ b/htdocs/bookcal/availabilities_list.php @@ -510,9 +510,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/bookcal/calendar_list.php b/htdocs/bookcal/calendar_list.php index 0b9123a6f99bf..bc9e44a6d636b 100644 --- a/htdocs/bookcal/calendar_list.php +++ b/htdocs/bookcal/calendar_list.php @@ -492,9 +492,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 8d9896433df44..63b26c5f745ab 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -283,7 +283,7 @@ $moreforfilter = ''; $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index e1f4a4cb59102..37966ea88a490 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -372,9 +372,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type' => $type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index a52d304ccbd4f..9d9845532df69 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -962,7 +962,7 @@ $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 65d24516de5c7..82633038eebdc 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -419,9 +419,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 73e2c9170d463..4c9e9cfe29ba9 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -428,7 +428,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 72ce59256d5bb..7cf4141f76426 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -316,9 +316,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php index c8da5cfdd4849..0b9e7f8b9fc69 100644 --- a/htdocs/compta/prelevement/orders_list.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -309,9 +309,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 6632aa9056355..6be7be691aaee 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -397,9 +397,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 79af289e245f6..03a837929f54c 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -564,9 +564,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index b8c1b423cb953..9c93baff3af7c 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -820,9 +820,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index 88bfb59144ff0..afa3205f81a70 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -809,9 +809,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 79c2704dfa0dc..f79a3d40b3299 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -575,9 +575,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/expensereport/payment/list.php b/htdocs/expensereport/payment/list.php index 5ac0f5574c801..4354ae5da66b0 100644 --- a/htdocs/expensereport/payment/list.php +++ b/htdocs/expensereport/payment/list.php @@ -409,9 +409,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 22fbbb869799d..30bfffaaf1b14 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -558,9 +558,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 67ad3cbd36620..379ef6c8320ab 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1321,7 +1321,7 @@ $moreforfilter .= ''; } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 4dd80889eb230..e6597b29ce3e5 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1067,9 +1067,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 39a031a74bb68..4c4e68df2fa20 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -369,7 +369,7 @@ $moreforfilter = ''; $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 8b469d900a7c1..b197a6d39a88d 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -222,8 +222,6 @@ } - - /* * View */ @@ -575,9 +573,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type' => $type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/hrm/evaluation_list.php b/htdocs/hrm/evaluation_list.php index 8106d149b1cd2..38ea2077848f7 100644 --- a/htdocs/hrm/evaluation_list.php +++ b/htdocs/hrm/evaluation_list.php @@ -488,9 +488,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type'=>$type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/hrm/skill_list.php b/htdocs/hrm/skill_list.php index 0adb700e0b951..53ab598e4ec02 100644 --- a/htdocs/hrm/skill_list.php +++ b/htdocs/hrm/skill_list.php @@ -476,9 +476,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type'=>$type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/intracommreport/list.php b/htdocs/intracommreport/list.php index 9c5741ac040ff..83f66ef141ab6 100644 --- a/htdocs/intracommreport/list.php +++ b/htdocs/intracommreport/list.php @@ -424,9 +424,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 1fa05a3420204..52b4227e491ad 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -516,9 +516,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index f215ac15497d4..524b2125abdad 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -314,9 +314,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 7a5a15ebd6551..4a8afa2eb380d 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -476,9 +476,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 0553230c5ea5a..923a28df59180 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -588,7 +588,7 @@ $moreforfilter = ''; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 22791f2cb5586..ef05976018eaf 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -455,7 +455,7 @@ $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index f265c665cc1e1..5eb0479fd2130 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -311,7 +311,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php index 2d49d2e847db2..db9e38d904ae6 100644 --- a/htdocs/partnership/partnership_list.php +++ b/htdocs/partnership/partnership_list.php @@ -712,9 +712,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array('type' => $type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index e471426e52dea..bab617636b3f4 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -426,7 +426,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 1472dafe6ce9e..012a8dfe5b159 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -582,7 +582,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 27de0e61b1fe5..346d0f89595a2 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -519,9 +519,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index e6d6842d75a39..c0e17833c3c8b 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -458,7 +458,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { @@ -468,9 +468,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_list.php b/htdocs/product/stock/stocktransfer/stocktransfer_list.php index 89a72528d7a48..1721e1146636a 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_list.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_list.php @@ -464,9 +464,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 292c19b82a088..b1a4b640b54f7 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -540,7 +540,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/projet/activity/permonth.php b/htdocs/projet/activity/permonth.php index f293576f07b52..b53276328a952 100644 --- a/htdocs/projet/activity/permonth.php +++ b/htdocs/projet/activity/permonth.php @@ -551,7 +551,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index a309b8235c6f9..fb426600aeb11 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -588,7 +588,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 7d5c9b8ea4fd1..253db8e9ef94c 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1200,7 +1200,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php index e14597b9eee8f..2a9beff14d268 100644 --- a/htdocs/public/test/test_arrays.php +++ b/htdocs/public/test/test_arrays.php @@ -251,7 +251,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 6843c3a189155..13f201137750a 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -951,7 +951,7 @@ print '
'; print $moreforfilter; $parameters = array('type' => $type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/recruitment/recruitmentjobposition_list.php b/htdocs/recruitment/recruitmentjobposition_list.php index b74836edc1c5b..c852dbcd95f3c 100644 --- a/htdocs/recruitment/recruitmentjobposition_list.php +++ b/htdocs/recruitment/recruitmentjobposition_list.php @@ -432,7 +432,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 7a6e76ee4ffd8..ccf6882aa4a41 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -565,9 +565,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 21549f3f185c9..3be228414e9b6 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -479,9 +479,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 70afd2b4b76c4..6622a28fec3ec 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -705,7 +705,7 @@ $moreforfilter .= ''; } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index fe437b1e2684b..f39963cf1e5bb 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -820,7 +820,7 @@ $moreforfilter.= '';*/ $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/user/group/list.php b/htdocs/user/group/list.php index 774657348c131..95608d5b3dffa 100644 --- a/htdocs/user/group/list.php +++ b/htdocs/user/group/list.php @@ -335,9 +335,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/user/list.php b/htdocs/user/list.php index bcd8b1ffa9fb2..072555e4e73fa 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -719,7 +719,7 @@ } $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index e9eb5061d8f2f..aa1d37e788ea9 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -510,9 +510,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/webhook/target_list.php b/htdocs/webhook/target_list.php index b93ec16b5b218..2307eecf9545f 100644 --- a/htdocs/webhook/target_list.php +++ b/htdocs/webhook/target_list.php @@ -507,9 +507,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php index 1ece6dc7ded60..474f50e3fcbdd 100644 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -488,9 +488,6 @@ if (!empty($moreforfilter)) { print '
'; print $moreforfilter; - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; print '
'; } From 6f30d2f187a169109cac6a9b8ed3db5eb27d8be9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 14:04:24 +0200 Subject: [PATCH 009/329] Missing param --- htdocs/modulebuilder/template/myobject_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index c653d95d619e7..a7ef4bd63153e 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -229,7 +229,7 @@ $massaction = ''; } -$parameters = array(); +$parameters = array('arrayfields' => &$arrayfields); $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'); From e8c45ace3b27e6a2fe603eff0c8f9f9d7e2eb437 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 19:30:37 +0200 Subject: [PATCH 010/329] Clean code --- htdocs/accountancy/admin/productaccount.php | 2 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/adherents/class/adherent.class.php | 9 ++--- htdocs/adherents/list.php | 38 ++++++++++--------- .../modulebuilder/template/myobject_list.php | 12 ++++-- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index ace31d2caa2f2..a0d23a13beb58 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -567,7 +567,7 @@ } $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { $moreforfilter .= $hookmanager->resPrint; } else { diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 43ed4e3a09d24..71b749794ddc1 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -393,7 +393,7 @@ print '
'; print $moreforfilter; $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print '
'; } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index be94b51069b28..0715d558d01c2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -3288,12 +3288,9 @@ public function getKanbanView($option = '', $arraydata = null) if ($selected >= 0) { $return .= ''; } - if (property_exists($this, 'type')) { - $return .= '
'.$this->type.''; - } - if (method_exists($this, 'getmorphylib')) { - $return .= '
'.$this->getmorphylib('', 2).''; - } + $return .= '
'.$this->getmorphylib('', 2).''; + $return .= ''.$this->type.''; + if (method_exists($this, 'getLibStatut')) { $return .= '
'; $return .= $this->LibStatut($this->status, $this->need_subscription, $this->datefin, 5); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 611363ec3a11f..620137eddf43d 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -54,6 +54,7 @@ $backtopage = GETPOST('backtopage', 'alpha'); $optioncss = GETPOST('optioncss', 'aZ'); $mode = GETPOST('mode', 'alpha'); +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' // Search fields $search = GETPOST("search", 'alpha'); @@ -107,14 +108,15 @@ $search_status = ''; } -// Pagination parameters +// Load variable for pagination $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); -$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page"); -if (empty($page) || $page == -1) { +$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT('page'); +if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; -} // If $page is not defined, or '' or -1 +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -131,7 +133,7 @@ $hookmanager->initHooks(array('memberlist')); $extrafields = new ExtraFields($db); -// fetch optionals attributes and labels +// Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -192,6 +194,7 @@ // Complete array of fields for columns $tableprefix = 'd'; +$arrayfields = array(); foreach ($object->fields as $key => $val) { if (!array_key_exists($tableprefix.'.'.$key, $arrayfields)) { // Discard record not into $arrayfields continue; @@ -209,6 +212,9 @@ ); } } +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; + $arrayfields = dol_sort_array($arrayfields, 'position'); '@phan-var-force array,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan @@ -410,11 +416,7 @@ // Build and execute select // -------------------------------------------------------------------- -if (!empty($search_categ) && $search_categ > 0) { - $sql = "SELECT DISTINCT"; -} else { - $sql = "SELECT"; -} +$sql = "SELECT"; $sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,"; $sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,"; $sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,"; @@ -428,7 +430,7 @@ // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { - $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ''); + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : ""); } } @@ -441,7 +443,7 @@ $sqlfields = $sql; // $sql fields to remove for count total // SQL Alias adherent -$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; // maybe better to use ad (adh) instead of d +$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; if (!empty($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; } @@ -623,7 +625,7 @@ // Direct jump if only one record found -if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) { +if ($num == 1 && getDolGlobalInt('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; header("Location: ".DOL_URL_ROOT.'/adherents/card.php?id='.$id); @@ -658,6 +660,9 @@ if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } +if ($groupby != '') { + $param .= '&groupby='.urlencode($groupby); +} if ($search_all != "") { $param .= "&search_all=".urlencode($search_all); } @@ -777,13 +782,12 @@ $newcardbutton = ''; $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); -if ($user->hasRight('adherent', 'creer')) { - $newcardbutton .= dolGetButtonTitleSeparator(); - $newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create'); -} +$newcardbutton .= dolGetButtonTitleSeparator(); +$newcardbutton .= dolGetButtonTitle($langs->trans('NewMember'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/adherents/card.php?action=create', '', $user->hasRight('adherent', 'creer')); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); +// Add code for pre mass action (confirmation or email presend form) $topicmail = "Information"; $modelmail = "member"; $objecttmp = new Adherent($db); diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 6b0190659c25e..2653b2d4df5a2 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -121,7 +121,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; -// Initialize a technical objects +// Initialize technical objects $object = new MyObject($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; @@ -171,12 +171,13 @@ // } // Definition of array of fields for columns +$tableprefix = 't'; $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { $visible = (int) dol_eval((string) $val['visible'], 1); - $arrayfields['t.'.$key] = array( + $arrayfields[$tableprefix.'.'.$key] = array( 'label' => $val['label'], 'checked' => (($visible < 0) ? 0 : 1), 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), @@ -290,8 +291,8 @@ // Build and execute select // -------------------------------------------------------------------- -$sql = 'SELECT '; -$sql .= $object->getFieldList('t'); +$sql = "SELECT"; +$sql .= " ".$object->getFieldList('t'); // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -578,6 +579,9 @@ } else { $moreforfilter = $hookmanager->resPrint; } +$parameters = array( + 'arrayfields' => &$arrayfields, +); if (!empty($moreforfilter)) { print '
'; From 336b723ab8d9ce1a231d9ea1cf0ae864949b3f48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 19:37:01 +0200 Subject: [PATCH 011/329] FIX edit contract of intervention broken by CSRF protection --- htdocs/core/class/html.form.class.php | 2 +- htdocs/fichinter/card.php | 6 +++--- htdocs/main.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 038a73f5018b9..34440df67197f 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -293,7 +293,7 @@ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofda // So we convert & into & so a string like 'a < b
é
<script>alert('X');<script>' stay a correct html and is not converted by textarea component when wysiwyg is off. $valuetoshow = str_replace('&', '&', $valuetoshow); $ret .= dol_htmlwithnojs(dol_string_neverthesehtmltags($valuetoshow, array('textarea'))); - $ret .= ''; + $ret .= '
'; } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $addnowlink = empty($moreoptions['addnowlink']) ? 0 : $moreoptions['addnowlink']; $adddateof = empty($moreoptions['adddateof']) ? '' : $moreoptions['adddateof']; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index cdc8b34f79ade..7c1809cf9be6a 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1367,14 +1367,14 @@ print ''; - if ($action != 'contrat') { - print ''; } print '
'; print $langs->trans('Contract'); print 'id.'">'; + if ($action != 'editcontract') { + print 'id.'">'; print img_edit($langs->trans('SetContract'), 1); print '
'; print ''; - if ($action == 'contrat') { + if ($action == 'editcontract') { $formcontract = new FormContract($db); $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1, 1); } else { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 64e6efd136dbd..2a614ed16e0ac 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -630,7 +630,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type, $stopcode = 1) $sensitiveget = false; if ((GETPOSTISSET('massaction') || GETPOST('action', 'aZ09')) && getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 3) { // All GET actions (except the listed exceptions that are usually post for pre-actions and not real action) and mass actions are processed as sensitive. - if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate + if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate $sensitiveget = true; } } elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) { From e0e0b669a9aed374aae7a6d9673eecc955a65491 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 19:37:01 +0200 Subject: [PATCH 012/329] FIX edit contract of intervention broken by CSRF protection --- htdocs/core/class/html.form.class.php | 2 +- htdocs/fichinter/card.php | 6 +++--- htdocs/main.inc.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 693271106f6bb..a4ddcecf4188c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -292,7 +292,7 @@ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofda // So we convert & into & so a string like 'a < b
é
<script>alert('X');<script>' stay a correct html and is not converted by textarea component when wysiwyg is off. $valuetoshow = str_replace('&', '&', $valuetoshow); $ret .= dol_htmlwithnojs(dol_string_neverthesehtmltags($valuetoshow, array('textarea'))); - $ret .= ''; + $ret .= '
'; } elseif ($typeofdata == 'day' || $typeofdata == 'datepicker') { $addnowlink = empty($moreoptions['addnowlink']) ? 0 : $moreoptions['addnowlink']; $adddateof = empty($moreoptions['adddateof']) ? '' : $moreoptions['adddateof']; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index cfef617a21b5f..eed887b616c00 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1282,14 +1282,14 @@ print ''; - if ($action != 'contrat') { - print ''; } print '
'; print $langs->trans('Contract'); print 'id.'">'; + if ($action != 'editcontract') { + print 'id.'">'; print img_edit($langs->trans('SetContract'), 1); print '
'; print ''; - if ($action == 'contrat') { + if ($action == 'editcontract') { $formcontract = new FormContract($db); $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1, 1); } else { diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 88ba319011a1c..7a8f3cebb3737 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -628,7 +628,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type, $stopcode = 1) $sensitiveget = false; if ((GETPOSTISSET('massaction') || GETPOST('action', 'aZ09')) && getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 3) { // All GET actions (except the listed exceptions that are usually post for pre-actions and not real action) and mass actions are processed as sensitive. - if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate + if (GETPOSTISSET('massaction') || !in_array(GETPOST('action', 'aZ09'), array('create', 'createsite', 'createcard', 'edit', 'editcontract', 'editvalidator', 'file_manager', 'presend', 'presend_addmessage', 'preview', 'reconcile', 'specimen'))) { // We exclude some action that are not sensitive so legitimate $sensitiveget = true; } } elseif (getDolGlobalInt('MAIN_SECURITY_CSRF_WITH_TOKEN') >= 2) { From 377131fd3695ae273641a65c26b039adca7ae5d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 19:55:34 +0200 Subject: [PATCH 013/329] FIX filter on etrafield date --- htdocs/core/tpl/extrafields_list_search_sql.tpl.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 31e6acf3c8955..6901b9a34727d 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -32,11 +32,11 @@ } $sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'"; } elseif (is_array($crit)) { - if ($crit['start'] !== '' && $crit['end'] !== '') { + if (!is_null($crit['start']) && $crit['start'] !== '' && !is_null($crit['end']) && $crit['end'] !== '') { $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." BETWEEN '". $db->idate($crit['start']). "' AND '".$db->idate($crit['end']) . "')"; - } elseif ($crit['start'] !== '') { + } elseif (!is_null($crit['start']) && $crit['start'] !== '') { $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." >= '". $db->idate($crit['start'])."')"; - } elseif ($crit['end'] !== '') { + } elseif (!is_null($crit['end']) && $crit['end'] !== '') { $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." <= '". $db->idate($crit['end'])."')"; } } From 09d4c1f3b83e3df3767c985f7c89359e2adb43e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 20:22:19 +0200 Subject: [PATCH 014/329] NEW Add tooltip on closing accounting setup --- htdocs/accountancy/admin/closure.php | 12 ++++++++---- htdocs/langs/en_US/accountancy.lang | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index a11c83cea464e..982222bf20d5a 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -148,16 +148,20 @@ // Accounting groups used for the balance sheet account print ''; -print ''.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT").''; +print ''; +print $form->textwithpicto($langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT"), $langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNTHelp")); +print ''; print ''; -print ''; +print ''; print ''; // Accounting groups used for the income statement print ''; -print ''.$langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT").''; +print ''; +print $form->textwithpicto($langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT"), $langs->trans("ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENTHelp")); +print ''; print ''; -print ''; +print ''; print ''; print "\n"; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 1a67247446776..653f12b8e72ed 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -177,8 +177,10 @@ ACCOUNTING_SOCIAL_JOURNAL=Social journal ACCOUNTING_RESULT_PROFIT=Result accounting account (Profit) ACCOUNTING_RESULT_LOSS=Result accounting account (Loss) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Journal of closure -ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT=Accounting groups used for the balance sheet account (separate by comma) -ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT=Accounting groups used for the income statement (separate by comma) +ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT=Accounting groups used for calculation of the balance sheet +ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNTHelp=Set here the list of accounting groups (defined in the chart of account) that must be used to find all accounts to calculate the balance sheet. Use a comma to separate each value.
Example: CAPIT,IMMO,STOCK,FINAN,THIRDPARTY +ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT=Accounting groups used for calculation of the income statement +ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENTHelp=Set here the list of accounting groups (defined in the chart of account) that must be used to find all accounts to calculate the income statement. Use a comma to separate each value.
Example: INCOME,EXPENSE ACCOUNTING_ACCOUNT_TRANSFER_CASH=Account (from the Chart Of Account) to be used as the account for transitional bank transfers TransitionalAccount=Transitional bank transfer account ACCOUNTING_ACCOUNT_SUSPENSE=Account (from the Chart Of Account) to be used as the account for unallocated funds either received or paid i.e. funds in "wait[ing]" From c3c708880c3e9729571261120af378368feea6ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Sep 2024 21:21:24 +0200 Subject: [PATCH 015/329] Can fetch a page with its translation parent id. --- htdocs/website/class/websitepage.class.php | 28 +++++++++++++--------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index bdeb6e734db5e..4ebf2234505b6 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -230,15 +230,17 @@ public function create(User $user, $notrigger = 0) /** * Load object in memory from the database * - * @param int $id Id object. - * - If this is 0, the value into $page will be used. If not found or $page not defined, the default page of website_id will be used or the first page found if not set. - * - If value is < 0, we must exclude this ID. - * @param string $website_id Web site id (page name must also be filled if this parameter is used) - * @param string $page Page name (website id must also be filled if this parameter is used). Example 'myaliaspage' or 'fr/myaliaspage' - * @param string $aliasalt Alternative alias to search page (slow) - * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK + * @param int $id Id object. + * - If this is 0, the value into $page will be used. If not found or $page not defined, the default page of website_id will be used or the first page found if not set. + * - If value is < 0, we must exclude this ID. + * @param string $website_id Web site id (page name must also be filled if this parameter is used) + * @param string $page Page name (website id must also be filled if this parameter is used). Example 'myaliaspage' or 'fr/myaliaspage' + * @param string $aliasalt Alternative alias to search page (slow) + * @param int $translationparentid Translation parent ID (a main language page ID to get the translated page). Parameter $translationparentlang must also be set. + * @param string $translationparentlang Translation parent Lang (a language lang to search the translation of the main page ID). Parameter $translationparentid must also be set. + * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $website_id = null, $page = null, $aliasalt = null) + public function fetch($id, $website_id = null, $page = null, $aliasalt = null, $translationparentid = 0, $translationparentlang = '') { dol_syslog(__METHOD__, LOG_DEBUG); @@ -255,7 +257,7 @@ public function fetch($id, $website_id = null, $page = null, $aliasalt = null) $sql .= " t.htmlheader,"; $sql .= " t.content,"; $sql .= " t.lang,"; - $sql .= " t.fk_page,"; + $sql .= " t.fk_page,"; // Translation parent page (in mani language) $sql .= " t.allowed_in_frames,"; $sql .= " t.status,"; $sql .= " t.grabbed_from,"; @@ -274,7 +276,7 @@ public function fetch($id, $website_id = null, $page = null, $aliasalt = null) $sql .= ' AND t.rowid = '.((int) $id); } else { if ($id < 0) { - $sql .= ' AND t.rowid <> '.abs($id); + $sql .= ' AND t.rowid <> '.((int) abs($id)); } if (null !== $website_id) { $sql .= " AND t.fk_website = '".$this->db->escape($website_id)."'"; @@ -294,7 +296,11 @@ public function fetch($id, $website_id = null, $page = null, $aliasalt = null) } } if ($aliasalt) { - $sql .= " AND (t.aliasalt LIKE '%,".$this->db->escape($aliasalt).",%' OR t.aliasalt LIKE '%, ".$this->db->escape($aliasalt).",%')"; + $sql .= " AND (t.aliasalt LIKE '%,".$this->db->escape($this->db->escapeforlike($aliasalt)).",%' OR t.aliasalt LIKE '%, ".$this->db->escape($this->db->escapeforlike($aliasalt)).",%')"; + } + if ($translationparentid && $translationparentlang) { + $sql .= " AND t.fk_page = ".((int) $translationparentid); + $sql .= " AND t.lang = '".$this->db->escape($translationparentlang)."'"; } } } From 4b4d629b7107687b115d3ee5e254c0d97553c3d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Sep 2024 22:17:40 +0200 Subject: [PATCH 016/329] fix phan for branch 20.0 (#31105) * fix phan * Update card.php * Update card.php * Update main.lang * Update card.php * Update card.php --- htdocs/accountancy/bookkeeping/card.php | 8 ++++---- htdocs/core/class/CMailFile.class.php | 2 +- htdocs/langs/en_US/main.lang | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index c157fe493b078..2062918581ed7 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -515,15 +515,15 @@ print dol_get_fiche_head($head, 'transaction', '', -1); - $object->ref = $object->piece_num; + $object->ref = (string) $object->piece_num; $object->label = $object->doc_ref; - $morehtmlref .= '
'; + $morehtmlref = '
'; $morehtmlref .= '
'; $morehtmlref .= $object->label; $morehtmlref .= '
'; - print dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref); + dol_banner_tab($object, 'ref', $backlink, 1, 'piece_num', 'piece_num', $morehtmlref); print '
'; @@ -940,7 +940,7 @@ if ($mode == '_tmp' && $action == '' && $permissiontoadd) { print '
'; print '
'; - if (empty($total_debit) && empty($total_debit)) { + if (empty($total_debit) && empty($total_credit)) { print ''; } elseif ($total_debit == $total_credit) { print ''.$langs->trans("ValidTransaction").''; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 4538ba32cec85..9b72013965f2f 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1329,7 +1329,7 @@ public function sendfile() $this->error = 'Transport failed for the following addresses: "' . implode('", "', $failedRecipients) . '".'; $this->errors[] = $this->error; } - dol_syslog("CMailFile::sendfile: mail end error=". join(' ', $this->errors), LOG_ERR); + dol_syslog("CMailFile::sendfile: mail end error=". implode(' ', $this->errors), LOG_ERR); $res = false; if (getDolGlobalString('MAIN_MAIL_DEBUG')) { diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 3116b8f39d391..6e85fabaa63c4 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -37,6 +37,7 @@ Translation=Translation Translations=Translations CurrentTimeZone=TimeZone PHP (server) EmptySearchString=Enter non empty search criteria +EnterNonEmptyLinesFirst=enter non empty lines first EnterADateCriteria=Enter a date criteria NoRecordFound=No record found NoRecordDeleted=No record deleted From 6de574bf5cc2632128e230ef25a9dfab9dc54c9c Mon Sep 17 00:00:00 2001 From: MaximilienR-easya <122890855+MaximilienR-easya@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:18:26 +0200 Subject: [PATCH 017/329] Fix a problem when we have an extrafield on the line (#31104) --- htdocs/contrat/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 8e21569ec5e7f..4366be5b60467 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1713,7 +1713,7 @@ $line = new ContratLigne($db); $line->id = $objp->rowid; $line->fetch_optionals(); - print $line->showOptionals($extrafields, 'view', array('class'=>'oddeven', 'style'=>$moreparam, 'colspan'=>$colspan), '', '', 1); + print $line->showOptionals($extrafields, 'view', array('class'=>'oddeven', 'style'=>$moreparam, 'colspan'=>$colspan, 'tdclass' => 'notitlefieldcreate'), '', '', 1); } } else { // Line in mode update @@ -1817,7 +1817,7 @@ $line = new ContratLigne($db); $line->id = $objp->rowid; $line->fetch_optionals(); - print $line->showOptionals($extrafields, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', 1); + print $line->showOptionals($extrafields, 'edit', array('style'=>'class="oddeven"', 'colspan'=>$colspan, 'tdclass' => 'notitlefieldcreate'), '', '', 1); } } From a94cff63a7221a34afeb86de7baf4665d7d3ace3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Sep 2024 22:21:31 +0200 Subject: [PATCH 018/329] fix phpstan (#31102) * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan --- htdocs/accountancy/admin/defaultaccounts.php | 4 ++-- htdocs/accountancy/admin/index.php | 7 +++--- htdocs/admin/accountant.php | 8 +++---- htdocs/admin/company.php | 10 ++++----- htdocs/admin/modules.php | 12 +++++----- .../tpl/depreciation_options_edit.tpl.php | 3 ++- htdocs/bookmarks/bookmarks.lib.php | 3 ++- htdocs/categories/viewcat.php | 20 ++++++++--------- htdocs/comm/action/class/actioncomm.class.php | 22 +++++++++---------- htdocs/comm/contact.php | 2 +- htdocs/comm/mailing/card.php | 2 +- htdocs/commande/card.php | 2 +- htdocs/commande/customer.php | 3 ++- htdocs/commande/list.php | 4 ++-- htdocs/commande/list_det.php | 4 ++-- htdocs/compta/accounting-files.php | 3 ++- htdocs/compta/clients.php | 3 ++- htdocs/compta/stats/cabyprodserv.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- .../stats/supplier_turnover_by_prodserv.php | 2 +- .../stats/supplier_turnover_by_thirdparty.php | 2 +- .../boxes/box_graph_invoices_permonth.php | 2 +- .../core/boxes/box_graph_invoices_peryear.php | 2 +- .../box_graph_invoices_supplier_permonth.php | 2 +- .../boxes/box_graph_nb_ticket_last_x_days.php | 8 +++---- .../core/boxes/box_graph_orders_permonth.php | 2 +- .../box_graph_orders_supplier_permonth.php | 2 +- .../boxes/box_graph_product_distribution.php | 4 ++-- .../boxes/box_graph_propales_permonth.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 2 +- htdocs/core/lib/ajax.lib.php | 12 +++++----- htdocs/core/search_page.php | 3 ++- htdocs/core/tpl/commonfields_add.tpl.php | 3 ++- htdocs/core/tpl/commonfields_edit.tpl.php | 3 ++- htdocs/core/tpl/filemanager.tpl.php | 11 +++++----- htdocs/cron/list.php | 10 ++++----- htdocs/ecm/index_auto.php | 2 +- .../class/emailcollectoraction.class.php | 20 ++++++++--------- .../class/emailcollectorfilter.class.php | 20 ++++++++--------- htdocs/expensereport/card.php | 8 +++---- htdocs/hrm/skill_card.php | 2 +- htdocs/imports/import.php | 2 +- htdocs/main.inc.php | 6 ++--- htdocs/modulebuilder/index.php | 4 ++-- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/results.php | 6 ++--- htdocs/product/stats/commande.php | 4 ++-- htdocs/product/stats/commande_fournisseur.php | 4 ++-- htdocs/product/stats/facture.php | 5 +++-- htdocs/product/stats/facture_fournisseur.php | 4 ++-- htdocs/product/stats/facturerec.php | 4 ++-- htdocs/product/stats/mo.php | 4 ++-- htdocs/product/stats/propal.php | 4 ++-- .../stock/stats/commande_fournisseur.php | 5 +++-- htdocs/product/stock/stats/expedition.php | 17 +++++++------- htdocs/product/stock/stats/mo.php | 5 +++-- htdocs/product/stock/stats/reception.php | 5 +++-- htdocs/public/onlinesign/newonlinesign.php | 8 +++---- htdocs/public/opensurvey/studs.php | 7 +++--- htdocs/societe/notify/card.php | 7 +++--- htdocs/ticket/class/actions_ticket.class.php | 3 ++- htdocs/ticket/list.php | 2 +- htdocs/user/notify/card.php | 4 ++-- htdocs/user/perms.php | 13 ++++++----- htdocs/website/index.php | 10 ++++----- phpstan.neon.dist | 1 - 67 files changed, 198 insertions(+), 180 deletions(-) diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 5d856d5027c91..ca68c0f5aed04 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -314,7 +314,7 @@ print '' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . ''; if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) { print ''; - print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning'); print ''; } else { print ''; @@ -341,7 +341,7 @@ print '' . img_picto('', 'supplier_invoice', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnSupplierDeposit") . ''; if (getDolGlobalInt('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) { print ''; - print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning'); print ''; } else { print ''; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 4025db92cab39..a0f34150a8d14 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -8,6 +8,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2021 Ferran Marcet + * Copyright (C) 2024 Frédéric France * * 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 @@ -414,7 +415,7 @@ print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").''; if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_SALES')) { print ''; - print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning'); print ''; } else { print ''; @@ -427,7 +428,7 @@ print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").''; if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_PURCHASES')) { print ''; - print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning'); print ''; } else { print ''; @@ -440,7 +441,7 @@ print ''.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").''; if (getDolGlobalString('ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS')) { print ''; - print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); + print img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', 'warning'); print ''; } else { print ''; diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 61e3d483237bd..a78c9efba7db9 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -153,25 +153,25 @@ // Telephone print ''; -print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_phoning', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Fax print ''; -print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_phoning_fax', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // eMail print ''; -print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_email', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Web print ''; -print img_picto('', 'globe', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'globe', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index f24416400b35d..de572cf1a2772 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -483,31 +483,31 @@ // Phone print ''; -print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_phoning', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Phone mobile print ''; -print img_picto('', 'object_phoning_mobile', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_phoning_mobile', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Fax print ''; -print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_phoning_fax', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Email print ''; -print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'object_email', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; // Web print ''; -print img_picto('', 'globe', '', false, 0, 0, '', 'pictofixedwidth'); +print img_picto('', 'globe', '', 0, 0, 0, '', 'pictofixedwidth'); print ''; print ''."\n"; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 7e5e28adec1b0..485679d5181d1 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -905,7 +905,7 @@ if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= $langs->trans("Used"); } else { - $codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', false, 0, 0, '', 'opacitymedium valignmiddle'); + $codeenabledisable .= img_picto($langs->trans("Required"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium valignmiddle'); //print $langs->trans("Required"); } if (isModEnabled('multicompany') && $user->entity) { @@ -964,20 +964,20 @@ } else { if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) { $urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1); - $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; + $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').''; } else { $urltouse = $urlpage; - $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; + $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').''; } } } } elseif (preg_match('/^([^@]+)@([^@]+)$/i', (string) $objMod->config_page_url, $regs)) { - $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; + $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').''; } else { - $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; + $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', 0, 0, 0, '', 'fa-15').''; } } else { - $codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15'); + $codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', 0, 0, 0, '', 'fa-15'); } } else { // Module not yet activated // Set $codeenabledisable diff --git a/htdocs/asset/tpl/depreciation_options_edit.tpl.php b/htdocs/asset/tpl/depreciation_options_edit.tpl.php index b704725acadc3..6809a5a543710 100644 --- a/htdocs/asset/tpl/depreciation_options_edit.tpl.php +++ b/htdocs/asset/tpl/depreciation_options_edit.tpl.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * 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 @@ -121,7 +122,7 @@ print ''; print ''; if (!empty($field_info['picto'])) { - print img_picto('', $field_info['picto'], '', false, 0, 0, '', 'pictofixedwidth'); + print img_picto('', $field_info['picto'], '', 0, 0, 0, '', 'pictofixedwidth'); } if (in_array($field_info['type'], array('int', 'integer'))) { $value = GETPOSTISSET($html_name) ? GETPOSTINT($html_name) : $assetdepreciationoptions->$field_key; diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index edd6988d38b91..e61594d402665 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * 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 @@ -93,7 +94,7 @@ function printDropdownBookmarksList() //$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url); $urltoadd = DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url); $newbtn .= ''; - $newbtn .= img_picto('', 'add', '', false, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; + $newbtn .= img_picto('', 'add', '', 0, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; } } diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index a5af5901fcfe8..8c23bf972e947 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -572,7 +572,7 @@ if ($permission) { print 'id.'">'; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -659,7 +659,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -747,7 +747,7 @@ if ($permission) { print 'id.($limit ? '&limit='.$limit : '').'">'; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -839,7 +839,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -932,7 +932,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -1022,7 +1022,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -1112,7 +1112,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -1196,7 +1196,7 @@ if ($user->hasRight('user', 'user', 'creer')) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -1267,7 +1267,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; @@ -1355,7 +1355,7 @@ if ($permission) { print "id."'>"; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', false, 0, 0, '', 'paddingleft'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', '', 0, 0, 0, '', 'paddingleft'); print ""; } print ''; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index eca239129303f..5a8db497980cc 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1869,32 +1869,32 @@ public function getTypePicto($morecss = 'pictofixedwidth paddingright valignmidd $color = 'style="color: #'.$this->type_color.' !important;"'; } if ($this->type_picto) { - $imgpicto = img_picto($titlealt, $this->type_picto, '', false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, $this->type_picto, '', 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } else { if ($this->type_code == 'AC_RDV') { - $imgpicto = img_picto($titlealt, 'meeting', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'meeting', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif ($this->type_code == 'AC_TEL') { - $imgpicto = img_picto($titlealt, 'object_phoning', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'object_phoning', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif ($this->type_code == 'AC_FAX') { - $imgpicto = img_picto($titlealt, 'object_phoning_fax', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'object_phoning_fax', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN' || (!empty($this->code) && preg_match('/_SENTBYMAIL/', $this->code))) { - $imgpicto = img_picto($titlealt, 'object_email', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'object_email', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif ($this->type_code == 'AC_INT') { - $imgpicto = img_picto($titlealt, 'object_intervention', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'object_intervention', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif (!empty($this->code) && preg_match('/^TICKET_MSG/', $this->code)) { - $imgpicto = img_picto($titlealt, 'object_conversation', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'object_conversation', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } elseif ($this->type != 'systemauto') { - $imgpicto = img_picto($titlealt, 'user-cog', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'user-cog', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } else { - $imgpicto = img_picto($titlealt, 'cog', $color, false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'cog', $color, 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } } } else { // 2 picto: 1 for auto, 1 for manual if ($this->type != 'systemauto') { - $imgpicto = img_picto($titlealt, 'user-cog', '', false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'user-cog', '', 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } else { - $imgpicto = img_picto($titlealt, 'cog', '', false, 0, 0, '', ($morecss ? ' '.$morecss : '')); + $imgpicto = img_picto($titlealt, 'cog', '', 0, 0, 0, '', ($morecss ? ' '.$morecss : '')); } } diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 5bc57efbb12aa..61691055dc5eb 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -162,7 +162,7 @@ print ''; print ''; print ' '; - print ''; + print ''; print "\n"; $i = 0; diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index ca4f0c8d863e1..298a936b90ab0 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -1500,7 +1500,7 @@ foreach ($listofpaths as $key => $val) { $out .= '
'; $out .= img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; - $out .= ' '; + $out .= ' '; $out .= '
'; } } else { diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index d314b3b046865..9e1b721b58f08 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2079,7 +2079,7 @@ print ''; print ''.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).''; print ''; - print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', 0, 'maxwidth200 widthcentpercentminusx'); print ''; } diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 1e2b4012aa76b..34fda8fefd672 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -5,6 +5,7 @@ * Copyright (C) 2012 Andreu Bisquerra Gaya * Copyright (C) 2012 David Rodriguez Martinez * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2024 Frédéric France * * 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 @@ -165,7 +166,7 @@ print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 222eb68be5d57..f330219ac9ae0 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2790,10 +2790,10 @@ } } if ($notshippable == 0) { - $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft'); + $text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'green paddingleft'); $text_info = $text_icon.' '.$langs->trans('Shippable').'
'.$text_info; } else { - $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft'); + $text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'error paddingleft'); $text_info = $text_icon.' '.$langs->trans('NonShippable').'
'.$text_info; } } diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 9e29e536b9d68..8e4ee825fb66f 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -2168,10 +2168,10 @@ } } if ($notshippable == 0) { - $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'green paddingleft'); + $text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'green paddingleft'); $text_info = $text_icon.' '.$langs->trans('Shippable').'
'.$text_info; } else { - $text_icon = img_picto('', 'dolly', '', false, 0, 0, '', 'error paddingleft'); + $text_icon = img_picto('', 'dolly', '', 0, 0, 0, '', 'error paddingleft'); $text_info = $text_icon.' '.$langs->trans('NonShippable').'
'.$text_info; } } diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index b4ee8ccdcad84..aec781054b422 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -6,6 +6,7 @@ * Copyright (C) 2021 Gauthier VERDOL * Copyright (C) 2022-2024 Alexandre Spangaro * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -867,7 +868,7 @@ $filename = ($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']); print ''; if (empty($tmppreview)) { - print img_picto('', 'generic', '', false, 0, 0, '', 'pictonopreview pictofixedwidth paddingright'); + print img_picto('', 'generic', '', 0, 0, 0, '', 'pictonopreview pictofixedwidth paddingright'); } print $filename; print '
'; diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index ff5c728ac01f2..0b49ac3683d68 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2024 Frédéric France * * 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 @@ -165,7 +166,7 @@ print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index b3f5cf5efa2a9..8d84c797a6b18 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -489,7 +489,7 @@ print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 4d677fed1bbfa..6c2907eed95b5 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -462,7 +462,7 @@ } print'>'; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php index d27cc167776b1..59885710a9b66 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -403,7 +403,7 @@ print ''; print ''; - print ''; + print ''; print ''; // Array header diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index 814446e8260be..fcc847ee32dac 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -406,7 +406,7 @@ } print'>'; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 17aae230954a6..84a4bdf3de82a 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -240,7 +240,7 @@ public function loadBox($max = 5) $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= '
'; if ($shownb && $showtot) { diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index e4ea9a1cf3a56..c5610b99dae6c 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -190,7 +190,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= '
'; $stringtoshow .= $px2->show(); diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 2c0f4299a9e44..ff3788142c64f 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -235,7 +235,7 @@ public function loadBox($max = 5) $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= '
'; if ($shownb && $showtot) { diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php index c4ca39e598c97..4f6aec89a0050 100644 --- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php +++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php @@ -1,9 +1,9 @@ - * 2016 Christophe Battarel - * Copyright (C) 2019-2021 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2016 Christophe Battarel + * Copyright (C) 2019-2024 Frédéric France + * 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 @@ -148,7 +148,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("Days"); - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= '
'; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index faae74f904150..fbcd51f9bb1c8 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -239,7 +239,7 @@ public function loadBox($max = 5) $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; if ($shownb && $showtot) { diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 6b75fdf3368da..f913089a77d29 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -238,7 +238,7 @@ public function loadBox($max = 5) $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; if ($shownb && $showtot) { diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index eeb4e2a4a29f8..983f8c61fc568 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -368,7 +368,7 @@ public function loadBox($max = 5) } $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 52520e3cf14bc..bb8c6f894ac88 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -235,7 +235,7 @@ public function loadBox($max = 5) $stringtoshow .= ' '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow .= '
'; $stringtoshow .= $langs->trans("Year").' '; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; if ($shownb && $showtot) { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 34440df67197f..6600ddcf9da69 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -443,7 +443,7 @@ public function widgetForTranslation($fieldname, $object, $perm, $typeofdata = ' $result .= '' . "\n"; $result .= '
'; - $s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', false, 0, 0, '', 'fa-15 editfieldlang'); + $s = img_picto($langs->trans("ShowOtherLanguages"), 'language', '', 0, 0, 0, '', 'fa-15 editfieldlang'); $result .= $s; $result .= '
'; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c8630c2b057ac..c19b938918258 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -2247,7 +2247,7 @@ public function showPreview($file, $modulepart, $relativepath, $ruleforpicto = 0 $out .= ''; } else { if ($ruleforpicto < 0) { - $out .= img_picto('', 'generic', '', false, 0, 0, '', 'paddingright pictofixedwidth'); + $out .= img_picto('', 'generic', '', 0, 0, 0, '', 'paddingright pictofixedwidth'); } } } diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index ff81ca552c489..659c966d9d901 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -698,8 +698,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof '."\n"; $out .= ''; - $out .= ''.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; - $out .= ''.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ? img_picto($langs->trans("Enabled"), 'switch_on', '', 0, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', 0, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ? img_picto($langs->trans("Disabled"), 'switch_off'.$suffix, '', 0, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on'.$suffix, '', 0, 0, 0, '', '', $marginleftonlyshort)).''; $out .= "\n"; } @@ -828,11 +828,11 @@ function() { } if (empty($conf->use_javascript_ajax) || $forcenojs) { - $out .= ''.img_picto($langs->trans($text_off), $switchoff, '', false, 0, 0, '', $cssswitchoff).''; - $out .= ''.img_picto($langs->trans($text_on), $switchon, '', false, 0, 0, '', $cssswitchon).''; + $out .= ''.img_picto($langs->trans($text_off), $switchoff, '', 0, 0, 0, '', $cssswitchoff).''; + $out .= ''.img_picto($langs->trans($text_on), $switchon, '', 0, 0, 0, '', $cssswitchon).''; } else { - $out .= ''.img_picto($langs->trans($text_off), $switchoff, '', false, 0, 0, '', $cssswitchoff).''; - $out .= ''.img_picto($langs->trans($text_on), $switchon, '', false, 0, 0, '', $cssswitchon).''; + $out .= ''.img_picto($langs->trans($text_off), $switchoff, '', 0, 0, 0, '', $cssswitchoff).''; + $out .= ''.img_picto($langs->trans($text_on), $switchon, '', 0, 0, 0, '', $cssswitchon).''; } return $out; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 375ad2c171fa5..90aa23c6879c5 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * This file is a modified version of datepicker.php from phpBSM to fix some * bugs, to add new features and to dramatically increase speed. @@ -174,7 +175,7 @@ $ret .= ''; $ret .= ''; $ret .= '
'; - $ret .= img_picto('', 'url', '', false, 0, 0, '', 'paddingright width20'); + $ret .= img_picto('', 'url', '', 0, 0, 0, '', 'paddingright width20'); $ret .= 'trans("OrPasteAnURL")).'"'; diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index 1a50479ae323b..90b7f99f06334 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -68,7 +69,7 @@ print ''; print ''; if (!empty($val['picto'])) { - print img_picto('', $val['picto'], '', false, 0, 0, '', 'pictofixedwidth'); + print img_picto('', $val['picto'], '', 0, 0, 0, '', 'pictofixedwidth'); } if (in_array($val['type'], array('int', 'integer'))) { $value = GETPOSTINT($key); diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index 39a029f148071..72ca7a2ba0ede 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -1,5 +1,6 @@ + * Copyright (C) 2024 Frédéric France * * 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 @@ -65,7 +66,7 @@ print ''; if (!empty($val['picto'])) { - print img_picto('', $val['picto'], '', false, 0, 0, '', 'pictofixedwidth'); + print img_picto('', $val['picto'], '', 0, 0, 0, '', 'pictofixedwidth'); } if (in_array($val['type'], array('int', 'integer'))) { diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index ea3d626c64be3..6b2c4418354c5 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -81,27 +82,27 @@ if ($permtoadd) { $websitekeyandpageid = (!empty($websitekey) ? '&website='.urlencode($websitekey) : '').(!empty($pageid) ? '&pageid='.urlencode((string) $pageid) : ''); print ''; - print img_picto('', 'folder-plus', '', false, 0, 0, '', 'size15x marginrightonly'); + print img_picto('', 'folder-plus', '', 0, 0, 0, '', 'size15x marginrightonly'); print ''; } else { print ''; - print img_picto('', 'folder-plus', 'disabled', false, 0, 0, '', 'size15x marginrightonly'); + print img_picto('', 'folder-plus', 'disabled', 0, 0, 0, '', 'size15x marginrightonly'); print ''; } if ($module == 'ecm') { $tmpurl = ((!empty($conf->use_javascript_ajax) && !getDolGlobalString('MAIN_ECM_DISABLE_JS')) ? '#' : ($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module ? '&module='.$module : '').($section ? '&section='.$section : ''))); print ''; - print img_picto('', 'refresh', 'id="refreshbutton"', false, 0, 0, '', 'size15x marginrightonly'); + print img_picto('', 'refresh', 'id="refreshbutton"', 0, 0, 0, '', 'size15x marginrightonly'); print ''; } if ($permtoadd && GETPOSTISSET('website')) { // If on file manager to manage medias of a web site print 'ref).'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.dol_escape_htmltag($langs->trans("GenerateImgWebp")).'">'; - print img_picto('', 'images', '', false, 0, 0, '', 'size15x flip marginrightonly'); + print img_picto('', 'images', '', 0, 0, 0, '', 'size15x flip marginrightonly'); print ''; } elseif ($permtoadd && $module == 'ecm') { // If on file manager medias in ecm if (getDolGlobalInt('ECM_SHOW_GENERATE_WEBP_BUTTON')) { print ''; - print img_picto('', 'images', '', false, 0, 0, '', 'size15x flip marginrightonly'); + print img_picto('', 'images', '', 0, 0, 0, '', 'size15x flip marginrightonly'); print ''; } } diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 00d05a7d8a38f..2a3629bc573f7 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -725,9 +725,9 @@ } if ($user->hasRight('cron', 'delete')) { print ''.img_picto($langs->trans('CronDelete'), 'delete', '', false, 0, 0, '', 'marginleftonly').'   '; + print '" title="'.dol_escape_htmltag($langs->trans('CronDelete')).'">'.img_picto($langs->trans('CronDelete'), 'delete', '', 0, 0, 0, '', 'marginleftonly').'   '; } else { - print ''.img_picto($langs->trans('NotEnoughPermissions'), 'delete', '', false, 0, 0, '', 'marginleftonly').'   '; + print ''.img_picto($langs->trans('NotEnoughPermissions'), 'delete', '', 0, 0, 0, '', 'marginleftonly').'   '; } if ($user->hasRight('cron', 'execute')) { if (!empty($obj->status)) { @@ -735,12 +735,12 @@ print(!getDolGlobalString('CRON_KEY') ? '' : '&securitykey=' . getDolGlobalString('CRON_KEY')); print($sortfield ? '&sortfield='.$sortfield : ''); print($sortorder ? '&sortorder='.$sortorder : ''); - print $param."\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'), "play", '', false, 0, 0, '', 'marginleftonly').''; + print $param."\" title=\"".dol_escape_htmltag($langs->trans('CronExecute'))."\">".img_picto($langs->trans('CronExecute'), "play", '', 0, 0, 0, '', 'marginleftonly').''; } else { - print ''.img_picto($langs->trans('JobDisabled'), "playdisabled", '', false, 0, 0, '', 'marginleftonly').''; + print ''.img_picto($langs->trans('JobDisabled'), "playdisabled", '', 0, 0, 0, '', 'marginleftonly').''; } } else { - print ''.img_picto($langs->trans('NotEnoughPermissions'), "playdisabled", '', false, 0, 0, '', 'marginleftonly').''; + print ''.img_picto($langs->trans('NotEnoughPermissions'), "playdisabled", '', 0, 0, 0, '', 'marginleftonly').''; } print ''; diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 003cbf6effb58..c8ae6a4f658a5 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -432,7 +432,7 @@ // Toolbar $url = ((!empty($conf->use_javascript_ajax) && !getDolGlobalString('MAIN_ECM_DISABLE_JS')) ? '#' : ($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module ? '&module='.$module : '').($section ? '&section='.$section : ''))); print ''; -print img_picto('', 'refresh', 'id="refreshbutton"', false, 0, 0, '', 'size15x marginrightonly'); +print img_picto('', 'refresh', 'id="refreshbutton"', 0, 0, 0, '', 'size15x marginrightonly'); print ''; print '
'; diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 39ce910c9860e..9a36b208cdaa7 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -372,33 +372,33 @@ public function LibStatut($status, $mode = 0) return $this->labelStatus[$status]; } elseif ($mode == 2) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } } elseif ($mode == 3) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } elseif ($mode == 4) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } } elseif ($mode == 5) { if ($status == 1) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } elseif ($mode == 6) { if ($status == 1) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } return ""; diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index d4cbaac1bf49f..fd6495d28e7d5 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -386,33 +386,33 @@ public function LibStatut($status, $mode = 0) return $this->labelStatus[$status]; } elseif ($mode == 2) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } } elseif ($mode == 3) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } elseif ($mode == 4) { if ($status == 1) { - return img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } elseif ($status == 0) { - return img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; + return img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle').' '.$this->labelStatus[$status]; } } elseif ($mode == 5) { if ($status == 1) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } elseif ($mode == 6) { if ($status == 1) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut4', '', 0, 0, 0, '', 'valignmiddle'); } elseif ($status == 0) { - return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', false, 0, 0, '', 'valignmiddle'); + return $this->labelStatus[$status].' '.img_picto($this->labelStatus[$status], 'statut5', '', 0, 0, 0, '', 'valignmiddle'); } } return ""; diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 25b54b13ba67a..6cbb5f422f730 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2323,11 +2323,11 @@ print ' '; print ''.$langs->trans("UploadANewFileNow"); - print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', 0, 0, 0, '', 'marginleftonly'); print ''; if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) { print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); - print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', 0, 0, 0, '', 'marginleftonly'); print ''; } @@ -2478,11 +2478,11 @@ print ''; print ''; print ''.$langs->trans("UploadANewFileNow"); - print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print img_picto($langs->trans("UploadANewFileNow"), 'chevron-down', '', 0, 0, 0, '', 'marginleftonly'); print ''; if (!getDolGlobalString('EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES')) { print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); - print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); + print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', 0, 0, 0, '', 'marginleftonly'); print ''; } diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index e60a7d097252b..257fbca5e3fde 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -346,7 +346,7 @@ print ''; print ''; // if (!empty($val['picto'])) { - // print img_picto('', $val['picto'], '', false, 0, 0, '', 'pictofixedwidth'); + // print img_picto('', $val['picto'], '', 0, 0, 0, '', 'pictofixedwidth'); // } // if (in_array($val['type'], array('int', 'integer'))) { // $value = GETPOSTISSET($key) ? GETPOST($key, 'int') : $sk->$key; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 7eeca16cf0ee2..5f6caa42dbb24 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1029,7 +1029,7 @@ print '
'; print ''; $s = $langs->trans("SelectImportFieldsSource", '{s1}'); - $s = str_replace('{s1}', img_picto('', 'grip_title', '', false, 0, 0, '', '', 0), $s); + $s = str_replace('{s1}', img_picto('', 'grip_title', '', 0, 0, 0, '', '', 0), $s); print $s; print ' '; $htmlother->select_import_model($importmodelid, 'importmodelid', $datatoimport, 1, $user->id); diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 2a614ed16e0ac..652e554b08bc4 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2309,11 +2309,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http') { $logouthtmltext .= $langs->trans("Logout").'
'; $logouttext .= ''; - $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle'); + $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', 0, 0, 0, '', 'atoplogin valignmiddle'); $logouttext .= ''; } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); - $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', false, 0, 0, '', 'atoplogin valignmiddle opacitymedium'); + $logouttext .= img_picto($langs->trans('Logout').' ('.$stringforfirstkey.' l)', 'sign-out', '', 0, 0, 0, '', 'atoplogin valignmiddle opacitymedium'); } } @@ -3700,7 +3700,7 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu $ret .= '
'.$title.'
'; } $ret .= '
'; - $ret .= img_picto('', $img, '', false, 0, 0, '', 'paddingright width20'); + $ret .= img_picto('', $img, '', 0, 0, 0, '', 'paddingright width20'); $ret .= ''; - $linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1); + $linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', 0, 0, 0, '', '', 1); $linktoenabledisable .= ''; $linktoenabledisable .= $form->textwithpicto('', $langs->trans("Warning").' : '.$langs->trans("ModuleIsLive"), -1, 'warning'); @@ -3322,7 +3322,7 @@ function getLicenceHeader($user, $langs, $now) } else { if (is_object($moduleobj)) { $linktoenabledisable .= ''; - $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', false, 0, 0, '', 'classfortooltip', 1); + $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', 'style="padding-right: 8px"', 0, 0, 0, '', 'classfortooltip', 1); $linktoenabledisable .= "\n"; } } diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index acfac153f228d..67e49a82d3eb9 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -416,7 +416,7 @@ if (!empty($comments)) { foreach ($comments as $comment) { if ($user->hasRight('opensurvey', 'write')) { - print ' '.img_picto('', 'delete.png', '', false, 0, 0, '', '', 0).' '; + print ' '.img_picto('', 'delete.png', '', 0, 0, 0, '', '', 0).' '; } print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))."
"; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index ce744ace43ef8..b80ec4f864e4c 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -688,7 +688,7 @@ // loop to show the delete link if ($user->hasRight('opensurvey', 'write')) { for ($i = 0; isset($toutsujet[$i]); $i++) { - print ''."\n"; + print ''."\n"; } } @@ -835,7 +835,7 @@ print ''."\n"; if ($user->hasRight('opensurvey', 'write')) { - print ''."\n"; + print ''."\n"; } // Name @@ -1044,7 +1044,7 @@ } // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base - print ''."\n"; + print ''."\n"; print ''."\n"; } diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index ec005f9600ee4..36cd5bdb994a0 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -239,8 +239,8 @@ print $langs->trans('Status'); $formorder->selectOrderStatus($search_status, 1, 'search_status'); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print '
'; print '
'; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 3047847b24257..738314d306062 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -240,8 +240,8 @@ print $langs->trans('Status'); $formorder->selectSupplierOrderStatus($search_status, 1, 'search_status'); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index 9046187a4641e..cb967284491a7 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry + * Copyright (C) 2024 Frédéric France * * 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 @@ -313,8 +314,8 @@ print $hookmanager->resPrint; print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 8c99976e7b678..35f78bcb87535 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -221,8 +221,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stats/facturerec.php b/htdocs/product/stats/facturerec.php index 64f6402edd89e..a1d3d861002bf 100644 --- a/htdocs/product/stats/facturerec.php +++ b/htdocs/product/stats/facturerec.php @@ -237,8 +237,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 0de7a78eb6df6..5ed0dc2f98d6c 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -217,8 +217,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index c8a45dcdf5fb2..3e24565d79720 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -223,8 +223,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stock/stats/commande_fournisseur.php b/htdocs/product/stock/stats/commande_fournisseur.php index 52680fe20af60..d7bbfa4b032ab 100644 --- a/htdocs/product/stock/stats/commande_fournisseur.php +++ b/htdocs/product/stock/stats/commande_fournisseur.php @@ -5,6 +5,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024 Frédéric France * * 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 @@ -296,8 +297,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stock/stats/expedition.php b/htdocs/product/stock/stats/expedition.php index 31d1ee17f4641..a93aea4988d6a 100644 --- a/htdocs/product/stock/stats/expedition.php +++ b/htdocs/product/stock/stats/expedition.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2023 Gauthier VERDOL +/* Copyright (C) 2003-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2014 Florian Henry + * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024 Frédéric France * * 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 @@ -295,8 +296,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stock/stats/mo.php b/htdocs/product/stock/stats/mo.php index 5e26155ea5704..d0e7525f0f3ad 100644 --- a/htdocs/product/stock/stats/mo.php +++ b/htdocs/product/stock/stats/mo.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2021 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024 Frédéric France * * 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 @@ -237,8 +238,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/product/stock/stats/reception.php b/htdocs/product/stock/stats/reception.php index 2d1f23edc7ce1..03208c4807c36 100644 --- a/htdocs/product/stock/stats/reception.php +++ b/htdocs/product/stock/stats/reception.php @@ -5,6 +5,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2023 Gauthier VERDOL + * Copyright (C) 2024 Frédéric France * * 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 @@ -294,8 +295,8 @@ print $langs->trans('Month').': '; print $langs->trans('Year').':'.$formother->selectyear($search_year ? $search_year : - 1, 'search_year', 1, 20, 5); print '
'; - print ''; - print ''; + print ''; + print ''; print '
'; print ''; print ''; diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 9fdfe356f69ea..da31b0aeb2e3f 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -803,19 +803,19 @@ if ($object->status == $object::STATUS_SIGNED) { print '
'; if ($message == 'signed') { - print img_picto('', 'check', '', false, 0, 0, '', 'size2x').'
'; + print img_picto('', 'check', '', 0, 0, 0, '', 'size2x').'
'; print ''.$langs->trans("PropalSigned").''; } else { - print img_picto('', 'check', '', false, 0, 0, '', 'size2x').'
'; + print img_picto('', 'check', '', 0, 0, 0, '', 'size2x').'
'; print ''.$langs->trans("PropalAlreadySigned").''; } } elseif ($object->status == $object::STATUS_NOTSIGNED) { print '
'; if ($message == 'refused') { - print img_picto('', 'cross', '', false, 0, 0, '', 'size2x').'
'; + print img_picto('', 'cross', '', 0, 0, 0, '', 'size2x').'
'; print ''.$langs->trans("PropalRefused").''; } else { - print img_picto('', 'cross', '', false, 0, 0, '', 'size2x').'
'; + print img_picto('', 'cross', '', 0, 0, 0, '', 'size2x').'
'; print ''.$langs->trans("PropalAlreadyRefused").''; } } else { diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index 1ea0f68211d3c..67fcaa31cf6fd 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2014 Marcos García * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -713,7 +714,7 @@ } // Show button to add a new line into database - print ''."\n"; + print ''."\n"; print ''."\n"; } @@ -839,9 +840,9 @@ print '
'; if (in_array($obj->usercomment, $listofvoters)) { - print ' '.img_picto('', 'delete.png', '', false, 0, 0, '', 'nomarginleft').' '; + print ' '.img_picto('', 'delete.png', '', 0, 0, 0, '', 'nomarginleft').' '; } - //else print img_picto('', 'ellipsis-h', '', false, 0, 0, '', 'nomarginleft').' '; + //else print img_picto('', 'ellipsis-h', '', 0, 0, 0, '', 'nomarginleft').' '; print img_picto('', 'user', 'class="pictofixedwidth"').dol_htmlentities($obj->usercomment).': '.dol_nl2br(dol_htmlentities($obj->comment))."
"; } } diff --git a/htdocs/societe/notify/card.php b/htdocs/societe/notify/card.php index a61e640b7392c..6efc167055397 100644 --- a/htdocs/societe/notify/card.php +++ b/htdocs/societe/notify/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -303,11 +304,11 @@ print ''; print ''; - print img_picto('', 'contact', '', false, 0, 0, '', 'paddingright'); + print img_picto('', 'contact', '', 0, 0, 0, '', 'paddingright'); print $form->selectarray("contactid", $newlistofemails, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone'); print ''; print ''; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright'); + print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright'); print $form->selectarray("actionid", $actions, '', 1, 0, 0, '', 0, 0, 0, '', 'minwidth100imp maxwidthonsmartphone'); print ''; print ''; @@ -351,7 +352,7 @@ $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); print ''; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright').$label; print ''; print ''; if ($obj->type == 'email') { diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index dda526d3cf4f8..99aa69d34dcdb 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2013-2015 Jean-François FERRY * Copyright (C) 2016 Christophe Battarel * Copyright (C) 2024 Destailleur Laurent + * Copyright (C) 2024 Frédéric France * * 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 @@ -490,7 +491,7 @@ public function viewStatusActions(Ticket $object) print ''; print $object->LibStatut($status, 3, 1).' '; - //print img_picto($langs->trans($object->labelStatusShort[$status]), 'statut'.$status.'.png@ticket', '', false, 0, 0, '', 'valignmiddle').' '; + //print img_picto($langs->trans($object->labelStatusShort[$status]), 'statut'.$status.'.png@ticket', '', 0, 0, 0, '', 'valignmiddle').' '; print $langs->trans($object->labelStatusShort[$status]); print ''; print ''; diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index cc6ec1c56f1d3..070c02063ee29 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -1159,7 +1159,7 @@ $creation_date = $object->datec; $hour_diff_creation = ($now - $creation_date) / 3600 ; if ($hour_diff_creation > getDolGlobalInt('TICKET_DELAY_BEFORE_FIRST_RESPONSE')) { - print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', getDolGlobalString('TICKET_DELAY_BEFORE_FIRST_RESPONSE')), 'warning', 'style="color: red;"', false, 0, 0, '', ''); + print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', getDolGlobalString('TICKET_DELAY_BEFORE_FIRST_RESPONSE')), 'warning', 'style="color: red;"', 0, 0, 0, '', ''); } } elseif (getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE') && $hour_diff > getDolGlobalInt('TICKET_DELAY_SINCE_LAST_RESPONSE')) { print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', getDolGlobalString('TICKET_DELAY_SINCE_LAST_RESPONSE')), 'warning'); diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 57fe8bcf9334a..024b34d7b061c 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -312,7 +312,7 @@ } print ''; print ''; - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); + print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright').$form->selectarray("actionid", $actions, '', 1); print ''; print ''; $type = array('email' => $langs->trans("EMail")); @@ -357,7 +357,7 @@ print ''; print ''; $label = ($langs->trans("Notify_".$obj->code) != "Notify_".$obj->code ? $langs->trans("Notify_".$obj->code) : $obj->label); - print img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').$label; + print img_picto('', 'object_action', '', 0, 0, 0, '', 'paddingright').$label; print ''; print ''; if ($obj->type == 'email') { diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 1f5736228eecf..0f318cf1ca19b 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -6,7 +6,8 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2020 Tobias Sekan - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -604,7 +605,7 @@ print ''.img_picto($langs->trans("AdministratorDesc"), 'star').''; } else { print ''; - print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium'); + print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium'); print ''; } print ''; @@ -619,7 +620,7 @@ print ''; } else { print ''; - print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium'); + print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium'); print ''; } print ''; @@ -628,7 +629,7 @@ print ''; if (in_array($obj->id, $permsgroupbyentitypluszero)) { // Permission granted by group print ''; - print img_picto($langs->trans("Active"), 'switch_on', '', false, 0, 0, '', 'opacitymedium'); + print img_picto($langs->trans("Active"), 'switch_on', '', 0, 0, 0, '', 'opacitymedium'); //print img_picto($langs->trans("Active"), 'tick'); print ''; print ''; @@ -644,7 +645,7 @@ print ''; } else { print ''; - print img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', 'opacitymedium'); + print img_picto($langs->trans("Disabled"), 'switch_off', '', 0, 0, 0, '', 'opacitymedium'); print ''; } print ''; @@ -661,7 +662,7 @@ print ''; } else { print ''; - print img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', 'opacitymedium'); + print img_picto($langs->trans("Disabled"), 'switch_off', '', 0, 0, 0, '', 'opacitymedium'); print ''; } print ''; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 13da613ff2902..11a8fd2bf8d5f 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3444,9 +3444,9 @@ print ''; @@ -3600,13 +3600,13 @@ function switchEditorOnline(forceenable) $disableeditinline = 0; if ($disableeditinline) { //print ''; - print ''.img_picto($langs->trans("OnlyEditionOfSourceForGrabbedContent"), 'switch_off', '', false, 0, 0, '', 'nomarginleft').''; + print ''.img_picto($langs->trans("OnlyEditionOfSourceForGrabbedContent"), 'switch_off', '', 0, 0, 0, '', 'nomarginleft').''; } else { //print ''; if (!getDolGlobalString('WEBSITE_EDITINLINE')) { - print ''.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').''; + print ''.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', 0, 0, 0, '', 'nomarginleft').''; } else { - print ''.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', false, 0, 0, '', 'nomarginleft').''; + print ''.img_picto($langs->trans("EditInLineOnOff", $langs->transnoentitiesnoconv("On")), 'switch_on', '', 0, 0, 0, '', 'nomarginleft').''; } } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7173724b82f3f..9eac701b685be 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -85,7 +85,6 @@ parameters: - '# (print_projecttasks(_array)?|dol_time_plus_duree|get_default_tva|get_default_npr) expects int, array#' - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_get_first_day|dol_get_last_day|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' - - "# (img_picto) expects int<0, 1>, (false|'') given.#" - '#expects float\|string#' - '#expects float\|null#' - '#expects float, string given.#' From 3d3cdc51f2bcf6e7b2ebc1db5c097f1e73a626a5 Mon Sep 17 00:00:00 2001 From: Nicolas Bouquet Date: Wed, 25 Sep 2024 22:41:52 +0200 Subject: [PATCH 019/329] Ensure $id is available fot object fetching (#31098) --- htdocs/delivery/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index 0d7bda4986d87..a8743a38a9fd6 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -60,6 +60,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); +$id = GETPOSTINT('id'); // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context @@ -81,7 +82,6 @@ $error = 0; // Security check -$id = GETPOSTINT('id'); if ($user->socid) { $socid = $user->socid; } From 4cd799adfa860d716e866250b72397a826b1c178 Mon Sep 17 00:00:00 2001 From: Nicolas Bouquet Date: Wed, 25 Sep 2024 22:41:52 +0200 Subject: [PATCH 020/329] Ensure $id is available fot object fetching (#31098) --- htdocs/delivery/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/delivery/card.php b/htdocs/delivery/card.php index 909a7078dc9d2..d8633ef696526 100644 --- a/htdocs/delivery/card.php +++ b/htdocs/delivery/card.php @@ -59,6 +59,7 @@ $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); +$id = GETPOSTINT('id'); $object = new Delivery($db); $extrafields = new ExtraFields($db); @@ -78,7 +79,6 @@ $error = 0; // Security check -$id = GETPOSTINT('id'); if ($user->socid) { $socid = $user->socid; } From 11352fefce4c729e1d9479dd0bd55e9b17164f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Sep 2024 22:45:23 +0200 Subject: [PATCH 021/329] fix phpstan (#31094) * fix phpstan * fix phpstan --- htdocs/public/bookcal/index.php | 2 +- phpstan.neon.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/bookcal/index.php b/htdocs/public/bookcal/index.php index fe941cda62e28..f4bc0a324d698 100644 --- a/htdocs/public/bookcal/index.php +++ b/htdocs/public/bookcal/index.php @@ -242,7 +242,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ } if (!$error) { - $dateend = dol_time_plus_duree(GETPOSTINT("datetimebooking"), GETPOST("durationbooking"), 'i'); + $dateend = dol_time_plus_duree(GETPOSTINT("datetimebooking"), GETPOSTINT("durationbooking"), 'i'); $actioncomm->label = $langs->trans("BookcalBookingTitle"); $actioncomm->type = 'AC_RDV'; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 9eac701b685be..3bbd3503e02c3 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -82,7 +82,7 @@ parameters: - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#' - '#::saveboxorder\(\) expects int, array#' - - '# (print_projecttasks(_array)?|dol_time_plus_duree|get_default_tva|get_default_npr) expects int, array#' + - '# (print_projecttasks(_array)?|get_default_tva|get_default_npr) expects int, array#' - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_get_first_day|dol_get_last_day|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' - '#expects float\|string#' From 28df02f039d4aec2ec2e9215734e0595eb13b256 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 25 Sep 2024 22:52:25 +0200 Subject: [PATCH 022/329] FIX avoid odt errors (#31126) --- htdocs/core/class/commondocgenerator.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index bb344ac7d8a22..37700574114d6 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -346,6 +346,10 @@ public function get_substitutionarray_thirdparty($object, $outputlangs, $array_k // phpcs:enable global $extrafields; + if (!is_object($object)) { + return array(); + } + if (empty($object->country) && !empty($object->country_code)) { $object->country = $outputlangs->transnoentitiesnoconv("Country".$object->country_code); } @@ -954,7 +958,7 @@ public function fill_substitutionarray_with_extrafields($object, $array_to_fill, // phpcs:enable global $conf; - if (is_array($extrafields->attributes[$object->table_element]['label'])) { + if (isset($extrafields->attributes[$object->table_element]) && is_array($extrafields->attributes[$object->table_element]) && is_array($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { $formatedarrayoption = $object->array_options; From e4a93da82ed2da43f9ee5ed05e0d4bbfa581a53a Mon Sep 17 00:00:00 2001 From: lvessiller-opendsi Date: Wed, 25 Sep 2024 22:54:31 +0200 Subject: [PATCH 023/329] FIX mysql error during dump for enable sandbox M999999 (#31116) --- htdocs/core/class/utils.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 6f75db0b150a3..e78cf55d34449 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -532,13 +532,13 @@ public function dumpDatabase($compression = 'none', $type = 'auto', $usedefault } elseif ($compression == 'zstd') { fclose($handle); } - if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error + if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error $errormsg = ''; } else { - // Renommer fichier sortie en fichier erreur + // Rename file out into a file error //print "$outputfile -> $outputerror"; @dol_delete_file($outputerror, 1, 0, 0, null, false, 0); - @rename($outputfile, $outputerror); + @dol_move($outputfile, $outputerror, '0', 1, 0, 0); // Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide if (!$errormsg) { $langs->load("errors"); From 1640fa801749299223f907966e19f35c54e925e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 25 Sep 2024 22:56:28 +0200 Subject: [PATCH 024/329] fix phpstan (#31093) * fix phpstan * fix phpstan * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur --- htdocs/compta/localtax/clients.php | 6 +++--- htdocs/compta/stats/cabyprodserv.php | 4 ++-- .../movement/doc/pdf_standard_movementstock.modules.php | 4 ++-- phpstan.neon.dist | 3 +-- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index f69a32bdd3c0c..8e22f8dae98ce 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -1,8 +1,8 @@ * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2018 Frédéric France - * Copyright (C) 2024 MDW + * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -54,7 +54,7 @@ if (empty($q)) { if (GETPOST("month")) { $date_start = dol_get_first_day($year_start, GETPOST("month"), false); - $date_end = dol_get_last_day($year_start, GETPOST("month"), false); + $date_end = dol_get_last_day($year_start, GETPOSTINT("month"), false); } else { $date_start = dol_get_first_day($year_start, !getDolGlobalInt('SOCIETE_FISCAL_MONTH_START') ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (!getDolGlobalString('MAIN_INFO_VAT_RETURN') || getDolGlobalInt('MAIN_INFO_VAT_RETURN') == 2) { diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 8d84c797a6b18..64c22e5eea440 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -88,8 +88,8 @@ } // Date range -$year = GETPOST("year"); -$month = GETPOST("month"); +$year = GETPOSTINT("year"); +$month = GETPOSTINT("month"); $date_startyear = GETPOST("date_startyear"); $date_startmonth = GETPOST("date_startmonth"); $date_startday = GETPOST("date_startday"); diff --git a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php index 21045e9ec2106..9e64261ba5182 100644 --- a/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php +++ b/htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php @@ -166,8 +166,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'movementlist'; $idproduct = GETPOSTINT('idproduct'); - $year = GETPOST("year"); - $month = GETPOST("month"); + $year = GETPOSTINT("year"); + $month = GETPOSTINT("month"); $search_ref = GETPOST('search_ref', 'alpha'); $search_movement = GETPOST("search_movement"); $search_product_ref = trim(GETPOST("search_product_ref")); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3bbd3503e02c3..49f349271419e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -82,8 +82,7 @@ parameters: - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#' - '#::saveboxorder\(\) expects int, array#' - - '# (print_projecttasks(_array)?|get_default_tva|get_default_npr) expects int, array#' - - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_get_first_day|dol_get_last_day|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' + - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_get_first_day|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' - '#expects float\|string#' - '#expects float\|null#' From 22729516fe001612133c7c02a4c63c4ea079245d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Cendrier?= <81741011+altairis-noe@users.noreply.github.com> Date: Wed, 25 Sep 2024 23:18:16 +0200 Subject: [PATCH 025/329] NEW Add mode Customer price + level price (#31091) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * NEW: customer price and level price together * NEW: translation * FIX: If a price per customer exist * FIX: do not use default price if the customer price and level price option is active * Don't display the price level amount if the customer price is known * FIX: double check and php cs correction * FIX: vatrate call * FIX: get_htmloutput_msg call --------- Co-authored-by: Mélina JOUM --- htdocs/comm/card.php | 2 +- htdocs/comm/propal/card.php | 51 +- htdocs/commande/card.php | 52 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/conf.class.php | 2 +- htdocs/core/class/html.form.class.php | 14 +- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/pdf.lib.php | 4 +- htdocs/langs/en_US/products.lang | 1 + htdocs/langs/fr_FR/products.lang | 1 + htdocs/product/admin/product.php | 5 + htdocs/product/ajax/products.php | 8 +- htdocs/product/card.php | 2 +- htdocs/product/class/product.class.php | 56 +- htdocs/product/price.php | 886 +++++++++++------------ htdocs/societe/class/societe.class.php | 4 +- htdocs/societe/list.php | 4 +- htdocs/societe/price.php | 4 +- 18 files changed, 623 insertions(+), 477 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 260f4ea73414e..9936beaae5ff2 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -530,7 +530,7 @@ // Multiprice level - if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { print ''; print ''; print ''; diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 7cca33a775f31..a0c379f078a81 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -112,7 +112,7 @@ if (getDolGlobalInt('MAIN_MULTILANGS') && getDolGlobalString('PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE')) { $needchangeaccordingtothirdparty = 1; } - if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { $needchangeaccordingtothirdparty = 1; } if ($needchangeaccordingtothirdparty) { @@ -135,7 +135,7 @@ } //Set price level according to thirdparty - if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { $price_level = $thirdpartytemp->price_level; } } @@ -167,7 +167,7 @@ } // Multiprice (1 price per level) - if (!$found && isset($price_level) && $price_level >= 1 && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'))) { // If we need a particular price level (from 1 to 6) + if (!$found && isset($price_level) && $price_level >= 1 && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'))) { // If we need a particular price level (from 1 to 6) $sql = "SELECT price, price_ttc, price_base_type,"; $sql .= " tva_tx, default_vat_code"; // Vat rate and code will be used if PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL is on. $sql .= " FROM ".MAIN_DB_PREFIX."product_price "; @@ -200,7 +200,7 @@ } // Price by customer - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') && !empty($socid)) { + if ((getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($socid)) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; $prodcustprice = new ProductCustomerPrice($db); diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 77f511c6e48df..bf905a1b9dda6 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1748,7 +1748,7 @@ print '
'; if (!getDolGlobalString('PRODUCT_DISABLE_PRICES')) { - if (getDolGlobalString('PRODUIT_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { // We do no show price array on create when multiprices enabled. // We must set them on prices tab. print '
'; print $langs->trans("PriceLevel"); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index d6a78f296c735..18e118a614e78 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1137,8 +1137,51 @@ $price_min_ttc = $prod->price_min_ttc; $price_base_type = $prod->price_base_type; - // If price per segment - if (getDolGlobalString('PRODUIT_MULTIPRICES') && $object->thirdparty->price_level) { + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + // If price per customer + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + $prodcustprice = new ProductCustomerPrice($db); + $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); + + // If a price per customer exist + $pricebycustomerexist = false; + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); + if ($result) { + // If there is some prices specific to the customer + if (count($prodcustprice->lines) > 0) { + $pricebycustomerexist = true; + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_min = price($prodcustprice->lines[0]->price_min); + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + /*$tva_tx = ($prodcustprice->lines[0]->default_vat_code ? $prodcustprice->lines[0]->tva_tx.' ('.$prodcustprice->lines[0]->default_vat_code.' )' : $prodcustprice->lines[0]->tva_tx); + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) { + $tva_npr = 0; + }*/ + } + } + + if ( !$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment + $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; + $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; + $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; + $price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level]; + $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; + if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { // using this option is a bug. kept for backward compatibility + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { + $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; + } + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) { + $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + } + } + } + } elseif (getDolGlobalString('PRODUIT_MULTIPRICES') && $object->thirdparty->price_level) { // If price per segment $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; @@ -1549,11 +1592,11 @@ $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); $price_min = $product->price_min; - if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { $price_min = $product->multiprices_min[$object->thirdparty->price_level]; } $price_min_ttc = $product->price_min_ttc; - if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { $price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level]; } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 9e1b721b58f08..71dc431ec52a1 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -839,6 +839,54 @@ $price_min_ttc = $prod->price_min_ttc; $price_base_type = $prod->price_base_type; + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + // If price per customer + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + + $prodcustprice = new ProductCustomerPrice($db); + + $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); + + // If a price per customer exist + $pricebycustomerexist = false; + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); + if ($result >= 0) { + if (count($prodcustprice->lines) > 0) { + $pricebycustomerexist = true; + $pu_ht = price($prodcustprice->lines[0]->price); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_min = price($prodcustprice->lines[0]->price_min); + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) { + $tva_npr = 0; + } + } + } else { + setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); + } + + if ( !$pricebycustomerexist && !empty($object->thirdparty->price_level)) { //// If price per segment + $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; + $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; + $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; + $price_min_ttc = $prod->multiprices_min_ttc[$object->thirdparty->price_level]; + $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; + if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { // using this option is a bug. kept for backward compatibility + if (isset($prod->multiprices_tva_tx[$object->thirdparty->price_level])) { + $tva_tx = $prod->multiprices_tva_tx[$object->thirdparty->price_level]; + } + if (isset($prod->multiprices_recuperableonly[$object->thirdparty->price_level])) { + $tva_npr = $prod->multiprices_recuperableonly[$object->thirdparty->price_level]; + } + } + } + } // If price per segment if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($object->thirdparty->price_level)) { $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; @@ -1241,11 +1289,11 @@ $type = $product->type; $price_min = $product->price_min; - if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { $price_min = $product->multiprices_min[$object->thirdparty->price_level]; } $price_min_ttc = $product->price_min_ttc; - if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($object->thirdparty->price_level)) { $price_min_ttc = $product->multiprices_min_ttc[$object->thirdparty->price_level]; } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8c7d624c50c26..18c3017d9731c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1893,7 +1893,7 @@ public function fetch_thirdparty($force_thirdparty_id = 0) $this->thirdparty = $thirdparty; // Use first price level if level not defined for third party - if (getDolGlobalString('PRODUIT_MULTIPRICES') && empty($this->thirdparty->price_level)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && empty($this->thirdparty->price_level)) { $this->thirdparty->price_level = 1; } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index e69628e64e095..961fa9f686e7d 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -1041,7 +1041,7 @@ public function setValues($db) $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? (int) $this->global->MAIN_DELAY_HOLIDAYS : 0) * 86400; } - if (!empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) { + if ((!empty($this->global->PRODUIT_MULTIPRICES) || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) { $this->global->PRODUIT_MULTIPRICES_LIMIT = 5; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6600ddcf9da69..8ab62d55d6b4e 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2949,7 +2949,7 @@ public function select_produits_list($selected = 0, $htmlname = 'productid', $fi } //Price by customer - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') && !empty($socid)) { + if ((getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($socid)) { $sql .= ', pcp.rowid as idprodcustprice, pcp.price as custprice, pcp.price_ttc as custprice_ttc,'; $sql .= ' pcp.price_base_type as custprice_base_type, pcp.tva_tx as custtva_tx, pcp.default_vat_code as custdefault_vat_code, pcp.ref_customer as custref'; $selectFields .= ", idprodcustprice, custprice, custprice_ttc, custprice_base_type, custtva_tx, custdefault_vat_code, custref"; @@ -3007,7 +3007,7 @@ public function select_produits_list($selected = 0, $htmlname = 'productid', $fi } //Price by customer - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') && !empty($socid)) { + if ((getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($socid)) { $sql .= " LEFT JOIN " . $this->db->prefix() . "product_customer_price as pcp ON pcp.fk_soc=" . ((int) $socid) . " AND pcp.fk_product=p.rowid"; } // Units @@ -3087,7 +3087,7 @@ public function select_produits_list($selected = 0, $htmlname = 'productid', $fi if (getDolGlobalInt('MAIN_MULTILANGS')) { $sql .= " OR pl.label LIKE '" . $this->db->escape($prefix . $crit) . "%'"; } - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') && !empty($socid)) { + if ((getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($socid)) { $sql .= " OR pcp.ref_customer LIKE '" . $this->db->escape($prefix . $crit) . "%'"; } if (getDolGlobalString('PRODUCT_AJAX_SEARCH_ON_DESCRIPTION')) { @@ -3223,7 +3223,9 @@ public function select_produits_list($selected = 0, $htmlname = 'productid', $fi $objp->price_ttc = price2num($objp->price_ttc, 'MU'); } } - + if (getDolGlobalInt('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES') && !empty($objp->custprice)) { + $price_level = ''; + } $this->constructProductListOption($objp, $opt, $optJson, $price_level, $selected, $hidepriceinlabel, $filterkey); // Add new entry // "key" value of json key array is used by jQuery automatically as selected value @@ -3445,7 +3447,7 @@ protected function constructProductListOption(&$objp, &$opt, &$optJson, $price_l $labeltoshowprice = ''; $labeltoshowhtmlprice = ''; // If we need a particular price level (from 1 to n) - if (empty($hidepriceinlabel) && $price_level >= 1 && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'))) { + if (empty($hidepriceinlabel) && $price_level >= 1 && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'))) { $sql = "SELECT price, price_ttc, price_base_type, tva_tx, default_vat_code"; $sql .= " FROM " . $this->db->prefix() . "product_price"; $sql .= " WHERE fk_product = " . ((int) $objp->rowid); @@ -3516,7 +3518,7 @@ protected function constructProductListOption(&$objp, &$opt, &$optJson, $price_l } // Price by customer - if (empty($hidepriceinlabel) && getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { + if (empty($hidepriceinlabel) && (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'))) { if (!empty($objp->idprodcustprice)) { $found = 1; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index f687e80cab101..e1e369bbbb0a2 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -121,7 +121,7 @@ function societe_prepare_head(Societe $object) $head[$h][2] = 'customer'; $h++; - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { $langs->load("products"); // price $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 8a5d3f6c7d1df..57cb50e6a7e8a 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1506,7 +1506,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $prodser = new Product($db); - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { include_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; } } @@ -1685,7 +1685,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, } else { $ref_prodserv = $prodser->ref; // Show local ref only - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { $productCustomerPriceStatic = new ProductCustomerPrice($db); $filter = array('fk_product' => $idprod, 'fk_soc' => $object->socid); diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 7181b24d39b76..0b8825cf058b3 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -437,3 +437,4 @@ AllowStockMovementVariantParentHelp=By default, a parent of a variant is a virtu ConfirmSetToDraftInventory=Are you sure you want to go back to Draft status?
The quantities currently set in the inventory will be reset. WarningLineProductNotToSell=Product or service "%s" is not to sell and was cloned PriceLabel=Price label +PriceByCustomeAndMultiPricesAbility=Different prices for each customer + Multiple price segments per product/service (each customer is in one price segment) diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 3a1c8f85c41fe..dc4f4dce330d3 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -437,3 +437,4 @@ AllowStockMovementVariantParentHelp=Par défaut, un parent d'une variante est un ConfirmSetToDraftInventory=Êtes-vous sûr de vouloir revenir à l'état de brouillon ?
Les quantités actuellement définies dans l'inventaire seront réinitialisées. WarningLineProductNotToSell=Le produit ou le service "%s" n'est pas à vendre et a été cloné. PriceLabel=Libellé du prix +PriceByCustomeAndMultiPricesAbility=Prix différents pour chaque client + Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau) diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 7608a84cbe10b..c3f56c1e2b982 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -59,6 +59,7 @@ 'PRODUCT_PRICE_UNIQ' => $langs->trans('PriceCatalogue'), // Unique price 'PRODUIT_MULTIPRICES' => $langs->trans('MultiPricesAbility'), // Several prices according to a customer level 'PRODUIT_CUSTOMER_PRICES' => $langs->trans('PriceByCustomer'), // Different price for each customer + 'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'=>$langs->trans('PriceByCustomeAndMultiPricesAbility'), // Different price for each customer and several prices according to a customer level ); $keyforparam = 'PRODUIT_CUSTOMER_PRICES_BY_QTY'; if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 1 || getDolGlobalString($keyforparam)) { @@ -113,6 +114,7 @@ $res = dolibarr_set_const($db, 'PRODUIT_MULTIPRICES', 0, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, 'PRODUIT_CUSTOMER_PRICES_BY_QTY', 0, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, 'PRODUIT_CUSTOMER_PRICES', 0, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES', 0, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'PRODUCT_PRICE_UNIQ', 1, 'chaine', 0, '', $conf->entity); } else { $multirule = explode('&', $princingrules); @@ -587,6 +589,9 @@ if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { $current_rule = 'PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'; } +if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + $current_rule = 'PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES'; +} print $form->selectarray("princingrule", $select_pricing_rules, $current_rule, 0, 0, 0, '', 1, 0, 0, '', 'maxwidth400', 1); print '
'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index b526c465d7904..53431f38463d3 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2276,8 +2276,54 @@ public function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp = 0) $price_min = $this->price_min; $price_base_type = $this->price_base_type; - // If price per segment - if (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($thirdparty_buyer->price_level)) { + // if price by customer / level + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + + $prodcustprice = new ProductCustomerPrice($this->db); + + $filter = array('t.fk_product' => $this->id, 't.fk_soc' => $thirdparty_buyer->id); + + // If a price per customer exist + $pricebycustomerexist = false; + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); + if ($result) { + if (count($prodcustprice->lines) > 0) { + $pricebycustomerexist = true; + $pu_ht = price($prodcustprice->lines[0]->price); + $price_min = price($prodcustprice->lines[0]->price_min); + $pu_ttc = price($prodcustprice->lines[0]->price_ttc); + $price_base_type = $prodcustprice->lines[0]->price_base_type; + $tva_tx = $prodcustprice->lines[0]->tva_tx; + if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { + $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; + } + $tva_npr = $prodcustprice->lines[0]->recuperableonly; + if (empty($tva_tx)) { + $tva_npr = 0; + } + } + } + + if ( !$pricebycustomerexist && !empty($thirdparty_buyer->price_level)) { + $pu_ht = $this->multiprices[$thirdparty_buyer->price_level]; + $pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level]; + $price_min = $this->multiprices_min[$thirdparty_buyer->price_level]; + $price_base_type = $this->multiprices_base_type[$thirdparty_buyer->price_level]; + if (getDolGlobalString('PRODUIT_MULTIPRICES_USE_VAT_PER_LEVEL')) { + // using this option is a bug. kept for backward compatibility + if (isset($this->multiprices_tva_tx[$thirdparty_buyer->price_level])) { + $tva_tx = $this->multiprices_tva_tx[$thirdparty_buyer->price_level]; + } + if (isset($this->multiprices_recuperableonly[$thirdparty_buyer->price_level])) { + $tva_npr = $this->multiprices_recuperableonly[$thirdparty_buyer->price_level]; + } + if (empty($tva_tx)) { + $tva_npr = 0; + } + } + } + } elseif (getDolGlobalString('PRODUIT_MULTIPRICES') && !empty($thirdparty_buyer->price_level)) { // // If price per segment $pu_ht = $this->multiprices[$thirdparty_buyer->price_level]; $pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level]; $price_min = $this->multiprices_min[$thirdparty_buyer->price_level]; @@ -2576,7 +2622,7 @@ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $ne // If multiprices are enabled, then we check if the current product is subject to price autogeneration // Price will be modified ONLY when the first one is the one that is being modified - if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !$ignore_autogen && $this->price_autogen && ($level == 1)) { + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !$ignore_autogen && $this->price_autogen && ($level == 1)) { return $this->generateMultiprices($user, $newprice, $newpricebase, $newvat, $newnpr, $newpbq); } @@ -2976,7 +3022,7 @@ public function fetch($id = 0, $ref = '', $ref_ext = '', $barcode = '', $ignore_ } // Load multiprices array - if (getDolGlobalString('PRODUIT_MULTIPRICES') && empty($ignore_price_load)) { // prices per segment + if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && empty($ignore_price_load)) { // prices per segment $produit_multiprices_limit = getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT'); for ($i = 1; $i <= $produit_multiprices_limit; $i++) { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; @@ -3042,7 +3088,7 @@ public function fetch($id = 0, $ref = '', $ref_ext = '', $barcode = '', $ignore_ return -1; } } - } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') && empty($ignore_price_load)) { // prices per customers + } elseif ((getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && empty($ignore_price_load)) { // prices per customers // Nothing loaded by default. List may be very long. } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY') && empty($ignore_price_load)) { // prices per quantity $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 9f993cb92719a..8e1bd9f562a48 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -43,7 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; -if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { +if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; $prodcustprice = new ProductCustomerPrice($db); @@ -76,7 +76,7 @@ } // Clean param -if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) && !getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT')) { +if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT')) { $conf->global->PRODUIT_MULTIPRICES_LIMIT = 5; } @@ -204,7 +204,7 @@ } if (!$error) { - if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); for ($i = 1; $i <= $produit_multiprices_limit; $i++) { // Force the update of the price of the product using the new VAT @@ -261,7 +261,7 @@ $action = ''; } - if (($action == 'update_price') && !$cancel && $object->getRights()->creer) { + if (($action == 'update_price' || $action == 'update_level_price') && !$cancel && $object->getRights()->creer) { $error = 0; $pricestoupdate = array(); @@ -285,7 +285,7 @@ } // Multiprices - if (!$error && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES'))) { + if (!$error && (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || ($action == 'update_level_price' && getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')))) { $newprice = GETPOST('price', 'array'); $newprice_min = GETPOST('price_min', 'array'); $newpricebase = GETPOST('multiprices_base_type', 'array'); @@ -916,7 +916,7 @@ print '
'; // Price per customer segment/level -if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { +if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { // Price and min price are variable (depends on level of company). if (!empty($socid)) { $soc = new Societe($db); @@ -1375,7 +1375,7 @@ print ''; } } else { - if (!getDolGlobalString('PRODUIT_MULTIPRICES') && !getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (!getDolGlobalString('PRODUIT_MULTIPRICES') && !getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') && !getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { print ''; } else { @@ -1383,7 +1383,7 @@ } } - if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { print ''; } else { @@ -1391,7 +1391,7 @@ } } - if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { print ''; } else { @@ -1399,7 +1399,7 @@ } if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { - print ''; + print ''; } else { print '
' . $langs->trans("UpdateLevelPrices") . '
'; } @@ -1442,11 +1442,11 @@ print '

'; } -if ($action == 'edit_price' && $object->getRights()->creer) { +if (($action == 'edit_price' || $action == 'edit_level_price') && $object->getRights()->creer) { print '
'; print load_fiche_titre($langs->trans("NewPrice"), ''); - if (!getDolGlobalString('PRODUIT_MULTIPRICES') && !getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { + if (!getDolGlobalString('PRODUIT_MULTIPRICES') && $action != 'edit_level_price') { print ''."\n"; print ''; print ''; @@ -1559,7 +1559,7 @@ function on_change() { print $form->buttonsSaveCancel(); print ''; - } else { + } elseif ($action == 'edit_level_price' && $object->getRights()->creer) { print ''."\n"; ?> '; print ''; From 25754d87c98d5f3204bd29ec8926e2119ad75849 Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:38:38 +0200 Subject: [PATCH 076/329] FIX : FATAL ERROR abusively triggered due to incomplete regex (#31052) * Fix regex detection * New regular expression to include offset --- htdocs/core/db/DoliDB.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 8895cdf83ec87..507e88c57e9c5 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -421,7 +421,7 @@ public function getRow($sql) */ public function getRows($sql) { - if (!preg_match('/LIMIT \d+$/', $sql)) { + if (!preg_match('/LIMIT \d+(?:(?:,\ *\d*)|(?:\ +OFFSET\ +\d*))?\ *;?$/', $sql)) { trigger_error(__CLASS__ .'::'.__FUNCTION__.'() query must have a LIMIT clause', E_USER_ERROR); } From fdb885f0a326597f3f53afe20be6d352d41fa391 Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Thu, 26 Sep 2024 22:46:20 +0200 Subject: [PATCH 077/329] Warehouse list display mode (#31013) Co-authored-by: Laurent Destailleur --- htdocs/product/class/html.formproduct.class.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index a440abd34715c..8b45888d3ea85 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -235,7 +235,10 @@ public function loadWorkstations($fk_product = 0, $exclude = array(), $orderBy = // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return full path to current warehouse in $tab (recursive function) - * + * Set Hidden conf MAIN_WAREHOUSE_LIST_DISPLAY_MODE at 0 || 1 || 2 to unlock display + * 0 : Default behavior, display parents of warehouse + * 1 : Display only current warehouse label only + * 2 : Display last parent warehouse label * @param array $tab warehouse data in $this->cache_warehouses line * @param string $final_label full label with all parents, separated by ' >> ' (completed on each call) * @return string full label with all parents, separated by ' >> ' @@ -247,11 +250,14 @@ private function get_parent_path($tab, $final_label = '') $final_label = $tab['label']; } - if (empty($tab['parent_id'])) { + if (empty($tab['parent_id']) || getDolGlobalInt('MAIN_WAREHOUSE_LIST_DISPLAY_MODE') === 1) { return $final_label; } else { if (!empty($this->cache_warehouses[$tab['parent_id']])) { - $final_label = $this->cache_warehouses[$tab['parent_id']]['label'].' >> '.$final_label; + if (getDolGlobalInt('MAIN_WAREHOUSE_LIST_DISPLAY_MODE') !== 2 || (getDolGlobalInt('MAIN_WAREHOUSE_LIST_DISPLAY_MODE') === 2 && empty($this->cache_warehouses[$tab['parent_id']]['parent_id']))) { + $final_label = $this->cache_warehouses[$tab['parent_id']]['label'] . ' >> ' . $final_label; + } + return $this->get_parent_path($this->cache_warehouses[$tab['parent_id']], $final_label); } } From 797957dfd3fa13e738efe583aa0815ed184524e1 Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Thu, 26 Sep 2024 22:46:50 +0200 Subject: [PATCH 078/329] work on date edit event (#31112) Co-authored-by: Laurent Destailleur --- htdocs/comm/action/card.php | 47 ++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 5fffaba863610..cf7f82f83d21c 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1227,7 +1227,29 @@ function setdatefields() console.log("setdatefields"); setdatefields(); }); - + var old_startdate = null; + $("#ap").focus(function() { + old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + }); + $("#ap").next(".ui-datepicker-trigger").click(function() { + old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + }); + $("#ap").change(function() { + setTimeout(function() { + if ($("#p2").val() !== "") { + var new_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + var old_enddate = new Date($("#p2year").val(), $("#p2month").val() - 1, $("#p2day").val()); + if (new_startdate > old_enddate) { + var timeDiff = old_enddate - old_startdate; + var new_enddate = new Date(new_startdate.getTime() + timeDiff); + $("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '")); + $("#p2day").val(new_enddate.getDate()); + $("#p2month").val(new_enddate.getMonth() + 1); + $("#p2year").val(new_enddate.getFullYear()); + } + } + }, 0); + }); $("#actioncode").change(function() { if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired"); else $("#dateend").removeClass("fieldrequired"); @@ -1819,6 +1841,29 @@ function setdatefields() $("#fullday").change(function() { setdatefields(); }); + var old_startdate = null; + $("#ap").focus(function() { + old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + }); + $("#ap").next(".ui-datepicker-trigger").click(function() { + old_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + }); + $("#ap").change(function() { + setTimeout(function() { + if ($("#p2").val() !== "") { + var new_startdate = new Date($("#apyear").val(), $("#apmonth").val() - 1, $("#apday").val()); + var old_enddate = new Date($("#p2year").val(), $("#p2month").val() - 1, $("#p2day").val()); + if (new_startdate > old_enddate) { + var timeDiff = old_enddate - old_startdate; + var new_enddate = new Date(new_startdate.getTime() + timeDiff); + $("#p2").val(formatDate(new_enddate, "' . $langs->trans('FormatDateShortJavaInput') . '")); + $("#p2day").val(new_enddate.getDate()); + $("#p2month").val(new_enddate.getMonth() + 1); + $("#p2year").val(new_enddate.getFullYear()); + } + } + }, 0); + }); $("#actioncode").change(function() { if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired"); else $("#dateend").removeClass("fieldrequired"); From 4a25c289681f9a8b39501b864e1a21cb3a34435a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 26 Sep 2024 22:57:35 +0200 Subject: [PATCH 079/329] add phpdoc (#31149) --- htdocs/commande/class/commandestats.class.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index fcf4f6704bb6b..ca2bc3e882640 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2020 Maxime DEMAREST + * Copyright (C) 2024 Frédéric France * * 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 @@ -40,15 +41,49 @@ class CommandeStats extends Stats */ public $table_element; + /** + * @var int ID + */ public $socid; + + /** + * @var int ID + */ public $userid; + /** + * @var string To store the FROM part of the main table of the SQL request + */ public $from; + + /** + * @var string To store the FROM part of the lines table of the SQL request + */ public $from_line; + + /** + * @var string To store the field + */ public $field; + + /** + * @var string To store the field of the line table of the SQL request + */ public $field_line; + + /** + * @var string To store the FROM part of the categorie table of the SQL request + */ public $categ_link; + + /** + * @var string To store the WHERE part of the main table of the SQL request + */ public $where = ''; + + /** + * @var string To store the join + */ public $join; From c62e015410e489b63bf3bdd58dfd93f38214e5f1 Mon Sep 17 00:00:00 2001 From: MDW Date: Thu, 26 Sep 2024 23:01:02 +0200 Subject: [PATCH 080/329] Qual: Fix (propal|facture|contrat|fichinter)/card, commonobject, files.lib/card_presend.tpl (#31087) # Qual: Fix (propal|facture|contrat|fichinter)/card, commonobject, files.lib/card_presend.tpl Fix phan notices in these files Co-authored-by: Laurent Destailleur --- dev/tools/phan/baseline.txt | 40 ++++++------ htdocs/comm/propal/card.php | 16 +++-- htdocs/compta/facture/card.php | 7 ++- htdocs/contrat/card.php | 23 +++++-- htdocs/core/class/commonobject.class.php | 49 ++++++++++----- htdocs/core/lib/files.lib.php | 61 +++++++++++-------- htdocs/core/tpl/card_presend.tpl.php | 3 +- htdocs/fichinter/card.php | 4 +- .../variants/class/ProductAttribute.class.php | 2 +- 9 files changed, 125 insertions(+), 80 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 8a07bc1fe82b6..b0be4551f2b1f 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -10,14 +10,14 @@ return [ // # Issue statistics: // PhanPluginUnknownPropertyType : 1490+ occurrences - // PhanUndeclaredProperty : 840+ occurrences + // PhanUndeclaredProperty : 830+ occurrences // PhanTypeMismatchArgumentProbablyReal : 740+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 730+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 720+ occurrences // PhanUndeclaredGlobalVariable : 440+ occurrences // PhanPluginUnknownArrayMethodReturnType : 430+ occurrences // PhanPluginUnknownArrayMethodParamType : 360+ occurrences - // PhanPossiblyUndeclaredVariable : 330+ occurrences - // PhanPluginUnknownObjectMethodCall : 230+ occurrences + // PhanPossiblyUndeclaredVariable : 320+ occurrences + // PhanPluginUnknownObjectMethodCall : 200+ occurrences // PhanTypeMismatchProperty : 200+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 160+ occurrences // PhanPluginUnknownArrayFunctionParamType : 150+ occurrences @@ -27,22 +27,22 @@ return [ // PhanPluginEmptyStatementIf : 55+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences - // PhanTypeMismatchDimFetch : 40+ occurrences + // PhanTypeMismatchDimFetch : 35+ occurrences // PhanTypeExpectedObjectPropAccess : 25+ occurrences // PhanPossiblyNullTypeMismatchProperty : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences // PhanEmptyForeach : 10+ occurrences // PhanPluginConstantVariableNull : 10+ occurrences - // PhanPluginDuplicateExpressionBinaryOp : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences // PhanUndeclaredMethod : 9 occurrences // PhanPluginBothLiteralsBinaryOp : 8 occurrences // PhanPluginDuplicateArrayKey : 8 occurrences + // PhanPluginDuplicateExpressionBinaryOp : 7 occurrences // PhanTypeMismatchDimFetchNullable : 7 occurrences // PhanTypeExpectedObjectPropAccessButGotNull : 6 occurrences + // PhanParamTooMany : 3 occurrences // PhanInvalidFQSENInClasslike : 2 occurrences - // PhanParamTooMany : 2 occurrences // PhanAccessMethodProtected : 1 occurrence // PhanEmptyFQSENInClasslike : 1 occurrence @@ -60,7 +60,7 @@ return [ 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'], @@ -120,7 +120,7 @@ return [ 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'], - 'htdocs/comm/propal/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'], 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], @@ -151,7 +151,7 @@ return [ 'htdocs/compta/bank/various_payment/document.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/compta/bank/various_payment/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], - 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/cashcontrol/cashcontrol_card.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -237,7 +237,7 @@ return [ 'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'], 'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/contrat/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], @@ -247,10 +247,10 @@ return [ 'htdocs/core/actions_comments.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_extrafields.inc.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/actions_lineupdown.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/actions_linkedfiles.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/actions_massactions.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -289,7 +289,7 @@ return [ 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonhookactions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/commoninvoice.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/class/commonobject.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], + 'htdocs/core/class/commonobject.class.php' => ['PhanParamTooMany', 'PhanUndeclaredProperty'], 'htdocs/core/class/commonobjectline.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonorder.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/commonpeople.class.php' => ['PhanUndeclaredProperty'], @@ -300,7 +300,6 @@ return [ 'htdocs/core/class/ctypent.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/ctyperesource.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cunits.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/class/defaultvalues.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/diasporahandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], 'htdocs/core/class/discount.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/class/doleditor.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], @@ -372,7 +371,7 @@ return [ 'htdocs/core/lib/expedition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/expensereport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/fichinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/lib/files.lib.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], + 'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/fourn.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/functions.lib.php' => ['PhanPluginDuplicateArrayKey'], @@ -632,7 +631,6 @@ return [ 'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/fichinter/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], 'htdocs/fichinter/class/fichinter.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -788,11 +786,11 @@ return [ 'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/inventory/lib/inventory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/product/stats/card.php' => ['PhanTypeComparisonFromArray'], @@ -881,7 +879,7 @@ return [ 'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], + 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], 'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/webportal/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'], @@ -1011,7 +1009,7 @@ return [ 'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], - 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'], 'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'], diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index cee5c96d5e461..4f458313b26b2 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -547,7 +547,7 @@ $element = $subelement = 'contrat'; } if ($element == 'inter') { - $element = $subelement = 'ficheinter'; + $element = $subelement = 'fichinter'; } if ($element == 'shipping') { $element = $subelement = 'expedition'; @@ -568,6 +568,7 @@ $classname = ucfirst($subelement); $srcobject = new $classname($db); + '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); $result = $srcobject->fetch($object->origin_id); @@ -1885,6 +1886,7 @@ $classname = ucfirst($subelement); $objectsrc = new $classname($db); + '@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic $objectsrc->fetch($originid); if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { $objectsrc->fetch_lines(); @@ -2002,7 +2004,7 @@ } else { print ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= '
'; $filter = '((s.client:IN:1,2,3) AND (s.status:=:1))'; - print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, null, 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); + print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); // reload page to retrieve customer information if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) { print ''; + $buttonToShowHideMargin = ''; + $buttonToShowHideMargin .= img_picto($langs->trans("ShowMarginInfos"), 'switch_off', '', 0, 0, 0, '', 'size15x'); + $buttonToShowHideMargin .= ''; + $buttonToShowHideMargin .= ''; + $buttonToShowHideMargin .= img_picto($langs->trans("Hide"), 'switch_on_grey', '', 0, 0, 0, '', 'size15x opacitymedium'); + $buttonToShowHideMargin .= ''; + + $buttonToShowHideMargin .= ''; - print '' . "\n"; print '
'; print ''; print ''; - print ''; - print ''; + print ''; + print ''; if (getDolGlobalString('MARGIN_TYPE') == "1") { - print ''; + print ''; } else { - print ''; + print ''; } - print ''; + print ''; if (getDolGlobalString('DISPLAY_MARGIN_RATES')) { - print ''; + print ''; } if (getDolGlobalString('DISPLAY_MARK_RATES')) { - print ''; + print ''; } print ''; if (isModEnabled("product")) { //if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) { - print ''; + print ''; print ''; print ''; print ''; @@ -282,7 +285,7 @@ public function displayMarginInfos($object, $force_price = false) } if (isModEnabled("service")) { - print ''; + print ''; print ''; print ''; print ''; @@ -297,7 +300,7 @@ public function displayMarginInfos($object, $force_price = false) } if (isModEnabled("product") && isModEnabled("service")) { - print ''; + print ''; print ''; print ''; print ''; @@ -310,7 +313,7 @@ public function displayMarginInfos($object, $force_price = false) } print ''; } - print $hookmanager->resPrint; + print $hookmanager->resPrint; print '
' . $langs->trans('Margins') . '' . $langs->trans('SellingPrice') . '' . $langs->trans('Margins') . ' ' . $buttonToShowHideMargin . '' . $langs->trans('SellingPrice') . '' . $langs->trans('BuyingPrice') . '' . $langs->trans('BuyingPrice') . '' . $langs->trans('CostPrice') . '' . $langs->trans('CostPrice') . '' . $langs->trans('Margin') . '' . $langs->trans('Margin') . '' . $langs->trans('MarginRate') . '' . $langs->trans('MarginRate') . '' . $langs->trans('MarkRate') . '' . $langs->trans('MarkRate') . '
' . $langs->trans('MarginOnProducts') . '' . price($marginInfo['pv_products']) . '' . price($marginInfo['pa_products']) . '
' . $langs->trans('MarginOnServices') . '' . price($marginInfo['pv_services']) . '' . price($marginInfo['pa_services']) . '
' . $langs->trans('TotalMargin') . '' . price($marginInfo['pv_total']) . '' . price($marginInfo['pa_total']) . '
'; print '
'; } elseif ($reshook > 0) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 9f6f53be514e0..37cc17e74faed 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5045,7 +5045,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco 'off', 'on', 'order', 'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'proposal', 'puce', 'stock', 'resize', 'service', 'stats', - 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_warning', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'user-tie', 'vcard', 'wrench', + 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_grey', 'switch_on_warning', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'user-tie', 'vcard', 'wrench', 'github', 'google', 'jabber', 'microsoft', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'generic', 'home', 'hrm', 'members', 'products', 'invoicing', 'partnership', 'payment', 'payment_vat', 'pencil-ruler', 'pictoconfirm', 'preview', 'project', 'projectpub', 'projecttask', 'question', 'refresh', 'region', @@ -5094,7 +5094,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco 'member' => 'user-alt', 'meeting' => 'chalkboard-teacher', 'mrp' => 'cubes', 'next' => 'arrow-alt-circle-right', 'trip' => 'wallet', 'expensereport' => 'wallet', 'group' => 'users', 'movement' => 'people-carry', 'sign-out' => 'sign-out-alt', - 'switch_off' => 'toggle-off', 'switch_on' => 'toggle-on', 'switch_on_warning' => 'toggle-on', 'switch_on_red' => 'toggle-on', 'check' => 'check', 'bookmark' => 'star', + 'switch_off' => 'toggle-off', 'switch_on' => 'toggle-on', 'switch_on_grey' => 'toggle-on', 'switch_on_warning' => 'toggle-on', 'switch_on_red' => 'toggle-on', 'check' => 'check', 'bookmark' => 'star', 'bank' => 'university', 'close_title' => 'times', 'delete' => 'trash', 'filter' => 'filter', 'list-alt' => 'list-alt', 'calendarlist' => 'bars', 'calendar' => 'calendar-alt', 'calendarmonth' => 'calendar-alt', 'calendarweek' => 'calendar-week', 'calendarday' => 'calendar-day', 'calendarperuser' => 'table', 'intervention' => 'ambulance', 'invoice' => 'file-invoice-dollar', 'order' => 'file-invoice', @@ -5165,7 +5165,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco // Define $marginleftonlyshort $arrayconvpictotomarginleftonly = array( 'bank', 'check', 'delete', 'generic', 'grip', 'grip_title', 'jabber', - 'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_on_red', 'switch_off', + 'grip_title', 'grip', 'listlight', 'note', 'on', 'off', 'playdisabled', 'printer', 'resize', 'sign-out', 'stats', 'switch_on', 'switch_on_grey', 'switch_on_red', 'switch_off', 'uparrow', '1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected' ); if (!array_key_exists($pictowithouttext, $arrayconvpictotomarginleftonly)) { From f086d9ee3e796dae95b4887082f9cd70ba9c0e81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 15:18:46 +0200 Subject: [PATCH 110/329] QUAL Standardize name of user cookies --- htdocs/core/boxes/box_graph_invoices_permonth.php | 12 ++++++------ htdocs/core/boxes/box_graph_invoices_peryear.php | 10 +++++----- .../boxes/box_graph_invoices_supplier_permonth.php | 12 ++++++------ .../core/boxes/box_graph_nb_ticket_last_x_days.php | 12 ++++++------ htdocs/core/boxes/box_graph_orders_permonth.php | 12 ++++++------ .../boxes/box_graph_orders_supplier_permonth.php | 12 ++++++------ .../core/boxes/box_graph_product_distribution.php | 14 +++++++------- htdocs/core/boxes/box_graph_propales_permonth.php | 12 ++++++------ htdocs/core/boxes/box_task.php | 2 +- htdocs/core/class/extrafields.class.php | 8 ++++---- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index d3e0c205ed989..75d97bee972bc 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -100,19 +100,19 @@ public function loadBox($max = 5) if ($user->hasRight('facture', 'lire')) { $mesg = ''; - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_shownb = 'DOLUSER_box_'.$this->boxcode.'_shownb'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); @@ -234,7 +234,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow .= '   '; $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); diff --git a/htdocs/core/boxes/box_graph_invoices_peryear.php b/htdocs/core/boxes/box_graph_invoices_peryear.php index dc10a4e23d63e..fccfa5b7530f9 100644 --- a/htdocs/core/boxes/box_graph_invoices_peryear.php +++ b/htdocs/core/boxes/box_graph_invoices_peryear.php @@ -97,17 +97,17 @@ public function loadBox($max = 5) if ($user->hasRight('facture', 'lire')) { $mesg = ''; - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true); + $tmparray = json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true); $endyear = $tmparray['year']; $showtot = $tmparray['showtot']; } @@ -188,7 +188,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 3405aa5527d99..382f88d319f2f 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -96,19 +96,19 @@ public function loadBox($max = 5) } if ($user->hasRight('fournisseur', 'facture', 'lire')) { - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_shownb = 'DOLUSER_box_'.$this->boxcode.'_shownb'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); @@ -229,7 +229,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow .= '   '; $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); diff --git a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php index d7a7e27c31447..2843b326f87cc 100644 --- a/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php +++ b/htdocs/core/boxes/box_graph_nb_ticket_last_x_days.php @@ -82,7 +82,7 @@ public function loadBox($max = 5) $this->max = $max; - $param_day = 'DOLUSERCOOKIE_ticket_last_days'; + $param_day = 'DOLUSER_ticket_last_days'; if (GETPOST($param_day)) { if (GETPOST($param_day) >= 15) { $days = 14; @@ -93,7 +93,7 @@ public function loadBox($max = 5) $days = 7; } require_once DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"; - $text = $langs->trans("BoxTicketLastXDays", $days).' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_last_days" class="linkobject"'); + $text = $langs->trans("BoxTicketLastXDays", $days).' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSER_ticket_last_days" class="linkobject"'); $this->info_box_head = array( 'text' => $text, 'limit' => dol_strlen($text) @@ -137,16 +137,16 @@ public function loadBox($max = 5) $stringtoshow = '
'; $stringtoshow .= ''; - $stringtoshow .= '
'; // hideobject is to start hidden + $stringtoshow .= '
'; // hideobject is to start hidden $stringtoshow .= '
'; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("Days"); $stringtoshow .= ''; $stringtoshow .= '
'; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index ebfe1af9ee3b4..0bf4568b7381e 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -99,19 +99,19 @@ public function loadBox($max = 5) if ($user->hasRight('commande', 'lire')) { $langs->load("orders"); - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_shownb = 'DOLUSER_box_'.$this->boxcode.'_shownb'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); @@ -233,7 +233,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow .= '   '; $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 7e4fb9eae09bc..0a043835cacab 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -98,19 +98,19 @@ public function loadBox($max = 5) if ($user->hasRight('fournisseur', 'commande', 'lire')) { $langs->load("orders"); - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_shownb = 'DOLUSER_box_'.$this->boxcode.'_shownb'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); @@ -232,7 +232,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow .= '   '; $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); diff --git a/htdocs/core/boxes/box_graph_product_distribution.php b/htdocs/core/boxes/box_graph_product_distribution.php index 1841a0f1496ad..f232fa8ef811d 100644 --- a/htdocs/core/boxes/box_graph_product_distribution.php +++ b/htdocs/core/boxes/box_graph_product_distribution.php @@ -75,18 +75,18 @@ public function loadBox($max = 5) include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_showinvoicenb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showinvoicenb'; - $param_showpropalnb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showpropalnb'; - $param_showordernb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showordernb'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_showinvoicenb = 'DOLUSER_box_'.$this->boxcode.'_showinvoicenb'; + $param_showpropalnb = 'DOLUSER_box_'.$this->boxcode.'_showpropalnb'; + $param_showordernb = 'DOLUSER_box_'.$this->boxcode.'_showordernb'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $year = GETPOSTINT($param_year); $showinvoicenb = GETPOST($param_showinvoicenb, 'alpha'); $showpropalnb = GETPOST($param_showpropalnb, 'alpha'); $showordernb = GETPOST($param_showordernb, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $year = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $showinvoicenb = (!empty($tmparray['showinvoicenb']) ? $tmparray['showinvoicenb'] : ''); $showpropalnb = (!empty($tmparray['showpropalnb']) ? $tmparray['showpropalnb'] : ''); @@ -354,7 +354,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; if (isModEnabled("propal") || $user->hasRight('propal', 'lire')) { $stringtoshow .= ' '.$langs->trans("ForProposals"); $stringtoshow .= ' '; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index d7e7dc58b32b2..44e4989996b8f 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -99,19 +99,19 @@ public function loadBox($max = 5) } if ($user->hasRight('propal', 'lire')) { - $param_year = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_year'; - $param_shownb = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_shownb'; - $param_showtot = 'DOLUSERCOOKIE_box_'.$this->boxcode.'_showtot'; + $param_year = 'DOLUSER_box_'.$this->boxcode.'_year'; + $param_shownb = 'DOLUSER_box_'.$this->boxcode.'_shownb'; + $param_showtot = 'DOLUSER_box_'.$this->boxcode.'_showtot'; include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; $autosetarray = preg_split("/[,;:]+/", GETPOST('DOL_AUTOSET_COOKIE')); - if (in_array('DOLUSERCOOKIE_box_'.$this->boxcode, $autosetarray)) { + if (in_array('DOLUSER_box_'.$this->boxcode, $autosetarray)) { $endyear = GETPOSTINT($param_year); $shownb = GETPOST($param_shownb, 'alpha'); $showtot = GETPOST($param_showtot, 'alpha'); } else { - $tmparray = (!empty($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSERCOOKIE_box_'.$this->boxcode], true) : array()); + $tmparray = (!empty($_COOKIE['DOLUSER_box_'.$this->boxcode]) ? json_decode($_COOKIE['DOLUSER_box_'.$this->boxcode], true) : array()); $endyear = (!empty($tmparray['year']) ? $tmparray['year'] : ''); $shownb = (!empty($tmparray['shownb']) ? $tmparray['shownb'] : ''); $showtot = (!empty($tmparray['showtot']) ? $tmparray['showtot'] : ''); @@ -229,7 +229,7 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ''; + $stringtoshow .= ''; $stringtoshow .= ' '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow .= '   '; $stringtoshow .= ' '.$langs->trans("AmountOfProposalsByMonthHT"); diff --git a/htdocs/core/boxes/box_task.php b/htdocs/core/boxes/box_task.php index fc106d05e8b83..8fcfe21fb96b0 100644 --- a/htdocs/core/boxes/box_task.php +++ b/htdocs/core/boxes/box_task.php @@ -75,7 +75,7 @@ public function loadBox($max = 5) $projectstatic = new Project($this->db); $taskstatic = new Task($this->db); $form = new Form($this->db); - $cookie_name = 'DOLUSERCOOKIE_boxfilter_task'; + $cookie_name = 'DOLUSER_boxfilter_task'; $boxcontent = ''; $socid = $user->socid; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c35928428ba21..6012ea6c2cf95 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -2338,7 +2338,7 @@ public function showSeparator($key, $object, $colspan = 2, $display_type = 'card $expand_display = false; if (is_array($extrafield_param_list) && count($extrafield_param_list) > 0) { $extrafield_collapse_display_value = intval($extrafield_param_list[0]); - $expand_display = ((isset($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key]) || GETPOSTINT('ignorecollapsesetup')) ? (!empty($_COOKIE['DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key])) : !($extrafield_collapse_display_value == 2)); + $expand_display = ((isset($_COOKIE['DOLUSER_COLLAPSE_'.$object->table_element.'_extrafields_'.$key]) || GETPOSTINT('ignorecollapsesetup')) ? (!empty($_COOKIE['DOLUSER_COLLAPSE_'.$object->table_element.'_extrafields_'.$key])) : !($extrafield_collapse_display_value == 2)); } $disabledcookiewrite = 0; if ($mode == 'create') { @@ -2377,7 +2377,7 @@ public function showSeparator($key, $object, $colspan = 2, $display_type = 'card $out .= ' jQuery(".trextrafields_collapse'.$collapse_group.'").hide();'."\n"; } else { $out .= ' console.log("Inject js for collapsing of extrafield '.$key.' - keep visible and set cookie");'."\n"; - $out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n"; + $out .= ' document.cookie = "DOLUSER_COLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n"; } } $out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').'").click(function(){'."\n"; @@ -2385,10 +2385,10 @@ public function showSeparator($key, $object, $colspan = 2, $display_type = 'card $out .= ' jQuery(".trextrafields_collapse'.$collapse_group.'").toggle(100, function(){'."\n"; $out .= ' if (jQuery(".trextrafields_collapse'.$collapse_group.'").is(":hidden")) {'."\n"; $out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').' '.$tagtype_dyn.' span").addClass("fa-plus-square").removeClass("fa-minus-square");'."\n"; - $out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=0; path='.$_SERVER["PHP_SELF"].'"'."\n"; + $out .= ' document.cookie = "DOLUSER_COLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=0; path='.$_SERVER["PHP_SELF"].'"'."\n"; $out .= ' } else {'."\n"; $out .= ' jQuery("#trextrafieldseparator'.$key.(!empty($object->id) ? '_'.$object->id : '').' '.$tagtype_dyn.' span").addClass("fa-minus-square").removeClass("fa-plus-square");'."\n"; - $out .= ' document.cookie = "DOLCOLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n"; + $out .= ' document.cookie = "DOLUSER_COLLAPSE_'.$object->table_element.'_extrafields_'.$key.'=1; path='.$_SERVER["PHP_SELF"].'"'."\n"; $out .= ' }'."\n"; $out .= ' });'."\n"; $out .= ' });'."\n"; From 726395ded991ac456f3c8a27c71cf1de50d76f54 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 17:05:44 +0200 Subject: [PATCH 111/329] Look and feel v21 --- htdocs/bookmarks/bookmarks.lib.php | 5 ++--- htdocs/main.inc.php | 28 ++++++++++++++++++++-------- htdocs/takepos/index.php | 4 ++-- htdocs/theme/eldy/dropdown.inc.php | 13 +++++++++++-- htdocs/theme/eldy/global.inc.php | 11 ++++++++--- htdocs/theme/md/dropdown.inc.php | 18 +++++++++++++----- htdocs/theme/md/style.css.php | 6 +++++- 7 files changed, 61 insertions(+), 24 deletions(-) diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index e61594d402665..0034df3990472 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -94,13 +94,13 @@ function printDropdownBookmarksList() //$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url); $urltoadd = DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url); $newbtn .= ''; - $newbtn .= img_picto('', 'add', '', 0, 0, 0, '', 'paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; + $newbtn .= img_picto('', 'add', '', 0, 0, 0, '', 'pictofixedwidth paddingright').dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; } } // Url to list/edit bookmark $listbtn = ''; - $listbtn .= img_picto('', 'edit', 'class="paddingright opacitymedium"').$langs->trans('EditBookmarks').''; + $listbtn .= img_picto('', 'edit', 'class="pictofixedwidth paddingright opacitymedium"').$langs->trans('EditBookmarks').''; $bookmarkList = ''; $bookmarkNb = 0; @@ -125,7 +125,6 @@ function printDropdownBookmarksList() $searchForm .= ''; } else { $searchForm .= '
'; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + $i++; + } + print '
'; + print ''; if ($action != 'editconditions' && $usercancreate && $caneditfield) { diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index e915d920ba40c..a8f3b26291f6f 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -29,15 +29,17 @@ $dellinkid = GETPOSTINT('dellinkid'); $addlink = GETPOST('addlink', 'alpha'); -$addlinkid = GETPOSTINT('idtolinkto'); +$addlinkids = GETPOST('idtolinkto', 'array:int'); $addlinkref = GETPOST('reftolinkto', 'alpha'); $cancellink = GETPOST('cancel', 'alpha'); // Link object to another object -if ($action == 'addlink' && !empty($permissiondellink) && !$cancellink && $id > 0 && $addlinkid > 0) { +if ($action == 'addlink' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkids)) { $object->fetch($id); $object->fetch_thirdparty(); - $result = $object->add_object_linked($addlink, $addlinkid); + foreach ($addlinkids as $addlinkid) { + $result = $object->add_object_linked($addlink, $addlinkid); + } } // Link by reference diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3df31ddb37560..e5d392ab58008 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -659,11 +659,11 @@ public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0 $extrastyle = ''; if ($direction < 0) { - $extracss = ($extracss ? $extracss . ' ' : '') . ($notabs != 3 ? 'inline-block' : ''); + $extracss = ($extracss ? $extracss : '') . ($notabs != 3 ? ' inline-block' : ''); $extrastyle = 'padding: 0px; padding-left: 2px;'; } if ($direction > 0) { - $extracss = ($extracss ? $extracss . ' ' : '') . ($notabs != 3 ? 'inline-block' : ''); + $extracss = ($extracss ? $extracss : '') . ($notabs != 3 ? ' inline-block' : ''); $extrastyle = 'padding: 0px; padding-right: 2px;'; } @@ -747,7 +747,7 @@ public function textwithtooltip($text, $htmltext, $tooltipon = 1, $direction = 0 * @param int $forcenowrap Force no wrap between text and picto (works with notabs=2 only) * @return string HTML code of text, picto, tooltip */ - public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = '', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0) + public function textwithpicto($text, $htmltext, $direction = 1, $type = 'help', $extracss = 'valignmiddle', $noencodehtmltext = 0, $notabs = 3, $tooltiptrigger = '', $forcenowrap = 0) { global $conf, $langs; @@ -8824,21 +8824,21 @@ public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, } /** - * Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL. - * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. + * Return a HTML select string, built from an array of key+value, but content returned into select come from an Ajax call of an URL. + * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. * - * @param string $htmlname Name of html select area - * @param string $url Url. Must return a json_encode of array(key=>array('text'=>'A text', 'url'=>'An url'), ...) - * @param string $id Preselected key - * @param string $moreparam Add more parameters onto the select tag - * @param string $moreparamtourl Add more parameters onto the Ajax called URL - * @param int $disabled Html select box is disabled - * @param int $minimumInputLength Minimum Input Length - * @param string $morecss Add more class to css styles - * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. - * @param string $placeholder String to use as placeholder - * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) - * @return string HTML select string + * @param string $htmlname Name of html select area + * @param string $url Url. Must return a json_encode of array(key=>array('text'=>'A text', 'url'=>'An url'), ...) + * @param string $id Preselected key + * @param string $moreparam Add more parameters onto the select tag + * @param string $moreparamtourl Add more parameters onto the Ajax called URL + * @param int $disabled Html select box is disabled + * @param int $minimumInputLength Minimum Input Length + * @param string $morecss Add more class to css styles + * @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected. + * @param string $placeholder String to use as placeholder + * @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) + * @return string HTML select string * @see selectArrayFilter(), ajax_combobox() in ajax.lib.php */ public static function selectArrayAjax($htmlname, $url, $id = '', $moreparam = '', $moreparamtourl = '', $disabled = 0, $minimumInputLength = 1, $morecss = '', $callurlonselect = 0, $placeholder = '', $acceptdelayedhtml = 0) @@ -9712,7 +9712,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl print ''; print ''; print ''; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a4923153b2608..6dd0f80f7e62f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1899,7 +1899,7 @@ .titlefieldcreate { width: 20%; } .titlefield { /* width: 25%; */ min-width: 150px; width: 25%; } .titlefieldmiddle { width: 45%; } -.titlefieldmax45 { max-width: 45%; } +.titlefieldmax45 { max-width: 45%; min-width: 180px; } .imgmaxwidth180 { max-width: 180px; } .imgmaxheight50 { max-height: 50px; } @@ -1937,6 +1937,7 @@ /* Force values for small screen 1000 */ @media only screen and (max-width: 1000px) { + .titlefieldmax45 { min-width: 100px; } .maxwidthonsmartphone { max-width: 100px; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 75px !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c59383343f4e7..df8b1599069d6 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2091,6 +2091,7 @@ .titlefieldcreate { width: 20%; } .titlefield { /* width: 25%; */ min-width: 150px; width: 25%; } .titlefieldmiddle { width: 50%; } +.titlefieldmax45 { max-width: 45%; min-width: 180px; } .imgmaxwidth180 { max-width: 180px; } .imgmaxheight50 { max-height: 50px; } @@ -2128,6 +2129,7 @@ /* Force values for small screen 1000 */ @media only screen and (max-width: 1000px) { + .titlefieldmax45 { min-width: 100px; } .maxwidthonsmartphone { max-width: 100px; } .minwidth50imp { min-width: 50px !important; } .minwidth75imp { min-width: 70px !important; } From b327e73ade9ab2ea6caeb3bc21924f450d7e98c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 18:24:58 +0200 Subject: [PATCH 113/329] NEW Can link an object to another using the ref. Close #31001 --- htdocs/core/actions_dellink.inc.php | 2 +- htdocs/core/class/html.form.class.php | 96 ++++++++++++++------------- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index a8f3b26291f6f..02de4833da7cb 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -43,7 +43,7 @@ } // Link by reference -if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && getDolGlobalString('MAIN_LINK_BY_REF_IN_LINKTO')) { +if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $element_prop = getElementProperties($addlink); if (is_array($element_prop)) { dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php'); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e5d392ab58008..11d2644cdf2e6 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9656,6 +9656,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl } } + // Build the html part with possible suggested links foreach ($possiblelinks as $key => $possiblelink) { $num = 0; @@ -9666,7 +9667,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl if (!empty($possiblelink['perms']) && (empty($restrictlinksto) || in_array($key, $restrictlinksto)) && (empty($excludelinksto) || !in_array($key, $excludelinksto))) { print '
use_javascript_ajax) ? '' : ' style="display:none"') . '>'; - if (getDolGlobalString('MAIN_LINK_BY_REF_IN_LINKTO')) { + if (getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { print '
'."\n"; print ''."\n"; print '
'; @@ -9692,52 +9693,55 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl $num = $this->db->num_rows($resqllist); $i = 0; - print '
'; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; print $langs->trans('PaymentConditionsShort'); print '
'; - print ''; + print ''; print '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - while ($i < $num) { - $objp = $this->db->fetch_object($resqllist); - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + if ($num > 0) { + print '
'; + print ''."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("AmountHTShort") . '' . $langs->trans("Company") . '
'; - print ''; - print '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . ''; - if ($possiblelink['label'] == 'LinkToContract') { - $form = new Form($this->db); - print $form->textwithpicto('', $langs->trans("InformationOnLinkToContract")) . ' '; - } - print '' . (isset($objp->total_ht) ? price($objp->total_ht) : '') . ''; - print '' . $objp->name . '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; - $i++; - } - print '
' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("AmountHTShort") . '' . $langs->trans("Company") . '
'; - print '
'; - if ($num) { - print ''; - } - if (empty($conf->use_javascript_ajax)) { - print '
'; - } else { - print ''; + while ($i < $num) { + $objp = $this->db->fetch_object($resqllist); + + print '
'; + print ''; + print '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . ''; + if ($possiblelink['label'] == 'LinkToContract') { + $form = new Form($this->db); + print $form->textwithpicto('', $langs->trans("InformationOnLinkToContract")) . ' '; + } + print '' . (isset($objp->total_ht) ? price($objp->total_ht) : '') . ''; + print '' . $objp->name . '
'; + print '
'; + if ($num) { + print ''; + } + if (empty($conf->use_javascript_ajax)) { + print '
'; + } else { + print ''; + } + print ''; } - print ''; + $this->db->free($resqllist); } else { dol_print_error($this->db); @@ -9745,7 +9749,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl print ''; //$linktoelem.=($linktoelem?'   ':''); - if ($num > 0 || getDolGlobalString('MAIN_LINK_BY_REF_IN_LINKTO')) { + if ($num > 0 || getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $linktoelemlist .= '
  • ' . $langs->trans($possiblelink['label']) . ' (' . $num . ')
  • '; // } else $linktoelem.=$langs->trans($possiblelink['label']); } else { From 6243891bb408a45aa580e6e3de91992023ebe238 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 18:28:06 +0200 Subject: [PATCH 114/329] NEW Can link an object to another using the ref. Close #31001 --- htdocs/core/actions_dellink.inc.php | 2 +- htdocs/core/class/html.form.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/actions_dellink.inc.php b/htdocs/core/actions_dellink.inc.php index 02de4833da7cb..3720f8b0461d0 100644 --- a/htdocs/core/actions_dellink.inc.php +++ b/htdocs/core/actions_dellink.inc.php @@ -43,7 +43,7 @@ } // Link by reference -if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { +if ($action == 'addlinkbyref' && !empty($permissiondellink) && !$cancellink && $id > 0 && !empty($addlinkref) && !getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $element_prop = getElementProperties($addlink); if (is_array($element_prop)) { dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php'); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 11d2644cdf2e6..7b7f2bbd0e1f7 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9667,7 +9667,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl if (!empty($possiblelink['perms']) && (empty($restrictlinksto) || in_array($key, $restrictlinksto)) && (empty($excludelinksto) || !in_array($key, $excludelinksto))) { print '
    use_javascript_ajax) ? '' : ' style="display:none"') . '>'; - if (getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { + if (!getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { print '
    '."\n"; print ''."\n"; print '
    '; @@ -9749,7 +9749,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl print '
    '; //$linktoelem.=($linktoelem?'   ':''); - if ($num > 0 || getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { + if ($num > 0 || !getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $linktoelemlist .= '
  • ' . $langs->trans($possiblelink['label']) . ' (' . $num . ')
  • '; // } else $linktoelem.=$langs->trans($possiblelink['label']); } else { From b69ae93f8d5be65e57243586f3e935a93c699220 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 18:45:09 +0200 Subject: [PATCH 115/329] Prepare refactoring --- htdocs/core/class/html.form.class.php | 130 ++++++++++++++------------ 1 file changed, 71 insertions(+), 59 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7b7f2bbd0e1f7..7a31127f29548 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9372,16 +9372,16 @@ public function showCategories($id, $type, $rendermode = 0, $nolink = 0) /** * Show linked object block. * - * @param CommonObject $object Object we want to show links to - * @param string $morehtmlright More html to show on right of title + * @param CommonObject $object Object we want to show links to + * @param string $morehtmlright More html to show on right of title * @param array $compatibleImportElementsList Array of compatibles elements object for "import from" action - * @param string $title Title - * @return int Return Number of different types + * @param string $title Title + * @return int Return Number of different types */ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleImportElementsList = array(), $title = 'RelatedObjects') { global $conf, $langs, $hookmanager; - global $bc, $action; + global $action; $object->fetchObjectLinked(); @@ -9531,18 +9531,21 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI } /** - * Show block with links to link to other objects. + * Show block with links "to link to" other objects. * * @param CommonObject $object Object we want to show links to * @param string[] $restrictlinksto Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction. * @param string[] $excludelinksto Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion. + * @param string $nooutput 1=Return array with content instead of printing it. * @return string HTML block */ - public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array()) + public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array(), $nooutput = 0) { global $conf, $langs, $hookmanager; global $action; + $form = new Form($this->db); + $linktoelem = ''; $linktoelemlist = ''; $listofidcompanytoscan = ''; @@ -9657,6 +9660,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl } // Build the html part with possible suggested links + $htmltoenteralink = ''; foreach ($possiblelinks as $key => $possiblelink) { $num = 0; @@ -9665,25 +9669,26 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl } if (!empty($possiblelink['perms']) && (empty($restrictlinksto) || in_array($key, $restrictlinksto)) && (empty($excludelinksto) || !in_array($key, $excludelinksto))) { - print '
    use_javascript_ajax) ? '' : ' style="display:none"') . '>'; + $htmltoenteralink .= '
    use_javascript_ajax) ? '' : ' style="display:none"') . '>'; + // Section for free ref input if (!getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { - print '
    '."\n"; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + $htmltoenteralink .= '
    '."\n"; + $htmltoenteralink .= ''."\n"; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= '
    '; + $htmltoenteralink .= ''; //print ''; - print ''; - print ''; - print '
    ' . $langs->trans("Ref") . ' '; - print ' '; - print '
    '; - print ''; + $htmltoenteralink .= '
     '; + $htmltoenteralink .= ' '; + $htmltoenteralink .= '
    '; + $htmltoenteralink .= ''; } $sql = $possiblelink['sql']; @@ -9694,61 +9699,62 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl $i = 0; if ($num > 0) { - print '
    '; - print ''."\n"; - print '
    '; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + // Section for free predefined list + $htmltoenteralink .= '
    '; + $htmltoenteralink .= ''."\n"; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= '
    ' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("AmountHTShort") . '' . $langs->trans("Company") . '
    '; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; while ($i < $num) { $objp = $this->db->fetch_object($resqllist); - print ''; - print ''; - print ''; - print ''; - print ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; - print ''; - print ''; + $htmltoenteralink .= '' . (isset($objp->total_ht) ? price($objp->total_ht) : '') . ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; $i++; } - print '
    ' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("AmountHTShort") . '' . $langs->trans("Company") . '
    '; - print ''; - print '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . ''; + $htmltoenteralink .= '
    '; + $htmltoenteralink .= ''; + $htmltoenteralink .= '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . ''; if ($possiblelink['label'] == 'LinkToContract') { - $form = new Form($this->db); - print $form->textwithpicto('', $langs->trans("InformationOnLinkToContract")) . ' '; + $htmltoenteralink .= $form->textwithpicto('', $langs->trans("InformationOnLinkToContract")) . ' '; } - print '' . (isset($objp->total_ht) ? price($objp->total_ht) : '') . ''; - print '' . $objp->name . '
    ' . $objp->name . '
    '; - print '
    '; + $htmltoenteralink .= ''; + $htmltoenteralink .= '
    '; if ($num) { - print ''; + $htmltoenteralink .= ''; } if (empty($conf->use_javascript_ajax)) { - print '
    '; + $htmltoenteralink .= '
    '; } else { - print ''; + $htmltoenteralink .= ''; } - print '
    '; + $htmltoenteralink .= ''; } $this->db->free($resqllist); } else { dol_print_error($this->db); } - print ''; + $htmltoenteralink .= ''; + - //$linktoelem.=($linktoelem?'   ':''); + // Complete the list for the combo box if ($num > 0 || !getDolGlobalString('MAIN_HIDE_LINK_BY_REF_IN_LINKTO')) { $linktoelemlist .= '
  • ' . $langs->trans($possiblelink['label']) . ' (' . $num . ')
  • '; // } else $linktoelem.=$langs->trans($possiblelink['label']); @@ -9789,6 +9795,12 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl '; } + if ($nooutput) { + return array('linktoelem' => $linktoelem, 'htmltoenteralink' => $htmltoenteralink); + } else { + print $htmltoenteralink; + } + return $linktoelem; } From 35ba9eed7567ed84c6b055d8551536e187fcec96 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Sep 2024 18:52:26 +0200 Subject: [PATCH 116/329] css --- htdocs/core/class/html.form.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 7a31127f29548..e417d906fed0b 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9710,19 +9710,19 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl $htmltoenteralink .= ''; $htmltoenteralink .= ''; $htmltoenteralink .= ''; - $htmltoenteralink .= ''; - $htmltoenteralink .= ''; + $htmltoenteralink .= ''; + $htmltoenteralink .= ''; $htmltoenteralink .= ''; - $htmltoenteralink .= ''; + $htmltoenteralink .= ''; $htmltoenteralink .= ''; while ($i < $num) { $objp = $this->db->fetch_object($resqllist); $htmltoenteralink .= ''; - $htmltoenteralink .= ''; - $htmltoenteralink .= ''; + $htmltoenteralink .= ''; $htmltoenteralink .= ''; $htmltoenteralink .= ''."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php print ''."\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 56a9055942337..f230354af7b07 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7693,10 +7693,10 @@ function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $id /** * Return yes or no in current language * - * @param string|int $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false') - * @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No - * @param int $color 0=texte only, 1=Text is formatted with a color font style ('ok' or 'error'), 2=Text is formatted with 'ok' color. - * @return string HTML string + * @param int<0, 1>|'yes'|'true'|'no'|'false' $yesno Value to test (1, 'yes', 'true' or 0, 'no', 'false') + * @param integer $case 1=Yes/No, 0=yes/no, 2=Disabled checkbox, 3=Disabled checkbox + Yes/No + * @param int $color 0=texte only, 1=Text is formatted with a color font style ('ok' or 'error'), 2=Text is formatted with 'ok' color. + * @return string HTML string */ function yn($yesno, $case = 1, $color = 0) { diff --git a/htdocs/core/modules/barcode/modules_barcode.class.php b/htdocs/core/modules/barcode/modules_barcode.class.php index 9e3fe8894e2d1..16232e783eb99 100644 --- a/htdocs/core/modules/barcode/modules_barcode.class.php +++ b/htdocs/core/modules/barcode/modules_barcode.class.php @@ -145,7 +145,7 @@ public function getToolTip($langs, $soc, $type) if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ''; } - $s .= yn(!$this->code_null, 1, 2); + $s .= yn($this->code_null ? 0 : 1, 1, 2); if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; } @@ -156,7 +156,7 @@ public function getToolTip($langs, $soc, $type) if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ''; } - $s .= yn(!$this->code_null, 1, 2); + $s .= yn($this->code_null ? 0 : 1, 1, 2); if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; } @@ -167,7 +167,7 @@ public function getToolTip($langs, $soc, $type) if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ''; } - $s .= yn(!$this->code_null, 1, 2); + $s .= yn($this->code_null ? 0 : 1, 1, 2); if (getDolGlobalString('MAIN_BARCODE_CODE_ALWAYS_REQUIRED') && !empty($this->code_null)) { $s .= ' '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')'; } diff --git a/htdocs/core/modules/member/modules_member.class.php b/htdocs/core/modules/member/modules_member.class.php index eeb188056e64d..640c31ee2d3a0 100644 --- a/htdocs/core/modules/member/modules_member.class.php +++ b/htdocs/core/modules/member/modules_member.class.php @@ -108,7 +108,7 @@ public function getToolTip($langs, $soc) $s .= ''.$langs->trans("ThisIsModuleRules").':
    '; $s .= $langs->trans("Required").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; $s .= $langs->trans("CanBeModifiedIfOk").': '; $s .= yn($this->code_modifiable, 1, 2); diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 554d83f3affd0..dc81b248f52e3 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -154,15 +154,15 @@ public function getToolTip($langs, $product, $type) $s .= ''.$langs->trans("ThisIsModuleRules").':
    '; if ($type == 0) { $s .= $langs->trans("RequiredIfProduct").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } elseif ($type == 1) { $s .= $langs->trans("RequiredIfService").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } elseif ($type == -1) { $s .= $langs->trans("Required").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } $s .= $langs->trans("CanBeModifiedIfOk").': '; diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index c4e65c4fded91..82551e436ae37 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -174,15 +174,15 @@ public function getToolTip($langs, $soc, $type) $s .= ''.$langs->trans("ThisIsModuleRules").':
    '; if ($type == 0) { $s .= $langs->trans("RequiredIfCustomer").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } elseif ($type == 1) { $s .= $langs->trans("RequiredIfSupplier").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } elseif ($type == -1) { $s .= $langs->trans("Required").': '.$strikestart; - $s .= yn(!$this->code_null, 1, 2).$strikeend; + $s .= yn($this->code_null ? 0 : 1, 1, 2).$strikeend; $s .= '
    '; } $s .= $langs->trans("CanBeModifiedIfOk").': '; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index eebcb0098bcb3..4044a33546d77 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -72,7 +72,7 @@ parameters: - '# (dol_print_date|correctExifImageOrientation) expects bool\|string#' - '# (getRandomPassword|vatrate|DolEditor constructor) expects bool, int#' - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - - '# (dolibarr_set_const|yn|getLocalTaxesFromRate) expects int\|string#' + - '# (dolibarr_set_const|getLocalTaxesFromRate) expects int\|string#' - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' From aa2f82531c5460c741123bf789c8bbae9385cc62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 03:08:29 +0200 Subject: [PATCH 119/329] Fix phpdoc --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e417d906fed0b..b8421fb0d7878 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9536,7 +9536,7 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI * @param CommonObject $object Object we want to show links to * @param string[] $restrictlinksto Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction. * @param string[] $excludelinksto Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion. - * @param string $nooutput 1=Return array with content instead of printing it. + * @param int $nooutput 1=Return array with content instead of printing it. * @return string HTML block */ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array(), $nooutput = 0) From 0a9142661f79c3e66e0dac8e0ce335bfd0e2261f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 03:10:45 +0200 Subject: [PATCH 120/329] add phpdoc (#31175) * add phpdoc * add phpdoc * add phpdoc * add phpdoc * fix broken doc * fix broken doc * fix * fix * fix * fix * fix * fix --- htdocs/admin/agenda_other.php | 14 +++--- .../core/class/commondocgenerator.class.php | 26 ++++++++++ .../action/doc/pdf_standard_actions.class.php | 49 ++++++++++++++++++- .../facture/doc/pdf_octopus.modules.php | 2 +- .../facture/doc/pdf_sponge.modules.php | 2 +- htdocs/core/modules/modAgenda.class.php | 9 ++-- 6 files changed, 88 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 57ef82f8e8805..a24d74eb945ee 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; if (!$user->admin) { accessforbidden(); @@ -115,14 +116,14 @@ } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } -} elseif ($action == 'specimen') { // For orders +} elseif ($action == 'specimen') { // For actioncomm $modele = GETPOST('module', 'alpha'); - $commande = new CommandeFournisseur($db); - $commande->initAsSpecimen(); + $action = new ActionComm($db); + $action->initAsSpecimen(); $specimenthirdparty = new Societe($db); $specimenthirdparty->initAsSpecimen(); - $commande->thirdparty = $specimenthirdparty; + $action->thirdparty = $specimenthirdparty; // Search template files $file = ''; @@ -139,10 +140,10 @@ if ($classname !== '') { require_once $file; - $module = new $classname($db, $commande); + $module = new $classname($db, $action); '@phan-var-force pdf_standard_actions $module'; - if ($module->write_file($commande, $langs) > 0) { + if ($module->write_file($action, $langs) > 0) { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=action&file=SPECIMEN.pdf"); return; } else { @@ -257,7 +258,6 @@ if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { $name = substr($file, 4, dol_strlen($file) - 16); $classname = substr($file, 0, dol_strlen($file) - 12); - require_once $dir.'/'.$file; $module = new $classname($db, new ActionComm($db)); diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index af12feae95d96..0e3423fd91c60 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -92,13 +92,39 @@ abstract class CommonDocGenerator */ public $type; + /** + * @var float page height + */ public $page_hauteur; + + /** + * @var float page wicth + */ public $page_largeur; + + /** + * @var float left margin + */ public $marge_gauche; + + /** + * @var float right margin + */ public $marge_droite; + + /** + * @var float top margin + */ public $marge_haute; + + /** + * @var float bottom margin + */ public $marge_basse; + /** + * @var int<0,1> option logo + */ public $option_logo; public $option_tva; public $option_multilang; diff --git a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php index 8bc4377426319..8c80b0d85b21c 100644 --- a/htdocs/core/modules/action/doc/pdf_standard_actions.class.php +++ b/htdocs/core/modules/action/doc/pdf_standard_actions.class.php @@ -23,7 +23,7 @@ /** * \file htdocs/core/modules/action/doc/pdf_standard_actions.class.php * \ingroup commercial - * \brief File to build PDF with events + * \brief File to build PDF with events (reports), it's not a standard module to generate a pdf for only one actioncomm */ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; @@ -42,8 +42,14 @@ class pdf_standard_actions */ public $db; + /** + * @var string error message + */ public $error; + /** + * @var string[] array of errors messages + */ public $errors; /** @@ -51,34 +57,73 @@ class pdf_standard_actions */ public $description; + /** + * @var int edition date + */ public $date_edition; + /** + * @var int year + */ public $year; + /** + * @var int month + */ public $month; + /** + * @var string title + */ public $title; + /** + * @var string subject + */ public $subject; + /** + * @var int left margin + */ public $marge_gauche; + /** + * @var int right margin + */ public $marge_droite; + /** + * @var int top margin + */ public $marge_haute; + /** + * @var int bottom margin + */ public $marge_basse; + /** + * @var array format + */ public $format; + /** + * @var string type of doc + */ public $type; + /** + * @var int page height + */ public $page_hauteur; + /** + * @var int page wicth + */ public $page_largeur; /** - * @var array + * @var array{fullpath:string} */ public $result; diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index d5b62a2779195..e68765f190c5c 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -90,7 +90,7 @@ class pdf_octopus extends ModelePDFFactures public $heightforfreetext; /** - * @var int height for footer + * @var float height for footer */ public $heightforfooter; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index 4268e3e1b5f06..e9fc9667192fa 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -88,7 +88,7 @@ class pdf_sponge extends ModelePDFFactures public $heightforfreetext; /** - * @var int heightforfooter + * @var float heightforfooter */ public $heightforfooter; diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index cb91305a48368..47c766d525b1b 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -87,7 +87,10 @@ public function __construct($db) // 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) // ); $this->const = array(); - //$this->const[] = array('AGENDA_DEFAULT_FILTER_TYPE', 'chaine', 'AC_NON_AUTO', 'Default filter for type of event on agenda', 0, 'current'); + $r = 0; + + // $this->const[$r] = ["ACTION_EVENT_ADDON_PDF", "chaine", "standard", 'Name of PDF model of actioncomm', 0]; + // $this->const[] = array('AGENDA_DEFAULT_FILTER_TYPE', 'chaine', 'AC_NON_AUTO', 'Default filter for type of event on agenda', 0, 'current'); $sqlreadactions = "SELECT code, label, description FROM ".MAIN_DB_PREFIX."c_action_trigger ORDER by rang"; $resql = $this->db->query($sqlreadactions); if ($resql) { @@ -605,8 +608,8 @@ public function init($options = '') $this->remove($options); $sql = array( - "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type='member' AND entity = ".((int) $conf->entity), - "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','member',".((int) $conf->entity).")" + "DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[0][2])."' AND type='action' AND entity = ".((int) $conf->entity), + // "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','action',".((int) $conf->entity).")" ); return $this->_init($sql, $options); From c5607dd212cd1dad9839af8ecf98502ac2f6c819 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 05:32:27 +0200 Subject: [PATCH 121/329] FIX Debug calculation of the delay of purchase order --- .../class/fournisseur.commande.class.php | 15 ++++++++------- .../fourn/class/fournisseur.product.class.php | 19 ++++++++++--------- htdocs/langs/en_US/suppliers.lang | 2 +- htdocs/langs/fr_FR/suppliers.lang | 2 +- htdocs/product/price_suppliers.php | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 3a66552be4ff2..302f627553f79 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3420,16 +3420,17 @@ public function getMaxDeliveryTimeDay($langs) return ''; } - $obj = new ProductFournisseur($this->db); + $tmpproductfourn = new ProductFournisseur($this->db); $nb = 0; foreach ($this->lines as $line) { if ($line->fk_product > 0) { - $idp = $obj->find_min_price_product_fournisseur($line->fk_product, $line->qty); - if ($idp) { - $obj->fetch($idp); - if ($obj->delivery_time_days > $nb) { - $nb = $obj->delivery_time_days; + // Load delivery_time_days, return id into product_fournisseur_price + $idp = $tmpproductfourn->find_min_price_product_fournisseur($line->fk_product, $line->qty, $this->thirdparty->id); + if ($idp > 0) { + //$tmpproductfourn->fetch_product_fournisseur_price($idp); + if ($tmpproductfourn->delivery_time_days > $nb) { + $nb = $tmpproductfourn->delivery_time_days; } } } @@ -3438,7 +3439,7 @@ public function getMaxDeliveryTimeDay($langs) if ($nb === 0) { return ''; } else { - return $nb.' '.$langs->trans('Days'); + return $nb.' '.$langs->trans('days'); } } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index d329b1692ef9d..ad3ab2b3cb9cb 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -678,7 +678,7 @@ public function update_buyprice( /** * Loads the price information of a provider * - * @param int $rowid Line id + * @param int $rowid Line id in product_fournisseur_price * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead * @return int Return integer < 0 if KO, 0 if OK but not found, > 0 if OK */ @@ -890,15 +890,13 @@ public function list_product_fournisseur_price($prodid, $sortfield = '', $sortor * * @param int $prodid Product id * @param float $qty Minimum quantity - * @param int $socid get min price for specific supplier + * @param int $socid Load min price for this specific supplier * @return int Return integer <0 if KO, 0=Not found of no product id provided, >0 if OK * @see list_product_fournisseur_price() */ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0) { // phpcs:enable - global $conf; - if (empty($prodid)) { dol_syslog("Warning function find_min_price_product_fournisseur were called with prodid empty. May be a bug.", LOG_WARNING); return 0; @@ -926,8 +924,8 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql .= " pfp.rowid as product_fourn_price_id, pfp.ref_fourn,"; $sql .= " pfp.price, pfp.quantity, pfp.unitprice, pfp.tva_tx, pfp.charges,"; - $sql .= " pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days"; - $sql .= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; + $sql .= " pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days,"; + $sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; $sql .= " AND pfp.entity IN (".getEntity('productsupplierprice').")"; @@ -984,7 +982,9 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $fourn_unitprice_with_discount = (float) $fourn_unitprice * (1 - $record["remise_percent"] / 100); } } + if ($fourn_unitprice < $min || $min == -1) { + $this->id = $prodid; $this->product_fourn_price_id = $record["product_fourn_price_id"]; $this->ref_supplier = $record["ref_fourn"]; $this->ref_fourn = $record["ref_fourn"]; // deprecated @@ -997,23 +997,24 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $this->fourn_unitprice_with_discount = $fourn_unitprice_with_discount; $this->fourn_charges = $record["charges"]; // when getDolGlobalString('PRODUCT_CHARGES') is set $this->fourn_tva_tx = $record["tva_tx"]; - $this->fourn_id = $record["fourn_id"]; + $this->fourn_id = $record["fourn_id"]; // thirdparty id $this->fourn_name = $record["supplier_name"]; $this->delivery_time_days = $record["delivery_time_days"]; $this->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; - $this->id = $prodid; $this->fourn_multicurrency_price = $record["multicurrency_price"]; $this->fourn_multicurrency_unitprice = $record["multicurrency_unitprice"]; $this->fourn_multicurrency_tx = $record["multicurrency_tx"]; $this->fourn_multicurrency_id = $record["fk_multicurrency"]; $this->fourn_multicurrency_code = $record["multicurrency_code"]; + $min = $fourn_unitprice; } } } $this->db->free($resql); - return 1; + + return $this->product_fourn_price_id; } else { $this->error = $this->db->error(); return -1; diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 156730ab5aadf..96e98f98df80c 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -36,7 +36,7 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %s%s SentToSuppliers=Envoyés aux fournisseurs ListOfSupplierOrders=Liste des commandes fournisseurs MenuOrdersSupplierToBill=Commandes fournisseurs en facture -NbDaysToDelivery=Délai de livraison en jours +NbDaysToDelivery=Délai de livraison DescNbDaysToDelivery=Le plus gros délai de livraison parmi les produits de cette commande SupplierReputation=Réputation du fournisseur ReferenceReputation=Réputation diff --git a/htdocs/product/price_suppliers.php b/htdocs/product/price_suppliers.php index 6ef96d8e336ab..eea13af4a8037 100644 --- a/htdocs/product/price_suppliers.php +++ b/htdocs/product/price_suppliers.php @@ -792,7 +792,7 @@ function edit_price_from_multicurrency() { // Delivery delay in days print ''; print ''; - print ''; + print ''; print ''; // Reputation From a69022a3bb711321fb990c38c420e48a71bf64c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 05:32:27 +0200 Subject: [PATCH 122/329] FIX Debug calculation of the delay of purchase order --- .../class/fournisseur.commande.class.php | 15 ++++++++------- .../fourn/class/fournisseur.product.class.php | 19 ++++++++++--------- htdocs/langs/en_US/suppliers.lang | 2 +- htdocs/langs/fr_FR/suppliers.lang | 2 +- htdocs/product/price_suppliers.php | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index eef701fb00db6..17d6dbeb7490a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3375,16 +3375,17 @@ public function getMaxDeliveryTimeDay($langs) return ''; } - $obj = new ProductFournisseur($this->db); + $tmpproductfourn = new ProductFournisseur($this->db); $nb = 0; foreach ($this->lines as $line) { if ($line->fk_product > 0) { - $idp = $obj->find_min_price_product_fournisseur($line->fk_product, $line->qty); - if ($idp) { - $obj->fetch($idp); - if ($obj->delivery_time_days > $nb) { - $nb = $obj->delivery_time_days; + // Load delivery_time_days, return id into product_fournisseur_price + $idp = $tmpproductfourn->find_min_price_product_fournisseur($line->fk_product, $line->qty, $this->thirdparty->id); + if ($idp > 0) { + //$tmpproductfourn->fetch_product_fournisseur_price($idp); + if ($tmpproductfourn->delivery_time_days > $nb) { + $nb = $tmpproductfourn->delivery_time_days; } } } @@ -3393,7 +3394,7 @@ public function getMaxDeliveryTimeDay($langs) if ($nb === 0) { return ''; } else { - return $nb.' '.$langs->trans('Days'); + return $nb.' '.$langs->trans('days'); } } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index a08f43fd36522..089bfbefdb522 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -671,7 +671,7 @@ public function update_buyprice( /** * Loads the price information of a provider * - * @param int $rowid Line id + * @param int $rowid Line id in product_fournisseur_price * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead * @return int Return integer < 0 if KO, 0 if OK but not found, > 0 if OK */ @@ -883,15 +883,13 @@ public function list_product_fournisseur_price($prodid, $sortfield = '', $sortor * * @param int $prodid Product id * @param float $qty Minimum quantity - * @param int $socid get min price for specific supplier + * @param int $socid Load min price for this specific supplier * @return int Return integer <0 if KO, 0=Not found of no product id provided, >0 if OK * @see list_product_fournisseur_price() */ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0) { // phpcs:enable - global $conf; - if (empty($prodid)) { dol_syslog("Warning function find_min_price_product_fournisseur were called with prodid empty. May be a bug.", LOG_WARNING); return 0; @@ -919,8 +917,8 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql .= " pfp.rowid as product_fourn_price_id, pfp.ref_fourn,"; $sql .= " pfp.price, pfp.quantity, pfp.unitprice, pfp.tva_tx, pfp.charges,"; - $sql .= " pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days"; - $sql .= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; + $sql .= " pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days,"; + $sql .= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql .= " WHERE s.entity IN (".getEntity('societe').")"; $sql .= " AND pfp.entity IN (".getEntity('productsupplierprice').")"; @@ -977,7 +975,9 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $fourn_unitprice_with_discount = $fourn_unitprice * (1 - $record["remise_percent"] / 100); } } + if ($fourn_unitprice < $min || $min == -1) { + $this->id = $prodid; $this->product_fourn_price_id = $record["product_fourn_price_id"]; $this->ref_supplier = $record["ref_fourn"]; $this->ref_fourn = $record["ref_fourn"]; // deprecated @@ -990,23 +990,24 @@ public function find_min_price_product_fournisseur($prodid, $qty = 0, $socid = 0 $this->fourn_unitprice_with_discount = $fourn_unitprice_with_discount; $this->fourn_charges = $record["charges"]; // when getDolGlobalString('PRODUCT_CHARGES') is set $this->fourn_tva_tx = $record["tva_tx"]; - $this->fourn_id = $record["fourn_id"]; + $this->fourn_id = $record["fourn_id"]; // thirdparty id $this->fourn_name = $record["supplier_name"]; $this->delivery_time_days = $record["delivery_time_days"]; $this->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; - $this->id = $prodid; $this->fourn_multicurrency_price = $record["multicurrency_price"]; $this->fourn_multicurrency_unitprice = $record["multicurrency_unitprice"]; $this->fourn_multicurrency_tx = $record["multicurrency_tx"]; $this->fourn_multicurrency_id = $record["fk_multicurrency"]; $this->fourn_multicurrency_code = $record["multicurrency_code"]; + $min = $fourn_unitprice; } } } $this->db->free($resql); - return 1; + + return $this->product_fourn_price_id; } else { $this->error = $this->db->error(); return -1; diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index 156730ab5aadf..96e98f98df80c 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -36,7 +36,7 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %s%s SentToSuppliers=Envoyés aux fournisseurs ListOfSupplierOrders=Liste des commandes fournisseurs MenuOrdersSupplierToBill=Commandes fournisseurs en facture -NbDaysToDelivery=Délai de livraison en jours +NbDaysToDelivery=Délai de livraison DescNbDaysToDelivery=Le plus gros délai de livraison parmi les produits de cette commande SupplierReputation=Réputation du fournisseur ReferenceReputation=Réputation diff --git a/htdocs/product/price_suppliers.php b/htdocs/product/price_suppliers.php index 22c300ce5b90f..2f0c7deba4da0 100644 --- a/htdocs/product/price_suppliers.php +++ b/htdocs/product/price_suppliers.php @@ -792,7 +792,7 @@ function edit_price_from_multicurrency() { // Delivery delay in days print ''; print ''; - print ''; + print ''; print ''; // Reputation From a762d4111d482c5c14f5683123a094bfce99aa63 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 05:57:57 +0200 Subject: [PATCH 123/329] FIX Debug link to user in list of product prices --- htdocs/product/price.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 8e1bd9f562a48..b9a2d280f73f1 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -2085,7 +2085,7 @@ function on_change() { print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -2231,7 +2231,7 @@ function on_change() { $userstatic = new User($db); $userstatic->fetch($line->fk_user); // @TODO Add a cache on $users object - print ''; @@ -2351,7 +2351,7 @@ function on_change() { print ''; print ''; print ''; - print ''; + print ''; if ($user->hasRight('produit', 'supprimer')) { print ''; } @@ -2486,11 +2486,11 @@ function on_change() { print ''; // User - print ''; From 885be61dbd2df8d25de9455ad383d996b0e37b30 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 13:02:44 +0200 Subject: [PATCH 124/329] Fix phan --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b8421fb0d7878..e705ea36bc817 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9537,7 +9537,7 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI * @param string[] $restrictlinksto Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction. * @param string[] $excludelinksto Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion. * @param int $nooutput 1=Return array with content instead of printing it. - * @return string HTML block + * @return string|array HTML block or array with htmlblock (depending on $nooutput value) */ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array(), $nooutput = 0) { From d154af4e41012874a13f9a549fddcb9e42c80945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 13:03:58 +0200 Subject: [PATCH 125/329] fix phpstan (#31180) * fix phpstan * fix phpstan * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur --- htdocs/blockedlog/class/blockedlog.class.php | 2 +- htdocs/core/class/html.form.class.php | 60 ++++++++++---------- phpstan.neon.dist | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index dc5ce2b572947..b559ee8409610 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -1220,7 +1220,7 @@ public function getSignature() require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(1), '5'); + $fingerprint = dol_hash(print_r($mysoc, true).getRandomPassword(true), '5'); dolibarr_set_const($db, 'BLOCKEDLOG_ENTITY_FINGERPRINT', $fingerprint, 'chaine', 0, 'Numeric Unique Fingerprint', $conf->entity); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e705ea36bc817..a7bd8a5b5c756 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4653,17 +4653,17 @@ public function getSelectConditionsPaiements($selected = 0, $htmlname = 'condid' * Return list of payment methods * Constant MAIN_DEFAULT_PAYMENT_TYPE_ID can used to set default value but scope is all application, probably not what you want. * - * @param string $selected Id or code or preselected payment mode - * @param string $htmlname Name of select field - * @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz)) - * @param int $format 0=id+label, 1=code+code, 2=code+label, 3=id+code - * @param int $empty 1=can be empty, 0 otherwise - * @param int $noadmininfo 0=Add admin info, 1=Disable admin info - * @param int $maxlength Max length of label - * @param int $active Active or not, -1 = all - * @param string $morecss Add more CSS on select tag - * @param int $nooutput 1=Return string, do not send to output - * @return string|void String for the HTML select component + * @param string $selected Id or code or preselected payment mode + * @param string $htmlname Name of select field + * @param string $filtertype To filter on field type in llx_c_paiement ('CRDT' or 'DBIT' or array('code'=>xx,'label'=>zz)) + * @param int $format 0=id+label, 1=code+code, 2=code+label, 3=id+code + * @param int $empty 1=can be empty, 0 otherwise + * @param int $noadmininfo 0=Add admin info, 1=Disable admin info + * @param int $maxlength Max length of label + * @param int $active Active or not, -1 = all + * @param string $morecss Add more CSS on select tag + * @param int<0,1> $nooutput 1=Return string, do not send to output + * @return string|void String for the HTML select component */ public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0) { @@ -5120,7 +5120,7 @@ public function selectUnits($selected = '', $htmlname = 'units', $showempty = 0, * @param string $moreattrib To add more attribute on select * @param int $showcurrency Show currency in label * @param string $morecss More CSS - * @param int $nooutput 1=Return string, do not send to output + * @param int<0,1> $nooutput 1=Return string, do not send to output * @return int|string If noouput=0: Return integer <0 if error, Num of bank account found if OK (0, 1, 2, ...), If nooutput=1: Return a HTML select string. */ public function select_comptes($selected = '', $htmlname = 'accountid', $status = 0, $filtre = '', $useempty = 0, $moreattrib = '', $showcurrency = 0, $morecss = '', $nooutput = 0) @@ -5882,7 +5882,7 @@ function(data) { $("body").html(data); jQuery("html,body,#id-container").removeC * @param int $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable) * @param int $maxlength Max length * @param int $forcefocus Force focus on field (works with javascript only) - * @param int $nooutput No print is done. String is returned. + * @param int<0,1> $nooutput No print is done. String is returned. * @param string $textifnoproject Text to show if no project * @param string $morecss More CSS * @return string Return html content @@ -5940,7 +5940,7 @@ public function form_project($page, $socid, $selected = '', $htmlname = 'project * @param int $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters) * 0 : use default deposit percentage from entry * > 0 : force deposit percentage (for example, from company object) - * @param int $nooutput No print is done. String is returned. + * @param int<0,1> $nooutput No print is done. String is returned. * @return string HTML output or '' */ public function form_conditions_reglement($page, $selected = '', $htmlname = 'cond_reglement_id', $addempty = 0, $type = '', $filtertype = -1, $deposit_percent = -1, $nooutput = 0) @@ -6065,7 +6065,7 @@ public function formInputReason($page, $selected = '', $htmlname = 'demandreason * @param string $htmlname Html name of date input fields or 'none' * @param int $displayhour Display hour selector * @param int $displaymin Display minutes selector - * @param int $nooutput 1=No print output, return string + * @param int<0,1> $nooutput 1=No print output, return string * @param string $type 'direct-debit' or 'bank-transfer' * @return string * @see selectDate() @@ -6154,7 +6154,7 @@ public function form_users($page, $selected = '', $htmlname = 'userid', $exclude * @param int $active Active or not, -1 = all * @param int $addempty 1=Add empty entry * @param string $type Type ('direct-debit' or 'bank-transfer') - * @param int $nooutput 1=Return string, no output + * @param int<0,1> $nooutput 1=Return string, no output * @return string HTML output or '' */ public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '', $nooutput = 0) @@ -6446,7 +6446,7 @@ public function form_contacts($page, $societe, $selected = '', $htmlname = 'cont * @param int<0,1> $showtype Show third party type in combolist (customer, prospect or supplier) * @param int<0,1> $forcecombo Force to use combo box * @param array}> $events Event options. Example: array(array('method'=>'getContacts', 'url'=>dol_buildpath('/core/ajax/contacts.php',1), 'htmlname'=>'contactid', 'params'=>array('add-customer-contact'=>'disabled'))) - * @param int $nooutput No print output. Return it only. + * @param int<0,1> $nooutput No print output. Return it only. * @param int[] $excludeids Exclude IDs from the select combo * @param string $textifnothirdparty Text to show if no thirdparty * @return string HTML output or '' @@ -6948,7 +6948,7 @@ public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_ven * @param string $form_name Not used * @param int $d 1=Show days, month, years * @param int $addnowlink Add a link "Now" - * @param int $nooutput Do not output html string but return it + * @param int<0,1> $nooutput Do not output html string but return it * @param int $disabled Disable input fields * @param int $fullday When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59 * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. @@ -7508,7 +7508,7 @@ public function selectTypeDuration($prefix, $selected = 'i', $excludetypes = arr * If 'text' input hour is in text and input min is a text, * If 'textselect' input hour is in text and input min is a combo * @param integer $minunderhours If 1, show minutes selection under the hours - * @param int $nooutput Do not output html string but return it + * @param int<0,1> $nooutput Do not output html string but return it * @return string HTML component */ public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) @@ -9536,8 +9536,8 @@ public function showLinkedObjectBlock($object, $morehtmlright = '', $compatibleI * @param CommonObject $object Object we want to show links to * @param string[] $restrictlinksto Restrict links to some elements, for example array('order') or array('supplier_order'). null or array() if no restriction. * @param string[] $excludelinksto Do not show links of this type, for example array('order') or array('supplier_order'). null or array() if no exclusion. - * @param int $nooutput 1=Return array with content instead of printing it. - * @return string|array HTML block or array with htmlblock (depending on $nooutput value) + * @param int<0,1> $nooutput 1=Return array with content instead of printing it. + * @return array{linktoelem:string,htmltoenteralink:string}|string HTML block */ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array(), $nooutput = 0) { @@ -9766,18 +9766,18 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl if ($linktoelemlist) { $linktoelem = ' - '; } else { $linktoelem = ''; } @@ -9792,7 +9792,7 @@ public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excl }); }); - '; + '; } if ($nooutput) { diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4044a33546d77..0d72459e6164d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -70,7 +70,7 @@ parameters: - '#\$httpStatusCode of class Luracast\\Restler\\RestException constructor expects string, int given.#' - '#(?:(?:s(?:(?:et_error_handl|pl_autoload_regist)er)|array_filter)) expects \(callable#' - '# (dol_print_date|correctExifImageOrientation) expects bool\|string#' - - '# (getRandomPassword|vatrate|DolEditor constructor) expects bool, int#' + - '# (vatrate|DolEditor constructor) expects bool, int#' - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - '# (dolibarr_set_const|getLocalTaxesFromRate) expects int\|string#' - '#::(options)\(\) expects int\|string#' From cab697f557f9aab9a4cc7fce2d722e7cbf9a52ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 13:07:21 +0200 Subject: [PATCH 126/329] fix phpstan (#31183) * fix phpstan * fix phpstan --- htdocs/core/lib/ldap.lib.php | 11 +++++------ phpstan.neon.dist | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/ldap.lib.php b/htdocs/core/lib/ldap.lib.php index a3ea72226a19a..9b5c039372e30 100644 --- a/htdocs/core/lib/ldap.lib.php +++ b/htdocs/core/lib/ldap.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2006-2021 Regis Houssin - * Copyright (C) 2024 MDW +/* Copyright (C) 2006 Laurent Destailleur + * Copyright (C) 2006-2021 Regis Houssin + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -125,15 +126,13 @@ function show_ldap_test_button($butlabel, $testlabel, $key, $dn, $objectclass) * @param array<'count'|int|string,int|string|array> $result Array to show. This array is already encoded into charset_output * @param int $level Level * @param int $count Count - * @param string $var Var + * @param bool $var Var deprecated (replaced by css oddeven) * @param int<0,1> $hide Hide * @param int $subcount Subcount * @return int */ function show_ldap_content($result, $level, $count, $var, $hide = 0, $subcount = 0) { - global $bc, $conf; - $count--; if ($count == 0) { return -1; // To stop loop diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 0d72459e6164d..4510d0c9e7c96 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -94,7 +94,6 @@ parameters: - '#::HTML2OpenIDServer\(\) expects string, array given.#' - '#create_line\(\) expects string, float given.#' - '# dol_stringtotime expects string, DateTime given.#' - - '# show_ldap_content expects string, true given.#' - '#expects string, bool\|mysqli_result\|resource given.#' - '#( |::)((multi)?selectarray)\(\) expects array#' - '# (reWriteAllMenus|check_authentication) expects array#' From 741cca5eb4f18dcc22e2af4cd64034419b87a7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 13:07:40 +0200 Subject: [PATCH 127/329] fix phpstan (#31184) * fix phpstan * fix phpstan --- htdocs/projet/admin/project.php | 2 +- htdocs/stripe/admin/stripe.php | 2 +- phpstan.neon.dist | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 328c3490b6cde..a1e2c984e58b5 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -274,7 +274,7 @@ print ''; print ''; print '"; print ''; diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 9c31175b1ab49..c00d7a0d09cef 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -593,7 +593,7 @@ print ''; + + if ($conf->browser->layout == 'phone') { + print ''; + } print ''; print ''; } @@ -2449,7 +2454,7 @@ function manageprospectcustomer(element) { // Country print ''; } From 2c4e4a57a85047d69cee7cccdbbff4fc860a8255 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 12:35:06 +0200 Subject: [PATCH 228/329] Clean code --- htdocs/admin/ihm.php | 35 ++++++++------------------- htdocs/core/class/doleditor.class.php | 8 +++++- 2 files changed, 17 insertions(+), 26 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index cb4baa5517035..38b0d37fb6ce6 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -338,9 +338,9 @@ 0, 0, array( - '/includes/ace/src/ace.js', - '/includes/ace/src/ext-statusbar.js', - '/includes/ace/src/ext-language_tools.js', + '/includes/ace/src/ace.js', + '/includes/ace/src/ext-statusbar.js', + '/includes/ace/src/ext-language_tools.js', ), array(), '', @@ -456,36 +456,28 @@ print ''; print ''; - // show input border - /* - print ''; - print ''; - */ - // First day for weeks print ''; print ''; // DefaultWorkingDays print ''; print ''; // DefaultWorkingHours print ''; print ''; // Firstname/Name print ''; print ''; @@ -523,7 +515,7 @@ print ''; print ''; @@ -561,17 +553,10 @@ print '' . "\n"; - - /* no more need for this option. It is now a widget already controlled by end user - print ''; - print ''; - */ + print ''."\n"; print '
    ' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("Ref") . '' . $langs->trans("RefCustomer") . '' . $langs->trans("AmountHTShort") . '' . $langs->trans("Company") . '' . $langs->trans("Company") . '
    '; + $htmltoenteralink .= ''; $htmltoenteralink .= ''; $htmltoenteralink .= '' . (!empty($objp->ref_client) ? $objp->ref_client : (!empty($objp->ref_supplier) ? $objp->ref_supplier : '')) . ''; if ($possiblelink['label'] == 'LinkToContract') { From a423da6a4b55573a4836b4d749e268b597d58c50 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 01:20:02 +0200 Subject: [PATCH 117/329] CSS Look and feel v21 --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 37cc17e74faed..56a9055942337 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6417,7 +6417,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '', print ''; print '
    '; - print $title; // $title may contains HTML + print ''.dolPrintLabel($title).''; // $title may contains HTML if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') { print '('.$totalnboflines.')'; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 6dd0f80f7e62f..a603148f5d272 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1207,8 +1207,7 @@ .fa-toggle-on, .fa-toggle-off, .size2x { font-size: 2em; } .websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off, .asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off, -.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off -{ +.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off { font-size: 1.5em; vertical-align: text-bottom; } @@ -2184,6 +2183,10 @@ input.buttonpayment { min-width: 300px; } + + .colorblack.totalnboflines { + margin-left: 4px !important; + } } /* Force values for small screen 320 */ From 0e1292e2536a67ddec2e2dd6d713c8f2a57a8055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 02:49:34 +0200 Subject: [PATCH 118/329] fix phpstan (#31177) * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan --- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/adherents/class/adherent_type.class.php | 4 +++- htdocs/admin/system/dolibarr.php | 5 +++-- htdocs/core/lib/functions.lib.php | 8 ++++---- htdocs/core/modules/barcode/modules_barcode.class.php | 6 +++--- htdocs/core/modules/member/modules_member.class.php | 2 +- htdocs/core/modules/product/modules_product.class.php | 6 +++--- htdocs/core/modules/societe/modules_societe.class.php | 6 +++--- phpstan.neon.dist | 2 +- 9 files changed, 22 insertions(+), 19 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 0715d558d01c2..8e5ed262fe419 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -176,7 +176,7 @@ class Adherent extends CommonObject public $morphy; /** - * @var int Info can be public + * @var int<0,1> Info can be public */ public $public; diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 920f5f8838e58..a6b0ebe051377 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -107,7 +107,9 @@ class AdherentType extends CommonObject /** @var string Public note */ public $note_public; - /** @var integer Can vote */ + /** + * @var int<0,1> Can vote + */ public $vote; /** @var string Email sent during validation of member */ diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 866d57cec819c..19c7ec5f819af 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -2,7 +2,8 @@ /* Copyright (C) 2005-2020 Laurent Destailleur * Copyright (C) 2007 Rodolphe Quiedeville * Copyright (C) 2007-2012 Regis Houssin - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -276,7 +277,7 @@ $val = ($a >= 0 ? '+' : '').$a; $val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')'; $val .= '       '.getServerTimeZoneString(); -$val .= '       '.$langs->trans("DaylingSavingTime").': '.((is_null($b) || is_null($c)) ? 'unknown' : ($a == $c ? yn($daylight) : yn(0).($daylight ? '     ('.$langs->trans('YesInSummer').')' : ''))); +$val .= '       '.$langs->trans("DaylingSavingTime").': '.((is_null($b) || is_null($c)) ? 'unknown' : ($a == $c ? yn((int) $daylight) : yn(0).($daylight ? '     ('.$langs->trans('YesInSummer').')' : ''))); print $form->textwithtooltip($val, $txt, 2, 1, img_info('')); print '
      => '.$langs->trans("CurrentHour").''.dol_print_date(dol_now('gmt'), 'dayhour', 'tzserver').'
    '.$langs->trans('NbDaysToDelivery').' '.$langs->trans('days').' '.$langs->trans('days').'
    '.$langs->trans('NbDaysToDelivery').' '.$langs->trans('days').' '.$langs->trans('days').'
    '.$langs->trans("MinPrice").' '.$langs->trans("HT").''.$langs->trans("MinPrice").' '.$langs->trans("TTC").''.$langs->trans("PriceLabel").''.$langs->trans("ChangedBy").''.$langs->trans("ChangedBy").'
    '; + print ''; print $userstatic->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); print ''.$langs->trans("MinPrice").' '.$langs->trans("HT").''.$langs->trans("MinPrice").' '.$langs->trans("TTC").''.$langs->trans("Label").''.$langs->trans("ChangedBy").''.$langs->trans("ChangedBy").' '; + print ''; if ($objp->user_id > 0) { $userstatic = new User($db); $userstatic->fetch($objp->user_id); - print $userstatic->getNomUrl(1, '', 0, 0, 24, 0, 'login'); + print $userstatic->getNomUrl(-1, '', 0, 0, 24, 0, 'login'); } print '
    '.$langs->trans("ManageOpportunitiesStatus").''; -print ajax_constantonoff("PROJECT_USE_OPPORTUNITIES", null, null, 0, 0, 1); +print ajax_constantonoff("PROJECT_USE_OPPORTUNITIES", array(), null, 0, 0, 1); print ''; print "
    '; print $langs->trans("SecurityTokenIsUnique").''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE', null, null, 0, 0, 1); + print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE', array(), null, 0, 0, 1); } else { $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); print $form->selectarray("PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4510d0c9e7c96..f42d7d933805e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -101,7 +101,6 @@ parameters: - '# dolGetButtonTitle expects array Date: Sun, 29 Sep 2024 13:08:11 +0200 Subject: [PATCH 128/329] fix phpstan (#31185) * fix phpstan * fix phpstan --- htdocs/societe/project.php | 4 ++-- phpstan.neon.dist | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php index a12272c94ab69..3781788b03f81 100644 --- a/htdocs/societe/project.php +++ b/htdocs/societe/project.php @@ -6,7 +6,7 @@ * Copyright (C) 2007 Patrick Raguin * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2015 Marcos García - * Copyright (C) 2021 Frédéric France + * Copyright (C) 2021-2024 Frédéric France * * 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 @@ -176,7 +176,7 @@ print dol_get_fiche_end(); print '
    '; - $params = ''; + $params = array(); $backtopage = $_SERVER['PHP_SELF'].'?socid='.$object->id; $newcardbutton = dolGetButtonTitle($langs->trans("NewProject"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create&socid='.$object->id.'&backtopageforcancel='.urlencode($backtopage), '', 1, $params); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f42d7d933805e..d985f2d14740d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -98,7 +98,6 @@ parameters: - '#( |::)((multi)?selectarray)\(\) expects array#' - '# (reWriteAllMenus|check_authentication) expects array#' - '#::(_validateMyObject|select_company)\(\) expects array Date: Sun, 29 Sep 2024 13:09:09 +0200 Subject: [PATCH 129/329] Qual: Add centpecent to codespell, fix css (#31178) # Qual: Add centpecent to codespell, fix css Try to prevent misspelling in css by adding centpecent. Fix corresponding cases Co-authored-by: Laurent Destailleur --- dev/tools/codespell/codespell-dict.txt | 1 + htdocs/categories/viewcat.php | 10 +++++----- htdocs/comm/propal/card.php | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dev/tools/codespell/codespell-dict.txt b/dev/tools/codespell/codespell-dict.txt index 2334fd033276f..776e9c5413a01 100644 --- a/dev/tools/codespell/codespell-dict.txt +++ b/dev/tools/codespell/codespell-dict.txt @@ -8,6 +8,7 @@ aplhanothtml->alphanohtml aploha->alpha aplohanothtml->alphanohtml aplphanothtml->alphanohtml +centpecent->centpercent choosed->chosen cumuled->cumulative dokument->document diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 8c23bf972e947..a11f5309b1abf 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -816,7 +816,7 @@ // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Member"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); - print ''."\n"; + print '
    '."\n"; print ''."\n"; if (count($members) > 0) { @@ -1000,7 +1000,7 @@ // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Account"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit); - print '
    '.$langs->trans("Name").'
    '."\n"; + print '
    '."\n"; print ''."\n"; if (count($accounts) > 0) { @@ -1090,7 +1090,7 @@ // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Project"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit); - print '
    '.$langs->trans("Ref").'
    '."\n"; + print '
    '."\n"; print ''."\n"; if (count($objects) > 0) { @@ -1179,7 +1179,7 @@ // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'user', 0, '', '', $limit); - print '
    '.$langs->trans("Ref").'
    '."\n"; + print '
    '."\n"; print ''."\n"; if (count($users) > 0) { @@ -1245,7 +1245,7 @@ // @phan-suppress-next-line PhanPluginSuspiciousParamOrder print_barre_liste($langs->trans("Warehouses"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'stock', 0, $newcardbutton, '', $limit); - print '
    '.$langs->trans("Users").' '.$num.'
    '."\n"; + print '
    '."\n"; print ''."\n"; if (count($objects) > 0) { diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 628bad3cb1334..c988dcef24cea 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -2714,7 +2714,7 @@ // Payment term print ''; print ''; } print ''; @@ -1856,9 +1856,15 @@ function manageprospectcustomer(element) { print ''; print ''; + print ''; + //print $langs->trans("Currency".$object->multicurrency_code); + print $langs->getCurrencySymbol($object->multicurrency_code); + print ''; } else { - print ''.$langs->trans("Currency".$conf->currency).''; + print ''; + print $langs->getCurrencySymbol($conf->currency); + //print $langs->trans("Currency".$conf->currency); + print ''; } if (getDolGlobalInt('MAIN_MULTILANGS')) { print ''."\n"; print ''."\n"; @@ -93,7 +93,7 @@ if ($defaultcollation != $dolibarr_main_db_collation) { print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$dolibarr_main_db_collation); } - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION")); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); print '       '.$langs->trans("ConvertInto"); From acf002e7f7bd830c158b40cb5a1e515a58535935 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:20:05 +0200 Subject: [PATCH 188/329] Fix phpunit --- htdocs/admin/system/database.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index e5056cfd561a8..db481f82a6aa8 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -82,7 +82,8 @@ print ''."\n"; print ''."\n"; @@ -93,7 +94,8 @@ if ($defaultcollation != $dolibarr_main_db_collation) { print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$dolibarr_main_db_collation); } - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION")); + $tooltipexample = "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'"; + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", $tooltipexample.'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION"))); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); print '       '.$langs->trans("ConvertInto"); From 6f9be540e6414c3d3b09f9d4bee31b3d322b7ccd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:34:25 +0200 Subject: [PATCH 189/329] Typo --- htdocs/langs/en_US/holiday.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index fa0dd6d69a017..698548254b845 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -42,7 +42,7 @@ TypeOfLeaveId=Type of leave ID TypeOfLeaveCode=Type of leave code TypeOfLeaveLabel=Type of leave label NbUseDaysCP=Number of days -NbUseDaysCPHelp=The calculation of the number of days o fleave used takes into account the non-working days and the holidays defined in the dictionary. +NbUseDaysCPHelp=The calculation of the number of days of leave used takes into account the non-working days and the holidays defined in the dictionary. NbUseDaysCPShort=Days of leave NbUseDaysCPShortInMonth=Days of leave in month DayIsANonWorkingDay=%s is a non-working day From 4d64b89c9acbab51338d57635a5b0f68a4d01518 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:40:12 +0200 Subject: [PATCH 190/329] Sync transifex --- htdocs/langs/am_ET/admin.lang | 10 +- htdocs/langs/ar_SA/admin.lang | 10 +- htdocs/langs/az_AZ/admin.lang | 10 +- htdocs/langs/bg_BG/admin.lang | 10 +- htdocs/langs/bn_BD/admin.lang | 10 +- htdocs/langs/bn_IN/admin.lang | 10 +- htdocs/langs/bs_BA/admin.lang | 10 +- htdocs/langs/ca_ES/admin.lang | 10 +- htdocs/langs/cs_CZ/admin.lang | 10 +- htdocs/langs/cy_GB/admin.lang | 10 +- htdocs/langs/da_DK/admin.lang | 18 ++-- htdocs/langs/de_DE/admin.lang | 22 ++-- htdocs/langs/el_GR/admin.lang | 46 +++++---- htdocs/langs/en_US/holiday.lang | 2 +- htdocs/langs/es_AR/admin.lang | 1 - htdocs/langs/es_CL/admin.lang | 1 - htdocs/langs/es_CO/admin.lang | 1 - htdocs/langs/es_CR/admin.lang | 1 - htdocs/langs/es_CU/admin.lang | 1 - htdocs/langs/es_EC/admin.lang | 1 - htdocs/langs/es_ES/admin.lang | 10 +- htdocs/langs/fa_IR/admin.lang | 10 +- htdocs/langs/fi_FI/admin.lang | 40 ++++---- htdocs/langs/fr_CA/admin.lang | 48 ++++++++- htdocs/langs/fr_FR/admin.lang | 14 ++- htdocs/langs/gl_ES/admin.lang | 17 +-- htdocs/langs/he_IL/admin.lang | 10 +- htdocs/langs/hr_HR/admin.lang | 10 +- htdocs/langs/hu_HU/admin.lang | 10 +- htdocs/langs/id_ID/admin.lang | 10 +- htdocs/langs/it_IT/admin.lang | 10 +- htdocs/langs/ja_JP/admin.lang | 18 ++-- htdocs/langs/kk_KZ/admin.lang | 10 +- htdocs/langs/km_KH/admin.lang | 10 +- htdocs/langs/lo_LA/admin.lang | 10 +- htdocs/langs/lv_LV/admin.lang | 176 ++++++++++++++++---------------- htdocs/langs/mk_MK/admin.lang | 10 +- htdocs/langs/nb_NO/admin.lang | 14 ++- htdocs/langs/nl_NL/admin.lang | 30 +++--- htdocs/langs/pl_PL/admin.lang | 10 +- htdocs/langs/pt_PT/admin.lang | 10 +- htdocs/langs/ro_RO/admin.lang | 20 ++-- htdocs/langs/ru_RU/admin.lang | 10 +- htdocs/langs/sk_SK/admin.lang | 10 +- htdocs/langs/sl_SI/admin.lang | 10 +- htdocs/langs/sq_AL/admin.lang | 10 +- htdocs/langs/sv_SE/admin.lang | 10 +- htdocs/langs/sw_SW/admin.lang | 10 +- htdocs/langs/ta_IN/admin.lang | 10 +- htdocs/langs/tg_TJ/admin.lang | 10 +- htdocs/langs/th_TH/admin.lang | 10 +- htdocs/langs/tr_TR/admin.lang | 34 +++--- htdocs/langs/uk_UA/admin.lang | 10 +- htdocs/langs/ur_PK/admin.lang | 10 +- htdocs/langs/uz_UZ/admin.lang | 10 +- htdocs/langs/vi_VN/admin.lang | 10 +- htdocs/langs/zh_CN/admin.lang | 10 +- htdocs/langs/zh_HK/admin.lang | 18 ++-- htdocs/langs/zh_TW/admin.lang | 10 +- 59 files changed, 571 insertions(+), 332 deletions(-) diff --git a/htdocs/langs/am_ET/admin.lang b/htdocs/langs/am_ET/admin.lang index f366206003b4b..2a744aa1f7ce3 100644 --- a/htdocs/langs/am_ET/admin.lang +++ b/htdocs/langs/am_ET/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=የእሴቶቹ ዝርዝር የቅርጸት ቁልፍ፣ እሴት (ቁልፉ '0' ሊሆን የማይችልበት) መስመሮች መሆን አለባቸው

    ለምሳሌ :
    1,value1
    2,value2,
    3,value3n
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=መለኪያዎች ObjectName:Classpath
    አገባብ መሆን አለባቸው የነገር ስም: ክፍል ExtrafieldParamHelpSeparator=ለቀላል መለያየት ባዶ ያቆዩ
    ለሚሰበሰብ መለያየት ይህንን ወደ 1 ያዋቅሩት (ለአዲስ ክፍለ ጊዜ በነባሪነት ክፈት፣ ከዚያ ለእያንዳንዱ ክፍለ ጊዜ ሁኔታ ይቀመጣል)
    ይህን ወደ 2 አዘጋጅ ለሚፈርስ መለያየት (ለአዲስ ክፍለ ጊዜ በነባሪነት ወድቋል፣ ከዚያ ሁኔታ ለእያንዳንዱ ተጠቃሚ ክፍለ ጊዜ ይጠበቃል) LibraryToBuildPDF=ለፒዲኤፍ ማመንጨት የሚያገለግል ላይብረሪ @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=የሬጌክስ ማጣሪያ ዋጋን ለማፅ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=ለደንበኞች ወይም አቅራቢዎች ንዑስ መለያዎችን ሲያመነጩ የተወሰኑ ቃላትን ያጽዱ RemoveSpecialWordsHelp=የደንበኛውን ወይም የአቅራቢውን ሂሳብ ከማስላትዎ በፊት የሚጸዱትን ቃላት ይግለጹ። ";" ይጠቀሙ በእያንዳንዱ ቃል መካከል -GDPRContact=የውሂብ ጥበቃ ኦፊሰር (DPO፣ የውሂብ ግላዊነት ወይም የGDPR እውቂያ) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=በመረጃ ስርዓትዎ ውስጥ የግል መረጃን ካከማቻሉ፣ ለአጠቃላይ የውሂብ ጥበቃ ደንብ ኃላፊነት ያለበትን አድራሻ እዚህ መሰየም ይችላሉ። HelpOnTooltip=በመሳሪያ ጫፍ ላይ እንዲታይ የእገዛ ጽሑፍ HelpOnTooltipDesc=ይህ መስክ በቅጽ ላይ ሲታይ ጽሑፉ በመሳሪያ ጥቆማ ውስጥ እንዲታይ የጽሁፍ ወይም የትርጉም ቁልፍ እዚህ ያስቀምጡ @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=የሶስተኛ ወገን ስም - የሶስተኛ ወገን ALIAS_THIRDPARTY=የሶስተኛ ወገን ተለዋጭ ስም - የሶስተኛ ወገን ስም PDFIn2Languages=በፒዲኤፍ ውስጥ መለያዎችን በ2 የተለያዩ ቋንቋዎች አሳይ (ይህ ባህሪ ለተወሰኑ ሁለት ቋንቋዎች ላይሰራ ይችላል) PDF_USE_ALSO_LANGUAGE_CODE=በፒዲኤፍዎ ውስጥ አንዳንድ ጽሑፎች በ2 የተለያዩ ቋንቋዎች በተመሳሳይ የመነጨ ፒዲኤፍ እንዲባዙ ከፈለጉ፣ እዚህ ሁለተኛ ቋንቋ ማዘጋጀት አለብዎት ስለዚህ የመነጨ ፒዲኤፍ በተመሳሳይ ገጽ ውስጥ 2 የተለያዩ ቋንቋዎችን ይይዛል ፣ ፒዲኤፍ ሲያመነጭ የሚመረጠው እና ይህ (() ይህንን የሚደግፉት ጥቂት የፒዲኤፍ አብነቶች ብቻ ናቸው)። ለ 1 ቋንቋ በፒዲኤፍ ባዶ ያስቀምጡ። -PDF_USE_A=በነባሪ ቅርጸት ፒዲኤፍ ፋንታ የፒዲኤፍ ሰነዶችን በፒዲኤፍ/ኤ ቅርጸት ይፍጠሩ +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=የFontAwesome አዶ ኮድ እዚህ ያስገቡ። FontAwesome ምን እንደሆነ ካላወቁ፣ አጠቃላይ ዋጋ ያለው የ fa-address-book መጠቀም ይችላሉ። RssNote=ማሳሰቢያ፡ እያንዳንዱ የአርኤስኤስ መጋቢ ፍቺ በዳሽቦርድ ውስጥ እንዲገኝ ማንቃት ያለብዎትን መግብር ያቀርባል JumpToBoxes=ወደ ማዋቀር ይዝለሉ -> መግብሮች @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index fe5a7f7d8293f..44545c60092e9 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=يجب أن تكون قائمة القيم أسطرً ExtrafieldParamHelpcheckbox=يجب أن تكون قائمة القيم أسطرًا تحتوي على مفتاح تنسيق ، القيمة (حيث لا يمكن أن يكون المفتاح "0")

    على سبيل المثال:
    1 ، value1
    2 ، value2 a0342fccfda19bda19b342 ... ExtrafieldParamHelpradio=يجب أن تكون قائمة القيم أسطرًا تحتوي على مفتاح تنسيق ، القيمة (حيث لا يمكن أن يكون المفتاح '0')

    على سبيل المثال:
    1 ، value1
    2 ، value2 a0342fccfda19bda19b342 ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=يجب أن تكون المعلمات ObjectName: Classpath
    البنية: اسم الكائن: Classpath ExtrafieldParamHelpSeparator=احتفظ به فارغًا لفاصل بسيط
    اضبط هذا على 1 لفاصل مطوي (يفتح افتراضيًا للجلسة الجديدة ، ثم يتم الاحتفاظ بالحالة لكل جلسة مستخدم)
    اضبط هذا على 2 لفاصل مطوي (مطوي افتراضيًا لجلسة جديدة ، ثم يتم الاحتفاظ بالحالة قبل كل جلسة مستخدم) LibraryToBuildPDF=المكتبة المستخدمة لتوليد ملفات صيغة المستندات المتنقلة @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=مرشح Regex لتنظيف القيمة (COMPANY_ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=تنظيف كلمات معينة عند إنشاء حسابات فرعية للعملاء أو الموردين RemoveSpecialWordsHelp=حدد الكلمات المراد تنظيفها قبل حساب حساب العميل أو مورد. إستخدم "؛" بين كل كلمة -GDPRContact=مسؤول حماية البيانات (DPO أو خصوصية البيانات أو جهة اتصال GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=إذا قمت بتخزين البيانات الشخصية في نظام المعلومات الخاص بك ، فيمكنك تسمية جهة الاتصال المسؤولة عن اللائحة العامة لحماية البيانات هنا HelpOnTooltip=نص المساعدة للظهور في تلميح الأداة HelpOnTooltipDesc=ضع نصًا أو مفتاح ترجمة هنا حتى يظهر النص في تلميح عندما يظهر هذا الحقل في نموذج @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=اسم الطرف الثالث - الاسم المستعار ل ALIAS_THIRDPARTY=الاسم المستعار لجهة خارجية - اسم الجهة الخارجية PDFIn2Languages=إظهار التسميات في ملف PDF بلغتين مختلفتين (قد لا تعمل هذه الميزة مع بعض اللغات) PDF_USE_ALSO_LANGUAGE_CODE=اذا كنت ترغب في تكرار بعض النصوص بلغتين مختلفتين في ملفاتك المولدة بصيغة المستندات المتنقلة . يجب عليك ان ان تحدد اللغة الثانية هنا حتى يتسنى للملفات المولدة ان تحتوي على لغتين في نفس الصفحة . اللغة المختارة اثناء توليد المستند واللغة المختارة هنا (فقط بعض قوالب صيغة المستندات المتنقلة تدعم هذه الميزة) . ابق الخيار فارغاً للتوليد بلغة واحدة -PDF_USE_A=قم بإنشاء مستندات PDF بتنسيق PDF/A بدلاً من التنسيق الافتراضي PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=أدخل هنا رمز رمز FontAwesome. إذا كنت لا تعرف ما هو FontAwesome ، فيمكنك استخدام القيمة العامة fa-address-book. RssNote=ملاحظة: كل تعريف لمصدر اخبار مختصرة يوفر بريمج يجب تفعيله ليكون متاحا في لوحة المعلومات JumpToBoxes=اذهب الى الاعدادت -> البريمجات @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/az_AZ/admin.lang b/htdocs/langs/az_AZ/admin.lang index d21c380003827..459bf5845f3c8 100644 --- a/htdocs/langs/az_AZ/admin.lang +++ b/htdocs/langs/az_AZ/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrlər ObjectName:Classpath
    Sintaksis: ObjectName:Classpath olmalıdır ExtrafieldParamHelpSeparator=Sadə ayırıcı üçün boş saxlayın
    Dağlanan ayırıcı üçün bunu 1-ə təyin edin (defolt olaraq yeni sessiya üçün açılır, sonra status hər istifadəçi sessiyası üçün saxlanılır)
    Bunu yığışdıran ayırıcı üçün 2-yə təyin edin (yeni sessiya üçün defolt olaraq yığışdırılır, sonra status hər istifadəçi seansından əvvəl saxlanılır) LibraryToBuildPDF=PDF yaratmaq üçün istifadə olunan kitabxana @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Təmiz dəyər üçün regex filtri (COMPANY_DIGIT DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Müştərilər və ya təchizatçılar üçün sub-hesablar yaradan zaman müəyyən sözləri təmizləyin RemoveSpecialWordsHelp=Müştəri və ya təchizatçı hesabını hesablamadan əvvəl təmizlənəcək sözləri göstərin. ";" istifadə edin hər söz arasında -GDPRContact=Məlumatların Mühafizəsi Məmuru (DPO, Məlumat Məxfiliyi və ya GDPR əlaqəsi) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Şəxsi məlumatlarınızı İnformasiya Sisteminizdə saxlayırsınızsa, burada Ümumi Məlumatların Qorunması Qaydasına cavabdeh olan kontaktın adını çəkə bilərsiniz HelpOnTooltip=Alət ipucunda göstərmək üçün kömək mətni HelpOnTooltipDesc=Bu sahə formada görünəndə mətnin alət ipucunda görünməsi üçün bura mətn və ya tərcümə düyməsini qoyun @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Üçüncü tərəf adı - Üçüncü tərəf ləqəbi ALIAS_THIRDPARTY=Üçüncü tərəf ləqəbi - Üçüncü tərəfin adı PDFIn2Languages=PDF-də etiketləri 2 fərqli dildə göstərin (bu funksiya bəzi dillərdə işləməyə bilər) PDF_USE_ALSO_LANGUAGE_CODE=PDF-inizdə bəzi mətnlərin eyni yaradılmış PDF-də 2 müxtəlif dildə dublikat edilməsini istəyirsinizsə, burada bu ikinci dili təyin etməlisiniz ki, yaradılan PDF eyni səhifədə 2 müxtəlif dildən ibarət olsun, PDF yaradarkən seçilən dil və bu ( yalnız bir neçə PDF şablonu bunu dəstəkləyir). Hər PDF üçün 1 dil üçün boş saxlayın. -PDF_USE_A=Standart PDF formatı əvəzinə PDF/A formatında PDF sənədləri yaradın +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=FontAwesome ikonasının kodunu buraya daxil edin. FontAwesome nə olduğunu bilmirsinizsə, ümumi dəyər fa-ünvan kitabından istifadə edə bilərsiniz. RssNote=Qeyd: Hər bir RSS lent tərifi vidceti təmin edir ki, onun idarə panelində mövcud olması üçün onu aktivləşdirməlisiniz JumpToBoxes=Quraşdırma -> Vidjetlərə keçin @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 9d019c9e04b12..15ff1fc9572c9 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Списъкът със стойности трябв ExtrafieldParamHelpcheckbox=Списъкът със стойности трябва да бъде във формат key,value (където key не може да бъде '0')

    например:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=Списъкът със стойности трябва да бъде във формат key,value (където key не може да бъде '0')

    например:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметрите трябва да бъдат ObjectName:Classpath
    Синтаксис: ObjectName:Classpath ExtrafieldParamHelpSeparator=Оставете празно за обикновен разделител
    Посочете стойност 1 за разделител, който се свива (отворен по подразбиране за нова сесия, а след това състоянието се запазва за всяка потребителска сесия)
    Посочете стойност 2 за разделител, който се свива (свит по подразбиране за нова сесия, а след това състоянието се запазва за всяка потребителска сесия). LibraryToBuildPDF=Използвана библиотека за създаване на PDF файлове @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex филтър за чиста стойнос DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Изчистете определени думи, когато генерирате подакаунти за клиенти или доставчици RemoveSpecialWordsHelp=Посочете думите за почистване, преди да изчислите Клиент или сметката на доставчика. Използвай ";" между всяка дума -GDPRContact=Длъжностно лице по защита на данните (DPO, защита на лични данни или GDPR контакт) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ако съхранявате лични данни във вашата информационна система, можете да посочите контакта, който отговаря за Общия регламент за защита на данните тук HelpOnTooltip=Подсказка HelpOnTooltipDesc=Поставете тук текст или ключ за превод, който да се покаже в подсказка, когато това поле се появи във формуляр @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=контрагент име - контрагент псевдо ALIAS_THIRDPARTY=контрагент псевдоним - контрагент име PDFIn2Languages=Показване на етикети в PDF на 2 различни езика (тази функция може да не работи за няколко езика) PDF_USE_ALSO_LANGUAGE_CODE=Ако искате да имате някои текстове във вашия PDF файл, дублирани на 2 различни езика в един и същ генериран PDF файл, трябва да посочите тук този втори език, така че генерираният PDF файл да съдържа 2 различни езика на една и съща страница, избраният при генериране на PDF и този (само няколко PDF шаблона поддържат това). Запазете празно за един език в PDF файла. -PDF_USE_A=Генерирайте PDF документи с формат PDF/A вместо формат PDF по подразбиране +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Въведете тук кода за FontAwesome икона. Ако не знаете какво е FontAwesome, може да използвате стандартната стойност fa-address book. RssNote=Забележка: Всяка дефиниция на RSS канал предоставя изпълним модул, който трябва да активирате, за да бъде наличен в таблото за управление JumpToBoxes=Отидете до Настройка -> Приспособления @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index 9491c715e9ddb..4b363e7eb1e02 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=পরামিতি হতে হবে ObjectName:Classpath
    সিনট্যাক্স: ObjectName:Classpath ExtrafieldParamHelpSeparator=একটি সাধারণ বিভাজকের জন্য খালি রাখুন
    কোলাপসিং সেপারেটরের জন্য এটি 1 এ সেট করুন (নতুন সেশনের জন্য ডিফল্টরূপে খোলা, তারপর প্রতিটি ব্যবহারকারীর সেশনের জন্য স্থিতি রাখা হয়)
    কোলাপসিং সেপারেটরের জন্য এটিকে 2 এ সেট করুন (নতুন সেশনের জন্য ডিফল্টরূপে ভেঙে পড়ে, তারপর প্রতিটি ব্যবহারকারীর সেশনের আগে স্থিতি রাখা হয়) LibraryToBuildPDF=পিডিএফ তৈরির জন্য ব্যবহৃত লাইব্রেরি @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=মান পরিষ্কার করতে DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=গ্রাহক বা সরবরাহকারীদের জন্য উপ-অ্যাকাউন্ট তৈরি করার সময় নির্দিষ্ট শব্দগুলি পরিষ্কার করুন RemoveSpecialWordsHelp=গ্রাহক বা সরবরাহকারী অ্যাকাউন্ট গণনা করার আগে পরিষ্কার করতে হবে এমন শব্দগুলি উল্লেখ করুন। ব্যবহার করা ";" প্রতিটি শব্দের মধ্যে -GDPRContact=ডেটা সুরক্ষা অফিসার (DPO, ডেটা গোপনীয়তা বা GDPR যোগাযোগ) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=আপনি যদি আপনার ইনফরমেশন সিস্টেমে ব্যক্তিগত ডেটা সঞ্চয় করেন, তাহলে আপনি এখানে সাধারণ ডেটা সুরক্ষা প্রবিধানের জন্য দায়ী পরিচিতের নাম দিতে পারেন HelpOnTooltip=টুলটিপে দেখানোর জন্য পাঠ্য সাহায্য করুন HelpOnTooltipDesc=এই ক্ষেত্রটি একটি ফর্মে উপস্থিত হলে একটি টুলটিপে পাঠ্য দেখানোর জন্য এখানে পাঠ্য বা একটি অনুবাদ কী রাখুন @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=তৃতীয় পক্ষের নাম - তৃতী ALIAS_THIRDPARTY=তৃতীয় পক্ষের উপনাম - তৃতীয় পক্ষের নাম PDFIn2Languages=পিডিএফ-এ 2টি ভিন্ন ভাষায় লেবেল দেখান (এই বৈশিষ্ট্যটি কয়েকটি ভাষার জন্য কাজ নাও করতে পারে) PDF_USE_ALSO_LANGUAGE_CODE=আপনি যদি আপনার পিডিএফের কিছু পাঠ্য একই জেনারেটেড পিডিএফ-এ 2টি ভিন্ন ভাষায় সদৃশ করতে চান, তাহলে আপনাকে অবশ্যই এখানে এই দ্বিতীয় ভাষাটি সেট করতে হবে যাতে জেনারেট করা পিডিএফে একই পৃষ্ঠায় 2টি ভিন্ন ভাষা থাকবে, যেটি PDF তৈরি করার সময় বেছে নেওয়া হয় এবং এটি ( শুধুমাত্র কয়েকটি পিডিএফ টেমপ্লেট এটি সমর্থন করে)। পিডিএফ প্রতি 1টি ভাষার জন্য খালি রাখুন। -PDF_USE_A=ডিফল্ট ফরম্যাট PDF এর পরিবর্তে PDF/A ফরম্যাট সহ পিডিএফ ডকুমেন্ট তৈরি করুন +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=এখানে একটি FontAwesome আইকনের কোড লিখুন। আপনি যদি না জানেন যে FontAwesome কি, আপনি জেনেরিক মান fa-address-book ব্যবহার করতে পারেন। RssNote=দ্রষ্টব্য: প্রতিটি RSS ফিড সংজ্ঞা একটি উইজেট প্রদান করে যেটি ড্যাশবোর্ডে উপলব্ধ থাকতে আপনাকে অবশ্যই সক্ষম করতে হবে JumpToBoxes=সেটআপে যান -> উইজেট @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/bn_IN/admin.lang b/htdocs/langs/bn_IN/admin.lang index 14de13fb4b38a..9e4e7079957fd 100644 --- a/htdocs/langs/bn_IN/admin.lang +++ b/htdocs/langs/bn_IN/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=পরামিতি হতে হবে ObjectName:Classpath
    সিনট্যাক্স: ObjectName:Classpath ExtrafieldParamHelpSeparator=একটি সাধারণ বিভাজকের জন্য খালি রাখুন
    কোলাপসিং সেপারেটরের জন্য এটি 1 এ সেট করুন (নতুন সেশনের জন্য ডিফল্টরূপে খোলা, তারপর প্রতিটি ব্যবহারকারীর সেশনের জন্য স্থিতি রাখা হয়)
    কোলাপসিং সেপারেটরের জন্য এটিকে 2 এ সেট করুন (নতুন সেশনের জন্য ডিফল্টরূপে ভেঙে পড়ে, তারপর প্রতিটি ব্যবহারকারীর সেশনের আগে স্থিতি রাখা হয়) LibraryToBuildPDF=পিডিএফ তৈরির জন্য ব্যবহৃত লাইব্রেরি @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=মান পরিষ্কার করতে DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=গ্রাহক বা সরবরাহকারীদের জন্য উপ-অ্যাকাউন্ট তৈরি করার সময় নির্দিষ্ট শব্দগুলি পরিষ্কার করুন RemoveSpecialWordsHelp=গ্রাহক বা সরবরাহকারীর হিসাব গণনা করার আগে পরিষ্কার করতে হবে এমন শব্দ উল্লেখ করুন। ব্যবহার করা ";" প্রতিটি শব্দের মধ্যে -GDPRContact=ডেটা সুরক্ষা অফিসার (DPO, ডেটা গোপনীয়তা বা GDPR যোগাযোগ) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=আপনি যদি আপনার ইনফরমেশন সিস্টেমে ব্যক্তিগত ডেটা সঞ্চয় করেন, তাহলে আপনি এখানে সাধারণ ডেটা সুরক্ষা প্রবিধানের জন্য দায়ী পরিচিতের নাম দিতে পারেন HelpOnTooltip=টুলটিপে দেখানোর জন্য পাঠ্য সাহায্য করুন HelpOnTooltipDesc=এই ক্ষেত্রটি একটি ফর্মে উপস্থিত হলে একটি টুলটিপে পাঠ্য দেখানোর জন্য এখানে পাঠ্য বা একটি অনুবাদ কী রাখুন @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=তৃতীয় পক্ষের নাম - তৃতী ALIAS_THIRDPARTY=তৃতীয় পক্ষের উপনাম - তৃতীয় পক্ষের নাম PDFIn2Languages=পিডিএফ-এ 2টি ভিন্ন ভাষায় লেবেল দেখান (এই বৈশিষ্ট্যটি কয়েকটি ভাষার জন্য কাজ নাও করতে পারে) PDF_USE_ALSO_LANGUAGE_CODE=আপনি যদি আপনার পিডিএফের কিছু পাঠ্য একই জেনারেটেড পিডিএফ-এ 2টি ভিন্ন ভাষায় সদৃশ করতে চান, তাহলে আপনাকে অবশ্যই এখানে এই দ্বিতীয় ভাষাটি সেট করতে হবে যাতে জেনারেট করা পিডিএফে একই পৃষ্ঠায় 2টি ভিন্ন ভাষা থাকবে, যেটি PDF তৈরি করার সময় বেছে নেওয়া হয় এবং এটি ( শুধুমাত্র কয়েকটি পিডিএফ টেমপ্লেট এটি সমর্থন করে)। পিডিএফ প্রতি 1টি ভাষার জন্য খালি রাখুন। -PDF_USE_A=ডিফল্ট ফরম্যাট PDF এর পরিবর্তে PDF/A ফরম্যাট সহ পিডিএফ ডকুমেন্ট তৈরি করুন +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=এখানে একটি FontAwesome আইকনের কোড লিখুন। আপনি যদি না জানেন যে FontAwesome কি, আপনি জেনেরিক মান fa-address-book ব্যবহার করতে পারেন। RssNote=দ্রষ্টব্য: প্রতিটি RSS ফিড সংজ্ঞা একটি উইজেট প্রদান করে যেটি ড্যাশবোর্ডে উপলব্ধ থাকতে আপনাকে অবশ্যই সক্ষম করতে হবে JumpToBoxes=সেটআপে যান -> উইজেট @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 19e0d9f3bdbe3..bdca07350f6f5 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametri moraju biti ObjectName:Classpath
    Sintaksa: ObjectName:Classpath ExtrafieldParamHelpSeparator=Ostavite prazno za jednostavan separator
    Postavite ovo na 1 za separator koji se sažima (otvoreno prema zadanim postavkama za novu sesiju, tada se status čuva za svaku korisničku sesiju)
    Postavite ovo na 2 za sažimajući separator (sažeto prema zadanim postavkama za novu sesiju, tada se status čuva za svaku korisničku sesiju) LibraryToBuildPDF=Biblioteka koja se koristi za generiranje PDF-a @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter za čistu vrijednost (COMPANY_DIGITAR DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Očistite određene riječi prilikom generiranja podračuna za kupce ili dobavljače RemoveSpecialWordsHelp=Navedite riječi koje treba očistiti prije izračunavanja računa kupca ili dobavljača. Koristite ";" između svake reči -GDPRContact=Službenik za zaštitu podataka (DPO, kontakt za privatnost podataka ili GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ako pohranjujete lične podatke u svom informacionom sistemu, ovdje možete imenovati kontakt koji je odgovoran za Opću uredbu o zaštiti podataka HelpOnTooltip=Tekst pomoći za prikaz u opisu alata HelpOnTooltipDesc=Ovdje stavite tekst ili ključ za prijevod kako bi se tekst prikazao u opisu alata kada se ovo polje pojavi u obrascu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Ime treće strane - pseudonim treće strane ALIAS_THIRDPARTY=Alias treće strane - Ime treće strane PDFIn2Languages=Prikaži oznake u PDF-u na 2 različita jezika (ova funkcija možda neće raditi za nekoliko jezika) PDF_USE_ALSO_LANGUAGE_CODE=Ako želite da neki tekstovi u vašem PDF-u budu duplirani na 2 različita jezika u istom generiranom PDF-u, ovdje morate postaviti ovaj drugi jezik tako da će generirani PDF sadržavati 2 različita jezika na istoj stranici, onaj koji je odabran prilikom generiranja PDF-a i ovaj (samo nekoliko PDF šablona to podržava). Ostavite prazno za 1 jezik po PDF-u. -PDF_USE_A=Generirajte PDF dokumente u formatu PDF/A umjesto zadanog formata PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Ovdje unesite kod ikone FontAwesome. Ako ne znate šta je FontAwesome, možete koristiti generičku vrijednost fa-address-book. RssNote=Napomena: Svaka definicija RSS feed-a pruža widget koji morate omogućiti da bi bio dostupan na kontrolnoj tabli JumpToBoxes=Skoči na Podešavanje -> Widgeti @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index c3b97b401f487..baacd6ff82d6f 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Els paràmetres han de ser ObjectName:Classpath
    Sintaxi: ObjectName:Classpath ExtrafieldParamHelpSeparator=Manteniu-lo buit per a un separador simple
    Definiu-lo a 1 per a un separador que es replega (obert per defecte per a una sessió nova, llavors l'estat es manté per a cada sessió d'usuari)
    Definiu-ho a 2 per a un separador que es replega (es replega de manera predeterminada per a una sessió nova, llavors l'estat es manté abans de cada sessió d'usuari) LibraryToBuildPDF=Biblioteca utilitzada per a la generació de PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtre Regex al valor net (COMPANY_DIGITARIA_CLEAN DuplicateForbidden=Duplicat prohibit RemoveSpecialWords=Netegeu certes paraules en generar subcomptes per a clients o proveïdors RemoveSpecialWordsHelp=Especifiqueu les paraules a netejar abans de calcular el compte de client o proveïdor. Utilitzeu un ";" entre cada paraula -GDPRContact=Oficial de protecció de dades (PDO, privadesa de dades o contacte amb GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Si emmagatzemeu dades personals al vostre Sistema d'Informació, podeu anomenar aquí el contacte responsable del Reglament General de Protecció de Dades HelpOnTooltip=Text d'ajuda que es mostrarà a la descripció d'informació HelpOnTooltipDesc=Posa text o una tecla de traducció aquí perquè el text es mostri en una descripció emergent quan aquest camp aparegui en un formulari @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nom de tercer - Àlies de tercer ALIAS_THIRDPARTY=Àlies de tercer - Nom de tercer PDFIn2Languages=Mostra les etiquetes al PDF en 2 idiomes diferents (és possible que aquesta funció no funcioni en alguns idiomes) PDF_USE_ALSO_LANGUAGE_CODE=Si voleu que alguns textos del vostre PDF es copiïn en 2 idiomes diferents en el mateix PDF generat, heu d’establir aquí aquest segon idioma perquè el PDF generat contingui 2 idiomes diferents en la mateixa pàgina, l’escollit en generar el PDF i aquesta (només poques plantilles de PDF admeten això). Mantingueu-lo buit per a 1 idioma per PDF. -PDF_USE_A=Genereu documents PDF amb el format PDF/A en comptes del format PDF predeterminat +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Introduïu aquí el codi de la icona de FontAwesome. Si no sabeu què és FontAwesome, podeu utilitzar el llibre genèric d’adreces. RssNote=Nota: cada definició de canal RSS proporciona un giny que heu d'activar perquè estigui disponible al tauler JumpToBoxes=Ves a Configuració -> Ginys @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index 591824a700fbb..66b0dfa036bce 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Seznam hodnot musí být řádky s formátovým klíč ExtrafieldParamHelpcheckbox=Seznam hodnot musí být řádky s formátovým klíčem, hodnota (kde klíč nemůže být '0')

    například:
    1, value1
    2, value2
    3, value3
    ... ExtrafieldParamHelpradio=Seznam hodnot musí být řádky s formátovým klíčem, hodnota (kde klíč nemůže být '0')

    například:
    1, value1
    2, value2
    3, value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Ponechte prázdné pro jednoduchý oddělovač
    Tuto hodnotu nastavíte na 1 pro odlučovač (výchozí nastavení je otevřeno pro novou relaci, poté je stav zachován pro každou uživatelskou relaci)
    Nastavte tuto položku na 2 pro sbalující se oddělovač. (ve výchozím nastavení sbaleno pro novou relaci, pak je stav udržován pro každou relaci uživatele) LibraryToBuildPDF=Knihovna používaná pro generování PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtr Regex pro vyčištění hodnoty (COMPANY_DIG DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers RemoveSpecialWordsHelp=Specify the words to be cleaned before calculating the customer or supplier account. Use a ";" between each word -GDPRContact=Úředník pro ochranu údajů (DPO, ochrana dat nebo kontakt GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=If you store personal data in your Information System, you can name the contact who is responsible for the General Data Protection Regulation here HelpOnTooltip=Text nápovědy se zobrazí na popisku HelpOnTooltipDesc=Vložte zde textový nebo překladový klíč, aby se text zobrazil v popisku, když se toto pole zobrazí ve formuláři @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Third-party name - Third-party alias ALIAS_THIRDPARTY=Third-party alias - Third-party name PDFIn2Languages=Show labels in the PDF in 2 different languages (this feature may not work for some couple of languages) PDF_USE_ALSO_LANGUAGE_CODE=Pokud chcete mít ve svém PDF duplikované texty ve 2 různých jazycích ve stejném generovaném PDF, musíte zde nastavit tento druhý jazyk, takže vygenerovaný PDF bude obsahovat 2 různé jazyky na stejné stránce, jeden vybraný při generování PDF a tento ( Podporuje to jen několik šablon PDF). Uchovávejte prázdné po dobu 1 jazyka na PDF. -PDF_USE_A=Generate PDF documents with format PDF/A instead of default format PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Sem zadejte kód ikony FontAwesome. Pokud nevíte, co je FontAwesome, můžete použít obecnou hodnotu fa-address-book. RssNote=Poznámka: Každá definice zdroje RSS obsahuje widget, který musíte povolit, aby byl dostupný na hlavním panelu JumpToBoxes=Přejít na nastavení -> Widgety @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/cy_GB/admin.lang b/htdocs/langs/cy_GB/admin.lang index 8f27b20cf8605..fd7883994e6f6 100644 --- a/htdocs/langs/cy_GB/admin.lang +++ b/htdocs/langs/cy_GB/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Rhaid Rhestr o werthoedd yn llinellau gyda fformat all ExtrafieldParamHelpcheckbox=Rhaid i'r rhestr o werthoedd fod yn linellau gydag allwedd fformat, gwerth (lle na all yr allwedd fod yn '0')

    er enghraifft:
    1,value1
    2,value2 a0393bzfc a039342fc a03426fc ExtrafieldParamHelpradio=Rhaid i'r rhestr o werthoedd fod yn linellau gydag allwedd fformat, gwerth (lle na all yr allwedd fod yn '0')

    er enghraifft:
    1,value1
    2,value2 a0393bzfc a039342fc a03426fc ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Rhaid i baramedrau fod yn Enw Gwrthrych:Classpath
    Cystrawen: Enw Gwrthrych:Llwybr Dosbarth ExtrafieldParamHelpSeparator=Cadwch yn wag ar gyfer gwahanydd syml
    Gosodwch hwn i 1 ar gyfer gwahanydd sy'n cwympo (ar agor yn ddiofyn ar gyfer sesiwn newydd, yna cedwir statws ar gyfer pob sesiwn defnyddiwr)
    Gosodwch hwn i 2 ar gyfer gwahanydd sy'n cwympo (wedi cwympo yn ddiofyn ar gyfer sesiwn newydd, yna statws yn cael ei gadw ar gyfer pob sesiwn defnyddiwr) LibraryToBuildPDF=Llyfrgell a ddefnyddir ar gyfer cynhyrchu PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Hidlydd Regex i lanhau gwerth (COMPANY_DIGITARIA_C DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Glanhewch rai geiriau wrth gynhyrchu isgyfrifon ar gyfer cwsmeriaid neu gyflenwyr RemoveSpecialWordsHelp=Nodwch y geiriau i'w glanhau cyn cyfrifo'r cyfrif cwsmer neu gyflenwr. Defnyddiwch ";" rhwng pob gair -GDPRContact=Swyddog Diogelu Data (DPO, Data Preifatrwydd neu gyswllt GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Os ydych yn storio data personol yn eich System Wybodaeth, gallwch enwi’r cyswllt sy’n gyfrifol am y Rheoliad Diogelu Data Cyffredinol yma HelpOnTooltip=Testun cymorth i'w ddangos ar y cyngor HelpOnTooltipDesc=Rhowch destun neu allwedd cyfieithu yma er mwyn i'r testun ddangos mewn cyngor pan fydd y maes hwn yn ymddangos ar ffurf @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Enw trydydd parti - Enw arall trydydd parti ALIAS_THIRDPARTY=Alias trydydd parti - Enw trydydd parti PDFIn2Languages=Dangos labeli yn y PDF mewn 2 iaith wahanol (efallai na fydd y nodwedd hon yn gweithio ar gyfer rhai ieithoedd neu ddwy) PDF_USE_ALSO_LANGUAGE_CODE=Os ydych chi am i rai testunau yn eich PDF gael eu dyblygu mewn 2 iaith wahanol yn yr un PDF a gynhyrchir, rhaid i chi osod yma yr ail iaith hon felly bydd PDF a gynhyrchir yn cynnwys 2 iaith wahanol ar yr un dudalen, yr un a ddewisir wrth gynhyrchu PDF a'r un hon ( dim ond ychydig o dempledi PDF sy'n cefnogi hyn). Cadwch yn wag am 1 iaith fesul PDF. -PDF_USE_A=Cynhyrchu dogfennau PDF gyda fformat PDF/A yn lle fformat PDF rhagosodedig +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Rhowch god eicon FontAwesome yma. Os nad ydych chi'n gwybod beth yw FontAwesome, gallwch ddefnyddio'r llyfr cyfeiriadau gwerth generig. RssNote=Nodyn: Mae pob diffiniad porthiant RSS yn darparu teclyn y mae'n rhaid i chi ei alluogi i'w gael ar y dangosfwrdd JumpToBoxes=Neidio i Gosod -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index 985651891a45b..d90329edb30d7 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Liste over værdier skal være linjer med formatet nø ExtrafieldParamHelpcheckbox=Liste over værdier skal være linjer med formatet nøgle,værdi (hvor nøgle ikke kan være '0')

    f.eks.:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=Liste over værdier skal være linjer med formatet nøgle,værdi (hvor nøgle ikke kan være '0')

    f.eks.:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=Liste over værdier kommer fra en tabel
    Syntaks: tabelnavn:label_field:id_field::filtersql
    Eksempel: c_idtypent:libelle: ::filtersql

    - id_field er nødvendigvis en primær int-key
    - filtersql er en betingelse. Det skal bruge USF-syntaksen. Eksempel: (active:=:1) for kun at vise aktiv værdi
    Du kan også bruge $ID$ i filter, som er det aktuelle id for det aktuelle objekt
    Hvis du vil filtrere på ekstrafelter, brug syntaks extra.fieldcode=... (hvor feltkode er koden for ekstrafelt)

    For at få listen afhængig af en anden komplementær attributliste:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order at have listen afhængig af en anden liste:
    c_typent:libelle:id:parent_list_code |parent_column:filter -ExtrafieldParamHelpchkbxlst=Liste over værdier kommer fra en tabel
    Syntaks: tabelnavn:label_field:id_field::filtersql
    Eksempel: c_idtypent:libelle: ::filtersql

    filter kan være en simpel test (f.eks. active=1 for kun at vise aktiv værdi)
    Du kan også bruge $ID$ i filter, der er det aktuelle id for det aktuelle objekt
    For at lave et SELECT i filter, brug $SEL$
    hvis du vil filtrere på ekstrafelter, brug syntaks extra.fieldcode=... (hvor feltkoden er koden for extrafield)

    For at få listen afhængig af en anden komplementær attributliste:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    For at få listen afhængig af en anden liste:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametre skal være ObjectName:Classpath
    Syntaks: ObjectName:Classpath ExtrafieldParamHelpSeparator=Hold tom for en simpel adskiller
    Indstil denne til 1 for en kollapsende separator (åben som standard for ny session, så beholdes status for hver brugersession)
    Indstil denne til 2 for en kollapsende separator (skjulet som standard for ny session, så beholdes status før hver brugersession) LibraryToBuildPDF=Mappe brugt til PDF generering @@ -514,15 +513,15 @@ ModuleCompanyCodeCustomerDigitaria=%s efterfulgt af det afkortede kundenavn med ModuleCompanyCodeSupplierDigitaria=%s efterfulgt af det afkortede leverandørnavn med antallet af tegn: %s for leverandørens regnskabskode. Use3StepsApproval=Indkøbsordrer skal som standard oprettes og godkendes af 2 forskellige brugere (et trin/bruger til at oprette og et trin/bruger til at godkende. Bemærk, at hvis bruger har både tilladelse til at oprette og godkende, vil et trin/bruger være nok) . Du kan med denne mulighed bede om at indføre et tredje trin/brugergodkendelse, hvis beløbet er højere end en dedikeret værdi (så 3 trin vil være nødvendige: 1=validering, 2=første godkendelse og 3=anden godkendelse, hvis beløbet er nok).
    Indstil denne til tom, hvis én godkendelse (2 trin) er nok, indstil den til en meget lav værdi (0,1), hvis en anden godkendelse (3 trin) altid er påkrævet. UseDoubleApproval=Brug en 3-trins godkendelse, når beløbet (uden skat) er højere end ... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=BEMÆRK: Opsætningen til at sende e-mails fra applikationen bruger den generiske standardopsætning (kaldet "%s"). Dette valg kræver ingen teknisk viden og ingen særlig opsætning.
    Det er dog ofte bedre at konfigurere udgående e-mails til at bruge den anden metode (kaldet " %s") for at bruge din e-mail-tjenesteudbyders e-mail-server i stedet for standardopsætningen af flere årsager: WarningPHPMailA=- Brug af e-mail-tjenesteudbyderens server øger troværdigheden af din e-mail, så det øger leveringsevnen uden at blive markeret som SPAM -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Hvis domænet for din e-mail (delen af mitmaildomæne.com til mit navn@mitmaildomæne.com) er beskyttet af en SPF + en DMARC-record, kan din e-mail blive markeret som SPAM, fordi din DMARC-regel er defineret i DNS-zonen for domænet i domænet. afsender (mymaildomain.com) tillader ikke afsendelsen som en generisk afsender. I et sådant tilfælde skal du deaktivere DMARC for domænet (eller indstille det til p=ingen som gjort af @gmail.com), eller bedre, hvis du har den tekniske viden, bruge den anden metode til at sende e-mails ved hjælp af SMTP'en server hos din egen e-mail-udbyder. WarningPHPMailC=- Det er også interessant at bruge SMTP-serveren fra din egen e-mail-tjenesteudbyder til at sende e-mails, så alle e-mails, der sendes fra applikationen, vil også blive gemt i din "Sendte" mappe i din postkasse. WarningPHPMailD=Det anbefales derfor at ændre afsendelsesmetoden for e-mails til værdien "SMTP". WarningPHPMailDbis=Hvis du virkelig vil beholde standardmetoden "PHP" til at sende e-mails, skal du bare ignorere denne advarsel eller fjerne den ved at %sklikke her%s. WarningPHPMail2=Hvis din e-mail SMTP-udbyder har brug for at begrænse e-mail klienten til nogle IP-adresser (meget sjældent), er dette IP-adressen på mailbrugeragenten (MUA) til din ERP CRM-applikation: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. +WarningPHPMailSPF=Hvis domænenavnet i din afsender-e-mailadresse er beskyttet af en SPF-record (spørg din domænenavnsregistrator), skal du tilføje følgende IP'er eller indtastning i SPF-posten for dit domænes DNS: %s. +WarningPHPMailSPFDMARC=Hvis domænenavnet i din afsender-e-mailadresse er beskyttet af en anden DMARC-record end p=none (spørg din domænenavnsregistrator), skal du fjerne din DMARC-record eller indstille den til p=none like do @gmail.com) eller bruge at sende en anden metode. SPFAndDMARCInformation=SPF- og DMARC-DNS-post for hoved-e-mailadresser ActualMailDNSRecordFound=Faktisk %s post fundet (til e-mail %s): %s ClickToShowDescription=Klik for at vise beskrivelse @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-filter for at rense værdi (COMPANY_DIGITARI DuplicateForbidden=Duplikat forbudt RemoveSpecialWords=Rengør visse ord, når du genererer underkonti til kunder eller leverandører RemoveSpecialWordsHelp=Angiv de ord, der skal renses, før du beregner kunde- eller leverandørkontoen. Brug en ";" mellem hvert ord -GDPRContact=Databeskyttelsesansvarlig (DPO, databeskyttelse eller GDPR-kontakt) +GDPRContact=Databeskyttelsesansvarlig (DPO, databeskyttelse eller GDPR-kontakt, ...) GDPRContactDesc=Hvis du opbevarer personoplysninger i dit informationssystem, kan du her navngive den kontaktperson, der er ansvarlig for GDPR HelpOnTooltip=Hjælpetekst til at vise på værktøjstip HelpOnTooltipDesc=Indsæt tekst eller en oversættelsesnøgle her, så teksten vises i et værktøjstip, når dette felt vises i en formular @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Tredjeparts navn - Tredjeparts alias ALIAS_THIRDPARTY=Tredjeparts alias - Tredjeparts navn PDFIn2Languages=Vis etiketter i PDF'en på 2 forskellige sprog (denne funktion virker muligvis ikke på nogle få sprog) PDF_USE_ALSO_LANGUAGE_CODE=Hvis du vil have nogle tekster i din PDF duplikeret på 2 forskellige sprog i den samme genererede PDF, skal du her indstille dette andet sprog, så genereret PDF vil indeholde 2 forskellige sprog på samme side, det der blev valgt ved generering af PDF og dette (kun få PDF-skabeloner understøtter dette). Hold tom for et sprog pr. PDF. -PDF_USE_A=Generer PDF-dokumenter med formatet PDF/A i stedet for standardformatet PDF +PDF_USE_A=PDF-dokumenter format FafaIconSocialNetworksDesc=Indtast her koden for et FontAwesome-ikon. Hvis du ikke ved, hvad FontAwesome er, kan du bruge den generiske værdi fa-address-book. RssNote=Bemærk: Hver RSS-feeddefinition giver en widget, som du skal aktivere for at have den tilgængelig på dashboardet JumpToBoxes=Gå til Opsætning -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Ordbog AddMoreParams=Tilføj flere parametre til forbindelse (cookies, tokens, ...)
    Eksempel: token : værditoken ParamName=Navn på parameter ParamValue=Værdi af parameter +ConfirmDeleteParamOfSocialNetwork=Er du sikker på, at du vil slette denne parameter? +HelpMariaDBToGetPossibleValues=Du kan få en liste over mulige værdier ved at køre følgende SQL-kommando: %s +Captcha=Captcha +CaptchaDesc=Hvis du vil beskytte din login-side med en Captcha, kan du vælge, hvilken du vil bruge her +DolibarrStandardCaptcha=En indbygget captcha genereret af Dolibarr diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 80c05fbf886d2..064182d666b10 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Die Liste der Werte muss aus Zeilen mit dem Format Sch ExtrafieldParamHelpcheckbox=Die Liste der Werte muss aus Zeilen mit dem Format Schlüssel, Wert bestehen (wobei Schlüssel nicht '0' sein darf)

    zum Beispiel:
    1, value1
    2, value2
    3, value3
    ... ExtrafieldParamHelpradio=Die Liste der Werte muss aus Zeilen mit dem Format Schlüssel, Wert bestehen (wobei Schlüssel nicht '0' sein darf)

    zum Beispiel:
    1, value1
    2, value2
    3, value3
    ... ExtrafieldParamHelpsellist=Liste von Werten aus einer Tabelle
    Syntax: table_name:label_field:id_field::filtersql
    Beispiel: c_typent:libelle:id::filtersql

    - id_field ist notwendigerweise ein primärer int-Schlüssel
    - filtersql ist eine Bedingung. Es muss die USF-Syntax verwendet werden. Beispiel: (aktiv:=:1) um nur aktive Werte zu zeigen
    Sie können auch $ID$ im Filter verwenden, das die aktuelle ID des aktuellen Objekts ist
    Wenn Sie nach Extrafeldern filtern möchten, verwenden Sie die Syntax extra.fieldcode=... (wobei fieldcode der Code des Extrafelds ist)

    Wenn die Liste von einer anderen Liste mit komplementären Attributen abhängig ist:
    c_typent:libelle:ID:options_parent_list_code|parent_column:filter

    Um die Liste von einem anderen Liste abhängig zu machen:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=Liste von Werten stammt aus einer Tabelle
    Syntax: table_name:label_field:id_field::filtersql
    Beispiel: c_typent:libelle:ID::filtersql

    Filter kann ein einfacher Test sein (z. B. active=1 um nur aktive Werte zu zeigen)
    Sie können auch $ID$ im Filter verwenden, das ist die id des aktuellen Objekts
    Um ein SELECT im Filter durchzuführen, verwenden Sie $SEL$
    wenn Sie nach Extrafeldern filtern möchten, verwenden Sie die Syntax extra.fieldcode=... (wobei fieldcode der Code des Extrafelds ist)

    Damit die Liste von einer anderen ergänzenden Attributliste abhängt:
    c_typent:libelle:ID:options_parent_list_code|parent_column:filter

    Um die Liste von einer anderen Liste abhängig zu machen:
    c_typent:libelle:id:übergeordneter_Listencode|parent_column:filter ExtrafieldParamHelplink=Parameter müssen Objektname:Klassenpfad sein.
    Syntax: ObjektName:Classpath ExtrafieldParamHelpSeparator=Für ein einfaches Trennzeichen leer lassen
    Setzen Sie diesen Wert für ein ausblendendes Trennzeichen auf 1 (standardmäßig für eine neue Sitzung geöffnet, der Status wird für jede Benutzersitzung beibehalten)
    Setzen Sie diesen Wert für ein ausblendendes Trennzeichen auf 2 (standardmäßig für ausgeblendet) neue Sitzung, dann bleibt der Status für jede Benutzersitzung erhalten) LibraryToBuildPDF=Bibliothek zum Erstellen von PDF-Dateien @@ -514,17 +513,17 @@ ModuleCompanyCodeCustomerDigitaria=%s, gefolgt vom abgeschnittenen Kundennamen u ModuleCompanyCodeSupplierDigitaria=%s, gefolgt vom verkürzten Lieferantennamen und der Anzahl der Zeichen: %s für das Lieferantenbuchungskonto (Kreditorenkonto). Use3StepsApproval=Standardmäßig, Einkaufsaufträge müssen durch zwei unterschiedlichen Benutzer erstellt und freigegeben werden (ein Schritt/Benutzer zu erstellen und ein Schritt/Benutzer für die Freigabe). Beachten Sie wenn ein Benutzer beide Rechte hat - zum erstellen und freigeben, dann reicht ein Benutzer für diesen Vorgang. Optional können Sie ein zusätzlicher Schritt/User für die Freigabe einrichten, wenn der Betrag einen bestimmten dedizierten Wert übersteigt (wenn der Betrag übersteigt wird, werden 3 Stufen notwendig: 1=Validierung, 2=erste Freigabe und 3=Gegenfreigabe.
    Lassen Sie den Feld leer wenn eine Freigabe (2 Schritte) ausreicht; Tragen Sie einen sehr niedrigen Wert (0.1) wenn eine zweite Freigabe notwendig ist. UseDoubleApproval=3-Stufen-Genehmigung durchführen, wenn der Betrag (ohne Steuern) höher ist als ... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=HINWEIS: Die Konfiguration zum Senden von E-Mails aus dieser Anwendung verwendet die Standardeinstellung (bezeichnet als „%s“). Diese Auswahl erfordert keine technischen Kenntnisse und keine besonderen Konfigurationen.
    Allerdings ist es oft besser, ausgehende E-Mails mit einer anderen Methode (bezeichnet als "%s") zu versenden, um den E-Mail-Server Ihres E-Mail-Anbieters für den Versand zu verwenden, und zwar aus mehreren Gründen: WarningPHPMailA=- Die Verwendung des Server des E-Mail Leistung-Providers erhöht die Vertrauenswürdigkeit Ihres E-Mail und verbessert somit die Zustellbarkeit, ohne als SPAM gekennzeichnet zu werden. -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Wenn die Domain Ihrer E-Mail-Adresse (der Teil mymaildomain.com in myname@mymaildomain.com) durch einen SPF und einen DMARC-Eintrag geschützt ist, wird Ihr E-Mail möglicherweise als SPAM gekennzeichnet, da Ihre in der DNS-Zone der Domäne des Absenders (mymaildomain.com) definierte DMARC-Regel das Senden über generische Absender nicht zulässt. In einem solchen Fall müssen Sie DMARC für die Domäne deaktivieren (oder es auf p=none setzen, wie es bei @gmail.com der Fall ist) oder, besser noch, wenn Sie über die technischen Kenntnisse verfügen, die alternative Methode verwenden, um E-Mails über den SMTP-Server Ihres eigenen E-Mail-Anbieters zu senden. WarningPHPMailC=- Interessant ist auch die Verwendung des SMTP-Servers Ihres eigenen E-Mail-Dienstanbieters zum Senden von E-Mails, sodass alle von der Anwendung gesendeten E-Mails auch in dem Verzeichnis "Gesendet" Ihrer Mailbox gespeichert werden. WarningPHPMailD=Es wird daher empfohlen, die Versandart von E-Mails auf den Wert „SMTP“ zu ändern. WarningPHPMailDbis=Wenn Sie wirklich die standardmäßige "PHP"-Methode zum Senden von E-Mails beibehalten möchten, ignorieren Sie einfach diese Warnung oder entfernen Sie sie, indem Sie %shier klicken%s. WarningPHPMail2=Wenn Ihr E-Mail-SMTP-Anbieter den E-Mail-Client auf einige IP-Adressen beschränken muss (sehr selten), dann ist dies die IP-Adresse des Mail User Agent (MUA) für ihr Dolibarr-System: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. -SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses -ActualMailDNSRecordFound=Actual %s record found (for email %s) : %s +WarningPHPMailSPF=Wenn der Domänenname in Ihrer E-Mail-Absenderadresse durch einen SPF-Eintrag geschützt ist (fragen Sie Ihren Domain-Registrar), müssen Sie die folgende IP-Adressen oder Einträge im SPF-Eintrag des DNS Ihrer Domain hinzufügen: %s. +WarningPHPMailSPFDMARC=Wenn der Domain-Name in Ihrer E-Mail-Absenderadresse durch einen anderen DMARC-Eintrag als p=none geschützt ist (fragen Sie Ihren Domain-Registrar), müssen Sie Ihren DMARC-Eintrag entfernen oder ihn auf p=none setzen (z. B. @gmail.com) oder eine andere Sendemethode verwenden. +SPFAndDMARCInformation=SPF und DMARC DNS-Eintrag für E-Mail-Hauptadresse +ActualMailDNSRecordFound=Tatsächlich gefundener %s-Datensatz (für E-Mail %s): %s ClickToShowDescription=Klicke um die Beschreibung zu sehen DependsOn=Diese Modul benötigt folgenden Module RequiredBy=Diese Modul ist für folgende Module notwendig @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-Filter zum Bereinigen des Werts (COMPANY_DIG DuplicateForbidden=Duplizieren nicht zulässig RemoveSpecialWords=Löschen Sie bestimmte Wörter, wenn Sie Buchungskonten für Kunden oder Lieferanten erstellen RemoveSpecialWordsHelp=Geben Sie die vor der Benennung des Kunden- oder Lieferantenkontos zu entfernenden Wörter an. Ein ";" zwischen jedem Wort verwenden. -GDPRContact=Datenschutzbeauftragte(r) +GDPRContact=Datenschutzbeauftragter (Data Protection Officer DPO, Datenschutz- oder DSGVO-Kontakt, …) GDPRContactDesc=Wenn Sie personenbezogene Daten in Ihrem Informationssystem speichern, können Sie hier den für die Datenschutz-Grundverordnung (DSGVO) zuständigen Ansprechpartner benennen HelpOnTooltip=Anzeigen des Hilfetextes im Tooltip HelpOnTooltipDesc=Fügen Sie hier Text oder einen Übersetzungsschlüssel ein, damit der Text in einer QuickInfo angezeigt wird, wenn dieses Feld in einem Formular angezeigt wird @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Name des Geschäftspartners - Alias des Geschäftspartners ALIAS_THIRDPARTY=Alias des Geschäftspartners – Name des Geschäftspartners PDFIn2Languages=Bezeichnungen im PDF in zwei verschiedenen Sprachen anzeigen (diese Funktion funktioniert möglicherweise bei einigen Sprachen nicht) PDF_USE_ALSO_LANGUAGE_CODE=Wenn Sie möchten, dass einige Texte in Ihrem PDF in 2 verschiedenen Sprachen in demselben generierten PDF dupliziert werden, müssen Sie hier diese zweite Sprache festlegen, damit das generierte PDF zwei verschiedene Sprachen auf derselben Seite enthält, die beim Generieren von PDF ausgewählte und diese (dies wird nur von wenigen PDF-Vorlagen unterstützt). Für 1 Sprache pro PDF leer halten. -PDF_USE_A=PDF-Dokumente im Format PDF/A erstellen anstelle des Standardformats PDF +PDF_USE_A=PDF-Dokumentenformat FafaIconSocialNetworksDesc=Geben Sie hier den Code für ein FontAwesome-Icon ein. Wenn Sie FontAwesome nicht kennen, können Sie den Standard 'fa-address-book' benutzen. RssNote=Hinweis: Jede RSS-Feed-Definition enthält ein Widget, das Sie aktivieren müssen, damit es im Dashboard verfügbar ist JumpToBoxes=Wechseln Sie zu Einstellungen -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Weitere Verbindungsparameter hinzufügen (Cookies, Tokens, ...)
    Beispiel: token : value token ParamName=Name des Parameters ParamValue=Wert des Parameters +ConfirmDeleteParamOfSocialNetwork=Sind Sie sicher, dass Sie diesen Parameter löschen wollen? +HelpMariaDBToGetPossibleValues=Sie können eine Liste aller möglicher Werte abrufen, indem Sie den folgenden SQL-Befehl ausführen: %s +Captcha=Captcha +CaptchaDesc=Wenn Sie Ihre Anmeldeseite mit einem Captcha schützen möchten, können Sie hier auswählen, welches Sie verwenden möchten +DolibarrStandardCaptcha=Ein natives Captcha, generiert von Dolibarr diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index bb0cf58cd4ad6..8706978a8f21d 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Η λίστα των τιμών πρέπει να εί ExtrafieldParamHelpcheckbox=Η λίστα των τιμών πρέπει να είναι γραμμές με βασική μορφή, key,value (όπου το key δεν μπορεί να είναι «0»)

    για παράδειγμα:
    1,value1
    2,value2
    3, value3
    ... ExtrafieldParamHelpradio=Η λίστα των τιμών πρέπει να είναι γραμμές με βασικό σχήμα, key,value (όπου το key δεν μπορεί να είναι «0»)

    για παράδειγμα:
    1,value1
    2,value2
    3, value3
    ... ExtrafieldParamHelpsellist=Η λίστα τιμών προέρχεται από έναν πίνακα
    Σύνταξη: table_name:label_field:id_field::filtersql
    Παράδειγμα: c_typent:libelle:id::filtersql

    - id_field είναι απαραίτητα ενα πρωτεύον κλειδί int
    - filtersql είναι προϋπόθεση. Πρέπει να χρησιμοποιεί τη σύνταξη USF. Παράδειγμα: (active:=:1) για εμφάνιση μόνο ενεργής τιμής
    Μπορείτε επίσης να χρησιμοποιήσετε το $ID$ στο φίλτρο που είναι το τρέχον αναγνωριστικό του τρέχοντος αντικειμένου
    εάν θέλετε να φιλτράρετε σε extrafields, χρησιμοποιήστε τη σύνταξη extra.fieldcode=... (όπου ο κωδικός πεδίου είναι ο κωδικός του extrafield)

    Για να μπορεί η λίστα να ειναι εξαρτώμενη από μια άλλη συμπληρωματική λίστα:
    c_typent: Libelle: id: options_ parent_list_code|parent_column:filter

    Για να μπορεί η λίστα να ειναι εξαρτώμενη από μια άλλη:
    c_typent: libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=Η λίστα τιμών προέρχεται από έναν πίνακα
    Σύνταξη: table_name:label_field:id_field::filtersql
    Παράδειγμα: c_typent:libelle:id::filtersql

    το φίλτρο μπορεί να είναι μια απλή δοκιμή (π.χ. active=1) για να εμφανιστεί μόνο η ενεργή τιμή
    Μπορείτε επίσης να χρησιμοποιήσετε το $ID$ στο φίλτρο που είναι το τρέχον αναγνωριστικό του τρέχοντος αντικειμένου
    Για να κάνετε SELECT στο φίλτρο χρησιμοποιήστε το $SEL$
    εάν θέλετε να φιλτράρετε σε extrafields, χρησιμοποιήστε τη σύνταξη extra.fieldcode=... (όπου ο κωδικός πεδίου είναι ο κωδικός του extrafield)

    Για να μπορεί η λίστα να ειναι εξαρτώμενη από μια άλλη συμπληρωματική λίστα:
    c_typent: Libelle:id:options_ parent_list_code|parent_column:filter

    Για να μπορεί η λίστα να είναι εξαρτώμενη από μια άλλη:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:ClasspathSyntax:
    ObjectName:Classpath ExtrafieldParamHelpSeparator=Διατήρηση κενού για ένα απλό διαχωριστικό
    Ορίστε το σε 1 για ένα διαχωριστικό που συμπτύσσεται (ανοιχτό από προεπιλογή για νέα περίοδο λειτουργίας, μετά διατηρείται η κατάσταση για κάθε συνεδρία χρήστη)
    Ορίστε το σε 2 για ένα διαχωριστικό που συμπτύσσεται (συμπτυγμένο από προεπιλογή και στη συνέχεια για νέα περίοδο λειτουργίας, η κατάσταση διατηρείται για κάθε συνεδρία χρήστη) LibraryToBuildPDF=Βιβλιοθήκη ενεργοποίησης δημιουργίας PDF @@ -514,17 +513,17 @@ ModuleCompanyCodeCustomerDigitaria=%s που ακολουθείται από τ ModuleCompanyCodeSupplierDigitaria=%s που ακολουθείται από το κομμένο όνομα προμηθευτή με τον αριθμό χαρακτήρων: %s για τον κωδικό λογιστικής προμηθευτή. Use3StepsApproval=Από προεπιλογή, οι παραγγελίες αγοράς πρέπει να δημιουργούνται και να εγκρίνονται από 2 διαφορετικούς χρήστες (ένα χρήστη για δημιουργία και ένα χρήστη για έγκριση. Λάβετε υπόψη ότι εάν ο χρήστης έχει δικαιώματα δημιουργίας και έγκρισης, ένας χρήστης αρκεί) . Μπορείτε να ζητήσετε με αυτήν την επιλογή να εισάγετε έγκριση ενός τρίτου χρήστη, εάν το ποσό είναι υψηλότερο από μια συγκεκριμένη τιμή (άρα θα χρειαστούν 3 βήματα: 1=επικύρωση, 2=πρώτη έγκριση και 3=δεύτερη έγκριση εάν το ποσό είναι υψηλό).
    Αφήστε το κενό εάν μια έγκριση (2 βήματα) είναι αρκετή, Ενώ αν πάντα απαιτείται μια δεύτερη έγκριση (3 βήματα ορίστε την σε πολύ χαμηλή τιμή (0,1). UseDoubleApproval=Χρησιμοποιήστε μια έγκριση 3 βημάτων όταν το ποσό (χωρίς φόρο) είναι υψηλότερο από... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Η ρύθμιση για την αποστολή email από την εφαρμογή χρησιμοποιεί την προεπιλεγμένη γενική ρύθμιση (με ονομασία "%s"). Αυτή η επιλογή δεν χρειάζεται τεχνικές γνώσεις για την ολοκλήρωση της ρύθμισης.
    Ωστόσο, είναι συχνά καλύτερο για την ρύθμιση των εξερχόμενων email να χρησιμοποιείτε την μέθοδο (με ονομασία "%s") χρησιμοποιώντας τον διακομιστή email του παρόχου υπηρεσιών email σας αντί για την προεπιλεγμένη ρύθμιση για διάφορος λόγους: WarningPHPMailA=- Η χρήση του διακομιστή του παρόχου υπηρεσιών email αυξάνει την αξιοπιστία του email σας, επομένως αυξάνει την πιθανότητα παράδοσης των μηνυμάτων σας χωρίς να επισημαίνονται ως SPAM -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Εάν το domain του email σας (το τμήμα mymaildomain.com απο το myname@mymaildomain.com) προστατεύεται από μια SPF + DMARC εγγραφή , το email σας μπορεί να επισημανθεί ως SPAM επειδή ο κανόνας DMARC που εχει ορίστει στη DNS zone του domain του αποστολέα (mymaildomain.com) δεν επιτρέπει την αποστολή ως γενικός αποστολέας. Σε μια τέτοια περίπτωση, πρέπει να απενεργοποιήσετε το DMARC για το domain (ή να το ορίσετε σε p=none όπως γίνεται από το @gmail.com) ή, καλύτερα, εάν έχετε τις τεχνικές γνώσεις, να χρησιμοποιήσετε την άλλη μέθοδο για να στείλετε email χρησιμοποιώντας τον SMTP διακομιστή του δικού σας παρόχου email. WarningPHPMailC=- Η χρήση του διακομιστή SMTP του δικού σας Παρόχου Υπηρεσιών Email για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου είναι επίσης χρήσιμη καθώς όλα τα μηνύματα ηλεκτρονικού ταχυδρομείου που αποστέλλονται από την εφαρμογή θα αποθηκεύονται και στον κατάλογο "Απεσταλμένα" του γραμματοκιβωτίου σας. WarningPHPMailD=Επομένως, συνιστάται η αλλαγή της μεθόδου αποστολής μηνυμάτων ηλεκτρονικού ταχυδρομείου στην τιμή "SMTP". WarningPHPMailDbis=Εάν θέλετε πραγματικά να διατηρήσετε την προεπιλεγμένη μέθοδο "PHP" για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου, απλώς αγνοήστε αυτήν την προειδοποίηση ή αφαιρέστε την %sκάνοντας κλικ εδώ%s. WarningPHPMail2=Εάν ο πάροχος σας SMTP email χρειάζεται να περιορίσει το πρόγραμμα-πελάτη email σε ορισμένες διευθύνσεις IP (σπάνια), αυτή είναι η διεύθυνση IP του mail user agent (MUA) για την εφαρμογή σας ERP CRM: %s . -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. -SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses -ActualMailDNSRecordFound=Actual %s record found (for email %s) : %s +WarningPHPMailSPF=Εάν το domain name στη διεύθυνση email σας προστατεύεται από μια εγγραφή SPF (ρωτήστε τον καταχωρητή του domain name σας), πρέπει να προσθέσετε τις ακόλουθες διευθύνσεις IP ή καταχώριση στην εγγραφή SPF του DNS του domain σας: %s. +WarningPHPMailSPFDMARC=Εάν το domain name στη διεύθυνση email σας προστατεύεται από μια εγγραφή DMARC διαφορετική από το p=none (ρωτήστε τον καταχωρητή του domain name σας), πρέπει να αφαιρέσετε την εγγραφή DMARC ή να την ορίσετε σε p=none όπως το @gmail.com) ή χρησιμοποιήστε άλλη μέθοδο αποστολής. +SPFAndDMARCInformation=SPF και DMARC DNS εγγραφή για κύριες διευθύνσεις email +ActualMailDNSRecordFound=Βρέθηκε πραγματική εγγραφή %s (για το email %s) : %s ClickToShowDescription=Κάντε κλικ για να εμφανιστεί η περιγραφή DependsOn=Αυτή η ενότητα εξαρτάται από τις ενότητες RequiredBy=Αυτή η ενότητα απαιτείται από τις ενότητες @@ -592,8 +591,8 @@ Module52Name=Αποθέματα Module52Desc=Διαχείριση αποθεμάτων (παρακολούθηση κίνησης αποθεμάτων και απογραφής) Module53Name=Υπηρεσίες Module53Desc=Διαχείριση Υπηρεσιών -Module54Name=Συμβόλαια / Συνδρομές -Module54Desc=Διαχείριση συμβολαίων (υπηρεσίες ή επαναλαμβανόμενες συνδρομές) +Module54Name=Συμβάσεις / Συνδρομές +Module54Desc=Διαχείριση συμβάσεων (υπηρεσίες ή επαναλαμβανόμενες συνδρομές) Module55Name=Barcodes Module55Desc=Διαχείριση γραμμωτού κώδικα(Barcode) ή κώδικα QR Module56Name=Πληρωμή μέσω μεταφοράς πίστωσης @@ -815,12 +814,12 @@ Permission151=Ανάγνωση εντολών πληρωμής άμεσης χρ Permission152=Δημιουργία / τροποποίηση εντολών πληρωμής άμεσης χρέωσης Permission153=Αποστολή / Αποστολή εντολών πληρωμής άμεσης χρέωσης Permission154=Πιστωτικές εγγραφές / απορρίψεις εντολών πληρωμής άμεσης χρέωσης -Permission161=Ανάγνωση συμβολαίων/συνδρομών -Permission162=Δημιουργία/τροποποίηση συμβολαίων/συνδρομών -Permission163=Ενεργοποίηση υπηρεσίας/συνδρομής ενός συμβολαίου -Permission164=Απενεργοποίηση υπηρεσίας/συνδρομής ενός συμβολαίου -Permission165=Διαγραφή συμβολαίων/συνδρομών -Permission167=Εξαγωγή συμβολαίων +Permission161=Ανάγνωση συμβάσεων/συνδρομών +Permission162=Δημιουργία/τροποποίηση συμβάσεων/συνδρομών +Permission163=Ενεργοποίηση υπηρεσίας/συνδρομής μιας σύμβασης +Permission164=Απενεργοποίηση υπηρεσίας/συνδρομής μιας σύμβασης +Permission165=Διαγραφή συμβάσεων/συνδρομών +Permission167=Εξαγωγή συμβάσεων Permission171=Ανάγνωση ταξιδίων και εξόδων (δικά σας και των υφισταμένων σας) Permission172=Δημιουργία/τροποποίηση ταξιδιών και εξόδων Permission173=Διαγραφή ταξιδιών και εξόδων @@ -885,7 +884,7 @@ Permission301=Δημιουργια PDF καταστάσεων με barcodes Permission304=Δημιουργία / τροποποίηση barcodes Permission305=Διαγραφή barcodes Permission311=Ανάγνωση υπηρεσιών -Permission312=Εκχώρηση υπηρεσίας/συνδρομής σε συμβόλαιο +Permission312=Εκχώρηση υπηρεσίας/συνδρομής σε σύμβαση Permission331=Ανάγνωση σελιδοδεικτών Permission332=Δημιουργία / τροποποίηση σελιδοδεικτών Permission333=Διαγραφή σελιδοδεικτών @@ -1998,7 +1997,7 @@ YouMayFindNotificationsFeaturesIntoModuleNotification=Μπορείτε να βρ TemplatesForNotifications=Πρότυπα email για ειδοποιήσεις ListOfNotificationsPerUser=Λίστα αυτόματων ειδοποιήσεων ανά χρήστη* ListOfNotificationsPerUserOrContact=Λίστα πιθανών αυτόματων ειδοποιήσεων (σε επιχειρηματικό συμβάν) διαθέσιμων ανά χρήστη * ή ανά επαφή ** -ListOfFixedNotifications=Global recipients emails for automatic email notifications +ListOfFixedNotifications=Email παραληπτών για αυτόματες ειδοποιήσεις GoOntoUserCardToAddMore=Μεταβείτε στην καρτέλα "Ειδοποιήσεις" ενός χρήστη για να προσθέσετε ή να αφαιρέσετε ειδοποιήσεις για τους χρήστες GoOntoContactCardToAddMore=Μεταβείτε στην καρτέλα "Ειδοποιήσεις" τρίτου μέρους για να προσθέσετε ή να καταργήσετε ειδοποιήσεις για επαφές / διευθύνσεις Threshold=Κατώφλι @@ -2063,7 +2062,7 @@ MailToSendIntervention=Παρεμβάσεις MailToSendSupplierRequestForQuotation=Αίτημα προσφοράς MailToSendSupplierOrder=Εντολές αγοράς MailToSendSupplierInvoice=Τιμολόγια προμηθευτή -MailToSendContract=Συμβόλαια +MailToSendContract=Συμβάσεις MailToSendReception=Παραλαβές MailToExpenseReport=Αναφορές εξόδων MailToThirdparty=Τρίτα μέρη @@ -2220,7 +2219,7 @@ CreateCandidature=Δημιουργία αίτησης εργασίας FormatZip=Zip MainMenuCode=Κωδικός εισόδου μενού (mainmenu) ECMAutoTree=Εμφάνιση αυτόματης δομής ECM -OperationParamDesc=Define the rules to use to extract some data or set values to use for operation.

    Example to extract a string from email header, subject or body into a temporary variable:
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Examples to set the properties of an object to create:
    objproperty1=SET:a hard coded value
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:a value (value is set only if property is not already defined)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a new line to extract or set several properties. +OperationParamDesc=Καθορίστε τους κανόνες που θα χρησιμοποιηθούν για την εξαγωγή ορισμένων δεδομένων ή τον ορισμό τιμών που θα χρησιμοποιηθούν για την λειτουργία.

    Παράδειγμα εξαγωγής ενός string από την κεφαλίδα ,το θέμα η το σώμα του email σε μια προσωρινή μεταβλητή:
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Παραδείγματα ρύθμισης ιδιοτήτων ενός αντικειμένου προς δημιουργία:
    objproperty1=SET:μια προκαθορισμένη τιμή
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:μια τιμή (αρκεί να μην έχει ήδη οριστεί η ιδιότητα)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY: το όνομα της εταιρείας είναι\\s([^\\s]*)

    Χρησιμοποιήστε ένα new line για την εξαγωγή η τον ορισμό αρκετών ιδιοτήτων. OpeningHours=Ώρες λειτουργίας OpeningHoursDesc=Εισάγετε εδώ το κανονικό ωράριο λειτουργίας της εταιρείας σας. ResourceSetup=Διαμόρφωση της ενότητας πόρων @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Όνομα τρίτου μέρους - Διακριτικός ALIAS_THIRDPARTY=Διακριτικός τίτλος τρίτου μέρους - Όνομα τρίτου μέρους PDFIn2Languages=Εμφάνιση ετικετών σε 2 διαφορετικές γλώσσες στα PDF PDF_USE_ALSO_LANGUAGE_CODE=Εάν θέλετε να έχετε κείμενα σε 2 διαφορετικές γλώσσες στο ίδιο PDF, πρέπει να ορίσετε εδώ αυτή τη δεύτερη γλώσσα ώστε το PDF που θα δημιουργηθεί να περιέχει 2 διαφορετικές γλώσσες στην ίδια σελίδα ( μόνο λίγα πρότυπα PDF το υποστηρίζουν). Διατηρήστε το κενό για 1 γλώσσα ανά PDF. -PDF_USE_A=Δημιουργήστε έγγραφα PDF με μορφή PDF/A αντί για την προεπιλεγμένη μορφή PDF +PDF_USE_A=Μορφή εγγράφων PDF FafaIconSocialNetworksDesc=Εισαγάγετε εδώ τον κωδικό ενός εικονιδίου FontAwesome. Εάν δεν γνωρίζετε τι είναι το FontAwesome, μπορείτε να χρησιμοποιήσετε τη γενική τιμή fa-address-book. RssNote=Σημείωση: Κάθε ορισμός ροής RSS παρέχει ένα γραφικό στοιχείο που πρέπει να ενεργοποιήσετε για να το έχετε διαθέσιμο στον πίνακα εργαλείων JumpToBoxes=Μετάβαση σε Ρυθμίσεις -> Γραφικά στοιχεία @@ -2347,7 +2346,7 @@ DashboardDisableBlockAgenda=Απενεργοποίηση του εικονιδί DashboardDisableBlockProject=Απενεργοποίηση του εικονίδιου για έργα DashboardDisableBlockCustomer=Απενεργοποίηση του εικονιδίου για πελάτες DashboardDisableBlockSupplier=Απενεργοποίηση του εικονιδίου για προμηθευτές -DashboardDisableBlockContract=Απενεργοποίηση του εικονιδίου για συμβόλαια +DashboardDisableBlockContract=Απενεργοποίηση του εικονιδίου για συμβάσεις DashboardDisableBlockTicket=Απενεργοποίηση του εικονιδίου για tickets DashboardDisableBlockBank=Απενεργοποίηση του εικονιδίου για τράπεζες DashboardDisableBlockAdherent=Απενεργοποίηση του εικονιδίου για συνδρομές @@ -2555,3 +2554,8 @@ MenuDict=Λεξικό AddMoreParams=Προσθήκη περισσοτέρων παραμέτρων σύνδεσης (cookies, tokens, ...)
    Παράδειγμα: token : value token ParamName=Όνομα παραμέτρου ParamValue=Τιμή παραμέτρου +ConfirmDeleteParamOfSocialNetwork=Είστε σίγουροι ότι θέλετε να διαγράψετε αυτή τη παραμέτρο ; +HelpMariaDBToGetPossibleValues=Μπορείτε να λάβετε μια λίστα με πιθανές τιμές εκτελώντας την ακόλουθη εντολή SQL: %s +Captcha=Captcha +CaptchaDesc=Εάν θέλετε να προστατεύσετε τη σελίδα σύνδεσής με ένα Captcha, μπορείτε να επιλέξετε ποιo να χρησιμοποιήσετε εδώ +DolibarrStandardCaptcha=Ένα captcha που δημιουργήθηκε από τον Dolibarr diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 698548254b845..ec723e8881291 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -42,7 +42,7 @@ TypeOfLeaveId=Type of leave ID TypeOfLeaveCode=Type of leave code TypeOfLeaveLabel=Type of leave label NbUseDaysCP=Number of days -NbUseDaysCPHelp=The calculation of the number of days of leave used takes into account the non-working days and the holidays defined in the dictionary. +NbUseDaysCPHelp=The calculation of the number of vacation days used takes into account the non-working days and public holidays defined in the dictionary. NbUseDaysCPShort=Days of leave NbUseDaysCPShortInMonth=Days of leave in month DayIsANonWorkingDay=%s is a non-working day diff --git a/htdocs/langs/es_AR/admin.lang b/htdocs/langs/es_AR/admin.lang index f4dc71f66327b..b5ed0f8bfb755 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -558,7 +558,6 @@ WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el mó NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establézcalo en sí si este grupo es un cálculo de otros grupos COMPANY_AQUARIUM_CLEAN_REGEX=Filtro de expresiones regulares para limpiar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) -GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) HelpOnTooltip=Texto de ayuda para mostrar en información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index 909b613585b9d..cd72dd155d3ad 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -1255,7 +1255,6 @@ WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el mó NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establezca esto en sí si este grupo es un cálculo de otros grupos SeveralLangugeVariatFound=Varias variantes de lenguaje encontradas -GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) HelpOnTooltip=Texto de ayuda para mostrar en información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index 650f6dea4c32d..32a83dcc3d375 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -1460,7 +1460,6 @@ EnterCalculationRuleIfPreviousFieldIsYes=Ingrese la regla de cálculo si el camp RemoveSpecialChars=Quitar caracteres especiales COMPANY_AQUARIUM_CLEAN_REGEX=Filtro de expresiones regulares para limpiar el valor (COMPANY_AQUARIUM_CLEAN_REGEX) RemoveSpecialWordsHelp=Especifique las palabras que se limpiarán antes de calcular la cuenta del cliente o proveedor. Usar una ";" entre cada palabra -GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) HelpOnTooltip=Texto de ayuda para mostrar en información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_CR/admin.lang b/htdocs/langs/es_CR/admin.lang index 686edf2a5c1eb..6b22370b3a63b 100644 --- a/htdocs/langs/es_CR/admin.lang +++ b/htdocs/langs/es_CR/admin.lang @@ -1471,7 +1471,6 @@ SetToYesIfGroupIsComputationOfOtherGroups=Establézcalo en sí si este grupo es COMPANY_AQUARIUM_NO_PREFIX=No use el prefijo, solo copie el código de cliente o proveedor COMPANY_DIGITARIA_CLEAN_REGEX=Filtro Regex para limpiar valor (COMPANY_DIGITARIA_CLEAN_REGEX) RemoveSpecialWordsHelp=Especifique las palabras que se limpiarán antes de calcular la cuenta del cliente o proveedor. Usar una ";" entre cada palabra -GDPRContact=Delegado de Protección de Datos (contacto DPO, Privacidad de Datos o RGPD) HelpOnTooltip=Texto de ayuda para mostrar en la información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_CU/admin.lang b/htdocs/langs/es_CU/admin.lang index 5a9650e4a5eb7..5848d1f21f22b 100644 --- a/htdocs/langs/es_CU/admin.lang +++ b/htdocs/langs/es_CU/admin.lang @@ -1452,7 +1452,6 @@ NothingToSetup=No se requiere una configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establézcalo en sí si este grupo es un cálculo de otros grupos COMPANY_DIGITARIA_CLEAN_REGEX=Filtro Regex para limpiar valor (COMPANY_DIGITARIA_CLEAN_REGEX) RemoveSpecialWordsHelp=Especifique las palabras que se limpiarán antes de calcular la cuenta del cliente o proveedor. Usar una ";" entre cada palabra -GDPRContact=Delegado de Protección de Datos (contacto DPO, Privacidad de Datos o RGPD) HelpOnTooltip=Texto de ayuda para mostrar en la información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index 5a335e607b4a8..d2e017359470a 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -1321,7 +1321,6 @@ WarningInstallationMayBecomeNotCompliantWithLaw=Está intentando instalar el mó NothingToSetup=No se requiere ninguna configuración específica para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establezca esto en "sí" si este grupo es un cálculo de otros grupos SeveralLangugeVariatFound=Algunas variantes de lenguaje -GDPRContact=Oficial de protección de datos (DPO, privacidad de datos o contacto GDPR) HelpOnTooltip=Texto de ayuda para mostrar en información sobre herramientas HelpOnTooltipDesc=Coloque texto o una clave de traducción aquí para que el texto se muestre en una información sobre herramientas cuando este campo aparezca en un formulario YouCanDeleteFileOnServerWith=Puede eliminar este archivo en el servidor con la línea de comandos:
    %s diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index e2e936146c3f3..a6bed48d2cda9 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=El listado de valores tiene que ser líneas key,valor< ExtrafieldParamHelpcheckbox=El listado de valores tiene que ser líneas con el formato key,valor

    por ejemplo:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=El listado de valores tiene que ser líneas con el formato key,valor (donde key no puede ser 0)

    por ejemplo:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Los parámetros deben ser NombreObjeto:RutaClase
    Sintaxis: NombreObjeto:RutaClase ExtrafieldParamHelpSeparator=Mantener vacío para un separador simple
    Establezca a 1 para un separador de colapso (abierto de forma predeterminada para una nueva sesión, luego el estado se mantiene para cada sesión de usuario)
    Establezca a 2 para un separador de colapso (colapsado por defecto para una nueva sesión, luego el estado se mantiene para cada sesión de usuario) LibraryToBuildPDF=Libreria usada en la generación de los PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtro de expresiones regulares para limpiar el va DuplicateForbidden=Duplicado prohibido RemoveSpecialWords=Limpiar ciertas palabras al generar subcuentas para clientes o proveedores RemoveSpecialWordsHelp=Especifique las palabras que se limpiarán antes de calcular la cuenta del cliente o proveedor. Utilizar una ";" entre cada palabra -GDPRContact=Oficina Protección de datos (DPO, Políticas de privacidad o contacto GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Si almacena datos personales en su Sistema de Información, puede nombrar al contacto responsable del Reglamento General de Protección de Datos aquí HelpOnTooltip=Texto de ayuda a mostrar en la ventana emergente HelpOnTooltipDesc=Coloque aquí un texto o una clave de traducción para mostrar información emergente cuando este campo aparezca en un formulario @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nombre de terceros: alias de terceros ALIAS_THIRDPARTY=Alias de terceros: nombre de terceros PDFIn2Languages=Mostrar etiquetas en el PDF en 2 idiomas diferentes (es posible que esta función no funcione para algunos idiomas) PDF_USE_ALSO_LANGUAGE_CODE=Si desea duplicar algunos textos en su PDF en 2 idiomas diferentes en el mismo PDF generado, debe establecer aquí este segundo idioma para que el PDF generado contenga 2 idiomas diferentes en la misma página, el elegido al generar el PDF y este ( solo unas pocas plantillas PDF lo admiten). Mantener vacío para 1 idioma por PDF. -PDF_USE_A=Genere documentos PDF con formato PDF/A en lugar del formato PDF predeterminado +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Ingrese aquí el código de un ícono FontAwesome. Si no sabe qué es FontAwesome, puede usar el valor genérico fa-address-book. RssNote=Nota: Cada definición de fuente RSS proporciona un widget que debe habilitar para que esté disponible en el tablero JumpToBoxes=Vaya a Configuración -> Módulos @@ -2555,3 +2554,8 @@ MenuDict=Diccionario AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Nombre del parámetro ParamValue=Valor del parámetro +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 9a975f69d7ac9..6e056f3c55ccc 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=فهرست مقادیر باید به صورت سطو ExtrafieldParamHelpcheckbox=فهرست مقادیر باید سطوری به شکل key,value باشد که (که key نمی‌تواند برابر با 0 باشد)

    برای مثال:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=فهرست مقادیر باید سطوری به شکل key,value باشد که (که key نمی‌تواند برابر با 0 باشد)

    برای مثال:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator
    Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)
    Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=کتابخانۀ قابل استفاده برای تولید PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLE DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers RemoveSpecialWordsHelp=Specify the words to be cleaned before calculating the customer or supplier account. Use a ";" between each word -GDPRContact=مأمور حفاظت داده‌ها (DPO، حریم خصوصی یا طرف‌تماس GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=If you store personal data in your Information System, you can name the contact who is responsible for the General Data Protection Regulation here HelpOnTooltip=متن راهنما برای نمایش کادر‌نکات HelpOnTooltipDesc=یک نوشته یا یک کلید ترجمه در اینجا برای نوشته وارد کنید که در هنگامی که این بخش در برگه نمایش داده می‌شود به‌عنوان یک کادرراهنمائی نمایش داده شود @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Third-party name - Third-party alias ALIAS_THIRDPARTY=Third-party alias - Third-party name PDFIn2Languages=Show labels in the PDF in 2 different languages (this feature may not work for some couple of languages) PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. -PDF_USE_A=Generate PDF documents with format PDF/A instead of default format PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard JumpToBoxes=Jump to Setup -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 1502e6336a326..685b66989c303 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=Arvoluettelon on oltava rivejä, joissa on muoto: avain,arvo (missä avain ei voi olla 0)

    esimerkiksi:
    1,arvo1
    2,arvo2
    3,arvo3
    ... ExtrafieldParamHelpradio=Arvoluettelon on oltava rivejä, joissa on muoto: avain,arvo (missä avain ei voi olla 0)

    esimerkiksi:
    1,arvo1
    2,arvo2
    3,arvo3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrien on oltava ObjectName:Classpath
    Syntaksi: ObjectName:Classpath ExtrafieldParamHelpSeparator=Pidä tyhjänä yksinkertainen erotin
    Aseta tämän arvoksi 1, jos haluat tiivistävän erottimen (avaa oletus uutta istuntoa varten, tila on säilytetään jokaista käyttäjäistuntoa varten)
    Aseta tämän arvoksi 2 tiivistyvälle erottimelle (kutistaa oletus uutta istuntoa varten, tila on säilytetään jokaista käyttäjäistuntoa varten) LibraryToBuildPDF=Käytettävä kirjasto PDF:n luomiseen @@ -782,7 +781,7 @@ Permission87=Sulje asiakkaiden tilauksia Permission88=Peruuta asiakkaiden tilauksia Permission89=Poista asiakkaiden tilauksia Permission91=Lue sosiaalinen tai verotus Verot ja alv -Permission92=luo/modify sosiaalinen tai verotus Verot ja alv +Permission92=Luo/Muokkaa sosiaalimaksu / vero tai alv Permission93=Poista sosiaalinen tai verotus Verot ja alv Permission94=Vie sosiaalinen tai verotus Verot Permission95=Lue raportit @@ -1356,7 +1355,7 @@ ShowProfIdInAddress=Näytä ammattitunnus osoitteineen ShowVATIntaInAddress=Piilota yhteisön sisäinen ALV-numero ShowLegalFormInAddress=Näytä oikeudellinen muoto osoitteiden kanssa TranslationUncomplete=Osittainen käännös -MAIN_DISABLE_METEO=Poista sääpeukalo käytöstä +MAIN_DISABLE_METEO=Piilota sää widget MeteoStdMod=Standardi tila MeteoStdModEnabled=Standardi tila aktivoitu MeteoPercentageMod=Prosenttitila @@ -1516,7 +1515,7 @@ SupplierProposalSetup=Hintapyynnöt Toimittajat moduulin asetukset SupplierProposalNumberingModules=Hintapyynnöt Toimittajat numerointimallit SupplierProposalPDFModules=Hintapyynnöt Toimittajat asiakirjamallit FreeLegalTextOnSupplierProposal=Vapaa teksti hintapyyntöihin Toimittajat -WatermarkOnDraftSupplierProposal=vesileima Luonnos hintapyynnöissä Toimittajat (ei mitään, jos tyhjä) +WatermarkOnDraftSupplierProposal=Vesileima toimittajan hintapyyntöluonnoksissa (ei mitään, jos tyhjä) BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL=Kysy hintapyynnön pankkitilin kohde WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Pyydä lähdevarasto tilaukselle ##### Suppliers Orders ##### @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-suodatin arvon puhdistamiseen (COMPANY_DIGIT DuplicateForbidden=Kopiointi kielletty RemoveSpecialWords=Puhdista tietyt sanat luodessasi alatilejä asiakkaat tai Toimittajat RemoveSpecialWordsHelp=Määritä puhdistettavat sanat ennen asiakas- tai toimittaja-tilin laskemista. Käytä ";" jokaisen sanan välissä -GDPRContact=Tietosuojavastaava (tietosuojavastaava, tietosuoja- tai GDPR-yhteyshenkilö) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Jos tallennat henkilötietoja tietojärjestelmääsi, voit nimetä tästä yhteyshenkilön, joka on vastuussa yleisestä tietosuoja-asetuksesta HelpOnTooltip=Ohjeteksti näytettäväksi työkaluvihjeessä HelpOnTooltipDesc=Lisää teksti tai käännösavain tähän, jotta teksti näkyy työkaluvihjessä, kun tämä kenttä näkyy lomakkeessa @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Kolmannen osapuolen nimi – Kolmannen osapuolen alias ALIAS_THIRDPARTY=Kolmannen osapuolen alias - Kolmannen osapuolen nimi PDFIn2Languages=Näytä tarrat PDF-tiedostossa kahdella eri kielellä (tämä ominaisuus ei ehkä toimi joillakin kielillä) PDF_USE_ALSO_LANGUAGE_CODE=Jos haluat, että PDF-tiedostosi tekstit kopioidaan kahdella eri kielellä samaan luotuun PDF-tiedostoon, sinun on asetettava tähän toinen Kieli, jotta luotu PDF sisältää kaksi eri kieltä samalla tavalla. sivu, joka valittiin PDF-tiedostoa luotaessa ja tämä (vain harvat PDF-mallit tukevat tätä). Pidä tyhjänä 1 Kieli PDF-tiedostoa kohden. -PDF_USE_A=Luo PDF-dokumentteja PDF/A-muodossa oletus-muotoisen PDF:n sijaan +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Kirjoita tähän FontAwesome-kuvakkeen koodi. Jos et tiedä mikä on FontAwesome, voit käyttää yleistä arvoa fa-osoitekirjaa. RssNote=Huomautus: Jokainen RSS-syötteen määritelmä sisältää widgetin, joka sinun on otettava käyttöön, jotta se on käytettävissä kojelaudassa JumpToBoxes=Siirry kohtaan Asetukset -> Widgetit @@ -2340,19 +2339,19 @@ InstallLockedBy=Asennuksen/uudelleenasennuksen lukitsee tiedosto %s InstallOfAddonIsNotBlocked=Lisäosien asennuksia ei ole lukittu. luo a tiedosto installmodules.lock hakemistoon %sb09a4b739f17-to block-asennus ulkoisista lisäosista/moduuleista. OldImplementation=Vanha toteutus PDF_SHOW_LINK_TO_ONLINE_PAYMENT=Jos jotkin online-maksu-moduulit ovat käytössä (Paypal, Stripe, ...), lisää linkki PDF-tiedostoon, jotta online-maksu span> -DashboardDisableGlobal=Poista maailmanlaajuisesti käytöstä kaikki avoimien objektien peukalot +DashboardDisableGlobal=Piilota kaikki avointen objektien widgetit BoxstatsDisableGlobal=Poista laatikon tilastot kokonaan käytöstä -DashboardDisableBlocks=Avointen objektien peukalot (käsiteltävä tai myöhässä) päähallintapaneelissa -DashboardDisableBlockAgenda=Poista peukalo käytöstä esityslistaa varten -DashboardDisableBlockProject=Poista peukalo käytöstä Projektit -DashboardDisableBlockCustomer=Poista peukalo käytöstä asiakkaat -DashboardDisableBlockSupplier=Poista peukalo käytöstä Toimittajat -DashboardDisableBlockContract=Poista peukalo käytöstä sopimuksissa -DashboardDisableBlockTicket=Poista lippujen peukalo käytöstä -DashboardDisableBlockBank=Poista pankkien peukalo käytöstä -DashboardDisableBlockAdherent=Poista peukalo käytöstä jäsenyyksiä varten -DashboardDisableBlockExpenseReport=Poista peukalo käytöstä kuluraportit -DashboardDisableBlockHoliday=Poista lehtien peukalo käytöstä +DashboardDisableBlocks=Piilota avointen objektien widgetit (käsiteltävä tai myöhässä) päähallintapaneelista +DashboardDisableBlockAgenda=Piilota agenda widget +DashboardDisableBlockProject=Piilota projekti widget +DashboardDisableBlockCustomer=Piilota asiakkaat widget +DashboardDisableBlockSupplier=Piilota toimittajat widget +DashboardDisableBlockContract=Piilota sopimukset widget +DashboardDisableBlockTicket=Piilota tiketti widget +DashboardDisableBlockBank=Piilota pankki widget +DashboardDisableBlockAdherent=Piilota jäsenyydet widget +DashboardDisableBlockExpenseReport=Piilota kuluraportit widget +DashboardDisableBlockHoliday=Piilota loma widget EnabledCondition=Edellytys, että Kenttä on käytössä (jos ei ole käytössä, näkyvyys on aina pois päältä) IfYouUseASecondTaxYouMustSetYouUseTheMainTax=Jos haluat käyttää toista vero, sinun on otettava käyttöön myös ensimmäinen myynti vero IfYouUseAThirdTaxYouMustSetYouUseTheMainTax=Jos haluat käyttää kolmatta vero, sinun on otettava käyttöön myös ensimmäinen myynti vero @@ -2555,3 +2554,8 @@ MenuDict=Sanakirja AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Parametri ParamValue=Arvo +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index 0b9bb027202de..43e82588a9d45 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -169,10 +169,14 @@ LastActivationAuthor=Dernier auteur d'activation LastActivationIP=Dernière activation IP GenericMaskCodes=Vous pouvez saisir n'importe quel masque de numérotation. Dans ce masque, les balises suivantes peuvent être utilisées :
    {000000} correspond à un nombre qui sera incrémenté à chaque %s. Entrez autant de zéros que la longueur souhaitée du compteur. Le compteur sera complété par des zéros en partant de la gauche afin d'avoir autant de zéros que le masque.
    {000000+000} identique au précédent mais un décalage correspondant au nombre à droite du signe + est appliqué à partir du premier %s.
    {000000@x} identique au précédent mais le compteur est remis à zéro lorsque le mois x est atteint (x compris entre 1 et 12, ou 0 pour utiliser les premiers mois de l'exercice défini dans votre configuration, ou 99 pour une remise à zéro tous les mois). Si cette option est utilisée et que x est égal ou supérieur à 2, alors la séquence {aa}{mm} ou {aaaa}{mm} est également requise.
    {dd} jour (01 à 31).
    {mm} mois (01 à 12).
    {yy}, {aaaa} ou {y} année sur 2, 4 ou 1 numéros.
    GenericMaskCodes2={cccc} le code client sur n caractères
    {cccc000} le code client sur n caractères est suivi d'un compteur dédié au client. Ce compteur dédié au client est réinitialisé en même temps que le compteur global.
    {tttt} Le code du tiers type sur n caractères (voir menu Accueil - Paramétrage - Dictionnaire - Types de tiers). Si vous ajoutez cette balise, le compteur sera différent pour chaque type de tiers.
    +GenericMaskCodes2b={uuuu} les n premiers caractères du nom de famille de l'utilisateur qui crée l'objet (n est le nombre de "u"). GenericMaskCodes3EAN=Tous les autres caractères du masque resteront intacts (sauf * ou ? en 13ème position dans EAN13).
    Les espaces ne sont pas autorisés.
    Dans EAN13, le dernier caractère après le dernier } en 13ème position doit être * ou ? . Il sera remplacée par la clé calculée.
    GenericMaskCodes4a=Exemple sur le 99e %s du tiers TheCompany, avec la date 2023-01-31 :
    GenericMaskCodes4b=Exemple sur un tiers créé le 31/01/2023 :
    GenericMaskCodes4c=Exemple sur un produit créé le 31/01/2023 :
    +GenericMaskCodes5b=IN{yy}{mm}-{0000}-{t} donnera IN2301-0099-A si le type de l'entreprise est « Responsable Inscripto » avec le code pour le type qui est « A_RI » +DateStartThatModel=Désactiver l'utilisation de cette règle de numérotation pour tous les tiers créés avant +DateStartThatModelHelp=Vous pouvez désactiver la règle de numérotation des éléphants pour les tiers créés avant une date (par exemple, parce qu'ils ont été importés par une migration, depuis un autre logiciel utilisant une règle différente). Laissez ce champ vide pour que la règle s'applique à tous les tiers. UMaskExplanation=Ce paramètre permet de définir les permissions fixées par défaut sur les fichiers créés par Dolibarr sur le serveur (lors de l'upload par exemple).
    Il doit s'agir de la valeur octale (par exemple, 0666 signifie lire et écrivez pour tout le monde.). La valeur recommandée est 0600 ou 0660
    Ce paramètre est inutile sur un serveur Windows. SeeWikiForAllTeam=Jetez un œil à la page Wiki pour une liste des contributeurs et leur organisation DisableLinkToHelpCenter=Masquer le lien "Besoin d'aide ou d'assistance" sur la page de connexion @@ -204,6 +208,8 @@ String1Line=Chaîne (1 ligne) Text=Texte Boolean=Boolean (une case à cocher) ExtrafieldSeparator=Séparateur (pas un champ) +ExtrafieldRadio=Boutons radio (1 seul choix) +ExtrafieldCheckBoxFromList=Sélectionnez dans le tableau (n choix) ExtrafieldLink=Lier à un objet ExtrafieldPointGeo=Point Géométrique ExtrafieldMultiPointGeo=Géométrique Multi Point @@ -214,6 +220,7 @@ ExtrafieldParamHelpPassword=Laisser ce champ vide signifie que cette valeur sera ExtrafieldParamHelpselect=La liste de valeurs doit être constituée de lignes au format clé, valeur (où la clé ne peut pas être « 0 »)

    par exemple :
    1,value1
    2,value2
    code3,value3
    ...

    Afin d'avoir la liste en fonction d'une autre liste d'attributs complémentaires :
    1,value1|options_parent_list_code : parent_key
    2,value2|options_parent_list_code:parent_key

    Afin d'avoir la liste dépendant d'une autre liste :
    1, value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key ExtrafieldParamHelpcheckbox=La liste de valeurs doit être constituée de lignes au format clé, valeur (où la clé ne peut pas être « 0 »)

    par exemple :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=La liste de valeurs doit être constituée de lignes au format clé, valeur (où la clé ne peut pas être « 0 »)

    par exemple :
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldParamHelpsellist=La liste de valeurs provient d'une table
    Syntaxe : table_name:label_field:id_field::filtersql
    Exemple : c_typent:libelle:id::filtersql

    - id_field est nécessairement une clé int primaire
    - filtersql est une condition. Elle doit utiliser la syntaxe USF. Exemple : (active:=:1) pour afficher uniquement la valeur active
    Vous pouvez également utiliser $ID$ dans le filtre qui est l'ID actuel de l'objet actuel
    Si vous souhaitez filtrer sur des champs supplémentaires, utilisez la syntaxe extra.fieldcode=... (où fieldcode est le code du champ supplémentaire)

    Pour que la liste dépende d'une autre liste d'attributs complémentaires :
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    Pour que la liste dépende d'une autre liste :
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Les paramètres doivent être ObjectName:Classpath
    Syntaxe : ObjectName:Classpath ExtrafieldParamHelpSeparator=Gardez vide pour un séparateur simple
    Définissez ceci sur 1 pour un séparateur réduit (ouvert par défaut pour une nouvelle session, puis le statut est conservé pour chaque session utilisateur)
    Définissez ceci sur 2 pour un séparateur réduit (réduit par défaut pour une nouvelle session, puis le statut est conservé avant chaque session utilisateur) LibraryToBuildPDF=Bibliothèque utilisée pour la génération de PDF @@ -238,10 +245,15 @@ ModuleCompanyCodeCustomerDigitaria=%s suivi du nom du client tronqué du nombre ModuleCompanyCodeSupplierDigitaria=%s suivi du nom du fournisseur tronqué du nombre de caractères : %s pour le code comptable du fournisseur. Use3StepsApproval=Par défaut, les bons de commande doivent être créés et approuvés par 2 utilisateurs différents (une étape / utilisateur à créer et une étape / utilisateur à approuver. Notez que si l'utilisateur a la permission de créer et d'approuver, un pas / utilisateur suffira) . Vous pouvez demander cette option pour introduire une troisième étape / approbation de l'utilisateur, si le montant est supérieur à une valeur dédiée (donc 3 étapes seront nécessaires: 1 = validation, 2 = première approbation et 3 = deuxième approbation si le montant est suffisant).
    Configurez ceci pour vider si une approbation (2 étapes) est suffisante, définissez-la à une valeur très faible (0.1) si une deuxième approbation (3 étapes) est toujours requise. UseDoubleApproval=Utilisez une approbation de 3 étapes lorsque le montant (sans taxes) est supérieur à ... +WarningPHPMail=REMARQUE : la configuration pour envoyer des e-mails depuis l'application utilise la configuration générique par défaut (appelée « %s »). Ce choix ne nécessite aucune connaissance technique ni configuration particulière.
    Cependant, il est souvent préférable de configurer les e-mails sortants pour utiliser l'autre méthode (appelée « %s ») pour utiliser le serveur de messagerie de votre fournisseur de services de messagerie, au lieu de la configuration par défaut pour plusieurs raisons : +WarningPHPMailA=- L'utilisation du serveur du fournisseur de services de messagerie augmente la fiabilité de votre e-mail, ce qui augmente la délivrabilité sans être signalé comme SPAM +WarningPHPMailB=- Si le domaine de votre e-mail (la partie mymaildomain.com dans myname@mymaildomain.com) est protégé par un enregistrement SPF + DMARC, votre e-mail peut être signalé comme SPAM parce que votre règle DMARC définie dans la zone DNS du domaine de l'expéditeur (mymaildomain.com) ne permet pas l'envoi en tant qu'expéditeur générique. Dans un tel cas, vous devez désactiver le DMARC pour le domaine (ou le définir sur p=none comme fait par @gmail.com) ou, mieux, si vous avez les connaissances techniques, utiliser l'autre méthode pour envoyer des e-mails en utilisant le serveur SMTP de votre propre fournisseur de messagerie. WarningPHPMailC=- Utiliser le serveur SMTP de votre propre fournisseur de services de messagerie pour envoyer des emails est également intéressant car tous les emails envoyés depuis l'application seront également enregistrés dans votre répertoire "Envoyés" de votre boîte mail. WarningPHPMailD=Il est donc recommandé de changer le mode d'envoi des e-mails vers la valeur « SMTP ». WarningPHPMailDbis=Si vous souhaitez vraiment conserver la méthode "PHP" par défaut pour envoyer des e-mails, ignorez simplement cet avertissement ou supprimez-le en %sen cliquant ici%s. WarningPHPMail2=Si votre fournisseur de messagerie SMTP doit restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP de l'agent utilisateur de messagerie (MUA) de votre application ERP CRM : %s. +WarningPHPMailSPF=Si le nom de domaine dans votre adresse e-mail d'expéditeur est protégé par un enregistrement SPF (demandez à votre registrar de nom de domaine), vous devez ajouter les IP ou l'entrée suivantes dans l'enregistrement SPF du DNS de votre domaine : %s. +ActualMailDNSRecordFound=Enregistrement %s réel trouvé (pour l'e-mail %s) : %s ClickToShowDescription=Cliquez pour afficher la description DependsOn=Ce module nécessite le(s) module(s) RequiredBy=Ce module est requis par module (s) @@ -319,6 +331,7 @@ Module2000Desc=Autoriser la modification/le formatage des champs de texte à l'a Module2200Desc=Utilisez des expressions mathématiques pour la génération automatique des prix Module2300Desc=Gestion des tâches planifiées (alias cron ou chrono table) Module2400Name=Evénements / Agenda +Module2400Desc=Gérez les événements manuels et automatiques. Utilisez le calendrier pour enregistrer les événements manuellement. Enregistrez également les événements automatiquement à des fins de suivi ou enregistrez manuellement les événements ou les réunions. Il s'agit du module principal pour une bonne gestion des relations avec les clients et/ou les fournisseurs. Module2500Name=SGD/ECM Module2500Desc=Système de gestion de documents / Gestion de contenu électronique. Organisation automatique de vos documents générés ou stockés. Partagez-les quand vous en avez besoin. Module2600Desc=Active le serveur de Web Services de Dolibarr @@ -393,6 +406,7 @@ Permission194=Lire les lignes de bande passante Permission253=Créer/modifier d'autres utilisateurs, groupes et autorisations Permission262=Étendez l'accès à tous les tiers ET à leurs objets (pas seulement aux tiers pour lesquels l'utilisateur est lié en tant que représentant commercial). Permission262b=Peu efficace pour les utilisateurs externes (toujours limités à eux-mêmes pour les propositions, commandes, factures, contrats, etc.). +Permission262c=Non efficace pour les projets (seules les règles sur les autorisations de projet, la visibilité et l'affectation des utilisateurs comptent). Permission263=Étendre l'accès à tous les tiers SANS leurs objets (pas seulement aux tiers pour lesquels l'utilisateur est représentant commercial).
    Pas efficace pour les utilisateurs externes (toujours limités à eux-mêmes pour les propositions, commandes, factures, contrats, etc.).
    Non efficace pour les projets (uniquement les règles sur les autorisations de projet, la visibilité et les questions d'affectation). Permission293=Modifier les tarifs du client Permission301=Générer des feuilles PDF de codes-barres @@ -421,6 +435,7 @@ Permission663=Supprimer un ordre de fabrication (MO) Permission771=Lire les rapports de dépenses (le vôtre et vos subordonnés ) Permission772=Créer/modifier des notes de frais (pour vous et vos subordonnés) Permission778=Créer/modifier les notes de frais de tout le monde +Permission1001=Lire les entrepôts et les stocks Permission1011=Afficher les inventaires Permission1015=Autoriser la modification de la valeur PMP d'un produit Permission1101=Lire les bons de livraison @@ -703,6 +718,11 @@ InvoiceCheckPosteriorDate=Vérifier la date de facture avant validation InvoiceCheckPosteriorDateHelp=La validation d'une facture sera interdite si sa date est antérieure à la date de la dernière facture du même type. InvoiceOptionCategoryOfOperations=Afficher la mention « catégorie d'opérations » sur la facture. InvoiceOptionCategoryOfOperationsHelp=Selon la situation, la mention apparaîtra sous la forme :
    - Catégorie d'opérations : Livraison de marchandises
    - Catégorie de opérations : Prestation de services
    - Catégorie d'opérations : Mixte - Livraison de biens et prestation de services +InvoiceClassifyBilledSupplierOrderWithoutInvoice=Interdire la classification d'une commande comme facturée sans facture. +InvoiceClassifyBilledSupplierOrderWithoutInvoiceHelp=Une commande peut être classée comme facturée par défaut. Si cette configuration est définie sur true, elle ne le sera pas. +SupplierOrderClassifyBilledWithoutInvoice=Interdire la classification d’un bon de commande comme facturé sans facture. +SupplierOrderClassifyBilledWithoutInvoiceHelp=Une commande fournisseur peut être classée comme facturée par défaut. Si cette configuration est définie sur true, elle ne le sera pas. +SuggestedPaymentModesIfNotDefinedInProposal=Mode de paiement suggéré par défaut s'il n'est pas défini sur la proposition SupplierProposalSetup=Configuration du module de ​​demande de prix des fournisseurs SupplierProposalNumberingModules=Modèles de numérotation des demandes de prix des fournisseurs SupplierProposalPDFModules=Modèles des documents des demandes de prix des fournisseurs @@ -716,6 +736,8 @@ OrdersSetup=Configuration de la gestion des commandes clients ShippableOrderIconInList=Ajouter un icône dans la liste des commandes qui indique si la commande est expédiable. MemberCodeChecker=Options de génération automatique des codes membres AdherentMailRequired=Email requis pour créer un nouveau membre +MemberSendInformationByMailByDefault=La case à cocher pour envoyer un email de confirmation aux membres (validation ou nouvelle inscription) est activée par défaut +MemberCreateAnExternalUserForSubscriptionValidated=Créer automatiquement un utilisateur externe (avec un login pour se connecter à l'application) après un paiement en ligne d'une cotisation d'adhésion MEMBER_REMINDER_EMAIL=Activer le rappel automatique par e-mail des abonnements expirés. Remarque : Le module %s doit être activé et correctement configuré pour envoyer rappels. MembersDocModules=Modèles de documents pour les documents générés à partir du dossier de membre LDAPMembersTypesSynchro=Types de membres @@ -891,6 +913,7 @@ CloseFiscalYear=Période comptable rapprochée DeleteFiscalYear=Supprimer la période comptable ConfirmDeleteFiscalYear=Êtes-vous sûr de supprimer cette période comptable? ShowFiscalYear=Afficher la période comptable +AssetNumberingModules=Module de numérotation des actifs SalariesSetup=Configuration du module salariés TypePaymentDesc=0 : Type de paiement client, 1 : Type de paiement fournisseur, 2 : Type de paiement client et fournisseur. ExpenseReportsRulesSetup=Mise en place du module Notes de frais - Règles @@ -986,6 +1009,7 @@ BaseCurrency=Monnaie de référence de la société (entrer dans la configuratio WarningNoteModuleInvoiceForFrenchLaw=Ce module %s est conforme aux lois françaises (Loi Finance 2016). WarningNoteModulePOSForFrenchLaw=Ce module %s est conforme à la loi française (Loi Finance 2016) car le module Non Reversible Logs est automatiquement activé. WarningInstallationMayBecomeNotCompliantWithLaw=Vous essayez d'installer le module %s qui est un module externe. L'activation d'un module externe signifie que vous faites confiance à l'éditeur de ce module et que vous êtes sûr que ce module n'a pas d'impact négatif sur le comportement de votre application et qu'il est conforme aux lois de votre pays (%s). Si le module introduit une fonctionnalité illégale, vous devenez responsable de l'utilisation de logiciels illégaux. +WarningExperimentalFeatureInvoiceSituationNeedToUpgradeToProgressiveMode=Si vous utilisez le mode expérimental pour les factures de situation, vous devrez mettre à jour vos données pour passer du mode expérimental au mode officiel. Vous pouvez contacter un partenaire pour vous aider dans cette tâche. Une liste de partenaires privilégiés est disponible en suivant ce lien MAIN_PDF_MARGIN_LEFT=Marge gauche sur PDF MAIN_PDF_MARGIN_RIGHT=Marge droite sur PDF MAIN_PDF_MARGIN_TOP=Marge supérieure sur PDF @@ -993,6 +1017,7 @@ MAIN_PDF_MARGIN_BOTTOM=Marge inférieure sur PDF MAIN_DOCUMENTS_LOGO_HEIGHT=Hauteur du logo sur PDF DOC_SHOW_FIRST_SALES_REP=Afficher le premier représentant commercial MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Ajouter une colonne pour l'image sur les lignes de proposition +MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN=Masquer la colonne du prix total sur les bons de commande MAIN_PDF_NO_SENDER_FRAME=Masquer les bordures du cadre d'adresse de l'expéditeur MAIN_PDF_NO_RECIPENT_FRAME=Masquer les bordures du cadre d'adresse du destinataire MAIN_PDF_HIDE_CUSTOMER_CODE=Masquer le code client @@ -1007,13 +1032,14 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtre Regex pour nettoyer la valeur (COMPANY_DIGI DuplicateForbidden=Duplicata interdit RemoveSpecialWords=Nettoyer certains mots lors de la génération de sous-comptes pour les clients ou les fournisseurs RemoveSpecialWordsHelp=Précisez les mots à nettoyer avant de calculer le compte client ou fournisseur. Utiliser un ";" entre chaque mot -GDPRContact=Délégué à la protection des données (DPO, Data Privacy ou contact RGPD) +GDPRContact=Délégué à la protection des données (DPO, contact Data Privacy ou RGPD, ...) GDPRContactDesc=Si vous stockez des données personnelles dans votre Système d'Information, vous pouvez nommer ici le contact responsable du Règlement Général sur la Protection des Données. HelpOnTooltipDesc=Mettez du texte ou une clé de traduction ici pour que le texte s'affiche dans une info-bulle lorsque ce champ apparaît dans un formulaire YouCanDeleteFileOnServerWith=Vous pouvez supprimer ce fichier sur le serveur avec la ligne de commande :
    %s ChartLoaded=Plan comptable chargé SocialNetworkSetup=Mise en place du module Réseaux Sociaux EnableFeatureFor=Activer les fonctionnalités pour %s +SetupModuleX=Module de configuration %s VATIsUsedIsOff=Remarque : L'option permettant d'utiliser la taxe de vente ou la TVA a été définie sur Off dans le menu %s - %s, donc la taxe de vente ou la TVA utilisée sera toujours de 0 pour les ventes. SwapSenderAndRecipientOnPDF=Échanger la position des adresses de l'expéditeur et du destinataire sur les documents PDF FeatureSupportedOnTextFieldsOnly=Attention, fonctionnalité prise en charge sur les champs texte et les listes combo uniquement. De plus, un paramètre d'URL action=create ou action=edit doit être défini OU le nom de la page doit se terminer par « new.php » pour déclencher cette fonctionnalité. @@ -1061,7 +1087,7 @@ CreateCandidature=Créer une demande d'emploi FormatZip=Code postal MainMenuCode=Code d'entrée du menu (menu principal) ECMAutoTree=Afficher l'arborescence ECM automatique -OperationParamDesc=Define the rules to use to extract some data or set values to use for operation.

    Example to extract a string from email header, subject or body into a temporary variable:
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Examples to set the properties of an object to create:
    objproperty1=SET:a hard coded value
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:a value (value is set only if property is not already defined)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a new line to extract or set several properties. +OperationParamDesc=Définissez les règles à utiliser pour extraire certaines données ou définissez les valeurs à utiliser pour l'opération.

    Exemple d'extraction d'une chaîne de l'en-tête, de l'objet ou du corps d'un e-mail dans une variable temporaire :
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Exemples de définition des propriétés d'un objet à créer :
    objproperty1=SET : une valeur codée en dur
    objproperty2=SET : __tmp_var__
    objproperty3=SETIFEMPTY : une valeur (la valeur n'est définie que si la propriété n'est pas déjà définie)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:Mon nom d'entreprise est\\s([^\\s]*)

    Utilisez une nouvelle ligne pour extraire ou définir plusieurs propriétés. OpeningHours=Horaires d'ouvertures OpeningHoursDesc=Entrez ici les heures d'ouverture habituelles de votre entreprise. UseSearchToSelectResource=Utilisez un formulaire de recherche pour choisir une ressource (plutôt qu'une liste déroulante). @@ -1083,6 +1109,7 @@ DebugBarSetup=Configuration de la barre de débogage LogsLinesNumber=Nombre de lignes à afficher sur l'onglet Journaux UseDebugBar=Utiliser la barre de débogage DEBUGBAR_LOGS_LINES_NUMBER=Nombre de dernières lignes de journal à conserver dans la console +WarningValueHigherSlowsDramaticalyOutput=Attention, des valeurs plus élevées ralentissent considérablement la production ModuleActivatedWithTooHighLogLevel=Le module %s est activé avec un niveau de journalisation trop élevé (essayez d'utiliser un niveau inférieur pour de meilleures performances et sécurité) ModuleSyslogActivatedButLevelNotTooVerbose=Le module %s est activé et le niveau de journalisation (%s) est correct (pas trop détaillé) IfYouAreOnAProductionSetThis=Si vous êtes dans un environnement de production, vous devez définir cette propriété sur %s. @@ -1093,7 +1120,7 @@ ImportSetup=Mise en place du module Import IfTrackingIDFoundEventWillBeLinked=Notez que si un identifiant de suivi d'un objet est trouvé dans un e-mail, ou si l'e-mail est une réponse à un e-mail déjà collecté et lié à un objet, l'événement créé sera automatiquement lié à l'objet associé connu. WithGMailYouCanCreateADedicatedPassword=Avec un compte GMail, si vous avez activé la validation en 2 étapes, il est recommandé de créer un deuxième mot de passe dédié pour l'application au lieu d'utiliser votre propre mot de passe de compte depuis https://myaccount.google.com/. EmailCollectorTargetDir=Il peut être souhaitable de déplacer l'e-mail vers une autre balise/répertoire lorsqu'il a été traité avec succès. Définissez simplement le nom du répertoire ici pour utiliser cette fonctionnalité (n'utilisez PAS de caractères spéciaux dans le nom). Notez que vous devez également utiliser un compte de connexion en lecture/écriture. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing third party in your database (search will be done on the defined property among 'id','name','name_alias','email'). The found (or created) third party will be used for following actions that need it.
    For example, if you want to create a third party with a name extracted from a string 'Name: name to find' present into the body, use the sender email as email, you can set the parameter field like this:
    'email=EXTRACT:HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    +EmailCollectorLoadThirdPartyHelp=Vous pouvez utiliser cette action pour utiliser le contenu de l'e-mail pour rechercher et charger un tiers existant dans votre base de données (la recherche sera effectuée sur la propriété définie parmi 'id','name','name_alias','email'). Le tiers trouvé (ou créé) sera utilisé pour les actions suivantes qui en ont besoin.
    Par exemple, si vous souhaitez créer un tiers avec un nom extrait d'une chaîne 'Nom : nom à rechercher' présente dans le corps, utilisez l'email de l'expéditeur comme email, vous pouvez définir le champ paramètre comme ceci :
    'email=EXTRACT:HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    FilterSearchImapHelp=Attention : de nombreux serveurs de messagerie (comme Gmail) effectuent des recherches de mots complets lors d'une recherche sur une chaîne et ne renvoient pas de résultat si la chaîne n'est trouvée que partiellement dans un mot. Pour cette raison également, l'utilisation de caractères spéciaux dans un critère de recherche sera ignorée s'ils ne font pas partie de mots existants.
    Pour effectuer une recherche d'exclusion sur un mot (retourner l'e-mail si mot n'est pas trouvé), vous pouvez utiliser le ! caractère avant le mot (peut ne pas fonctionner sur certains serveurs de messagerie). EndPointFor=Point final pour %s : %s DeleteEmailCollector=Supprimer le collecteur d'e-mails @@ -1111,7 +1138,6 @@ THIRDPARTY_ALIAS=Nom du tiers – Alias du tiers ALIAS_THIRDPARTY=Alias du tiers – Nom du tiers PDFIn2Languages=Afficher les étiquettes dans le PDF dans 2 langues différentes (cette fonctionnalité peut ne pas fonctionner dans certaines langues) PDF_USE_ALSO_LANGUAGE_CODE=Si vous souhaitez que certains textes de votre PDF soient dupliqués dans 2 langues différentes dans le même PDF généré, vous devez définir ici cette deuxième langue pour que le PDF généré contienne 2 langues différentes dans la même page, celle choisie lors de la génération du PDF et celle-ci ( seuls quelques modèles PDF le prennent en charge). Gardez vide pour 1 langue par PDF. -PDF_USE_A=Générez des documents PDF au format PDF/A au lieu du format PDF par défaut RssNote=Remarque : Chaque définition de flux RSS fournit un widget que vous devez activer pour qu'il soit disponible dans le tableau de bord. JumpToBoxes=Accédez à Configuration -> Widgets MeasuringUnitTypeDesc=Utilisez ici une valeur comme "taille", "surface", "volume", "poids", "temps" @@ -1186,6 +1212,8 @@ INVOICE_ADD_SWISS_QR_CODE=Afficher le code QR-Bill suisse sur les factures (avec INVOICE_ADD_SWISS_QR_CODEMore=La norme suisse pour les factures ; assurez-vous que le code postal et la ville sont renseignés et que les comptes ont des IBAN Suisse/Liechtenstein valides. INVOICE_ADD_EPC_QR_CODE=Afficher le code QR EPC sur les factures (avec un compte bancaire défini pour le virement) INVOICE_ADD_EPC_QR_CODEMore=Cette fonctionnalité vous permet d'ajouter ou de supprimer un QR Code EPC sur vos factures, ce qui facilite les virements SEPA automatiques. L'activation de cette option aide vos clients à effectuer facilement des paiements en scannant le code QR, réduisant ainsi les erreurs de saisie manuelle. Utilisez cette fonctionnalité si vous avez des clients dans des pays comme l'Autriche, la Belgique, la Finlande, l'Allemagne et les Pays-Bas où ce système est pris en charge. Désactivez-le si cela n'est pas requis pour vos opérations commerciales ou votre clientèle. +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Afficher le contact de facturation sur la proposition +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=Par défaut, le contact n'apparaît que pour la facturation UrlSocialNetworksDesc=Lien URL du réseau social. Utilisez {socialid} pour la partie variable qui contient l'ID du réseau social. IfThisCategoryIsChildOfAnother=Si cette catégorie est enfant d'une autre AccordingToBrowser=Selon le navigateur @@ -1202,10 +1230,12 @@ TriggerCodeInfo=Saisissez ici le(s) code(s) déclencheur(s) qui doivent génére EditableWhenDraftOnly=Si décochée, la valeur ne peut être modifiée que lorsque l'objet a un statut de brouillon CssOnView=CSS sur les pages d'affichage HelpCssOnEditDesc=Le CSS utilisé lors de la modification du champ.
    Exemple : "minwiwdth100 maxwidth500 widthcentpercentminusx" +HelpCssOnViewDesc=Le CSS utilisé lors de la visualisation du champ.
    Exemple : « longmessagecut » HelpCssOnListDesc=CSS utilisé lorsque le champ se trouve dans une table de liste.
    Exemple : "tdoverflowmax200" LimitsAndMitigation=Limites d’accès et atténuation RecommendMitigationOnURL=Il est recommandé d'activer l'atténuation sur les URL critiques. Il s'agit d'une liste de règles fail2ban que vous pouvez utiliser pour les principales URL importantes. DeadlineDayVATSubmission=Jour limite de dépôt de la TVA le mois suivant +MaxNumberOfAttachementOnForms=Nombre maximal de fichiers joints dans un formulaire IfDefinedUseAValueBeetween=Si défini, utilisez une valeur comprise entre %s et %s WarningModuleHasChangedLastVersionCheckParameter=Attention : le module %s a défini un paramètre pour vérifier sa version à chaque accès à la page. Il s'agit d'une pratique mauvaise et non autorisée qui peut rendre la page d'administration des modules instable. Veuillez contacter l'auteur du module pour résoudre ce problème. WarningModuleHasChangedSecurityCsrfParameter=Attention : le module %s a désactivé la sécurité CSRF de votre instance. Cette action est suspecte et votre installation pourrait ne plus être sécurisée. Veuillez contacter l'auteur du module pour obtenir des explications. @@ -1235,6 +1265,7 @@ CustomPrompt=Invites personnalisées AiDescription=Fonctionnalités IA (Intelligence Artificielle) AiDescriptionLong=Fournit des fonctionnalités d’IA (Intelligence Artificielle) dans différentes parties de l’application. Besoin d'une API IA externe. AI_API_KEY=Clé pour l'API IA +AI_API_URL=URL du point de terminaison pour l'API AI AI_API_SERVICE=Service à utiliser pour les fonctionnalités d'IA AiSetup=Configuration du module IA AiCustomPrompt=Invite personnalisée IA @@ -1249,3 +1280,12 @@ ModuleZapierForDolibarrDesc=Zapier pour le module Dolibarr ZapierSetupPage=Il n’y a pas besoin d’un setup côté Dolibarr pour utiliser Zapier. Cependant, vous devez générer et publier un package sur zapier pour pouvoir utiliser Zapier avec Dolibarr. Voir la documentation sur cette page wiki. WebsiteTemplateWasCopied=Le(s) modèle(s) de site Web "%s" fournis par ce module ont été enregistrés dans le répertoire des modèles de sites Web (/doctemplates/websites) et sont prêts à être importés en tant que nouveau site Web. site. VulnerableToRCEAttack=Vous êtes vulnérable aux attaques RCE en utilisant la fonction personnalisée dol_json_decode +MainAuthenticationOidcClientSecretDesc=Secret du client OpenID Connect +MainAuthenticationOidcScopesDesc=Portées OpenID pour permettre l'accès aux informations utilisateur +MainAuthenticationOidcTokenUrlName=URL du jeton +MainAuthenticationOidcLogoutUrlDesc=(exemple : https://example.com/oauth2/logout) +MainAuthenticationOidcRedirectUrlDesc=URL de redirection à autoriser côté fournisseur OpenID +MainAuthenticationOidcLoginClaimName=Demande de connexion +MainAuthenticationOidcLoginClaimDesc=Réclamation OpenID Connect correspondant à la connexion de l'utilisateur Dolibarr. Si elle n'est pas définie ou est vide, la valeur par défaut est l'adresse e-mail. +Fediverse=Fédiverse +ConfirmDeleteSocialNetwork=Etes-vous sûr de vouloir supprimer cet enregistrement ? diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index a743d75943917..2504f0a8a4443 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -460,7 +460,7 @@ ExtrafieldSeparator=Séparateur (il ne s'agit pas d'un champ de saisie) ExtrafieldPassword=Mot de passe ExtrafieldRadio=Radio bouton (1 choix uniquement) ExtrafieldCheckBox=Liste de sélection (n choix) -ExtrafieldCheckBoxFromList=Liste de sélection (n choix) +ExtrafieldCheckBoxFromList=Liste issue d'une table (n choix) ExtrafieldLink=Lien vers un objet ExtrafieldPointGeo=Point géométrique ExtrafieldMultiPointGeo=Multi-point géométrique @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur (où la cl ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur (où la clé ne peut être '0')

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur (où la clé ne peut être '0')

    par exemple :
    1,valeur1
    2,valeur2
    3,valeur3
    ... ExtrafieldParamHelpsellist=La liste de valeurs provient d'une table
    Syntaxe : table_name:label_field: id_field::filtersql
    Exemple : c_typent:libelle:id:: filtersql

    - id_field est nécessairement une clé entière primaire
    - filtersql est une condition. Elle doit utiliser la syntaxe USF. Exemple : (active:=:1) pour afficher uniquement la valeur active
    Vous pouvez également utiliser $ID$ dans le filtre qui est l'identifiant actuel de l'objet actuel
    Si vous souhaitez filtrer sur des champs supplémentaires, utilisez la syntaxe extra.fieldcode=... (où le code de champ est le code du champ supplémentaire)

    Dans le but d'avoir la liste en fonction d'un autre attribut complémentaire liste:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    Dans commande pour avoir la liste en fonction d'une autre liste :
    c_typent:libelle:id:parent_list_code|parent_column:filtre -ExtrafieldParamHelpchkbxlst=Les valeurs de la liste proviennent d'une table
    Syntaxe : nom_de_la_table:libelle_champ:id_champ::filtresql
    Exemple : c_typent:libelle:id::filtresql

    le filtre peut être un simple test (ex : active=1) pour n'afficher que les valeurs actives.
    Vous pouvez aussi utiliser $ID$ dans les filtres pour indiquer l'ID de l'élément courant.
    Pour utiliser un SELECT dans un filtre, utilisez $SEL$
    Pour filtrer sur un attribut supplémentaire, utilisez la syntaxe extra.fieldcode=... (ou fieldcode est le code de l'attribut supplémentaire)

    Pour afficher une liste dépendant d'un autre attribut supplémentaire :
    c_typent:libelle:id:options_code_list_parent|colonne_parente:filtre

    Pour afficher une liste dépendant d'une autre liste :
    c_typent:libelle:id:code_liste_parente|colonne_parente:filter ExtrafieldParamHelplink=Les paramètres doivent être ObjectName:Classpath
    Syntaxe: ObjectName:Classpath ExtrafieldParamHelpSeparator=Garder vide pour un simple séparateur
    Définissez-le sur 1 pour un séparateur auto-déroulant (ouvert par défaut pour une nouvelle session, puis le statut est conservé pour la session de l'utilisateur)
    Définissez ceci sur 2 pour un séparateur auto-déroulant (réduit par défaut pour une nouvelle session, puis l'état est conservé pour chaque session d'utilisateur). LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF @@ -522,7 +521,7 @@ WarningPHPMailD=Il est donc recommandé de changer la méthode d'envoi des e-mai WarningPHPMailDbis=Si vous voulez vraiment conserver la méthode par défaut "PHP" pour envoyer des e-mails, ignorez simplement cet avertissement ou supprimez-le en %scliquant ici%s. WarningPHPMail2=Si votre fournisseur de messagerie SMTP a besoin de restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP du mail user agent (MUA) de votre application CRM ERP : %s . WarningPHPMailSPF=Si le nom de domaine de votre adresse e-mail d'expéditeur est protégé par un enregistrement SPF (demandez à votre fournisseur de nom de domaine), vous devez inclure les adresses IP ou entrées suivantes dans l'enregistrement SPF du DNS de votre domaine: %s. -WarningPHPMailSPFDMARC=Si le nom de domaine dans votre adresse e-mail d'expéditeur est protégé par un enregistrement DMARC différent de p=none (demandez à votre registrar de nom de domaine), vous devez ajouter les adresses IP suivantes dans l'enregistrement SPF du DNS du domaine : %s. +WarningPHPMailSPFDMARC=Si le nom de domaine dans votre adresse e-mail d'expéditeur est protégé par un enregistrement DMARC différent de p=none (demandez à votre registraire de nom de domaine), vous devez supprimer votre enregistrement DMARC ou le définir sur p=none comme le fait @gmail.com) ou utiliser une autre méthode d'envoi. SPFAndDMARCInformation=Enregistrement DNS SPF et DMARC pour les principales adresses e-mail ActualMailDNSRecordFound=Enregistrement %s actuel trouvé (pour l'e-mail %s) : %s ClickToShowDescription=Cliquer pour afficher la description @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtre de regex pour nettoyer la valeur (COMPANY_D DuplicateForbidden=Doublon interdit RemoveSpecialWords=Nettoyer certains mots lors de la génération des comptes comptables des tiers pour les clients ou les fournisseurs RemoveSpecialWordsHelp=Précisez les mots à nettoyer avant de calculer le compte comptable des tiers client ou fournisseur. Utiliser un ";" entre chaque mot -GDPRContact=Responsable de la protection des données (DPO ou contact RGPD) +GDPRContact=Délégué à la protection des données (DPO, contact RGPD, ...) GDPRContactDesc=Si vous stockez des données personnelles dans votre système d'information, vous pouvez nommer ici le contact responsable du règlement général sur la protection des données HelpOnTooltip=Texte d'aide à afficher dans l'info-bulle HelpOnTooltipDesc=Mettez du texte ou une clé de traduction ici pour que le texte apparaisse dans une info-bulle lorsque ce champ apparaît dans un formulaire @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nom du tiers - Nom alternatif du tiers ALIAS_THIRDPARTY=Nom alternatif du tiers - Nom du tiers PDFIn2Languages=Afficher les libellés dans le PDF dans 2 langues différentes (cette fonctionnalité peut ne pas fonctionner pour certaines combinaisons de langues) PDF_USE_ALSO_LANGUAGE_CODE=Si vous souhaitez que certains textes de votre PDF soient dupliqués dans 2 langues différentes dans le même PDF généré, vous devez définir ici cette deuxième langue pour que le PDF généré contienne 2 langues différentes dans la même page, celle choisie lors de la génération du PDF et celle-ci (seuls quelques modèles PDF prennent en charge cette fonction). Gardez vide pour 1 langue par PDF. -PDF_USE_A=Générer les documents PDF avec le format PDF/A à la place du format PDF standard +PDF_USE_A=Format des documents PDF FafaIconSocialNetworksDesc=Entrez ici le code d'une icône FontAwesome. Si vous ne savez pas ce qu'est FontAwesome, vous pouvez utiliser la valeur générique fa-address-book. RssNote=Remarque: Chaque définition de flux RSS fournit un widget que vous devez activer pour qu'il soit disponible dans le tableau de bord JumpToBoxes=Aller à la Configuration -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionnaire AddMoreParams=Ajouter plus de paramètres pour la connexion (cookies, tokens, ...)
    Exemple : token : value token ParamName=Nom du paramètre ParamValue=Valeur du paramètre +ConfirmDeleteParamOfSocialNetwork=Êtes-vous sûr de vouloir supprimer ce paramètre ? +HelpMariaDBToGetPossibleValues=Vous pouvez obtenir une liste de valeurs possibles en exécutant la commande SQL suivante : %s +Captcha=Captcha +CaptchaDesc=Si vous souhaitez protéger votre page de connexion avec un Captcha, vous pouvez choisir celui à utiliser ici +DolibarrStandardCaptcha=Un captcha natif généré par Dolibarr diff --git a/htdocs/langs/gl_ES/admin.lang b/htdocs/langs/gl_ES/admin.lang index db1cce51cf5e5..6bcdb97e2f5c5 100644 --- a/htdocs/langs/gl_ES/admin.lang +++ b/htdocs/langs/gl_ES/admin.lang @@ -513,15 +513,15 @@ ModuleCompanyCodeCustomerDigitaria=%s seguido do nome de cliente acortado polo n ModuleCompanyCodeSupplierDigitaria=%s seguido do nome do provedor acortado polo número de caracteres:%s para o código de contabilidade do provedor. Use3StepsApproval=De forma predeterminada, os pedimentos a provedor teñen que ser creados e aprobados por 2 usuarios diferentes (un paso/usuario para crear e un paso/usuario para aprobar. Teña conta de que se o usuario ten tanto o permiso para crear e aprobar, un paso/usuario será suficiente. Pode pedir con esta opción introducir unha terceira etapa de aprobación/usuario, se a cantidade é superior a un valor específico (polo que serán precisos 3 pasos: 1 validación, 2=primeira aprobación e 3=segunda aprobación se a cantidade é suficiente).
    Deixe baleiro se unha aprobación (2 pasos) é suficiente, se establece un valor moi baixo (0,1) requírese unha segunda aprobación sempre (3 pasos). UseDoubleApproval=Usar 3 pasos de aprobación se o importe (sen IVE) é maior que... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=AVISO: a configuración para enviar correos electrónicos desde a aplicación utiliza a configuración xenérica predeterminada (chamada "%s"). Esta opción non precisa ningún coñecemento técnico e ningunha configuración particular.
    Porén, moitas veces é mellor configurar os correos electrónicos de saída para usar o outro método (chamado " %s") para utilizar o servidor de correo electrónico do seu provedor de servizos de correo electrónico, en lugar da configuración predeterminada por varios motivos: WarningPHPMailA=- Usar o servidor do provedor de servizos de correo electrónico aumenta a fiabilidade do seu correo electrónico, polo que aumenta a capacidade de entrega sen ser marcado como SPAM -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Se o dominio do seu correo electrónico (a parte mymaildomain.com en myname@mymaildomain.com) está protexido por un rexistro SPF + DMARC, o seu correo electrónico pode marcarse como SPAM porque a súa regra DMARC definiuse na zona DNS do dominio do seu correo electrónico. remitente (mymaildomain.com) non permite o envío como remitente xenérico. Neste caso, debe desactivar o DMARC para o dominio (ou configuralo en p=none como o fixo @gmail.com) ou, mellor, se ten coñecementos técnicos, utilice o outro método para enviar correos electrónicos mediante SMTP. servidor do seu propio provedor de correo electrónico. WarningPHPMailC=- Tamén é interesante usar o servidor SMTP do seu propio fornecedor de servizos de correo electrónico para enviar correos electrónicos, polo que todos os correos electrónicos enviados desde a aplicación tamén se gardarán no directorio "Enviado" da súa caixa de correo. WarningPHPMailD=Polo tanto, recoméndase cambiar o método de envío dos correos electrónicos co valor "SMTP". WarningPHPMailDbis=Se realmente quere manter o método "PHP" predeterminado para enviar correos electrónicos, só ten que ignorar este aviso ou elimínao premendo %sprema aquí %s WarningPHPMail2=Se o seu fornecedorr SMTP de correo electrónico precisa restrinxir o cliente de correo electrónico a algúns enderezos IP (moi raro), este é o seu enderezo IP do seu axente de usuario de correo (MUA) da súa aplicación ERP CRM: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. +WarningPHPMailSPF=Se o nome de dominio do enderezo de correo electrónico do seu remitente está protexido por un rexistro SPF (pregúntelle ao rexistrador do seu nome de dominio), debe engadir as seguintes IP ou entrada no rexistro SPF do DNS do seu dominio: %s. +WarningPHPMailSPFDMARC=Se o nome de dominio do enderezo de correo electrónico do seu remitente está protexido por un rexistro DMARC diferente de p=none (pregúntelle ao rexistrador do seu nome de dominio), debe eliminar o seu rexistro DMARC ou configuralo en p=none como fai @gmail.com) ou use o envío doutro método. SPFAndDMARCInformation=Rexistro DNS SPF e DMARC para os enderezos de correo electrónico principais ActualMailDNSRecordFound=Atopouse o rexistro actual de %s (para o correo electrónico %s): %s ClickToShowDescription=Clic para ver a descrición @@ -2146,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtro de rexistro para limpar o valor (COMPANY_DI DuplicateForbidden=Prohibido duplicar RemoveSpecialWords=Limpe determinadas palabras ao xerar subcontas para clientes ou provedores RemoveSpecialWordsHelp=Especifique as palabras a limpar antes de calcular a conta de cliente ou provedor. Use un ";" entre cada palabra -GDPRContact=Responsable de protección de datos (DPO, privacidade de datos ou contacto GDPR) +GDPRContact=Delegado de Protección de Datos (DPD, Privacidade de datos ou contacto RGPD,...) GDPRContactDesc=Se almacena datos persoais no seu Sistema de Información, pode nomear aquí o contacto responsable do Regulamento Xeral de Protección de Datos HelpOnTooltip=Texto de axuda para amosar na información de ferramentas HelpOnTooltipDesc=​​= Poner aquí o texto ou unha chave de tradución para que o texto apareza nunha tip sobre ferramentas cando este campo aparece nun formulario @@ -2289,7 +2289,7 @@ THIRDPARTY_ALIAS=Nome de Terceiros: Alias de terceiros ALIAS_THIRDPARTY=Alias de Terceiros: Nome de Terceiros PDFIn2Languages=Amosa etiquetas no PDF en dous idiomas diferentes (pode que esta opción non funcione nalgúns idiomas) PDF_USE_ALSO_LANGUAGE_CODE=Se desexa ter algúns textos no seu PDF duplicados en 2 idiomas diferentes no mesmo PDF xerado, debe configurar aquí este segundo idioma para que o PDF xerado conteña 2 idiomas diferentes na mesma páxina, o elixido ao xerar PDF e este (só algúns modelos PDF soportan isto). Mantéñase baleiro por un idioma por PDF. -PDF_USE_A=Xera documentos PDF co formato PDF/A en lugar do formato PDF predeterminado +PDF_USE_A=Formato de documentos PDF FafaIconSocialNetworksDesc=Introduza aquí o código dunha icona FontAwesome. Se non sabe o que é FontAwesome, pode usar o valor xenérico fa-address-book. RssNote=Nota: Cada definición de fonte RSS proporciona un widget que debes habilitar para que estexa dispoñible no panel JumpToBoxes=Ir a Configuración -> Widgets @@ -2554,3 +2554,8 @@ MenuDict=Dicionario AddMoreParams=Engadir máis parámetros para a conexión (cookies, tokens,...)
    Exemplo: token : token de valor ParamName=Nome do parámetro ParamValue=Valor do parámetro +ConfirmDeleteParamOfSocialNetwork=Está certo de querer eliminar este parámetro? +HelpMariaDBToGetPossibleValues=Pode obter unha lista de valores posibles executando o seguinte comando SQL: %s +Captcha=Captcha +CaptchaDesc=Se quere protexer a súa páxina de inicio de sesión cun Captcha, pode escoller cal usar aquí +DolibarrStandardCaptcha=Un captcha nativo xerado por Dolibarr diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 94c7f5a8cb6b5..7e2055a436c46 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=הפרמטרים חייבים להיות ObjectName:Classpath
    תחביר: ObjectName:Classpath ExtrafieldParamHelpSeparator=שמור ריק עבור מפריד פשוט
    הגדר את זה ל-1 עבור מפריד מתמוטט (פתוח כברירת מחדל עבור הפעלה חדשה, ואז הסטטוס נשמר עבור כל הפעלה של משתמש)
    הגדר את זה ל-2 עבור מפריד מכווץ (כווץ כברירת מחדל עבור הפעלה חדשה, ואז הסטטוס נשמר לפני כל הפעלת משתמש) LibraryToBuildPDF=ספרייה המשמשת ליצירת PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=מסנן Regex לניקוי ערך (COMPANY_DIGITA DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=נקה מילים מסוימות בעת יצירת חשבונות משנה עבור לקוחות או ספקים RemoveSpecialWordsHelp=ציין את המילים שיש לנקות לפני חישוב חשבון הלקוח או הספק. תשתמש ב ";" בין כל מילה -GDPRContact=קצין הגנת נתונים (DPO, איש קשר לפרטיות נתונים או GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=אם אתה מאחסן נתונים אישיים במערכת המידע שלך, תוכל למנות את איש הקשר האחראי על תקנת הגנת המידע הכללית כאן HelpOnTooltip=טקסט עזרה להצגה בתיאור כלי HelpOnTooltipDesc=שים טקסט או מפתח תרגום כאן כדי שהטקסט יופיע בהסבר כלים כאשר שדה זה מופיע בטופס @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=שם צד שלישי - כינוי צד שלישי ALIAS_THIRDPARTY=כינוי צד שלישי - שם צד שלישי PDFIn2Languages=הצג תוויות ב-PDF ב-2 שפות שונות (ייתכן שתכונה זו לא תעבוד עבור כמה שפות) PDF_USE_ALSO_LANGUAGE_CODE=אם אתה רוצה שישכפלו כמה טקסטים ב-PDF שלך ב-2 שפות שונות באותו PDF שנוצר, עליך להגדיר כאן את השפה השנייה הזו כך שה-PDF שנוצר יכיל 2 שפות שונות באותו עמוד, זו שנבחרה בעת יצירת PDF והזו ( רק מעט תבניות PDF תומכות בכך). השאר ריק עבור שפה אחת לכל PDF. -PDF_USE_A=צור מסמכי PDF בפורמט PDF/A במקום PDF בפורמט ברירת המחדל +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=הזן כאן את הקוד של אייקון FontAwesome. אם אתה לא יודע מה זה FontAwesome, אתה יכול להשתמש ב-fa-address-book עם הערך הגנרי. RssNote=הערה: כל הגדרת הזנת RSS מספקת ווידג'ט שעליך להפעיל כדי שיהיה זמין בלוח המחוונים JumpToBoxes=קפוץ להגדרה -> ווידג'טים @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index e662c02380e2a..9d3ea3d488113 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Popis vrijednosti mora biti redak s formatom ključ,vr ExtrafieldParamHelpcheckbox=Popis vrijednosti moraju biti linije sa strukturom ključ,vrijednost (ključ ne može biti '0')

    na primjer:
    1,vrijednost1
    2,vrijednost2
    3,vrijednost3
    ... ExtrafieldParamHelpradio=Popis vrijednosti moraju biti linije sa strukturom ključ,vrijednost (ključ ne može biti '0')

    na primjer:
    1,vrijednost1
    2,vrijednost2
    3,vrijednost3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametri moraju biti ObjectName:Classpath
    Sintaksa: ObjectName:Classpath ExtrafieldParamHelpSeparator=Ostavite prazno za jednostavan separator
    Postavite ovo na 1 za sažimajući separator (otvoreno prema zadanim postavkama za novu sesiju, a status se čuva za svaku korisničku sesiju)
    Postavite ovo na 2 za sažimajući separator (sažeto prema zadanim postavkama za novu sesiju, a zatim status se čuva za svaku korisničku sesiju) LibraryToBuildPDF=Biblioteka korištena za kreiranje PDF-a @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Redovni izraz za čišćenje vrijednosti (COMPANY_ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Očistite određene riječi prilikom generiranja podračuna za kupce ili dobavljače RemoveSpecialWordsHelp=Odredite riječi koje treba očistiti prije izračunavanja računa kupca ili dobavljača. Koristi ";" između svake riječi -GDPRContact=Službenik za zaštitu podataka (DPO, kontakt za privatnost podataka ili GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ako u svom Informacijskom sustavu pohranjujete osobne podatke, ovdje možete navesti kontakt odgovornog za Opću uredbu o zaštiti podataka HelpOnTooltip=Tekst pomoći za prikaz u opisu alata HelpOnTooltipDesc=Ovdje stavite tekst ili ključ za prijevod kako bi se tekst prikazao u opisu alata kada se ovo polje pojavi u obrascu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Ime treće strane - alias treće strane ALIAS_THIRDPARTY=Alias treće strane - Ime treće strane PDFIn2Languages=Prikaži oznake u PDF-u na 2 različita jezika (ova značajka možda neće raditi za nekoliko jezika) PDF_USE_ALSO_LANGUAGE_CODE=Ako želite imati neke tekstove u vašem PDF-u duplicirane na 2 različita jezika u istom generiranom PDF-u, morate ovdje postaviti ovaj drugi jezik tako da će generirani PDF sadržavati 2 različita jezika na istoj stranici, onom odabranom prilikom generiranja PDF-a i ovaj (ovo podržava samo nekoliko PDF predložaka). Ostavite prazno za 1 jezik po PDF-u. -PDF_USE_A=Generirajte PDF dokumente s formatom PDF/A umjesto zadanog formata PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Ovdje unesite kod ikone FontAwesome. Ako ne znate što je FontAwesome, možete koristiti generičku vrijednost fa-address-book. RssNote=Napomena: Svaka definicija RSS feeda pruža widget koji morate omogućiti da bi bio dostupan na nadzornoj ploči JumpToBoxes=Skočite na Postavljanje -> Widgeti @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index f5c334e8f2fa4..3e5e69e9e6f54 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Az értékek listájának olyan sorokat kell tartalmaz ExtrafieldParamHelpcheckbox=Az értékek listájának soroknak kell lennie formátumkulccsal, értékkel (ahol a kulcs nem lehet „0”)

    például:
    1,érték1
    2,érték2
    3, érték3
    ... ExtrafieldParamHelpradio=Az értékek listájának soroknak kell lennie formátumkulccsal, értékkel (ahol a kulcs nem lehet „0”)

    például:
    1,érték1
    2,érték2
    3, érték3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=A paramétereknek ObjectName:Classpath típusúnak kell lennie
    Szintaxis: ObjectName:Classpath ExtrafieldParamHelpSeparator=Hagyja üresen egyszerű elválasztó esetén
    Állítsa ezt 1-re összecsukódó elválasztó esetén (alapértelmezés szerint nyitva van új munkamenethez, majd az állapot megmarad minden felhasználói munkamenethez)
    Állítsa ezt 2-re összecsukódó elválasztó esetén (alapértelmezés szerint összecsukva új munkamenet, akkor az állapot minden felhasználói munkamenetre megmarad) LibraryToBuildPDF=A PDF létrehozásához használt programkönyvtár @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex szűrő az érték tisztításához (COMPANY DuplicateForbidden=Másolás tilos RemoveSpecialWords=Tisztítson meg bizonyos szavakat az ügyfelek vagy beszállítók alfiókjainak létrehozásakor RemoveSpecialWordsHelp=Adja meg a tisztítandó szavakat a vevő vagy a szállító fiók kiszámítása előtt. Használj ";" az egyes szavak között -GDPRContact=Adatvédelmi tiszt (adatvédelmi tisztviselő, adatvédelmi vagy GDPR kapcsolattartó) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ha személyes adatokat tárol az Információs Rendszerében, itt meg tudja nevezni az Általános Adatvédelmi Szabályzatért felelős kapcsolattartót HelpOnTooltip=Az eszköztippen megjelenő súgószöveg HelpOnTooltipDesc=Tegyen ide szöveget vagy fordítókulcsot, hogy a szöveg megjelenjen az eszköztippben, amikor ez a mező megjelenik egy űrlapon @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Harmadik fél neve – Harmadik fél álneve ALIAS_THIRDPARTY=Harmadik fél alias – Harmadik fél neve PDFIn2Languages=Címkék megjelenítése a PDF-ben 2 különböző nyelven (ez a funkció néhány nyelven nem működik) PDF_USE_ALSO_LANGUAGE_CODE=Ha azt szeretné, hogy a PDF-ben lévő szövegek egy része 2 különböző nyelven legyen megkettőzve ugyanabban a generált PDF-ben, itt be kell állítania ezt a második nyelvet, így a létrehozott PDF 2 különböző nyelvet fog tartalmazni ugyanazon az oldalon, a PDF generálásakor választott nyelvet és ezt egy (csak néhány PDF-sablon támogatja ezt). Tartsa üresen PDF-enként 1 nyelv esetén. -PDF_USE_A=PDF-dokumentumok létrehozása PDF/A formátumban az alapértelmezett PDF helyett +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Írja be ide a FontAwesome ikon kódját. Ha nem tudja, mi az a FontAwesome, használhatja az általános érték fa-címjegyzékét. RssNote=Megjegyzés: Minden RSS-hírcsatorna-definíció tartalmaz egy widgetet, amelyet engedélyezned kell, hogy elérhető legyen az irányítópulton JumpToBoxes=Ugrás a Beállítás -> Widgetek menüpontra @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index adb0405b9f60c..d203394841a02 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Daftar nilai harus berupa garis dengan kunci format, n ExtrafieldParamHelpcheckbox=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0')

    misalnya:
    1, value1
    2, value2 a0342fccfda2b3f0f3f0f3f ExtrafieldParamHelpradio=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0')

    misalnya:
    1, value1
    2, value2 a0342fccfda2b3f0f3f0f3f ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parameter harus ObjectName: Classpath
    Sintaks: ObjectName: Classpath ExtrafieldParamHelpSeparator=Biarkan kosong untuk pemisah sederhana
    Setel ini menjadi 1 untuk pemisah runtuh (buka secara default untuk sesi baru, kemudian status disimpan untuk setiap sesi pengguna) status disimpan sebelum setiap sesi pengguna) LibraryToBuildPDF=Perpustakaan digunakan untuk pembuatan PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter untuk membersihkan nilai (COMPANY_DIG DuplicateForbidden=Duplikat dilarang RemoveSpecialWords=Bersihkan kata-kata tertentu saat membuat sub-akun untuk pelanggan atau pemasok RemoveSpecialWordsHelp=Tentukan kata-kata yang akan dibersihkan sebelum menghitung akun pelanggan atau pemasok. Gunakan ";" di antara setiap kata -GDPRContact=Petugas Perlindungan Data (DPO, Privasi Data, atau kontak GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Jika Anda menyimpan data pribadi di Sistem Informasi Anda, Anda dapat menyebutkan kontak yang bertanggung jawab atas Peraturan Perlindungan Data Umum di sini HelpOnTooltip=Bantu teks untuk ditampilkan di tooltip HelpOnTooltipDesc=Letakkan teks atau kunci terjemahan di sini agar teks ditampilkan di tooltip saat baris ini muncul dalam formulir @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nama pihak ketiga - Alias pihak ketiga ALIAS_THIRDPARTY=Alias pihak ketiga - Nama pihak ketiga PDFIn2Languages=Tampilkan label di PDF dalam 2 bahasa berbeda (fitur ini mungkin tidak berfungsi untuk beberapa bahasa) PDF_USE_ALSO_LANGUAGE_CODE=Jika Anda ingin agar beberapa teks dalam PDF Anda digandakan dalam 2 bahasa berbeda dalam PDF yang dihasilkan sama, Anda harus mengatur di sini bahasa kedua ini sehingga PDF yang dihasilkan akan berisi 2 bahasa berbeda di halaman yang sama, yang dipilih saat membuat PDF dan yang ini ( hanya beberapa templat PDF yang mendukung ini). Biarkan kosong untuk 1 bahasa per PDF. -PDF_USE_A=Hasilkan dokumen PDF dengan format PDF/A, bukan format default PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Masukkan di sini kode ikon FontAwesome. Jika Anda tidak tahu apa itu FontAwesome, Anda dapat menggunakan fa-address-book nilai umum. RssNote=Catatan: Setiap definisi umpan RSS menyediakan widget yang harus Anda aktifkan agar tersedia di dasbor JumpToBoxes=Langsung ke Pengaturan -> Widget @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index e57732dfd950e..67d4229dc0fd1 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=I parametri devono essere ObjectName:Classpath
    Sintassi: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator
    Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)
    Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Libreria utilizzata per generare PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter su clean value (COMPANY_DIGITARIA_CLE DuplicateForbidden=Vietata la duplicazione RemoveSpecialWords=Pulisci alcune parole durante la generazione di sottoconti per clienti o fornitori RemoveSpecialWordsHelp=Specificare le parole da pulire prima di calcolare il conto cliente o fornitore. Usare un ";" tra ogni parola -GDPRContact=DPO (Data Protection Officer) o in italiano RPD (Responsabile della Protezione dei Dati) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Se memorizzi dati personali nel tuo Sistema Informativo, puoi nominare qui il contatto responsabile del Regolamento generale sulla protezione dei dati HelpOnTooltip=Testo di aiuto da mostrare come tooltip HelpOnTooltipDesc=Inserisci qui il testo o una chiave di traduzione affinché il testo sia mostrato nel tooltip quando questo campo appare in un form @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nome di terze parti: alias di terze parti ALIAS_THIRDPARTY=Alias di terze parti: nome di terze parti PDFIn2Languages=Mostra le etichette nel PDF in 2 lingue diverse (questo funzionalità potrebbe non funzionare per alcune lingue) PDF_USE_ALSO_LANGUAGE_CODE=Se vuoi avere alcuni testi nel tuo PDF duplicato in 2 lingue diverse nello stesso PDF generato, devi impostare qui la seconda lingua in modo che il PDF generato contenga 2 lingue diverse nella stessa pagina, quella scelta durante la generazione del PDF e questa ( solo pochi modelli PDF supportano questa opzione). Mantieni vuoto per 1 lingua per PDF. -PDF_USE_A=Genera documenti PDF con formato PDF/A anziché default formato PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Inserisci qui il codice di un'icona FontAwesome. Se non sai cos'è FontAwesome, puoi utilizzare il valore generico fa-address-book. RssNote=Nota: ogni definizione di feed RSS fornisce un widget che è necessario abilitare per renderlo disponibile nella dashboard JumpToBoxes=Vai a Setup -> Widget @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index c5afb93e8ed09..128816037f13b 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=値のリストは、 key,value形式 (key は '0' 以 ExtrafieldParamHelpcheckbox=値のリストは、 key,value形式 (key は '0' 以外) の行であること

    例 :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=値のリストは、 key,value形式 (key は '0' 以外) の行であること

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=値のリストはテーブルから取得される
    構文: table_name:label_field:id_field::filtersql
    例: c_typent:libelle:id::filtersql

    - id_field は必ず主 int キーだ
    - filtersql は条件だ。USF 構文を使用する必要がある。例: (active:=:1) はアクティブな値のみを表示する
    また、フィルターでは現在のオブジェクトの現在の ID である $ID$ を使用することもできる
    extrafields でフィルターする場合は、構文 extra.fieldcode=... を使用する (fieldcode は extrafield の コード )

    別の補完属性リストに依存するリストを作成するには:
    c_typent:libelle:id:parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=値のリストはテーブルから取得される
    構文: table_name:label_field:id_field::filtersql
    例: c_typent:libelle:id::filtersql

    フィルターは簡単なテストにすることができる (例: active=1 はアクティブな値のみを表示する)
    フィルターでは、現在のオブジェクトの現在の ID である $ID$ を使用することもできる
    フィルターで SELECT を実行するには、$SEL$ を使用する
    extrafields でフィルターする場合は、構文 extra.fieldcode=... を使用する (フィールド コード は、extrafield の コード です)

    リストを別の補完属性リストに依存させるには:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    リストを別のリストに依存させるには:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=パラメータはObjectName:Classpathでなければならない
    構文:ObjectName:Classpath ExtrafieldParamHelpSeparator=単純なセパレーターの場合は空のままにする
    折りたたみセパレーターの場合はこれを1に設定する ( 新規セッションの場合はデフォルトで開き、ユーザセッションごとに状態が保持される )
    折りたたみセパレーターの場合はこれを2に設定する ( 新規セッションの場合はデフォルトで折りたたむ。状態は各ユーザセッションの間保持される ) LibraryToBuildPDF=PDF生成に使用されるライブラリ @@ -514,15 +513,15 @@ ModuleCompanyCodeCustomerDigitaria=%sの後に、文字数で切り捨てられ ModuleCompanyCodeSupplierDigitaria=%sの後に、文字数で切り捨てられたサプライヤ名が続く。サプライヤ会計コードの場合は%s。 Use3StepsApproval=デフォルトでは、購買発注は2人の異なるユーザによって作成および承認される必要がある ( 作成する1つのステップ/ユーザと承認する1つのステップ/ユーザ。ユーザが作成と承認の両方の権限を持っている場合は、1つのステップ/ユーザで十分 ) 。金額が専用の値よりも高い場合は、このオプションを使用して3番目のステップ/ユーザ承認を導入するように依頼できる ( したがって、3つのステップが必要になる:1 =検証、2 =最初の承認、3 =金額が十分な場合は2番目の承認 ) 。
    1つの承認 ( 2ステップ ) で十分な場合はこれを空に設定し、2番目の承認 ( 3ステップ ) が常に必要な場合は非常に低い値 ( 0.1 ) に設定する。 UseDoubleApproval=金額 ( 税抜き ) が...より高い場合は、3段階の承認を使用すること。 -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=注意: アプリケーションからメールを送信するための設定では、デフォルトの汎用設定 (「%s」と呼ばれる) が使用される。この選択には、技術的な知識や特別な設定は必要ない。
    ただし、多くの場合、送信メールをデフォルトの設定に代えて、発信メール設定を別のやり方(「%s」と呼ばれる)、メールサービスプロバイダのメール サーバ を使用するように設定することをお勧めする。これにはいくつかの理由がある: WarningPHPMailA=- メール サービス プロバイダのサーバ を使用すると、メールの信頼性が高まり、スパムとしてフラグ付けされることなく配信率が向上する -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- メールのドメイン (mymaildomain.com から myname@mymaildomain.com までの部分) が SPF + DMARC レコードで保護されている場合、送信者のドメイン (mymaildomain.com) の DNS ゾーンに定義されている DMARC ルールでは一般的な送信者としての送信が許可されていないため、メールが SPAM としてフラグ付けされる可能性がある。このような場合は、ドメインの DMARC を無効にする (または @gmail.com のように p=none に設定する) 必要がある。または、技術的な知識がある場合は、自分のメール プロバイダーの SMTP サーバ を使用してメールを送信する別の方法を使用することをお勧めする。 WarningPHPMailC=-独自の電子メールサービスプロバイダーのSMTPサーバーを使用して電子メールを送信することも興味深いので、アプリケーションから送信される全電子メールもメールボックスの「送信済」ディレクトリに保存される。 WarningPHPMailD=したがって、電子メールの送信方法を値「SMTP」に変更することをお勧めする。 WarningPHPMailDbis=メールを送信するデフォルトの「PHP」メソッドを本当に維持したい場合は、この警告を無視するか、%sここをクリック%sして削除すること。 WarningPHPMail2=電子メールSMTPプロバイダーが電子メールクライアントをいくつかのIPアドレスに制限する必要がある場合 ( 非常にまれ ) 、これはERP CRMアプリケーションのメールユーザエージェント ( MUA ) のIPアドレス : %s。 -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. +WarningPHPMailSPF=送信者のメール アドレスのドメイン名が SPF レコードで保護されている場合 (ドメイン名登録者に問い合わせること)、ドメインの DNS の SPF レコードに次の IP またはエントリを追加する必要がある: %s。 +WarningPHPMailSPFDMARC=送信者のメール アドレスのドメイン名が p=none 以外の DMARC レコードで保護されている場合 (ドメイン名登録業者に問合せ)、DMARC レコードを削除するか、@gmail.com のように p=none に設定)するか、別の送信方法を使用する必要がある。 SPFAndDMARCInformation=メインメールアドレスの SPF および DMARC DNS レコード ActualMailDNSRecordFound=実際の %s レコードが見つかった (メール %s 用): %s ClickToShowDescription=クリックして説明を表示 @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=値をクリーンアップするための正規 DuplicateForbidden=重複禁止 RemoveSpecialWords=顧客またはサプライヤーのサブアカウントを生成するときに特定の単語を削除する RemoveSpecialWordsHelp=顧客または仕入先の勘定科目を計算する前に、クリーニングする単語を指定する。 ";" で単語を区切る -GDPRContact=データ保護責任者 ( DPO、データプライバシーまたはGDPRの連絡先 ) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=個人データを情報システムに保存する場合は、ここで一般データ保護規則の責任者を指名できる HelpOnTooltip=ツールチップに表示するヘルプテキスト HelpOnTooltipDesc=このフィールドがフォームに表示されたときにツールチップに表示されるテキストのテキストまたは翻訳キーをここに入力する @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=取引先名 - 取引先エイリアス ALIAS_THIRDPARTY=取引先エイリアス - 取引先名 PDFIn2Languages=PDF 内のラベルを 2 つの異なる言語で表示する (この機能はいくつかの言語では機能しない場合がある) PDF_USE_ALSO_LANGUAGE_CODE=PDF内の一部のテキストを同じ生成PDFで2つの異なる言語で複製する場合は、ここでこの2番目の言語を設定して、生成されたPDFに同じページに2つの異なる言語が含まれるようにする必要がある。1つはPDFの生成時に選択され、もう1つは ( これをサポートしているPDFテンプレートはごくわずか ) 。 PDFごとに1つの言語を空のままにする。 -PDF_USE_A=デフォルト形式の PDF ではなく PDF/A 形式で PDF ドキュメントを生成する +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=FontAwesomeアイコンのコードをここに入力する。 FontAwesomeとは何かわからない場合は、一般的な値fa-address-bookを使用できる。 RssNote=注:各RSSフィード定義は、ダッシュボードで使用できるようにするために有効化の必要があるウィジェットを提供する JumpToBoxes=【設定】-> 【ウィジェット】にジャンプする @@ -2555,3 +2554,8 @@ MenuDict=辞書 AddMoreParams=接続のパラメータを追加する (Cookie、トークンなど)
    例: token : value token ParamName=パラメータ名 ParamValue=パラメータの値 +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/kk_KZ/admin.lang b/htdocs/langs/kk_KZ/admin.lang index fec9da36d2914..34a476a51e57d 100644 --- a/htdocs/langs/kk_KZ/admin.lang +++ b/htdocs/langs/kk_KZ/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Мәндер тізімі формат кілті ба ExtrafieldParamHelpcheckbox=Мәндер тізімі формат кілті бар жолдар болуы керек, мән (мұнда кілт '0' болмауы керек)

    1, мән1
    2, мән2 a0342fccff319f03 ExtrafieldParamHelpradio=Мәндер тізімі формат кілті бар жолдар болуы керек, мән (мұнда кілт '0' болмауы керек)

    1, мән1
    2, мән2 a0342fccff319f03 ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметрлер ObjectName болуы керек: Classpath
    Синтаксис: ObjectName: Classpath ExtrafieldParamHelpSeparator=Қарапайым сепаратор үшін бос ұстаңыз күй әр пайдаланушы сеансы алдында сақталады) LibraryToBuildPDF=PDF құру үшін пайдаланылатын кітапхана @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Регекс сүзгісі таза мәнге (C DuplicateForbidden=Көшірме жасауға тыйым салынады RemoveSpecialWords=Тұтынушылар немесе жеткізушілер үшін қосалқы шоттарды жасау кезінде белгілі бір сөздерді тазалаңыз RemoveSpecialWordsHelp=Тұтынушы немесе жеткізушінің шотын есептеу алдында тазартылатын сөздерді көрсетіңіз. «;» пайдаланыңыз әр сөз арасында -GDPRContact=Деректерді қорғау жөніндегі қызметкер (DPO, деректердің құпиялылығы немесе GDPR байланысы) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Жеке деректерді Ақпараттық жүйеңізде сақтасаңыз, Деректерді қорғаудың жалпы ережесіне жауапты контактіні осы жерде атай аласыз HelpOnTooltip=Мәтінді құралдар тақтасында көрсетуге көмектесіңіз HelpOnTooltipDesc=Мәтін немесе аударма кілтін осы өріс пішінде пайда болған кезде құралдар кеңесінде көрсету үшін осында қойыңыз @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Үшінші тарап аты - Үшінші тарап бүр ALIAS_THIRDPARTY=Үшінші тарап бүркеншік аты - Үшінші тарап аты PDFIn2Languages=PDF форматындағы белгілерді 2 түрлі тілде көрсету (бұл мүмкіндік кейбір бірнеше тілде жұмыс істемеуі мүмкін) PDF_USE_ALSO_LANGUAGE_CODE=Егер сіз PDF -тегі кейбір мәтіндерді бір PDF форматында 2 түрлі тілде қайталағыңыз келсе, мұнда осы екінші тілді орнатуыңыз керек, осылайша жасалған PDF бір бетте 2 түрлі тілді қамтиды, PDF жасау кезінде таңдалған және осы PDF -тің бірнеше үлгілері ғана қолдайды). PDF үшін 1 тіл үшін бос қалдырыңыз. -PDF_USE_A=Әдепкі PDF пішімінің орнына PDF/A пішімі бар PDF құжаттарын жасаңыз +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Мұнда FontAwesome белгішесінің кодын енгізіңіз. Егер сіз FontAwesome деген не екенін білмесеңіз, fa-address-book жалпы мәнін пайдалана аласыз. RssNote=Ескерту: RSS арнасының әр анықтамасы бақылау тақтасында қол жетімді болуы үшін оны қосу қажет виджетті қамтамасыз етеді JumpToBoxes=Орнату -> виджеттерге өтіңіз @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/km_KH/admin.lang b/htdocs/langs/km_KH/admin.lang index 8b4ad5a1180be..6508afdfbe877 100644 --- a/htdocs/langs/km_KH/admin.lang +++ b/htdocs/langs/km_KH/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=ប៉ារ៉ាម៉ែត្រត្រូវតែជា ObjectName:Classpath
    វាក្យសម្ព័ន្ធ៖ ObjectName:Classpath ExtrafieldParamHelpSeparator=ទុកទទេសម្រាប់សញ្ញាបំបែកសាមញ្ញ
    កំណត់វាទៅជា 1 សម្រាប់សញ្ញាបំបែកដែលដួលរលំ (បើកតាមលំនាំដើមសម្រាប់វគ្គថ្មី បន្ទាប់មកស្ថានភាពត្រូវបានរក្សាទុកសម្រាប់សម័យអ្នកប្រើប្រាស់នីមួយៗ)
    កំណត់វាទៅជា 2 សម្រាប់សញ្ញាបំបែកដែលដួលរលំ (ដួលរលំតាមលំនាំដើមសម្រាប់វគ្គថ្មី បន្ទាប់មកស្ថានភាពត្រូវបានរក្សាទុកសម្រាប់សម័យអ្នកប្រើប្រាស់នីមួយៗ) LibraryToBuildPDF=បណ្ណាល័យប្រើសម្រាប់ការបង្កើត PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=តម្រង Regex ដើម្បីសម្ DuplicateForbidden=ហាមចម្លង RemoveSpecialWords=សម្អាតពាក្យជាក់លាក់នៅពេលបង្កើតគណនីរងសម្រាប់អតិថិជន ឬអ្នកផ្គត់ផ្គង់ RemoveSpecialWordsHelp=បញ្ជាក់ពាក្យដែលត្រូវសម្អាតមុនពេលគណនាគណនីអតិថិជន ឬអ្នកផ្គត់ផ្គង់។ ប្រើ ";" រវាងពាក្យនីមួយៗ -GDPRContact=មន្ត្រីការពារទិន្នន័យ (DPO, ឯកជនភាពទិន្នន័យ ឬទំនាក់ទំនង GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=ប្រសិនបើអ្នករក្សាទុកទិន្នន័យផ្ទាល់ខ្លួននៅក្នុងប្រព័ន្ធព័ត៌មានរបស់អ្នក អ្នកអាចដាក់ឈ្មោះទំនាក់ទំនងដែលទទួលខុសត្រូវចំពោះបទប្បញ្ញត្តិការពារទិន្នន័យទូទៅនៅទីនេះ HelpOnTooltip=អត្ថបទជំនួយដើម្បីបង្ហាញនៅលើព័ត៌មានជំនួយ HelpOnTooltipDesc=ដាក់អត្ថបទ ឬគន្លឹះបកប្រែនៅទីនេះសម្រាប់អត្ថបទដើម្បីបង្ហាញនៅក្នុងព័ត៌មានជំនួយ នៅពេលដែលវាលនេះបង្ហាញក្នុងទម្រង់មួយ។ @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=ឈ្មោះភាគីទីបី - ឈ្មោះភា ALIAS_THIRDPARTY=ឈ្មោះភាគីទីបី - ឈ្មោះភាគីទីបី PDFIn2Languages=បង្ហាញស្លាកនៅក្នុង PDF ជា 2 ភាសាផ្សេងគ្នា (លក្ខណៈពិសេសនេះប្រហែលជាមិនដំណើរការសម្រាប់ពីរបីភាសាទេ) PDF_USE_ALSO_LANGUAGE_CODE=ប្រសិនបើអ្នកចង់ឱ្យអត្ថបទមួយចំនួននៅក្នុង PDF របស់អ្នកស្ទួនជា 2 ភាសាផ្សេងគ្នានៅក្នុង PDF ដែលបានបង្កើតដូចគ្នា អ្នកត្រូវតែកំណត់នៅទីនេះជាភាសាទីពីរនេះ ដូច្នេះ PDF ដែលត្រូវបានបង្កើតនឹងមាន 2 ភាសាផ្សេងគ្នានៅក្នុងទំព័រតែមួយ ដែលជាភាសាដែលត្រូវបានជ្រើសរើសនៅពេលបង្កើត PDF និងមួយ ( មានតែគំរូ PDF មួយចំនួនប៉ុណ្ណោះដែលគាំទ្រវា) ។ ទុកទទេសម្រាប់ 1 ភាសាក្នុងមួយ PDF ។ -PDF_USE_A=បង្កើតឯកសារ PDF ជាទម្រង់ PDF/A ជំនួសឱ្យទម្រង់ PDF លំនាំដើម +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=បញ្ចូលកូដនៃរូបតំណាង FontAwesome នៅទីនេះ។ ប្រសិនបើអ្នកមិនដឹងថាអ្វីជា FontAwesome អ្នកអាចប្រើតម្លៃទូទៅ fa-address-book ។ RssNote=ចំណាំ៖ និយមន័យមតិព័ត៌មាន RSS នីមួយៗផ្តល់នូវធាតុក្រាហ្វិកដែលអ្នកត្រូវតែបើកដើម្បីឱ្យវាមាននៅក្នុងផ្ទាំងគ្រប់គ្រង JumpToBoxes=លោតទៅការដំឡើង -> ធាតុក្រាហ្វិក @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index 3331840596d99..c4882c77b6737 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=ບັນຊີລາຍຊື່ຂອງຄ່າຕ ExtrafieldParamHelpcheckbox=ລາຍການຄ່າຕ້ອງເປັນແຖວທີ່ມີລະຫັດຮູບແບບ, ຄ່າ (ບ່ອນທີ່ກະແຈບໍ່ສາມາດເປັນ '0')

    ຕົວຢ່າງ:
    1, value1
    2, value2
    3, value3 a0cc2 ... ExtrafieldParamHelpradio=ລາຍການຄ່າຕ້ອງເປັນແຖວທີ່ມີລະຫັດຮູບແບບ, ຄ່າ (ບ່ອນທີ່ກະແຈບໍ່ສາມາດເປັນ '0')

    ຕົວຢ່າງ:
    1, value1
    2, value2
    3, value3 a0cc2 ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=ພາຣາມິເຕີຕ້ອງເປັນ ObjectName: Classpath
    Syntax: ObjectName: Classpath ExtrafieldParamHelpSeparator=ຮັກສາຫວ່າງເປົ່າສໍາລັບຕົວແຍກແບບງ່າຍ simple
    ຕັ້ງອັນນີ້ເປັນ 1 ສໍາລັບຕົວແຍກຕົວຫຍໍ້ (ເປີດຕາມຄ່າເລີ່ມຕົ້ນສໍາລັບຊ່ວງເວລາເຂົ້າໃ,່, ຈາກນັ້ນສະຖານະຈະຖືກເກັບໄວ້ສໍາລັບແຕ່ລະຊ່ວງເວລາຂອງຜູ້ໃຊ້)
    ກໍານົດອັນນີ້ເປັນ 2 ສໍາລັບຕົວແຍກການຫຍໍ້ (ຫຍໍ້ລົງຕາມຄ່າເລີ່ມຕົ້ນສໍາລັບເຊດຊັນໃ,່, ຈາກນັ້ນ ສະຖານະພາບໄດ້ຖືກເກັບຮັກສາໄວ້ໃນແຕ່ລະກອງປະຊຸມຜູ້ໃຊ້) LibraryToBuildPDF=ຫ້ອງສະusedຸດໃຊ້ ສຳ ລັບສ້າງ PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=ຕົວກອງ Regex ເພື່ອເຮັ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=ເຮັດຄວາມສະອາດຄໍາທີ່ແນ່ນອນໃນເວລາທີ່ສ້າງບັນຊີຍ່ອຍສໍາລັບລູກຄ້າຫຼືຜູ້ສະຫນອງ RemoveSpecialWordsHelp=ລະບຸຄໍາທີ່ຕ້ອງເຮັດຄວາມສະອາດກ່ອນທີ່ຈະຄິດໄລ່ບັນຊີລູກຄ້າຫຼືຜູ້ສະຫນອງ. ໃຊ້ ";" ລະຫວ່າງແຕ່ລະຄໍາ -GDPRContact=ເຈົ້າ ໜ້າ ທີ່ປົກປ້ອງຂໍ້ມູນ (DPO, ຄວາມເປັນສ່ວນຕົວຂອງຂໍ້ມູນຫຼືການຕິດຕໍ່ GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=ຖ້າທ່ານເກັບຂໍ້ມູນສ່ວນຕົວຢູ່ໃນລະບົບຂໍ້ມູນຂອງທ່ານ, ທ່ານສາມາດຕັ້ງຊື່ຜູ້ຕິດຕໍ່ຜູ້ທີ່ຮັບຜິດຊອບຕໍ່ກົດລະບຽບການປົກປ້ອງຂໍ້ມູນທົ່ວໄປຢູ່ທີ່ນີ້ HelpOnTooltip=ຂໍ້ຄວາມຊ່ວຍເຫຼືອເພື່ອສະແດງຢູ່ໃນຄໍາແນະນໍາ HelpOnTooltipDesc=ວາງຕົວ ໜັງ ສືຫຼືກະແຈການແປຢູ່ບ່ອນນີ້ເພື່ອໃຫ້ຂໍ້ຄວາມສະແດງຢູ່ໃນ ຄຳ ແນະ ນຳ ເມື່ອຊ່ອງຂໍ້ມູນນີ້ປະກົດຂຶ້ນໃນແບບຟອມ @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=ຊື່ພາກສ່ວນທີສາມ - ນາມແຝ ALIAS_THIRDPARTY=ນາມແຝງພາກສ່ວນທີສາມ - ຊື່ພາກສ່ວນທີສາມ PDFIn2Languages=ສະແດງປ້າຍຊື່ໃນ PDF ເປັນ 2 ພາສາທີ່ແຕກຕ່າງກັນ (ຄຸນສົມບັດນີ້ອາດຈະບໍ່ເຮັດວຽກກັບບາງພາສາ) PDF_USE_ALSO_LANGUAGE_CODE=ຖ້າເຈົ້າຕ້ອງການໃຫ້ມີຕົວ ໜັງ ສືບາງອັນຢູ່ໃນ PDF ຂອງເຈົ້າຊໍ້າກັນຢູ່ໃນ 2 ພາສາທີ່ແຕກຕ່າງກັນຢູ່ໃນ PDF ທີ່ສ້າງຂຶ້ນອັນດຽວກັນ, ເຈົ້າຕ້ອງຕັ້ງເປັນພາສາທີສອງຢູ່ທີ່ນີ້ເພື່ອໃຫ້ PDF ທີ່ສ້າງຂຶ້ນຈະມີ 2 ພາສາແຕກຕ່າງກັນຢູ່ໃນ ໜ້າ ດຽວ, ອັນທີ່ເລືອກເມື່ອສ້າງ PDF ແລະອັນນີ້ ( ມີພຽງແຕ່ແມ່ແບບ PDF ບາງອັນທີ່ສະ ໜັບ ສະ ໜູນ ອັນນີ້). ຮັກສາຫວ່າງເປົ່າສໍາລັບ 1 ພາສາຕໍ່ PDF. -PDF_USE_A=ສ້າງເອກະສານ PDF ທີ່ມີຮູບແບບ PDF/A ແທນທີ່ຈະເປັນຮູບແບບ PDF ເລີ່ມຕົ້ນ +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=ໃສ່ທີ່ນີ້ລະຫັດຂອງໄອຄອນ FontAwesome. ຖ້າເຈົ້າບໍ່ຮູ້ວ່າ FontAwesome ແມ່ນຫຍັງ, ເຈົ້າສາມາດໃຊ້ຄ່າທົ່ວໄປ fa-address-book. RssNote=Noteາຍເຫດ: ແຕ່ລະນິຍາມອາຫານ RSS ໃຫ້ widget ທີ່ເຈົ້າຕ້ອງເປີດໃຊ້ເພື່ອໃຫ້ມັນມີຢູ່ໃນ dashboard JumpToBoxes=ໄປຫາການຕັ້ງຄ່າ -> ວິດເຈັດ @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index a7e61ee79ee41..b0a6770577e06 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -365,17 +365,17 @@ UpdateServerOffline=Atjaunināšanas serveris bezsaistē WithCounter=Pārvaldīt skaitītāju GenericMaskCodes=Jūs varat ievadīt jebkuru numerācijas masku. Šajā maskā var izmantot šādus tagus:
    {000000} atbilst skaitlim, kas tiks palielināts katrā %s. Ievadiet tik daudz nulles, cik vēlamais skaitītāja garums. Skaitītāju aizpildīs ar nulli no kreisās puses, lai tajā būtu tikpat daudz nulles kā maskā.
    {000000 + 000} tāds pats kā iepriekšējais, bet nobīde, kas atbilst skaitlim pa labi no zīmes +, tiek piemērota, sākot ar pirmo %s.
    {000000 @ x} tāds pats kā iepriekšējais, bet skaitītājs tiek atiestatīts uz nulli, kad ir sasniegts mēnesis x (x no 1 līdz 12, vai 0, lai izmantotu jūsu konfigurācijā definētos fiskālā gada sākuma mēnešus, vai no 99 līdz katru mēnesi atiestatīt uz nulli). Ja tiek izmantota šī opcija un x ir 2 vai lielāks, ir nepieciešama arī secība {yy} {mm} vai {gggg} {mm}.
    {dd} diena (no 01 līdz 31).
    {mm} mēnesis (no 01 līdz 12).
    {yy} , {yyyy} vai {y} a09a4b
    GenericMaskCodes2= {cccc} klienta kods uz n rakstzīmēm
    {cccc000} a09a4b739f17fz Šis klientam veltītais skaitītājs tiek atiestatīts vienlaikus ar globālo skaitītāju.
    {tttt} Trešās puses tipa kods uz n rakstzīmēm (skatiet izvēlni Sākums - Iestatīšana - Vārdnīca - Trešo personu veidi). Ja pievienosit šo tagu, katram trešās puses tipam skaitītājs būs atšķirīgs.
    -GenericMaskCodes2b={uuuu} the n first characters of the lastname of the user that creates the object (n is number of "u"). +GenericMaskCodes2b={uuuu} tā lietotāja uzvārda n pirmās rakstzīmes izveido objektu (n ir "u" skaitlis). GenericMaskCodes3=Visas citas rakstzīmes masku paliks neskartas.
    Atstarpes nav atļautas.
    GenericMaskCodes3EAN=Visas pārējās maskas rakstzīmes paliks neskartas (izņemot * vai? EAN13 13. pozīcijā).
    Atstarpes nav atļautas.
    EAN13, pēdējam rakstzīmei pēc pēdējā} 13. pozīcijā jābūt * vai? . To aizstās aprēķinātā atslēga.
    GenericMaskCodes4a=Piemērs par trešās puses TheCompany 99. piemēru %s ar datumu 2023. 01.31.:
    GenericMaskCodes4b=Example on third party created on 2023-01-31:
    GenericMaskCodes4c=Piemērs par produktu, kas izveidots 2023.01.31.:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX -GenericMaskCodes5b=IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' +GenericMaskCodes5=ABC{yy}{mm}-{000000} sniegs b0aee833650ABC2301-000099
    }-ZZZ/{dd}/XXX
    sniegs 0199-ZZZ/31/XXX +GenericMaskCodes5b=IN{yy}{mm}-8dza358d453 -{t} sniegs IN230-1- A, ja uzņēmuma veids ir “Atbildīgs Inscripto” ar tipa kodu “A_RI” GenericNumRefModelDesc=Atgriež pielāgojamu numuru atbilstoši noteiktajai maskai. -DateStartThatModel=Disable use of this numbering rule for all thirdparties created before -DateStartThatModelHelp=You can disable elephant numbering rule for thirdparties created before a date (for example, because they were imported by a migration, from another software using a different rule). Let that field empty to have the rule applied on all thirdparties. +DateStartThatModel=Atspējot šīs numerācijas kārtulas izmantošanu visām iepriekš izveidotajām trešajām pusēm +DateStartThatModelHelp=Varat atspējot ziloņu numerācijas kārtulu trešajām pusēm, kas izveidotas pirms datuma (piemēram, tāpēc, ka tās tika importētas migrācijas rezultātā, no citas programmatūras, izmantojot citu kārtulu). Ļaujiet šim laukam iztukšot, lai kārtula tiktu piemērota visām trešajām pusēm. ServerAvailableOnIPOrPort=Serveris ir pieejams adresē %s ports %s ServerNotAvailableOnIPOrPort=Serveris nav pieejams adresē %s ports %s DoTestServerAvailability=Pārbaudīt servera savienojumu @@ -458,9 +458,9 @@ ExtrafieldSelect=Izvēlēties sarakstu ExtrafieldSelectList=Izvēlieties kādu no tabulas ExtrafieldSeparator=Atdalītājs (nevis lauks) ExtrafieldPassword=Parole -ExtrafieldRadio=Radio buttons (1 choice only) -ExtrafieldCheckBox=Select list (n choices) -ExtrafieldCheckBoxFromList=Select from table (n choices) +ExtrafieldRadio=Radio pogas (tikai 1 izvēle) +ExtrafieldCheckBox=Atlasīt sarakstu (n izvēles) +ExtrafieldCheckBoxFromList=Atlasīt no tabulas (n izvēles) ExtrafieldLink=Saite uz objektu ExtrafieldPointGeo=Ģeometriskais punkts ExtrafieldMultiPointGeo=Ģeometriski daudzpunktu @@ -474,8 +474,7 @@ ExtrafieldParamHelpPassword=Ja atstājat šo lauku tukšu, šī vērtība tiks s ExtrafieldParamHelpselect=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    kods3, vērtība3 < br> ...

    Lai saraksts būtu atkarīgs no cita papildinošā atribūtu saraksta:
    1, vērtība1 | opcijas_ vecāku_līmeņa kods : vecāku_skava
    2, vērtība2 | opcijas_ vecāku saraksts_code : parent_key

    Lai saraksts būtu atkarīgs no cita saraksta:
    1, vērtība1 | vecāku saraksts_code : vecāku_skava
    2, vērtība2 | vecāku saraksts_code : vecāku_poga ExtrafieldParamHelpcheckbox=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    3, vērtība3 < br> ... ExtrafieldParamHelpradio=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    3, vērtība3 < br> ... -ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter +ExtrafieldParamHelpsellist=Vērtību saraksts nāk no tabulas
    Sintakse: table_name:label_field:id_field::filtersql
    Piemērs: c_idtypent:libelle ::filtersql

     — lauks id_field noteikti ir primārā int atslēgab0342fccfda
    Varat arī izmantot $ID$ filtrā, kas ir pašreizējā objekta pašreizējais ID.
    Ja vēlaties filtrēt papildu laukus, izmantojiet sintaksi extra.fieldcode=... (kur lauka kods ir ekstralauka kods)

    Lai saraksts būtu atkarīgs no cita papildu atribūtu saraksta:
    c_typent:libelle:id:options_b049271fcze0818 parent_list_code|parent_column:filter
    b0342fccfda19bz secībā lai saraksts būtu atkarīgs no cita saraksta:
    c_typent:libelle:id:parent_list_code |parent_column:filter ExtrafieldParamHelplink=Parametriem jābūt ObjectName: Classpath
    Sintakse: ObjectName: Classpath ExtrafieldParamHelpSeparator=Vienkārša atdalītāja atstāšana tukša
    Iestatiet to uz 1 sabrūkošajam atdalītājam (pēc noklusējuma atveriet jaunu sesiju, pēc tam katras lietotāja sesijai tiek saglabāts statuss)
    Iestatiet to uz 2 sabrukušajam atdalītājam (jaunajai sesijai pēc noklusējuma sabrūk, pēc tam katras lietotāja sesijas laikā tiek saglabāts statuss) LibraryToBuildPDF=Bibliotēka, ko izmanto PDF veidošanai @@ -514,17 +513,17 @@ ModuleCompanyCodeCustomerDigitaria=%s, kam seko saīsināts klienta nosaukums ar ModuleCompanyCodeSupplierDigitaria=%s, kam seko saīsināts piegādātāja nosaukums ar rakstzīmju skaitu: %s piegādātāja grāmatvedības kodam. Use3StepsApproval=Pēc noklusējuma ir jābūt veidotam un apstiprinātam Pirkšanas pasūtījumam no 2 dažādiem lietotājiem (viens solis / lietotājs, lai izveidotu un viens solis / lietotājs apstiprinātu. Ņemiet vērā, ka, ja lietotājam ir gan atļauja izveidot un apstiprināt, viens solis / lietotājs būs pietiekams) . Ar šo opciju varat prasīt trešās pakāpes / lietotāja apstiprinājumu, ja summa ir lielāka par īpašo vērtību (tādēļ būs nepieciešami 3 soļi: 1 = validācija, 2 = pirmais apstiprinājums un 3 = otrais apstiprinājums, ja summa ir pietiekama).
    Iestatiet, ka tas ir tukšs, ja pietiek vienam apstiprinājumam (2 pakāpieniem), ja tam vienmēr ir nepieciešams otrais apstiprinājums (3 pakāpieni). UseDoubleApproval=Izmantojiet 3 pakāpju apstiprinājumu, ja summa (bez nodokļiem) ir lielāka par ... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=PAZIŅOJUMS. Iestatījumā e-pasta ziņojumu sūtīšanai no lietojumprogrammas tiek izmantota noklusējuma vispārīgā iestatīšana (ko sauc par "%s"). Šai izvēlei nav vajadzīgas tehniskas zināšanas un īpaša iestatīšana.
    Tomēr bieži vien labāk ir iestatīt izejošos e-pastus, lai izmantotu citu metodi (ko sauc par %s"), lai izmantotu sava e-pasta pakalpojumu sniedzēja e-pasta serveri, nevis noklusējuma iestatījumu vairāku iemeslu dēļ. WarningPHPMailA=- E-pasta pakalpojumu sniedzēja servera izmantošana palielina jūsu e-pasta uzticamību, tāpēc tas palielina piegādes iespējas, neatzīmējot to kā surogātpastu. -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Ja jūsu e-pasta domēns (daļa mymaildomain.com uz myname@mymaildomain.com) ir aizsargāts ar SPF + DMARC ierakstu, jūsu e-pasts var tikt atzīmēts kā SPAM, jo jūsu DMARC noteikums ir definēts domēna domēna DNS zonā. sūtītājs (mymaildomain.com) neļauj sūtīt kā vispārējs sūtītājs. Šādā gadījumā jums ir jāatspējo domēna DMARC (vai jāiestata uz p=none, kā to izdarīja @gmail.com) vai, labāk, ja jums ir tehniskās zināšanas, izmantojiet citu metodi, lai nosūtītu e-pastus, izmantojot SMTP. sava e-pasta pakalpojumu sniedzēja serveri. WarningPHPMailC=- Arī sava e-pasta pakalpojumu sniedzēja SMTP servera izmantošana e-pasta ziņojumu sūtīšanai ir interesanta, tāpēc visi no lietojumprogrammas nosūtītie e-pasta ziņojumi tiks saglabāti arī jūsu pastkastes direktorijā Nosūtītie. WarningPHPMailD=Tāpēc ir ieteicams mainīt e-pasta sūtīšanas metodi uz vērtību "SMTP". WarningPHPMailDbis=Ja patiešām vēlaties saglabāt noklusējuma "PHP" metodi e-pasta sūtīšanai, vienkārši ignorējiet šo brīdinājumu vai noņemiet to, %snoklikšķinot šeit%s. WarningPHPMail2=Ja jūsu e-pasta SMTP pakalpojumu sniedzējs ierobežo e-pasta klientus uz dažām IP adresēm (ļoti reti), tad jūsu ERP CRM lietojumprogrammas e-pasta lietotāja aģenta (MUA) IP adrese ir: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. -SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses -ActualMailDNSRecordFound=Actual %s record found (for email %s) : %s +WarningPHPMailSPF=Ja domēna nosaukums jūsu sūtītāja e-pasta adresē ir aizsargāts ar SPF ierakstu (jautājiet savam domēna vārda reģistratoram), jums ir jāpievieno šādi IP vai ieraksts sava domēna DNS SPF ierakstā: %s. +WarningPHPMailSPFDMARC=Ja domēna nosaukumu jūsu sūtītāja e-pasta adresē aizsargā DMARC ieraksts, kas atšķiras no p=none (jautājiet savam domēna vārda reģistratoram), jums ir jānoņem savs DMARC ieraksts vai jāiestata uz p=none, piemēram, @gmail.com) vai izmantojiet citu sūtīšanas metodi. +SPFAndDMARCInformation=SPF un DMARC DNS ieraksts galvenajām e-pasta adresēm +ActualMailDNSRecordFound=Atrasts faktiskais %s ieraksts (e-pastam %s): %s ClickToShowDescription=Noklikšķiniet, lai parādītu aprakstu DependsOn=Šim modulim nepieciešams modulis(-i) RequiredBy=Šis modulis nepieciešams modulim (-ļiem) @@ -668,7 +667,7 @@ Module2200Desc=Izmantojiet matemātikas izteiksmes cenu automātiskai ģenerēš Module2300Name=Plānotie darbi Module2300Desc=Plānotais darbavietu vadība (alias cron vai chrono galds) Module2400Name=Pasākumi / darba kārtība -Module2400Desc=Manage manual and automatic events. Use the calendar to record events manually. Log also events automatically for tracking purposes or record manual events or meetings. This is the principal module for good Customer and/or Vendor Relationship Management. +Module2400Desc=Pārvaldiet manuālus un automātiskus notikumus. Izmantojiet kalendāru, lai manuāli ierakstītu notikumus. Reģistrējiet notikumus arī automātiski, lai izsekotu vai ierakstītu manuālus notikumus vai sanāksmes. Šis ir galvenais modulis labas klientu un/vai pārdevēju attiecību pārvaldībai. Module2430Name=Tiešsaistes tikšanās plānošana Module2430Desc=Nodrošina tiešsaistes tikšanās rezervēšanas sistēmu. Tādējādi ikviens var rezervēt tikšanās vietas atbilstoši iepriekš noteiktam diapazonam vai pieejamībai. Module2500Name=DMS / ECM @@ -869,7 +868,7 @@ Permission255=Mainīt citu lietotāju paroli Permission256=Izdzēst vai bloķēt citus lietotājus Permission262=Paplašiniet piekļuvi visām trešajām personām UN to objektiem (ne tikai trešajām personām, kurām lietotājs ir piesaistīts kā tirdzniecības pārstāvis). Permission262b=Nav efektīva ārējiem lietotājiem (vienmēr tikai paši priekšlikumiem, pasūtījumiem, rēķiniem, līgumiem utt.). -Permission262c=Not effective for projects (only rules on project permissions, visibility and users assignment matter). +Permission262c=Nav spēkā projektiem (svarīgi ir tikai noteikumi par projektu atļaujām, redzamību un lietotāju piešķiršanu). Permission263=Paplašiniet piekļuvi visām trešajām pusēm BEZ viņu objektiem (ne tikai trešajām personām, kuru lietotājs ir pārdošanas pārstāvis).
    Nav efektīvs ārējiem lietotājiem (vienmēr tikai un vienīgi attiecībā uz priekšlikumiem, pasūtījumiem, rēķiniem, līgumiem utt.)
    Nav spēkā projektiem (tikai noteikumi par projekta atļaujām, redzamību un piešķiršanas jautājumiem). Permission271=Lasīt CA Permission272=Lasīt rēķinus @@ -946,7 +945,7 @@ Permission776=Apmaksāt izdevumu pārskatus Permission777=Lasīt visus izdevumu pārskatus (arī lietotāja, kas nav padotie) Permission778=Izveidojiet / mainiet visu izdevumu pārskatus Permission779=Eksportēt izdevumu atskaites -Permission1001=Read warehouses and stocks +Permission1001=Izlasiet noliktavas un krājumus Permission1002=Izveidot/labot noliktavas Permission1003=Dzēst noliktavas Permission1004=Lasīt krājumu pārvietošanas @@ -1063,7 +1062,7 @@ Permission54001=Drukāt Permission55001=Lasīt aptaujas Permission55002=Izveidot/labot aptaujas Permission59001=Read commercial margins -Permission59002=Define commercial margins +Permission59002=Definējiet komerciālās normas Permission59003=Read every user margin Permission63001=Lasīt resursus Permission63002=Izveidot/labot resursus @@ -1240,7 +1239,7 @@ CompanyObject=Uzņēmuma objekts IDCountry=ID valsts Logo=Logotips LogoDesc=Galvenais uzņēmuma logotips. Tiks izmantots ģenerētajos dokumentos (PDF, ...) -LogoSquarred=Logotips (kvadrātā) +LogoSquarred=Logotips (kvadrātveida) LogoSquarredDesc=Jābūt kvadrāta ikonai (platums = augstums). Šis logotips tiks izmantots kā iecienītākā ikona vai cita nepieciešamība, piemēram, augšējā izvēlnes joslā (ja displeja iestatījumos tas nav atspējots). DoNotSuggestPaymentMode=Neieteikt NoActiveBankAccountDefined=Nav definēts aktīvs bankas konts @@ -1249,7 +1248,7 @@ BankModuleNotActive=Bankas kontu modulis nav ieslēgts ShowBugTrackLink=Rādīt saiti " %s " ShowBugTrackLinkDesc=Turiet tukšu, lai nerādītu šo saiti, izmantojiet vērtību “github” saitei uz projektu Dolibarr vai tieši definējiet URL “https: // ...” Alerts=Brīdinājumi -DelaysOfToleranceBeforeWarning=Tiek rādīts brīdinājuma brīdinājums... +DelaysOfToleranceBeforeWarning=Tiek rādīts brīdinājums par... DelaysOfToleranceDesc=Iestatiet aizkavi pirms brīdinājuma ikonas %s parādīšanas ekrānā par novēloto elementu. Delays_MAIN_DELAY_ACTIONS_TODO=Plānotie notikumi (darba kārtības notikumi) nav pabeigti Delays_MAIN_DELAY_PROJECT_TO_CLOSE=Projekts nav slēgts laikā @@ -1298,7 +1297,7 @@ SystemInfoDesc=Sistēmas informācija ir dažādi tehniskā informācija jums ti SystemAreaForAdminOnly=Šī sadaļa ir pieejama tikai administratora lietotājiem. Dolibarr lietotāja atļaujas nevar mainīt šo ierobežojumu. CompanyFundationDesc=Rediģējiet sava uzņēmuma / organizācijas informāciju. Kad tas ir izdarīts, noklikšķiniet uz pogas "%s" lapas apakšā. MoreNetworksAvailableWithModule=Iespējojot moduli "Sociālie tīkli", var būt pieejami vairāk sociālo tīklu. -AccountantDesc=Ja jums ir ārējais grāmatvedis / grāmatvedis, varat rediģēt šeit savu informāciju. +AccountantDesc=Ja jums ir ārējais grāmatvedis / grāmatvedis, varat rediģēt šeit informāciju. AccountantFileNumber=Grāmatveža kods DisplayDesc=Šeit var mainīt parametrus, kas ietekmē lietojumprogrammas izskatu un noformējumu. AvailableModules=Pieejamās progrmma / moduļi @@ -1459,7 +1458,7 @@ HRMSetup=HRM moduļa iestatīšana CompanySetup=Uzņēmuma moduļa uzstādīšana CompanyCodeChecker=Klienta/pārdevēja kodu automātiskās ģenerēšanas iespējas AccountCodeManager=Klienta / pārdevēja grāmatvedības kodu automātiskās ģenerēšanas iespējas -NotificationsDesc=Email notifications can be sent automatically on certain events.
    Recipients of notifications can be defined: +NotificationsDesc=E-pasta paziņojumus var nosūtīt automātiski par noteiktiem notikumiem.
    Paziņojumu saņēmējus var definēt: NotificationsDescUser=* katram lietotājam (lietotāja cilnē "Paziņojumi") NotificationsDescContact=* par trešās puses kontaktpersonām (trešās puses cilnē "Paziņojumi") NotificationsDescGlobal=* vai iestatot globālās e-pasta adreses (moduļa iestatīšanas lapā). @@ -1483,7 +1482,7 @@ BillsNumberingModule=Rēķinu un kredītu piezīmes numerācijas modelis BillsPDFModules=Rēķina dokumentu modeļi BillsPDFModulesAccordindToInvoiceType=Rēķinu dokumentu modeļi atbilstoši rēķina veidam PaymentsPDFModules=Maksājumu dokumentu paraugi -ForceInvoiceDate=Force rēķina datumu apstiprināšanas datuma +ForceInvoiceDate=Rēķina datums kā pārbaudes datums SuggestedPaymentModesIfNotDefinedInInvoice=Ierosinātais maksājuma režīms rēķinā pēc noklusējuma, ja tas nav definēts rēķinā SuggestPaymentByRIBOnAccount=Iesakiet norēķinu ar norēķinu kontu SuggestPaymentByChequeToAddress=Ieteikt maksājumu ar čeku uz @@ -1498,16 +1497,16 @@ InvoiceOptionCategoryOfOperations=Rēķinā parādiet norādi "operāciju katego InvoiceOptionCategoryOfOperationsHelp=Atkarībā no situācijas minējums tiks parādīts šādā formā:
    - Darbību kategorija: Preču piegāde
    - Darbību kategorija: Pakalpojumu sniegšana
    - Darbību kategorija: Jaukts - Preču piegāde un pakalpojumi InvoiceOptionCategoryOfOperationsYes1=Jā, zem adreses bloka InvoiceOptionCategoryOfOperationsYes2=Jā, apakšējā kreisajā stūrī -InvoiceClassifyBilledSupplierOrderWithoutInvoice=Disallow the classification of an order as billed without invoice. -InvoiceClassifyBilledSupplierOrderWithoutInvoiceHelp=An order can be classified as billed by default. If this conf is set to true, it will be not. +InvoiceClassifyBilledSupplierOrderWithoutInvoice=Neatļaut pasūtījuma klasificēšanu kā rēķinu bez rēķina. +InvoiceClassifyBilledSupplierOrderWithoutInvoiceHelp=Pasūtījumu pēc noklusējuma var klasificēt kā rēķinu. Ja šī konf. ir iestatīta uz patiesu, tā nebūs. ##### Supplier Orders ##### -SupplierOrderClassifyBilledWithoutInvoice=Disallow the classification of a purchase order as billed without invoice. -SupplierOrderClassifyBilledWithoutInvoiceHelp=A supplier order can be classified as billed by default. If this conf is set to true, it will be not. +SupplierOrderClassifyBilledWithoutInvoice=Neatļaut pirkuma pasūtījuma klasificēšanu kā tādu, par kuru rēķins ir bez rēķina. +SupplierOrderClassifyBilledWithoutInvoiceHelp=Piegādātāja pasūtījumu pēc noklusējuma var klasificēt kā rēķinu. Ja šī konf. ir iestatīta uz patiesu, tā nebūs. ##### Proposals ##### PropalSetup=Commercial priekšlikumi modulis uzstādīšana ProposalsNumberingModules=Komerciālie priekšlikumu numerācijas modeļi ProposalsPDFModules=Komerciālie priekšlikumu dokumentu modeļi -SuggestedPaymentModesIfNotDefinedInProposal=Suggested payment mode by default if not defined on the proposal +SuggestedPaymentModesIfNotDefinedInProposal=Ieteicamais maksājuma veids pēc noklusējuma, ja priekšlikumā nav definēts FreeLegalTextOnProposal=Brīvais teksts komerciālajos priekšlikumos WatermarkOnDraftProposal=Ūdenszīme projektu komerciālo priekšlikumiem (nav ja tukšs) BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal @@ -1549,8 +1548,8 @@ MemberCodeChecker=Iespējas automātiskai dalībnieku kodu ģenerēšanai AdherentLoginRequired=Pārvaldiet katra dalībnieka pieteikumvārdu/paroli AdherentLoginRequiredDesc=Pievienojiet dalībnieka failam pieteikumvārda un paroles vērtību. Ja dalībnieks ir saistīts ar lietotāju, atjauninot dalībnieka pieteikumvārdu un paroli, tiks atjaunināts arī lietotāja pieteikumvārds un parole. AdherentMailRequired=Lai izveidotu jaunu dalībnieku, nepieciešams e-pasts -MemberSendInformationByMailByDefault=The checkbox to send an email confirmation to members (validation or new subscription) is on by default -MemberCreateAnExternalUserForSubscriptionValidated=Create automatically an external user (with a login to connect to the application) after an online payment of a membership subscription +MemberSendInformationByMailByDefault=Pēc noklusējuma ir ieslēgta izvēles rūtiņa, lai dalībniekiem nosūtītu apstiprinājumu e-pastā (validācija vai jauns abonements). +MemberCreateAnExternalUserForSubscriptionValidated=Pēc dalības abonementa tiešsaistes maksājuma automātiski izveidojiet ārēju lietotāju (ar pieteikšanos, lai izveidotu savienojumu ar lietojumprogrammu). VisitorCanChooseItsPaymentMode=Apmeklētājs var izvēlēties kādu no pieejamajiem maksāšanas veidiem MEMBER_REMINDER_EMAIL=Iespējot automātisku atgādinājumu pa e-pastu par beidzies abonementi. Piezīme. Modulim %s jābūt iespējotai un pareizi iestatītai, lai nosūtītu atgādinājumus. MembersDocModules=Dokumentu veidnes dokumentiem, kas ģenerēti no dalībnieku ieraksta @@ -1877,8 +1876,8 @@ AgendaSetup = Notikumi un kārtības modulis uzstādīšana AGENDA_DEFAULT_FILTER_TYPE = Šādu pasākumu automātiski iestatīt darba kārtības skatā meklēšanas filtūrā AGENDA_DEFAULT_FILTER_STATUS = Automātiski iestatīt šo statusu notikumu skatīšanai darba filtru meklēšanas filtūrā AGENDA_DEFAULT_VIEW = Kuru skatu vēlaties atvērt pēc noklusējuma, izvēloties izvēlni Agenda -AGENDA_EVENT_PAST_COLOR = Pagājušā pasākuma krāsa -AGENDA_EVENT_CURRENT_COLOR = Pašreizējā pasākuma krāsa +AGENDA_EVENT_PAST_COLOR = Pagājuša pasākuma krāsa +AGENDA_EVENT_CURRENT_COLOR = Pašreizēja pasākuma krāsa AGENDA_EVENT_FUTURE_COLOR = Nākotnes pasākuma krāsa AGENDA_REMINDER_BROWSER = Iespējojiet notikuma atgādinājumu lietotāja pārlūkprogrammā (Kad ir atgādinājuma datums, pārlūkprogramma parāda uznirstošo logu. Katrs lietotājs var atspējot šādus paziņojumus pārlūka paziņojumu iestatījumos). AGENDA_REMINDER_BROWSER_SOUND = Iespējot skaņas paziņojumu @@ -1995,10 +1994,10 @@ ExpenseReportsRulesSetup=Moduļa Expense Reports iestatīšana - noteikumi ExpenseReportNumberingModules=Izdevumu pārskatu numerācijas modulis NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. YouMayFindNotificationsFeaturesIntoModuleNotification=Varat atrast e-pasta paziņojumu iespējas, iespējot un konfigurējot moduli "Paziņošana". -TemplatesForNotifications=Emails templates for notifications +TemplatesForNotifications=Paziņojumu e-pasta veidnes ListOfNotificationsPerUser=Automātisko paziņojumu saraksts katram lietotājam* ListOfNotificationsPerUserOrContact=Iespējamo automātisko paziņojumu (par biznesa notikumu) saraksts, kas pieejams katram lietotājam* vai kontaktam** -ListOfFixedNotifications=Global recipients emails for automatic email notifications +ListOfFixedNotifications=Globālie adresātu e-pasta ziņojumi automātiskiem e-pasta paziņojumiem GoOntoUserCardToAddMore=Atveriet lietotāja cilni "Paziņojumi", lai pievienotu vai noņemtu paziņojumus lietotājiem GoOntoContactCardToAddMore=Lai pievienotu vai noņemtu kontaktpersonu / adrešu paziņojumus, dodieties uz trešās puses cilni “Paziņojumi” Threshold=Slieksnis @@ -2034,7 +2033,7 @@ MinimumNoticePeriod=Minimum notice period (Your leave request must be done befor NbAddedAutomatically=Number of days added to counters of users (automatically) each month EnterAnyCode=Šajā laukā ir norāde, lai identificētu līniju. Ievadiet jebkuru izvēlēto vērtību, bet bez īpašām rakstzīmēm. Enter0or1=Ievadiet 0 vai 1 -EnterYesOrNo=Enter Yes or No +EnterYesOrNo=Ievadiet Jā vai Nē UnicodeCurrency=Ievadiet šeit starp aplikācijām, baitu skaitļu sarakstu, kas attēlo valūtas simbolu. Piemēram: attiecībā uz $ ievadiet [36] - Brazīlijas reālajam R $ [82,36] - par € ievadiet [8364] ColorFormat=RGB krāsa ir HEX formātā, piemēram: FF0000 PictoHelp=Ikonas nosaukums šādā formātā:
    - image.png attēla failam pašreizējā motīva direktorijā
    - image.png@module ja fails atrodas moduļa direktorijā /img/
    - fa-xxx FontAwesome fa-xxx picto
    - fontawesome_xxx_fa_color_size FontAwesome fa-xxx attēlam (ar prefiksu, krāsu un izmēru komplektu) @@ -2128,7 +2127,7 @@ MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Kolonnas platums, ja līnijām ir pievienots a MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE=Slēpt vienības cenas kolonnu piedāvājuma pieprasījumos MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN=Slēpt kopējās cenas kolonnu piedāvājuma pieprasījumos MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE=Slēpt vienības cenas kolonnu pirkšanas pasūtījumos -MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN=Hide the total price column on purchase orders +MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN=Slēpt kopējās cenas kolonnu pirkšanas pasūtījumos MAIN_PDF_NO_SENDER_FRAME=Slēpt adresāta rāmja robežas MAIN_PDF_NO_RECIPENT_FRAME=Paslēpt adresāta adreses rāmja robežas MAIN_PDF_HIDE_CUSTOMER_CODE=Paslēpt klienta kodu @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filtrs, lai notīrītu vērtību (COMPANY_DI DuplicateForbidden=Dublikāts aizliegts RemoveSpecialWords=Izveidojot klientu vai piegādātāju apakškontus, notīriet noteiktus vārdus RemoveSpecialWordsHelp=Pirms klienta vai piegādātāja konta aprēķināšanas norādiet vārdus, kas jātīra. Lieto ";" starp katru vārdu -GDPRContact=Datu aizsardzības inspektors (DPO, datu konfidencialitāte vai GDPR kontakts) +GDPRContact=Datu aizsardzības speciālists (DPO, datu privātuma vai GDPR kontaktpersona, ...) GDPRContactDesc=Ja glabājat personas datus savā Informācijas sistēmā, šeit varat nosaukt kontaktpersonu, kas ir atbildīga par Vispārīgo datu aizsardzības regulu HelpOnTooltip=Palīdzības teksts tiek parādīts rīka padomā HelpOnTooltipDesc=Ievietojiet tekstu vai tulkošanas atslēgu šeit, lai teksts tiktu rādīts rīkā, kad šis lauks parādās formā @@ -2220,7 +2219,7 @@ CreateCandidature=Izveidot darba pieteikumu FormatZip=Pasta indekss MainMenuCode=Izvēlnes ievades kods (mainmenu) ECMAutoTree=Rādīt automātisko ECM koku -OperationParamDesc=Define the rules to use to extract some data or set values to use for operation.

    Example to extract a string from email header, subject or body into a temporary variable:
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Examples to set the properties of an object to create:
    objproperty1=SET:a hard coded value
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:a value (value is set only if property is not already defined)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a new line to extract or set several properties. +OperationParamDesc=Definējiet kārtulas, kas jāizmanto, lai izvilktu dažus darbības datus vai iestatītu vērtības.

    Piemērs virknes izvilkšanai no e-pasta. galvene, tēma vai pamatteksts pagaidu mainīgajā:
    tmp_var1=EXTRACT:HEADER:Mans regulārais izteiksme ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:Mans atsauce ([^\n]*)
    tmp_var3=EXTRACT:BODY:Mans regex ([^\n]*)

    Piemēri izveidojamā objekta rekvizītu iestatīšanai:
    objproperty1=SET: stingri kodēta vērtība
    objproperty2=SET:__tmp_var__
    objvalue:3=aIFEMP ir iestatīts tikai tad, ja rekvizīts vēl nav definēts)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My uzņēmuma nosaukums ir\\ s([^\\s]*)

    Izmantojiet jaunu rindiņu, lai izvilktu vai iestatītu vairākus rekvizītus. OpeningHours=Darba laiks OpeningHoursDesc=Ievadiet šeit sava uzņēmuma pastāvīgo darba laiku. ResourceSetup=Resursu moduļa konfigurēšana @@ -2266,7 +2265,7 @@ LargerThan=Lielāks nekā IfTrackingIDFoundEventWillBeLinked=Ņemiet vērā: ja e-pastā tiek atrasts objekta izsekošanas ID vai ja e-pasts ir atbilde uz e-pasta ziņojumu, kas jau ir savākts un saistīts ar objektu, izveidotais notikums tiks automātiski saistīts ar zināmo saistīto objektu. WithGMailYouCanCreateADedicatedPassword=Ja esat iespējojis 2 pakāpju validāciju, izmantojot Gmail kontu, ieteicams lietojumprogrammai izveidot īpašu otro paroli, nevis izmantot sava konta paroli vietnē https://myaccount.google.com/. EmailCollectorTargetDir=Var būt vēlama e-pasta pārvietošana uz citu tagu/direktoriju, kad tas tika veiksmīgi apstrādāts. Vienkārši iestatiet šeit direktorija nosaukumu, lai izmantotu šo funkciju (NELIETOJIET speciālās rakstzīmes nosaukumā). Ņemiet vērā, ka jums ir jāizmanto arī lasīšanas/rakstīšanas pieteikšanās konts. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing third party in your database (search will be done on the defined property among 'id','name','name_alias','email'). The found (or created) third party will be used for following actions that need it.
    For example, if you want to create a third party with a name extracted from a string 'Name: name to find' present into the body, use the sender email as email, you can set the parameter field like this:
    'email=EXTRACT:HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    +EmailCollectorLoadThirdPartyHelp=Varat izmantot šo darbību, lai izmantotu e-pasta saturu, lai atrastu un ielādētu esošu trešo pusi savā datu bāzē (meklēšana tiks veikta definētajā rekvizītā starp 'id', 'name', 'name_alias', 'email'). Atrastā (vai izveidotā) trešā puse tiks izmantota šādām darbībām, kurām tā ir nepieciešama.
    Piemēram, ja vēlaties izveidot trešo pusi ar nosaukumu, kas izvilkts no virknes " Nosaukums: meklējamais vārds' ir iekļauts pamattekstā, izmantojiet sūtītāja e-pasta adresi kā e-pastu, parametra lauku varat iestatīt šādi:
    'email=EXTRACT:HEADER:^No: (.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    FilterSearchImapHelp=Brīdinājums: daudzi e-pasta serveri (piemēram, Gmail), meklējot virknē, veic pilnu vārdu meklēšanu un neatgriezīs rezultātu, ja virkne tiks atrasta tikai daļēji. Arī šī iemesla dēļ speciālo rakstzīmju izmantošana meklēšanas kritērijos tiks ignorēta, ja tie nav daļa no esošajiem vārdiem.
    Lai veiktu vārda izslēgšanu (ja vārds tiks nosūtīts atpakaļ e-pastā nav atrasts), varat izmantot ! rakstzīme pirms vārda (var nedarboties dažos pasta serveros). EndPointFor=Beigu punkts %s: %s DeleteEmailCollector=Dzēst e-pasta kolekcionāru @@ -2274,14 +2273,14 @@ ConfirmDeleteEmailCollector=Vai tiešām vēlaties dzēst šo e-pasta kolekcion RecipientEmailsWillBeReplacedWithThisValue=Adresātu e-pasti vienmēr tiks aizstāti ar šo vērtību AtLeastOneDefaultBankAccountMandatory=Jādefinē vismaz 1 noklusējuma bankas konts RESTRICT_ON_IP=Atļaut API piekļuvi tikai noteiktiem klientu IP adresēm (aizstājējzīme nav atļauta, izmantojiet atstarpi starp vērtībām). Tukšs nozīmē, ka var piekļūt katrs klients. -StaticIPsOfUsers=If applicable, list of all static IPs of users +StaticIPsOfUsers=Ja piemērojams, visu statisko lietotāju IP saraksts IPListExample=127.0.0.1 192.168.0.2 [:: 1] BaseOnSabeDavVersion=Balstīts uz bibliotēkas SabreDAV versiju NotAPublicIp=Nav publiskā IP MakeAnonymousPing=Izveidojiet anonīmu Ping '+1' Dolibarr pamata serverim (to veic tikai vienu reizi pēc instalēšanas), lai fonds varētu uzskaitīt Dolibarr instalācijas skaitu. FeatureNotAvailableWithReceptionModule=Funkcija nav pieejama, ja ir iespējota moduļa uztveršana EmailTemplate=E-pasta veidne -EmailTemplateHelp=You can create emails templates from menu %s - %s +EmailTemplateHelp=E-pasta veidnes varat izveidot izvēlnē %s - %s EMailsWillHaveMessageID=E-pastiem būs galvene "Ziņojuma ID", kas atbilst šai sintaksei PDF_SHOW_PROJECT=Parādīt projektu dokumentā ShowProjectLabel=Projekta etiķete @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Trešās puses nosaukums — trešās puses aizstājvārds ALIAS_THIRDPARTY=Trešās puses aizstājvārds — trešās puses nosaukums PDFIn2Languages=Rādīt PDF faila iezīmes 2 dažādās valodās (šī funkcija var nedarboties dažās valodās) PDF_USE_ALSO_LANGUAGE_CODE=Ja vēlaties, lai daži PDF faili tiktu dublēti 2 dažādās valodās tajā pašā ģenerētajā PDF failā, jums šeit ir jāiestata šī otrā valoda, lai ģenerētais PDF saturētu vienā un tajā pašā lappusē 2 dažādas valodas, vienu izvēloties, ģenerējot PDF, un šo ( tikai dažas PDF veidnes to atbalsta). Vienā PDF formātā atstājiet tukšumu 1 valodā. -PDF_USE_A=Ģenerējiet PDF dokumentus PDF/A formātā, nevis noklusējuma formātā PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Šeit ievadiet FontAwesome ikonas kodu. Ja jūs nezināt, kas ir FontAwesome, varat izmantot vispārīgo vērtību fa-adrešu grāmata. RssNote=Piezīme. Katra RSS plūsmas definīcija nodrošina logrīku, kas jums jāiespējo, lai tas būtu pieejams informācijas panelī JumpToBoxes=Pāriet uz Iestatīšana -> logrīki @@ -2397,8 +2396,8 @@ INVOICE_ADD_EPC_QR_CODEMore=Šī funkcija ļauj rēķiniem pievienot vai noņemt INVOICE_ADD_EPC_QR_CODEPay=Skenējiet šo QR kodu, lai norēķinātos ar viedtālruni, kas atbalsta maksājumu ar EPC QR kodu. INVOICE_SHOW_SHIPPING_ADDRESS=Rādīt piegādes adresi INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligāta norāde dažās valstīs (Francijā, ...) -SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal -SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=By default the contact only appears for billing +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Rādīt norēķinu kontaktpersonu priekšlikumā +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=Pēc noklusējuma kontaktpersona tiek rādīta tikai norēķiniem UrlSocialNetworksDesc=Sociālā tīkla URL saite. Mainīgajai daļai, kas satur sociālā tīkla ID, izmantojiet {socialid}. IfThisCategoryIsChildOfAnother=Ja šī kategorija ir citas kategorijas bērns DarkThemeMode=Tumšā motīva režīms @@ -2432,7 +2431,7 @@ CssOnEdit=CSS rediģēšanas lapās CssOnView=CSS skata lapās CssOnList=CSS sarakstos HelpCssOnEditDesc=CSS, kas izmantots, rediģējot lauku.
    Piemērs: "minwiwdth100 maxwidth500 widthcentpercentminusx" -HelpCssOnViewDesc=The CSS used when viewing the field.
    Example: "longmessagecut" +HelpCssOnViewDesc=CSS, ko izmanto, skatot lauku.
    Piemērs: "longmessagecut" HelpCssOnListDesc=CSS, ko izmanto, ja lauks atrodas saraksta tabulā.
    Piemērs: "tdoverflowmax200" RECEPTION_PDF_HIDE_ORDERED=Slēpt pasūtīto daudzumu uz ģenerētajiem pieņemšanas dokumentiem MAIN_PDF_RECEPTION_DISPLAY_AMOUNT_HT=Parādiet cenu uz ģenerētajiem pieņemšanas dokumentiem @@ -2489,8 +2488,8 @@ ExportUseForceHelp=Piespiedu kārtā turpināt eksportēšanu pat tad, ja tiek a CustomPrompt=Pielāgotas uzvednes AiDescription=AI (mākslīgā intelekta) funkcijas AiDescriptionLong=Nodrošina AI (mākslīgā intelekta) funkcijas dažādās lietojumprogrammas daļās. Nepieciešama ārēja AI API. -AI_API_KEY=AI api atslēga -AI_API_URL=Endpoint URL for AI api +AI_API_KEY=AI api atslēga +AI_API_URL=AI API galapunkta URL AI_API_SERVICE=Pakalpojums, ko izmantot AI funkcijām AiSetup=AI moduļa iestatīšana AiCustomPrompt=AI pielāgota uzvedne @@ -2498,7 +2497,7 @@ AI_CONFIGURATIONS_PROMPT=Pielāgota uzvedne TextGeneration=Teksta ģenerēšana ImageGeneration=Attēlu ģenerēšana VideoGeneration=Video ģenerēšana -AudioGeneration=Audio generation +AudioGeneration=Audio ģenerēšana AIPromptForFeatures=AI pielāgotas funkcijas EnterAnIP=Ievadiet IP adresi ConvertInto=Pārvērst par @@ -2519,39 +2518,44 @@ SendToUrl=Sūtīt uz URL WebsiteTemplateWasCopied=Vietnes veidne(-es) "%s", ko nodrošina šis modulis, ir saglabātas vietņu veidņu direktorijā (/doctemplates/websites) un ir gatavas importēšanai kā jauna tīmeklī. vietne. EnabledByDefaultAtInstall=Pēc noklusējuma ir iespējots instalēšanas laikā VulnerableToRCEAttack=Jūs esat neaizsargāts pret RCE uzbrukumiem, izmantojot pielāgoto funkciju dol_json_decode -OpenIDconnectSetup=Configuration of the OpenID Connect module -MainAuthenticationOidcClientIdName=Client ID -MainAuthenticationOidcClientIdDesc=OpenID Connect Client ID -MainAuthenticationOidcClientSecretName=Client secret -MainAuthenticationOidcClientSecretDesc=OpenID Connect Client Secret -MainAuthenticationOidcScopesName=Scopes -MainAuthenticationOidcScopesDesc=OpenID scopes to allow access to user information -MainAuthenticationOidcAuthorizeUrlName=Authorize URL -MainAuthenticationOidcAuthorizeUrlDesc=(example: https://example.com/oauth2/authorize) -MainAuthenticationOidcTokenUrlName=Token URL -MainAuthenticationOidcTokenUrlDesc=(example: https://example.com/oauth2/token) -MainAuthenticationOidcUserinfoUrlName=User info URL -MainAuthenticationOidcUserinfoUrlDesc=(example: https://example.com/oauth2/userinfo) -MainAuthenticationOidcLogoutUrlName=Logout URL -MainAuthenticationOidcLogoutUrlDesc=(example: https://example.com/oauth2/logout) -MainAuthenticationOidcRedirectUrlName=Redirect URL -MainAuthenticationOidcRedirectUrlDesc=Redirect URL to authorize on the OpenID provider side -MainAuthenticationOidcLogoutRedirectUrlName=Dolibarr logout URL -MainAuthenticationOidcLogoutRedirectUrlDesc=Dolibarr logout URL to authorize on the OpenID provider side -MainAuthenticationOidcLoginClaimName=Login claim -MainAuthenticationOidcLoginClaimDesc=OpenID Connect claim matching the Dolibarr user login. If not set or empty, defaults to email -BlackListWords=Black list of words -AddBlackList=Add to black list -FediverseSetup=Configuration of fediverse section -ConfigImportSocialNetwork=Configuration of social networks compatible with Fediverse -Fediverse=Fediverse -NewSocialNetwork=New Fediverse social network -SocialNetworkUrl=Fediverse API URL -SocialNetworksNote=Each social network definition provides a widget that you must enable to have it available in dashboard -ConfirmDeleteSocialNetwork= Are you sure want to delete this record ? -AnOwnerMustBeSetIfEmailTemplateIsPrivate=An owner must be set if the email template is set as private -ContactsDefaultRoles=For third parties of the "individual" type, a contact can be created simultaneously. Define here the roles that will be systematically assigned to this contact. -MenuDict=Dictionary -AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token -ParamName=Name of parameter -ParamValue=Value of parameter +OpenIDconnectSetup=OpenID Connect moduļa konfigurācija +MainAuthenticationOidcClientIdName=Klienta ID +MainAuthenticationOidcClientIdDesc=OpenID Connect klienta ID +MainAuthenticationOidcClientSecretName=Klienta noslēpums +MainAuthenticationOidcClientSecretDesc=OpenID Connect klienta noslēpums +MainAuthenticationOidcScopesName=Darbības jomas +MainAuthenticationOidcScopesDesc=OpenID darbības jomas, lai nodrošinātu piekļuvi lietotāja informācijai +MainAuthenticationOidcAuthorizeUrlName=Autorizēt URL +MainAuthenticationOidcAuthorizeUrlDesc=(piemērs: https://example.com/oauth2/authorize) +MainAuthenticationOidcTokenUrlName=Token URL +MainAuthenticationOidcTokenUrlDesc=(piemērs: https://example.com/oauth2/token) +MainAuthenticationOidcUserinfoUrlName=Lietotāja informācijas URL +MainAuthenticationOidcUserinfoUrlDesc=(piemērs: https://example.com/oauth2/userinfo) +MainAuthenticationOidcLogoutUrlName=Atteikšanās URL +MainAuthenticationOidcLogoutUrlDesc=(piemērs: https://example.com/oauth2/logout) +MainAuthenticationOidcRedirectUrlName=Novirzīt URL +MainAuthenticationOidcRedirectUrlDesc=Novirzīt URL, lai autorizētu OpenID nodrošinātāja pusē +MainAuthenticationOidcLogoutRedirectUrlName=Dolibarr atteikšanās URL +MainAuthenticationOidcLogoutRedirectUrlDesc=Dolibarr atteikšanās URL, lai autorizētu OpenID nodrošinātāja pusē +MainAuthenticationOidcLoginClaimName=Pieteikšanās prasība +MainAuthenticationOidcLoginClaimDesc=OpenID Connect pretenzija, kas atbilst Dolibarr lietotāja pieteikuminformācijai. Ja tas nav iestatīts vai ir tukšs, pēc noklusējuma tiek rādīts e-pasts +BlackListWords=Melnais vārdu saraksts +AddBlackList=Pievienot melnajam sarakstam +FediverseSetup=Fediversās sadaļas konfigurācija +ConfigImportSocialNetwork=Ar Fediverse saderīgu sociālo tīklu konfigurācija +Fediverse=Fediverss +NewSocialNetwork=Jauns Fediverse sociālais tīkls +SocialNetworkUrl=Fediverse API URL +SocialNetworksNote=Katra sociālā tīkla definīcija nodrošina logrīku, kas ir jāiespējo, lai tas būtu pieejams informācijas panelī +ConfirmDeleteSocialNetwork= Vai tiešām vēlaties dzēst šo ierakstu? +AnOwnerMustBeSetIfEmailTemplateIsPrivate=Ja e-pasta veidne ir iestatīta kā privāta, ir jāiestata īpašnieks +ContactsDefaultRoles=Trešajām "individuālā" tipa personām kontaktu var izveidot vienlaikus. Šeit definējiet lomas, kas tiks sistemātiski piešķirtas šim kontaktam. +MenuDict=Vārdnīca +AddMoreParams=Pievienojiet papildu savienojuma parametrus (sīkfailus, pilnvaras, ...)
    Piemērs: marķieris : vērtības marķieris +ParamName=Parametra nosaukums +ParamValue=Parametra vērtība +ConfirmDeleteParamOfSocialNetwork=Vai tiešām vēlaties dzēst šo parametru? +HelpMariaDBToGetPossibleValues=Varat iegūt iespējamo vērtību sarakstu, izpildot šādu SQL komandu: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index fa462d1540f1b..f67f2b869e18b 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметрите мора да бидат ObjectName:Classpath
    Синтакса: ObjectName:Classpath ExtrafieldParamHelpSeparator=Чувајте го празно за едноставен сепаратор
    Поставете го ова на 1 за разделувач што се собира (отворен стандардно за нова сесија, а потоа статусот се задржува за секоја корисничка сесија)
    Поставете го ова на 2 за сепаратор што се собира (стандардно се собира за нова сесија, а потоа статусот се задржува за секоја корисничка сесија) LibraryToBuildPDF=Библиотека која се користи за генерирање PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Регекс филтер до чиста вред DuplicateForbidden=Забрането е дупликат RemoveSpecialWords=Исчистете одредени зборови кога генерирате под-сметки за клиенти или добавувачи RemoveSpecialWordsHelp=Наведете ги зборовите што треба да се исчистат пред да ја пресметате сметката на клиентот или добавувачот. Користи ";" помеѓу секој збор -GDPRContact=Службеник за заштита на податоци (DPO, приватност на податоци или контакт со GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ако складирате лични податоци во вашиот информативен систем, можете да го наведете контактот кој е одговорен за Општата регулатива за заштита на податоците овде HelpOnTooltip=Текст за помош за да се прикаже на советот за алатка HelpOnTooltipDesc=Ставете текст или клуч за превод овде за текстот да се прикаже во совет за алатка кога ова поле ќе се појави во форма @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Име на трета страна - алијас од тре ALIAS_THIRDPARTY=Алијас од трета страна - Име на трета страна PDFIn2Languages=Прикажи етикети во PDF на 2 различни јазици (оваа функција може да не работи на неколку јазици) PDF_USE_ALSO_LANGUAGE_CODE=Ако сакате да имате некои текстови во вашиот PDF дупликат на 2 различни јазици во истиот генериран PDF, мора да го поставите овде овој втор јазик така генериран PDF ќе содржи 2 различни јазици на истата страница, оној избран при генерирање PDF и овој ( само неколку PDF шаблони го поддржуваат ова). Чувајте празно за 1 јазик по PDF. -PDF_USE_A=Генерирајте PDF документи со формат PDF/A наместо стандарден формат PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Внесете го овде кодот на иконата FontAwesome. Ако не знаете што е FontAwesome, можете да ја користите генеричката вредност фа-адрес-книга. RssNote=Забелешка: Секоја дефиниција за RSS довод обезбедува графичка контрола што мора да ја овозможите за да ја имате достапна во контролната табла JumpToBoxes=Скокни до Поставување -> Додатоци @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 8bf1055ad30c8..9cef76a1fdcf8 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Liste over verdier må være linjer med formatet nøkk ExtrafieldParamHelpcheckbox=Liste over verdier må være linjer med formatet nøkkel,verdi (hvor nøkkelen ikke kan være '0')

    for eksempel:
    1,verdi1
    2,verdi2
    3,verdi3
    ... ExtrafieldParamHelpradio=Liste over verdier må være linjer med formatet nøkkel,verdi (hvor nøkkelen ikke kan være '0')

    for eksempel:
    1,verdi1
    2,verdi2
    3,verdi3
    ... ExtrafieldParamHelpsellist=Liste over verdier kommer fra en tabell
    Syntaks: table_name:label_field:id_field::filtersql
    Eksempel: c_idtypent:libelle: ::filtersql

    - id_field er nødvendigvis en primær int-nøkkel
    - filtersql er en betingelse. Den må bruke USF-syntaksen. Eksempel: (active:=:1) for å vise bare aktiv verdi
    Du kan også bruke $ID$ i filter som er gjeldende ID for gjeldende objekt
    Hvis du vil filtrere på ekstrafelt, bruk syntaks extra.fieldcode=... (der feltkode er koden til ekstrafelt)

    For å ha listen avhengig av en annen komplementær attributtliste:
    libellec:typent id:options_parent_list_code|parent_column:filter

    For å ha listen avhengig av en annen liste:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=Liste over verdier kommer fra en tabell
    Syntaks: table_name:label_field:id_field::filtersql
    Eksempel: c_idtypent:libelle: ::filtersql

    filter kan være en enkel test (f.eks. active=1 for å bar vise aktiv verdi)
    Du kan også bruke $ID$ i filter som er gjeldende ID for gjeldende objekt
    For å gjøre et SELECT i filter, bruk $SEL$
    hvis du vil filtrere på ekstrafelt, bruk syntaks extra.fieldcode=... (der feltkode er koden til extrafield)

    For å ha listen avhengig av en annen komplementær attributtliste:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    For å ha listen avhengig av en annen liste:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametere må være ObjectName:Classpath
    Syntaks: ObjectName:Classpath ExtrafieldParamHelpSeparator=Hold tomt for en enkel separator
    Sett dette til 1 for en kollaps-separator (åpnes som standard for ny økt, da beholdes status for hver brukerøkt)
    Sett dette til 2 for en kollaps-separator (kollapset som standard for ny økt, da holdes status foran hver brukerøkt) LibraryToBuildPDF=Bibliotek brukt for PDF-generering @@ -521,8 +520,8 @@ WarningPHPMailC=- Ved å bruke SMTP-serveren til din egen e-posttjenesteleverand WarningPHPMailD=Det anbefales derfor å endre sendemetoden for e-post til verdien "SMTP". WarningPHPMailDbis=Hvis du virkelig ønsker å beholde standard "PHP"-metoden for å sende e-poster, bare ignorer denne advarselen, eller fjern den ved å %sklikke her%s. WarningPHPMail2=Hvis din epost-SMTP-leverandør må begrense epostklienten til noen IP-adresser (svært sjelden), er dette IP-adressen til epost-brukeragenten (MUA) for ERP CRM-programmet: %s . -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. +WarningPHPMailSPF=Hvis domenenavnet i avsenderens epost-adresse er beskyttet av en SPF-post (spør domenenavnsregistratoren), må du legge til følgende IP-er eller oppføring i SPF-posten til DNS av domenet ditt: %s. +WarningPHPMailSPFDMARC=Hvis domenenavnet i epost-adressen til avsenderen din er beskyttet av en annen DMARC-post enn p=none (spør domenenavnsregistratoren), må du fjerne DMARC-posten din, eller angi p=none på samme måte som @gmail.com, eller bruk send med en annen metode. SPFAndDMARCInformation=SPF og DMARC DNS-post for epost hovedadresser ActualMailDNSRecordFound=Faktisk %s-post funnet (for epost %s) : %s ClickToShowDescription=Klikk for å vise beskrivelse @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-filter til ren verdi (COMPANY_DIGITARIA_CLEA DuplicateForbidden=Duplikat forbudt RemoveSpecialWords=Rengjør visse ord når du genererer underkontoer for kunder eller leverandører RemoveSpecialWordsHelp=Angi ordene som skal renses før du beregner kunde- eller leverandørkontoen. Bruk en ";" mellom hvert ord -GDPRContact=Databeskyttelsesansvarlig (DPO, Data Privacy eller GDPR kontakt) +GDPRContact=Databeskyttelsesansvarlig (DPO, personvern eller GDPR-kontakt, ...) GDPRContactDesc=Hvis du lagrer personopplysninger i ditt informasjonssystem, kan du navngi kontakten som er ansvarlig for GDPR her HelpOnTooltip=Hjelpetekst til å vise på verktøytips HelpOnTooltipDesc=Sett tekst eller en oversettelsesnøkkel her for at teksten skal vises i et verktøytips når dette feltet vises i et skjema @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Tredjeparts navn – Tredjeparts alias ALIAS_THIRDPARTY=Tredjeparts alias – Tredjeparts navn PDFIn2Languages=Vis etiketter i PDF-en på 2 forskjellige språk (denne funksjonen fungerer kanskje ikke for noen få språk) PDF_USE_ALSO_LANGUAGE_CODE=Hvis du vil at tekst i PDF-en din skal dupliseres på 2 forskjellige språk i samme genererte PDF, må du angi dette andre språket, slik at generert PDF vil inneholde 2 forskjellige språk på samme side, det som er valgt når du genererer PDF og dette ( bare få PDF-maler støtter dette). Hold tom for ett språk per PDF. -PDF_USE_A=Generer PDF-dokumenter med formatet PDF/A i stedet for standardformatet PDF +PDF_USE_A=PDF-dokumenter format FafaIconSocialNetworksDesc=Skriv inn koden til et FontAwesome-ikon. Hvis du ikke vet hva som er FontAwesome, kan du bruke den generelle verdien fa-adresseboken. RssNote=Merk: Hver definisjon av RSS-feed gir en widget som du må aktivere for å ha den tilgjengelig i dashbordet JumpToBoxes=Gå til Setup -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Ordbok AddMoreParams=Legg til flere parametere for tilkobling (informasjonskapsler, token, ...)
    Eksempel: token : tokenverdi ParamName=Navn på parameter ParamValue=Verdi på parameter +ConfirmDeleteParamOfSocialNetwork=Er du sikker på at du vil slette denne parameteren? +HelpMariaDBToGetPossibleValues=Du kan få en liste over mulige verdier ved å kjøre følgende SQL-kommando: %s +Captcha=Captcha +CaptchaDesc=Hvis du vil beskytte påloggingssiden din med en Captcha, kan du velge hvilken du skal bruke her +DolibarrStandardCaptcha=En captcha generert av Dolibarr diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 96fc8dd2cff29..959ce75b46b96 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Lijst met waarden moeten regels zijn met opmaaksleutel ExtrafieldParamHelpcheckbox=Lijst met waarden moeten regels zijn met opmaaksleutel, waarde (waar sleutel niet '0' kan zijn)

    bijvoorbeeld:
    1, waarde1
    2, value2
    3, waarde3
    ... ExtrafieldParamHelpradio=Lijst met waarden moeten regels zijn met opmaaksleutel, waarde (waar sleutel niet '0' kan zijn)

    bijvoorbeeld:
    1, waarde1
    2, value2
    3, waarde3
    ... ExtrafieldParamHelpsellist=Lijst met waarden komt uit een tabel
    Syntaxis: tabelnaam:labelveld:id_veld::filtersql
    Voorbeeld: c_typent:libelle:id::filtersql

    - id_veld is noodzakelijkerwijs een primaire int-sleutel
    - filtersql is een voorwaarde. Het moet de USF-syntaxis gebruiken. Voorbeeld: (active:=:1) om alleen de actieve waarde weer te geven
    U kunt ook $ID$ gebruiken in het filter, wat de huidige id is van het huidige object
    Als u wilt filteren op extravelden, gebruikt u de syntaxis extra.fieldcode=... (waarbij fieldcode de code is van het extraveld)

    In Bestelling om de lijst afhankelijk te maken van een andere aanvullende kenmerklijst:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In Bestelling om de lijst afhankelijk te maken van een andere lijst:
    c_typent:libelle:id:ouder_lijst_code|ouder_kolom:filter -ExtrafieldParamHelpchkbxlst=Lijst met waarden komt uit een tabel
    Syntaxis: tabelnaam:labelveld:id_veld::filtersql
    Voorbeeld: c_typent:libelle:id::filtersql

    filter kan een eenvoudige test zijn (bijv. active=1 om alleen de actieve waarde weer te geven)
    U kunt ook $ID$ gebruiken in filter, wat de huidige id is van het huidige object
    Om een SELECT in een filter uit te voeren, gebruikt u $SEL$
    als u wilt filteren op extravelden, gebruikt u de syntaxis extra.fieldcode=... (waarbij veldcode de code van het extraveld is)

    In Bestelling om de lijst afhankelijk te maken van een andere aanvullende kenmerklijst:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In Bestelling om de lijst afhankelijk te maken van een andere lijst:
    c_typent:libelle:id:parent_list_code|ouderkolom:filter ExtrafieldParamHelplink=Parameters moeten Objectnaam: Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Blijf leeg voor een eenvoudig scheidingsteken
    Stel dit in op 1 voor een samenvouwend scheidingsteken (standaard geopend voor nieuwe sessie, dan wordt de status behouden voor elke gebruikerssessie)
    Stel dit in op 2 voor een samenvouwend scheidingsteken (standaard samengevouwen voor nieuwe sessie, dan wordt de status behouden voor elke gebruikerssessie) LibraryToBuildPDF=Gebruikte library voor generen PDF @@ -514,17 +513,17 @@ ModuleCompanyCodeCustomerDigitaria=%s gevolgd door de ingekorte klantnaam door h ModuleCompanyCodeSupplierDigitaria=%s gevolgd door de ingekorte leveranciersnaam met het aantal tekens: %s voor de boekhoudcode van de leverancier. Use3StepsApproval=Bestellingen moeten standaard worden gemaakt en goedgekeurd door 2 verschillende gebruikers (één stap / gebruiker om te maken en één stap / gebruiker goed te keuren. Merk op dat als gebruiker zowel toestemming heeft om te maken en goed te keuren, één stap / gebruiker volstaat) . U kunt met deze optie vragen om een ​​derde stap / gebruikersgoedkeuring in te voeren, als het bedrag hoger is dan een speciale waarde (dus 3 stappen zijn nodig: 1 = validatie, 2 = eerste keer goedkeuren en 3 = tweede keer goedkeuren als het bedrag voldoende is).
    Stel deze optie in op leeg als één goedkeuring (2 stappen) voldoende is, stel deze in op een zeer lage waarde (0,1) als een tweede goedkeuring (3 stappen) altijd vereist is. UseDoubleApproval=Gebruik een goedkeuring in 3 stappen als het bedrag (zonder belasting) hoger is dan ... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=OPMERKING: De instelling om e-mails te verzenden vanuit de toepassing maakt gebruik van de standaard generieke instelling (genaamd "%s"). Voor deze keuze is geen technische kennis of specifieke instelling vereist.
    Het is echter vaak beter om uitgaande e-mails in te stellen op de andere methode (genaamd "%s") om de e-mailserver van uw e-mailprovider te gebruiken in plaats van de standaardinstelling om verschillende redenen: WarningPHPMailA=- Het gebruik van de server van de e-mailserviceprovider verhoogt de betrouwbaarheid van uw e-mail, waardoor de bezorgbaarheid toeneemt zonder dat deze als SPAM wordt gemarkeerd -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Als het domein van uw e-mail (het deel mymaildomain.com in myname@mymaildomain.com) wordt beschermd door een SPF + een DMARC-record, kan uw e-mail worden gemarkeerd als SPAM omdat uw DMARC-regel die is gedefinieerd in de DNS-zone van het domein van de afzender (mymaildomain.com) het verzenden als een generieke afzender niet toestaat. In een dergelijk geval moet u de DMARC voor het domein uitschakelen (of instellen op p=none zoals gedaan door @gmail.com) of, beter, als u de technische kennis hebt, de andere methode gebruiken om e-mails te verzenden met behulp van de SMTP-server van uw eigen e-mailprovider. WarningPHPMailC=- Het gebruik van de SMTP-server van uw eigen e-mailserviceprovider om e-mails te verzenden is ook interessant, dus alle e-mails die vanuit de toepassing worden verzonden, worden ook opgeslagen in uw "Verzonden" -map van uw mailbox. WarningPHPMailD=Het is daarom aan te raden om de verzendmethode van e-mails te wijzigen in de waarde "SMTP". WarningPHPMailDbis=Als u echt de standaard "PHP"-methode voor het verzenden van e-mails wilt behouden, negeert u deze waarschuwing of verwijdert u deze door %shier te klikken%s. WarningPHPMail2=Als uw e-mail SMTP-provider de e-mailclient moet beperken tot bepaalde IP-adressen (zeer zeldzaam), is dit het IP-adres van de mail user agent (MUA) voor uw ERP CRM-toepassing: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. -SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses -ActualMailDNSRecordFound=Actual %s record found (for email %s) : %s +WarningPHPMailSPF=Als de domeinnaam in uw afzender-e-mailadres wordt beschermd door een SPF-record (vraag dit na bij uw domeinnaamregistrar), moet u de volgende IP's of vermeldingen toevoegen aan het SPF-record van de DNS van uw domein: %s. +WarningPHPMailSPFDMARC=Als de domeinnaam in uw verzend-e-mailadres wordt beschermd door een DMARC-record dat anders is dan p=none (vraag dit na bij uw domeinnaamregistrar), moet u uw DMARC-record verwijderen of instellen op p=none (zoals do@gmail.com) of een andere verzendmethode gebruiken. +SPFAndDMARCInformation=SPF- en DMARC-DNS-record voor hoofd-e-mailadressen +ActualMailDNSRecordFound=Werkelijke %s-record gevonden (voor e-mail %s): %s ClickToShowDescription=Klik voor omschrijving DependsOn=Deze module heeft de module(s) nodig RequiredBy=Deze module is vereist bij module(s) @@ -869,7 +868,7 @@ Permission255=Wachtwoord andere gebruikers wijzigen Permission256=Andere gebruikers verwijderen of uitschakelen Permission262=Verleng de toegang tot alle derde partijen EN hun objecten (niet alleen derde partijen waarvoor de gebruiker als verkoopvertegenwoordiger is gekoppeld). Permission262b=Niet effectief voor externe gebruikers (altijd beperkt tot zichzelf voor voorstellen, bestellingen, Facturen, contracten, etc.). -Permission262c=Not effective for projects (only rules on project permissions, visibility and users assignment matter). +Permission262c=Niet effectief voor projecten (alleen regels over projectmachtigingen, zichtbaarheid en toewijzing van gebruikers zijn van belang). Permission263=Verleng de toegang tot alle derden ZONDER hun objecten (niet alleen derden waarvoor de gebruiker een verkoopvertegenwoordiger is).
    Niet effectief voor externe gebruikers (altijd beperkt tot zichzelf voor voorstellen, bestellingen, facturen, contracten, enz.).
    Niet effectief voor projecten (alleen regels voor projectmachtigingen, zichtbaarheid en toewijzingskwesties). Permission271=Lees CA Permission272=Facturen inzien @@ -946,7 +945,7 @@ Permission776=Betalen onkostennota's Permission777=Lees alle onkostennota's (zelfs die van ondergeschikten niet van gebruiker) Permission778=Aanmaken/wijzigen onkostendeclaraties van iedereen Permission779=Export onkostennota's -Permission1001=Read warehouses and stocks +Permission1001=Lees Warenhuizen en aandelen Permission1002=Toevoegen/wijzigen van een magazijn Permission1003=Verwijder magazijnen Permission1004=Bekijk voorraad-verplaatsingen @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-filter om waarde op te schonen (COMPANY_DIGI DuplicateForbidden=Dupliceren verboden RemoveSpecialWords=Reinig bepaalde woorden bij het genereren van subaccounts voor klanten of leveranciers RemoveSpecialWordsHelp=Geef de woorden op die moeten worden opgeschoond voordat de klant- of leveranciersrekening wordt berekend. Gebruik een ";" tussen elk woord -GDPRContact=Functionaris voor gegevensbescherming (DPO, gegevensprivacy of GDPR-contact) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Als u persoonsgegevens opslaat in uw Informatiesysteem, kunt u hier de contactpersoon noemen die verantwoordelijk is voor de Algemene Verordening Gegevensbescherming HelpOnTooltip=Help-tekst om op knopinfo weer te geven HelpOnTooltipDesc=Plaats hier tekst of een vertaalsleutel zodat de tekst in een knopinfo kan worden weergegeven wanneer dit veld in een formulier wordt weergegeven @@ -2220,7 +2219,7 @@ CreateCandidature=Maak een sollicitatie FormatZip=Zip MainMenuCode=Menu toegangscode (hoofdmenu) ECMAutoTree=Toon automatische ECM-structuur -OperationParamDesc=Define the rules to use to extract some data or set values to use for operation.

    Example to extract a string from email header, subject or body into a temporary variable:
    tmp_var1=EXTRACT:HEADER:My regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:My refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:My regex ([^\n]*)

    Examples to set the properties of an object to create:
    objproperty1=SET:a hard coded value
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:a value (value is set only if property is not already defined)
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a new line to extract or set several properties. +OperationParamDesc=Definieer de regels die moeten worden gebruikt om bepaalde gegevens te extraheren of stel waarden in die moeten worden gebruikt voor de bewerking.

    Voorbeeld om een tekenreeks uit de koptekst, het onderwerp of de hoofdtekst van een e-mail te extraheren naar een tijdelijke variabele:
    tmp_var1=EXTRACT:HEADER:Mijn regex ([^\n]*)
    tmp_var2=EXTRACT:SUBJECT:Mijn refex ([^\n]*)
    tmp_var3=EXTRACT:BODY:Mijn regex ([^\n]*)

    Voorbeelden om de eigenschappen van een object in te stellen dat moet worden gemaakt:
    objproperty1=SET:een hard gecodeerde waarde
    objproperty2=SET:__tmp_var__
    objproperty3=SETIFEMPTY:een waarde (waarde wordt alleen ingesteld als de eigenschap nog niet is gedefinieerd)
    objproperty4=EXTRACT:HEADER:X-Mijnheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:Mijn bedrijf naam is\\s([^\\s]*)

    Gebruik een nieuwe regel om meerdere eigenschappen te extraheren of in te stellen. OpeningHours=Openingstijden OpeningHoursDesc=Voer hier de reguliere openingstijden van uw bedrijf in. ResourceSetup=Configuratie van bronmodule @@ -2266,7 +2265,7 @@ LargerThan=Groter dan IfTrackingIDFoundEventWillBeLinked=Houd er rekening mee dat als een tracking-ID van een object in een e-mail wordt gevonden, of als de e-mail een antwoord is op een e-mail die al is verzameld en aan een object is gekoppeld, de gemaakte gebeurtenis automatisch wordt gekoppeld aan het bekende gerelateerde object. WithGMailYouCanCreateADedicatedPassword=Als u met een Gmail-account de validatie in twee stappen heeft ingeschakeld, wordt het aanbevolen om een speciaal tweede wachtwoord voor de applicatie te maken in plaats van uw eigen accountwachtwoord van https://myaccount.google.com/ te gebruiken. EmailCollectorTargetDir=Het kan wenselijk zijn om de e-mail naar een andere Label/map te verplaatsen nadat deze met succes is verwerkt. Stel hier gewoon de naam van de map in om deze functie te gebruiken (gebruik GEEN speciale tekens in de naam). Houd er rekening mee dat u ook een lees-/schrijfaanmeldingsaccount moet gebruiken. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing third party in your database (search will be done on the defined property among 'id','name','name_alias','email'). The found (or created) third party will be used for following actions that need it.
    For example, if you want to create a third party with a name extracted from a string 'Name: name to find' present into the body, use the sender email as email, you can set the parameter field like this:
    'email=EXTRACT:HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    +EmailCollectorLoadThirdPartyHelp=Met deze actie kunt u de e-mailinhoud gebruiken om een bestaande derde partij in uw database te vinden en te laden (er wordt gezocht op de gedefinieerde eigenschap 'id','name','name_alias','email'). De gevonden (of gemaakte) derde partij wordt gebruikt voor de volgende acties waarvoor deze nodig is.
    Als u bijvoorbeeld een derde partij wilt maken met een naam die is geëxtraheerd uit een tekenreeks 'Naam: te vinden naam' in de hoofdtekst, gebruikt u het e-mailadres van de afzender als e-mail. U kunt het parameterveld als volgt instellen:
    'email=EXTRACT:HEADER:^From:(.*);name=EXTRACT:BODY:Name:\\s([^\\s]*);client=SET:2;'
    FilterSearchImapHelp=Waarschuwing: veel e-mailservers (zoals Gmail) zoeken op volledige woorden wanneer ze zoeken op een tekenreeks en zullen geen resultaat retourneren als de tekenreeks slechts gedeeltelijk in een woord wordt gevonden. Ook om deze reden wordt het gebruik van speciale tekens in een zoekcriterium genegeerd als ze geen deel uitmaken van bestaande woorden.
    Om een zoekopdracht uit te sluiten op een woord (retourneer een e-mail als het woord niet wordt gevonden), kunt u de ! teken voor het woord (werkt mogelijk niet op sommige mailservers). EndPointFor=Eindpunt voor %s: %s DeleteEmailCollector=E-mailverzamelaar verwijderen @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Naam van derden: alias van derden ALIAS_THIRDPARTY=Alias van derden: naam van derden PDFIn2Languages=Toon labels in de PDF in 2 verschillende talen (deze functie werkt mogelijk niet voor sommige talen) PDF_USE_ALSO_LANGUAGE_CODE=Als u wilt dat sommige teksten in uw PDF worden gedupliceerd in 2 verschillende talen in dezelfde gegenereerde PDF, moet u hier deze tweede taal instellen, zodat de gegenereerde PDF 2 verschillende talen op dezelfde pagina bevat, degene die is gekozen bij het genereren van PDF en deze ( slechts enkele PDF-sjablonen ondersteunen dit). Voor 1 taal per pdf leeg houden. -PDF_USE_A=Genereer PDF-documenten met het formaat PDF/A in plaats van het standaardformaat PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Voer hier de code van een FontAwesome-pictogram in. Als je niet weet wat FontAwesome is, kun je het generieke waarde fa-adresboek gebruiken. RssNote=Opmerking: elke RSS-feeddefinitie biedt een widget die u moet inschakelen om deze beschikbaar te hebben in het dashboard JumpToBoxes=Ga naar Setup -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Woordenboek AddMoreParams=Voeg meer parameters toe voor de verbinding (cookies, tokens, ...)
    Voorbeeld: token : waarde token ParamName=Naam van parameter ParamValue=Waarde van parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=U kunt een lijst met mogelijke waarden verkrijgen door de volgende SQL-opdracht uit te voeren: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index 6d71c0ae379e9..c7601810e89cb 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Lista wartości musi być liniami z kluczem formatu, w ExtrafieldParamHelpcheckbox=Lista wartości musi być liniami z kluczem formatu, wartością (gdzie klucz nie może mieć wartości '0')

    na przykład:
    1, wartość1
    2, wartość2
    3, wartość3 ... ExtrafieldParamHelpradio=Lista wartości musi być liniami z kluczem formatu, wartością (gdzie klucz nie może mieć wartości '0')

    na przykład:
    1, wartość1
    2, wartość2
    3, wartość3 ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametry muszą być parametrami ObjectName: Classpath
    Składnia: ObjectName: Classpath ExtrafieldParamHelpSeparator=Pozostaw puste dla prostego separatora
    Ustaw na 1 dla zwijanego separatora (domyślnie otwarty dla nowej sesji, a następnie status jest zachowany dla każdej sesji użytkownika)
    Ustaw na 2 dla zwijanego separatora (domyślnie zwinięty dla nowej sesji, a następnie status jest zachowywany przed każdą sesją użytkownika) LibraryToBuildPDF=Biblioteka używana do generowania plików PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtr Regex do czyszczenia wartości (COMPANY_DIGI DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Wyczyść określone słowa podczas generowania subkont dla klientów lub dostawców RemoveSpecialWordsHelp=Określ słowa, które mają zostać oczyszczone przed obliczeniem konta klienta lub dostawcy. Użyć ";" pomiędzy każdym słowem -GDPRContact=Inspektor ochrony danych osobowych (kontakt do spraw ochrony danych lub RODO) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Jeśli przechowujesz dane osobowe w swoim Systemie Informatycznym, możesz tutaj wskazać osobę kontaktową odpowiedzialną za Ogólne rozporządzenie o ochronie danych HelpOnTooltip=Tekst pomocy do wyświetlenia w podpowiedzi HelpOnTooltipDesc=Umieść tutaj tekst lub klucz do tłumaczenia, aby tekst był wyświetlany w etykiecie narzędzia, gdy to pole pojawi się w formularzu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nazwa strony trzeciej — alias strony trzeciej ALIAS_THIRDPARTY=Alias strony trzeciej — nazwa strony trzeciej PDFIn2Languages=Pokaż etykiety w pliku PDF w 2 różnych językach (ta funkcja może nie działać w przypadku niektórych języków) PDF_USE_ALSO_LANGUAGE_CODE=Jeśli chcesz, aby niektóre teksty w pliku PDF zostały skopiowane w 2 różnych językach w tym samym wygenerowanym pliku PDF, musisz ustawić tutaj ten drugi język, aby wygenerowany plik PDF zawierał 2 różne języki na tej samej stronie, ten wybrany podczas generowania pliku PDF i ten ( tylko kilka szablonów PDF to obsługuje). Pozostaw puste dla 1 języka na plik PDF. -PDF_USE_A=Generuj dokumenty PDF w formacie PDF/A zamiast w domyślnym formacie PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Wpisz tutaj kod ikony FontAwesome. Jeśli nie wiesz, co to jest FontAwesome, możesz użyć ogólnej wartości fa-address-book. RssNote=Uwaga: każda definicja źródła danych RSS zawiera widżet, który należy włączyć, aby był dostępny na pulpicie nawigacyjnym JumpToBoxes=Przejdź do Ustawienia -> Widżety @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 94041091622f5..4058e9baf0cf8 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Lista de valores devem ser linhas com chave de formato ExtrafieldParamHelpcheckbox=A lista de valores deve ser composta por linhas com chave de formato, valor (onde a chave não pode ser '0')

    por exemplo:
    1, valor1
    2, valor2
    19bz3, valor3 ExtrafieldParamHelpradio=A lista de valores deve ser composta por linhas com chave de formato, valor (onde a chave não pode ser '0')

    por exemplo:
    1, valor1
    2, valor2
    19bz3, valor3 ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Os parâmetros devem ser ObjectName:Classpath
    Sintaxe: ObjectName:Classpath ExtrafieldParamHelpSeparator=Mantenha vazio para um separador simples
    Defina como 1 para um separador recolhível (abrir por padrão para uma nova sessão, então o status é mantido para cada sessão utilizador)
    Defina como 2 para um separador recolhido (recolhido por padrão para uma nova sessão, então o status é mantido antes de cada sessão utilizador) LibraryToBuildPDF=Biblioteca utilizada para gerar PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtro Regex para limpar valor (COMPANY_DIGITARIA_ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Limpe certas palavras ao gerar subcontas para clientes ou fornecedores RemoveSpecialWordsHelp=Especifique as palavras a serem limpas antes de calcular o cliente ou fornecedor conta. Use um ";" entre cada palavra -GDPRContact=Responsável pela proteção de dados (DPO, Privacidade de dados ou contato GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Caso guarde dados pessoais no seu Sistema de Informação, poderá indicar aqui o contacto responsável pelo Regulamento Geral de Proteção de Dados HelpOnTooltip=Texto de ajuda para mostrar na dica de ferramenta HelpOnTooltipDesc=Coloque aqui o texto ou uma chave de tradução para que o texto seja exibido em uma dica de ferramenta quando este campo aparecer em um formulário @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Nome de terceiro – alias de terceiro ALIAS_THIRDPARTY=Alias de terceiros – Nome de terceiros PDFIn2Languages=Mostrar rótulos no PDF em 2 idiomas diferentes (esse recurso pode não funcionar em alguns idiomas) PDF_USE_ALSO_LANGUAGE_CODE=Se você deseja que alguns textos do seu PDF sejam duplicados em 2 idiomas diferentes no mesmo PDF gerado, você deve definir aqui este segundo idioma para que o PDF gerado contenha 2 idiomas diferentes na mesma página, aquele escolhido na geração do PDF e este (apenas alguns modelos de PDF suportam isso). Mantenha em branco para 1 idioma por PDF. -PDF_USE_A=Gere documentos PDF com formato PDF/A em vez do formato padrão PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Insira aqui o Código de um ícone FontAwesome. Se você não sabe o que é FontAwesome, pode usar o valor genérico fa-address-book. RssNote=Observação: cada definição de feed RSS fornece um Widget que você deve ativar para disponibilizá-lo em painel JumpToBoxes=Vá para Configuração -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 7aef030dd9203..057e585336c9d 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Lista de valori trebuie să fie linii cu formatul chei ExtrafieldParamHelpcheckbox=Lista de valori trebuie să fie linii cu formatul cheie,valoare (unde cheia nu poate fi "0")

    de exemplu:
    1,valoare1
    2,valoare2
    3,valoare3
    ... ExtrafieldParamHelpradio=Lista de valori trebuie să fie linii cu formatul cheie,valoare (unde cheia nu poate fi '0')

    de exemplu:
    1,valoare1
    2,valoare2
    3,valoare3
    ... ExtrafieldParamHelpsellist=Lista de valori provine dintr-un tabel
    Sintaxă: table_name:label_field:id_field::filtersql
    Exemplu: c_typent:libelle:id::filtersql

    - id_field este neapărat o cheie int primară
    - filtersql este o condiție. Trebuie să folosească sintaxa USF. Exemplu: (activ:=:1) pentru a afișa numai valoarea activă.
    De asemenea, poți utiliza $ID$ în filtru, care este id-ul curent al obiectului.
    Dacă vrei să filtrezi pe extracâmpuri, utilizează sintaxa extra.fieldcode=... (unde fieldcode este codul extracâmpului)

    Pentru ca lista să depindă de un alt atribut listă:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    Pentru ca lista să depindă de altă listă:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=Lista de valori provine dintr-o tabelă
    Sintaxă: table_name:label_field:id_field::filtersql
    Exemplu: c_typent:libelle:id::filtersql

    filter poate fi un test simplu (de exemplu, activ=1 pentru a afișa numai valoarea activă)
    De asemenea, poți utiliza $ID$ în filtru care este id-ul curent al obiectului curent
    Pentru a face un SELECT în filtru, utilizează $SEL$
    dacă vrei să filtrezi pe extracâmpuri, utilizează sintaxa extra.fieldcode=... (unde codul câmpului este codul extracâmpului)

    Pentru a avea lista în funcție de pe o altă listă de atribute complementare:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    Pentru ca lista să depindă de altă listă:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrii trebuie să fie ObjectName:Classpath
    Sintaxă: ObjectName: Classpath ExtrafieldParamHelpSeparator=Păstrați liber pentru un separator simplu
    Setați acest lucru la 1 pentru un separator care se prăbușește (deschis în mod implicit pentru o nouă sesiune, apoi starea este păstrată pentru fiecare sesiune de utilizator)
    Setați acest lucru la 2 pentru un separator care se prăbușește (se prăbușește implicit pentru o nouă sesiune, apoi starea este păstrată pentru fiecare sesiune a utilizatorului) LibraryToBuildPDF=Bibliotecă utilizată pentru generarea PDF-urilor @@ -514,16 +513,16 @@ ModuleCompanyCodeCustomerDigitaria=%s urmat de numele clientului trunchiat la nu ModuleCompanyCodeSupplierDigitaria=%s urmată de numele furnizorului trunchiat la numărul de caractere: %s pentru codul contabil al furnizorului. Use3StepsApproval=În mod implicit, comenzile de achiziţie trebuie să fie create și aprobate de 2 utilizatori diferiți (un pas/utilizator de creat și un pas/utilizator de aprobat. Rețineți că, dacă utilizatorul are atât permisiunea de a crea și de a aproba, va fi suficient un pas/un utilizator). Puteți solicita această opțiune pentru a introduce un al treilea pas/aprobare pentru utilizatori, dacă suma este mai mare decât o valoare dedicată (astfel încât vor fi necesari 3 pași: 1 = validare, 2 = prima aprobare și 3 = o a doua aprobare dacă suma este suficientă).
    Setați acest lucru la gol, dacă este suficientă o aprobare (2 pași), setați-o la o valoare foarte mică (0,1) dacă este întotdeauna necesară o a doua aprobare (3 pași). UseDoubleApproval=Utilizați o aprobare în 3 pași atunci când suma (fără taxă) este mai mare decât... -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=NOTĂ: Configurarea pentru a trimite email-uri din aplicație utilizează configurația generică implicită (numită "%s"). Această alegere nu necesită cunoștințe tehnice și nicio configurare specială.
    Cu toate acestea, este adesea mai bine să configurezi email-urile trimise pentru a utiliza cealaltă metodă (numită "%s") pentru a utiliza server-ul de email al furnizorului tău, în loc de configurarea implicită, din mai multe motive. : WarningPHPMailA=- Utilizarea serverului Furnizorului de servicii de email crește încrederea în emailul tău, astfel încât crește capacitatea de livrare fără a fi semnalat ca SPAM -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- Dacă domeniul tău de email (partea mymaildomain.com în myname@mymaildomain.com) este protejat de un SPF + o înregistrare DMARC, email-ul tău poate fi marcat ca SPAM deoarece regula dvs. DMARC este definită în zona DNS a domeniului expeditor (mymaildomain.com) nu permite trimiterea ca expeditor generic. Într-un astfel de caz, trebuie să dezactivezi DMARC pentru domeniu (sau să îl setezi la p=none așa cum a făcut @gmail.com) sau, mai bine, dacă ai cunoștințe tehnice, utilizează cealaltă metodă pentru a trimite email-uri folosind server-ul SMTP propriu de la furnizor. WarningPHPMailC=- Utilizând serverul SMTP al furnizorului de servicii email pentru a trimite email-uri este, de asemenea, interesantă, astfel încât toate email-urile trimise din aplicație vor fi, de asemenea, salvate în directorul "Trimise" al cutiei poștale. WarningPHPMailD=Prin urmare, este recomandat să schimbi metoda de trimitere a email-urilor la valoarea "SMTP". WarningPHPMailDbis=Dacă vrei cu adevărat să păstrezi metoda implicită "PHP" pentru a trimite email-uri, ignoră acest avertisment sau elimină-l făcând %sclic aici%s. WarningPHPMail2=Dacă furnizorul dvs. de e-mail SMTP trebuie să restricționeze clientul de email la unele adrese IP (foarte rar), aceasta este adresa IP a agentului utilizator de email (MUA) pentru aplicația ERP CRM: %s. -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. -SPFAndDMARCInformation=SPF and DMARC DNS record for main email addresses +WarningPHPMailSPF=Dacă numele de domeniu din adresa ta de email expeditorului este protejat de o înregistrare SPF (adresează-te registratorului numelui de domeniu), trebuie să adaugi următoarele IP-uri sau înregistrarea SPF DNS pentru tău. %s. +WarningPHPMailSPFDMARC=Dacă numele de domeniu din adresa ta de email de expeditor este protejat de o înregistrare DMARC diferită de p=none (întreabă-l pe registarul numelui de domeniu), trebuie să elimini înregistrarea DMARC sau să o setezi la p=none, cum ar fi @gmail.com) sau folosește trimiterea printr-o altă metodă. +SPFAndDMARCInformation=Înregistrare DNS SPF și DMARC pentru adresele de email principale ActualMailDNSRecordFound=Înregistrarea SPF reală %s găsită (pentru email %s): %s ClickToShowDescription=Faceți clic pentru a afișa descrierea DependsOn=Acest modul are nevoie de modulul(lele) @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Flitru Regex pentru curăţarea valorii (COMPANY_D DuplicateForbidden=Duplicare interzisă RemoveSpecialWords=Curățare anumite cuvinte atunci când se generează sub-conturi pentru clienți sau furnizori RemoveSpecialWordsHelp=Specifică cuvintele de curățat înainte de a calcula contul de client sau furnizor. Folosește ";" între cuvinte -GDPRContact=Responsabilul cu protecția datelor (DPO, confidențialitatea datelor sau contact GDPR ) +GDPRContact=Responsabil cu protecția datelor (DPO, Data Privacy sau contact GDPR, ...)  GDPRContactDesc=Dacă stochezi date cu caracter personal în Sistemul tău informațional, poți specifica aici persoana de contact care este responsabilă pentru GDPR HelpOnTooltip=Text de ajutor care să apară pe butonul de sugestii HelpOnTooltipDesc=Puneți un text sau o cheie de traducere aici pentru ca textul să apară într-o sugestie atunci când acest câmp apare într-un formular @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Denumire terț - Alias terț ALIAS_THIRDPARTY=Alias terț - Denumire terț PDFIn2Languages=Afișare etichete în PDF în 2 limbi diferite (este posibil ca această funcție să nu funcționeze pentru anumite limbi)  PDF_USE_ALSO_LANGUAGE_CODE=Dacă doriți să aveți unele texte duplicate în PDF-ul în 2 limbi diferite în același PDF generat, trebuie să setați aici această a doua limbă, astfel încât PDF-ul generat va conține 2 limbi diferite în aceeași pagină, cea aleasă la generarea PDF-ului și aceasta ( doar câteva șabloane PDF acceptă acest lucru). Păstrați gol pentru 1 limbă pentru fiecare PDF. -PDF_USE_A=Generare documente PDF cu formatul PDF/A în loc de formatul implicit PDF +PDF_USE_A=Format documente PDF FafaIconSocialNetworksDesc=Introduceți aici codul unei pictograme FontAwesome. Dacă nu știți ce este FontAwesome, puteți utiliza valoarea generică fa-address-book. RssNote=Notă: Fiecare definiție de flux RSS oferă un widget pe care trebuie să îl activați pentru a-l avea disponibil în tabloul de bord JumpToBoxes=Mergi la Setări -> Widget-uri @@ -2555,3 +2554,8 @@ MenuDict=Dicționar AddMoreParams=Adăugare mai mulți parametri pentru conexiune (cookie-uri, jetoane, ...)
    Exemplu: token : valoare token ParamName=Nume parametru ParamValue=Valoare parametru +ConfirmDeleteParamOfSocialNetwork=Ești sigur că vrei să ștergi acest parametru? +HelpMariaDBToGetPossibleValues=Poți obține o listă de valori posibile rulând următoarea comandă SQL: %s +Captcha=Captcha +CaptchaDesc=Dacă vrei să-ți protejezi pagina de autentificare cu un cod Captcha, poți alege pe cel care să-l utilizezi aici +DolibarrStandardCaptcha=Un captcha nativ generat de Dolibarr diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 9e0707fd35c81..3d9bd9d8e2ea4 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Список значений должен быть с ExtrafieldParamHelpcheckbox=Список значений должен быть строками с форматом: ключ, значение (где ключ не может быть равен 0)

    например:
    1, значение1
    2, значение2
    3, значение3
    ... ExtrafieldParamHelpradio=Список значений должен быть строками с форматом: ключ, значение (где ключ не может быть равен 0)

    например:
    1, значение1
    2, значение2
    3, значение3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметры должны быть ObjectName:Classpath
    Синтаксис: ObjectName:Classpath ExtrafieldParamHelpSeparator=Оставить пустым для простого разделителя
    Установите для этого разделителя значение 1 (по умолчанию открыто для нового сеанса, затем статус сохраняется для каждого сеанса пользователя)
    Установите значение 2 для сжимающегося разделителя (по умолчанию свернуто для нового сеанса, затем статус сохраняется для каждой пользовательской сессии) LibraryToBuildPDF=Библиотека используемая для создания PDF-файлов @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Фильтр регулярных выражени DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Удалите определенные слова при создании субаккаунтов для клиенты или Поставщики RemoveSpecialWordsHelp=Укажите слова, которые необходимо очистить перед расчетом учетной записи клиент или поставщик. Использовать ";" между каждым словом -GDPRContact=Сотрудник по защите данных (контактное лицо DPO, Data Privacy или GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Если вы храните личные данные в своей информационной системе, здесь вы можете указать контактное лицо, ответственное за Общее положение о защите данных. HelpOnTooltip=Текст справки для отображения во всплывающей подсказке HelpOnTooltipDesc=Поместите здесь текст или ключ перевода, чтобы текст отображался во всплывающей подсказке, когда это поле появляется в форме @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Стороннее имя – сторонний псевдо ALIAS_THIRDPARTY=Сторонний псевдоним – стороннее имя. PDFIn2Languages=Метки Показать в PDF-файле на двух разных языках (этот особенность может не работать для некоторых языков) PDF_USE_ALSO_LANGUAGE_CODE=Если вы хотите, чтобы некоторые тексты в вашем PDF-файле были продублированы на 2 разных языках в одном сгенерированном PDF-файле, вы должны установить здесь этот второй язык, чтобы сгенерированный PDF-файл содержал 2 разных языка на одной странице: один, выбранный при создании PDF, и этот ( только несколько шаблонов PDF поддерживают это). Оставьте пустым для 1 языка в PDF-файле. -PDF_USE_A=Создавайте PDF-документы в формате PDF/A вместо по умолчанию формата PDF. +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Введите здесь код значка FontAwesome. Если вы не знаете, что такое FontAwesome, вы можете использовать общее значение fa-address-book. RssNote=Примечание. Каждое определение RSS-канала предоставляет виджет, который необходимо включить, чтобы он был доступен на панели управления. JumpToBoxes=Перейти к настройке -> Виджеты @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index c429806c41f07..5dc606e01b948 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametre musia byť ObjectName:Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Ponechajte prázdne pre jednoduchý oddeľovač
    Nastavte toto na 1 pre zbalený oddeľovač (predvolene otvorený pre novú reláciu, potom sa stav zachová pre každú reláciu používateľa)
    Nastavte toto na 2 pre zbalený oddeľovač (predvolene zbalený pre novú reláciu, potom sa stav zachová pre každú reláciu používateľa) LibraryToBuildPDF=Knižnica používaná pre generovanie PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filter regulárneho výrazu na vyčistenie hodnoty DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Pri vytváraní podúčtov pre zákazníkov alebo dodávateľov očistite určité slová RemoveSpecialWordsHelp=Pred výpočtom účtu zákazníka alebo dodávateľa zadajte slová, ktoré sa majú vyčistiť. Použite znak ";" medzi každým slovom -GDPRContact=Poverenec pre ochranu údajov (DPO, kontakt na ochranu osobných údajov alebo GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ak vo svojom Informačnom systéme uchovávate osobné údaje, môžete tu uviesť kontakt, ktorý je zodpovedný za všeobecné nariadenie o ochrane údajov HelpOnTooltip=Text pomocníka, ktorý sa zobrazí v popise HelpOnTooltipDesc=Sem vložte text alebo kľúč prekladu, aby sa text zobrazil v popise, keď sa toto pole objaví vo formulári @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Názov tretej strany – Alias tretej strany ALIAS_THIRDPARTY=Alias tretej strany – názov tretej strany PDFIn2Languages=Zobraziť štítky v PDF v 2 rôznych jazykoch (táto funkcia nemusí fungovať v niektorých jazykoch) PDF_USE_ALSO_LANGUAGE_CODE=Ak chcete, aby boli niektoré texty vo vašom PDF duplikované v 2 rôznych jazykoch v rovnakom vygenerovanom PDF, musíte tu nastaviť tento druhý jazyk, aby vygenerovaný PDF obsahoval 2 rôzne jazyky na tej istej stránke, jeden zvolený pri generovaní PDF a tento ( podporuje to iba niekoľko šablón PDF). Ponechajte prázdne pre 1 jazyk na PDF. -PDF_USE_A=Generujte dokumenty PDF vo formáte PDF/A namiesto predvoleného formátu PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Tu zadajte kód ikony FontAwesome. Ak neviete, čo je FontAwesome, môžete použiť generickú hodnotu fa-address-book. RssNote=Poznámka: Každá definícia informačného kanála RSS obsahuje miniaplikáciu, ktorú musíte povoliť, aby bola dostupná na informačnom paneli JumpToBoxes=Prejdite na Nastavenie -> Widgety @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 35d630dca5b51..61dc3b2a39705 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=Seznam vrednosti mora biti vrstic z obliko ključ,vrednost (kjer ključ ne sme biti '0')

    na primer:
    1,vrednost1
    2,vrednost2
    3,vrednost3 a0342fccfda19b ExtrafieldParamHelpradio=Seznam vrednosti mora biti vrstic z obliko ključ,vrednost (kjer ključ ne sme biti '0')

    na primer:
    1,vrednost1
    2,vrednost2
    3,vrednost3 a0342fccfda19b ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametri morajo biti ObjectName:Classpath
    Sintaksa: ObjectName:Classpath ExtrafieldParamHelpSeparator=Naj ostane prazno za preprosto ločilo
    Nastavite to na 1 za strnjeno ločilo (privzeto odprto za novo sejo, nato se status ohrani za vsako uporabniško sejo)
    Nastavite to na 2 za strnjeno ločilo (privzeto strnjeno za novo sejo, nato status se hrani za vsako uporabniško sejo) LibraryToBuildPDF=Knjižnica, ki se uporablja za ustvarjanje PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filter regularnih izrazov za čiščenje vrednosti DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Očistite določene besede pri ustvarjanju podračunov za stranke ali dobavitelje RemoveSpecialWordsHelp=Določite besede, ki jih je treba očistiti, preden izračunate račun stranke ali dobavitelja. Uporabi ";" med vsako besedo -GDPRContact=Pooblaščenec za varstvo podatkov (DPO, kontakt za zasebnost podatkov ali GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Če v svojem Informacijskem sistemu shranjujete osebne podatke, lahko tukaj navedete kontakt, ki je odgovoren za Splošno uredbo o varstvu podatkov HelpOnTooltip=Besedilo pomoči za prikaz v opisu orodja HelpOnTooltipDesc=Tukaj vnesite besedilo ali ključ za prevod, da se besedilo prikaže v opisu orodja, ko se to polje prikaže v obrazcu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Ime tretje osebe - vzdevek tretje osebe ALIAS_THIRDPARTY=Vzdevek tretje osebe – ime tretje osebe PDFIn2Languages=Pokaži oznake v PDF-ju v dveh različnih jezikih (ta funkcija morda ne bo delovala v nekaterih jezikih) PDF_USE_ALSO_LANGUAGE_CODE=Če želite imeti nekatera besedila v vašem PDF-ju podvojena v 2 različnih jezikih v istem ustvarjenem PDF-ju, morate tukaj nastaviti ta drugi jezik, tako da bo ustvarjeni PDF vseboval 2 različna jezika na isti strani, tistega, izbranega pri ustvarjanju PDF-ja, in tega ( to podpira le nekaj predlog PDF). Pustite prazno za 1 jezik na PDF. -PDF_USE_A=Ustvarite dokumente PDF s formatom PDF/A namesto s privzetim formatom PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Tukaj vnesite kodo ikone FontAwesome. Če ne veste, kaj je FontAwesome, lahko uporabite generično vrednost fa-adress-book. RssNote=Opomba: vsaka definicija vira RSS ponuja gradnik, ki ga morate omogočiti, da bo na voljo na nadzorni plošči JumpToBoxes=Pojdite na Nastavitve -> Pripomočki @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index a23bff05ac503..3973a8884f121 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=List of values must be lines with format key,value (wh ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrat duhet të jenë ObjectName:Classpath
    Sintaksa: ObjectName:Classpath ExtrafieldParamHelpSeparator=Mbajeni bosh për një ndarës të thjeshtë
    Vendoseni këtë në 1 për një ndarës në kolaps (i hapur si parazgjedhje për sesionin e ri, më pas statusi mbahet për çdo sesion përdoruesi)
    Cakto këtë në 2 për një ndarës në kolaps (i palosur si parazgjedhje për sesionin e ri, më pas statusi mbahet për çdo sesion përdoruesi) LibraryToBuildPDF=Biblioteka e përdorur për gjenerimin e PDF-ve @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Filtri Regex në vlerë të pastër (COMPANY_DIGIT DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Pastroni fjalë të caktuara kur krijoni nën-llogari për klientët ose furnitorët RemoveSpecialWordsHelp=Specifikoni fjalët që duhen pastruar përpara se të llogaritni llogarinë e klientit ose furnizuesit. Perdor nje ";" mes çdo fjale -GDPRContact=Oficeri i Mbrojtjes së të Dhënave (DPO, Privatësia e të Dhënave ose kontakti GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Nëse ruani të dhëna personale në Sistemin tuaj të Informacionit, mund të emërtoni kontaktin që është përgjegjës për Rregulloren e Përgjithshme të Mbrojtjes së të Dhënave këtu HelpOnTooltip=Teksti i ndihmës për t'u shfaqur në këshillën e veglave HelpOnTooltipDesc=Vendosni tekstin ose një çelës përkthimi këtu që teksti të shfaqet në një këshillë mjeti kur kjo fushë shfaqet në një formë @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Emri i palës së tretë - pseudonimi i palës së tretë ALIAS_THIRDPARTY=Pseudonimi i palës së tretë - Emri i palës së tretë PDFIn2Languages=Shfaq etiketat në PDF në 2 gjuhë të ndryshme (ky funksion mund të mos funksionojë për disa gjuhë) PDF_USE_ALSO_LANGUAGE_CODE=Nëse dëshironi që disa tekste në PDF-në tuaj të dublikuara në 2 gjuhë të ndryshme në të njëjtin PDF të gjeneruar, duhet të vendosni këtu këtë gjuhë të dytë të krijuar në këtë mënyrë PDF-ja do të përmbajë 2 gjuhë të ndryshme në të njëjtën faqe, atë të zgjedhur gjatë krijimit të PDF-së dhe këtë ( vetëm disa shabllone PDF e mbështesin këtë). Mbajeni bosh për 1 gjuhë për PDF. -PDF_USE_A=Gjeneroni dokumente PDF me formatin PDF/A në vend të formatit të paracaktuar PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Futni këtu kodin e një ikone FontAwesome. Nëse nuk e dini se çfarë është FontAwesome, mund të përdorni vlerën e përgjithshme fa-address-book. RssNote=Shënim: Çdo përkufizim i furnizimit RSS ofron një miniaplikacion që duhet ta aktivizoni për ta pasur të disponueshëm në panelin e kontrollit JumpToBoxes=Shko te Konfigurimi -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index 3749e27cff3af..de6373e2f4232 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Lista över värden måste vara rader med formatet nyc ExtrafieldParamHelpcheckbox=Lista över värden måste vara rader med formatet nyckel,värde (där nyckel inte kan vara '0')

    till exempel:
    1,värde1
    2,värde2
    3,värde3
    ... ExtrafieldParamHelpradio=Lista över värden måste vara rader med formatet nyckel,värde (där nyckel inte kan vara '0')

    till exempel:
    1,värde1
    2,värde2
    3,värde3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrar måste vara ObjectName:Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Håll tomt för en enkel separator
    Ange detta till 1 för en kollapsande separator (öppnas som standard för en ny session, sedan behålls status för varje användarsession)
    Ange detta till 2 för en kollapsande separator (kollapsad som standard för ny session, sedan status hålls för varje användarsession) LibraryToBuildPDF=Bibliotek som används för PDF-generering @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex-filter för att rensa värdet (COMPANY_DIGIT DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Ta bort vissa ord när du skapar underkonton för kunder eller leverantörer RemoveSpecialWordsHelp=Ange orden som ska tas bort innan du beräknar kund- eller leverantörskontot. Använd ett ; mellan varje ord -GDPRContact=Dataskyddsansvarig (DPO, Data Privacy eller GDPR-kontakt) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Om du lagrar personuppgifter i ditt informationssystem kan du här nämna den kontakt som är ansvarig för den allmänna dataskyddsförordningen HelpOnTooltip=Hjälptext att visa i verktygstips HelpOnTooltipDesc=Lägg text eller en översättning här för att texten ska visas i ett verktygstips när detta fält visas i ett formulär @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Tredjepartsnamn - Tredjepartsalias ALIAS_THIRDPARTY=Tredje parts alias - Tredje parts namn PDFIn2Languages=Visa etiketter i PDF-filen på 2 olika språk (den här funktionen kanske inte fungerar för ett par språk) PDF_USE_ALSO_LANGUAGE_CODE=Om du vill att några texter i din PDF ska dupliceras på två olika språk i samma genererade PDF, måste du ställa in det här andra språket så att genererad PDF kommer att innehålla 2 olika språk på samma sida, det som du valt när du skapar PDF och det här ( endast få PDF-mallar stöder detta). Håll tomt för 1 språk per PDF. -PDF_USE_A=Generera PDF-dokument med formatet PDF/A istället för standardformatet PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Ange här koden för en FontAwesome-ikon. Om du inte vet vad som är FontAwesome kan du använda det allmänna värdet fa-adressbok. RssNote=Obs! Varje RSS-feeddefinition ger en widget som du måste aktivera för att ha den tillgänglig i instrumentpanelen JumpToBoxes=Hoppa till Setup -> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index 49a00e0db63e2..2c41f1f6f80df 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Orodha ya thamani lazima iwe mistari yenye ufunguo wa ExtrafieldParamHelpcheckbox=Orodha ya thamani lazima iwe mistari yenye ufunguo wa umbizo, thamani (ambapo ufunguo hauwezi kuwa '0')

    kwa mfano:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=Orodha ya thamani lazima iwe mistari yenye ufunguo wa umbizo, thamani (ambapo ufunguo hauwezi kuwa '0')

    kwa mfano:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Vigezo lazima ziwe ObjectName:Classpath
    Sintaksia: Jina la Kitu: Njia ya darasa ExtrafieldParamHelpSeparator=Weka tupu kwa kitenganishi rahisi
    Weka hii iwe 1 kwa kitenganishi kinachokunjwa (hufunguliwa kwa chaguomsingi kwa kipindi kipya, kisha hali huwekwa kwa kila kipindi cha mtumiaji)
    Weka hii kuwa 2 kwa kitenganishi kinachoporomoka (kilichoporomoka kwa chaguo-msingi kwa kipindi kipya, kisha hali inawekwa mbele ya kila kipindi cha mtumiaji) LibraryToBuildPDF=Maktaba inayotumika kutengeneza PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Kichujio cha Regex ili kusafisha thamani (COMPANY_ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Safisha maneno fulani unapotengeneza akaunti ndogo za wateja au wasambazaji RemoveSpecialWordsHelp=Bainisha maneno yatakayosafishwa kabla ya kukokotoa akaunti ya mteja au mgavi. Tumia ";" kati ya kila neno -GDPRContact=Afisa wa Ulinzi wa Data (DPO, Faragha ya Data au mawasiliano ya GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Ukihifadhi data ya kibinafsi katika Mfumo wako wa Taarifa, unaweza kumtaja mwasiliani ambaye anawajibika kwa Udhibiti wa Jumla wa Ulinzi wa Data hapa HelpOnTooltip=Nakala ya usaidizi ionekane kwenye kidokezo HelpOnTooltipDesc=Weka maandishi au ufunguo wa kutafsiri hapa ili maandishi yaonekane kwenye kidokezo cha zana wakati sehemu hii inaonekana katika fomu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Third-party name - Third-party alias ALIAS_THIRDPARTY=Third-party alias - Third-party name PDFIn2Languages=Onyesha lebo katika PDF katika lugha 2 tofauti (kipengele hiki kinaweza kisifanye kazi kwa baadhi ya lugha kadhaa) PDF_USE_ALSO_LANGUAGE_CODE=Iwapo ungependa kuwa na baadhi ya maandishi katika PDF yako yaliyonakiliwa katika lugha 2 tofauti katika PDF iliyozalishwa sawa, lazima uweke hapa lugha hii ya pili ili PDF itakayozalishwa iwe na lugha 2 tofauti katika ukurasa mmoja, ile iliyochaguliwa wakati wa kutengeneza PDF na hii (violezo vichache tu vya PDF vinavyounga mkono hili). Weka tupu kwa lugha 1 kwa kila PDF. -PDF_USE_A=Generate PDF documents with format PDF/A instead of default format PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Ingiza hapa msimbo wa ikoni ya FontAwesome. Ikiwa hujui ni nini FontAwesome, unaweza kutumia fa-address-book ya thamani ya jumla. RssNote=Kumbuka: Kila ufafanuzi wa mipasho ya RSS hutoa wijeti ambayo ni lazima uwashe ili ipatikane kwenye dashibodi JumpToBoxes=Rukia kwa Kuweka -> Wijeti @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ta_IN/admin.lang b/htdocs/langs/ta_IN/admin.lang index ebbc77e631523..8647715b238e1 100644 --- a/htdocs/langs/ta_IN/admin.lang +++ b/htdocs/langs/ta_IN/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=மதிப்புகள் பட்டியல ExtrafieldParamHelpcheckbox=மதிப்புகளின் பட்டியல் வடிவமைப்பு விசை, மதிப்பு (விசை '0' ஆக இருக்க முடியாது) கொண்ட கோடுகளாக இருக்க வேண்டும். ExtrafieldParamHelpradio=மதிப்புகளின் பட்டியல் வடிவமைப்பு விசை, மதிப்பு (விசை '0' ஆக இருக்க முடியாது) கொண்ட கோடுகளாக இருக்க வேண்டும். ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=அளவுருக்கள் கண்டிப்பாக ObjectName:Classpath
    தொடரியல்: ObjectName:Classpath ExtrafieldParamHelpSeparator=ஒரு எளிய பிரிப்பானுக்காக காலியாக இருங்கள்
    சரிந்து வரும் பிரிப்பானுக்கு இதை 1 ஆக அமைக்கவும் (புதிய அமர்வுக்கு இயல்புநிலையாகத் திறக்கவும், பின்னர் ஒவ்வொரு பயனர் அமர்வுக்கும் நிலை வைக்கப்படும்)
    ஒரு சரியும் பிரிப்பானுக்கு இதை 2 ஆக அமைக்கவும் (புதிய அமர்வுக்கு இயல்புநிலையாகச் சுருக்கப்பட்டது. ஒவ்வொரு பயனர் அமர்வுக்கும் நிலை வைக்கப்படும்) LibraryToBuildPDF=நூலகம் PDF உருவாக்கப் பயன்படுகிறது @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=ரீஜெக்ஸ் ஃபில்டர் DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Clean certain words when generating sub-accounts for customers or suppliers RemoveSpecialWordsHelp=Specify the words to be cleaned before calculating the customer or supplier account. Use a ";" between each word -GDPRContact=தரவு பாதுகாப்பு அதிகாரி (DPO, தரவு தனியுரிமை அல்லது GDPR தொடர்பு) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=If you store personal data in your Information System, you can name the contact who is responsible for the General Data Protection Regulation here HelpOnTooltip=உதவிக்குறிப்பில் உரையைக் காட்ட உதவும் HelpOnTooltipDesc=இந்தப் புலம் படிவத்தில் தோன்றும் போது, டூல்டிப்பில் உரையைக் காட்ட, உரை அல்லது மொழிபெயர்ப்பு விசையை இங்கே வைக்கவும் @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Third-party name - Third-party alias ALIAS_THIRDPARTY=Third-party alias - Third-party name PDFIn2Languages=Show labels in the PDF in 2 different languages (this feature may not work for some couple of languages) PDF_USE_ALSO_LANGUAGE_CODE=உங்கள் PDF இல் உள்ள சில உரைகளை ஒரே மாதிரியான PDF இல் 2 வெவ்வேறு மொழிகளில் நகல் எடுக்க விரும்பினால், நீங்கள் இந்த இரண்டாவது மொழியை இங்கே அமைக்க வேண்டும், எனவே உருவாக்கப்பட்ட PDF ஆனது ஒரே பக்கத்தில் 2 வெவ்வேறு மொழிகளைக் கொண்டிருக்கும், PDF ஐ உருவாக்கும் போது தேர்ந்தெடுக்கப்பட்ட மொழி மற்றும் இது ( சில PDF வார்ப்புருக்கள் மட்டுமே இதை ஆதரிக்கின்றன). ஒரு PDFக்கு 1 மொழிக்கு காலியாக இருங்கள். -PDF_USE_A=Generate PDF documents with format PDF/A instead of default format PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=FontAwesome ஐகானின் குறியீட்டை இங்கே உள்ளிடவும். FontAwesome என்றால் என்னவென்று உங்களுக்குத் தெரியாவிட்டால், FA-address-book என்ற பொதுவான மதிப்பைப் பயன்படுத்தலாம். RssNote=குறிப்பு: ஒவ்வொரு RSS ஊட்ட வரையறையும் ஒரு விட்ஜெட்டை வழங்குகிறது, அதை நீங்கள் டாஷ்போர்டில் கிடைக்கச் செய்ய வேண்டும் JumpToBoxes=அமைவு -> விட்ஜெட்டுகளுக்கு செல்லவும் @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/tg_TJ/admin.lang b/htdocs/langs/tg_TJ/admin.lang index e3a2d724d6cde..79453eb810fe8 100644 --- a/htdocs/langs/tg_TJ/admin.lang +++ b/htdocs/langs/tg_TJ/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Рӯйхати арзишҳо бояд сатрҳо б ExtrafieldParamHelpcheckbox=Рӯйхати арзишҳо бояд сатрҳо бо калиди формат бошад, ки арзиш (дар он калид '0' буда наметавонад)

    масалан:
    1, value1
    2, value2 a0342fccfda3b33 ExtrafieldParamHelpradio=Рӯйхати арзишҳо бояд сатрҳо бо калиди формат бошад, ки арзиш (дар он калид '0' буда наметавонад)

    масалан:
    1, value1
    2, value2 a0342fccfda3b33 ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметрҳо бояд ObjectName бошанд: Classpath
    Синтаксис: ObjectName: Classpath ExtrafieldParamHelpSeparator=Барои ҷудосози оддӣ холӣ нигоҳ доред
    Инро барои ҷудосози фурӯпошанда ба 1 таъин кунед (бо нобаёнӣ барои сессияи нав кушода мешавад, пас мақом барои ҳар як сеанси корбар нигоҳ дошта мешавад)
    Инро барои ҷудосози фурӯпошанда ба 2 муқаррар кунед (бо нобаёнӣ барои ҷаласаи нав, мақом пеш аз ҳар як ҷаласаи корбар нигоҳ дошта мешавад) LibraryToBuildPDF=Китобхона барои насли PDF истифода мешавад @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Филтри Regex ба арзиши тоза (COM DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Ҳангоми тавлиди зерҳисобҳо барои муштариён ё таъминкунандагон калимаҳои муайянро тоза кунед RemoveSpecialWordsHelp=Пеш аз ҳисоб кардани ҳисоби муштарӣ ё молрасон калимаҳоеро, ки бояд тоза карда шаванд, муайян кунед. Истифодаи ";" байни ҳар як калима -GDPRContact=Корманди ҳифзи маълумот (DPO, Privacy Data or GDPR тамос) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Агар шумо маълумоти шахсиро дар Системаи иттилоотии худ нигоҳ доред, шумо метавонед дар ин ҷо алоқаеро номбар кунед, ки барои Қоидаҳои умумии ҳифзи маълумот масъул аст HelpOnTooltip=Матни кӯмак барои нишон додан дар лавҳаи асбобҳо HelpOnTooltipDesc=Матн ё калиди тарҷумаро дар ин ҷо гузоред, то матн дар лавҳаи асбобҳо нишон дода шавад, вақте ки ин майдон дар шакл пайдо мешавад @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Номи тарафи сеюм - тахаллуси тараф ALIAS_THIRDPARTY=Номи шахси сеюм - Номи тарафи сеюм PDFIn2Languages=Нишон додани тамғакоғазҳо дар PDF бо 2 забони гуногун (ин хусусият метавонад барои баъзе забонҳо кор накунад) PDF_USE_ALSO_LANGUAGE_CODE=Агар шумо хоҳед, ки баъзе матнҳо дар PDF -и худ бо 2 забони гуногун дар як PDF -и тавлидшуда такрор карда шаванд, шумо бояд ин забони дуввумро муқаррар кунед, то PDF -и тавлидшуда дар як саҳифа 2 забони гуногунро дар бар гирад, ки ҳангоми тавлиди PDF интихоб шудааст ва ин ( Танҳо чанд қолаби PDF инро дастгирӣ мекунанд). Барои 1 забон барои як PDF холӣ бошед. -PDF_USE_A=Ҳуҷҷатҳои PDF-ро бо формати PDF/A ба ҷои формати пешфарз PDF эҷод кунед +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Дар ин ҷо рамзи тасвири FontAwesomeро ворид кунед. Агар шумо намедонед, ки FontAwesome чист, шумо метавонед арзиши умумии fa-address-book -ро истифода баред. RssNote=Эзоҳ: Ҳар як таърифи хати RSS виҷетеро пешкаш мекунад, ки шумо бояд онро дар панели идоракунӣ дастрас кунед JumpToBoxes=Гузаштан ба Танзимот -> Виджетҳо @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index 01dad9301c436..1ae2f55e46f94 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=รายการค่าต้องเป็นบ ExtrafieldParamHelpcheckbox=รายการค่าต้องเป็นบรรทัดที่มีรูปแบบคีย์ ค่า (โดยที่คีย์ไม่สามารถเป็น '0')

    เป็นต้น :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=รายการค่าต้องเป็นบรรทัดที่มีรูปแบบคีย์ ค่า (โดยที่คีย์ไม่สามารถเป็น '0')

    เป็นต้น :
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=พารามิเตอร์ต้องเป็น ObjectName:Classpath
    ไวยากรณ์: ObjectName:Classpath ExtrafieldParamHelpSeparator=เว้นว่างไว้สำหรับตัวคั่นแบบง่าย
    ตั้งค่านี้เป็น 1 สำหรับตัวคั่นแบบยุบ (เปิดโดยค่าเริ่มต้นสำหรับเซสชันใหม่ จากนั้นสถานะจะถูกเก็บไว้สำหรับเซสชันผู้ใช้แต่ละเซสชัน)
    ตั้งค่านี้เป็น 2 สำหรับตัวแยกการยุบ (ยุบโดยค่าเริ่มต้นสำหรับเซสชันใหม่ จากนั้นสถานะจะถูกเก็บไว้ก่อนแต่ละเซสชันของผู้ใช้) LibraryToBuildPDF=ไลบรารีที่ใช้สำหรับการสร้าง PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=ตัวกรอง Regex เพื่อล้ DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=ทำความสะอาดคำบางคำเมื่อสร้างบัญชีย่อยสำหรับลูกค้าหรือซัพพลายเออร์ RemoveSpecialWordsHelp=ระบุคำที่ต้องการล้างก่อนคำนวณบัญชีลูกค้าหรือซัพพลายเออร์ ใช้ ";" ระหว่างแต่ละคำ -GDPRContact=เจ้าหน้าที่คุ้มครองข้อมูล (DPO, ความเป็นส่วนตัวของข้อมูล หรือการติดต่อ GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=หากคุณจัดเก็บข้อมูลส่วนบุคคลไว้ในระบบข้อมูลของคุณ คุณสามารถตั้งชื่อผู้ติดต่อที่รับผิดชอบตามกฎการคุ้มครองข้อมูลทั่วไปได้ที่นี่ HelpOnTooltip=ข้อความช่วยเหลือที่จะแสดงบนคำแนะนำเครื่องมือ HelpOnTooltipDesc=ใส่ข้อความหรือคีย์การแปลที่นี่เพื่อให้ข้อความแสดงในคำแนะนำเครื่องมือเมื่อฟิลด์นี้ปรากฏในแบบฟอร์ม @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=ชื่อบุคคลที่สาม - นามแฝ ALIAS_THIRDPARTY=นามแฝงบุคคลที่สาม - ชื่อบุคคลที่สาม PDFIn2Languages=แสดงป้ายกำกับในรูปแบบ PDF ใน 2 ภาษาที่แตกต่างกัน (ฟีเจอร์นี้อาจใช้ไม่ได้กับบางภาษา) PDF_USE_ALSO_LANGUAGE_CODE=หากคุณต้องการให้ข้อความบางส่วนใน PDF ของคุณซ้ำกันใน 2 ภาษาที่แตกต่างกันใน PDF ที่สร้างขึ้นเดียวกัน คุณต้องตั้งค่าภาษาที่สองนี้ที่นี่ ดังนั้น PDF ที่สร้างขึ้นจะมี 2 ภาษาที่แตกต่างกันในหน้าเดียวกัน ภาษาที่เลือกเมื่อสร้าง PDF และภาษานี้ ( มีเทมเพลต PDF เพียงไม่กี่แบบเท่านั้นที่รองรับสิ่งนี้) เว้นว่างไว้ 1 ภาษาต่อ PDF -PDF_USE_A=สร้างเอกสาร PDF ด้วยรูปแบบ PDF/A แทนรูปแบบ PDF เริ่มต้น +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=ป้อนรหัสของไอคอน FontAwesome ที่นี่ หากคุณไม่รู้ว่า FontAwesome คืออะไร คุณสามารถใช้ค่า fa-address-book ทั่วไปได้ RssNote=หมายเหตุ: ข้อกำหนดฟีด RSS แต่ละรายการมีวิดเจ็ตที่คุณต้องเปิดใช้งานเพื่อให้พร้อมใช้งานในแดชบอร์ด JumpToBoxes=ข้ามไปที่การตั้งค่า -> วิดเจ็ต @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index fe92239e0cf51..bbaf58885192e 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -459,7 +459,7 @@ ExtrafieldSelectList=Tablodan seç ExtrafieldSeparator=Ayırıcı (bir alan değil) ExtrafieldPassword=Parola ExtrafieldRadio=Radio buttons (1 choice only) -ExtrafieldCheckBox=Select list (n choices) +ExtrafieldCheckBox=Seçim listesi (seçeneklerde) ExtrafieldCheckBoxFromList=Select from table (n choices) ExtrafieldLink=Bir nesneye bağlantı ExtrafieldPointGeo=Geometrik Nokta @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Değerlerin listesi, biçim anahtarı ve değeri olan ExtrafieldParamHelpcheckbox=Değerler listesi, biçim anahtarı ve değeri olan satırlar olmalıdır (burada anahtar '0' olamaz)

    örneğin:
    1, değer1
    2,değer2
    3,değer3
    ... ExtrafieldParamHelpradio=Değerler listesi, biçim anahtarı ve değeri olan satırlar olmalıdır (burada anahtar '0' olamaz)

    örneğin:
    1,değer1
    2,değer2
    3,değer3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametreler NesneAdı olmalıdır: Sınıfyolu
    Sözdizimi:NesneAdı:Sınıfyolu ObjectName:Classpath ExtrafieldParamHelpSeparator=Basit bir ayırıcı için boş tut
    Daraltılan ayırıcı için bunu 1 olarak ayarlayın (yeni oturum için varsayılan olarak açılır, ardından her kullanıcı oturumu için durum tutulur)
    Daraltılan ayırıcı için bunu 2 olarak ayarlayın (varsayılan olarak daraltıldı yeni oturum, ardından durum her kullanıcı oturumu için tutulur) LibraryToBuildPDF=PDF oluşturmada kullanılan kütüphane @@ -2034,7 +2033,7 @@ MinimumNoticePeriod=Enaz bildirim süresi (İzin isteğiniz bu süreden önce ya NbAddedAutomatically=Her ay (otomatik olarak) bu kullanıcının sayacına eklenen gün sayısı EnterAnyCode=Bu alan, çizgiyi tanımlamak için bir referans içerir. Seçtiğiniz herhangi bir değeri, ancak özel karakterler olmadan girin. Enter0or1=0 veya 1 girin -EnterYesOrNo=Enter Yes or No +EnterYesOrNo=Evet veya Hayır girin UnicodeCurrency=Buraya parantezlerin arasına para birimi sembolünü temsil eden bayt numaralarının listesini girin. Örneğin: $ için [36] girin - Türk Lirası TL [84,76] - € için [8364] girin ColorFormat=RGB rengi HEX formatındadır, örn: FF0000 PictoHelp=Şu biçimde simge adı:
    - geçerli tema dizinindeki bir resim dosyası için image.png
    - image.png@module dosya bir modülün /img/ dizinindeyse
    - FontAwesome fa-xxx picto için fa-xxx
    - FontAwesome fa-xxx resmi için fontawesome_xxx_fa_color_size (ön ek, renk ve boyut ayarlı) @@ -2128,7 +2127,7 @@ MAIN_DOCUMENTS_WITH_PICTURE_WIDTH=Satırlara resim eklenmesi halinde sütunun ge MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_UNIT_PRICE=Teklif taleplerinde birim fiyat sütununu gizle MAIN_GENERATE_DOCUMENTS_SUPPLIER_PROPOSAL_WITHOUT_TOTAL_COLUMN=Teklif taleplerinde toplam fiyat sütununu gizle MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_UNIT_PRICE=Satınalma siparişlerinde birim fiyat sütununu gizle -MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN=Hide the total price column on purchase orders +MAIN_GENERATE_DOCUMENTS_PURCHASE_ORDER_WITHOUT_TOTAL_COLUMN=Satınalma siparişlerinde toplam fiyat sütununu gizle MAIN_PDF_NO_SENDER_FRAME=Gönderen adresi çerçevesindeki sınırları gizle MAIN_PDF_NO_RECIPENT_FRAME=Alıcı adres çerçevesindeki kenarlıkları gizle MAIN_PDF_HIDE_CUSTOMER_CODE=Müşteri kodunu gizle @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Değeri temizlemek için normal ifade filtresi (CO DuplicateForbidden=Kopyalanması yasaktır RemoveSpecialWords=Müşteriler veya tedarikçiler için alt hesaplar oluştururken belirli kelimeleri temizleyin RemoveSpecialWordsHelp=Müşteri veya tedarikçi hesabını hesaplamadan önce temizlenmesi gereken kelimeleri belirtin. Kullanın ";" her kelimenin arasında -GDPRContact=Veri Koruma Görevlisi (DPO, Veri Gizliliği veya GDPR kişisi) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Kişisel verilerinizi Bilgi Sisteminizde saklıyorsanız, Genel Veri Koruma Yönetmeliği'nden sorumlu olan kişinin adını buradan verebilirsiniz. HelpOnTooltip=Araç ipucunda gösterilecek yardım metni HelpOnTooltipDesc=Bu alan bir formda göründüğünde metnin bir araç ipucunda gösterilmesi için buraya metin veya çeviri anahtarı koyun @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Üçüncü taraf adı - Üçüncü taraf takma adı ALIAS_THIRDPARTY=Üçüncü taraf takma adı - Üçüncü taraf adı PDFIn2Languages=PDF'deki etiketleri 2 farklı dilde göster (bu özellik bazı dillerde çalışmayabilir) PDF_USE_ALSO_LANGUAGE_CODE=PDF'nizdeki bazı metinlerin aynı oluşturulan PDF'de 2 farklı dilde çoğaltılmasını istiyorsanız, burada bu ikinci dili ayarlamanız gerekir, böylece oluşturulan PDF aynı sayfada 2 farklı dil içerir, biri PDF oluşturulurken seçilir ve bu ( yalnızca birkaç PDF şablonu bunu destekler). PDF başına 1 dil için boş bırakın. -PDF_USE_A=Varsayılan format PDF yerine PDF/A formatında PDF belgeleri oluşturun +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Buraya FontAwesome simgesinin kodunu girin. FontAwesome'ın ne olduğunu bilmiyorsanız, fa-address-book genel değerini kullanabilirsiniz. RssNote=Not: Her RSS akışı tanımı, gösterge tablosunda mevcut olması için etkinleştirmeniz gereken bir pencere öğesi sağlar. JumpToBoxes=Kuruluma Atla -> Widget'lar @@ -2397,8 +2396,8 @@ INVOICE_ADD_EPC_QR_CODEMore=Bu özellik, faturalarınıza otomatik SEPA kredi tr INVOICE_ADD_EPC_QR_CODEPay=EPC QR koduyla ödemeyi destekleyen bir akıllı telefonla ödeme yapmak için bu QR kodunu tarayın. INVOICE_SHOW_SHIPPING_ADDRESS=Teslimat adresini göster INVOICE_SHOW_SHIPPING_ADDRESSMore=Bazı ülkelerde zorunlu gösterge (Fransa, ...) -SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal -SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=By default the contact only appears for billing +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Teklifte fatura ilgilisini göster +SUPPLIER_PROPOSAL_ADD_BILLING_CONTACTMore=Varsayılan olarak ilgili kişi yalnızca faturalandırma için görünür UrlSocialNetworksDesc=Sosyal ağın URL bağlantısı. Sosyal ağ kimliğini içeren değişken kısmı için {socialid} kullanın. IfThisCategoryIsChildOfAnother=Bu kategori başka bir kategorinin çocuğu ise DarkThemeMode=Koyu tema modu @@ -2530,18 +2529,18 @@ MainAuthenticationOidcAuthorizeUrlName=Authorize URL MainAuthenticationOidcAuthorizeUrlDesc=(example: https://example.com/oauth2/authorize) MainAuthenticationOidcTokenUrlName=Token URL MainAuthenticationOidcTokenUrlDesc=(example: https://example.com/oauth2/token) -MainAuthenticationOidcUserinfoUrlName=User info URL -MainAuthenticationOidcUserinfoUrlDesc=(example: https://example.com/oauth2/userinfo) -MainAuthenticationOidcLogoutUrlName=Logout URL -MainAuthenticationOidcLogoutUrlDesc=(example: https://example.com/oauth2/logout) +MainAuthenticationOidcUserinfoUrlName=Kullanıcı bilgisi URL'si +MainAuthenticationOidcUserinfoUrlDesc=(örneğin: https://orneksite.com/oauth2/userinfo) +MainAuthenticationOidcLogoutUrlName=Oturum kapatma URL'si +MainAuthenticationOidcLogoutUrlDesc=(örneğin: https://orneksite.com/oauth2/logout) MainAuthenticationOidcRedirectUrlName=yönlendirme bağlantısı MainAuthenticationOidcRedirectUrlDesc=Redirect URL to authorize on the OpenID provider side -MainAuthenticationOidcLogoutRedirectUrlName=Dolibarr logout URL +MainAuthenticationOidcLogoutRedirectUrlName=Dolibarr oturum kapatma URL'si MainAuthenticationOidcLogoutRedirectUrlDesc=Dolibarr logout URL to authorize on the OpenID provider side MainAuthenticationOidcLoginClaimName=Login claim MainAuthenticationOidcLoginClaimDesc=OpenID Connect claim matching the Dolibarr user login. If not set or empty, defaults to email -BlackListWords=Black list of words -AddBlackList=Add to black list +BlackListWords=Kelime kara listesi +AddBlackList=Kara listeye ekle FediverseSetup=Configuration of fediverse section ConfigImportSocialNetwork=Configuration of social networks compatible with Fediverse Fediverse=Fediverse @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index 569d48ea70faf..4c9f70e2e9f16 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Список значень складається з ExtrafieldParamHelpcheckbox=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0")

    , наприклад:
    1,значення1
    2,значення2
    3,значення3
    ... ExtrafieldParamHelpradio=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0")

    , наприклад:
    1,значення1
    2,значення2
    3,значення3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Параметри мають бути ObjectName:Classpath
    Синтаксис: ObjectName:Classpath ExtrafieldParamHelpSeparator=Залиште пустим для простого роздільника
    Встановіть значення 1 для роздільника, що згортається (відкривається за замовчуванням для нового сеансу, потім статус зберігається для кожного сеансу користувача)
    Встановіть значення 2 для роздільника, що згортається (згорнутий за замовчуванням для нового сеансу, потім статус зберігається для кожного сеансу користувача) LibraryToBuildPDF=Бібліотека, яка використовується для генерації PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Фільтр регулярних виразів DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Очистіть певні слова під час створення субрахунків для клієнтів або постачальників RemoveSpecialWordsHelp=Укажіть слова, які потрібно очистити перед розрахунком рахунку клієнта або постачальника. Використовуйте ";" між кожним словом -GDPRContact=Офіцер із захисту даних (DPO, конфіденційність даних або GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Якщо ви зберігаєте персональні дані у своїй інформаційній системі, тут ви можете назвати контактну особу, відповідальну за Загальний регламент захисту даних HelpOnTooltip=Текст довідки для відображення у підказці HelpOnTooltipDesc=Введіть тут текст або ключ перекладу, щоб текст відображався у підказці, коли це поле з’явиться у формі @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Ім'я контрагент - псевдонім контра ALIAS_THIRDPARTY=контрагент псевдонім - контрагент ім'я PDFIn2Languages=Показувати мітки у PDF-файлі двома різними мовами (ця функція може не працювати для кількох мов) PDF_USE_ALSO_LANGUAGE_CODE=Якщо ви хочете, щоб деякі тексти у вашому PDF-файлі були продубльовані двома різними мовами в одному згенерованому PDF-файлі, ви повинні встановити тут цю другу мову, щоб згенерований PDF-файл містив 2 різні мови на одній сторінці, одну, вибрану під час створення PDF-файлу, і цю ( лише кілька шаблонів PDF підтримують це). Залиште порожнім для 1 мови для PDF. -PDF_USE_A=Створюйте документи PDF у форматі PDF/A замість стандартного формату PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Введіть тут код значка FontAwesome. Якщо ви не знаєте, що таке FontAwesome, ви можете використовувати загальне значення fa-address-book. RssNote=Примітка. Кожне визначення RSS-каналу містить віджет, який потрібно ввімкнути, щоб він був доступним на інформаційній панелі JumpToBoxes=Перейдіть до Налаштування -> Віджети @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/ur_PK/admin.lang b/htdocs/langs/ur_PK/admin.lang index 2ea7d51edb4f4..d92b54bc44fb1 100644 --- a/htdocs/langs/ur_PK/admin.lang +++ b/htdocs/langs/ur_PK/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=اقدار کی فہرست شکل کلید کے سات ExtrafieldParamHelpcheckbox=اقدار کی فہرست فارمیٹ کلید کے ساتھ لائنوں میں ہونی چاہیے، ویلیو (جہاں کلید '0' نہیں ہو سکتی)

    مثال کے طور پر:
    1,value1

    a0342fda19bz0 2,342fdavalue... ExtrafieldParamHelpradio=اقدار کی فہرست فارمیٹ کلید کے ساتھ لائنوں میں ہونی چاہیے، ویلیو (جہاں کلید '0' نہیں ہو سکتی)

    مثال کے طور پر:
    1,value1

    a0342fda19bz0 2,342fdavalue... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=پیرامیٹرز کا ہونا ضروری ہے ObjectName:Classpath
    نحو: ObjectName:Classpath ExtrafieldParamHelpSeparator=ایک سادہ سیپریٹر کے لیے خالی رکھیں اسٹیٹس کو ہر صارف کے سیشن کے لیے رکھا جاتا ہے) LibraryToBuildPDF=لائبریری PDF جنریشن کے لیے استعمال ہوتی ہے۔ @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=کلین ویلیو کے لیے ریجیکس فل DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=گاہکوں یا سپلائرز کے لیے ذیلی اکاؤنٹس بناتے وقت کچھ الفاظ صاف کریں۔ RemoveSpecialWordsHelp=گاہک یا سپلائر کے اکاؤنٹ کا حساب لگانے سے پہلے صاف کیے جانے والے الفاظ کی وضاحت کریں۔ استعمال کریں "؛" ہر لفظ کے درمیان -GDPRContact=ڈیٹا پروٹیکشن آفیسر (ڈی پی او، ڈیٹا پرائیویسی یا جی ڈی پی آر رابطہ) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=اگر آپ اپنے انفارمیشن سسٹم میں ذاتی ڈیٹا اسٹور کرتے ہیں، تو آپ اس رابطہ کا نام دے سکتے ہیں جو یہاں جنرل ڈیٹا پروٹیکشن ریگولیشن کے لیے ذمہ دار ہے۔ HelpOnTooltip=ٹول ٹپ پر دکھانے کے لیے متن کی مدد کریں۔ HelpOnTooltipDesc=جب یہ فیلڈ فارم میں ظاہر ہوتا ہے تو ٹول ٹپ میں متن دکھانے کے لیے متن یا ترجمہ کی کلید یہاں رکھیں @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=تھرڈ پارٹی کا نام - تھرڈ پارٹی عرف ALIAS_THIRDPARTY=تھرڈ پارٹی عرف - تھرڈ پارٹی کا نام PDFIn2Languages=پی ڈی ایف میں لیبلز کو 2 مختلف زبانوں میں دکھائیں (ہو سکتا ہے یہ فیچر کچھ زبانوں کے لیے کام نہ کرے) PDF_USE_ALSO_LANGUAGE_CODE=اگر آپ چاہتے ہیں کہ آپ کی پی ڈی ایف میں کچھ متن ایک ہی جنریٹڈ پی ڈی ایف میں 2 مختلف زبانوں میں ڈپلیکیٹ ہوں، تو آپ کو یہاں یہ دوسری زبان سیٹ کرنی ہوگی تاکہ جنریٹ کی گئی پی ڈی ایف ایک ہی صفحہ میں 2 مختلف زبانوں پر مشتمل ہو، جو پی ڈی ایف بنانے کے وقت منتخب کی گئی ہو اور یہ ( صرف چند پی ڈی ایف ٹیمپلیٹس اس کی حمایت کرتے ہیں)۔ فی پی ڈی ایف 1 زبان کے لیے خالی رکھیں۔ -PDF_USE_A=ڈیفالٹ فارمیٹ PDF کے بجائے PDF/A فارمیٹ کے ساتھ PDF دستاویزات بنائیں +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=یہاں ایک FontAwesome آئیکن کا کوڈ درج کریں۔ اگر آپ نہیں جانتے کہ FontAwesome کیا ہے، تو آپ عام قدر fa-address-book استعمال کر سکتے ہیں۔ RssNote=نوٹ: ہر آر ایس ایس فیڈ کی تعریف ایک ویجیٹ فراہم کرتی ہے جسے ڈیش بورڈ میں دستیاب رکھنے کے لیے آپ کو اسے فعال کرنا ہوگا۔ JumpToBoxes=سیٹ اپ پر جائیں -> وجیٹس @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index 1024cc2fb9bd7..6bc84fe6abec8 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Qadriyatlar ro'yxati format bo'lishi kerak, bu erda ka ExtrafieldParamHelpcheckbox=Qadriyatlar ro'yxati format kaliti bo'lgan satrlardan iborat bo'lishi kerak, (agar bu erda '0' bo'lishi mumkin emas)

    masalan:
    1, value1
    2, value2
    3 ,03f03f ExtrafieldParamHelpradio=Qadriyatlar ro'yxati format kaliti bo'lgan satrlardan iborat bo'lishi kerak, (agar bu erda '0' bo'lishi mumkin emas)

    masalan:
    1, value1
    2, value2
    3 ,03f03f ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametrlar ObjectName: Classpath
    sintaksis: ObjectName: Classpath bo'lishi kerak ExtrafieldParamHelpSeparator=
    oddiy ajratuvchisi uchun bo'sh joyni saqlang holat har bir foydalanuvchi seansida saqlanadi) LibraryToBuildPDF=PDF yaratish uchun foydalaniladigan kutubxona @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Regex filtri toza qiymatga (COMPANY_DIGITARIA_CLEA DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Mijozlar yoki etkazib beruvchilar uchun sub-hisoblarni yaratishda ma'lum so'zlarni tozalang RemoveSpecialWordsHelp=Xaridor yoki yetkazib beruvchi hisobini hisoblashdan oldin tozalanishi kerak bo'lgan so'zlarni belgilang. ";" dan foydalaning har bir so'z orasida -GDPRContact=Ma'lumotlarni himoya qilish bo'yicha mutaxassis (DPO, ma'lumotlarning maxfiyligi yoki GDPR aloqasi) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Agar siz shaxsiy ma'lumotlarni Axborot tizimingizda saqlasangiz, bu yerda Ma'lumotlarni himoya qilish bo'yicha Umumiy Nizomga mas'ul bo'lgan kontaktni nomlashingiz mumkin HelpOnTooltip=Matnni ko'rsatmalar panelida ko'rsatish uchun yordam bering HelpOnTooltipDesc=Matn yoki tarjima kalitini bu erga qo'ying, bu maydon formada paydo bo'lganda matn asboblar panelida ko'rsatilsin @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Uchinchi tomon nomi - Uchinchi tomon taxalluslari ALIAS_THIRDPARTY=Uchinchi tomon taxalluslari - uchinchi tomon nomi PDFIn2Languages=PDF-da yorliqlarni 2 xil tilda ko'rsatish (bu xususiyat ba'zi tillarda ishlamasligi mumkin) PDF_USE_ALSO_LANGUAGE_CODE=Agar siz o'zingizning PDF-dagi ba'zi matnlarni bir xil hosil qilingan PDF-da 2 xil tilda nusxalashni xohlasangiz, siz ushbu ikkinchi tilni o'rnatishingiz kerak, shuning uchun yaratilgan PDF bir xil sahifada 2 xil tilni o'z ichiga oladi, bu PDF yaratishda tanlangan va shu ( faqat bir nechta PDF shablonlari buni qo'llab-quvvatlaydi). PDF uchun 1 ta til uchun bo'sh qoldiring. -PDF_USE_A=Standart PDF formati o'rniga PDF/A formatida PDF hujjatlarini yarating +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Bu erga FontAwesome ikonkasining kodini kiriting. Agar siz FontAwesome nima ekanligini bilmasangiz, umumiy qiymatdan foydalanishingiz mumkin. RssNote=Izoh: Har bir RSS tasmali ta'rifi vidjetni taqdim etadi, uni boshqarish panelida bo'lishini ta'minlash kerak JumpToBoxes=O'rnatish -> Vidjetlarga o'tish @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index bd051e8a55d72..f415bc5c5a12a 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=Danh sách các giá trị phải là các dòng có k ExtrafieldParamHelpcheckbox=Danh sách các giá trị phải là các dòng có khóa định dạng, giá trị (trong đó khóa không thể là '0')

    ví dụ:
    1, giá trị1
    2, giá trị2
    3, giá trị3
    ... ExtrafieldParamHelpradio=Danh sách các giá trị phải là các dòng có khóa định dạng, giá trị (trong đó khóa không thể là '0')

    ví dụ:
    1, giá trị1
    2, giá trị2
    3, giá trị3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Các tham số phải là ObjectName:Classpath
    Cú pháp: ObjectName:Classpath ExtrafieldParamHelpSeparator=Giữ trống cho một dấu phân cách đơn giản
    Đặt giá trị này thành 1 cho dấu phân cách thu gọn (mặc định mở cho phiên mới, sau đó trạng thái được giữ cho mỗi phiên người dùng)
    Đặt giá trị này thành 2 cho dấu phân cách thu gọn (mặc định được thu gọn cho phiên mới, sau đó trạng thái được giữ trước mỗi phiên người dùng) LibraryToBuildPDF=Thư viện được sử dụng để tạo PDF @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=Bộ lọc Regex để làm sạch giá trị (COM DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=Xóa một số từ nhất định khi tạo tài khoản phụ cho khách hàng hoặc nhà cung cấp RemoveSpecialWordsHelp=Chỉ định các từ cần làm sạch trước khi tính toán tài khoản khách hàng hoặc nhà cung cấp. Sử dụng một ";" giữa mỗi từ -GDPRContact=Cán bộ bảo vệ dữ liệu (DPO, Bảo mật dữ liệu hoặc liên lạc GDPR) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=Nếu bạn lưu trữ dữ liệu cá nhân trong Hệ thống thông tin của mình, bạn có thể nêu tên người liên hệ chịu trách nhiệm về Quy định chung về bảo vệ dữ liệu tại đây HelpOnTooltip=Trợ giúp văn bản để hiển thị trên tooltip HelpOnTooltipDesc=Đặt văn bản hoặc từ khóa dịch ở đây để văn bản hiển thị trong tooltip khi trường này xuất hiện trong một biểu mẫu @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=Tên bên thứ ba - Bí danh của bên thứ ba ALIAS_THIRDPARTY=Bí danh của bên thứ ba - Tên của bên thứ ba PDFIn2Languages=Hiển thị nhãn trong PDF bằng 2 ngôn ngữ khác nhau (tính năng này có thể không hoạt động đối với một số ngôn ngữ) PDF_USE_ALSO_LANGUAGE_CODE=Nếu bạn muốn có text trong PDF của mình bằng 2 ngôn ngữ khác nhau trong cùng một tệp PDF được tạo, bạn phải đặt ở đây ngôn ngữ thứ hai này để PDF được tạo sẽ chứa 2 ngôn ngữ khác nhau trong cùng một trang, một ngôn ngữ được chọn khi tạo PDF và ngôn ngữ này ( chỉ có vài mẫu PDF hỗ trợ này). Giữ trống cho 1 ngôn ngữ trên mỗi PDF. -PDF_USE_A=Tạo tài liệu PDF với định dạng PDF/A thay vì định dạng PDF mặc định +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=Nhập vào đây mã của biểu tượng FontAwgie. Nếu bạn không biết FontAwgie là gì, bạn có thể sử dụng fa-address-book RssNote=Lưu ý: Mỗi nguồn cấp RSS cung cấp một tiện ích mà bạn phải kích hoạt để có sẵn trong bảng điều khiển JumpToBoxes=Chuyển tới Thiết lập --> Widgets @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index f425527e6ad56..0a3c444da9206 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=值列表必须是格式为键/值对的行(其中 ExtrafieldParamHelpcheckbox=值列表必须是格式为 键/值 的对(其中 键不能为 '0')

    例如:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=值列表必须是格式为 键/值 的对(其中 键不能为 '0')1 2 例如:3 1,value1 4 2,value2 5 3,value3 6 ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=参数必须是 ObjectName:Classpath
    语法:ObjectName:Classpath ExtrafieldParamHelpSeparator=为简单分隔符留空
    将此设置为 1 用于折叠分隔符(默认为新会话打开,然后为每个用户会话保留状态)
    将此设置为 2 用于折叠分隔符(默认为新会话折叠,然后在每个用户会话之前保持状态) LibraryToBuildPDF=用于 PDF 生成的库 @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=清理值的正则表达式(COMPANY_DIGITARIA_CL DuplicateForbidden=禁止重复 RemoveSpecialWords=为客户或供应商生成子帐户时清除某些字词 RemoveSpecialWordsHelp=在计算客户或供应商帐户之前指定要清理的单词。 在每个单词之间使用“;” -GDPRContact=数据保护官(DPO、数据隐私或 GDPR 联系人) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=如果您将个人数据存储在您的信息系统中,您可以在此处指定负责一般数据保护条例(GDPR)的联系人 HelpOnTooltip=显示在工具提示上的帮助文本 HelpOnTooltipDesc=当该字段出现在表单中时,将文本或翻译键放在此处以在工具提示中显示文本 @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=合作方名称 - 合作方別名 ALIAS_THIRDPARTY=合作方別名 - 合作方名称 PDFIn2Languages=以 2 种不同语言显示 PDF 中的标签(此功能可能不适用于某些语言) PDF_USE_ALSO_LANGUAGE_CODE=如果您想在同一个生成的 PDF 中以 2 种不同的语言复制 PDF 中的某些文本,则必须在此处设置第二种语言,以便生成的 PDF 将在同一页面中包含 2 种不同的语言:生成 PDF 时选择的一种和这个(只有少数 PDF 模板支持这一点)。留空为每个 PDF只有1种语言。 -PDF_USE_A=使用 PDF/A 格式而不是默认格式 PDF 生成 PDF 文档 +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=在此处输入 FontAwesome 图标的代码。如果你不知道什么是 FontAwesome,你可以使用通用值 fa-address-book。 RssNote=注意:每个 RSS 源定义都提供一个widget小组件,您必须启用该widget小组件才能在看板中使用它 JumpToBoxes=跳转到 设置 -> widget小组件 @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/zh_HK/admin.lang b/htdocs/langs/zh_HK/admin.lang index 59fa01452391e..a5a4a8c20f82d 100644 --- a/htdocs/langs/zh_HK/admin.lang +++ b/htdocs/langs/zh_HK/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=值列表必須是格式為 key,value 的行(其中 ExtrafieldParamHelpcheckbox=值列表必須是格式為 key,value 的行(其中 key 不能為“0”)

    例如:
    1、值1
    2、值2
    3、值3
    ... ExtrafieldParamHelpradio=值列表必須是格式為 key,value 的行(其中 key 不能為“0”)

    例如:
    1、值1
    2、值2
    3、值3
    ... ExtrafieldParamHelpsellist=數值列表來自表格
    語法:表名:標籤欄位:id_field::filtersql
    範例:c_typent:libelle:id::filtersql

    - id_field 必然是一個主 int 鍵
    -filtersql 是一個條件。它必須使用 USF 語法。範例:(active:=:1) 僅顯示活動值
    您也可以在過濾器中使用$ID$,它是當前物件的當前ID
    如果您想過濾額外字段,請使用語法 extra.fieldcode=... (其中 fieldcode 是額外字段的代碼)

    為了讓清單依賴另一個補充屬性清單:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    為了讓清單依賴另一個清單:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=值清單來自表
    語法:table_name:label_field:id_field::filtersql
    範例:c_typent:libelle:id::filtersql

    filter 可以是一個簡單的測試(例如 active=1僅顯示活動值)
    您也可以在過濾器中使用$ID$,它是當前物件的當前id
    要在過濾器中執行選擇,請使用$SEL$
    如果您想要過濾額外字段,請使用語法extra.fieldcode=... (其中字段代碼是額外字段的代碼)

    為了讓列表依賴於另一個補充屬性列表:
    c_typent:libelle:id:options_ parent_list_code|parent_column:filter

    為了讓清單依賴另一個清單:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=參數必須是 ObjectName:Classpath
    語法:ObjectName:Classpath ExtrafieldParamHelpSeparator=留空作為簡單的分隔符
    將其設為 1 以取得折疊分隔符號(預設為新使用時段打開,然後為每個使用者使用時段保留狀態)
    將其設為 2 作為折疊分隔符號(新會話預設折疊,然後在每個使用者使用時段之前保留狀態) LibraryToBuildPDF=用於 PDF 生成的庫 @@ -514,15 +513,15 @@ ModuleCompanyCodeCustomerDigitaria=%s 後面接著截斷的客戶名稱和字元 ModuleCompanyCodeSupplierDigitaria=%s 後面接著截斷的供應商名稱和字元數:%s 表示供應商會計代碼。 Use3StepsApproval=預設情況下,採購訂單需要由 2 個不同的用戶建立和批准(建立一個步驟/用戶,批准一個步驟/用戶。請注意,如果用戶同時擁有建立和批准權限,則一個步驟/用戶就足夠了) 。如果金額高於專用值,您可以要求使用此選項引入第三步驟/使用者批准(因此需要 3 個步驟:1=驗證,2=第一次批准,3=如果金額足夠則第二次批准)。
    如果一次批准(2 個步驟)就足夠,則將其設為空;如果始終需要第二次批准(3 個步驟),則將其設為非常低的值(0.1)。 UseDoubleApproval=當金額(不含稅)高於...時,使用3步驟審批 -WarningPHPMail=NOTICE: The setup to send emails from the application is using the default generic setup (called "%s"). This choice needs no technical knowledge and no particular setup.
    However, it is often better to setup outgoing emails to use the other method (called "%s") to use the email server of your Email Service Provider, instead of the default setup for several reasons: +WarningPHPMail=注意:從應用程式發送電子郵件的設定使用預設的通用設定(稱為“%s”)。這種選擇不需要技術知識,也不需要特殊的設定。
    但是,基於以下幾個原因,通常最好將外發電子郵件設定為使用其他方法(稱為「%s」)來使用電子郵件服務提供者的電子郵件伺服器,而不是預設值: WarningPHPMailA=- 使用電郵服務提供商的伺服器提高您的電郵可信度,因此提高發送成功率而不被標記為垃圾郵件 -WarningPHPMailB=- If the domain of your email (the part mymaildomain.com into myname@mymaildomain.com) is protected by a SPF + a DMARC record, your email may be flagged as SPAM because your DMARC rule defined into DNS zone of the domain of the sender (mymaildomain.com) does not allow the sending as a generic sender. In such a case, you must disable the DMARC for the domain (or set it to p=none like done by @gmail.com) or, better, if you have the technical knowledge, use the other method to send emails using the SMTP server of your own email provider. +WarningPHPMailB=- 如果您的電子郵件網域(mymaildomain.com 到 myname@mymaildomain.com 部分)受 SPF + DMARC 記錄保護,您的電子郵件可能會被標記為垃圾郵件,因為您在寄件者網域 (mymaildomain.com) 的 DNS 區域中定義的 DMARC 規則不允許作為一般寄件者傳送。在這種情況下,您必須停用網域的DMARC(或將其設定為p=none,如@gmail.com 所做的那樣),或者更好的是,如果您有技術知識,請使用其他方法通過SMTP 發送電子郵件您自己的電子郵件提供者的伺服器。 WarningPHPMailC=- 使用您自己的電子郵件服務提供者的 SMTP 伺服器發送電子郵件也很有趣,因此從應用程式發送的所有電子郵件也將保存到您郵箱的「已發送」目錄中。 WarningPHPMailD=因此,建議將電子郵件的傳送方式變更為值「SMTP」。 WarningPHPMailDbis=如果您確實想保留預設的「PHP」方法來傳送電子郵件,只需忽略此警告,或透過%s按一下此處%s將其刪除。 WarningPHPMail2=如果您的電子郵件SMTP 提供者需要將電子郵件用戶端限制為某些IP 位址(非常罕見),則這是ERP CRM 應用程式的郵件使用者代理(MUA) 的IP 位址:%s 。 -WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask your domain name registar), you must add the following IPs or entry in the SPF record of the DNS of your domain: %s. -WarningPHPMailSPFDMARC=If the domain name in your sender email address is protected by a DMARC record different than p=none (ask your domain name registar), you must remove your DMARC record, or set it to p=none like do @gmail.com) or use sending another method. +WarningPHPMailSPF=如果您的寄件者電子郵件地址中的網域名稱受SPF 記錄保護(請詢問您的網域註冊商),您必須在您的網域的DNS 的SPF 記錄中新增下列IP 或條目:%s。 +WarningPHPMailSPFDMARC=如果寄件者電子郵件地址中的網域名稱受與p=none 不同的DMARC 記錄保護(詢問您的網域註冊商),則必須刪除您的DMARC 記錄,或將其設為p=none,如@gmail. com)或使用發送另一種方法。 SPFAndDMARCInformation=主要電子郵件地址的 SPF 和 DMARC DNS 記錄 ActualMailDNSRecordFound=找到實際的 %s 記錄(針對電子郵件 %s):%s ClickToShowDescription=點擊顯示描述 @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=用於清理值的正則表達式過濾器(COMPA DuplicateForbidden=禁止重複 RemoveSpecialWords=在為客戶或供應商生成子賬戶時清除某些字詞 RemoveSpecialWordsHelp=指定在計算客戶或供應商賬戶之前要清除的字詞。每個字詞之間使用“;”。 -GDPRContact=數據保護官(DPO,數據隱私或GDPR聯絡人) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=如果您將個人資料儲存在資訊系統中,您可以在此指定負責一般資料保護規範的聯絡人 HelpOnTooltip=工具提示顯示的說明文字 HelpOnTooltipDesc=在此處放入文字或翻譯鍵,以便在此字段出現在表單中時在工具提示中顯示文字。 @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=第三方名稱 - 第三方別名 ALIAS_THIRDPARTY=第三方別名 - 第三方名稱 PDFIn2Languages=以 2 種不同語言顯示 PDF 中的標籤(此功能可能不適用於某些語言) PDF_USE_ALSO_LANGUAGE_CODE=如果您希望在同一個生成的PDF 中以2 種不同的語言複製PDF 中的某些文本,則必須在此處設定第二種語言,以便生成的PDF 將在同一頁面中包含2 種不同的語言,即生成PDF 時選擇的語言和該語言 (只有少數 PDF 模板支援此功能)。對於每個 PDF 的 1 種語言,請保留為空白。 -PDF_USE_A=產生 PDF/A 格式的 PDF 文檔,而不是預設格式 PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=在此輸入 FontAwesome 圖標的代碼。如果您不知道 FontAwesome 是什麼,可以使用通用值 fa-address-book。 RssNote=注意:每個 RSS 來源定義都提供一個小部件,您必須啟用該小部件才能在儀表板中使用它 JumpToBoxes=跳至設置 -> 小工具 @@ -2555,3 +2554,8 @@ MenuDict=字典 AddMoreParams=為連線新增更多參數(cookie、令牌等)
    範例: token : value token ParamName=參數名稱 ParamValue=參數值 +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=您可以透過執行下列 SQL 命令來取得可能值的清單:%s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index 767d157620b6d..f961abbe67bca 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -475,7 +475,6 @@ ExtrafieldParamHelpselect=數值清單必須為含有關鍵字的行,數值 (關 ExtrafieldParamHelpcheckbox=數值清單必須為含有關鍵字的行,數值 (關鍵字不能為 '0')

    範例:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=數值清單必須為含有關鍵字的行,數值 (關鍵字不能為 '0')

    範例:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    filter can be a simple test (eg active=1 to display only active value)
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=參數必須為ObjectName:Classpath
    語法 ObjectName:Classpath ExtrafieldParamHelpSeparator=保持空白以使用簡單的分隔符號
    對於折疊分隔符號,將此值設定為1(預設情況下,對於新程序打開,然後為每個用戶程序保留狀態)
    將其設定為2可折疊分隔符號(預設情況下,新程序已折疊,然後在每個用戶程序中保持狀態) LibraryToBuildPDF=PDF產生器程式庫 @@ -2147,7 +2146,7 @@ COMPANY_DIGITARIA_CLEAN_REGEX=用正則表達式篩選器清除值(COMPANY_DIG DuplicateForbidden=Duplicate forbidden RemoveSpecialWords=為客戶或供應商產生子帳戶時清除特定文字 RemoveSpecialWordsHelp=在計算客戶或供應商帳戶之前指定要清除的文字。在每個字之間使用”;” -GDPRContact=資料保護官(DPO,資料隱私或GDPR聯絡人) +GDPRContact=Data Protection Officer (DPO, Data Privacy or GDPR contact, ...) GDPRContactDesc=如果您儲存個人資料於您的資訊系統,則可以在此處指定負責《通用數據保護條例》的聯絡人 HelpOnTooltip=工具提示上的幫助文字 HelpOnTooltipDesc=在這裡放入文字或是翻譯鍵以便此欄位顯示在表單時可以顯示在工具提示 @@ -2290,7 +2289,7 @@ THIRDPARTY_ALIAS=合作方名稱 - 合作方別名 ALIAS_THIRDPARTY=合作方別名 - 合作方名稱 PDFIn2Languages=於PDF的標籤顯示兩種不同的語言(這個功能可能對某些語言無法正常運作) PDF_USE_ALSO_LANGUAGE_CODE=如果您要在生成同一的PDF中以兩種不同的語言複製一些文字,則必須在此處設置第二種語言讓生成的PDF在同一頁中包含兩種不同的語言,選擇的可以用來生成PDF跟另一種語言(只有少數PDF模板支援此功能)。PDF只有一種語言則留空。 -PDF_USE_A=產生使用PDF/A格式的PDF文件而不是預設格式的PDF +PDF_USE_A=PDF documents format FafaIconSocialNetworksDesc=在此處輸入FontAwesome圖示的代碼。如果您不知道什麼是FontAwesome,則可以使用通用值fa-address-book。 RssNote=注意:每個RSS訂閱的定義都提供一個小工具,您必須啟用該小工具才能使其在資訊板中看到 JumpToBoxes=跳至設定 -> 小工具 @@ -2555,3 +2554,8 @@ MenuDict=Dictionary AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Example: token : value token ParamName=Name of parameter ParamValue=Value of parameter +ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? +HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr From 1e14b3b0125ebc7d8338255b449c775f7ce7441f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:47:06 +0200 Subject: [PATCH 191/329] Typo --- htdocs/admin/mails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index dfe885496cfd8..b37981b7c5f1a 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -1092,12 +1092,12 @@ function change_smtp_auth_method() { if (($dnstype == 'SPF' && stripos($info['txt'], 'v=spf') !== false) || ($dnstype == 'DMARC' && stripos($info['txt'], 'v=dmarc') !== false)) { $foundforemail++; - $text .= ($text ? '
    ' : '').$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), $info['txt']); + $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), $info['txt']); } } } if (!$foundforemail) { - $text .= ($text ? '
    ' : '').$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), ''.$langs->transnoentitiesnoconv("None").''); + $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), ''.$langs->transnoentitiesnoconv("None").''); } } } From 23b138ddd0477ebf32afccec6c268adc91a7d7d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:52:59 +0200 Subject: [PATCH 192/329] Better readability of message --- htdocs/admin/mails.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index b37981b7c5f1a..f3c2872b1810a 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -1092,12 +1092,12 @@ function change_smtp_auth_method() { if (($dnstype == 'SPF' && stripos($info['txt'], 'v=spf') !== false) || ($dnstype == 'DMARC' && stripos($info['txt'], 'v=dmarc') !== false)) { $foundforemail++; - $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), $info['txt']); + $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", ''.$dnstype.'', ''.implode(', ', $listofemails).'', ''.$info['txt'].''); } } } if (!$foundforemail) { - $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", $dnstype, implode(', ', $listofemails), ''.$langs->transnoentitiesnoconv("None").''); + $text .= ($text ? '
    ' : '').'- '.$langs->trans("ActualMailDNSRecordFound", ''.$dnstype.'', ''.implode(', ', $listofemails).'', ''.$langs->transnoentitiesnoconv("None").''); } } } From 2832a914d0779769d44dbde2b8abdc392c5c0e49 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 11:00:21 +0200 Subject: [PATCH 193/329] Typo --- htdocs/langs/lv_LV/admin.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index b0a6770577e06..40ce9e26025af 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -371,8 +371,8 @@ GenericMaskCodes3EAN=Visas pārējās maskas rakstzīmes paliks neskartas (izņe GenericMaskCodes4a=Piemērs par trešās puses TheCompany 99. piemēru %s ar datumu 2023. 01.31.:
    GenericMaskCodes4b=Example on third party created on 2023-01-31:
    GenericMaskCodes4c=Piemērs par produktu, kas izveidots 2023.01.31.:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} sniegs b0aee833650ABC2301-000099 }-ZZZ/{dd}/XXX sniegs 0199-ZZZ/31/XXX -GenericMaskCodes5b=IN{yy}{mm}-8dza358d453 -{t} sniegs IN230-1- A, ja uzņēmuma veids ir “Atbildīgs Inscripto” ar tipa kodu “A_RI” +GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC2301-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX +GenericMaskCodes5b=IN{yy}{mm}-{0000}-{t} will give IN2301-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' GenericNumRefModelDesc=Atgriež pielāgojamu numuru atbilstoši noteiktajai maskai. DateStartThatModel=Atspējot šīs numerācijas kārtulas izmantošanu visām iepriekš izveidotajām trešajām pusēm DateStartThatModelHelp=Varat atspējot ziloņu numerācijas kārtulu trešajām pusēm, kas izveidotas pirms datuma (piemēram, tāpēc, ka tās tika importētas migrācijas rezultātā, no citas programmatūras, izmantojot citu kārtulu). Ļaujiet šim laukam iztukšot, lai kārtula tiktu piemērota visām trešajām pusēm. @@ -474,7 +474,7 @@ ExtrafieldParamHelpPassword=Ja atstājat šo lauku tukšu, šī vērtība tiks s ExtrafieldParamHelpselect=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    kods3, vērtība3 < br> ...

    Lai saraksts būtu atkarīgs no cita papildinošā atribūtu saraksta:
    1, vērtība1 | opcijas_ vecāku_līmeņa kods : vecāku_skava
    2, vērtība2 | opcijas_ vecāku saraksts_code : parent_key

    Lai saraksts būtu atkarīgs no cita saraksta:
    1, vērtība1 | vecāku saraksts_code : vecāku_skava
    2, vērtība2 | vecāku saraksts_code : vecāku_poga ExtrafieldParamHelpcheckbox=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    3, vērtība3 < br> ... ExtrafieldParamHelpradio=Vērtību sarakstam jābūt rindām ar formāta atslēgu, vērtība (kur atslēga nevar būt '0')

    , piemēram,: 1, vērtība1
    2, vērtība2
    3, vērtība3 < br> ... -ExtrafieldParamHelpsellist=Vērtību saraksts nāk no tabulas
    Sintakse: table_name:label_field:id_field::filtersql
    Piemērs: c_idtypent:libelle ::filtersql

     — lauks id_field noteikti ir primārā int atslēgab0342fccfda
    Varat arī izmantot $ID$ filtrā, kas ir pašreizējā objekta pašreizējais ID.
    Ja vēlaties filtrēt papildu laukus, izmantojiet sintaksi extra.fieldcode=... (kur lauka kods ir ekstralauka kods)

    Lai saraksts būtu atkarīgs no cita papildu atribūtu saraksta:
    c_typent:libelle:id:options_b049271fcze0818 parent_list_code|parent_column:filter
    b0342fccfda19bz secībā lai saraksts būtu atkarīgs no cita saraksta:
    c_typent:libelle:id:parent_list_code |parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filtersql
    Example: c_typent:libelle:id::filtersql

    - id_field is necessarily a primary int key
    - filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parametriem jābūt ObjectName: Classpath
    Sintakse: ObjectName: Classpath ExtrafieldParamHelpSeparator=Vienkārša atdalītāja atstāšana tukša
    Iestatiet to uz 1 sabrūkošajam atdalītājam (pēc noklusējuma atveriet jaunu sesiju, pēc tam katras lietotāja sesijai tiek saglabāts statuss)
    Iestatiet to uz 2 sabrukušajam atdalītājam (jaunajai sesijai pēc noklusējuma sabrūk, pēc tam katras lietotāja sesijas laikā tiek saglabāts statuss) LibraryToBuildPDF=Bibliotēka, ko izmanto PDF veidošanai From 072b3e70226e9f88a9ffe7998038e0537b42cd88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 12:29:59 +0200 Subject: [PATCH 194/329] Fix empty value on combo to select types --- htdocs/admin/agenda_other.php | 4 ++-- htdocs/comm/action/index.php | 2 +- htdocs/core/lib/agenda.lib.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index a24d74eb945ee..5e039ee49ed1b 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -371,7 +371,7 @@ print '
    '."\n"; print ''."\n"; print ''."\n"; } @@ -401,7 +401,7 @@ // We use an option here because it adds bugs when used on agenda page "peruser" and "list" $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE')); } -$formactions->select_type_actions(getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE'), "AGENDA_DEFAULT_FILTER_TYPE", '', (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 1, $multiselect); +print $formactions->select_type_actions(getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE'), "AGENDA_DEFAULT_FILTER_TYPE", '', (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 1, $multiselect, 1, 'minwidth300', 1); print ''."\n"; // AGENDA_DEFAULT_FILTER_STATUS diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a40cac48859ea..c8da5d11b2d54 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -286,7 +286,7 @@ } // Define list of external calendars (user setup) -if (empty($user->conf->AGENDA_DISABLE_EXT)) { +if (!getDolUserString('AGENDA_DISABLE_EXT')) { $i = 0; while ($i < $MAXAGENDA) { $i++; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index ce7ee9d7073c2..0032de1b22c10 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -97,7 +97,7 @@ function print_actions_filter( $multiselect = (getDolGlobalString('AGENDA_USE_EVENT_TYPE')); } print img_picto($langs->trans("ActionType"), 'square', 'class="pictofixedwidth inline-block" style="color: #ddd;"'); - print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (!getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? 1 : -1), 0, $multiselect, 0, 'minwidth200 maxwidth250 widthcentpercentminusx'); + print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (getDolGlobalString('AGENDA_USE_EVENT_TYPE') ? -1 : 1), 0, $multiselect, 0, 'minwidth200 maxwidth250 widthcentpercentminusx', 1); print ''; if ($canedit) { From 08a670a32c877218081076cd632297638aa61967 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 12:37:03 +0200 Subject: [PATCH 195/329] Fix filter on type of event --- htdocs/comm/action/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index c8da5d11b2d54..bff470b4ba127 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -136,6 +136,9 @@ } else { $actioncode = GETPOST("search_actioncode", "alpha", 3) ? GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE') || $disabledefaultvalues) ? '' : getDolGlobalString('AGENDA_DEFAULT_FILTER_TYPE'))); } +if (is_scalar($actioncode) && $actioncode == '-1') { + $actioncode = ''; +} if ($status == '' && !GETPOSTISSET('search_status')) { $status = ((!getDolGlobalString('AGENDA_DEFAULT_FILTER_STATUS') || $disabledefaultvalues) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); From 805555a059dd18b9c673e86436818bef363b87b5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 12:55:12 +0200 Subject: [PATCH 196/329] Fix autoset end date on event creation --- htdocs/comm/action/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index cf7f82f83d21c..4bf9f7d9b05c0 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1399,15 +1399,15 @@ function init_repeat() print ''; $datep = ($datep ? $datep : (is_null($object->datep) ? '' : $object->datep)); - if (GETPOSTINT('datep', 1)) { - $datep = dol_stringtotime((string) GETPOSTINT('datep', 1), 'tzuserrel'); + if (GETPOST('datep', 'alpha', 1)) { + $datep = dol_stringtotime(GETPOST('datep', 'alpha', 1), 'tzuserrel'); } $datef = ($datef ? $datef : $object->datef); - if (GETPOSTINT('datef', 1)) { - $datef = dol_stringtotime((string) GETPOSTINT('datef', 1), 'tzuserrel'); + if (GETPOST('datef', 'alpha', 1)) { + $datef = dol_stringtotime(GETPOST('datef', 'alpha', 1), 'tzuserrel'); } if (empty($datef) && !empty($datep)) { - if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || !getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT')) { + if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || (!getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT') || getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT') == '-1')) { $datef = dol_time_plus_duree($datep, getDolGlobalInt('AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS', 1), 'h'); } } From 62e1a6ca534c431ff2104616910fc52e343cfcaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 13:19:39 +0200 Subject: [PATCH 197/329] Doc --- htdocs/core/js/lib_foot.js.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index 0f13e1050cd41..b796183782be4 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -221,6 +221,7 @@ if ($conf->browser->layout != 'phone') { print "\n/* JS CODE TO ENABLE document_preview */\n"; // Function document_preview is into header print ' jQuery(document).ready(function () { + // Click on the preview picto jQuery(".documentpreview").click(function () { console.log("We click on preview for element with href="+$(this).attr(\'href\')+" mime="+$(this).attr(\'mime\')); document_preview($(this).attr(\'href\'), $(this).attr(\'mime\'), \''.dol_escape_js($langs->transnoentities("Preview")).'\'); @@ -387,15 +388,15 @@ function() { text: confirmActionBtnLabel, "class": \'ui-state-information\', click: function () { - window.location.replace(confirmUrl); - } + window.location.replace(confirmUrl); + } }, { text: confirmCancelBtnLabel, "class": \'ui-state-information\', click: function () { - $(this).dialog("close"); - } + $(this).dialog("close"); + } } ], close: function( event, ui ) { From bb21bbeee63a61e98cc68d7aff1f7cb22627d75f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 13:27:27 +0200 Subject: [PATCH 198/329] FIX Browser Notification ko with firefox --- htdocs/core/js/lib_notification.js.php | 128 ++++++++++++++++--------- 1 file changed, 84 insertions(+), 44 deletions(-) diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 7be8330321f4e..0eae59bfcb3af 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -89,7 +89,7 @@ // We set a delay before launching first test so next check will arrive after the time_auto_update compared to previous one. //var time_first_execution = (time_auto_update + (time_js_next_test - nowtime)) * 1000; //need milliseconds - var time_first_execution = global->MAIN_BROWSER_NOTIFICATION_CHECK_FIRST_EXECUTION); ?>; + var time_first_execution = ; setTimeout(first_execution, time_first_execution * 1000); // Launch a first execution after a time_first_execution delay time_js_next_test = nowtime + time_first_execution; @@ -112,8 +112,17 @@ function first_execution() { function check_events() { var result = 0; dolnotif_nb_test_for_page += 1; + var methodfornotification = ''; - if (Notification.permission === "granted") { + permissionok = 0; + if (methodfornotification == "jsnotification" && Notification.permission == "granted") { + permissionok = 1; + } + if (methodfornotification == "jnotify") { + permissionok = 1; + } + + if (permissionok == 1) { var currentToken = 'notrequired'; const allMeta = document.getElementsByTagName("meta"); for (let i = 0; i < allMeta.length; i++) { @@ -138,10 +147,11 @@ function check_events() { console.log("Retrieved "+arrayofpastreminders.length+" reminders to do."); var audio = null; + var icon = ''; var listofreminderids = ''; var noti = [] @@ -149,61 +159,91 @@ function check_events() { console.log(value); var url = "notdefined"; var title = "Not defined"; - var body = value.label; - var icon = ''; - var image = ''; - if (value.type == 'agenda' && value.location != null && value.location != '') { - body += '\n' + value.location; - } - - if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { - body += '\n' + value.event_date_start_formated; - } + var body = ""; if (value.type == 'agenda') { url = '' + value.id_agenda; title = 'transnoentities('EventReminder')) ?>'; } - var extra = { - icon: icon, - body: body, - lang: 'getDefaultLang(1)); ?>', - tag: value.id_agenda, - requireInteraction: true /* wait that the user click or close the notification */ - /* only supported for persistent notification shown using ServiceWorkerRegistration.showNotification() so disabled */ - /* actions: [{ action: 'action1', title: 'New Button Label' }, { action: 'action2', title: 'Another Button' }] */ - }; - // We release the notify - console.log("Send notification on browser url="+url); - noti[index] = new Notification(title, extra); - if (index==0 && audio) - { - audio.play(); + if (methodfornotification == "jsnotification") { + body = value.label; + if (value.type == 'agenda' && value.location != null && value.location != '') { + body += '\n' + value.location; + } + + if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { + body += '\n' + value.event_date_start_formated; + } + } else { + if (title != "Not defined") { + body = title+'

    '; + } + body += ''; + if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { + body += ' '+value.event_date_start_formated; + } + body += ' - trans("ShowDetails")); ?>'; + body += '
    '+value.label; + if (value.type == 'agenda' && value.location != null && value.location != '') { + body += '
    ' + value.location; + } } - if (noti[index]) { - noti[index].onclick = function (event) { - /* If the user has clicked on button Activate */ - console.log("A click on notification on browser has been done for url="+url); - event.preventDefault(); // prevent the browser from focusing the Notification's tab - window.focus(); - window.open(url, '_blank'); - noti[index].close(); + // We release the notify + console.log("Send notification on browser url="+url+" using method="+methodfornotification); + + // Using the js browser Notification() popup + if (methodfornotification == 'jsnotification') { + var extra = { + icon: icon, + body: body, + lang: 'getDefaultLang(1)); ?>', + tag: value.id_agenda, + requireInteraction: true /* wait that the user click or close the notification */ + /* "actions:" parameter is only supported for persistent notification shown using ServiceWorkerRegistration.showNotification() so disabled */ + /* actions: [{ action: 'action1', title: 'New Button Label' }, { action: 'action2', title: 'Another Button' }] */ }; + noti[index] = new Notification(title, extra); + if (index==0 && audio) + { + audio.play(); + } + + if (noti[index]) { + noti[index].onclick = function (event) { + /* If the user has clicked on button Activate */ + console.log("A click on notification on browser has been done for url="+url); + event.preventDefault(); // prevent the browser from focusing the Notification's tab + window.focus(); + window.open(url, '_blank'); + noti[index].close(); + }; + + listofreminderids = (listofreminderids == '' ? '' : listofreminderids + ',') + value.id_reminder + } + } + + // Using jNotify popup + if (methodfornotification == 'jnotify') { + // Output a message with level "warning" + $.jnotify(body, 'warning', true, { remove: function (){} } ); + listofreminderids = (listofreminderids == '' ? '' : listofreminderids + ',') + value.id_reminder } }); // Update status of all notifications we sent on browser (listofreminderids) - console.log("Flag notification as done for listofreminderids="+listofreminderids); - $.ajax(""+listofreminderids, { - type: "POST", // Usually post or get - async: true, - data: { time_js_next_test: time_js_next_test, token: currentToken } - }); + if (listofreminderids != '') { + console.log("Flag notification as done for listofreminderids="+listofreminderids); + $.ajax(""+listofreminderids, { + type: "POST", + async: true, + data: { time_js_next_test: time_js_next_test, token: currentToken } + }); + } } else { console.log("No remind to do found, next search at "+time_js_next_test); } @@ -212,9 +252,9 @@ function check_events() { result = 1; } else { - console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because javascript Notification.permission is "+Notification.permission+" (blocked manually or web site is not https or browser is in Private mode)."); + console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because permission is off. Javascript Notification.permission is "+Notification.permission+" (blocked manually or web site is not https or browser is in Private mode)."); - result = 2; // We return a positive so the repeated check will done even if authorization is not yet allowed may be after this check) + result = 2; // We return a positive so the repeated check will be done even if authorization is not yet allowed may be after this check) } if (dolnotif_nb_test_for_page >= 5) { From 5ac18e37117b021c47636e339dbc23a138d8eec9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 13:27:27 +0200 Subject: [PATCH 199/329] FIX Browser Notification ko with firefox --- htdocs/core/js/lib_notification.js.php | 128 ++++++++++++++++--------- 1 file changed, 84 insertions(+), 44 deletions(-) diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 7be8330321f4e..0eae59bfcb3af 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -89,7 +89,7 @@ // We set a delay before launching first test so next check will arrive after the time_auto_update compared to previous one. //var time_first_execution = (time_auto_update + (time_js_next_test - nowtime)) * 1000; //need milliseconds - var time_first_execution = global->MAIN_BROWSER_NOTIFICATION_CHECK_FIRST_EXECUTION); ?>; + var time_first_execution = ; setTimeout(first_execution, time_first_execution * 1000); // Launch a first execution after a time_first_execution delay time_js_next_test = nowtime + time_first_execution; @@ -112,8 +112,17 @@ function first_execution() { function check_events() { var result = 0; dolnotif_nb_test_for_page += 1; + var methodfornotification = ''; - if (Notification.permission === "granted") { + permissionok = 0; + if (methodfornotification == "jsnotification" && Notification.permission == "granted") { + permissionok = 1; + } + if (methodfornotification == "jnotify") { + permissionok = 1; + } + + if (permissionok == 1) { var currentToken = 'notrequired'; const allMeta = document.getElementsByTagName("meta"); for (let i = 0; i < allMeta.length; i++) { @@ -138,10 +147,11 @@ function check_events() { console.log("Retrieved "+arrayofpastreminders.length+" reminders to do."); var audio = null; + var icon = ''; var listofreminderids = ''; var noti = [] @@ -149,61 +159,91 @@ function check_events() { console.log(value); var url = "notdefined"; var title = "Not defined"; - var body = value.label; - var icon = ''; - var image = ''; - if (value.type == 'agenda' && value.location != null && value.location != '') { - body += '\n' + value.location; - } - - if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { - body += '\n' + value.event_date_start_formated; - } + var body = ""; if (value.type == 'agenda') { url = '' + value.id_agenda; title = 'transnoentities('EventReminder')) ?>'; } - var extra = { - icon: icon, - body: body, - lang: 'getDefaultLang(1)); ?>', - tag: value.id_agenda, - requireInteraction: true /* wait that the user click or close the notification */ - /* only supported for persistent notification shown using ServiceWorkerRegistration.showNotification() so disabled */ - /* actions: [{ action: 'action1', title: 'New Button Label' }, { action: 'action2', title: 'Another Button' }] */ - }; - // We release the notify - console.log("Send notification on browser url="+url); - noti[index] = new Notification(title, extra); - if (index==0 && audio) - { - audio.play(); + if (methodfornotification == "jsnotification") { + body = value.label; + if (value.type == 'agenda' && value.location != null && value.location != '') { + body += '\n' + value.location; + } + + if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { + body += '\n' + value.event_date_start_formated; + } + } else { + if (title != "Not defined") { + body = title+'

    '; + } + body += ''; + if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { + body += ' '+value.event_date_start_formated; + } + body += ' - trans("ShowDetails")); ?>'; + body += '
    '+value.label; + if (value.type == 'agenda' && value.location != null && value.location != '') { + body += '
    ' + value.location; + } } - if (noti[index]) { - noti[index].onclick = function (event) { - /* If the user has clicked on button Activate */ - console.log("A click on notification on browser has been done for url="+url); - event.preventDefault(); // prevent the browser from focusing the Notification's tab - window.focus(); - window.open(url, '_blank'); - noti[index].close(); + // We release the notify + console.log("Send notification on browser url="+url+" using method="+methodfornotification); + + // Using the js browser Notification() popup + if (methodfornotification == 'jsnotification') { + var extra = { + icon: icon, + body: body, + lang: 'getDefaultLang(1)); ?>', + tag: value.id_agenda, + requireInteraction: true /* wait that the user click or close the notification */ + /* "actions:" parameter is only supported for persistent notification shown using ServiceWorkerRegistration.showNotification() so disabled */ + /* actions: [{ action: 'action1', title: 'New Button Label' }, { action: 'action2', title: 'Another Button' }] */ }; + noti[index] = new Notification(title, extra); + if (index==0 && audio) + { + audio.play(); + } + + if (noti[index]) { + noti[index].onclick = function (event) { + /* If the user has clicked on button Activate */ + console.log("A click on notification on browser has been done for url="+url); + event.preventDefault(); // prevent the browser from focusing the Notification's tab + window.focus(); + window.open(url, '_blank'); + noti[index].close(); + }; + + listofreminderids = (listofreminderids == '' ? '' : listofreminderids + ',') + value.id_reminder + } + } + + // Using jNotify popup + if (methodfornotification == 'jnotify') { + // Output a message with level "warning" + $.jnotify(body, 'warning', true, { remove: function (){} } ); + listofreminderids = (listofreminderids == '' ? '' : listofreminderids + ',') + value.id_reminder } }); // Update status of all notifications we sent on browser (listofreminderids) - console.log("Flag notification as done for listofreminderids="+listofreminderids); - $.ajax(""+listofreminderids, { - type: "POST", // Usually post or get - async: true, - data: { time_js_next_test: time_js_next_test, token: currentToken } - }); + if (listofreminderids != '') { + console.log("Flag notification as done for listofreminderids="+listofreminderids); + $.ajax(""+listofreminderids, { + type: "POST", + async: true, + data: { time_js_next_test: time_js_next_test, token: currentToken } + }); + } } else { console.log("No remind to do found, next search at "+time_js_next_test); } @@ -212,9 +252,9 @@ function check_events() { result = 1; } else { - console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because javascript Notification.permission is "+Notification.permission+" (blocked manually or web site is not https or browser is in Private mode)."); + console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because permission is off. Javascript Notification.permission is "+Notification.permission+" (blocked manually or web site is not https or browser is in Private mode)."); - result = 2; // We return a positive so the repeated check will done even if authorization is not yet allowed may be after this check) + result = 2; // We return a positive so the repeated check will be done even if authorization is not yet allowed may be after this check) } if (dolnotif_nb_test_for_page >= 5) { From de99be3a109ed5345f52bb2e96ecc7fe1b3ed4c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 13:29:43 +0200 Subject: [PATCH 200/329] Fix setup compatibility --- htdocs/core/js/lib_notification.js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 0eae59bfcb3af..d2d2d3ca2b639 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -112,7 +112,7 @@ function first_execution() { function check_events() { var result = 0; dolnotif_nb_test_for_page += 1; - var methodfornotification = ''; + var methodfornotification = ''; permissionok = 0; if (methodfornotification == "jsnotification" && Notification.permission == "granted") { From 94154af01c30ca3f3dc967b69ca224c48ae55430 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 13:44:03 +0200 Subject: [PATCH 201/329] NEW Browser notifications use now jnotify (fix browser compatibility) --- htdocs/langs/en_US/admin.lang | 4 ++-- htdocs/langs/fr_FR/admin.lang | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index a90c5b15504b8..f8e361e0f56a1 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1879,9 +1879,9 @@ AGENDA_DEFAULT_VIEW = Which view do you want to open by default when selecting m AGENDA_EVENT_PAST_COLOR = Past event color AGENDA_EVENT_CURRENT_COLOR = Current event color AGENDA_EVENT_FUTURE_COLOR = Future event color -AGENDA_REMINDER_BROWSER = Enable event reminder on user's browser (When remind date is reached, a popup is shown by the browser. +AGENDA_REMINDER_BROWSER = Allow event reminders on user's browser (When remind date is reached, a popup is shown by the browser).
    Remind option/delay is defined by the user on event creation. AGENDA_REMINDER_BROWSER_SOUND = Enable sound notification -AGENDA_REMINDER_EMAIL = Enable event reminder by emails (remind option/delay can be defined on each event). +AGENDA_REMINDER_EMAIL = Allow event reminders by emails Dictionaries -> Type of agenda events) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 4264e88c3efd6..b5f5b221024f1 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1879,9 +1879,9 @@ AGENDA_DEFAULT_VIEW = Quel onglet voulez-vous voir ouvrir par défaut quand on c AGENDA_EVENT_PAST_COLOR = Couleur de l'événement précédent AGENDA_EVENT_CURRENT_COLOR = Couleur de l'événement courant AGENDA_EVENT_FUTURE_COLOR = Couleur du prochain événement -AGENDA_REMINDER_BROWSER = Activer le rappel d'événement sur le navigateur de l'utilisateur (lorsque la date de l'événement est atteinte, une popup est affichée sur la navigateur. +AGENDA_REMINDER_BROWSER = Autoriser le rappel d'événement sur le navigateur de l'utilisateur (lorsque la date de l'événement est atteinte, une popup est affichée sur la navigateur).
    L'option de rappel / délai est définie par l'utilisateur à la création de l'événement. AGENDA_REMINDER_BROWSER_SOUND = Activer les notifications sonores. -AGENDA_REMINDER_EMAIL = Activer le rappel d'événement par e-mail (l'option de rappel / délai peut être défini pour chaque événement). +AGENDA_REMINDER_EMAIL = Autoriser le rappel d'événement par e-mail AGENDA_REMINDER_EMAIL_NOTE = Note : la fréquence d'exécution de la tâche %s doit être suffisante pour que le rappel soit envoyé au bon moment. AGENDA_SHOW_LINKED_OBJECT = Afficher l'objet lié dans la vue agenda AGENDA_USE_EVENT_TYPE = Utiliser les types d'événements (gérés dans le menu Configuration -> Dictionnaires -> Type d'événements de l'agenda) From 075d0dee3cdc7023f85be54b2215fc5382137a4f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 14:27:45 +0200 Subject: [PATCH 202/329] FIX Selection of country - state in resource --- htdocs/admin/accountant.php | 1 + htdocs/admin/company.php | 1 + htdocs/product/card.php | 1 + htdocs/resource/card.php | 62 ++++++++++++------- htdocs/resource/class/dolresource.class.php | 9 +-- .../class/html.formresource.class.php | 10 ++- htdocs/societe/card.php | 4 +- 7 files changed, 55 insertions(+), 33 deletions(-) diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 0498ae77302ba..305a58254eb69 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -105,6 +105,7 @@ print "\n".''."\n"; + } + + // Create/Edit object - print ''; + print ''; print ''; print ''; @@ -249,66 +262,67 @@ print '
    '; print ''; + // Type + print ''; + print ''; + + // Description + print ''; + print ''; + // Address print ''; print ''; // Zip print ''; print ''; // Town print ''; print ''; // Origin country print ''; // State - if (!getDolGlobalString('SOCIETE_DISABLE_STATE')) { + $countryid = GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $object->country_id; + if (!getDolGlobalString('SOCIETE_DISABLE_STATE') && $countryid > 0) { if ((getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1 || getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 2)) { print ''; } - // Type - print ''; - print ''; - - // Description - print ''; - print ''; - // Phone print ''; print ''; print ''; + print ''; print ''; // URL diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index cb106b7afeb54..14578eecf8fe3 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -51,17 +51,17 @@ class Dolresource extends CommonObject public $picto = 'resource'; /** - * @var string description + * @var string Description */ public $description; /** - * @var string telephone number + * @var string Phone number */ public $phone; /** - * @var int Maximum users + * @var int|null Maximum users */ public $max_users; @@ -375,9 +375,6 @@ public function update(User $user = null, int $notrigger = 0) if (isset($this->email)) { $this->email = trim($this->email); } - if (!is_numeric($this->max_users)) { - $this->max_users = 0; - } if (isset($this->url)) { $this->url = trim($this->url); } diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 5471287c9f79f..5edb677e85095 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -174,9 +174,11 @@ public function select_resource_list($selected = 0, $htmlname = 'fk_resource', a * @param int $empty 1=peut etre vide, 0 sinon * @param int $noadmininfo 0=Add admin info, 1=Disable admin info * @param int $maxlength Max length of label + * @param int $usejscombo 1=Use jscombo, 0=No js combo + * @param string $morecss Add more css * @return void */ - public function select_types_resource($selected = '', $htmlname = 'type_resource', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0) + public function select_types_resource($selected = '', $htmlname = 'type_resource', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $usejscombo = 0, $morecss = 'minwidth100') { // phpcs:enable global $langs, $user; @@ -192,7 +194,7 @@ public function select_types_resource($selected = '', $htmlname = 'type_resource } $resourcestat->loadCacheCodeTypeResource(); - print ''; if ($empty) { print ''; } @@ -236,6 +238,10 @@ public function select_types_resource($selected = '', $htmlname = 'type_resource } } print ''; + if ($usejscombo) { + print ajax_combobox("select".$htmlname); + } + if ($user->admin && !$noadmininfo) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 783258014f70e..53842b8b2d839 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1193,6 +1193,7 @@ function init_supplier_categ() { } $("#selectcountry_id").change(function() { + console.log("selectcountry_id change"); document.formsoc.action.value="create"; document.formsoc.submit(); }); @@ -1202,7 +1203,7 @@ function init_supplier_categ() { dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error'); - print ''; // Chrome ignor autocomplete + print ''; // Chrome ignores autocomplete print ''; print ''; @@ -2036,6 +2037,7 @@ function init_supplier_categ() { } $("#selectcountry_id").change(function() { + console.log("selectcountry_id change"); document.formsoc.action.value="edit"; document.formsoc.submit(); }); From 5d16292b356448c386ca8151305fce519deb1c09 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 21:49:14 +0200 Subject: [PATCH 203/329] Log --- htdocs/includes/OAuth/Common/Storage/DoliStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index bae563c7dffe8..308d0c7d554ce 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -107,7 +107,7 @@ public function storeAccessToken($service, TokenInterface $tokenobj) //var_dump("storeAccessToken"); //var_dump($token); - dol_syslog("storeAccessToken service=".$service); + dol_syslog(__METHOD__." storeAccessToken service=".$service); $servicepluskeyforprovider = $service; if (!empty($this->keyforprovider)) { From 83cf2c8c57cef4c5dbd44566bd8447d639c108e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 21:53:45 +0200 Subject: [PATCH 204/329] FIX OAuth generation of token for Microsoft, Stripe and Generic --- htdocs/admin/oauth.php | 14 +- htdocs/admin/oauthlogintokens.php | 5 +- htdocs/core/lib/oauth.lib.php | 472 +++++++++--------- .../modules/oauth/generic_oauthcallback.php | 4 +- .../modules/oauth/github_oauthcallback.php | 2 +- .../modules/oauth/google_oauthcallback.php | 2 +- .../oauth/microsoft2_oauthcallback.php | 12 +- .../modules/oauth/microsoft_oauthcallback.php | 9 +- .../oauth/stripelive_oauthcallback.php | 6 +- .../oauth/stripetest_oauthcallback.php | 6 +- 10 files changed, 271 insertions(+), 261 deletions(-) diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 51048ac85a7fb..5d0db624825b9 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -172,15 +172,15 @@ $callbacktodel .= '/core/modules/oauth/google_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); } elseif ($label == 'OAUTH_GITHUB') { $callbacktodel .= '/core/modules/oauth/github_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); - } elseif ($label == 'OAUTH_STRIPE_LIVE') { + } elseif ($label == 'OAUTH_STRIPELIVE') { $callbacktodel .= '/core/modules/oauth/stripelive_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); - } elseif ($label == 'OAUTH_STRIPE_TEST') { + } elseif ($label == 'OAUTH_STRIPETEST') { $callbacktodel .= '/core/modules/oauth/stripetest_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); } elseif ($label == 'OAUTH_MICROSOFT') { $callbacktodel .= '/core/modules/oauth/microsoft_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); } elseif ($label == 'OAUTH_MICROSOFT2') { $callbacktodel .= '/core/modules/oauth/microsoft2_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); - } elseif ($label == 'OAUTH_OTHER') { + } elseif ($label == 'OAUTH_GENERIC') { $callbacktodel .= '/core/modules/oauth/generic_oauthcallback.php?action=delete&keyforprovider='.$provider.'&token='.newToken().'&backtourl='.urlencode($backtourl); } header("Location: ".$callbacktodel); @@ -238,9 +238,11 @@ print ''.$langs->trans("ListOfSupportedOauthProviders").'

    '; +$list = getAllOauth2Array(); + + print '
    '; print ''; - if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { + if ($keyforsupportedoauth2array == 'OAUTH_GENERIC_NAME') { print ''; print ''; print ''; print ''; print ''; } From 554f9da8263916205a01d315fa807cf3e1ba09c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 10:55:54 +0200 Subject: [PATCH 226/329] Fix CSS --- htdocs/theme/md/style.css.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3755aa1f2eb27..5dd886ecb78f1 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3503,10 +3503,10 @@ } .userimg.atoplogin img.userphoto, .userimgatoplogin img.userphoto { /* size for user photo in login bar */ /* border-radius: 8px; */ - width: 20px; - height: 20px; + width: px; + height: px; + border-radius: 50%; background-size: contain; - vertical-align: text-bottom; background-color: #FFF; } img.userphoto { /* size for user photo in lists */ From 9d2058ad9d241ba87233b71da446ea6cd65bc46f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 11:08:13 +0200 Subject: [PATCH 227/329] Debug v21 --- htdocs/societe/card.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b5a2377e3a9f9..563269809c452 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2391,6 +2391,11 @@ function manageprospectcustomer(element) { $s = $modCodeClient->getToolTip($langs, $object, 0); print $form->textwithpicto('', $s, 1); print '
    '.$langs->trans("Ref").'
    '; - print ''."\n"; print ''."\n"; -print ''."\n"; print '
    '; + print ''; if ($action != 'editconditions' && $usercancreate && $caneditfield) { From e36c44c8dce6295479008a674e357e77337d0875 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 13:57:53 +0200 Subject: [PATCH 130/329] Reduce cyclomatic complexity --- htdocs/public/payment/paymentok.php | 130 ++++++++++++++-------------- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 007cbddbef689..49e0273f676ab 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -267,84 +267,82 @@ } -// Validate the payment (for payment mode that need another step after the callback return for this). -if (isModEnabled('paypal')) { - if ($paymentmethod === 'paypal') { // We call this page only if payment is ok on payment system - if ($PAYPALTOKEN) { - // Get on url call - $onlinetoken = $PAYPALTOKEN; - $fulltag = $FULLTAG; - $payerID = $PAYPALPAYERID; - // Set by newpayment.php - $currencyCodeType = $_SESSION['currencyCodeType']; - $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; - $paymentType = $_SESSION['PaymentType']; // Value can be 'Mark', 'Sole', 'Sale' for example - // From env - $ipaddress = $_SESSION['ipaddress']; - - dol_syslog("Call paymentok with token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment'); - - // Validate record - if (!empty($paymentType)) { - dol_syslog("We call GetExpressCheckoutDetails", LOG_DEBUG, 0, '_payment'); - $resArray = getDetails($onlinetoken); - //var_dump($resarray); - - $ack = strtoupper($resArray["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { - // Nothing to do - dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); - } else { - dol_syslog("Call to GetExpressCheckoutDetails return error: ".json_encode($resArray), LOG_WARNING, 0, '_payment'); - } - - dol_syslog("We call DoExpressCheckoutPayment token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment'); - $resArray2 = confirmPayment($onlinetoken, $paymentType, $currencyCodeType, $payerID, $ipaddress, $FinalPaymentAmt, $fulltag); - //var_dump($resarray); +// Another step to validate the payment (for payment modes like Paypal that need another step after the callback return for this). +if (isModEnabled('paypal') && $paymentmethod === 'paypal') { // We call this page only if payment is ok on payment system + if ($PAYPALTOKEN) { + // Get on url call + $onlinetoken = $PAYPALTOKEN; + $fulltag = $FULLTAG; + $payerID = $PAYPALPAYERID; + // Set by newpayment.php + $currencyCodeType = $_SESSION['currencyCodeType']; + $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; + $paymentType = $_SESSION['PaymentType']; // Value can be 'Mark', 'Sole', 'Sale' for example + // From env + $ipaddress = $_SESSION['ipaddress']; + + dol_syslog("Call paymentok with token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment'); + + // Validate record + if (!empty($paymentType)) { + dol_syslog("We call GetExpressCheckoutDetails", LOG_DEBUG, 0, '_payment'); + $resArray = getDetails($onlinetoken); + //var_dump($resarray); + + $ack = strtoupper($resArray["ACK"]); + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { + // Nothing to do + dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); + } else { + dol_syslog("Call to GetExpressCheckoutDetails return error: ".json_encode($resArray), LOG_WARNING, 0, '_payment'); + } - $ack = strtoupper($resArray2["ACK"]); - if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { - dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); + dol_syslog("We call DoExpressCheckoutPayment token=".$onlinetoken." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType." payerID=".$payerID." ipaddress=".$ipaddress." FinalPaymentAmt=".$FinalPaymentAmt." fulltag=".$fulltag, LOG_DEBUG, 0, '_payment'); + $resArray2 = confirmPayment($onlinetoken, $paymentType, $currencyCodeType, $payerID, $ipaddress, $FinalPaymentAmt, $fulltag); + //var_dump($resarray); - $object->source = $source; - $object->ref = $ref; - $object->payerID = $payerID; - $object->fulltag = $fulltag; - $object->resArray = $resArray2; + $ack = strtoupper($resArray2["ACK"]); + if ($ack == "SUCCESS" || $ack == "SUCCESSWITHWARNING") { + dol_syslog("Call to GetExpressCheckoutDetails return ".$ack, LOG_DEBUG, 0, '_payment'); - // resArray was built from a string like that - // TOKEN=EC%2d1NJ057703V9359028&TIMESTAMP=2010%2d11%2d01T11%3a40%3a13Z&CORRELATIONID=1efa8c6a36bd8&ACK=Success&VERSION=56&BUILD=1553277&TRANSACTIONID=9B994597K9921420R&TRANSACTIONTYPE=expresscheckout&PAYMENTTYPE=instant&ORDERTIME=2010%2d11%2d01T11%3a40%3a12Z&AMT=155%2e57&FEEAMT=5%2e54&TAXAMT=0%2e00&CURRENCYCODE=EUR&PAYMENTSTATUS=Completed&PENDINGREASON=None&REASONCODE=None - $PAYMENTSTATUS = urldecode($resArray2["PAYMENTSTATUS"]); // Should contains 'Completed' - $TRANSACTIONID = urldecode($resArray2["TRANSACTIONID"]); - $TAXAMT = urldecode($resArray2["TAXAMT"]); - $NOTE = urldecode($resArray2["NOTE"]); + $object->source = $source; + $object->ref = $ref; + $object->payerID = $payerID; + $object->fulltag = $fulltag; + $object->resArray = $resArray2; - $ispaymentok = true; - } else { - dol_syslog("Call to DoExpressCheckoutPayment return error: ".json_encode($resArray2), LOG_WARNING, 0, '_payment'); + // resArray was built from a string like that + // TOKEN=EC%2d1NJ057703V9359028&TIMESTAMP=2010%2d11%2d01T11%3a40%3a13Z&CORRELATIONID=1efa8c6a36bd8&ACK=Success&VERSION=56&BUILD=1553277&TRANSACTIONID=9B994597K9921420R&TRANSACTIONTYPE=expresscheckout&PAYMENTTYPE=instant&ORDERTIME=2010%2d11%2d01T11%3a40%3a12Z&AMT=155%2e57&FEEAMT=5%2e54&TAXAMT=0%2e00&CURRENCYCODE=EUR&PAYMENTSTATUS=Completed&PENDINGREASON=None&REASONCODE=None + $PAYMENTSTATUS = urldecode($resArray2["PAYMENTSTATUS"]); // Should contains 'Completed' + $TRANSACTIONID = urldecode($resArray2["TRANSACTIONID"]); + $TAXAMT = urldecode($resArray2["TAXAMT"]); + $NOTE = urldecode($resArray2["NOTE"]); - //Display a user friendly Error on the page using any of the following error information returned by PayPal - $ErrorCode = urldecode($resArray2["L_ERRORCODE0"]); - $ErrorShortMsg = urldecode($resArray2["L_SHORTMESSAGE0"]); - $ErrorLongMsg = urldecode($resArray2["L_LONGMESSAGE0"]); - $ErrorSeverityCode = urldecode($resArray2["L_SEVERITYCODE0"]); - } + $ispaymentok = true; } else { - $ErrorCode = "SESSIONEXPIRED"; - $ErrorLongMsg = "Session expired. Can't retrieve PaymentType. Payment has not been validated."; - $ErrorShortMsg = "Session expired"; + dol_syslog("Call to DoExpressCheckoutPayment return error: ".json_encode($resArray2), LOG_WARNING, 0, '_payment'); - dol_syslog($ErrorLongMsg, LOG_WARNING, 0, '_payment'); - dol_print_error(null, 'Session expired'); + //Display a user friendly Error on the page using any of the following error information returned by PayPal + $ErrorCode = urldecode($resArray2["L_ERRORCODE0"]); + $ErrorShortMsg = urldecode($resArray2["L_SHORTMESSAGE0"]); + $ErrorLongMsg = urldecode($resArray2["L_LONGMESSAGE0"]); + $ErrorSeverityCode = urldecode($resArray2["L_SEVERITYCODE0"]); } } else { - $ErrorCode = "PAYPALTOKENNOTDEFINED"; - $ErrorLongMsg = "The parameter PAYPALTOKEN was not defined. Payment has not been validated."; - $ErrorShortMsg = "Parameter PAYPALTOKEN not defined"; + $ErrorCode = "SESSIONEXPIRED"; + $ErrorLongMsg = "Session expired. Can't retrieve PaymentType. Payment has not been validated."; + $ErrorShortMsg = "Session expired"; dol_syslog($ErrorLongMsg, LOG_WARNING, 0, '_payment'); - dol_print_error(null, 'PAYPALTOKEN not defined'); + dol_print_error(null, 'Session expired'); } + } else { + $ErrorCode = "PAYPALTOKENNOTDEFINED"; + $ErrorLongMsg = "The parameter PAYPALTOKEN was not defined. Payment has not been validated."; + $ErrorShortMsg = "Parameter PAYPALTOKEN not defined"; + + dol_syslog($ErrorLongMsg, LOG_WARNING, 0, '_payment'); + dol_print_error(null, 'PAYPALTOKEN not defined'); } } From 48034bd031e9b28c21ac878573ca7ceff8c7ce39 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 15:23:24 +0200 Subject: [PATCH 131/329] WIP IPN for charge.dispute.funds_withdrawn --- htdocs/compta/paiement.php | 2 +- htdocs/core/class/commoninvoice.class.php | 7 +- htdocs/public/stripe/ipn.php | 160 +++++++++++++++++++++- 3 files changed, 163 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 292b3e476f564..0d7c69e7503f8 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -123,7 +123,7 @@ if ($result <= 0) { dol_print_error($db); } - $amountsresttopay[$cursorfacid] = price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement()); + $amountsresttopay[$cursorfacid] = price2num($tmpinvoice->total_ttc - $tmpinvoice->getSommePaiement(0)); if ($amounts[$cursorfacid]) { // Check amount if ($amounts[$cursorfacid] && (abs((float) $amounts[$cursorfacid]) > abs((float) $amountsresttopay[$cursorfacid]))) { diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 9444831519960..028f4d47ece43 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -609,7 +609,8 @@ public function is_erasable() } /** - * Return if an invoice was dispatched into bookkeeping + * Return if an invoice was transferred into accountnancy. + * This is true if at least on line was transferred into table accounting_bookkeeping * * @return int Return integer <0 if KO, 0=no, 1=yes */ @@ -622,7 +623,9 @@ public function getVentilExportCompta() $type = 'supplier_invoice'; } - $sql = " SELECT COUNT(ab.rowid) as nb FROM ".$this->db->prefix()."accounting_bookkeeping as ab WHERE ab.doc_type='".$this->db->escape($type)."' AND ab.fk_doc = ".((int) $this->id); + $sql = " SELECT COUNT(ab.rowid) as nb FROM ".$this->db->prefix()."accounting_bookkeeping as ab"; + $sql .= " WHERE ab.doc_type='".$this->db->escape($type)."' AND ab.fk_doc = ".((int) $this->id); + $resql = $this->db->query($sql); if ($resql) { $obj = $this->db->fetch_object($resql); diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index b7cec54d44caf..06821dccbce7c 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -175,6 +175,7 @@ if ($event->type == 'payout.created') { + // When a payout is create by Stripe to transfer money to your account $error = 0; $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s', $event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); @@ -217,6 +218,7 @@ return -1; } } elseif ($event->type == 'payout.paid') { + // When a payout to transfer money to your account is completely done $error = 0; $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", null, 'chaine', 0, '', $conf->entity); if ($result) { @@ -229,10 +231,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $accountfrom = new Account($db); - $accountfrom->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS')); + $accountfrom->fetch(getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS')); $accountto = new Account($db); - $accountto->fetch(getDolGlobalString('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS')); + $accountto->fetch(getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_BANKTRANSFERS')); if (($accountto->id != $accountfrom->id) && empty($error)) { $bank_line_id_from = 0; @@ -313,11 +315,14 @@ } elseif ($event->type == 'customer.source.delete') { //TODO: delete customer's source } elseif ($event->type == 'customer.deleted') { + // When a customer account is delete on Stripe side $db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_account WHERE key_account = '".$db->escape($event->data->object->id)."' and site='stripe'"; $db->query($sql); $db->commit(); -} elseif ($event->type == 'payment_intent.succeeded') { // Called when making payment with PaymentIntent method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). +} elseif ($event->type == 'payment_intent.succeeded') { + // Called when making payment with PaymentIntent method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). + //dol_syslog("object = ".var_export($event->data, true)); include_once DOL_DOCUMENT_ROOT . '/compta/paiement/class/paiement.class.php'; global $stripearrayofkeysbyenv; @@ -596,6 +601,7 @@ dol_syslog("Nothing to do in database because we don't know paymentTypeIdInDolibarr"); } } elseif ($event->type == 'payment_intent.payment_failed') { + // When a try to take payment has failed. Useful for asynchronous SEPA payment that fails. dol_syslog("A try to make a payment has failed"); $object = $event->data->object; @@ -691,6 +697,7 @@ } elseif ($event->type == 'checkout.session.completed') { // Called when making payment with new Checkout method ($conf->global->STRIPE_USE_NEW_CHECKOUT is on). // TODO: create fees } elseif ($event->type == 'payment_method.attached') { + // When we link a payment method with a customer on Stripe side require_once DOL_DOCUMENT_ROOT.'/societe/class/companypaymentmode.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php'; $societeaccount = new SocieteAccount($db); @@ -730,10 +737,13 @@ $db->commit(); } else { $db->rollback(); + http_response_code(500); + return -1; } } } } elseif ($event->type == 'payment_method.updated') { + // When we update a payment method on Stripe side require_once DOL_DOCUMENT_ROOT.'/societe/class/companypaymentmode.class.php'; $companypaymentmode = new CompanyPaymentMode($db); $companypaymentmode->fetch(0, '', 0, '', " AND stripe_card_ref = '".$db->escape($event->data->object->id)."'"); @@ -767,6 +777,7 @@ } } } elseif ($event->type == 'payment_method.detached') { + // When we remove a payment method on Stripe side $db->begin(); $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib WHERE number = '".$db->escape($event->data->object->id)."' and status = ".((int) $servicestatus); $db->query($sql); @@ -777,6 +788,149 @@ // Deprecated. TODO: Redirect to paymentko.php } elseif (($event->type == 'source.chargeable') && ($event->data->object->type == 'three_d_secure') && ($event->data->object->three_d_secure->authenticated == true)) { // Deprecated. +} elseif ($event->type == 'charge.dispute.closed') { + // When a dispute to cancel a SEPA payment is finished + dol_syslog("object = ".var_export($event->data, true)); +} elseif ($event->type == 'charge.dispute.funds_withdrawn') { + // When a dispute/withdraw to cancel a SEPA payment is done + dol_syslog("object = ".var_export($event->data, true)); + + global $stripearrayofkeysbyenv; + $error = 0; + $errormsg = ''; + $object = $event->data->object; + $TRANSACTIONID = $object->payment_intent; + $ipaddress = $object->metadata->ipaddress; + $now = dol_now(); + $currencyCodeType = strtoupper($object->currency); + $paymentmethodstripeid = $object->payment_method; + $customer_id = $object->customer; + $reason = $object->reason; + $amountdisputestripe = $object->amoutndispute; // In stripe format + $amountdispute = $amountdisputestripe; // In real currency format + + $invoice_id = ""; + $paymentTypeCode = ""; // payment type according to Stripe + $paymentTypeCodeInDolibarr = ""; // payment type according to Dolibarr + $payment_amount = 0; + $payment_amountInDolibarr = 0; + + dol_syslog("Try to find the payment in database for the payment_intent id = ".$TRANSACTIONID); + + $sql = "SELECT pi.rowid, pi.fk_facture, pi.fk_prelevement_bons, pi.amount, pi.type, pi.traite"; + $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_demande as pi"; + $sql .= " WHERE pi.ext_payment_id = '".$db->escape($TRANSACTIONID)."'"; + $sql .= " AND pi.ext_payment_site = '".$db->escape($service)."'"; + + $result = $db->query($sql); + if ($result) { + $obj = $db->fetch_object($result); + if ($obj) { + if ($obj->type == 'ban') { + // This is a direct-debit with an order (llx_bon_prelevement). + $pdid = $obj->rowid; + $invoice_id = $obj->fk_facture; + $directdebitorcreditransfer_id = $obj->fk_prelevement_bons; + $payment_amountInDolibarr = $obj->amount; + $paymentTypeCodeInDolibarr = $obj->type; + + dol_syslog("Found the payment intent for ban in database (pdid = ".$pdid." directdebitorcreditransfer_id=".$directdebitorcreditransfer_id.")"); + } + if ($obj->type == 'card' || empty($obj->type)) { + // This is a card payment. + $pdid = $obj->rowid; + $invoice_id = $obj->fk_facture; + $payment_amountInDolibarr = $obj->amount; + $paymentTypeCodeInDolibarr = empty($obj->type) ? 'card' : $obj->type; + + dol_syslog("Found the payment intent for card in database (pdid = ".$pdid." directdebitorcreditransfer_id=".$directdebitorcreditransfer_id.")"); + } + } else { + dol_syslog("Payment intent ".$TRANSACTIONID." not found into database, so ignored."); + http_response_code(200); + print "Payment intent ".$TRANSACTIONID." not found into database, so ignored."; + return 1; + } + } else { + http_response_code(500); + print $db->lasterror(); + return -1; + } + + dol_syslog("objinvoiceid=".$invoice_id); + $tmpinvoice = new Facture($db); + $tmpinvoice->fetch($invoice_id); + $tmpinvoice->fetch_thirdparty(); + + dol_syslog("The payment disputed is ".$amountdispute." and the invoice is ".$payment_amountInDolibarr); + + if ($amountdispute != $amountdispute) { + http_response_code(500); + print "The payment disputed is ".$amountdispute." and the invoice is ".$payment_amountInDolibarr.". Amount differs, we don't know what to do."; + return -1; + } + + $accountfrom = new Account($db); + $accountfrom->fetch(getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS')); + + // Now we add a negative payment + $paiement = new Paiement($db); + + $amounts = array(); + $amounts[$tmpinvoice->id] = -1 * price2num($payment_amountInDolibarr); + + $paiement->datepaye = dol_now(); + $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id + /*$paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paiement->multicurrency_code = $multicurrency_code; // Array with all currency of payments dispatching + $paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching + */ + $paiement->paiementid = dol_getIdFromCode($db, 'PRE', 'c_paiement', 'code', 'id', 1); + $paiement->num_payment = $object->id; // A string like 'du_...' + $paiement->note_public = 'Fund withdrawn by bank. Reason: '.$reason; + $paiement->note_private = ''; + $paiement->fk_account = $accountfrom->id; + + $db->begin(); + + $alreadytransferedinaccounting = $tmpinvoice->getVentilExportCompta(); + + if ($alreadytransferedinaccounting) { + // TODO Test if invoice already in accountancy. + // What to do ? + $errormsg = 'Error: the invoice '.$tmpinvoice->id.' is already transferred into accounting. Don\'t know what to do.'; + $error++; + } + + if (! $error && $tmpinvoice->status == Facture::STATUS_CLOSED) { + // Switch back the invoice to status validated + $result = $tmpinvoice->setStatut(Facture::STATUS_VALIDATED); + if ($result < 0) { + $errormsg = $tmpinvoice->error.implode(', ', $tmpinvoice->errors); + $error++; + } + } + + if (! $error) { + $paiement_id = $paiement->create($user, 0, $tmpinvoice->thirdparty); // This include regenerating documents + if ($paiement_id < 0) { + $errormsg = $paiement->error.implode(', ', $paiement->errors); + $error++; + } + } + + if (!$error) { + //$db->commit(); // Code not yet enough tested + $db->rollback(); + http_response_code(500); + return -1; + } else { + $db->rollback(); + http_response_code(500); + print $errormsg; + return -1; + } } + // End of page. Default return HTTP code will be 200 From 231fc6ce707925f9ea5c9156b65287b98b44131d Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:27:24 +0200 Subject: [PATCH 132/329] FIX: if you call fetchLines several times, your $object->lines contains duplicates (#31167) --- htdocs/core/class/commonobject.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 547a6029e4030..4182c05dde727 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9297,6 +9297,7 @@ public function fetchLinesCommon($morewhere = '') if ($resql) { $num_rows = $this->db->num_rows($resql); $i = 0; + $this->lines = array(); while ($i < $num_rows) { $obj = $this->db->fetch_object($resql); if ($obj) { From aa7db1adf6a8a110f5a7b97147622ad5451d8f61 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 15:29:24 +0200 Subject: [PATCH 133/329] Doc --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 419167af0b179..6fd9bd75908ed 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -10352,7 +10352,7 @@ public function fetchCommon($id, $ref = null, $morewhere = '', $noextrafields = /** * Load object in memory from the database * - * @param string $morewhere More SQL filters (' AND ...') + * @param string $morewhere More SQL filters (' AND ...'). No user coming from user input are allowed here. Only hard coded values. * @param int<0,1> $noextrafields 0=Default to load extrafields, 1=No extrafields * @return int<-1,1> Return integer <0 if KO, 0 if not found, >0 if OK */ From 119456ce0f96fbefb0ef1f9997344cd3d44dde1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 15:29:56 +0200 Subject: [PATCH 134/329] fix phpstan (#31182) * fix phpstan * fix phpstan --------- Co-authored-by: Laurent Destailleur --- htdocs/hrm/compare.php | 14 +++++++------- phpstan.neon.dist | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/hrm/compare.php b/htdocs/hrm/compare.php index 9974d4f83471f..9e40bd8bcfd32 100644 --- a/htdocs/hrm/compare.php +++ b/htdocs/hrm/compare.php @@ -121,10 +121,10 @@ $fk_usergroup2 = 0; $fk_job = (int) GETPOST('fk_job'); if ($fk_job <= 0) { - $fk_usergroup2 = GETPOST('fk_usergroup2'); + $fk_usergroup2 = GETPOSTINT('fk_usergroup2'); } -$fk_usergroup1 = GETPOST('fk_usergroup1'); +$fk_usergroup1 = GETPOSTINT('fk_usergroup1'); ?> @@ -237,11 +237,11 @@ $job = new Job($db); $job->fetch($fk_job); $userlist2 = '
      -
    • -

      ' . $job->label . '

      -

      ' . $job->description . '

      -
    • -
    '; +
  • +

    ' . $job->label . '

    +

    ' . $job->description . '

    +
  • + '; } else { $userlist2 = displayUsersListWithPicto($TUser2, $fk_usergroup2, 'list2'); $TSkill2 = getSkillForUsers($TUser2); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d985f2d14740d..89b88e27b1503 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -84,7 +84,7 @@ parameters: - '# EmailCollector::getpart\(\) expects string#' - '#expects int, float#' - '#::saveboxorder\(\) expects int, array#' - - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process|displayUsersListWithPicto) expects int, array\|string given.#' + - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' - '#(?:ProductFournisseur::logPrice\(\)) expects float\|null#' - '#(?:(?:Asset::addDepreciationL|Facture(?:(?:(?:Fournisseur)?::add|Fournisseur::update)l))ine\(\)|calcul_price_total|dol_convertToWord|(?:loanCalcMonthlyPaymen|print_paypal_redirec)t) expects float, string given.#' From 292206fb229a6cc25fdb2c0fc5870bd73b9a069a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 15:38:20 +0200 Subject: [PATCH 135/329] Fix init of $arrayfields --- htdocs/adherents/list.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 9c0b764330455..d5a617d2e0f55 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -185,16 +185,8 @@ 'd.statut' => array('label' => "Status"), 'd.import_key' => array('label' => "ImportId"), ); - -// Extra fields -include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; - -$object->fields = dol_sort_array($object->fields, 'position'); -//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); - // Complete array of fields for columns $tableprefix = 'd'; -$arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { @@ -208,9 +200,13 @@ ); } } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; +$object->fields = dol_sort_array($object->fields, 'position'); +//$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); + $arrayfields = dol_sort_array($arrayfields, 'position'); '@phan-var-force array,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan From 74b67eb6c6c1274d6e0a8385b3b3a3a375da4875 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:57:05 +0200 Subject: [PATCH 136/329] FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) --- htdocs/core/lib/product.lib.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index f54f39b20f31c..003ab66ad2fcc 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -363,7 +363,7 @@ function show_stats_for_company($product, $socid) print '
    '; print ''; } @@ -381,7 +381,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } @@ -399,7 +399,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } @@ -417,7 +417,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } @@ -435,7 +435,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } @@ -453,7 +453,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } @@ -472,7 +472,7 @@ function show_stats_for_company($product, $socid) print ''; print ''; } From bda0a99c03339be6238e2b977454a9536a1e4432 Mon Sep 17 00:00:00 2001 From: Zephyriony <142790847+zephyriony@users.noreply.github.com> Date: Sun, 29 Sep 2024 16:05:15 +0200 Subject: [PATCH 137/329] NEW #31103 (#31140) * NEW #31103 * Update card.php * Update card.php --------- Co-authored-by: Laurent Destailleur --- htdocs/ticket/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index fb6a35000c698..07bad719989a7 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -314,7 +314,7 @@ } // Auto assign user - if (getDolGlobalString('TICKET_AUTO_ASSIGN_USER_CREATE')) { + if ((empty($fk_user_assign) && getDolGlobalInt('TICKET_AUTO_ASSIGN_USER_CREATE') == 1) || (getDolGlobalInt('TICKET_AUTO_ASSIGN_USER_CREATE') == 2)) { $result = $object->assignUser($user, $user->id, 1); $object->add_contact($user->id, "SUPPORTTEC", 'internal'); } From c5163d0d9674f84059f8843977c99d6c20523183 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 17:26:51 +0200 Subject: [PATCH 138/329] CSS --- htdocs/core/lib/functions.lib.php | 6 +++--- htdocs/theme/eldy/global.inc.php | 10 +++++----- htdocs/theme/md/style.css.php | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f230354af7b07..a6d51e94c691f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6406,7 +6406,7 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '', //print 'totalnboflines='.$totalnboflines.'-savlimit='.$savlimit.'-limit='.$limit.'-num='.$num.'-nextpage='.$nextpage.'-hideselectlimit='.$hideselectlimit.'-hidenavigation='.$hidenavigation; print "\n"; - print "\n"; + print "\n"; print '
    '; print $langs->trans('PaymentConditionsShort'); print ''; print $product->stats_propale['nb']; print ''; - print $product->stats_propale['qty']; + print price($product->stats_propale['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_proposal_supplier['nb']; print ''; - print $product->stats_proposal_supplier['qty']; + print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_commande['nb']; print ''; - print $product->stats_commande['qty']; + print price($product->stats_commande['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_commande_fournisseur['nb']; print ''; - print $product->stats_commande_fournisseur['qty']; + print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_facture['nb']; print ''; - print $product->stats_facture['qty']; + print price($product->stats_facture['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_facture_fournisseur['nb']; print ''; - print $product->stats_facture_fournisseur['qty']; + print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0); print '
    '; print $product->stats_contrat['nb']; print ''; - print $product->stats_contrat['qty']; + print price($product->stats_contrat['qty'], 1, $langs, 0, 0); print '
    '; // maring bottom must be same than into load_fiche_tire // Left @@ -6417,9 +6417,9 @@ function print_barre_liste($title, $page, $file, $options = '', $sortfield = '', print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a603148f5d272..40b62833cd29c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2483,9 +2483,6 @@ div.fiche>table:first-child { margin-bottom: 15px; } -div.fiche>table.table-fiche-title { - margin-bottom: 12px; -} div.fichecenter { width: 100%; clear: both; /* This is to have div fichecenter that are true rectangles */ @@ -5316,8 +5313,11 @@ table.table-fiche-title .col-title div.titre, .col-center .btnTitle-icon, .col-right .btnTitle-icon { line-height: 40px; } -table.table-fiche-title { - margin-bottom: 16px; +table.table-fiche-title .col-title div.titre span { + line-height: normal; +} +table.table-fiche-title, div.fiche>table.table-fiche-title { + margin-bottom: 18px; } .fichehalfleft table.table-fiche-title, .fichehalfright table.table-fiche-title { margin-bottom: 8px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index df8b1599069d6..b7508b8ab9f92 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -5324,7 +5324,7 @@ } table.notopnoleftnoright.table-fiche-title { - margin-bottom: 14px; + margin-bottom: 15px; } .fichehalfleft table.table-fiche-title, .fichehalfright table.table-fiche-title { margin-bottom: 8px; @@ -5334,6 +5334,9 @@ table.table-fiche-title .col-title div.titre, .col-center .btnTitle-icon, .col-right .btnTitle-icon { line-height: 40px; } +table.table-fiche-title .col-title div.titre span { + line-height: normal; +} div.backgreypublicpayment { background-color: #f0f0f0; From eb876f42678b7172c5fc2d83928577ab87247578 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 18:13:46 +0200 Subject: [PATCH 139/329] Fix phan --- htdocs/public/stripe/ipn.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 06821dccbce7c..d269608c4d99a 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -864,7 +864,7 @@ dol_syslog("The payment disputed is ".$amountdispute." and the invoice is ".$payment_amountInDolibarr); - if ($amountdispute != $amountdispute) { + if ($amountdispute != $payment_amountInDolibarr) { http_response_code(500); print "The payment disputed is ".$amountdispute." and the invoice is ".$payment_amountInDolibarr.". Amount differs, we don't know what to do."; return -1; @@ -877,7 +877,7 @@ $paiement = new Paiement($db); $amounts = array(); - $amounts[$tmpinvoice->id] = -1 * price2num($payment_amountInDolibarr); + $amounts[$tmpinvoice->id] = -1 * $payment_amountInDolibarr; $paiement->datepaye = dol_now(); $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id From deda809dcad553744d16221a9689b25a708aa4b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 20:16:41 +0200 Subject: [PATCH 140/329] FIX amount of payment in getListOfPayments for multicurrency mode --- htdocs/core/class/commoninvoice.class.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 028f4d47ece43..5854bcf52d002 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -439,7 +439,7 @@ public function getIdReplacingInvoice($option = '') * * @see $error Empty string '' if no error. * - * @param string $filtertype 1 to filter on type of payment == 'PRE' + * @param string $filtertype 1 to filter on type of payment == 'PRE' for the payment lines * @param int $multicurrency Return multicurrency_amount instead of amount * @return array Array with list of payments */ @@ -482,7 +482,11 @@ public function getListOfPayments($filtertype = '', $multicurrency = 0) $i = 0; while ($i < $num) { $obj = $this->db->fetch_object($resql); - $tmp = array('amount' => $obj->amount, 'type' => $obj->code, 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); + if ($multicurrency) { + $tmp = array('amount' => $obj->multicurrency_amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); + } else { + $tmp = array('amount' => $obj->amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); + } if (!empty($field3)) { $tmp['ref_ext'] = $obj->ref_ext; } @@ -494,7 +498,7 @@ public function getListOfPayments($filtertype = '', $multicurrency = 0) } $this->db->free($resql); - //look for credit notes and discounts and deposits + // look for credit notes and discounts and deposits $sql = ''; if ($this->element == 'facture' || $this->element == 'invoice') { $sql = "SELECT rc.amount_ttc as amount, rc.multicurrency_amount_ttc as multicurrency_amount, rc.datec as date, f.ref as ref, rc.description as type"; @@ -516,9 +520,9 @@ public function getListOfPayments($filtertype = '', $multicurrency = 0) while ($i < $num) { $obj = $this->db->fetch_object($resql); if ($multicurrency) { - $retarray[] = array('amount' => $obj->multicurrency_amount, 'type' => $obj->type, 'date' => $obj->date, 'num' => '0', 'ref' => $obj->ref); + $retarray[] = array('amount' => $obj->multicurrency_amount, 'type' => $obj->type, 'typeline' => 'discount', 'date' => $obj->date, 'num' => '0', 'ref' => $obj->ref); } else { - $retarray[] = array('amount' => $obj->amount, 'type' => $obj->type, 'date' => $obj->date, 'num' => '', 'ref' => $obj->ref); + $retarray[] = array('amount' => $obj->amount, 'type' => $obj->type, 'typeline' => 'discount', 'date' => $obj->date, 'num' => '', 'ref' => $obj->ref); } $i++; } From c8d86f8a56e0eb9d2db7b7f481054871c54e30f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 29 Sep 2024 20:32:09 +0200 Subject: [PATCH 141/329] FIX List of payment must be visible event they exists even if total=0 --- htdocs/core/class/commoninvoice.class.php | 92 ++++++++++--------- .../modules/facture/doc/pdf_crabe.modules.php | 5 +- .../facture/doc/pdf_octopus.modules.php | 5 +- .../facture/doc/pdf_sponge.modules.php | 3 +- 4 files changed, 59 insertions(+), 46 deletions(-) diff --git a/htdocs/core/class/commoninvoice.class.php b/htdocs/core/class/commoninvoice.class.php index 5854bcf52d002..f8b2b8eae5399 100644 --- a/htdocs/core/class/commoninvoice.class.php +++ b/htdocs/core/class/commoninvoice.class.php @@ -439,15 +439,15 @@ public function getIdReplacingInvoice($option = '') * * @see $error Empty string '' if no error. * - * @param string $filtertype 1 to filter on type of payment == 'PRE' for the payment lines - * @param int $multicurrency Return multicurrency_amount instead of amount + * @param string $filtertype 1 to filter on type of payment == 'PRE' for the payment lines + * @param int $multicurrency Return multicurrency_amount instead of amount + * @param int $mode 0=payments + discount, 1=payments only * @return array Array with list of payments */ - public function getListOfPayments($filtertype = '', $multicurrency = 0) + public function getListOfPayments($filtertype = '', $multicurrency = 0, $mode = 0) { $retarray = array(); - // By default no error, list can be empty. - $this->error = ''; + $this->error = ''; // By default no error, list can be empty. $table = 'paiement_facture'; $table2 = 'paiement'; @@ -465,40 +465,50 @@ public function getListOfPayments($filtertype = '', $multicurrency = 0) $sharedentity = 'facture_fourn'; } - $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3 . $field4; - $sql .= " FROM ".$this->db->prefix().$table." as pf, ".$this->db->prefix().$table2." as p, ".$this->db->prefix()."c_paiement as t"; - $sql .= " WHERE pf.".$field." = ".((int) $this->id); - $sql .= " AND pf.".$field2." = p.rowid"; - $sql .= ' AND p.fk_paiement = t.id'; - $sql .= ' AND p.entity IN ('.getEntity($sharedentity).')'; - if ($filtertype) { - $sql .= " AND t.code='PRE'"; - } + // List of payments + if (empty($mode) || $mode == 1) { + $sql = "SELECT p.ref, pf.amount, pf.multicurrency_amount, p.fk_paiement, p.datep, p.num_paiement as num, t.code".$field3 . $field4; + $sql .= " FROM ".$this->db->prefix().$table." as pf, ".$this->db->prefix().$table2." as p, ".$this->db->prefix()."c_paiement as t"; + $sql .= " WHERE pf.".$field." = ".((int) $this->id); + $sql .= " AND pf.".$field2." = p.rowid"; + $sql .= ' AND p.fk_paiement = t.id'; + $sql .= ' AND p.entity IN ('.getEntity($sharedentity).')'; + if ($filtertype) { + $sql .= " AND t.code='PRE'"; + } - dol_syslog(get_class($this)."::getListOfPayments", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $num = $this->db->num_rows($resql); - $i = 0; - while ($i < $num) { - $obj = $this->db->fetch_object($resql); - if ($multicurrency) { - $tmp = array('amount' => $obj->multicurrency_amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); - } else { - $tmp = array('amount' => $obj->amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); - } - if (!empty($field3)) { - $tmp['ref_ext'] = $obj->ref_ext; - } - if (!empty($field4)) { - $tmp['fk_bank_line'] = $obj->fk_bank; + dol_syslog(get_class($this)."::getListOfPayments filtertype=".$filtertype." multicurrency=".$multicurrency." mode=".$mode, LOG_DEBUG); + + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $obj = $this->db->fetch_object($resql); + if ($multicurrency) { + $tmp = array('amount' => $obj->multicurrency_amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); + } else { + $tmp = array('amount' => $obj->amount, 'type' => $obj->code, 'typeline' => 'payment', 'date' => $obj->datep, 'num' => $obj->num, 'ref' => $obj->ref); + } + if (!empty($field3)) { + $tmp['ref_ext'] = $obj->ref_ext; + } + if (!empty($field4)) { + $tmp['fk_bank_line'] = $obj->fk_bank; + } + $retarray[] = $tmp; + $i++; } - $retarray[] = $tmp; - $i++; + $this->db->free($resql); + } else { + $this->error = $this->db->lasterror(); + dol_print_error($this->db); + return array(); } - $this->db->free($resql); + } - // look for credit notes and discounts and deposits + // Look for credit notes and discounts and deposits + if (empty($mode) || $mode == 2) { $sql = ''; if ($this->element == 'facture' || $this->element == 'invoice') { $sql = "SELECT rc.amount_ttc as amount, rc.multicurrency_amount_ttc as multicurrency_amount, rc.datec as date, f.ref as ref, rc.description as type"; @@ -532,14 +542,14 @@ public function getListOfPayments($filtertype = '', $multicurrency = 0) return array(); } $this->db->free($resql); + } else { + $this->error = $this->db->lasterror(); + dol_print_error($this->db); + return array(); } - - return $retarray; - } else { - $this->error = $this->db->lasterror(); - dol_print_error($this->db); - return array(); } + + return $retarray; } diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 26d7e60057098..fc5232ee3b54e 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -866,7 +866,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $posy = $this->_tableau_tot($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs, $outputlangsbis); // Display Payments area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { + $listofpayments = $object->getListOfPayments('', 0, 1); + if ((count($listofpayments) || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { $posy = $this->_tableau_versements($pdf, $object, $posy, $outputlangs, $heightforfooter); } @@ -1013,7 +1014,7 @@ protected function _tableau_versements(&$pdf, $object, $posy, $outputlangs, $hei } // Loop on each payment - // TODO Call getListOfPaymentsgetListOfPayments instead of hard coded sql + // TODO Call getListOfPayments instead of hard coded sql $sql = "SELECT p.datep as date, p.fk_paiement, p.num_paiement as num, pf.amount as amount, pf.multicurrency_amount,"; $sql .= " cp.code"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; diff --git a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php index e68765f190c5c..f92bac05c60d4 100644 --- a/htdocs/core/modules/facture/doc/pdf_octopus.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_octopus.modules.php @@ -1115,7 +1115,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs, $outputlangsbis); // Display payment area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { + $listofpayments = $object->getListOfPayments('', 0, 1); + if ((count($listofpayments) || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { $posy = $this->drawPaymentsTable($pdf, $object, $posy, $outputlangs); } @@ -1261,7 +1262,7 @@ public function drawPaymentsTable(&$pdf, $object, $posy, $outputlangs) } // Loop on each payment - // TODO Call getListOfPaymentsgetListOfPayments instead of hard coded sql + // TODO Call getListOfPayments instead of hard coded sql $sql = "SELECT p.datep as date, p.fk_paiement, p.num_paiement as num, pf.amount as amount, pf.multicurrency_amount,"; $sql .= " cp.code"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; diff --git a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php index e9fc9667192fa..336156f01a551 100644 --- a/htdocs/core/modules/facture/doc/pdf_sponge.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_sponge.modules.php @@ -1028,7 +1028,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede $posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs, $outputlangsbis); // Display payment area - if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { + $listofpayments = $object->getListOfPayments('', 0, 1); + if ((count($listofpayments) || $amount_credit_notes_included || $amount_deposits_included) && !getDolGlobalString('INVOICE_NO_PAYMENT_DETAILS')) { $posy = $this->drawPaymentsTable($pdf, $object, $posy, $outputlangs); } From 138ffa31588cf05c8e693f504930d3d0f27fbc28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 21:49:52 +0200 Subject: [PATCH 142/329] fix phpstan (#31181) * fix phpstan * fix phpstan * fix phpstan * fix phpstan --- htdocs/core/class/html.formmail.class.php | 4 ++-- htdocs/core/lib/functions.lib.php | 18 +++++++++--------- htdocs/core/lib/images.lib.php | 4 ++-- phpstan.neon.dist | 1 - 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index d51d1177e6815..fc622a7602e5c 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -1946,8 +1946,8 @@ public function setSubstitFromObject($object, $outputlangs) '__PRODUCT_DESCRIPTION__' => isset($line->product_desc) ? $line->product_desc : '', '__LABEL__' => isset($line->label) ? $line->label : '', '__DESCRIPTION__' => isset($line->desc) ? $line->desc : '', - '__DATE_START_YMD__' => dol_print_date($line->date_start, 'day', 0, $outputlangs), - '__DATE_END_YMD__' => dol_print_date($line->date_end, 'day', 0, $outputlangs), + '__DATE_START_YMD__' => dol_print_date($line->date_start, 'day', false, $outputlangs), + '__DATE_END_YMD__' => dol_print_date($line->date_end, 'day', false, $outputlangs), '__QUANTITY__' => $line->qty, '__SUBPRICE__' => price($line->subprice), '__AMOUNT__' => price($line->total_ttc), diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index a6d51e94c691f..625437fd0a19a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8984,10 +8984,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); $substitutionarray['__NOTE_PUBLIC__'] = (isset($object->note_public) ? $object->note_public : null); $substitutionarray['__NOTE_PRIVATE__'] = (isset($object->note_private) ? $object->note_private : null); - $substitutionarray['__DATE_CREATION__'] = (isset($object->date_creation) ? dol_print_date($object->date_creation, 'day', 0, $outputlangs) : ''); - $substitutionarray['__DATE_MODIFICATION__'] = (isset($object->date_modification) ? dol_print_date($object->date_modification, 'day', 0, $outputlangs) : ''); - $substitutionarray['__DATE_VALIDATION__'] = (isset($object->date_validation) ? dol_print_date($object->date_validation, 'day', 0, $outputlangs) : ''); - $substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', 0, $outputlangs) : ''); + $substitutionarray['__DATE_CREATION__'] = (isset($object->date_creation) ? dol_print_date($object->date_creation, 'day', false, $outputlangs) : ''); + $substitutionarray['__DATE_MODIFICATION__'] = (isset($object->date_modification) ? dol_print_date($object->date_modification, 'day', false, $outputlangs) : ''); + $substitutionarray['__DATE_VALIDATION__'] = (isset($object->date_validation) ? dol_print_date($object->date_validation, 'day', false, $outputlangs) : ''); + $substitutionarray['__DATE_DELIVERY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, 'day', false, $outputlangs) : ''); $substitutionarray['__DATE_DELIVERY_DAY__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%d") : ''); $substitutionarray['__DATE_DELIVERY_DAY_TEXT__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%A") : ''); $substitutionarray['__DATE_DELIVERY_MON__'] = (isset($object->date_delivery) ? dol_print_date($object->date_delivery, "%m") : ''); @@ -9000,7 +9000,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, // For backward compatibility (deprecated) $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); - $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', 0, $outputlangs) : ''); + $substitutionarray['__SUPPLIER_ORDER_DATE_DELIVERY__'] = (isset($object->delivery_date) ? dol_print_date($object->delivery_date, 'day', false, $outputlangs) : ''); $substitutionarray['__SUPPLIER_ORDER_DELAY_DELIVERY__'] = (isset($object->availability_code) ? ($outputlangs->transnoentities("AvailabilityType".$object->availability_code) != 'AvailabilityType'.$object->availability_code ? $outputlangs->transnoentities("AvailabilityType".$object->availability_code) : $outputlangs->convToOutputCharset(isset($object->availability) ? $object->availability : '')) : ''); $substitutionarray['__EXPIRATION_DATE__'] = (isset($object->fin_validite) ? dol_print_date($object->fin_validite, 'daytext') : ''); @@ -9358,10 +9358,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, '@phan-var-force Facture|FactureRec $object'; include_once DOL_DOCUMENT_ROOT.'/core/lib/functionsnumtoword.lib.php'; - $substitutionarray['__DATE_YMD__'] = is_object($object) ? (isset($object->date) ? dol_print_date($object->date, 'day', 0, $outputlangs) : null) : ''; - $substitutionarray['__DATE_DUE_YMD__'] = is_object($object) ? (isset($object->date_lim_reglement) ? dol_print_date($object->date_lim_reglement, 'day', 0, $outputlangs) : null) : ''; - $substitutionarray['__DATE_YMD_TEXT__'] = is_object($object) ? (isset($object->date) ? dol_print_date($object->date, 'daytext', 0, $outputlangs) : null) : ''; - $substitutionarray['__DATE_DUE_YMD_TEXT__'] = is_object($object) ? (isset($object->date_lim_reglement) ? dol_print_date($object->date_lim_reglement, 'daytext', 0, $outputlangs) : null) : ''; + $substitutionarray['__DATE_YMD__'] = is_object($object) ? (isset($object->date) ? dol_print_date($object->date, 'day', false, $outputlangs) : null) : ''; + $substitutionarray['__DATE_DUE_YMD__'] = is_object($object) ? (isset($object->date_lim_reglement) ? dol_print_date($object->date_lim_reglement, 'day', false, $outputlangs) : null) : ''; + $substitutionarray['__DATE_YMD_TEXT__'] = is_object($object) ? (isset($object->date) ? dol_print_date($object->date, 'daytext', false, $outputlangs) : null) : ''; + $substitutionarray['__DATE_DUE_YMD_TEXT__'] = is_object($object) ? (isset($object->date_lim_reglement) ? dol_print_date($object->date_lim_reglement, 'daytext', false, $outputlangs) : null) : ''; $already_payed_all = 0; if (is_object($object) && ($object instanceof Facture)) { diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 0a725b04cc42b..dabc72e026b77 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -423,8 +423,8 @@ function dolRotateImage($file_path) * Add exif orientation correction for image * * @param string $fileSource Full path to source image to rotate - * @param string|bool $fileDest string : Full path to image to rotate | false return gd img | null the raw image stream will be outputted directly - * @param int $quality output image quality + * @param string|bool|null $fileDest string : Full path to image to rotate | false return gd img | null the raw image stream will be outputted directly + * @param int<-1,100> $quality output image quality * @return bool : true on success or false on failure or gd img if $fileDest is false. */ function correctExifImageOrientation($fileSource, $fileDest, $quality = 95) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 89b88e27b1503..840b2c939a082 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -69,7 +69,6 @@ parameters: - '#.*phan-var#' - '#\$httpStatusCode of class Luracast\\Restler\\RestException constructor expects string, int given.#' - '#(?:(?:s(?:(?:et_error_handl|pl_autoload_regist)er)|array_filter)) expects \(callable#' - - '# (dol_print_date|correctExifImageOrientation) expects bool\|string#' - '# (vatrate|DolEditor constructor) expects bool, int#' - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - '# (dolibarr_set_const|getLocalTaxesFromRate) expects int\|string#' From d9902225cae834afa3ecea060984712f01b0f94a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 21:50:37 +0200 Subject: [PATCH 143/329] fix phpstan (#31187) * fix phpstan * fix phpstan * fix phpstan --- htdocs/adherents/admin/website.php | 4 ++-- htdocs/bookmarks/card.php | 6 +++--- htdocs/bookmarks/class/bookmark.class.php | 5 ++++- htdocs/public/stripe/ipn.php | 2 +- phpstan.neon.dist | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index dfe7441a3d2a3..cf20feec80427 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -76,8 +76,8 @@ $res = dolibarr_set_const($db, "MEMBER_NEWFORM_AMOUNT", $amount, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "MEMBER_MIN_AMOUNT", $minamount, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "MEMBER_COUNTERS_ARE_PUBLIC", $publiccounters, 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "MEMBER_SKIP_TABLE", !$showtable, 'chaine', 0, '', $conf->entity); // Logic is reversed for retrocompatibility: "skip -> show" - $res = dolibarr_set_const($db, "MEMBER_HIDE_VOTE_ALLOWED", !$showvoteallowed, 'chaine', 0, '', $conf->entity); // Logic is reversed for retrocompatibility: "hide -> show" + $res = dolibarr_set_const($db, "MEMBER_SKIP_TABLE", $showtable ? 0 : 1, 'chaine', 0, '', $conf->entity); // Logic is reversed for retrocompatibility: "skip -> show" + $res = dolibarr_set_const($db, "MEMBER_HIDE_VOTE_ALLOWED", $showvoteallowed ? 0 : 1, 'chaine', 0, '', $conf->entity); // Logic is reversed for retrocompatibility: "hide -> show" $res = dolibarr_set_const($db, "MEMBER_NEWFORM_PAYONLINE", $payonline, 'chaine', 0, '', $conf->entity); if ($forcetype < 0) { $res = dolibarr_del_const($db, "MEMBER_NEWFORM_FORCETYPE", $conf->entity); diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 2dd9a0caf4f0b..c21729bff0c8d 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -40,7 +40,7 @@ $title = (string) GETPOST("title", "alpha"); $url = (string) GETPOST("url", "alpha"); $urlsource = GETPOST("urlsource", "alpha"); -$target = GETPOSTINT("target"); +$target = GETPOST("target", "alpha"); $userid = GETPOSTINT("userid"); $position = GETPOSTINT("position"); $backtopage = GETPOST('backtopage', 'alpha'); @@ -274,10 +274,10 @@ $liste = array(1=>$langs->trans("OpenANewWindow"), 0=>$langs->trans("ReplaceWindow")); print $form->selectarray('target', $liste, GETPOSTISSET("target") ? GETPOST("target") : $object->target); } else { - if ($object->target == 0) { + if ($object->target == '0') { print $langs->trans("ReplaceWindow"); } - if ($object->target == 1) { + if ($object->target == '1') { print $langs->trans("OpenANewWindow"); } } diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 6732a28a83531..a386876a7d614 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -71,7 +71,10 @@ class Bookmark extends CommonObject */ public $url; - public $target; // 0=replace, 1=new window + /** + * @var string '0'=replace, '1'=new window + */ + public $target; /** * @var string title diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index d269608c4d99a..80d605a79ad4f 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -220,7 +220,7 @@ } elseif ($event->type == 'payout.paid') { // When a payout to transfer money to your account is completely done $error = 0; - $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", null, 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", 0, 'chaine', 0, '', $conf->entity); if ($result) { $langs->load("errors"); diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 840b2c939a082..7fb7dc4bfdecf 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -71,7 +71,7 @@ parameters: - '#(?:(?:s(?:(?:et_error_handl|pl_autoload_regist)er)|array_filter)) expects \(callable#' - '# (vatrate|DolEditor constructor) expects bool, int#' - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - - '# (dolibarr_set_const|getLocalTaxesFromRate) expects int\|string#' + - '# getLocalTaxesFromRate expects int\|string#' - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' From 79c447caac6ab4ab761c434fb6810e84b226b01c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 21:51:01 +0200 Subject: [PATCH 144/329] fix phpstan (#31188) * fix phpstan * fix phpstan --- htdocs/public/webportal/lib/webportal.lib.php | 5 +++-- phpstan.neon.dist | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/public/webportal/lib/webportal.lib.php b/htdocs/public/webportal/lib/webportal.lib.php index f15b59af5d9c1..76d5028d85ce2 100644 --- a/htdocs/public/webportal/lib/webportal.lib.php +++ b/htdocs/public/webportal/lib/webportal.lib.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France */ /** @@ -11,7 +12,7 @@ /** * Get nav menu * - * @param array,children?:array}>}> $Tmenu Array of menu + * @param array,children?:array}>}>|array $Tmenu Array of menu * @return string */ function getNav($Tmenu) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 7fb7dc4bfdecf..c6d20dcfe4eef 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -97,7 +97,6 @@ parameters: - '#( |::)((multi)?selectarray)\(\) expects array#' - '# (reWriteAllMenus|check_authentication) expects array#' - '#::(_validateMyObject|select_company)\(\) expects array Date: Sun, 29 Sep 2024 21:51:51 +0200 Subject: [PATCH 145/329] fix phpstan (#31189) * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan * fix phpstan --- htdocs/api/class/api_setup.class.php | 24 +++++++++---------- .../comm/propal/class/api_proposals.class.php | 7 +++--- htdocs/commande/class/api_orders.class.php | 9 +++---- .../facture/class/api_invoices.class.php | 4 ++-- htdocs/product/class/api_products.class.php | 11 +++++---- .../societe/class/api_thirdparties.class.php | 8 +++---- phpstan.neon.dist | 1 - 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index d3ca1e430b9f2..d30ba75b5a4e2 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1,12 +1,12 @@ - * Copyright (C) 2016 Laurent Destailleur - * Copyright (C) 2017 Regis Houssin - * Copyright (C) 2017 Neil Orley - * Copyright (C) 2018-2021 Frédéric France - * Copyright (C) 2018-2022 Thibault FOUCART - * Copyright (C) 2024 Jon Bendtsen - * Copyright (C) 2024 MDW +/* Copyright (C) 2016 Xebax Christy + * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2017 Regis Houssin + * Copyright (C) 2017 Neil Orley + * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018-2022 Thibault FOUCART + * Copyright (C) 2024 Jon Bendtsen + * Copyright (C) 2024 MDW * * * This program is free software; you can redistribute it and/or modify @@ -419,7 +419,7 @@ public function getRegionByID($id) */ public function getRegionByCode($code) { - return $this->_fetchCregion('', $code); + return $this->_fetchCregion(0, $code); } /** @@ -528,7 +528,7 @@ public function getStateByID($id) */ public function getStateByCode($code) { - return $this->_fetchCstate('', $code); + return $this->_fetchCstate(0, $code); } /** @@ -637,7 +637,7 @@ public function getCountryByID($id, $lang = '') */ public function getCountryByCode($code, $lang = '') { - return $this->_fetchCcountry('', $code, '', $lang); + return $this->_fetchCcountry(0, $code, '', $lang); } /** @@ -654,7 +654,7 @@ public function getCountryByCode($code, $lang = '') */ public function getCountryByISO($iso, $lang = '') { - return $this->_fetchCcountry('', '', $iso, $lang); + return $this->_fetchCcountry(0, '', $iso, $lang); } /** diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index f58e07cca019c..845b8d3d3d9c6 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -4,7 +4,8 @@ * Copyright (C) 2020 Thibault FOUCART * Copyright (C) 2022 ATM Consulting * Copyright (C) 2022 OpenDSI - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * 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 @@ -86,7 +87,7 @@ public function get($id, $contact_list = 1) */ public function getByRef($ref, $contact_list = 1) { - return $this->_fetch('', $ref, '', $contact_list); + return $this->_fetch(0, $ref, '', $contact_list); } /** @@ -104,7 +105,7 @@ public function getByRef($ref, $contact_list = 1) */ public function getByRefExt($ref_ext, $contact_list = 1) { - return $this->_fetch('', '', $ref_ext, $contact_list); + return $this->_fetch(0, '', $ref_ext, $contact_list); } /** diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 9474ede15d99f..701d923862757 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2016 Laurent Destailleur +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2024 Frédéric France * * 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 @@ -82,7 +83,7 @@ public function get($id, $contact_list = 1) */ public function getByRef($ref, $contact_list = 1) { - return $this->_fetch('', $ref, '', $contact_list); + return $this->_fetch(0, $ref, '', $contact_list); } /** @@ -100,7 +101,7 @@ public function getByRef($ref, $contact_list = 1) */ public function getByRefExt($ref_ext, $contact_list = 1) { - return $this->_fetch('', '', $ref_ext, $contact_list); + return $this->_fetch(0, '', $ref_ext, $contact_list); } /** diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index e5f5b0edccff3..4db7ec0f8f8a0 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -94,7 +94,7 @@ public function get($id, $contact_list = 1) */ public function getByRef($ref, $contact_list = 1) { - return $this->_fetch('', $ref, '', $contact_list); + return $this->_fetch(0, $ref, '', $contact_list); } /** @@ -112,7 +112,7 @@ public function getByRef($ref, $contact_list = 1) */ public function getByRefExt($ref_ext, $contact_list = 1) { - return $this->_fetch('', '', $ref_ext, $contact_list); + return $this->_fetch(0, '', $ref_ext, $contact_list); } /** diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index fd2d9eaa11529..665aea2e83141 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2019 Cedric Ancelin +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 Cedric Ancelin + * Copyright (C) 2024 Frédéric France * * 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 @@ -106,7 +107,7 @@ public function get($id, $includestockdata = 0, $includesubproducts = false, $in */ public function getByRef($ref, $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includetrans = false) { - return $this->_fetch('', $ref, '', '', $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); + return $this->_fetch(0, $ref, '', '', $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); } /** @@ -130,7 +131,7 @@ public function getByRef($ref, $includestockdata = 0, $includesubproducts = fals */ public function getByRefExt($ref_ext, $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includetrans = false) { - return $this->_fetch('', '', $ref_ext, '', $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); + return $this->_fetch(0, '', $ref_ext, '', $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); } /** @@ -154,7 +155,7 @@ public function getByRefExt($ref_ext, $includestockdata = 0, $includesubproducts */ public function getByBarcode($barcode, $includestockdata = 0, $includesubproducts = false, $includeparentid = false, $includetrans = false) { - return $this->_fetch('', '', '', $barcode, $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); + return $this->_fetch(0, '', '', $barcode, $includestockdata, $includesubproducts, $includeparentid, false, $includetrans); } /** diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 57e44b578dff3..c4c549f25e90e 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -95,7 +95,7 @@ public function get($id) */ public function getByEmail($email) { - return $this->_fetch('', '', '', '', '', '', '', '', '', '', $email); + return $this->_fetch(null, '', '', '', '', '', '', '', '', '', $email); } /** @@ -112,7 +112,7 @@ public function getByEmail($email) */ public function getByBarcode($barcode) { - return $this->_fetch('', '', '', $barcode); + return $this->_fetch(null, '', '', $barcode); } /** @@ -2099,7 +2099,7 @@ private function _validate($data) * * Return an array with thirdparty information * - * @param int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criteria) + * @param ?int $rowid Id of third party to load (Use 0 to get a specimen record, use null to use other search criteria) * @param string $ref Reference of third party, name (Warning, this can return several records) * @param string $ref_ext External reference of third party (Warning, this information is a free field not provided by Dolibarr) * @param string $barcode Barcode of third party to load @@ -2117,8 +2117,6 @@ private function _validate($data) */ private function _fetch($rowid, $ref = '', $ref_ext = '', $barcode = '', $idprof1 = '', $idprof2 = '', $idprof3 = '', $idprof4 = '', $idprof5 = '', $idprof6 = '', $email = '', $ref_alias = '') { - global $conf; - if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login.'. No read permission on thirdparties.'); } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index c6d20dcfe4eef..3f73056a52a3e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -75,7 +75,6 @@ parameters: - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - - '# (Setup|Asset|Proposals|Orders|Invoices|FactureRec|BonPrelevement|Products|Thirdparties)::_fetch\S*\(\) expects int, string#' - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' - '#EvalMath::trigger\(\) expects string, int given#' From 42bb4fbf3e9b2075da3b0639709494963b8c6723 Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 29 Sep 2024 21:52:31 +0200 Subject: [PATCH 146/329] Qual: Enable & fix or ignore Invalid DimOffset (#31176) * Qual: Enable & fix or ignore Invalid DimOffset # Qual: Enable & fix or ignore Invalid DimOffset The Invalid DimOffset notices occur when array keys are defined and the index used is not amongst the known array keys. This PR enables these notices and fixes array definitions when needed, or ignores the notices locally if it's a false positive, or in the baseline.txt when it does not seem to be a false positive so that it can be fixed later * Nullable object typing in function signature not ok for 7.0/8.4 Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4. Therefore, removing the typing specification in the function definition --------- Co-authored-by: Laurent Destailleur --- dev/tools/phan/baseline.txt | 68 ++++++++++--------- dev/tools/phan/config.php | 2 +- dev/tools/phan/config_extended.php | 2 +- .../class/accountancycategory.class.php | 2 +- .../class/accountingjournal.class.php | 6 +- htdocs/adherents/list.php | 2 + htdocs/admin/system/modules.php | 2 +- htdocs/asset/class/asset.class.php | 2 +- htdocs/asset/class/assetmodel.class.php | 2 + htdocs/asset/depreciation.php | 2 +- htdocs/bom/class/bom.class.php | 1 + htdocs/bookcal/class/availabilities.class.php | 1 + htdocs/bookcal/class/calendar.class.php | 2 + htdocs/categories/class/categorie.class.php | 8 +-- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/list.php | 1 + htdocs/comm/action/peruser.php | 4 +- htdocs/commande/list.php | 1 + htdocs/commande/list_det.php | 2 + htdocs/compta/bank/annuel.php | 2 +- htdocs/compta/bank/bankentries_list.php | 7 +- htdocs/compta/bank/class/account.class.php | 32 ++++----- htdocs/compta/bank/class/bankcateg.class.php | 7 +- htdocs/compta/bank/list.php | 1 + htdocs/compta/bank/various_payment/list.php | 1 + .../facture/class/api_invoices.class.php | 18 ++++- .../compta/facture/invoicetemplate_list.php | 1 + htdocs/compta/facture/list.php | 1 + htdocs/compta/paiement/cheque/list.php | 1 + .../compta/paiement/class/paiement.class.php | 30 ++++++-- htdocs/compta/paiement/list.php | 1 + htdocs/compta/sociales/list.php | 1 + htdocs/compta/tva/list.php | 1 + htdocs/contact/list.php | 1 + htdocs/contrat/list.php | 3 +- htdocs/contrat/services_list.php | 1 + .../class/commonstickergenerator.class.php | 3 +- htdocs/core/class/hookmanager.class.php | 2 +- htdocs/core/class/html.formfile.class.php | 15 +++- htdocs/core/class/html.formmail.class.php | 2 +- htdocs/core/class/html.formticket.class.php | 8 ++- htdocs/core/class/interfaces.class.php | 3 +- htdocs/core/class/notify.class.php | 16 ++--- htdocs/core/class/rssparser.class.php | 2 +- htdocs/core/customreports.php | 2 +- htdocs/core/db/mysqli.class.php | 6 +- htdocs/core/db/pgsql.class.php | 4 +- htdocs/core/db/sqlite3.class.php | 4 +- .../connectors/php/connector.lib.php | 2 +- htdocs/core/lib/bank.lib.php | 4 +- htdocs/core/lib/company.lib.php | 26 +++---- htdocs/core/lib/date.lib.php | 20 +++--- htdocs/core/lib/functions.lib.php | 7 +- htdocs/core/lib/functions2.lib.php | 4 +- htdocs/core/lib/pdf.lib.php | 2 +- htdocs/core/lib/profid.lib.php | 1 + htdocs/core/menus/standard/auguria.lib.php | 10 ++- htdocs/core/menus/standard/auguria_menu.php | 1 + htdocs/core/menus/standard/eldy.lib.php | 1 + htdocs/core/menus/standard/empty.php | 1 + .../fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/cron/class/cronjob.class.php | 6 +- htdocs/don/paiement/list.php | 1 + .../class/emailcollector.class.php | 7 +- .../class/conferenceorboothattendee.class.php | 1 + htdocs/expedition/list.php | 16 +++-- .../class/expensereport.class.php | 7 +- htdocs/expensereport/payment/list.php | 1 + htdocs/fichinter/list.php | 6 +- .../class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 18 ++++- htdocs/fourn/commande/list.php | 1 + htdocs/fourn/facture/list-rec.php | 1 + htdocs/fourn/facture/list.php | 1 + htdocs/fourn/paiement/list.php | 1 + htdocs/holiday/class/holiday.class.php | 32 ++++----- htdocs/hrm/class/evaluation.class.php | 15 ++-- htdocs/hrm/class/job.class.php | 1 + htdocs/hrm/class/skill.class.php | 1 + .../class/knowledgerecord.class.php | 1 + .../template/class/api_mymodule.class.php | 2 +- htdocs/mrp/class/mo.class.php | 1 + htdocs/mrp/mo_movements.php | 1 + htdocs/multicurrency/multicurrency_rate.php | 1 + htdocs/opensurvey/wizard/choix_date.php | 1 + htdocs/product/class/product.class.php | 4 +- htdocs/product/composition/card.php | 8 ++- htdocs/product/list.php | 1 + .../class/stocktransfer.class.php | 7 +- htdocs/projet/activity/perweek.php | 2 +- htdocs/projet/element.php | 1 + htdocs/projet/list.php | 13 +++- htdocs/projet/tasks.php | 1 + htdocs/projet/tasks/list.php | 4 +- htdocs/projet/tasks/time.php | 1 + htdocs/reception/class/reception.class.php | 2 +- htdocs/reception/list.php | 3 +- .../class/recruitmentjobposition.class.php | 1 + htdocs/resource/class/dolresource.class.php | 12 ++-- htdocs/resource/list.php | 1 + .../class/companybankaccount.class.php | 18 ++--- htdocs/societe/class/societe.class.php | 6 +- htdocs/societe/list.php | 3 +- htdocs/supplier_proposal/list.php | 1 + htdocs/takepos/index.php | 21 +++--- htdocs/ticket/card.php | 2 +- htdocs/ticket/class/cticketcategory.class.php | 1 + htdocs/user/class/userbankaccount.class.php | 21 +++--- htdocs/user/list.php | 1 + htdocs/variants/list.php | 1 + htdocs/webhook/class/target.class.php | 4 +- .../class/html.formwebportal.class.php | 4 +- htdocs/webservices/server_invoice.php | 2 +- .../workstation/class/workstation.class.php | 1 + htdocs/workstation/workstation_list.php | 1 + 115 files changed, 399 insertions(+), 243 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 8cd57100be0d7..7352582772d9d 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,7 +9,7 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 1460+ occurrences + // PhanPluginUnknownPropertyType : 1430+ occurrences // PhanUndeclaredProperty : 850+ occurrences // PhanPossiblyUndeclaredGlobalVariable : 700+ occurrences // PhanTypeMismatchArgumentProbablyReal : 670+ occurrences @@ -17,17 +17,18 @@ return [ // PhanPluginUnknownArrayMethodReturnType : 430+ occurrences // PhanPluginUnknownArrayMethodParamType : 350+ occurrences // PhanPossiblyUndeclaredVariable : 300+ occurrences - // PhanTypeMismatchProperty : 200+ occurrences - // PhanPluginUnknownObjectMethodCall : 160+ occurrences + // PhanTypeMismatchProperty : 190+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 150+ occurrences + // PhanPluginUnknownObjectMethodCall : 150+ occurrences // PhanPluginUnknownArrayFunctionParamType : 140+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 90+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 95+ occurrences // PhanPluginUnknownArrayPropertyType : 75+ occurrences // PhanPluginUndeclaredVariableIsset : 70+ occurrences // PhanPluginEmptyStatementIf : 55+ occurrences + // PhanTypeMismatchDimFetch : 55+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences - // PhanTypeMismatchDimFetch : 35+ occurrences + // PhanTypeInvalidDimOffset : 35+ occurrences // PhanTypeExpectedObjectPropAccess : 25+ occurrences // PhanPossiblyNullTypeMismatchProperty : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences @@ -37,10 +38,10 @@ return [ // PhanPluginSuspiciousParamPosition : 10+ occurrences // PhanUndeclaredMethod : 9 occurrences // PhanPluginBothLiteralsBinaryOp : 8 occurrences - // PhanPluginDuplicateArrayKey : 8 occurrences // PhanPluginDuplicateExpressionBinaryOp : 7 occurrences // PhanTypeMismatchDimFetchNullable : 7 occurrences // PhanTypeExpectedObjectPropAccessButGotNull : 6 occurrences + // PhanPluginDuplicateArrayKey : 4 occurrences // PhanParamTooMany : 3 occurrences // PhanInvalidFQSENInClasslike : 2 occurrences // PhanAccessMethodProtected : 1 occurrence @@ -50,8 +51,11 @@ return [ 'file_suppressions' => [ 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => [/* Traverses Adherent as array, ignore */ 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanTypeInvalidDimOffset'], + 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanTypeInvalidDimOffset'], + 'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'], + 'htdocs/adherents/stats/index.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], @@ -62,7 +66,7 @@ return [ 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/asset/class/assetaccountancycodes.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType'], + 'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanTypeInvalidDimOffset'], 'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'], 'htdocs/asset/depreciation.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/asset/disposal.php' => ['PhanPluginEmptyStatementIf'], @@ -88,8 +92,8 @@ return [ 'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'], - 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', /* Missing getNextValue class, ignored */ 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -104,7 +108,6 @@ return [ 'htdocs/categories/viewcat.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'], 'htdocs/collab/index.php' => ['PhanParamTooMany', 'PhanUndeclaredProperty'], 'htdocs/comm/action/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/comm/action/class/actioncommreminder.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/comm/action/class/api_agendaevents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/comm/action/class/cactioncomm.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/action/class/ical.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], @@ -130,8 +133,8 @@ return [ 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], @@ -162,7 +165,7 @@ return [ 'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf'], 'htdocs/compta/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/card.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/facture/class/facturestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], @@ -172,7 +175,7 @@ return [ 'htdocs/compta/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/prelevement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -188,7 +191,7 @@ return [ 'htdocs/compta/paiement/cheque/class/remisecheque.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredMethod'], 'htdocs/compta/paiement/cheque/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement/class/cpaiement.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanEmptyForeach', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/paiement/class/paiement.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -317,7 +320,7 @@ return [ 'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formcategory.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formcompany.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formldap.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formmail.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/class/html.formmargin.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], @@ -342,24 +345,25 @@ return [ 'htdocs/core/class/validate.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'], 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], 'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/core/db/Database.interface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/db/mysqli.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray'], 'htdocs/core/db/pgsql.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/db/sqlite3.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeComparisonFromArray', 'PhanUndeclaredProperty'], 'htdocs/core/extrafieldsinimport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType'], + 'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidDimOffset'], 'htdocs/core/get_info.php' => ['PhanPluginSuspiciousParamPosition'], 'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', /* Bug : reference to id of module, not declared */ 'PhanUndeclaredProperty'], + 'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], + 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], 'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/lib/date.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/date.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/lib/doc.lib.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/lib/ecm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/eventorganization.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -369,7 +373,6 @@ return [ 'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/fourn.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/core/lib/functions.lib.php' => ['PhanPluginDuplicateArrayKey'], 'htdocs/core/lib/functions2.lib.php' => ['PhanUndeclaredProperty'], 'htdocs/core/lib/functionsnumtoword.lib.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'], @@ -409,8 +412,10 @@ return [ 'htdocs/core/lib/tax.lib.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], + 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeInvalidDimOffset'], + 'htdocs/core/menus/standard/eldy_menu.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'], @@ -487,7 +492,7 @@ return [ 'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', /* Typing issues, ignored */ 'PhanUndeclaredProperty'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], @@ -637,7 +642,7 @@ return [ 'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.facture-rec.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/fourn/class/fournisseur.product.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'], - 'htdocs/fourn/class/paiementfourn.class.php' => ['PhanEmptyForeach', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/fourn/class/paiementfourn.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/fourn/commande/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/fourn/commande/contact.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/fourn/commande/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], @@ -660,8 +665,8 @@ return [ 'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/holiday/card_group.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], + 'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], 'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/hrm/admin/admin_hrm.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/class/evaluation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -811,7 +816,7 @@ return [ 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -842,7 +847,7 @@ return [ 'htdocs/projet/tasks/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/projet/tasks/note.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/tasks/task.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/projet/tasks/time.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/projet/tasks/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'], 'htdocs/public/bookcal/index.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanRedefineFunction'], @@ -931,7 +936,7 @@ return [ 'htdocs/societe/admin/societe.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/societe/card.php' => ['PhanTypeMismatchProperty'], 'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], @@ -1016,7 +1021,7 @@ return [ 'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'], 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], + 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'], 'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownPropertyType'], @@ -1035,7 +1040,6 @@ return [ 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], - 'htdocs/website/class/websitepage.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/website/samples/wrapper.php' => ['PhanTypeMismatchArgumentProbablyReal'], diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index 23f7390071b70..4d4e78b6bef66 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -419,7 +419,7 @@ 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is // 'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time 'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time - 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time + // 'PhanTypeInvalidDimOffset', // Helps identify missing array indexes in types or reference to unset indexes 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is // 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is diff --git a/dev/tools/phan/config_extended.php b/dev/tools/phan/config_extended.php index 94346c93296f5..521c0347d7348 100644 --- a/dev/tools/phan/config_extended.php +++ b/dev/tools/phan/config_extended.php @@ -68,7 +68,7 @@ 'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is 'PhanPluginUnknownArrayPropertyType', // this option costs more time to be supported than it solves time 'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time - 'PhanTypeInvalidDimOffset', // this option costs more time to be supported than it solves time + // 'PhanTypeInvalidDimOffset', // Helps identify missing array indexes in types or reference to unset indexes 'PhanTypeObjectUnsetDeclaredProperty', 'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is 'PhanPluginUnknownArrayFunctionReturnType', // a lot of false positive, in most cases, we want to keep the code as it is diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 798c355ecd793..f5092e7a9a865 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -775,7 +775,7 @@ public function getCatsCpts($catid = 0) * * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups * @param int $active 1= active, 0=not active - * @return array|int Array of groups or -1 if error + * @return array|int Array of groups or -1 if error * @see getCatsCpts(), getCptsCat() */ public function getCats($categorytype = -1, $active = 1) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 0e2442a9b6204..3a0b59a6740c4 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -74,7 +74,7 @@ class AccountingJournal extends CommonObject public $active; /** - * @var array Accounting account cached + * @var array Accounting account cached */ public static $accounting_account_cached = array(); @@ -583,7 +583,7 @@ public function getAssetData(User $user, $type = 'view', $date_start = null, $da $lines = array(); $lines[0][$accountancy_code_value_asset_sold] = -((float) $element_static->acquisition_value_ht - $last_cumulative_amount_ht); - $lines[0][$accountancy_code_depreciation_asset] = -$last_cumulative_amount_ht; + $lines[0][$accountancy_code_depreciation_asset] = - (float) $last_cumulative_amount_ht; $lines[0][$accountancy_code_asset] = $element_static->acquisition_value_ht; $disposal_amount_vat = $disposal_subject_to_vat ? (float) price2num($disposal_amount * $disposal_vat / 100, 'MT') : 0; @@ -928,7 +928,7 @@ public function exportCsv(&$journal_data = array(), $search_date_end = 0, $sep = * Get accounting account info * * @param string $account Accounting account number - * @return array{found:bool,label:string,code_formatted1:string,label_formatted_1:string,label_formatted_2:string} Accounting account info + * @return array{found:bool,label:string,code_formatted_1:string,label_formatted_1:string,label_formatted_2:string} Accounting account info */ public function getAccountingAccountInfos($account) { diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index d5a617d2e0f55..753a178c7fc7f 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -185,6 +185,7 @@ 'd.statut' => array('label' => "Status"), 'd.import_key' => array('label' => "ImportId"), ); + // Complete array of fields for columns $tableprefix = 'd'; foreach ($object->fields as $key => $val) { @@ -1084,6 +1085,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['d.rowid']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['d.rowid']['label'], $_SERVER["PHP_SELF"], 'd.rowid', '', $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 3aaadbfe2f09f..7b91532672007 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -107,7 +107,7 @@ if ($modName) { //print 'xx'.$dir.$file.'
    '; if (in_array($file, $modules_files)) { - // File duplicate + // File duplicate @phan-suppress-next-line PhanTypeInvalidDimOffset print "Warning duplicate file found : ".$file." (Found ".$dir.$file.", already found ".$modules_fullpath[$file].")
    "; } else { // File to load diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 434bd7dab74ec..e02474b495eff 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -245,7 +245,7 @@ class Asset extends CommonObject */ public $asset_accountancy_codes; /** - * @var array> List of depreciation lines for each mode (sort by depreciation date). + * @var array> List of depreciation lines for each mode (sort by depreciation date). */ public $depreciation_lines = array(); diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 38bb118665a0b..5e9e32e7fa523 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -278,9 +278,11 @@ public function createFromClone(User $user, $fromid) // Clear fields if (property_exists($object, 'ref')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/asset/depreciation.php b/htdocs/asset/depreciation.php index 13da0968e6153..da797816db8b0 100644 --- a/htdocs/asset/depreciation.php +++ b/htdocs/asset/depreciation.php @@ -190,7 +190,7 @@ print price($line['cumulative_depreciation_ht']); print ''; print '
    '; print "\n"; } diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index b88a007822c6a..bf70f5469ff24 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -341,6 +341,7 @@ public function createFromClone(User $user, $fromid) // Clear fields $default_ref = $this->fields['ref']['default'] ?? null; $object->ref = empty($default_ref) ? $langs->trans("copy_of_").$object->ref : $default_ref; + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; $object->status = self::STATUS_DRAFT; // ... diff --git a/htdocs/bookcal/class/availabilities.class.php b/htdocs/bookcal/class/availabilities.class.php index a04ed3acd76b4..c7e69ff01653b 100644 --- a/htdocs/bookcal/class/availabilities.class.php +++ b/htdocs/bookcal/class/availabilities.class.php @@ -331,6 +331,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/bookcal/class/calendar.class.php b/htdocs/bookcal/class/calendar.class.php index 47955005423ea..93f79d45326e7 100644 --- a/htdocs/bookcal/class/calendar.class.php +++ b/htdocs/bookcal/class/calendar.class.php @@ -283,9 +283,11 @@ public function createFromClone(User $user, $fromid) // Clear fields if (property_exists($object, 'ref')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 8851e8a838159..9b0d8d7bc3d64 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -258,7 +258,7 @@ class Categorie extends CommonObject public $type; /** - * @var array Categories table in memory + * @var array Categories table in memory */ public $cats = array(); @@ -1167,7 +1167,7 @@ protected function load_motherof() * - string (categories ids separated by comma) * - array (list of categories ids) * @param int $include [=0] Removed or 1=Keep only - * @return int<-1,-1>|array Array of categories. this->cats and this->motherof are set, -1 on error + * @return int<-1,-1>|array Array of categories. this->cats and this->motherof are set, -1 on error */ public function get_full_arbo($type, $fromid = 0, $include = 0) { @@ -1244,7 +1244,7 @@ public function get_full_arbo($type, $fromid = 0, $include = 0) dol_syslog(get_class($this)."::get_full_arbo call to buildPathFromId", LOG_DEBUG); foreach ($this->cats as $key => $val) { //print 'key='.$key.'
    '."\n"; - $this->buildPathFromId($key, $nbcateg); // Process a branch from the root category key (this category has no parent) + $this->buildPathFromId($key, $nbcateg); // Process a branch from the root category key (this category has no parent) and adds kevek to $this->cats items } // Include or exclude leaf (including $fromid) from tree @@ -1262,7 +1262,7 @@ public function get_full_arbo($type, $fromid = 0, $include = 0) || preg_match('/'.$keyfilter3.'/', $fullpath) || preg_match('/'.$keyfilter4.'/', $fullpath)); if (($test && !$include) || (!$test && $include)) { - unset($this->cats[$key]); + unset($this->cats[$key]); // @phpstan-ignore-line } } } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index dfedaf09696c4..a40cac48859ea 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -365,7 +365,7 @@ $week = $prev['week']; $day = (int) $day; - $next = dol_get_next_week($first_day, $week, $first_month, $first_year); + $next = dol_get_next_week($first_day, (int) $week, $first_month, $first_year); $next_year = $next['year']; $next_month = $next['month']; $next_day = $next['day']; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 84e6ff8564826..07a9095d0a65c 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -856,6 +856,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['a.id']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['a.id']['label'], $_SERVER["PHP_SELF"], "a.id", $param, "", "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index de89f87a6efd6..d84d55b921026 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -252,7 +252,7 @@ $week = $prev['week']; $day = (int) $day; -$next = dol_get_next_week($day, $week, $month, $year); +$next = dol_get_next_week($day, (int) $week, $month, $year); $next_year = $next['year']; $next_month = $next['month']; $next_day = $next['day']; @@ -344,7 +344,7 @@ $week = $prev['week']; $day = (int) $day; -$next = dol_get_next_week($first_day, $week, $first_month, $first_year); +$next = dol_get_next_week($first_day, (int) $week, $first_month, $first_year); $next_year = $next['year']; $next_month = $next['month']; $next_day = $next['day']; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index f330219ac9ae0..747c5512e6637 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1926,6 +1926,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 9a46bd7aa4d52..251f5cce1263b 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1298,6 +1298,7 @@ // Détail commande if (!empty($arrayfields['rowid']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['rowid']['label'], $_SERVER["PHP_SELF"], 'rowid', '', $param, '', $sortfield, $sortorder); '@phan-var-force array,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan } @@ -1464,6 +1465,7 @@ $total = 0; $subtotal = 0; $productstat_cache = array(); + '@phan-var-force array $product_sdtat_cache'; $productstat_cachevirtual = array(); $getNomUrl_cache = array(); diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 0cc5ae8a3e99b..86fa50245f16e 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -63,7 +63,6 @@ } - /* * View */ @@ -306,6 +305,7 @@ // CRED PART // Chargement du tableau des années $tblyear = array(); + '@phan-var-force array> $tblyear'; $tblyear[0] = array(); $tblyear[1] = array(); $tblyear[2] = array(); diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 453c4a3e65126..cb23d053bf1a4 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -10,6 +10,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2021 Gauthier VERDOL + * 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 @@ -1204,6 +1205,7 @@ } // Numero statement if (!empty($arrayfields['b.num_releve']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print '
    '; } // Conciliated @@ -1291,6 +1293,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['b.num_releve']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['b.num_releve']['label'], $_SERVER['PHP_SELF'], 'b.num_releve', '', $param, '', $sortfield, $sortorder, "center "); $totalarray['nbfield']++; } @@ -1894,8 +1897,8 @@ // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields' => $arrayfields, 'object'=>$object, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook + $parameters = array('arrayfields' => $arrayfields, 'object' => $object, 'obj' => $objp, 'i' => $i, 'totalarray' => &$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Action edit/delete and select diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 6274cc107c5ac..ef4d39c06f732 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -698,7 +698,7 @@ public function addline($date, $oper, $label, $amount, $num_chq, $categorie, Use * @param int $notrigger 1=Disable triggers * @return int Return integer < 0 if KO, > 0 if OK */ - public function create(User $user, $notrigger = 0) + public function create($user, $notrigger = 0) { global $langs, $conf; @@ -883,11 +883,11 @@ public function create(User $user, $notrigger = 0) /** * Update bank account card * - * @param User $user Object user making action - * @param int $notrigger 1=Disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user Object user making action + * @param int<0,1> $notrigger 1=Disable triggers + * @return int Return integer <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = 0) + public function update($user, $notrigger = 0) { global $langs, $conf; @@ -1008,10 +1008,10 @@ public function update(User $user, $notrigger = 0) /** * Update BBAN (RIB) account fields * - * @param User|null $user Object user making update - * @return int Return integer <0 if KO, >0 if OK + * @param ?User $user Object user making update + * @return int Return integer <0 if KO, >0 if OK */ - public function update_bban(User $user = null) + public function update_bban($user = null) { // phpcs:enable global $conf, $langs; @@ -1186,11 +1186,11 @@ public function setCategories($categories) /** * Delete bank account from database * - * @param User|null $user User deleting - * @param int $notrigger 1=Disable triggers + * @param ?User $user User deleting + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = 0) + public function delete($user = null, $notrigger = 0) { $error = 0; @@ -2344,11 +2344,11 @@ public function insert() /** * Delete bank transaction record * - * @param User|null $user User object that delete - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param ?User $user User object that delete + * @param int<0,1> $notrigger 1=Does not execute triggers, 0= execute triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = 0) + public function delete($user = null, $notrigger = 0) { $nbko = 0; @@ -2428,10 +2428,10 @@ public function delete(User $user = null, $notrigger = 0) /** * Delete bank line records * - * @param User|null $user User object that delete + * @param ?User $user User object that delete * @return int Return integer <0 if KO, >0 if OK */ - public function delete_urls(User $user = null) + public function delete_urls($user = null) { // phpcs:enable $nbko = 0; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 9bdd66838e1eb..ebddb68769e9f 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2009 Regis Houssin * Copyright (C) 2016 Marcos García * Copyright (C) 2024 Frédéric France + * 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 @@ -171,11 +172,11 @@ public function fetch($id) /** * Update database * - * @param User|null $user User that modify - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param ?User $user User that modify + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function update(User $user = null, $notrigger = 0) + public function update($user = null, $notrigger = 0) { global $conf; $error = 0; diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 65e74187c81dd..94af3bf823e30 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -536,6 +536,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['b.ref']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 607434b33cdc5..52ef3ce8f2405 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -648,6 +648,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['account']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); $totalarray['nbfield']++; } diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 4db7ec0f8f8a0..db5378949d1e1 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1195,11 +1195,27 @@ public function markAsCreditAvailable($id) $amount_ht = $amount_tva = $amount_ttc = array(); $multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array(); + ' + @phan-var-force array $amount_ht + @phan-var-force array $amount_tva + @phan-var-force array $amount_ttc + @phan-var-force array $multicurrency_amount_ht + @phan-var-force array $multicurrency_amount_tva + @phan-var-force array $multicurrency_amount_ttc + '; // Loop on each vat rate $i = 0; foreach ($this->invoice->lines as $line) { if ($line->product_type < 9 && $line->total_ht != 0) { // Remove lines with product_type greater than or equal to 9 + if (!array_key_exists($line->tva_tx, $amount_ht)) { + $amount_ht[$line->tva_tx] = 0.0; + $amount_tva[$line->tva_tx] = 0.0; + $amount_ttc[$line->tva_tx] = 0.0; + $multicurrency_amount_ht[$line->tva_tx] = 0.0; + $multicurrency_amount_tva[$line->tva_tx] = 0.0; + $multicurrency_amount_ttc[$line->tva_tx] = 0.0; + } // no need to create discount if amount is null $amount_ht[$line->tva_tx] += $line->total_ht; $amount_tva[$line->tva_tx] += $line->total_tva; @@ -1279,7 +1295,7 @@ public function markAsCreditAvailable($id) $discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]); $discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]); $discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]); - $discount->tva_tx = abs($tva_tx); + $discount->tva_tx = abs((float) $tva_tx); $result = $discount->create(DolibarrApiAccess::$user); if ($result < 0) { diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 7d11ab737bb7f..d746c90109618 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -740,6 +740,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['f.titre']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ca582f6ebb146..54dfb347b938f 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1728,6 +1728,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index c91224136a820..22731b91d39ef 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -372,6 +372,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['bc.ref']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['bc.ref']['label'], $_SERVER["PHP_SELF"], "bc.ref", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 048197b02163c..dc86ffc8d2451 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -464,6 +464,14 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) if ($invoice->type == Facture::TYPE_DEPOSIT) { $amount_ht = $amount_tva = $amount_ttc = array(); $multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array(); + ' + @phan-var-force array $amount_ht + @phan-var-force array $amount_tva + @phan-var-force array $amount_ttc + @phan-var-force array $multicurrency_amount_ht + @phan-var-force array $multicurrency_amount_tva + @phan-var-force array $multicurrency_amount_ttc + '; // Insert one discount by VAT rate category $discount = new DiscountAbsolute($this->db); @@ -478,6 +486,14 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) $i = 0; foreach ($invoice->lines as $line) { if ($line->total_ht != 0) { // no need to create discount if amount is null + if (!array_key_exists($line->tva_tx, $amount_ht)) { + $amount_ht[$line->tva_tx] = 0.0; + $amount_tva[$line->tva_tx] = 0.0; + $amount_ttc[$line->tva_tx] = 0.0; + $multicurrency_amount_ht[$line->tva_tx] = 0.0; + $multicurrency_amount_tva[$line->tva_tx] = 0.0; + $multicurrency_amount_ttc[$line->tva_tx] = 0.0; + } $amount_ht[$line->tva_tx] += $line->total_ht; $amount_tva[$line->tva_tx] += $line->total_tva; $amount_ttc[$line->tva_tx] += $line->total_ttc; @@ -495,7 +511,7 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) $discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]); $discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]); $discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]); - $discount->tva_tx = abs($tva_tx); + $discount->tva_tx = abs((float) $tva_tx); $result = $discount->create($user); if ($result < 0) { @@ -1001,11 +1017,11 @@ public function update_num($num_payment) /** * Validate payment * - * @param User|null $user User making validation + * @param ?User $user User making validation * @return int Return integer <0 if KO, >0 if OK * @deprecated */ - public function valide(User $user = null) + public function valide($user = null) { return $this->validate($user); } @@ -1013,10 +1029,10 @@ public function valide(User $user = null) /** * Validate payment * - * @param User|null $user User making validation + * @param ?User $user User making validation * @return int Return integer <0 if KO, >0 if OK */ - public function validate(User $user = null) + public function validate($user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 1 WHERE rowid = '.((int) $this->id); @@ -1034,10 +1050,10 @@ public function validate(User $user = null) /** * Reject payment * - * @param User|null $user User making reject + * @param ?User $user User making reject * @return int Return integer <0 if KO, >0 if OK */ - public function reject(User $user = null) + public function reject($user = null) { $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element.' SET statut = 2 WHERE rowid = '.((int) $this->id); diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index f700ac3459d4c..d65de629e5ef6 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -543,6 +543,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['p.ref']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 8c9aec53eea78..4f3caf56c76c3 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -579,6 +579,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['cs.rowid']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['cs.rowid']['label'], $_SERVER["PHP_SELF"], "cs.rowid", '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 1aec1aad9df74..4228df6bbe602 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -532,6 +532,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['t.rowid']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['t.rowid']['label'], $_SERVER['PHP_SELF'], 't.rowid', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 9a79ca2388a2a..8ea3f68d96d7d 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -1338,6 +1338,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", $begin, $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 05e1d1e7a9424..a863b6925578d 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -195,7 +195,7 @@ 'c.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 500), 'lower_planned_end_date' => array('label' => $langs->trans("LowerDateEndPlannedShort"), 'checked' => 1, 'position' => 900, 'help' => $langs->trans("LowerDateEndPlannedShort")), 'status' => array('label' => $langs->trans("Status"), 'checked' => 1, 'position' => 1000), - 'c.signed_status' =>array('label' => $langs->trans('SignedStatus'), 'checked' => 0, 'position' => 1001), + 'c.signed_status' => array('label' => $langs->trans('SignedStatus'), 'checked' => 0, 'position' => 1001), ); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; @@ -1014,6 +1014,7 @@ $totalarray['nbfield']++; // For the column action } if (!empty($arrayfields['c.ref']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; // For the column action } diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 7f1ae29db306c..a51f65d5f3c2d 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -739,6 +739,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['c.ref']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, "", $sortfield, $sortorder); } if (!empty($arrayfields['p.description']['checked'])) { diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 76ca7efff3bf7..ab048d5ab6a5c 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2006-2013 Laurent Destailleur * Copyright (C) 2015 Francis Appels + * 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 @@ -296,7 +297,7 @@ protected function _Get_Height_Chars($pt) * protected Set format * * @param TCPDF $pdf PDF reference - * @param array{metric:string,name:string,code:string,marginLeft:float,marginTip:float,SpaceX:float,SpaceY:float,NX:int,NY:int,width:float,height:float,font-size:float} $format Format + * @param array{metric:string,name:string,code:string,marginLeft:float,marginTop:float,SpaceX:float,SpaceY:float,NX:int,NY:int,width:float,height:float,font-size:float} $format Format * @return void */ protected function _Set_Format(&$pdf, $format) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index e36e87225ece9..8a7022106beef 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -346,7 +346,7 @@ public function executeHooks($method, $parameters = array(), &$object = null, &$ } else { // Generic hooks that return a string or array (printLeftBlock, formAddObjectLine, formBuilddocOptions, ...) - // TODO. this test should be done into the method of hook by returning nothing + // TODO. this test should be done into the method of hook by returning nothing @phan-suppress-next-line PhanTypeInvalidDimOffset if (is_array($parameters) && !empty($parameters['special_code']) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actionclassinstance->module_number) { continue; } diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c19b938918258..fa41982ea2a6d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -36,6 +36,9 @@ */ class FormFile { + /** + * @var DoliDB + */ private $db; /** @@ -43,8 +46,14 @@ class FormFile */ public $error; + /** + * @var int + */ public $numoffiles; - public $infofiles; // Used to return information by function getDocumentsLink + /** + * @var array{nboffiles:int,extensions:array,files:string[]} Used to return information by function getDocumentsLink + */ + public $infofiles; /** @@ -1114,8 +1123,8 @@ public function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = $this->infofiles['nboffiles']++; $this->infofiles['files'][] = $file['fullname']; - $ext = pathinfo($file["name"], PATHINFO_EXTENSION); - if (empty($this->infofiles[$ext])) { + $ext = pathinfo($file['name'], PATHINFO_EXTENSION); + if (empty($this->infofiles['extensions'][$ext])) { $this->infofiles['extensions'][$ext] = 1; } else { $this->infofiles['extensions'][$ext]++; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index fc622a7602e5c..8b5c9a10bb8f2 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -180,7 +180,7 @@ class FormMail extends Form public $substit = array(); public $substit_lines = array(); /** - * @var array{}|array{models:string,langmodels?:string,fileinit?:string[],returnurl:string} + * @var array{}|array{models:string,langsmodels?:string,fileinit?:string[],returnurl:string} */ public $param = array(); diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 64f5b860e09ee..7b33aed608877 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -177,12 +177,12 @@ public static function checkRequiredFields(array $fields, int &$errors) * @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end() * @param string $mode Mode ('create' or 'edit') * @param int $public 1=If we show the form for the public interface - * @param Contact|null $with_contact [=NULL] Contact to link to this ticket if it exists + * @param ?Contact $with_contact [=NULL] Contact to link to this ticket if it exists * @param string $action [=''] Action in card * @param ?Ticket $object [=NULL] Ticket object * @return void */ - public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Contact $with_contact = null, $action = '', Ticket $object = null) + public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, $with_contact = null, $action = '', $object = null) { global $conf, $langs, $user, $hookmanager; @@ -234,7 +234,9 @@ public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, Con print '
    param["returnurl"] : $_SERVER['PHP_SELF']).'">'; print ''; print ''; - if (!empty($object->id)) print ''; + if (!empty($object->id)) { + print ''; + } print ''; foreach ($this->param as $key => $value) { print ''; diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index c823fde9c2e61..98445ef7cef75 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -117,6 +117,7 @@ public function run_triggers($action, $object, $user, $langs, $conf) $handle = opendir($newdir); if (is_resource($handle)) { $fullpathfiles = array(); + '@phan-var-force array $fullpathfiles'; while (($file = readdir($handle)) !== false) { $reg = array(); if (is_readable($newdir."/".$file) && preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php$/i', $file, $reg)) { @@ -146,7 +147,7 @@ public function run_triggers($action, $object, $user, $langs, $conf) $modName = "Interface".ucfirst($reg[3]); //print "file=$file - modName=$modName\n"; - if (in_array($modName, $modules)) { // $modules = list of modName already loaded + if (array_key_exists($modName, $fullpathfiles)) { // $modules = list of modName already loaded, fullpathfiles[$modName] is alsoset $langs->load("errors"); dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger", $newdir."/".$file, $fullpathfiles[$modName]), LOG_WARNING); continue; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 7a2fa57b2d3fc..e3c73ebd6b941 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -263,10 +263,10 @@ public function confirmMessage($action, $socid, $object) /** * Delete a notification from database * - * @param User|null $user User deleting + * @param ?User $user User deleting * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null) + public function delete($user = null) { $error = 0; @@ -296,11 +296,11 @@ public function delete(User $user = null) /** * Create notification information record. * - * @param User|null $user User - * @param int $notrigger 1=Disable triggers + * @param ?User $user User + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, > 0 if OK (ID of newly created company notification information) */ - public function create(User $user = null, $notrigger = 0) + public function create($user = null, $notrigger = 0) { $now = dol_now(); @@ -398,11 +398,11 @@ public function fetch($id, $socid = 0, $type = 'email') /** * Update record in database * - * @param User|null $user Object user - * @param int $notrigger 1=Disable triggers + * @param ?User $user Object user + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <=0 if KO, >0 if OK */ - public function update(User $user = null, $notrigger = -1) + public function update($user = null, $notrigger = 0) { global $langs; diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index fdd92036321ab..ed3c969022b81 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -933,7 +933,7 @@ function xml2php($xml) } //Let see if the new child is not in the array - if ($tab === false && in_array($key, array_keys($array))) { + if ($tab === false && array_key_exists($key, $array)) { //If this element is already in the array we will create an indexed array $tmp = $array[$key]; $array[$key] = null; diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index d1c87ba09c2f9..64aad1cb547b8 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -1026,7 +1026,7 @@ //var_dump('gvaluepossiblekey='.$gvaluepossiblekey.' gvaluepossiblelabel='.$gvaluepossiblelabel.' ykeysuffix='.$ykeysuffix.' gval='.$gval.' gvalwithoutsuffix='.$gvalwithoutprefix); //var_dump('fieldforg='.$fieldforg.' obj->$fieldforg='.$obj->$fieldforg.' fieldfory='.$fieldfory.' obj->$fieldfory='.$obj->$fieldfory.' fieldforybis='.$fieldforybis); - if (!is_array($data[$xi])) { + if (!array_key_exists($xi, $data)) { $data[$xi] = array(); } diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 1ec47f700ec53..1592aee417fdb 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -1007,7 +1007,7 @@ public function DDLAddField($table, $field_name, $field_desc, $field_position = * * @param string $table Name of table * @param string $field_name Name of field to modify - * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string} $field_desc Array with description of field format + * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string,value?:string,null?:string} $field_desc Array with description of field format * @return int Return integer <0 if KO, >0 if OK */ public function DDLUpdateField($table, $field_name, $field_desc) @@ -1015,10 +1015,10 @@ public function DDLUpdateField($table, $field_name, $field_desc) // phpcs:enable $sql = "ALTER TABLE ".$this->sanitize($table); $sql .= " MODIFY COLUMN ".$this->sanitize($field_name)." ".$this->sanitize($field_desc['type']); - if (in_array($field_desc['type'], array('double', 'tinyint', 'int', 'varchar')) && $field_desc['value']) { + if (in_array($field_desc['type'], array('double', 'tinyint', 'int', 'varchar')) && array_key_exists('value', $field_desc) && $field_desc['value']) { $sql .= "(".$this->sanitize($field_desc['value']).")"; } - if (isset($field_desc['value']) && ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL')) { + if (isset($field_desc['null']) && ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL')) { // We will try to change format of column to NOT NULL. To be sure the ALTER works, we try to update fields that are NULL if ($field_desc['type'] == 'varchar' || $field_desc['type'] == 'text') { $sqlbis = "UPDATE ".$this->sanitize($table)." SET ".$this->sanitize($field_name)." = '".$this->escape(isset($field_desc['default']) ? $field_desc['default'] : '')."' WHERE ".$this->sanitize($field_name)." IS NULL"; diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index c016e137d74b5..7188062936be6 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -1242,7 +1242,7 @@ public function DDLAddField($table, $field_name, $field_desc, $field_position = * * @param string $table Name of table * @param string $field_name Name of field to modify - * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string} $field_desc Array with description of field format + * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string,value?:string,null?:string} $field_desc Array with description of field format * @return int Return integer <0 if KO, >0 if OK */ public function DDLUpdateField($table, $field_name, $field_desc) @@ -1256,7 +1256,7 @@ public function DDLUpdateField($table, $field_name, $field_desc) } } - if (isset($field_desc['value']) && ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL')) { + if (isset($field_desc['null']) && ($field_desc['null'] == 'not null' || $field_desc['null'] == 'NOT NULL')) { // We will try to change format of column to NOT NULL. To be sure the ALTER works, we try to update fields that are NULL if ($field_desc['type'] == 'varchar' || $field_desc['type'] == 'text') { $sqlbis = "UPDATE ".$this->sanitize($table)." SET ".$this->escape($field_name)." = '".$this->escape(isset($field_desc['default']) ? $field_desc['default'] : '')."' WHERE ".$this->escape($field_name)." IS NULL"; diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 4d66d8a18dfb3..c45fe80a7b94f 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -962,7 +962,7 @@ public function DDLInfoTable($table) * Create a table into database * * @param string $table Nom de la table - * @param array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>}> $fields Tableau associatif [nom champ][tableau des descriptions] + * @param array|string,position:int,notnull?:int,visible:int<-2,5>|string,noteditable?:int<0,1>,default?:string,index?:int,foreignkey?:string,searchall?:int<0,1>,isameasure?:int<0,1>,css?:string,csslist?:string,help?:string,showoncombobox?:int<0,2>,disabled?:int<0,1>,arrayofkeyval?:array,comment?:string,validate?:int<0,1>,value?:string,attribute?:string,null?:string,extra?:string}> $fields Tableau associatif [nom champ][tableau des descriptions] * @param string $primary_key Nom du champ qui sera la clef primaire * @param string $type Type de la table * @param array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur @@ -1146,7 +1146,7 @@ public function DDLAddField($table, $field_name, $field_desc, $field_position = * * @param string $table Name of table * @param string $field_name Name of field to modify - * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string} $field_desc Array with description of field format + * @param array{type:string,label:string,enabled:int<0,2>|string,position:int,notnull?:int,visible:int,noteditable?:int,default?:string,index?:int,foreignkey?:string,searchall?:int,isameasure?:int,css?:string,csslist?:string,help?:string,showoncombobox?:int,disabled?:int,arrayofkeyval?:array,comment?:string,value?:string} $field_desc Array with description of field format * @return int Return integer <0 if KO, >0 if OK */ public function DDLUpdateField($table, $field_name, $field_desc) diff --git a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php index 15b3fffaec2f2..52ab28c9a1241 100644 --- a/htdocs/core/filemanagerdol/connectors/php/connector.lib.php +++ b/htdocs/core/filemanagerdol/connectors/php/connector.lib.php @@ -305,7 +305,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') $sErrorNumber = '0'; $sFileName = ''; - if (isset($_FILES['NewFile']) && !is_null($_FILES['NewFile']['tmp_name']) || (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name']))) { + if (isset($_FILES['NewFile']) && !is_null($_FILES['NewFile']['tmp_name']) && !is_null($_FILES['NewFile']['name']) || (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name']) && !is_null($_FILES['upload']['name']))) { global $Config; $oFile = isset($_FILES['NewFile']) ? $_FILES['NewFile'] : $_FILES['upload']; diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 7ce5e6e77ffd5..9edb9f58e529a 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -281,7 +281,7 @@ function various_payment_prepare_head($object) * @param ?string $swift Swift value (used to get BIC/SWIFT, param $account non used if provided) * @return boolean True if information are valid, false otherwise */ -function checkSwiftForAccount(Account $account = null, $swift = null) +function checkSwiftForAccount($account = null, $swift = null) { if ($account == null && $swift == null) { return false; @@ -302,7 +302,7 @@ function checkSwiftForAccount(Account $account = null, $swift = null) * @param ?string $ibantocheck Bank account number (used to get BAN, $account not used if provided) * @return boolean True if information are valid, false otherwise */ -function checkIbanForAccount(Account $account = null, $ibantocheck = null) +function checkIbanForAccount($account = null, $ibantocheck = null) { if ($account == null && $ibantocheck == null) { return false; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index e1e369bbbb0a2..ee0506f4daaad 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1737,19 +1737,19 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = null, $nopr * Show html area with actions (done or not, ignore the name of function). * Note: Global parameter $param must be defined. * - * @param Conf $conf Object conf - * @param Translate $langs Object langs - * @param DoliDB $db Object db - * @param mixed $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object - * @param ?Contact $objcon Filter on object contact to filter events on a contact - * @param int $noprint Return string but does not output it - * @param string|string[] $actioncode Filter on actioncode - * @param string $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all). - * @param array $filters Filter on other fields - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param string $module You can add module name here if elementtype in table llx_actioncomm is objectkey@module - * @return ?string Return html part or void if noprint is 1 + * @param Conf $conf Object conf + * @param Translate $langs Object langs + * @param DoliDB $db Object db + * @param ?CommonObject $filterobj Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object + * @param ?Contact $objcon Filter on object contact to filter events on a contact + * @param int<0,1> $noprint Return string but does not output it + * @param string|string[] $actioncode Filter on actioncode + * @param 'done'|'todo'|'' $donetodo Filter on event 'done' or 'todo' or ''=nofilter (all). + * @param array $filters Filter on other fields + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param string $module You can add module name here if elementtype in table llx_actioncomm is objectkey@module + * @return ?string Return html part or void if noprint is 1 */ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '') { diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index a8bdff59b9797..ad6ba31d17a56 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -31,7 +31,7 @@ /** * Return an array with timezone values * - * @return array Array with timezone values + * @return array,string> Array with timezone values */ function get_tz_array() { @@ -478,7 +478,7 @@ function dol_stringtotime($string, $gm = 1) * @param int $day Day * @param int $month Month * @param int $year Year - * @return array Previous year,month,day + * @return array{year:int,month:int,day:int} Previous year,month,day */ function dol_get_prev_day($day, $month, $year) { @@ -494,7 +494,7 @@ function dol_get_prev_day($day, $month, $year) * @param int $day Day * @param int $month Month * @param int $year Year - * @return array Next year,month,day + * @return array{year:int,month:int,day:int} Next year,month,day */ function dol_get_next_day($day, $month, $year) { @@ -509,7 +509,7 @@ function dol_get_next_day($day, $month, $year) * * @param int $month Month * @param int $year Year - * @return array Previous year,month + * @return array{year:int,month:int} Previous year,month */ function dol_get_prev_month($month, $year) { @@ -528,7 +528,7 @@ function dol_get_prev_month($month, $year) * * @param int $month Month * @param int $year Year - * @return array Next year,month + * @return array{year:int,month:int} Next year,month */ function dol_get_next_month($month, $year) { @@ -549,7 +549,7 @@ function dol_get_next_month($month, $year) * @param int $week Week * @param int $month Month * @param int $year Year - * @return array Previous year,month,day + * @return array{year:int,month:int,day:int} Previous year,month,day */ function dol_get_prev_week($day, $week, $month, $year) { @@ -568,7 +568,7 @@ function dol_get_prev_week($day, $week, $month, $year) * @param int $week Week * @param int $month Month * @param int $year Year - * @return array Next year,month,day + * @return array{year:int,month:int,day:int} Next year,month,day */ function dol_get_next_week($day, $week, $month, $year) { @@ -663,9 +663,9 @@ function dol_get_first_hour($date, $gm = 'tzserver') * @param int $day Day * @param int $month Month * @param int $year Year - * @param bool|int|string $gm False or 0 or 'tzserver' = Return date to compare with server TZ, - * True or 1 or 'gmt' to compare with GMT date. - * @return array year,month,week,first_day,first_month,first_year,prev_day,prev_month,prev_year + * @param bool|int|'tzserver' $gm False or 0 or 'tzserver' = Return date to compare with server TZ, + * True or 1 or 'gmt' to compare with GMT date. + * @return array{year:int,month:int,week:string,first_day:int,first_month:int,first_year:int,prev_year:int,prev_month:int,prev_day:int} */ function dol_get_first_day_week($day, $month, $year, $gm = false) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 625437fd0a19a..b6e45132e4056 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -281,7 +281,7 @@ function getDolUserInt($key, $default = 0, $tmpuser = null) $tmpuser = $user; } - return (int) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key: $default); + return (int) (isset($tmpuser->conf->$key) ? $tmpuser->conf->$key : $default); } @@ -2234,7 +2234,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = } if (!empty($message)) { - // Test log level @phan-ignore-next-line PhanPluginDuplicateArrayKey + // Test log level @phan-suppress-next-line PhanPluginDuplicateArrayKey $logLevels = array(LOG_EMERG => 'EMERG', LOG_ALERT => 'ALERT', LOG_CRIT => 'CRITICAL', LOG_ERR => 'ERR', LOG_WARNING => 'WARN', LOG_NOTICE => 'NOTICE',LOG_INFO => 'INFO', LOG_DEBUG => 'DEBUG'); if (!array_key_exists($level, $logLevels)) { throw new Exception('Incorrect log level'); @@ -12384,7 +12384,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st $dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : ($params['tooltip'] != 'no' ? $params['tooltip'] : ''); } else { // If a title was forced from $params['badgeParams']['attr']['title'], we set the class to get it as a tooltip. $dolGetBadgeParams['attr']['class'] .= ' classfortooltip'; - // And if we use tooltip, we can output title in HTML + // And if we use tooltip, we can output title in HTML @phan-suppress-next-line PhanTypeInvalidDimOffset $dolGetBadgeParams['attr']['title'] = dol_htmlentitiesbr($dolGetBadgeParams['attr']['title'], 1); } @@ -12452,6 +12452,7 @@ function dolGetButtonAction($label, $text = '', $actionType = 'default', $url = $out = ''; + // @phan-suppress-next-line PhanTypeInvalidDimOffset if (isset($params["areDropdownButtons"]) && $params["areDropdownButtons"] === false) { foreach ($url as $button) { if (!empty($button['lang'])) { diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 30fd7f7b1b5af..c519060c07e4b 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -117,10 +117,10 @@ function dolGetModulesDirs($subdir = '') /** * Try to guess default paper format according to language into $langs * - * @param Translate|null $outputlangs Output lang to use to autodetect output format if setup not done + * @param ?Translate $outputlangs Output lang to use to autodetect output format if setup not done * @return string Default paper format code */ -function dol_getDefaultFormat(Translate $outputlangs = null) +function dol_getDefaultFormat($outputlangs = null) { global $langs; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 3e4c32493fd9e..9ffeb95e9f4b8 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -83,7 +83,7 @@ function pdf_admin_prepare_head() * @param 'setup'|'auto' $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup * @return array{width:float|int,height:float|int,unit:string} Array('width'=>w,'height'=>h,'unit'=>u); */ -function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') +function pdf_getFormat($outputlangs = null, $mode = 'setup') { global $conf, $db, $langs; diff --git a/htdocs/core/lib/profid.lib.php b/htdocs/core/lib/profid.lib.php index f4b54afb18b73..666e81121b08e 100644 --- a/htdocs/core/lib/profid.lib.php +++ b/htdocs/core/lib/profid.lib.php @@ -189,6 +189,7 @@ function isValidTinForES($str) for ($i = 0; $i < 9; $i++) { $num[$i] = substr($str, $i, 1); } + '@phan-var-force array,string> $num'; //Check NIF if (preg_match('/(^[0-9]{8}[A-Z]{1}$)/', $str)) { diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index e5f2244f88a0d..afa04f17b488a 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -83,9 +83,9 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $showmode = dol_auguria_showmenu($type_user, $newTabMenu[$i], $listofmodulesforexternal); if ($showmode == 1) { $newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray); - // url = url from host, shorturl = relative path into dolibarr sources $url = $shorturl = $newTabMenu[$i]['url']; + if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) { // Do not change url content for external links $tmp = explode('?', $newTabMenu[$i]['url'], 2); $url = $shorturl = $tmp[0]; @@ -109,6 +109,9 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout } } + // Phan issue #4881 requires that we reforce the type + '@phan-var-force array,type:string,fk_mainmenu:string,fk_leftmenu:string,url:string,titre:string,perms:string,target:string,mainmenu:string,leftmenu:string,position:int,prefix:string}> $newTabMenu'; + // TODO Find a generic solution if (preg_match('/search_project_user=__search_project_user__/', $shorturl)) { $search_project_user = GETPOSTINT('search_project_user'); @@ -119,6 +122,9 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout } } + // Phan issue #4881 requires that we reforce the type + '@phan-var-force array,type:string,fk_mainmenu:string,fk_leftmenu:string,url:string,titre:string,perms:string,target:string,mainmenu:string,leftmenu:string,position:int,prefix:string}> $newTabMenu'; + // Define the class (top menu selected or not) if (!empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) { $classname = 'class="tmenusel"'; @@ -690,7 +696,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t * Function to test if an entry is enabled or not * * @param int $type_user 0=We need backoffice menu, 1=We need frontoffice menu - * @param array{rowid:string,fk_menu:string,langs:string,enabled:int<0,2>,type:string,fk_mainmenu:string,fk_leftmenu:string,url:string,titre:string,perms:string,target:string,mainmenu:string,leftmenu:string,position:int,level:int,prefix:string} $menuentry Array for menu entry + * @param array{rowid:string,fk_menu:string,langs:string,enabled:int<0,2>,type:string,fk_mainmenu:string,fk_leftmenu:string,url:string,titre:string,perms:string,target:string,mainmenu:string,leftmenu:string,position:int,level:int,prefix:string,module:string} $menuentry Array for menu entry * @param string[] $listofmodulesforexternal Array with list of modules allowed to external users * @return int<0,2> 0=Hide, 1=Show, 2=Show gray */ diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 5416dfad1f0f0..a6190316c9f46 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -281,6 +281,7 @@ public function showmenu($mode, $moredata = null) if ($val2['level'] > 0) { $levelcursor = $val2['level'] - 1; while ($levelcursor >= 0) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($lastlevel2[$levelcursor] != 'enabled') { $showmenu = false; } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index c3fdfdba886d1..da693f6abbe2a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -498,6 +498,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $idsel = (empty($newTabMenu[$i]['mainmenu']) ? 'none' : $newTabMenu[$i]['mainmenu']); $newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray); + '@phan-var-force array,type:string,fk_mainmenu:string,fk_leftmenu:string,url:string,titre:string,perms:string,target:string,mainmenu:string,leftmenu:string,position:int,prefix:string}> $newTabMenu'; // url = url from host, shorturl = relative path into dolibarr sources $url = $shorturl = $newTabMenu[$i]['url']; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index f00a785d93c12..915e6a3251ef4 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -288,6 +288,7 @@ public function showmenu($mode, $moredata = null) if ($val2['level'] > 0) { $levelcursor = $val2['level'] - 1; while ($levelcursor >= 0) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($lastlevel2[$levelcursor] != 'enabled') { $showmenu = false; } diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index 6912fccb4ad4c..7c53070f59a10 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -454,7 +454,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede * @param ?Fichinter $object FichInter Object * @return void */ - protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, Fichinter $object = null) + protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $object = null) { global $conf; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index fc1217833eae3..3960be82f19f8 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -664,11 +664,11 @@ public function fetchAll(string $sortorder = 'DESC', string $sortfield = 't.rowi /** * Update object into database * - * @param User|null $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param ?User $user User that modifies + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int if KO: <0 || if OK: >0 */ - public function update(User $user = null, int $notrigger = 0) + public function update($user = null, int $notrigger = 0) { global $conf, $langs; diff --git a/htdocs/don/paiement/list.php b/htdocs/don/paiement/list.php index 81668de176dae..d3d08775372b6 100644 --- a/htdocs/don/paiement/list.php +++ b/htdocs/don/paiement/list.php @@ -443,6 +443,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['pd.rowid']['checked'])) { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['pd.rowid']['label'], $_SERVER["PHP_SELF"], "pd.rowid", '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 202ba3a64147b..3c78075a1cec8 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -50,7 +50,6 @@ use Webklex\PHPIMAP\ClientManager; use Webklex\PHPIMAP\Exceptions\ConnectionFailedException; use Webklex\PHPIMAP\Exceptions\InvalidWhereQueryCriteriaException; - use OAuth\Common\Storage\DoliStorage; use OAuth\Common\Consumer\Credentials; @@ -1011,6 +1010,7 @@ private function overwritePropertiesOfObject(&$object, $actionparam, $messagetex if (property_exists($object, $tmpproperty)) { $valuecurrent = $object->$tmpproperty; } else { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $valuecurrent = $tmp[$tmpproperty]; } } @@ -1031,6 +1031,7 @@ private function overwritePropertiesOfObject(&$object, $actionparam, $messagetex if (property_exists($object, $keytoreplace)) { $substitutionarray['__'.$keytoreplace.'__'] = $object->$keytoreplace; } else { + // False positive @phan-suppress-next-line PhanTypeInvalidDimOffset $substitutionarray['__'.$keytoreplace.'__'] = $tmp[$keytoreplace]; } } @@ -3579,7 +3580,7 @@ public function doCollectOneCollector($mode = 0) foreach ($arrayofemailtodelete as $imapemailnum => $imapemail) { dol_syslog("EmailCollect::doCollectOneCollector delete email ".$imapemailnum); - $operationslog .= "
    move email ".$imapemailnum.($mode> 0 ? ' (test)' : ''); + $operationslog .= "
    move email ".$imapemailnum.($mode > 0 ? ' (test)' : ''); if (empty($mode) && empty($error)) { $tmptargetdir = $targetdir; @@ -3614,7 +3615,7 @@ public function doCollectOneCollector($mode = 0) foreach ($arrayofemailtodelete as $imapemail => $msgid) { dol_syslog("EmailCollect::doCollectOneCollector delete email ".$imapemail." ".$msgid); - $operationslog .= "
    delete email ".$imapemail." ".$msgid.($mode> 0 ? ' (test)' : ''); + $operationslog .= "
    delete email ".$imapemail." ".$msgid.($mode > 0 ? ' (test)' : ''); if (empty($mode) && empty($error)) { $res = imap_mail_move($connection, $imapemail, $targetdir, CP_UID); diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 9e4825356ec09..a03f253f01da4 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -293,6 +293,7 @@ public function createFromClone(User $user, $fromid) // Clear fields if (property_exists($object, 'ref')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->ref = empty($this->fields['ref']['default']) ? "(PROV)" : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index e4e504545f9eb..2703f06ebc0df 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -141,12 +141,12 @@ 'e.datec' => array('label' => $langs->trans("DateCreation"), 'checked' => 0, 'position' => 500), 'e.tms' => array('label' => $langs->trans("DateModificationShort"), 'checked' => 0, 'position' => 500), 'e.fk_statut' => array('label' => $langs->trans("Status"), 'checked' => 1, 'position' => 1000), - 'e.signed_status' =>array('label' => 'Signed status', 'checked' => 0, 'position' => 1001), + 'e.signed_status' => array('label' => 'Signed status', 'checked' => 0, 'position' => 1001), 'l.ref' => array('label' => $langs->trans("DeliveryRef"), 'checked' => 1, 'position' => 1010, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), 'l.date_delivery' => array('label' => $langs->trans("DateReceived"), 'position' => 1020, 'checked' => 1, 'enabled' => (getDolGlobalInt('MAIN_SUBMODULE_DELIVERY') ? 1 : 0)), 'e.billed' => array('label' => $langs->trans("Billed"), 'checked' => 1, 'position' => 1100, 'enabled' => 'getDolGlobalString("WORKFLOW_BILL_ON_SHIPMENT") !== "0"'), - 'e.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position'=>135), - 'e.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position'=>140), + 'e.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'enabled' => (empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES)), 'position' => 135), + 'e.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'enabled' => (empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES)), 'position' => 140), ); // Extra fields @@ -237,7 +237,7 @@ $TFactThirdNbLines = array(); $nb_bills_created = 0; - $lastid= 0; + $lastid = 0; $lastref = ''; $db->begin(); @@ -348,7 +348,7 @@ $desc = ($lines[$i]->desc ? $lines[$i]->desc : ''); // If we build one invoice for several sendings, we must put the ref of sending on the invoice line if (!empty($createbills_onebythird)) { - $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref. ' - '. $langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day'):'')); + $desc = dol_concatdesc($desc, $langs->trans("Order").': '.$expdCmdSrc->ref. ' - '. $langs->trans("Shipment").': '.$expd->ref.($expd->date_shipping ? ' - '.dol_print_date($expd->date_shipping, 'day') : '')); } if ($lines[$i]->subprice < 0 && empty($conf->global->INVOICE_KEEP_DISCOUNT_LINES_AS_IN_ORIGIN)) { @@ -446,8 +446,9 @@ ); if ($result > 0) { $lineid = $result; - if (!empty($createbills_onebythird)) //increment rang to keep sending + if (!empty($createbills_onebythird)) { //increment rang to keep sending $TFactThirdNbLines[$expd->socid]++; + } } else { $lineid = 0; $error++; @@ -557,7 +558,7 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { $param .= '&search_type_thirdparty='.urlencode($search_type_thirdparty); } - if ($search_datedelivery_start) { + if ($search_datedelivery_start) { $param .= '&search_datedelivery_startday='.urlencode(dol_print_date($search_datedelivery_start, '%d')).'&search_datedelivery_startmonth='.urlencode(dol_print_date($search_datedelivery_start, '%m')).'&search_datedelivery_startyear='.urlencode(dol_print_date($search_datedelivery_start, '%Y')); } if ($search_datedelivery_end) { @@ -1335,6 +1336,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['e.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 2701adeee3451..3f76f866abd4d 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1181,11 +1181,11 @@ public function fetch_lines() /** * Delete object in database * - * @param User|null $user User that delete - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param ?User $user User that delete + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = 0) + public function delete($user = null, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2790,6 +2790,7 @@ public function computeTotalKm($fk_cat, $qty, $tva) for ($i = 0; $i < $num; $i++) { if ($i < ($num - 1)) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i + 1]->range_ik) { $coef = $ranges[$i]->coef; $offset = $ranges[$i]->ikoffset; diff --git a/htdocs/expensereport/payment/list.php b/htdocs/expensereport/payment/list.php index cf25745bdcedb..32399bec27dc2 100644 --- a/htdocs/expensereport/payment/list.php +++ b/htdocs/expensereport/payment/list.php @@ -518,6 +518,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['pndf.rowid']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['pndf.rowid']['label'], $_SERVER["PHP_SELF"], 'pndf.rowid', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 0eb8f68236a01..35206e7fcd611 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -142,7 +142,7 @@ 'f.note_public' => array('label' => 'NotePublic', 'checked' => 0, 'position' => 510, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PUBLIC_NOTES'))), 'f.note_private' => array('label' => 'NotePrivate', 'checked' => 0, 'position' => 511, 'enabled' => (!getDolGlobalInt('MAIN_LIST_HIDE_PRIVATE_NOTES'))), 'f.fk_statut' => array('label' => 'Status', 'checked' => 1, 'position' => 1000), - 'f.signed_status' =>array('label' => 'SignedStatus', 'checked' => 0, 'position' => 1001), + 'f.signed_status' => array('label' => 'SignedStatus', 'checked' => 0, 'position' => 1001), 'fd.description' => array('label' => "DescriptionOfLine", 'checked' => 1, 'enabled' => getDolGlobalString('FICHINTER_DISABLE_DETAILS') != '1' ? 1 : 0), 'fd.date' => array('label' => 'DateOfLine', 'checked' => 1, 'enabled' => getDolGlobalString('FICHINTER_DISABLE_DETAILS') != '1' ? 1 : 0), 'fd.duree' => array('label' => 'DurationOfLine', 'type' => 'duration', 'checked' => 1, 'enabled' => !getDolGlobalString('FICHINTER_DISABLE_DETAILS') ? 1 : 0), //type duration is here because in database, column 'duree' is double @@ -706,6 +706,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['f.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } @@ -975,7 +976,8 @@ if (!empty($arrayfields['f.note_public']['checked'])) { print '
    ';if (!$i) { + print ''; + if (!$i) { $totalarray['nbfield']++; } } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 302f627553f79..e817130a3d8eb 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3633,7 +3633,7 @@ public function calcAndSetStatusDispatch(User $user, $closeopenorder = 1, $comme //scan the array of results foreach ($diff_array as $key => $value) { - //if the quantity delivered is greater or equal to wish quantity + //if the quantity delivered is greater or equal to wish quantity @phan-suppress-next-line PhanTypeInvalidDimOffset if ($qtydelivered[$key] >= $qtywished[$key]) { $close++; } diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index bb877a034ac48..9e5601e801dfa 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -291,6 +291,14 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) if ($invoice->type == FactureFournisseur::TYPE_DEPOSIT) { $amount_ht = $amount_tva = $amount_ttc = array(); $multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array(); + ' + @phan-var-force array $amount_ht + @phan-var-force array $amount_tva + @phan-var-force array $amount_ttc + @phan-var-force array $multicurrency_amount_ht + @phan-var-force array $multicurrency_amount_tva + @phan-var-force array $multicurrency_amount_ttc + '; // Insert one discount by VAT rate category require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php'; @@ -307,6 +315,14 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) $i = 0; foreach ($invoice->lines as $line) { if ($line->total_ht != 0) { // no need to create discount if amount is null + if (!array_key_exists($line->tva_tx, $amount_ht)) { + $amount_ht[$line->tva_tx] = 0.0; + $amount_tva[$line->tva_tx] = 0.0; + $amount_ttc[$line->tva_tx] = 0.0; + $multicurrency_amount_ht[$line->tva_tx] = 0.0; + $multicurrency_amount_tva[$line->tva_tx] = 0.0; + $multicurrency_amount_ttc[$line->tva_tx] = 0.0; + } $amount_ht[$line->tva_tx] += $line->total_ht; $amount_tva[$line->tva_tx] += $line->total_tva; $amount_ttc[$line->tva_tx] += $line->total_ttc; @@ -324,7 +340,7 @@ public function create($user, $closepaidinvoices = 0, $thirdparty = null) $discount->multicurrency_amount_ht = abs($multicurrency_amount_ht[$tva_tx]); $discount->multicurrency_amount_tva = abs($multicurrency_amount_tva[$tva_tx]); $discount->multicurrency_amount_ttc = abs($multicurrency_amount_ttc[$tva_tx]); - $discount->tva_tx = abs($tva_tx); + $discount->tva_tx = abs((float) $tva_tx); $result = $discount->create($user); if ($result < 0) { diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 05d7873c8963d..e195cb9b9dd85 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -1612,6 +1612,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/fourn/facture/list-rec.php b/htdocs/fourn/facture/list-rec.php index a801358b3de9c..cf987680bb778 100644 --- a/htdocs/fourn/facture/list-rec.php +++ b/htdocs/fourn/facture/list-rec.php @@ -739,6 +739,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['f.titre']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['f.titre']['label'], $_SERVER['PHP_SELF'], "f.titre", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 933f7a686ac43..99d1636f84174 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1370,6 +1370,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 67d30d18d4185..7efc78de27655 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -494,6 +494,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['p.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.rowid', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 71e78177eb7ff..64c29099b6bcf 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -746,9 +746,9 @@ public function fetchAll($order, $filter) /** * Validate leave request * - * @param User $user User that validate - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, >0 if OK + * @param User $user User that validate + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int Return integer <0 if KO, >0 if OK */ public function validate($user = null, $notrigger = 0) { @@ -871,8 +871,8 @@ public function validate($user = null, $notrigger = 0) /** * Approve leave request * - * @param User $user User that approve - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param User $user User that approve + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int Return integer <0 if KO, >0 if OK */ public function approve($user = null, $notrigger = 0) @@ -998,8 +998,8 @@ public function approve($user = null, $notrigger = 0) /** * Update database * - * @param User $user User that modify - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param User $user User that modify + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int Return integer <0 if KO, >0 if OK */ public function update($user = null, $notrigger = 0) @@ -1268,7 +1268,7 @@ public function verifDateHolidayCP($fk_user, $dateStart, $dateEnd, $halfday = 0) * @param int $fk_user Id user * @param integer $timestamp Time stamp date for a day (YYYY-MM-DD) without hours (= 12:00AM in english and not 12:00PM that is 12:00) * @param string $status Filter on holiday status. '-1' = no filter. - * @return array array('morning'=> ,'afternoon'=> ), Boolean is true if user is available for day timestamp. + * @return array{morning_reason?:string,afternoon_reason?:string} array('morning'=> ,'afternoon'=> ), Boolean is true if user is available for day timestamp. * @see verifDateHolidayCP() */ public function verifDateHolidayForTimestamp($fk_user, $timestamp, $status = '-1') @@ -1685,7 +1685,7 @@ public function updateSoldeCP($userID = 0, $nbHoliday = 0, $fk_type = 0) dol_syslog("We update leave type id ".$userCounter['type']." for user id ".$userCounter['rowid'], LOG_DEBUG); - $nowHoliday = $userCounter['nb_holiday']; + $nowHoliday = (float) $userCounter['nb_holiday']; $newSolde = $nowHoliday + $nbDaysToAdd; // We add a log for each user @@ -1794,7 +1794,7 @@ public function createCPusers($single = false, $userid = 0) * * @param int $user_id User ID * @param int $fk_type Filter on type - * @return float|null Balance of annual leave if OK, null if KO. + * @return ?float Balance of annual leave if OK, null if KO. */ public function getCPforUser($user_id, $fk_type = 0) { @@ -1821,12 +1821,12 @@ public function getCPforUser($user_id, $fk_type = 0) } /** - * Get list of Users or list of vacation balance. + * Get list of Users or list of vacation balance. * - * @param boolean $stringlist If true return a string list of id. If false, return an array with detail. - * @param boolean $type If true, read Dolibarr user list, if false, return vacation balance list. - * @param string $filters Filters. Warning: This must not contains data from user input. - * @return array|string|int Return an array + * @param boolean $stringlist If true return a string list of id. If false, return an array with detail. + * @param boolean $type If true, read Dolibarr user list, if false, return vacation balance list. + * @param string $filters Filters. Warning: This must not contains data from user input. + * @return array{rowid:int,id:int,name:string,lastname:string,firstname:string,gender:string,status:string,employee:string,photo:string,fk_user:int,type?:int,nb_holiday?:int}|string|int<-1,-1> Return an array */ public function fetchUsers($stringlist = true, $type = true, $filters = '') { @@ -2481,7 +2481,7 @@ public function load_board($user) * Return clickable link of object (with eventually picto) * * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link) - * @param array{string,mixed} $arraydata Label of holiday type (if known) + * @param ?array{labeltype:string,selected?:int<0,1>,nbopenedday?:int} $arraydata Label of holiday type (if known) * @return string HTML Code for Kanban thumb. */ public function getKanbanView($option = '', $arraydata = null) diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index d298515a6a2bb..fd66faef31c8c 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -212,9 +212,9 @@ public function __construct(DoliDB $db) /** * Create object into database * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, Id of created object if OK + * @param User $user User that creates + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int Return integer <0 if KO, Id of created object if OK */ public function create(User $user, $notrigger = 0) { @@ -248,9 +248,9 @@ public function create(User $user, $notrigger = 0) /** * Clone an object into another one * - * @param User $user User that creates - * @param int $fromid Id of object to clone - * @return mixed New object created, <0 if KO + * @param User $user User that creates + * @param int $fromid Id of object to clone + * @return CommonObject|int<-1,-1> New object created, <0 if KO */ public function createFromClone(User $user, $fromid) { @@ -284,6 +284,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { @@ -384,7 +385,7 @@ public function fetchLines() * @param string $filter Filter as an Universal Search string. * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' * @param string $filtermode No more used - * @return array|int int <0 if KO, array of pages if OK + * @return self[]|int int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') { diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 66116e72ab77c..0786e56be7181 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -254,6 +254,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 320db66de045d..51aa62eb5d8c4 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -313,6 +313,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index d115d903071f6..f43a8bce42da1 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -261,6 +261,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'question')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->question = empty($this->fields['question']['default']) ? $langs->trans("CopyOf")." ".$object->question : $this->fields['question']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index 5958d1906d101..14b89da504c7b 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -214,7 +214,7 @@ public function post($request_data = null) foreach ($request_data as $field => $value) { if ($field === 'caller') { - // Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller + // Add a mention of caller so on trigger called after action, we can filter to avoid a loop if we try to sync back again with the caller @phan-suppress-next-line PhanTypeInvalidDimOffset $this->myobject->context['caller'] = sanitizeVal($request_data['caller'], 'aZ09'); continue; } diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index f428ea9e9d15a..5655d668c20b4 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -416,6 +416,7 @@ public function createFromClone(User $user, $fromid) // Clear fields @phan-suppress-next-line PhanTypeMismatchProperty $object->ref = empty($this->fields['ref']['default']) ? "copy_of_".$object->ref : $this->fields['ref']['default']; + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; $object->status = self::STATUS_DRAFT; // ... diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 69d1f6875b73f..b1a314c155eaa 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -825,6 +825,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['m.price']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['m.price']['label'], $_SERVER["PHP_SELF"], "m.price", "", $param, '', $sortfield, $sortorder, 'right '); $totalarray['nbfield']++; } diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 608ee219d90c1..a24cffe206879 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -528,6 +528,7 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center '); } if (!empty($arrayfields['cr.date_sync']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['cr.date_sync']['label'], $_SERVER["PHP_SELF"], "cr.date_sync", "", $param, "", $sortfield, $sortorder); } if (!empty($arrayfields['m.code']['checked'])) { diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index e3aa1de911ebb..3c9037d6d0527 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -150,6 +150,7 @@ } } + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($_SESSION["horaires$i"][0] == "" && $_SESSION["horaires$i"][1] == "" && $_SESSION["horaires$i"][2] == "" && $_SESSION["horaires$i"][3] == "" && $_SESSION["horaires$i"][4] == "") { $choixdate .= ","; $choixdate .= $_SESSION["totalchoixjour"][$i]; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 04a3a427a223c..f53bbc394ff95 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1972,6 +1972,7 @@ public function setMultiLangs($user) $sql2 .= " label = '".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2 .= " description = '".$this->db->escape($this->multilangs["$key"]["description"])."'"; if (getDolGlobalString('PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $sql2 .= ", note = '".$this->db->escape($this->multilangs["$key"]["other"])."'"; } $sql2 .= " WHERE fk_product = ".((int) $this->id)." AND lang = '".$this->db->escape($key)."'"; @@ -1984,6 +1985,7 @@ public function setMultiLangs($user) $sql2 .= " VALUES(".((int) $this->id).",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2 .= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; if (getDolGlobalString('PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $sql2 .= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'"; } $sql2 .= ")"; @@ -2307,7 +2309,7 @@ public function getSellPrice($thirdparty_seller, $thirdparty_buyer, $pqp = 0) } } - if ( !$pricebycustomerexist && !empty($thirdparty_buyer->price_level)) { + if (!$pricebycustomerexist && !empty($thirdparty_buyer->price_level)) { $pu_ht = $this->multiprices[$thirdparty_buyer->price_level]; $pu_ttc = $this->multiprices_ttc[$thirdparty_buyer->price_level]; $price_min = $this->multiprices_min[$thirdparty_buyer->price_level]; diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index 27b7deb7f2817..ca919daa86ed6 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -8,6 +8,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2023 Benjamin Falière * Copyright (C) 2024 Frédéric France + * 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 @@ -314,7 +315,7 @@ $tmpid = $id; if (!empty($conf->use_javascript_ajax)) { $nboflines = $prods_arbo; - $table_element_line='product_association'; + $table_element_line = 'product_association'; include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; } @@ -474,7 +475,7 @@ // Hook fields $parameters = array(); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Qty + IncDec @@ -529,7 +530,7 @@ // Hook fields $parameters = array(); - $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Qty in kit @@ -693,6 +694,7 @@ $prods_arbo = $prod_arbo->get_arbo_each_prod(); if (count($prods_arbo) > 0) { foreach ($prods_arbo as $key => $value) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($value[1] == $id) { $is_pere = 1; } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index b96d6d578b599..d8a18e9c67f54 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1307,6 +1307,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['p.fk_product_type']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['p.fk_product_type']['label'], $_SERVER["PHP_SELF"], "p.fk_product_type", "", $param, "", $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index 8f97cacc4ccd1..4ba9ea6f01e70 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -276,7 +276,7 @@ public function create(User $user, $notrigger = 0) * * @param User $user User that creates * @param int $fromid Id of object to clone - * @return mixed New object created, <0 if KO + * @return self|int<-1,-1> New object created, <0 if KO */ public function createFromClone(User $user, $fromid) { @@ -312,6 +312,7 @@ public function createFromClone(User $user, $fromid) // Clear fields // @phan-suppress-next-line PhanTypeMismatchProperty $object->ref = empty($this->fields['ref']['default']) ? "copy_of_".$object->ref : $this->fields['ref']['default']; + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; $object->status = self::STATUS_DRAFT; // ... @@ -443,7 +444,7 @@ public function getValorisationTotale() * @param string $filter Filter as an Universal Search string. * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' * @param string $filtermode No more used - * @return array|int int <0 if KO, array of pages if OK + * @return self[]|int int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') { @@ -958,7 +959,7 @@ public function initAsSpecimen() /** * Create an array of lines * - * @return array|int array of lines if OK, <0 if KO + * @return StockTransferLine[]|int array of lines if OK, <0 if KO */ public function getLinesArray() { diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 4876ffed32c14..5e3d83014fe9f 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -92,7 +92,7 @@ $first_year = $prev['first_year']; $week = $prev['week']; -$next = dol_get_next_week($first_day, $week, $first_month, $first_year); +$next = dol_get_next_week($first_day, (int) $week, $first_month, $first_year); $next_year = $next['year']; $next_month = $next['month']; $next_day = $next['day']; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 1e4ddef9a3254..5a25eee1a7f46 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -917,6 +917,7 @@ $defaultvat = get_default_tva($mysoc, $mysoc); $reg = array(); if (preg_replace('/^(\d+\.)\s\(.*\)/', $defaultvat, $reg)) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $defaultvat = $reg[1]; } $total_ttc_by_line = price2num($total_ht_by_line * (1 + ((float) $defaultvat / 100)), 'MT'); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index c0889f55efaf6..2ec3af767f71c 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1477,6 +1477,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } @@ -1707,8 +1708,12 @@ } foreach ($groupbyvalues as $tmpcursor => $tmpgroupbyvalue) { //var_dump("tmpcursor=".$tmpcursor." groupbyold=".$groupbyold." groupbyvalue=".$groupbyvalue); - if (!is_null($groupbyold) && ($tmpcursor <= $groupbyold)) { continue; } - if ($tmpcursor >= $groupbyvalue) { continue; } + if (!is_null($groupbyold) && ($tmpcursor <= $groupbyold)) { + continue; + } + if ($tmpcursor >= $groupbyvalue) { + continue; + } // We found a possible column with no value, we output the empty column print '
    '.$langs->trans("Project").''; if (!empty($arrayfields['t.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], 't.ref', '', $param, '', $sortfield, $sortorder, ''); } if (!empty($arrayfields['t.label']['checked'])) { diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 84e6f4042f217..43d0fcb611378 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -1082,6 +1082,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['t.tobill']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'center '); $totalarray['nbfield']++; } @@ -1459,7 +1460,7 @@ if (!empty($arrayfields['t.progress_summary']['checked'])) { print '
    '; if (!$i) { @@ -1633,6 +1634,7 @@ print ''; } elseif (!empty($totalarray['pos'][$i])) { print ''; if (!empty($arrayfields['t.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['t.ref']['label'], $_SERVER["PHP_SELF"], "t.ref", "", $param, "", $sortfield, $sortorder); } if (!empty($arrayfields['ty.label']['checked'])) { diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index c1dbb1492f7b8..006eaad69c0f3 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -302,11 +302,11 @@ public function __construct(DoliDB $db) /** * Create bank information record. * - * @param User|null $user User - * @param int $notrigger 1=Disable triggers + * @param $user User + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, > 0 if OK (ID of newly created company bank account information) */ - public function create(User $user = null, $notrigger = 0) + public function create($user = null, $notrigger = 0) { $now = dol_now(); @@ -376,11 +376,11 @@ public function create(User $user = null, $notrigger = 0) /** * Update bank account * - * @param User|null $user Object user - * @param int $notrigger 1=Disable triggers + * @param ?User $user Object user + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <=0 if KO, >0 if OK */ - public function update(User $user = null, $notrigger = 0) + public function update($user = null, $notrigger = 0) { global $langs; @@ -548,11 +548,11 @@ public function fetch($id, $ref = '', $socid = 0, $default = 1, $type = 'ban') /** * Delete a rib from database * - * @param User|null $user User deleting - * @param int $notrigger 1=Disable triggers + * @param ?User $user User deleting + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = 0) + public function delete($user = null, $notrigger = 0) { $error = 0; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 32c9ededb0ab8..5e17048b5c4be 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2194,11 +2194,11 @@ public function findNearest($rowid = 0, $ref = '', $ref_ext = '', $barcode = '', * Delete a third party from database and all its dependencies (contacts, rib...) * * @param int $id Id of third party to delete - * @param User|null $fuser User who ask to delete thirdparty - * @param int $call_trigger 0=No, 1=yes + * @param ?User $fuser User who ask to delete thirdparty + * @param int<0,1> $call_trigger 0=No, 1=yes * @return int Return integer <0 if KO, 0 if nothing done, >0 if OK */ - public function delete($id, User $fuser = null, $call_trigger = 1) + public function delete($id, $fuser = null, $call_trigger = 1) { global $conf, $user; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 74a7ee9cab5a7..e7d6d20f17054 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -290,7 +290,7 @@ 's.fax' => array('label' => "Fax", 'position' => 28, 'checked' => 0), 'typent.code' => array('label' => "ThirdPartyType", 'position' => 29, 'checked' => $checkedtypetiers), 'staff.code' => array('label' => "Workforce", 'position' => 31, 'checked' => 0), - 'legalform.code' => array('label' => 'JuridicalStatus', 'position'=>32, 'checked' => 0), + 'legalform.code' => array('label' => 'JuridicalStatus', 'position' => 32, 'checked' => 0), 's.phone_mobile' => array('label' => "PhoneMobile", 'position' => 35, 'checked' => 0), 's.siren' => array('label' => "ProfId1Short", 'position' => 40, 'checked' => $checkedprofid1), 's.siret' => array('label' => "ProfId2Short", 'position' => 41, 'checked' => $checkedprofid2), @@ -1581,6 +1581,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], "s.name_alias", "", $param, "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 5d02bc23fbad6..1baab53f9a680 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -901,6 +901,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER["PHP_SELF"], 's.name_alias', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index c7b0862a6a01c..55828d2594e8e 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -146,6 +146,7 @@ $levelofrootcategory = 0; if (getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID') > 0) { foreach ($categories as $key => $categorycursor) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset if ($categorycursor['id'] == getDolGlobalInt('TAKEPOS_ROOT_CATEGORY_ID')) { $levelofrootcategory = $categorycursor['level']; break; @@ -1560,14 +1561,14 @@ function scrollTo(){ $count = 0; while ($count < $MAXPRODUCT) { print '
    - onclick="MoreProducts('less')" onclick="MoreProducts('more')" > + onclick="MoreProducts('less')" onclick="MoreProducts('more')" > '; @@ -1592,8 +1593,8 @@ function scrollTo(){
    ...
    - diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 07bad719989a7..bdd2ca68c0d13 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1332,7 +1332,7 @@ foreach (array('internal', 'external') as $source) { $tmpobject = $object; $tab = $tmpobject->listeContact(-1, $source); - '@phan-var-force array $tab'; + '@phan-var-force array $tab'; $num = is_array($tab) ? 0 : count($tab); $i = 0; foreach (array_keys($tab) as $i) { diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index 9102a444926ea..1c2185c4bda3e 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -250,6 +250,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'date_creation')) { diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index ca2e17e327772..d9a65fb521226 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -6,6 +6,7 @@ * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Marcos García * Copyright (C) 2024 Frédéric France + * 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 @@ -86,11 +87,11 @@ public function __construct(DoliDB $db) /** * Create bank information record * - * @param User|null $user User - * @param int $notrigger 1=Disable triggers + * @param ?User $user User + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, >= 0 if OK */ - public function create(User $user = null, $notrigger = 0) + public function create($user = null, $notrigger = 0) { $now = dol_now(); @@ -114,11 +115,11 @@ public function create(User $user = null, $notrigger = 0) /** * Update bank account * - * @param User|null $user Object user - * @param int $notrigger 1=Disable triggers + * @param ?User $user Object user + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <=0 if KO, >0 if OK */ - public function update(User $user = null, $notrigger = 0) + public function update($user = null, $notrigger = 0) { $error = 0; @@ -136,7 +137,7 @@ public function update(User $user = null, $notrigger = 0) $sql .= ",cle_rib='".$this->db->escape($this->cle_rib)."'"; $sql .= ",bic='".$this->db->escape($this->bic)."'"; $sql .= ",iban_prefix = '".$this->db->escape($this->iban)."'"; - $sql .= ",domiciliation='".$this->db->escape($this->address ? $this->address :$this->domiciliation)."'"; + $sql .= ",domiciliation='".$this->db->escape($this->address ? $this->address : $this->domiciliation)."'"; $sql .= ",proprio = '".$this->db->escape($this->proprio)."'"; $sql .= ",owner_address = '".$this->db->escape($this->owner_address)."'"; $sql .= ",currency_code = '".$this->db->escape($this->currency_code)."'"; @@ -257,11 +258,11 @@ public function fetch($id, $ref = '', $userid = 0) /** * Delete user bank account from database * - * @param User|null $user User deleting - * @param int $notrigger 1=Disable triggers + * @param ?User $user User deleting + * @param int<0,1> $notrigger 1=Disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = 0) + public function delete($user = null, $notrigger = 0) { $error = 0; diff --git a/htdocs/user/list.php b/htdocs/user/list.php index 6f677ca83a83c..4f37e27ad90d9 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -884,6 +884,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['u.rowid']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['u.rowid']['label'], $_SERVER['PHP_SELF'], "u.rowid", $param, "", "", $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/variants/list.php b/htdocs/variants/list.php index a52efb45dbd43..7b9aaa7b3dc46 100644 --- a/htdocs/variants/list.php +++ b/htdocs/variants/list.php @@ -637,6 +637,7 @@ $key = 'nb_of_values'; if (!empty($arrayfields[$key]['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print getTitleFieldOfList($arrayfields[$key]['label'], 0, $_SERVER['PHP_SELF'], $key, '', $param, 'class="center"', $sortfield, $sortorder, 'center ')."\n"; $totalarray['nbfield']++; } diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index 03d0db199ad03..48c907264f204 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -95,7 +95,7 @@ class Target extends CommonObject 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' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax150', 'showoncombobox' => 2, 'validate' => 1, 'autofocusoncreate'=>1), + 'label' => array('type' => 'varchar(255)', 'label' => 'Label', 'enabled' => 1, 'position' => 30, 'notnull' => 1, 'visible' => 1, 'searchall' => 1, 'css' => 'minwidth300', 'cssview' => 'wordbreak', 'csslist' => 'tdoverflowmax150', 'showoncombobox' => 2, 'validate' => 1, 'autofocusoncreate' => 1), 'trigger_codes' => array('type' => 'text', 'label' => 'TriggerCodes', 'enabled' => 1, 'position' => 50, 'notnull' => 1, 'visible' => 1, 'help' => "TriggerCodeInfo", 'tdcss' => 'titlefieldmiddle', 'csslist' => 'tdoverflowmax200', 'css' => 'minwidth400', 'arrayofkeyval' => array('defined_in_constructor' => 'defined_from_c_action_trigger'), 'multiinput' => 1,), 'url' => array('type' => 'url', 'label' => 'Url', 'enabled' => 1, 'position' => 55, 'notnull' => 1, 'visible' => 1,), 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'position' => 60, 'notnull' => 0, 'visible' => 3, 'validate' => 1,), @@ -301,9 +301,11 @@ public function createFromClone(User $user, $fromid) // Clear fields if (property_exists($object, 'ref')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index 248b61c979607..b297ee7bc451f 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -40,7 +40,7 @@ class FormWebPortal extends Form public $db; /** - * @var array $infofiles Array of file info + * @var array{nboffiles:int,extensions:array,files:string[]} Array of file info */ public $infofiles; // Used to return information by function getDocumentsLink @@ -318,7 +318,7 @@ public function getDocumentsLink($modulepart, $modulesubdir, $filedir, $filter = $this->infofiles['nboffiles']++; $this->infofiles['files'][] = $file['fullname']; $ext = pathinfo($file["name"], PATHINFO_EXTENSION); - if (empty($this->infofiles[$ext])) { + if (empty($this->infofiles['extensions'][$ext])) { $this->infofiles['extensions'][$ext] = 1; } else { $this->infofiles['extensions'][$ext]++; diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index aa25ba56d18fe..5ae6f363ba858 100644 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -745,7 +745,7 @@ function createInvoiceFromOrder($authentication, $id_order = '', $ref_order = '' * Update an invoice, only change the state of an invoice * * @param array{login:string,password:string,entity:?int,dolibarrkey:string} $authentication Array of authentication information - * @param array{id:string,ref:string,ref_ext:string,status?:string} $invoice Invoice + * @param array{id:string,ref:string,ref_ext:string,status?:string,close_code?:int,close_note?:int} $invoice Invoice * @return array{result:array{result_code:string,result_label:string},id?:int,ref?:string,ref_ext?:string} Array result */ function updateInvoice($authentication, $invoice) diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index b57942a32cb6e..d5374d68a03d2 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -306,6 +306,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/workstation/workstation_list.php b/htdocs/workstation/workstation_list.php index 54f2548813fcf..bc17f9dcdf67d 100644 --- a/htdocs/workstation/workstation_list.php +++ b/htdocs/workstation/workstation_list.php @@ -609,6 +609,7 @@ // usergroups if (!empty($arrayfields['wug.fk_usergroup']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print getTitleFieldOfList($arrayfields['wug.fk_usergroup']['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, '') . "\n"; } From 385927fe069eace69544fef6fa0d8cb3b2395123 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Sun, 29 Sep 2024 22:18:18 +0200 Subject: [PATCH 147/329] FIX: box_actions.php still uses fk_user_done which no longer exists (#31190) Co-authored-by: FlorianMortgat <5845502+FlorianMortgat@users.noreply.github.com> --- htdocs/core/boxes/box_actions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_actions.php b/htdocs/core/boxes/box_actions.php index 64a2314560c37..1d2f03b11b546 100644 --- a/htdocs/core/boxes/box_actions.php +++ b/htdocs/core/boxes/box_actions.php @@ -106,7 +106,7 @@ public function loadBox($max = 5) $sql .= " AND s.rowid = ".((int) $user->socid); } if (!$user->rights->agenda->allactions->read) { - $sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id).")"; + $sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id).")"; } $sql .= " ORDER BY a.datec DESC"; $sql .= $this->db->plimit($max, 0); From d30d8b520165f3b3cc46f0ab8b96b6ec78edf10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 22:32:34 +0200 Subject: [PATCH 148/329] fix phpstan (#31191) * fix phpstan * fix phpstan * fix phpstan --- htdocs/core/class/extrafields.class.php | 6 +++--- phpstan.neon.dist | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 6012ea6c2cf95..5416fc64f39f4 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -11,7 +11,7 @@ * Copyright (C) 2017 Nicolas ZABOURI * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2022 Antonin MARCHAL - * Copyright (C) 2024 MDW + * 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 @@ -631,7 +631,7 @@ private function delete_label($attrname, $elementtype = '') * @param string $attrname Name of attribute * @param string $label Label of attribute * @param string $type Type of attribute ('boolean', 'int', 'varchar', 'text', 'html', 'date', 'datetime','price','phone','mail','password','url','select','checkbox', ...) - * @param int $length Length of attribute + * @param string $length Size/length of attribute ('5', '24,8', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', 'contact', ...) * @param int $unique Is field unique or not * @param int $required Is field required or not @@ -783,7 +783,7 @@ public function update($attrname, $label, $type, $length, $elementtype, $unique * @param string $attrname Name of attribute * @param string $label Label of attribute * @param string $type Type of attribute - * @param int $size Length of attribute + * @param string $size Size/length of attribute ('5', '24,8', ...) * @param string $elementtype Element type ('member', 'product', 'thirdparty', ...) * @param int $unique Is field unique or not * @param int $required Is field required or not diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 3f73056a52a3e..f4ef954ac4c61 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -75,7 +75,7 @@ parameters: - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|update_label|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' + - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' - '#EvalMath::trigger\(\) expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#' From 4690f4aadb4762d462447a3041563cf0d9a1fc82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 29 Sep 2024 22:33:33 +0200 Subject: [PATCH 149/329] fix phpstan (#31192) * fix phpstan * fix phpstan --- htdocs/core/class/html.form.class.php | 4 +++- phpstan.neon.dist | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a7bd8a5b5c756..eda9c1292e134 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5428,7 +5428,9 @@ public function select_all_categories($type, $selected = '', $htmlname = "parent * @param string $title Title * @param string $question Question * @param string $action Action - * @param array{text:string}|array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...')) + * @param array}>|string|null $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>'autofocus' or 'style=...')) + * 'type' can be 'text', 'password', 'checkbox', 'radio', 'date', 'datetime', 'select', 'multiselect', 'morecss', + * 'other', 'onecolumn' or 'hidden'... * @param string $selectedchoice "" or "no" or "yes" * @param int|string $useajax 0=No, 1=Yes use Ajax to show the popup, 2=Yes and also submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx * @param int $height Force height of box diff --git a/phpstan.neon.dist b/phpstan.neon.dist index f4ef954ac4c61..d59eea39191b8 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -100,7 +100,6 @@ parameters: - '# ldap_search expects array\|LDAP#' - '# ajax_combobox expects array#' - '# Context::setError\(\) expects array, string#' - - '# Form::formconfirm\(\) expects array#' - '# FormWebPortal::selectForForms\(\) expects int, array#' - '# Lettering::getBankLinesFromFkDocAndDocType\(\) expects array#' - '# (Odf) constructor expects #' From 0ec1d2b750edfe9298ca89350d0802064ebd03e2 Mon Sep 17 00:00:00 2001 From: lamrani abdelwadoud Date: Sun, 29 Sep 2024 22:36:08 +0200 Subject: [PATCH 150/329] Add token oauth for social network (#30813) * Add token oauth for social network * Fix phpstan errors * Fix phpstan errors * variable undeclared and phan errors * variable undeclared and phan errors --------- Co-authored-by: Laurent Destailleur --- htdocs/admin/fediverse.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/fediverse.php b/htdocs/admin/fediverse.php index c030997e8f66f..d48ebfa5ba6ed 100644 --- a/htdocs/admin/fediverse.php +++ b/htdocs/admin/fediverse.php @@ -295,8 +295,26 @@ print ''; $vartosmtpstype = 'MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING'; +print ''; + // Methods oauth -print ''; +print ''; print ''; print ''; print ''; @@ -463,12 +464,12 @@ // Clone confirmation if ($action === 'clone') { $formquestion = array( - array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label, 'tdclass'=>'fieldrequired'), + array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label, 'tdclass' => 'fieldrequired'), ); if (getDolGlobalString('TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX')) { $formquestion[] = array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1); } else { - $formquestion[] = array('type' => 'date', 'datenow'=>1, 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); + $formquestion[] = array('type' => 'date', 'datenow' => 1, 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); $formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100'); } @@ -587,7 +588,8 @@ print ''; print ''; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 849b1ebafb24b..5fb5b3676068b 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -93,6 +93,8 @@ $object = new Contrat($db); $extrafields = new ExtraFields($db); $ret = 0; +$pu_ht = null; // Init for static analysis +$pu_ttc = null; // Init for static analysis // Load object if ($id > 0 || !empty($ref) && $action != 'add') { diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index e71f68f8ce31f..39b2826e71247 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -1,5 +1,6 @@ + * 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 @@ -34,6 +35,11 @@ return; } +' +@phan-var-force FormSetup $formSetup +'; + +$upload_dir = null; if ($action == 'update' && !empty($arrayofparameters) && is_array($arrayofparameters) && !empty($user->admin)) { $db->begin(); diff --git a/htdocs/core/ajax/saveinplace.php b/htdocs/core/ajax/saveinplace.php index 47fd89b165912..5caa21f0cfc26 100644 --- a/htdocs/core/ajax/saveinplace.php +++ b/htdocs/core/ajax/saveinplace.php @@ -98,6 +98,7 @@ $savemethod = GETPOST('savemethod', 'alpha', 2); $savemethodname = (!empty($savemethod) ? $savemethod : 'setValueFrom'); $newelement = $element; + $subelement = null; $view = ''; $format = 'text'; @@ -203,6 +204,7 @@ dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php'); $classname = 'Actions'.ucfirst($subelement); $object = new $classname($db); + '@phan-var-force CommonHookActions $object'; $ret = $object->$loadmethodname(); if ($ret > 0) { $loadcache = $object->$loadcachename; diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 6ecfbb387f9b9..251ced7bab9e6 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -132,7 +132,7 @@ $row_array['state_id'] = $row['state_id']; // TODO Use a cache here to avoid to make select_state in each pass (this make a SQL and lot of logs) - $row_array['states'] = $formcompany->select_state('', $row['country_id'], ''); + $row_array['states'] = $formcompany->select_state(0, $row['country_id'], ''); array_push($return_arr, $row_array); } diff --git a/htdocs/core/class/CSMSFile.class.php b/htdocs/core/class/CSMSFile.class.php index 7fe6fb1451314..cf03bf06c78a0 100644 --- a/htdocs/core/class/CSMSFile.class.php +++ b/htdocs/core/class/CSMSFile.class.php @@ -65,21 +65,48 @@ class CSMSFile * @var string address to */ public $addr_to; + /** + * @var int + */ public $deferred; + /** + * @var int + */ public $priority; + /** + * @var int + */ public $class; + /** + * @var string + */ public $message; /** * @var bool */ public $nostop; + /** + * @var int + */ public $socid; + /** + * @var int + */ public $contact_id; + /** + * @var int + */ public $member_id; + /** + * @var int + */ public $fk_project; + /** + * @var int + */ public $deliveryreceipt; @@ -169,6 +196,7 @@ public function sendfile() if (class_exists($classname)) { $sms = new $classname($this->db); + '@phan-var-force OvhSms $sms'; // Using original for analysis $sms->expe = $this->addr_from; $sms->dest = $this->addr_to; diff --git a/htdocs/core/class/canvas.class.php b/htdocs/core/class/canvas.class.php index 372e721acda81..9c49e9071b795 100644 --- a/htdocs/core/class/canvas.class.php +++ b/htdocs/core/class/canvas.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2011 Laurent Destailleur + * 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 @@ -43,14 +44,35 @@ class Canvas */ public $errors = array(); + /** + * @var string + */ public $actiontype; + /** + * @var string Module directory + */ public $dirmodule; // Module directory + /** + * @var string + */ public $targetmodule; // Module concerned by canvas (ex: thirdparty, contact, ...) + /** + * @var string + */ public $canvas; // Name of canvas (ex: company, individual, product, service, ...) + /** + * @var string + */ public $card; // Tab (sub-canvas) - public $template_dir; // Initialized by getCanvas with templates directory + /** + * @var string Initialized by getCanvas with templates directory + */ + public $template_dir; + /** + * @var ActionsContactCardCommon|ActionsAdherentCardCommon|ActionsCardProduct|ActionsCardService|ActionsCardCommon + */ public $control; // Initialized by getCanvas with controller instance diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 56885dfe6c8cc..6fa140f2ea8eb 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3676,6 +3676,7 @@ public function update_ref_ext($ref_ext) $sql = "UPDATE ".$this->db->prefix().$this->table_element; $sql .= " SET ref_ext = '".$this->db->escape($ref_ext)."'"; + // @phan-suppress-next-line PhanUndeclaredProperty $sql .= " WHERE ".(isset($this->table_rowid) ? $this->table_rowid : 'rowid')." = ".((int) $this->id); dol_syslog(get_class($this)."::update_ref_ext", LOG_DEBUG); @@ -4036,7 +4037,9 @@ public function update_price($exclspec = 0, $roundingadjust = 'auto', $nodatabas } // Add revenue stamp to total + // @phan-suppress-next-line PhanUndeclaredProperty $this->total_ttc += isset($this->revenuestamp) ? $this->revenuestamp : 0; + // @phan-suppress-next-line PhanUndeclaredProperty $this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0; // Situations totals @@ -5472,6 +5475,7 @@ public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir //var_dump($line); if (!empty($line->date_start)) { + // @phan-suppress-next-line PhanUndeclaredProperty $date_start = $line->date_start; } else { $date_start = $line->date_debut_prevue; @@ -5480,6 +5484,7 @@ public function printOriginLine($line, $var, $restrictlist = '', $defaulttpldir } } if (!empty($line->date_end)) { + // @phan-suppress-next-line PhanUndeclaredProperty $date_end = $line->date_end; } else { $date_end = $line->date_fin_prevue; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index eda9c1292e134..c1d2f0ebe5b86 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2097,7 +2097,7 @@ public function select_remises($selected, $htmlname, $filter, $socid, $maxvalue * @param int<0,1> $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue * @param int[] $exclude Array list of users id to exclude * @param int<0,1> $disabled If select list must be disabled - * @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me * @param int[]|int $enableonly Array list of users id to be enabled. All other must be disabled * @param string $force_entity '0' or Ids of environment to force * @return void @@ -2120,13 +2120,13 @@ public function select_users($selected = '', $htmlname = 'userid', $show_empty = * @param int<0,1>|string $show_empty 0=list with no empty value, 1=add also an empty value into list * @param int[]|null $exclude Array list of users id to exclude * @param int $disabled If select list must be disabled - * @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me - * @param array|string $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled + * @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param int[]|'' $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled * @param string $force_entity '0' or list of Ids of environment to force, separated by a coma, or 'default' = do no extend to all entities allowed to superadmin. * @param int $maxlength Maximum length of string into list (0=no limit) * @param int<-1,1> $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status * @param string $morefilter Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input. - * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list + * @param int<0,1> $show_every 0=default list, 1=add also a value "Everybody" at beginning of list * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. * @param string $morecss More css * @param int<0,1> $notdisabled Show only active users (note: this will also happen, whatever is this option, if USER_HIDE_INACTIVE_IN_COMBOBOX is on). diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index b71662f1f8849..30d7a793f7638 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -45,9 +45,9 @@ class FormCompany extends Form /** * Return list of labels (translated) of third parties type * - * @param int $mode 0=Return id+label, 1=Return code+label - * @param string $filter Add a SQL filter to select. Data must not come from user input. - * @return array Array of types + * @param int<0,1> $mode 0=Return id+label, 1=Return code+label + * @param string $filter Add a SQL filter to select. Data must not come from user input. + * @return array Array of types */ public function typent_array($mode = 0, $filter = '') { @@ -96,9 +96,9 @@ public function typent_array($mode = 0, $filter = '') /** * Return the list of entries for staff (no translation, it is number ranges) * - * @param int $mode 0=return id+label, 1=return code+Label - * @param string $filter Add a SQL filter to select. Data must not come from user input. - * @return array Array of types d'effectifs + * @param int<0,1> $mode 0=return id+label, 1=return code+Label + * @param string $filter Add a SQL filter to select. Data must not come from user input. + * @return array Array of types d'effectifs */ public function effectif_array($mode = 0, $filter = '') { @@ -126,13 +126,14 @@ public function effectif_array($mode = 0, $filter = '') $key = $objp->code; } - $effs[$key] = $objp->label != '-' ? $objp->label : ''; + $effs[$key] = $objp->label != '-' ? (string) $objp->label : ''; $i++; } $this->db->free($resql); } //return natural sorted list natsort($effs); + '@phan-var-force array $effs'; return $effs; } @@ -642,7 +643,7 @@ public function select_juridicalstatus($selected = 0, $country_codeid = 0, $filt * @param string $var_id Name of id field * @param int $selected Pre-selected third party * @param string $htmlname Name of HTML form - * @param array $limitto Disable answers that are not id in this array list + * @param int[] $limitto Disable answers that are not id in this array list * @param int $forceid This is to force another object id than object->id * @param string $moreparam String with more param to add into url when noajax search is used. * @param string $morecss More CSS on select component @@ -768,6 +769,7 @@ function(response) { $num = $this->db->num_rows($resql); $i = 0; + $firstCompany = 0; // For static analysis if ($num) { while ($i < $num) { $obj = $this->db->fetch_object($resql); @@ -808,15 +810,15 @@ function(response) { /** * Return a select list with types of contacts * - * @param object $object Object to use to find type of contact + * @param Object $object Object to use to find type of contact * @param string $selected Default selected value * @param string $htmlname HTML select name * @param string $source Source ('internal' or 'external') * @param string $sortorder Sort criteria ('position', 'code', ...) * @param int $showempty 1=Add en empty line * @param string $morecss Add more css to select component - * @param int $output 0=return HTML, 1= direct print - * @param int $forcehidetooltip Force hide tooltip for admin + * @param int<0,1> $output 0=return HTML, 1= direct print + * @param int<0,1> $forcehidetooltip Force hide tooltip for admin * @return string|void Depending on $output param, return the HTML select list (recommended method) or nothing */ public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '', $output = 1, $forcehidetooltip = 0) @@ -825,6 +827,7 @@ public function selectTypeContact($object, $selected, $htmlname = 'type', $sourc $out = ''; if (is_object($object) && method_exists($object, 'liste_type_contact')) { + '@phan-var-force CommonObject $object'; // CommonObject has the method. $lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1); // List of types into c_type_contact for element=$object->element $out .= '"; } } @@ -598,7 +674,7 @@ function groupticketchange() { $events = array(); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); print img_picto('', 'company', 'class="paddingright"'); - print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200'); + print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, 0, $events, 0, 'minwidth200'); print ''; if (!empty($conf->use_javascript_ajax) && getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT')) { $htmlname = 'socid'; @@ -755,7 +831,7 @@ function(response) { /** * Return html list of tickets type * - * @param string|array $selected Id of preselected field or array of Ids + * @param string|int[] $selected Id of preselected field or array of Ids * @param string $htmlname Nom de la zone select * @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz)) * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code @@ -1543,7 +1619,7 @@ public function showMessageForm($width = '40%') // Zone to select its email template if (count($modelmail_array) > 0) { print ''; } // Type of leave request diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 24a10de6b564e..2dd003cc735d5 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -214,7 +214,7 @@ $invoice = new Facture($db); $invoice->date = $now; $invoice->module_source = 'takepos'; - $invoice->pos_source = 1; + $invoice->pos_source = '1'; // Info $htmltooltip = ''; From 352077999a1316e95c1461496bc389ba3df415d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 10:06:31 +0200 Subject: [PATCH 152/329] Clean code --- htdocs/emailcollector/class/emailcollector.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 65815a286b1e6..fe51299e07e80 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -2680,7 +2680,7 @@ public function doCollectOneCollector($mode = 0) // Create thirdparty $thirdpartystatic = new Societe($db); - $thirdpartystatic->name = (string) (string) $nametouseforthirdparty; + $thirdpartystatic->name = (string) $nametouseforthirdparty; if (!empty($namealiastouseforthirdparty)) { if ($namealiastouseforthirdparty != $nametouseforthirdparty) { $thirdpartystatic->name_alias = $namealiastouseforthirdparty; From f3d3573bfb241eda77e6b0e5e3c79d4c8f96952e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2024 10:07:04 +0200 Subject: [PATCH 153/329] fix phpstan (#31194) * fix phpstan * fix phpstan * fix phpstan --- htdocs/fichinter/class/fichinterrec.class.php | 2 +- phpstan.neon.dist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index 6d8a56c4bf08d..8b75dd0fcc331 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -255,7 +255,7 @@ public function create($user, $notrigger = 0) $fichintsrc->lines[$i]->remise_percent, 'HT', 0, - '', + 0, 0, $fichintsrc->lines[$i]->product_type, $fichintsrc->lines[$i]->special_code, diff --git a/phpstan.neon.dist b/phpstan.neon.dist index d59eea39191b8..3777c4b2d3e02 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -75,7 +75,7 @@ parameters: - '#::(options)\(\) expects int\|string#' - '# (print_barre_liste|dol_substr) expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|addLineRec|literalBarcodeType)\(\) expects int, string#' + - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' - '#EvalMath::trigger\(\) expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#' From c757f684f31c12e5e778f42c075b61c242c039ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2024 10:07:20 +0200 Subject: [PATCH 154/329] fix phpdoc (#31195) * fix phpdoc * Update context.class.php * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc --- htdocs/webportal/class/context.class.php | 31 +++++++++++++++---- .../webportal/class/webPortalTheme.class.php | 20 +++++++++++- .../class/webportalinvoice.class.php | 4 +++ .../webportal/class/webportalorder.class.php | 4 +++ .../webportal/class/webportalpropal.class.php | 4 +++ 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/htdocs/webportal/class/context.class.php b/htdocs/webportal/class/context.class.php index b76ff6017ca3f..82503fb5530b1 100644 --- a/htdocs/webportal/class/context.class.php +++ b/htdocs/webportal/class/context.class.php @@ -96,7 +96,7 @@ class Context public $error; /** - * @var array errors + * @var string[] errors */ public $errors = array(); @@ -105,16 +105,36 @@ class Context */ public $action; + /** + * @var string tpl directory + */ public $tplDir; + + /** + * @var string tpl path + */ public $tplPath; + + /** + * @var stdClass + */ public $topMenu; + /** + * @var string root url + */ public $rootUrl; public $menu_active = array(); + /** + * @var array{mesgs:string[],warnings:string[],errors:string[]}|array{} event messages + */ public $eventMessages = array(); + /** + * @var string token key + */ public $tokenKey = 'token'; /** @@ -143,7 +163,6 @@ class Context */ public $logged_partnership = null; - /** * @var WebPortalTheme Theme data */ @@ -455,7 +474,7 @@ public function menuIsActive($menuName) /** * Set errors * - * @param array $errors Errors + * @param string|string[] $errors Errors * @return void */ public function setError($errors) @@ -535,9 +554,9 @@ public function setEventMessage($mesgs, $style = 'mesgs') * Set event messages in dol_events session object. Will be output by calling dol_htmloutput_events. * Note: Calling dol_htmloutput_events is done into pages by standard llxFooter() function. * - * @param string $mesg Message string - * @param array|null $mesgs Message array - * @param string $style Which style to use ('mesgs' by default, 'warnings', 'errors') + * @param string $mesg Message string + * @param string[]|null $mesgs Message array + * @param string $style Which style to use ('mesgs' by default, 'warnings', 'errors') * @return void */ public function setEventMessages($mesg, $mesgs, $style = 'mesgs') diff --git a/htdocs/webportal/class/webPortalTheme.class.php b/htdocs/webportal/class/webPortalTheme.class.php index d3707eddc9cd3..383fe3974be81 100644 --- a/htdocs/webportal/class/webPortalTheme.class.php +++ b/htdocs/webportal/class/webPortalTheme.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2023-2024 Laurent Destailleur * Copyright (C) 2023-2024 Lionel Vessiller * Copyright (C) 2023-2024 John Botella + * Copyright (C) 2024 Frédéric France * * 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 @@ -31,7 +32,14 @@ */ class WebPortalTheme { + /** + * @var string + */ public $primaryColorHex = '#263c5c'; + + /** + * @var array{h:float,l:float,s:float,a:float} + */ public $primaryColorHsl = array( 'h' => 216, // Hue 'l' => 42, // lightness @@ -39,9 +47,19 @@ class WebPortalTheme 'a' => 1 // Alfa ); - + /** + * @var string login logo url + */ public $loginLogoUrl; + + /** + * @var string menu logo url + */ public $menuLogoUrl; + + /** + * @var string login background + */ public $loginBackground; /** diff --git a/htdocs/webportal/class/webportalinvoice.class.php b/htdocs/webportal/class/webportalinvoice.class.php index 4d463bd53467a..8cd151e30c48e 100644 --- a/htdocs/webportal/class/webportalinvoice.class.php +++ b/htdocs/webportal/class/webportalinvoice.class.php @@ -121,6 +121,10 @@ class WebPortalInvoice extends Facture //public $multicurrency_total_ht; //public $multicurrency_total_tva; //public $multicurrency_total_ttc; + + /** + * @var int status + */ public $fk_statut; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/webportal/class/webportalorder.class.php b/htdocs/webportal/class/webportalorder.class.php index 363a122e8ff13..1d2e242f80a8f 100644 --- a/htdocs/webportal/class/webportalorder.class.php +++ b/htdocs/webportal/class/webportalorder.class.php @@ -120,6 +120,10 @@ class WebPortalOrder extends Commande //public $multicurrency_total_ht; //public $multicurrency_total_tva; //public $multicurrency_total_ttc; + + /** + * @var int status + */ public $fk_statut; // END MODULEBUILDER PROPERTIES diff --git a/htdocs/webportal/class/webportalpropal.class.php b/htdocs/webportal/class/webportalpropal.class.php index fc5770218c919..b12a93a77fe73 100644 --- a/htdocs/webportal/class/webportalpropal.class.php +++ b/htdocs/webportal/class/webportalpropal.class.php @@ -120,6 +120,10 @@ class WebPortalPropal extends Propal //public $multicurrency_total_ht; //public $multicurrency_total_tva; //public $multicurrency_total_ttc; + + /** + * @var int status + */ public $fk_statut; // END MODULEBUILDER PROPERTIES From 60860aa7816528b7b04798854badf6eb2845f4a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2024 10:08:03 +0200 Subject: [PATCH 155/329] add phpdoc (#31196) --- .../comm/mailing/class/advtargetemailing.class.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 28bdb0b02d8e1..5b37f801dcbcb 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -1,6 +1,7 @@ + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2024 Frédéric France * * 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 @@ -17,7 +18,7 @@ */ /** - * \file comm/mailing/class/advtargetemailing.class.php + * \file htdocs/comm/mailing/class/advtargetemailing.class.php * \ingroup mailing * \brief This file is an example CRUD class file (Create/Read/Update/Delete) */ @@ -92,7 +93,15 @@ class AdvanceTargetingMailing extends CommonObject * @var array type status comm prospect */ public $type_statuscommprospect = array(); + + /** + * @var int[] + */ public $thirdparty_lines; + + /** + * @var int[] + */ public $contact_lines; From 3e76477922ab18945436857122d94df9fce40bc9 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+BB2A-Anthony@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:15:40 +0200 Subject: [PATCH 156/329] NEW - Add an advanced permission to validate knowledge (#30855) * Add perms validate knowladge * Perms advanced * FIX * Fix to massaction list --------- Co-authored-by: Anthony Berton Co-authored-by: Laurent Destailleur --- htdocs/core/modules/modKnowledgeManagement.class.php | 5 +++++ htdocs/knowledgemanagement/knowledgerecord_card.php | 2 +- htdocs/knowledgemanagement/knowledgerecord_list.php | 8 ++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modKnowledgeManagement.class.php b/htdocs/core/modules/modKnowledgeManagement.class.php index 5d43bee307706..d7352647f2455 100644 --- a/htdocs/core/modules/modKnowledgeManagement.class.php +++ b/htdocs/core/modules/modKnowledgeManagement.class.php @@ -251,6 +251,11 @@ public function __construct($db) $this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2) $r++; $this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used) + $this->rights[$r][1] = 'Validate articles'; // Permission label + $this->rights[$r][4] = 'knowledgerecord_advance'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2) + $this->rights[$r][5] = 'validate'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2) + $r++; + $this->rights[$r][0] = $this->numero + $r + 1; // Permission id (must not be already used) $this->rights[$r][1] = 'Delete articles'; // Permission label $this->rights[$r][4] = 'knowledgerecord'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2) $this->rights[$r][5] = 'delete'; // In php code, permission will be checked by test if ($user->rights->knowledgemanagement->level1->level2) diff --git a/htdocs/knowledgemanagement/knowledgerecord_card.php b/htdocs/knowledgemanagement/knowledgerecord_card.php index 5b55a29cb5ffd..0a06ab4593289 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_card.php +++ b/htdocs/knowledgemanagement/knowledgerecord_card.php @@ -75,9 +75,9 @@ $permissiontoread = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read'); -$permissiontovalidate = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); $permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php $permissiontodelete = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); +$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('knowledgemanagement', 'knowledgerecord_advance', 'validate'))); $permissionnote = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); // Used by the include of actions_dellink.inc.php $upload_dir = $conf->knowledgemanagement->multidir_output[isset($object->entity) ? $object->entity : 1]; diff --git a/htdocs/knowledgemanagement/knowledgerecord_list.php b/htdocs/knowledgemanagement/knowledgerecord_list.php index 42b9f4f623d06..64780f1ac8ef5 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_list.php +++ b/htdocs/knowledgemanagement/knowledgerecord_list.php @@ -138,6 +138,8 @@ $permissiontoread = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'read'); $permissiontoadd = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write'); $permissiontodelete = $user->hasRight('knowledgemanagement', 'knowledgerecord', 'delete'); +$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $permissiontoadd) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('knowledgemanagement', 'knowledgerecord_advance', 'validate'))); + // Security check if (empty($conf->knowledgemanagement->enabled)) { @@ -429,12 +431,14 @@ // List of mass actions available $arrayofmassactions = array( - 'validate'=>img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"), //'generate_doc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("ReGeneratePDF"), //'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"), //'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"), ); -if (isModEnabled('category') && $user->hasRight('knowledgemanagement', 'knowledgerecord', 'write')) { +if ($permissiontovalidate) { + $arrayofmassactions['validate'] = img_picto('', 'check', 'class="pictofixedwidth"').$langs->trans("Validate"); +} +if (isModEnabled('category') && $permissiontoadd) { $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"').$langs->trans("AffectTag"); } if (!empty($permissiontodelete)) { From 3da76f953671ba8cb446f1ac9f8c07e3a3c37179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alo=C3=AFs=20Micard?= Date: Mon, 30 Sep 2024 10:19:35 +0200 Subject: [PATCH 157/329] Add a new hook into CommonObject#commonReplaceThirdparty (#30827) --- htdocs/core/class/commonobject.class.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6fa140f2ea8eb..dfe43e86bb7b6 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9376,6 +9376,21 @@ public function getRights() */ public static function commonReplaceThirdparty(DoliDB $dbs, $origin_id, $dest_id, array $tables, $ignoreerrors = 0) { + global $hookmanager; + + $hookmanager->initHooks(array('commonobject')); + $parameters = array( + 'origin_id' => $origin_id, + 'dest_id' => $dest_id, + 'tables' => $tables, + ); + $reshook = $hookmanager->executeHooks('commonReplaceThirdparty', $parameters); + if ($reshook) { + return true; // replacement code + } elseif ($reshook < 0) { + return $ignoreerrors === 1; // failure + } // reshook = 0 => execute normal code + foreach ($tables as $table) { $sql = 'UPDATE '.$dbs->prefix().$table.' SET fk_soc = '.((int) $dest_id).' WHERE fk_soc = '.((int) $origin_id); From 79892e79e5534f2bd45667266078095f97dabae2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 10:21:41 +0200 Subject: [PATCH 158/329] Removed init of context here. Contet must be initialized by parent caller. You already can use 'globalcard' or 'main' for example... --- htdocs/core/class/commonobject.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index dfe43e86bb7b6..bbcb07fad3603 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -9378,7 +9378,6 @@ public static function commonReplaceThirdparty(DoliDB $dbs, $origin_id, $dest_id { global $hookmanager; - $hookmanager->initHooks(array('commonobject')); $parameters = array( 'origin_id' => $origin_id, 'dest_id' => $dest_id, From 61e83828696823219c636d756ef1178a60df1699 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 10:46:51 +0200 Subject: [PATCH 159/329] Fix SERVICE_ARE_ECOMMERCE_200238EC #31159 in transfer of sale journal --- htdocs/accountancy/journal/sellsjournal.php | 9 ++++++++- htdocs/core/lib/functions.lib.php | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 0929cc70717cc..f0c0b1a894a60 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -236,7 +236,14 @@ if (array_key_exists($tax_id, $vatdata_cache)) { $vatdata = $vatdata_cache[$tax_id]; } else { - $vatdata = getTaxesFromId($tax_id, $mysoc, $mysoc, 0); + if (getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) { + $buyer = new Societe($db); + $buyer->fetch($obj->socid); + } else { + $buyer = null; // We don't need the buyer in this case + } + $seller = $mysoc; + $vatdata = getTaxesFromId($tax_id, $buyer, $seller, 0); $vatdata_cache[$tax_id] = $vatdata; } $compta_tva = (!empty($vatdata['accountancy_code_sell']) ? $vatdata['accountancy_code_sell'] : $cpttva); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b6e45132e4056..491c31b6e31cb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7215,7 +7215,12 @@ function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid $sql .= ", ".MAIN_DB_PREFIX."c_country as c"; /*if ($mysoc->country_code == 'ES') $sql.= " WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($buyer->country_code)."'"; // vat in spain use the buyer country ?? else $sql.= " WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($seller->country_code)."'";*/ - $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($seller->country_code)."'"; + $sql .= " WHERE t.fk_pays = c.rowid"; + if (getDolGlobalString('SERVICE_ARE_ECOMMERCE_200238EC')) { + $sql .= " AND c.code = '".$db->escape($buyer->country_code)."'"; + } else { + $sql .= " AND c.code = '".$db->escape($seller->country_code)."'"; + } $sql .= " AND t.taux = ".((float) $vatratecleaned)." AND t.active = 1"; $sql .= " AND t.entity IN (".getEntity('c_tva').")"; if ($vatratecode) { From d7d8f870456524f17fc42d4821e4dd137b8dceca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 11:38:29 +0200 Subject: [PATCH 160/329] Clean code. Add permission test after action = something. --- htdocs/accountancy/bookkeeping/balance.php | 7 +-- htdocs/accountancy/closure/index.php | 8 ++-- htdocs/compta/bank/releve.php | 2 +- htdocs/compta/paiement_charge.php | 5 ++- htdocs/compta/paiement_vat.php | 7 ++- .../class/paymentsocialcontribution.class.php | 5 +-- htdocs/core/photos_resize.php | 2 +- htdocs/don/payment/card.php | 7 ++- htdocs/don/payment/payment.php | 6 ++- htdocs/expensereport/payment/payment.php | 4 +- htdocs/fourn/facture/paiement.php | 3 +- htdocs/loan/payment/payment.php | 8 +++- htdocs/projet/activity/index.php | 2 +- htdocs/projet/index.php | 2 +- htdocs/public/project/index.php | 5 +-- htdocs/public/ticket/create_ticket.php | 2 +- htdocs/public/ticket/list.php | 44 ++++++++++--------- test/phpunit/CodingPhpTest.php | 2 +- 18 files changed, 68 insertions(+), 53 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 71b749794ddc1..eacc1a1632e71 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -128,6 +128,7 @@ accessforbidden(); } + /* * Action */ @@ -169,10 +170,6 @@ $filter['t.doc_date<='] = $search_date_end; $param .= '&date_endmonth=' . GETPOSTINT('date_endmonth') . '&date_endday=' . GETPOSTINT('date_endday') . '&date_endyear=' . GETPOSTINT('date_endyear'); } - if (!empty($search_doc_date)) { - $filter['t.doc_date'] = $search_doc_date; - $param .= '&doc_datemonth=' . GETPOSTINT('doc_datemonth') . '&doc_dateday=' . GETPOSTINT('doc_dateday') . '&doc_dateyear=' . GETPOSTINT('doc_dateyear'); - } if (!empty($search_accountancy_code_start)) { if ($type == 'sub') { $filter['t.subledger_account>='] = $search_accountancy_code_start; @@ -207,7 +204,7 @@ } } -if ($action == 'export_csv') { +if ($action == 'export_csv' && $user->hasRight('accounting', 'mouvements', 'lire')) { $sep = getDolGlobalString('ACCOUNTING_EXPORT_SEPARATORCSV'); $filename = 'balance'; diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 8b359b1ebc966..c7cb3ce3a20cd 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -103,8 +103,8 @@ } if (empty($reshook)) { - if (isset($current_fiscal_period) && $user->hasRight('accounting', 'fiscalyear', 'write')) { - if ($action == 'confirm_step_1' && $confirm == "yes") { + if (isset($current_fiscal_period)) { + if ($action == 'confirm_step_1' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) { $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear')); $date_end = dol_mktime(23, 59, 59, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear')); @@ -119,7 +119,7 @@ setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } elseif ($action == 'confirm_step_2' && $confirm == "yes") { + } elseif ($action == 'confirm_step_2' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) { $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id'); $separate_auxiliary_account = GETPOST('separate_auxiliary_account', 'aZ09'); $generate_bookkeeping_records = GETPOST('generate_bookkeeping_records', 'aZ09'); @@ -147,7 +147,7 @@ exit; } } - } elseif ($action == 'confirm_step_3' && $confirm == "yes") { + } elseif ($action == 'confirm_step_3' && $confirm == "yes" && $user->hasRight('accounting', 'fiscalyear', 'write')) { $inventory_journal_id = GETPOSTINT('inventory_journal_id'); $new_fiscal_period_id = GETPOSTINT('new_fiscal_period_id'); $date_start = dol_mktime(0, 0, 0, GETPOSTINT('date_startmonth'), GETPOSTINT('date_startday'), GETPOSTINT('date_startyear')); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index a14f81f297382..a12d46e98bc64 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -190,7 +190,7 @@ * Actions */ -if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt)) { +if ($action == 'confirm_editbankreceipt' && !empty($oldbankreceipt) && !empty($newbankreceipt) && $user->hasRight('banque', 'consolidate')) { // Test to check newbankreceipt does not exists yet $sqltest = "SELECT b.rowid FROM ".MAIN_DB_PREFIX."bank as b, ".MAIN_DB_PREFIX."bank_account as ba"; $sqltest .= " WHERE b.fk_account = ba.rowid AND ba.entity = ".((int) $conf->entity); diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 461fbbdd76f51..30a10f08d21a3 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -32,10 +32,11 @@ // Load translation files required by the page $langs->loadLangs(array("banks", "bills", "compta")); -$chid = GETPOSTINT("id"); $action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel'); +$chid = GETPOSTINT("id"); $amounts = array(); // Security check @@ -51,7 +52,7 @@ * Actions */ -if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) { +if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) && $user->hasRight('tax', 'charges', 'creer')) { $error = 0; if ($cancel) { diff --git a/htdocs/compta/paiement_vat.php b/htdocs/compta/paiement_vat.php index 92e98a737448a..fb3d31c719ec5 100644 --- a/htdocs/compta/paiement_vat.php +++ b/htdocs/compta/paiement_vat.php @@ -33,10 +33,11 @@ // Load translation files required by the page $langs->loadLangs(array("banks", "bills")); -$chid = GETPOSTINT("id"); $action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel'); +$chid = GETPOSTINT("id"); $amounts = array(); // Security check @@ -45,12 +46,14 @@ $socid = $user->socid; } +$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); + /* * Actions */ -if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) { +if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'yes')) && $permissiontoadd) { $error = 0; if ($cancel) { diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index 08be6da1dc408..712175abb4a19 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -291,7 +291,6 @@ public function create($user, $closepaidcontrib = 0) */ public function fetch($id) { - global $langs; $sql = "SELECT"; $sql .= " t.rowid,"; $sql .= " t.fk_charge,"; @@ -301,7 +300,7 @@ public function fetch($id) $sql .= " t.amount,"; $sql .= " t.fk_typepaiement,"; $sql .= " t.num_paiement as num_payment,"; - $sql .= " t.note,"; + $sql .= " t.note as note_private,"; $sql .= " t.fk_bank,"; $sql .= " t.fk_user_creat,"; $sql .= " t.fk_user_modif,"; @@ -330,7 +329,7 @@ public function fetch($id) $this->fk_typepaiement = $obj->fk_typepaiement; $this->num_payment = $obj->num_payment; $this->num_paiement = $obj->num_payment; - $this->note_private = $obj->note; + $this->note_private = $obj->note_private; $this->fk_bank = $obj->fk_bank; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 4e114a9bf27c7..abd7fda7e2019 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -346,7 +346,7 @@ } } -if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey")) { +if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey")) { // Test on permission already done if (empty($dir)) { dol_print_error(null, 'Bug: Value for $dir could not be defined.'); exit; diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index 23202ea9034d9..e7986ba5f05cb 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -54,13 +54,17 @@ } } +$permissiontoread = $user->hasRight('don', 'lire'); +$permissiontoadd = $user->hasRight('don', 'creer'); +$permissiontodelete = $user->hasRight('don', 'supprimer'); + /* * Actions */ // Delete payment -if ($action == 'confirm_delete' && $confirm == 'yes' && $user->hasRight('don', 'supprimer')) { +if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontodelete) { $db->begin(); $result = $object->delete($user); @@ -79,6 +83,7 @@ /* * View */ + $title = $langs->trans("Payment"); llxHeader('', $title, '', '', 0, 0, '', '', '', 'mod-donation page-payment_card'); diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index e914988f78087..7d10d716e6e38 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -44,12 +44,16 @@ $object = new Don($db); +$permissiontoread = $user->hasRight('don', 'lire'); +$permissiontoadd = $user->hasRight('don', 'creer'); +$permissiontodelete = $user->hasRight('don', 'supprimer'); + /* * Actions */ -if ($action == 'add_payment') { +if ($action == 'add_payment' && $permissiontoadd) { $error = 0; if ($cancel) { diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index 561712f086582..57f21aaf9746f 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -46,12 +46,14 @@ $socid = $user->socid; } +$permissiontoadd = $user->hasRight('expensereport', 'creer'); + /* * Actions */ -if ($action == 'add_payment') { +if ($action == 'add_payment' && $permissiontoadd) { $error = 0; if ($cancel) { diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index d78a0da9dd989..07c38312da049 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -110,6 +110,7 @@ $arrayfields = array(); +$permissiontoadd = ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")); /* @@ -148,7 +149,7 @@ } if (empty($reshook)) { - if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm == 'yes')) { + if (($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm == 'yes')) && $permissiontoadd) { $error = 0; $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index db34b806783da..cbb1c84fce4bf 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -33,9 +33,11 @@ $langs->loadLangs(array("bills", "loan")); -$chid = GETPOSTINT('id'); $action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); + +$chid = GETPOSTINT('id'); $datepaid = dol_mktime(12, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); // Security check @@ -84,12 +86,14 @@ } } +$permissiontoadd = $user->hasRight('loan', 'write'); + /* * Actions */ -if ($action == 'add_payment') { +if ($action == 'add_payment' && $permissiontoadd) { $error = 0; if ($cancel) { diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 853b4b9ad35fc..7ac394fd752af 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -70,7 +70,7 @@ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - if ($action == 'refresh_search_project_user') { + if ($action == 'refresh_search_project_user' && $user->hasRight('projet', 'lire')) { $search_project_user = GETPOSTINT('search_project_user'); $tabparam = array("MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX" => $search_project_user); diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 0475510dcb038..fe25cffa976be 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -73,7 +73,7 @@ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (empty($reshook)) { - if ($action == 'refresh_search_project_user') { + if ($action == 'refresh_search_project_user' && $user->hasRight('projet', 'lire')) { $search_project_user = GETPOSTINT('search_project_user'); $tabparam = array("MAIN_SEARCH_PROJECT_USER_PROJECTSINDEX" => $search_project_user); diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 934b67ee5c513..4aacb470889bb 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -110,7 +110,7 @@ */ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) { - global $user, $conf, $langs, $mysoc; + global $conf, $langs, $mysoc; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers @@ -190,8 +190,6 @@ function llxFooterVierge() } - - /* * View */ @@ -211,7 +209,6 @@ function llxFooterVierge() llxHeaderVierge($langs->trans("SuggestForm")); - print ''."\n"; print '
    '."\n"; diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index 7987205419ec5..2846222949799 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -149,7 +149,7 @@ $action = 'create_ticket'; } - if ($action == 'create_ticket' && GETPOST('save', 'alpha')) { + if ($action == 'create_ticket' && GETPOST('save', 'alpha')) { // Test on permission not required. This is a public form. Security is managed by mitigation. $error = 0; $origin_email = GETPOST('email', 'email'); if (empty($origin_email)) { diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 973dc537a610d..352aae3e68897 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -99,6 +99,28 @@ exit; } + +/* + * View + */ + +$form = new Form($db); +$user_assign = new User($db); +$user_create = new User($db); +$formTicket = new FormTicket($db); + +if (!getDolGlobalString('TICKET_ENABLE_PUBLIC_INTERFACE')) { + print '
    '.$langs->trans('TicketPublicInterfaceForbidden').'
    '; + $db->close(); + exit(); +} + +$arrayofjs = array(); +$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); + +llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); + +// Load the ticket from track_id if ($action == "view_ticketlist") { $error = 0; $display_ticket_list = false; @@ -167,32 +189,12 @@ } } - if ($error || $errors) { + if ($error) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } -/* - * View - */ - -$form = new Form($db); -$user_assign = new User($db); -$user_create = new User($db); -$formTicket = new FormTicket($db); - -if (!getDolGlobalString('TICKET_ENABLE_PUBLIC_INTERFACE')) { - print '
    '.$langs->trans('TicketPublicInterfaceForbidden').'
    '; - $db->close(); - exit(); -} - -$arrayofjs = array(); -$arrayofcss = array(getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', '/public/ticket/').'css/styles.css.php'); - -llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); - if ($action == "view_ticketlist") { print '
    '; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 4a2a4067e9969..3a69b98246883 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -662,7 +662,7 @@ public function testPHP($file) $filecontentaction = $filecontent; } - preg_match_all('/if.*\$action\s*==\s*[\'"][a-z\-]+[\'"].*$/si', $filecontentaction, $matches, PREG_SET_ORDER); + preg_match_all('/if.*\$action\s*==\s*[\'"][a-z\-_]+[\'"].*$/si', $filecontentaction, $matches, PREG_SET_ORDER); foreach ($matches as $key => $val) { if (!preg_match('/\$user->hasR/', $val[0]) From 218bfff6fa402417b95f1260d2f9ac6f7f910529 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 11:55:32 +0200 Subject: [PATCH 161/329] Tooltip to explain why button is disabled. --- htdocs/accountancy/closure/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 0b6739bf742c8..b01f3f1616d2e 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -381,7 +381,7 @@ if (empty($count_by_month['total']) && empty($current_fiscal_period['status'])) { $button = '' . $langs->trans("AccountancyClosureClose") . ''; } else { - $button = '' . $langs->trans("AccountancyClosureClose") . ''; + $button = '' . $langs->trans("AccountancyClosureClose") . ''; } print_barre_liste('', '', '', '', '', '', '', -1, '', '', 0, $button, '', 0, 1, 0); From 2d62400b2203095ebed90a765abed21909d7b1a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 13:12:42 +0200 Subject: [PATCH 162/329] FIX autoselect the fiscal period by default --- .../accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/closure/index.php | 38 +++++++++++++++---- htdocs/langs/en_US/accountancy.lang | 2 +- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index dbe2101cd3e54..3541c9c9cd878 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2536,7 +2536,7 @@ public function loadFiscalPeriods($force = false, $mode = 'active') } /** - * Get list of fiscal period + * Get list of fiscal period ordered by start date. * * @param string $filter Filter * @return array|int Return integer <0 if KO, Fiscal periods : [[id, date_start, date_end, label], ...] diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index c7cb3ce3a20cd..7ccbdaec7a65f 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -61,33 +61,57 @@ setEventMessages($object->error, $object->errors, 'errors'); } +// Define the arrays of fiscal periods $active_fiscal_periods = array(); +$first_active_fiscal_period = null; $last_fiscal_period = null; $current_fiscal_period = null; $next_fiscal_period = null; $next_active_fiscal_period = null; if (is_array($fiscal_periods)) { - foreach ($fiscal_periods as $fiscal_period) { - if (empty($fiscal_period['status'])) { + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if (empty($first_active_fiscal_period) && empty($fiscal_period['status'])) { + $first_active_fiscal_period = $fiscal_period; + } + if (empty($fiscal_period['status'])) { // if not closed $active_fiscal_periods[] = $fiscal_period; } - if (isset($current_fiscal_period)) { + if (isset($current_fiscal_period)) { // If we already reach then current fiscal period, then this one is the next one just after if (!isset($next_fiscal_period)) { $next_fiscal_period = $fiscal_period; } if (!isset($next_active_fiscal_period) && empty($fiscal_period['status'])) { $next_active_fiscal_period = $fiscal_period; } - } else { + } else { // If we did not found the current fiscal period if ($fiscal_period_id == $fiscal_period['id'] || (empty($fiscal_period_id) && $fiscal_period['date_start'] <= $now && $now <= $fiscal_period['date_end'])) { $current_fiscal_period = $fiscal_period; } else { - $last_fiscal_period = $fiscal_period; + $last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period } } } } +// If a current fiscal period open with an end and start date was not found, we autoselect the first one that is open and has a start and end date defined +if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) { + $current_fiscal_period = $first_active_fiscal_period; + $last_fiscal_period = null; + $foundcurrent = false; + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if ($foundcurrent) { + $next_fiscal_period = $fiscal_period; + break; + } + if ($fiscal_period['id'] == $current_fiscal_period['id']) { + $foundcurrent = true; + } + if (!$foundcurrent) { + $last_fiscal_period = $fiscal_period; + } + } +} + $accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen'); $accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); @@ -316,9 +340,7 @@ if (empty($current_fiscal_period)) { print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod")); -} - -if (isset($current_fiscal_period)) { +} else { // Step 1 $head = array(); $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 653f12b8e72ed..fdc99e5e71805 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -458,7 +458,7 @@ AccountancyErrorMismatchBalanceAmount=The balance (%s) is not equal to 0 AccountancyErrorLetteringBookkeeping=Errors have occurred concerning the transactions: %s ErrorAccountNumberAlreadyExists=The accounting number %s already exists ErrorArchiveAddFile=Can't put "%s" file in archive -ErrorNoFiscalPeriodActiveFound=No active fiscal period found. You can create one from menu %s - %s - %s. +ErrorNoFiscalPeriodActiveFound=No active fiscal period (with a start and end date defined) found. You can create one from menu %s - %s - %s. ErrorBookkeepingDocDateNotOnActiveFiscalPeriod=The bookkeeping doc date is not inside the active fiscal period ErrorBookkeepingDocDateIsOnAClosedFiscalPeriod=The bookkeeping doc date is inside a closed fiscal period ## Import From d2a279cc7df34cca7555b66dac8da9afe5f580ff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 13:12:42 +0200 Subject: [PATCH 163/329] FIX autoselect the fiscal period by default --- .../accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/closure/index.php | 38 +++++++++++++++---- htdocs/langs/en_US/accountancy.lang | 2 +- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 1e4afa2d45fdd..66bd62cce1182 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2533,7 +2533,7 @@ public function loadFiscalPeriods($force = false, $mode = 'active') } /** - * Get list of fiscal period + * Get list of fiscal period ordered by start date. * * @param string $filter Filter * @return array|int Return integer <0 if KO, Fiscal periods : [[id, date_start, date_end, label], ...] diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 43f9179c5993a..c59a865237581 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -60,33 +60,57 @@ setEventMessages($object->error, $object->errors, 'errors'); } +// Define the arrays of fiscal periods $active_fiscal_periods = array(); +$first_active_fiscal_period = null; $last_fiscal_period = null; $current_fiscal_period = null; $next_fiscal_period = null; $next_active_fiscal_period = null; if (is_array($fiscal_periods)) { - foreach ($fiscal_periods as $fiscal_period) { - if (empty($fiscal_period['status'])) { + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if (empty($first_active_fiscal_period) && empty($fiscal_period['status'])) { + $first_active_fiscal_period = $fiscal_period; + } + if (empty($fiscal_period['status'])) { // if not closed $active_fiscal_periods[] = $fiscal_period; } - if (isset($current_fiscal_period)) { + if (isset($current_fiscal_period)) { // If we already reach then current fiscal period, then this one is the next one just after if (!isset($next_fiscal_period)) { $next_fiscal_period = $fiscal_period; } if (!isset($next_active_fiscal_period) && empty($fiscal_period['status'])) { $next_active_fiscal_period = $fiscal_period; } - } else { + } else { // If we did not found the current fiscal period if ($fiscal_period_id == $fiscal_period['id'] || (empty($fiscal_period_id) && $fiscal_period['date_start'] <= $now && $now <= $fiscal_period['date_end'])) { $current_fiscal_period = $fiscal_period; } else { - $last_fiscal_period = $fiscal_period; + $last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period } } } } +// If a current fiscal period open with an end and start date was not found, we autoselect the first one that is open and has a start and end date defined +if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) { + $current_fiscal_period = $first_active_fiscal_period; + $last_fiscal_period = null; + $foundcurrent = false; + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if ($foundcurrent) { + $next_fiscal_period = $fiscal_period; + break; + } + if ($fiscal_period['id'] == $current_fiscal_period['id']) { + $foundcurrent = true; + } + if (!$foundcurrent) { + $last_fiscal_period = $fiscal_period; + } + } +} + $accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen'); $accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); @@ -315,9 +339,7 @@ if (empty($current_fiscal_period)) { print $langs->trans('ErrorNoFiscalPeriodActiveFound', $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Setup"), $langs->transnoentitiesnoconv("FiscalPeriod")); -} - -if (isset($current_fiscal_period)) { +} else { // Step 1 $head = array(); $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index b799215f95de5..b48493f660017 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -454,7 +454,7 @@ AccountancyErrorMismatchBalanceAmount=The balance (%s) is not equal to 0 AccountancyErrorLetteringBookkeeping=Errors have occurred concerning the transactions: %s ErrorAccountNumberAlreadyExists=The accounting number %s already exists ErrorArchiveAddFile=Can't put "%s" file in archive -ErrorNoFiscalPeriodActiveFound=No active fiscal period found. You can create one from menu %s - %s - %s. +ErrorNoFiscalPeriodActiveFound=No active fiscal period (with a start and end date defined) found. You can create one from menu %s - %s - %s. ErrorBookkeepingDocDateNotOnActiveFiscalPeriod=The bookkeeping doc date is not inside the active fiscal period ErrorBookkeepingDocDateIsOnAClosedFiscalPeriod=The bookkeeping doc date is inside a closed fiscal period ## Import From 7b61965042faf573d267aa0b14678cdbb324ac0f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 13:12:42 +0200 Subject: [PATCH 164/329] FIX autoselect the fiscal period by default --- .../accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/closure/index.php | 38 +++++++++++++++---- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 97387198fcd3c..be140363e3c8e 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2462,7 +2462,7 @@ public function loadFiscalPeriods($force = false, $mode = 'active') } /** - * Get list of fiscal period + * Get list of fiscal period ordered by start date. * * @param string $filter Filter * @return array|int Return integer <0 if KO, Fiscal periods : [[id, date_start, date_end, label], ...] diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index b01f3f1616d2e..b140dff070486 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -60,33 +60,57 @@ setEventMessages($object->error, $object->errors, 'errors'); } +// Define the arrays of fiscal periods $active_fiscal_periods = array(); +$first_active_fiscal_period = null; $last_fiscal_period = null; $current_fiscal_period = null; $next_fiscal_period = null; $next_active_fiscal_period = null; if (is_array($fiscal_periods)) { - foreach ($fiscal_periods as $fiscal_period) { - if (empty($fiscal_period['status'])) { + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if (empty($first_active_fiscal_period) && empty($fiscal_period['status'])) { + $first_active_fiscal_period = $fiscal_period; + } + if (empty($fiscal_period['status'])) { // if not closed $active_fiscal_periods[] = $fiscal_period; } - if (isset($current_fiscal_period)) { + if (isset($current_fiscal_period)) { // If we already reach then current fiscal period, then this one is the next one just after if (!isset($next_fiscal_period)) { $next_fiscal_period = $fiscal_period; } if (!isset($next_active_fiscal_period) && empty($fiscal_period['status'])) { $next_active_fiscal_period = $fiscal_period; } - } else { + } else { // If we did not found the current fiscal period if ($fiscal_period_id == $fiscal_period['id'] || (empty($fiscal_period_id) && $fiscal_period['date_start'] <= $now && $now <= $fiscal_period['date_end'])) { $current_fiscal_period = $fiscal_period; } else { - $last_fiscal_period = $fiscal_period; + $last_fiscal_period = $fiscal_period; // $last_fiscal_period is in fact $previous_fiscal_period } } } } +// If a current fiscal period open with an end and start date was not found, we autoselect the first one that is open and has a start and end date defined +if (empty($current_fiscal_period) && !empty($first_active_fiscal_period)) { + $current_fiscal_period = $first_active_fiscal_period; + $last_fiscal_period = null; + $foundcurrent = false; + foreach ($fiscal_periods as $fiscal_period) { // List of fiscal periods sorted by date start + if ($foundcurrent) { + $next_fiscal_period = $fiscal_period; + break; + } + if ($fiscal_period['id'] == $current_fiscal_period['id']) { + $foundcurrent = true; + } + if (!$foundcurrent) { + $last_fiscal_period = $fiscal_period; + } + } +} + $accounting_groups_used_for_balance_sheet_account = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT'))), 'strlen'); $accounting_groups_used_for_income_statement = array_filter(array_map('trim', explode(',', getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT'))), 'strlen'); @@ -315,9 +339,7 @@ if (empty($current_fiscal_period)) { print $langs->trans('ErrorNoFiscalPeriodActiveFound'); -} - -if (isset($current_fiscal_period)) { +} else { // Step 1 $head = array(); $head[0][0] = DOL_URL_ROOT . '/accountancy/closure/index.php?fiscal_period_id=' . $current_fiscal_period['id']; From 946726779c6d5d703b6b383de60f8b288d5d8dd4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 13:23:04 +0200 Subject: [PATCH 165/329] Fix test on setup --- htdocs/accountancy/closure/index.php | 7 +++---- htdocs/langs/en_US/errors.lang | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index b140dff070486..9489e5192181a 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -151,11 +151,10 @@ if ($generate_bookkeeping_records) { if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_BALANCE_SHEET_ACCOUNT')) { $error++; - setEventMessages($langs->trans("ErrorSetupNotComplete"), null, 'errors'); - } - if (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) { + setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors'); + } elseif (!getDolGlobalString('ACCOUNTING_CLOSURE_ACCOUNTING_GROUPS_USED_FOR_INCOME_STATEMENT')) { $error++; - setEventMessages($langs->trans("ErrorSetupNotComplete"), null, 'errors'); + setEventMessages($langs->trans("ErrorAccountingClosureSetupNotComplete"), null, 'errors'); } } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 681abb1aedcc1..29558bfd04280 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -58,6 +58,7 @@ ErrorSubjectIsRequired=The email subject is required ErrorFailedToCreateDir=Failed to create a directory. Check that Web server user has permissions to write into Dolibarr documents directory. If parameter safe_mode is enabled on this PHP, check that Dolibarr php files owns to web server user (or group). ErrorNoMailDefinedForThisUser=No mail defined for this user ErrorSetupOfEmailsNotComplete=Setup of emails is not complete +ErrorAccountingClosureSetupNotComplete=Setup of closure accounts not complete ErrorFeatureNeedJavascript=This feature needs JavaScript to be activated to work. Change this in setup - display. ErrorTopMenuMustHaveAParentWithId0=A menu of type 'Top' can't have a parent menu. Put 0 in parent menu or choose a menu of type 'Left'. ErrorLeftMenuMustHaveAParentId=A menu of type 'Left' must have a parent id. From fde37d8172af5a28a753324503c17f3971da161b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 13:36:30 +0200 Subject: [PATCH 166/329] Fix deadlock situation by adding a constant in hope to save user --- htdocs/accountancy/admin/fiscalyear_card.php | 23 ++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 06dc52d324771..ebf576ca34ad6 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -94,7 +94,7 @@ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } -if ($action == 'confirm_delete' && $confirm == "yes") { +if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontoadd) { $result = $object->delete($id); if ($result >= 0) { header("Location: fiscalyear.php"); @@ -102,7 +102,7 @@ } else { setEventMessages($object->error, $object->errors, 'errors'); } -} elseif ($action == 'add') { +} elseif ($action == 'add' && $permissiontoadd) { if (!GETPOST('cancel', 'alpha')) { $error = 0; @@ -144,7 +144,7 @@ header("Location: ./fiscalyear.php"); exit(); } -} elseif ($action == 'update') { +} elseif ($action == 'update' && $permissiontoadd) { // Update record if (!GETPOST('cancel', 'alpha')) { $result = $object->fetch($id); @@ -166,8 +166,19 @@ header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit(); } -} +} elseif ($action == 'reopen' && $permissiontoadd && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) { + $result = $object->fetch($id); + + $object->status = GETPOST('status', 'int'); + $result = $object->update($user); + if ($result > 0) { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit(); + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } +} /* @@ -345,6 +356,10 @@ if ($user->hasRight('accounting', 'fiscalyear', 'write')) { print '
    '; + if (getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD') && $object->status == $object::STATUS_CLOSED) { + print dolGetButtonAction($langs->trans("ReOpen"), '', 'reopen', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), 'reopen', $permissiontoadd); + } + print ''.$langs->trans('Modify').''; //print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete); From df5cde2ec2c90c3b386df0747e90c37928571ef4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 14:02:39 +0200 Subject: [PATCH 167/329] Look and feel v21 --- htdocs/core/boxes/box_graph_invoices_permonth.php | 4 ++-- htdocs/core/boxes/box_graph_invoices_supplier_permonth.php | 4 ++-- htdocs/core/boxes/box_graph_orders_permonth.php | 4 ++-- htdocs/core/boxes/box_graph_orders_supplier_permonth.php | 4 ++-- htdocs/core/boxes/box_graph_propales_permonth.php | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index 75d97bee972bc..68d5b65b7ff53 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -235,9 +235,9 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow .= ''; $stringtoshow .= '   '; - $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow .= ''; $stringtoshow .= '
    '; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index 382f88d319f2f..209147aafbb53 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -230,9 +230,9 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow .= ''; $stringtoshow .= '   '; - $stringtoshow .= ' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow .= ''; $stringtoshow .= '
    '; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 0bf4568b7381e..461cda11cb650 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -234,9 +234,9 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow .= ''; $stringtoshow .= '   '; - $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow .= ''; $stringtoshow .= '
    '; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index 0a043835cacab..1964f4317adcd 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -233,9 +233,9 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow .= ''; $stringtoshow .= '   '; - $stringtoshow .= ' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow .= ''; $stringtoshow .= '
    '; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 44e4989996b8f..bb9f0d14dbb32 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -230,9 +230,9 @@ public function loadBox($max = 5) $stringtoshow .= ''; $stringtoshow .= ''; $stringtoshow .= ''; - $stringtoshow .= ' '.$langs->trans("NumberOfProposalsByMonth"); + $stringtoshow .= ''; $stringtoshow .= '   '; - $stringtoshow .= ' '.$langs->trans("AmountOfProposalsByMonthHT"); + $stringtoshow .= ''; $stringtoshow .= '
    '; $stringtoshow .= $langs->trans("Year").' '; $stringtoshow .= ''; From 182c90da696c9efc87e88688fec2de10a70a72db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 14:12:51 +0200 Subject: [PATCH 168/329] Look and feel v21 --- htdocs/core/lib/admin.lib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index ae66675446251..c87052b9774db 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -2090,6 +2090,11 @@ function company_admin_prepare_head() $head[$h][2] = 'company'; $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/company_socialnetworks.php"; + $head[$h][1] = $langs->trans("SocialNetworksInformation"); + $head[$h][2] = 'socialnetworks'; + + $h++; $head[$h][0] = DOL_URL_ROOT."/admin/openinghours.php"; $head[$h][1] = $langs->trans("OpeningHours"); $head[$h][2] = 'openinghours'; @@ -2100,11 +2105,6 @@ function company_admin_prepare_head() $head[$h][2] = 'accountant'; $h++; - $head[$h][0] = DOL_URL_ROOT."/admin/company_socialnetworks.php"; - $head[$h][1] = $langs->trans("SocialNetworksInformation"); - $head[$h][2] = 'socialnetworks'; - $h++; - complete_head_from_modules($conf, $langs, null, $head, $h, 'mycompany_admin', 'add'); complete_head_from_modules($conf, $langs, null, $head, $h, 'mycompany_admin', 'remove'); From 6f7b0c18158623f4b5470219bf751f77809d9bf7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 14:30:28 +0200 Subject: [PATCH 169/329] NeW Can add the info messages (error, waring...) at the top of the stack --- htdocs/admin/modulehelp.php | 6 +++--- htdocs/admin/modules.php | 2 +- htdocs/core/lib/functions.lib.php | 26 ++++++++++++++++++-------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 11822eb47a27c..c2d6d2a7d7957 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -350,8 +350,6 @@ $text .= '
    '.$langs->trans("IdModule").': '.$objMod->numero; - $text .= '
    '.$langs->trans("Version").': '.$version; - $textexternal = ''; if ($objMod->isCoreOrExternalModule() == 'external') { $tmpdirofmoduletoshow = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', (string) $dirofmodule); @@ -381,8 +379,10 @@ } elseif (!empty($objMod->enabled_bydefault)) { $text .= '   ('.$langs->trans("EnabledByDefaultAtInstall").')'; } - $text .= '
    '; } + + $text .= '
    '.$langs->trans("Version").': '.$version; + $text .= '
    '; $moduledesclong = $objMod->getDescLong(); diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 80ba435d9a9d5..9c93d7972868e 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -1113,7 +1113,7 @@ if ($action == 'checklastversion') { if ($foundoneexternalmodulewithupdate) { - setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'warnings'); + setEventMessages($langs->trans("ModuleUpdateAvailable"), null, 'warnings', '', 0, 1); } else { setEventMessages($langs->trans("NoExternalModuleWithUpdate"), null, 'mesgs'); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 491c31b6e31cb..0ac5ea25bb04b 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9832,10 +9832,11 @@ function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) * @param string|string[] $mesgs Message string or array * @param string $style Which style to use ('mesgs' by default, 'warnings', 'errors') * @param int $noduplicate 1 means we do not add the message if already present in session stack + * @param int $attop Add the message in the top of the stack (at bottom by default) * @return void * @see dol_htmloutput_events() */ -function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) +function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0, $attop = 0) { //dol_syslog(__FUNCTION__ . " is deprecated", LOG_WARNING); This is not deprecated, it is used by setEventMessages function if (!is_array($mesgs)) { @@ -9845,7 +9846,11 @@ function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) if (!empty($noduplicate) && isset($_SESSION['dol_events'][$style]) && in_array($mesgs, $_SESSION['dol_events'][$style])) { return; } - $_SESSION['dol_events'][$style][] = $mesgs; + if ($attop) { + array_unshift($_SESSION['dol_events'][$style], $mesgs); + } else { + $_SESSION['dol_events'][$style][] = $mesgs; + } } } else { // If mesgs is an array @@ -9855,7 +9860,11 @@ function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) if (!empty($noduplicate) && isset($_SESSION['dol_events'][$style]) && in_array($mesg, $_SESSION['dol_events'][$style])) { return; } - $_SESSION['dol_events'][$style][] = $mesg; + if ($attop) { + array_unshift($_SESSION['dol_events'][$style], $mesgs); + } else { + $_SESSION['dol_events'][$style][] = $mesg; + } } } } @@ -9870,10 +9879,11 @@ function setEventMessage($mesgs, $style = 'mesgs', $noduplicate = 0) * @param string $style Which style to use ('mesgs' by default, 'warnings', 'errors') * @param string $messagekey A key to be used to allow the feature "Never show this message during this session again" * @param int $noduplicate 1 means we do not add the message if already present in session stack + * @param int $attop Add the message in the top of the stack (at bottom by default) * @return void * @see dol_htmloutput_events() */ -function setEventMessages($mesg, $mesgs, $style = 'mesgs', $messagekey = '', $noduplicate = 0) +function setEventMessages($mesg, $mesgs, $style = 'mesgs', $messagekey = '', $noduplicate = 0, $attop = 0) { if (empty($mesg) && empty($mesgs)) { dol_syslog("Try to add a message in stack, but value to add is empty message", LOG_WARNING); @@ -9883,17 +9893,17 @@ function setEventMessages($mesg, $mesgs, $style = 'mesgs', $messagekey = '', $no // TODO $mesg .= ''; } - if (empty($messagekey) || empty($_COOKIE["DOLHIDEMESSAGE".$messagekey])) { + if (empty($messagekey) || empty($_COOKIE["DOLUSER_HIDEMESSAGE".$messagekey])) { if (!in_array((string) $style, array('mesgs', 'warnings', 'errors'))) { dol_print_error(null, 'Bad parameter style='.$style.' for setEventMessages'); } if (empty($mesgs)) { - setEventMessage($mesg, $style, $noduplicate); + setEventMessage($mesg, $style, $noduplicate, $attop); } else { if (!empty($mesg) && !in_array($mesg, $mesgs)) { - setEventMessage($mesg, $style, $noduplicate); // Add message string if not already into array + setEventMessage($mesg, $style, $noduplicate, $attop); // Add message string if not already into array } - setEventMessage($mesgs, $style, $noduplicate); + setEventMessage($mesgs, $style, $noduplicate, $attop); } } } From 333ba5c8951ce1310b208c2e2f02c49e52ffc823 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 15:28:52 +0200 Subject: [PATCH 170/329] Clean var --- htdocs/core/lib/images.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index dabc72e026b77..c92922c542680 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -187,7 +187,7 @@ function dol_imageResizeOrCrop($file, $mode, $newWidth, $newHeight, $src_x = 0, { require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - global $conf, $langs; + global $langs; dol_syslog("dol_imageResizeOrCrop file=".$file." mode=".$mode." newWidth=".$newWidth." newHeight=".$newHeight." src_x=".$src_x." src_y=".$src_y); From 4b9ce8a9bcb8ee11d25dd834d2808362b238b551 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 15:38:31 +0200 Subject: [PATCH 171/329] Fix: method getImagePublicURLOfObject can't work on WebsitePage so add a method getImageFromHtmlContent to compensate. --- htdocs/core/lib/website.lib.php | 44 ++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 6f0abb8e1ca0e..e1a2a3f42175f 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -1023,7 +1023,7 @@ function getNbOfImagePublicURLOfObject($object) * @param int $no Numero of image (if there is several images. 1st one by default) * @param string $extName Extension to differentiate thumb file name ('', '_small', '_mini') * @return string HTML img content or '' if no image found - * @see getNbOfImagePublicURLOfObject() + * @see getNbOfImagePublicURLOfObject(), getImageFromHtmlContent() */ function getImagePublicURLOfObject($object, $no = 1, $extName = '') { @@ -1315,6 +1315,48 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so return $arrayresult; } +/** + * Return the URL of an image found into a HTML content. + * To get image from an external URL to download first, see getAllImages() + * + * @param string $htmlContent HTML content + * @param int $imageNumber The position of image. 1 by default = first image found + * @return string URL of image or '' if not foud + * @see getImagePublicURLOfObject() + */ +function getImageFromHtmlContent($htmlContent, $imageNumber = 1) +{ + $dom = new DOMDocument(); + + libxml_use_internal_errors(false); // Avoid to fill memory with xml errors + if (LIBXML_VERSION < 20900) { + // Avoid load of external entities (security problem). + // Required only if LIBXML_VERSION < 20900 + // @phan-suppress-next-line PhanDeprecatedFunctionInternal + libxml_disable_entity_loader(true); + } + + // Load HTML content into object + $dom->loadHTML($htmlContent); + + // Re-enable HTML load errors + libxml_clear_errors(); + + // Load all img tags + $images = $dom->getElementsByTagName('img'); + + // Check if nb of image is valid + if ($imageNumber > 0 && $imageNumber <= $images->length) { + // Récupère l'image correspondante (index - 1 car $imageNumber est 1-based) + $img = $images->item($imageNumber - 1); + if ($img instanceof DOMElement) { + return $img->getAttribute('src'); + } + } + + return ''; +} + /** * Download all images found into page content $tmp. * If $modifylinks is set, links to images will be replace with a link to viewimage wrapper. From 5886355a879d5fb22fb31c697edde07218132672 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 16:09:19 +0200 Subject: [PATCH 172/329] Fix image in RSS --- htdocs/core/lib/xcal.lib.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 5101f70959aaf..f8db58336354b 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -397,6 +397,18 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $tmpevent['desc'] = $event->description; if (!empty($event->image)) { $tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$event->image; + } else { + include_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; + $tmpimage = getImageFromHtmlContent($event->content); + if ($tmpimage) { + if (strpos($tmpimage, '/') === 0) { // If $tmpimage is an absolute path + $tmpevent['image'] = $GLOBALS['website']->virtualhost.$tmpimage; + } elseif (stripos($tmpimage, 'http:') === 0) { // If $tmpimage is a full URI + $tmpevent['image'] = $tmpimage; + } else { + $tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$tmpimage; + } // TODO If $tmpimage is "data:..." + } } $tmpevent['content'] = $event->content; From 4a86964e1851bd93c2cfb29afcde189e04e36158 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 16:18:46 +0200 Subject: [PATCH 173/329] Fix image in RSS --- htdocs/core/lib/xcal.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index f8db58336354b..8b4fef3ed5fec 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -403,7 +403,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt if ($tmpimage) { if (strpos($tmpimage, '/') === 0) { // If $tmpimage is an absolute path $tmpevent['image'] = $GLOBALS['website']->virtualhost.$tmpimage; - } elseif (stripos($tmpimage, 'http:') === 0) { // If $tmpimage is a full URI + } elseif (stripos($tmpimage, 'http') === 0) { // If $tmpimage is a full URI $tmpevent['image'] = $tmpimage; } else { $tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$tmpimage; From 44fdcdd8ed4526dd4d28cab792f27fbf79f34c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2024 16:49:38 +0200 Subject: [PATCH 174/329] can set position of file with dol_move (#31201) * can set position of file with dol_move * Update api_documents.class.php * Update api_documents.class.php * fix * fix * fix * fix * fix --- dev/tools/phan/baseline.txt | 2 +- htdocs/api/class/api_documents.class.php | 20 ++++++++++++++------ htdocs/core/lib/files.lib.php | 6 ++++++ test/phpunit/RestAPIDocumentTest.php | 14 +++++++++----- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 1c990c53c7862..aa16693222899 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -58,7 +58,7 @@ return [ 'htdocs/adherents/stats/index.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], - 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], + 'htdocs/api/class/api_documents.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 74e846d8b4774..7c7c624603bbd 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -662,6 +662,9 @@ public function get($id) { * @param string $fileencoding File encoding (''=no encoding, 'base64'=Base 64) * @param int $overwriteifexists Overwrite file if exists (1 by default) * @param int $createdirifnotexists Create subdirectories if the doesn't exists (1 by default) + * @param int $position Position + * @param string $cover Cover info + * @param array $array_options array of options * @return string * * @url POST /upload @@ -669,16 +672,12 @@ public function get($id) { * @throws RestException 400 Bad Request * @throws RestException 403 Access denied * @throws RestException 404 Object not found - * @throws RestException 500 Error on file operationw + * @throws RestException 500 Error on file operation */ - public function post($filename, $modulepart, $ref = '', $subdir = '', $filecontent = '', $fileencoding = '', $overwriteifexists = 0, $createdirifnotexists = 1) + public function post($filename, $modulepart, $ref = '', $subdir = '', $filecontent = '', $fileencoding = '', $overwriteifexists = 0, $createdirifnotexists = 1, $position = 0, $cover = '', $array_options = []) { global $conf; - //var_dump($modulepart); - //var_dump($filename); - //var_dump($filecontent);exit; - $modulepartorig = $modulepart; if (empty($modulepart)) { @@ -939,6 +938,15 @@ public function post($filename, $modulepart, $ref = '', $subdir = '', $fileconte $moreinfo['src_object_type'] = $object->table_element; $moreinfo['src_object_id'] = $object->id; } + if (!empty($array_options)) { + $moreinfo = array_merge($moreinfo, ["array_options" => $array_options]); + } + if (!empty($position)) { + $moreinfo = array_merge($moreinfo, ["position" => $position]); + } + if (!empty($cover)) { + $moreinfo = array_merge($moreinfo, ["cover" => $cover]); + } // Move the temporary file at its final emplacement $result = dol_move($destfiletmp, $dest_file, '0', $overwriteifexists, 1, 1, $moreinfo); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 1852eadebeb47..cf63c00e9954b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1137,6 +1137,12 @@ function dol_move($srcfile, $destfile, $newmask = '0', $overwriteifexists = 1, $ if (!empty($moreinfo) && !empty($moreinfo['src_object_id'])) { $ecmfile->src_object_id = $moreinfo['src_object_id']; } + if (!empty($moreinfo) && !empty($moreinfo['position'])) { + $ecmfile->position = $moreinfo['position']; + } + if (!empty($moreinfo) && !empty($moreinfo['cover'])) { + $ecmfile->cover = $moreinfo['cover']; + } $resultecm = $ecmfile->create($user); if ($resultecm < 0) { diff --git a/test/phpunit/RestAPIDocumentTest.php b/test/phpunit/RestAPIDocumentTest.php index e0e84b03dd589..897a306ae71bd 100644 --- a/test/phpunit/RestAPIDocumentTest.php +++ b/test/phpunit/RestAPIDocumentTest.php @@ -1,6 +1,7 @@ - * Copyright (C) 2023 Alexandre Janniaux +/* Copyright (C) 2010 Laurent Destailleur + * Copyright (C) 2023 Alexandre Janniaux + * Copyright (C) 2024 Frédéric France * * 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 @@ -131,7 +132,8 @@ public function testPushDocument() 'filecontent' => "content text", 'fileencoding' => "", 'overwriteifexists' => 0, - 'createdirifnotexists' => 0 + 'createdirifnotexists' => 0, + 'position' => 0, ); $param = ''; @@ -161,7 +163,8 @@ public function testPushDocument() 'filecontent' => "content text", 'fileencoding' => "", 'overwriteifexists' => 0, - 'createdirifnotexists' => 0 + 'createdirifnotexists' => 0, + 'position' => 0, ); $param = ''; @@ -189,7 +192,8 @@ public function testPushDocument() 'filecontent' => "content text", 'fileencoding' => "", 'overwriteifexists' => 0, - 'createdirifnotexists' => 1 + 'createdirifnotexists' => 1, + 'position' => 0, ); $param = ''; From f101423901d2c71efbd30456076a46f1e7cacd07 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Mon, 30 Sep 2024 16:50:54 +0200 Subject: [PATCH 175/329] FIX State dropdown is not working on User card #31198 (#31205) * FIX State dropdown is not working on User card #31198 * Fix phan --- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/core/ajax/ziptown.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index c631d97ff99f8..1e5b91224d9e8 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -169,7 +169,7 @@ } elseif ($action == 'reopen' && $permissiontoadd && getDolGlobalString('ACCOUNTING_CAN_REOPEN_CLOSED_PERIOD')) { $result = $object->fetch($id); - $object->status = GETPOST('status', 'int'); + $object->status = GETPOSTINT('status'); $result = $object->update($user); if ($result > 0) { diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 6ecfbb387f9b9..bd883042c1e53 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -143,7 +143,7 @@ top_httphead('text/html'); $formcompany = new FormCompany($db); - print $formcompany->select_state(GETPOSTINT('selected', 1), GETPOSTINT('country_codeid', 1), GETPOSTINT('htmlname', 1), GETPOSTINT('morecss', 1)); + print $formcompany->select_state(GETPOSTINT('selected', 1), GETPOSTINT('country_codeid', 1), GETPOST('htmlname', 'alpha', 1), GETPOST('morecss', 'alpha', 1)); } $db->close(); From 25ea797aed961cd1bbc2df647a7ab532e18922e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 18:26:24 +0200 Subject: [PATCH 176/329] Fix not default template for BOM --- htdocs/bom/class/bom.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 68cd44dcf46eb..0ad0cddf96dbf 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -986,7 +986,7 @@ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hided $outputlangs->load("products"); if (!dol_strlen($modele)) { - $modele = 'standard'; + $modele = ''; if ($this->model_pdf) { $modele = $this->model_pdf; From cdbcd7df58f1ecca02f010c528d2181d4aac724b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 19:50:39 +0200 Subject: [PATCH 177/329] FIX tool to convert into utf8mb4 --- htdocs/admin/system/database-tables.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index f216377f909a3..cf8f5771b32d2 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -52,11 +52,11 @@ $db->query($sql); } if ($action == 'convertutf8') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; $db->query($sql); } if ($action == 'convertutf8mb4') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; $db->query($sql); } if ($action == 'convertdynamic') { From f25e1c5b2b710a374ac65af5b7838961d1dc347f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 20:05:31 +0200 Subject: [PATCH 178/329] Add info to help debug collation pb --- htdocs/admin/system/database.php | 4 ++-- htdocs/langs/en_US/admin.lang | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index b70d57c9d668c..51f5a4afbee1b 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -59,13 +59,13 @@ print '
    '."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 95ea12ec3ccc8..d917d53c07cca 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2556,6 +2556,7 @@ ParamName=Name of parameter ParamValue=Value of parameter ConfirmDeleteParamOfSocialNetwork=Are you sure you want to delete this parameter ? HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +HelpMariaDBToGetValue=This value was retrieved with command: %s Captcha=Captcha CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here DolibarrStandardCaptcha=A native captcha generated by Dolibarr From f36dc403bcc2341e2e7bbeed1957c84492f5b5fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 20:05:31 +0200 Subject: [PATCH 179/329] Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 --- htdocs/admin/system/database.php | 4 ++-- htdocs/langs/en_US/admin.lang | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index cd87cc2483426..1c9bb6b2f93af 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -59,13 +59,13 @@ print ''."\n"; print ''."\n"; print ''."\n"; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e64e83b2d824d..2a93e7d181a93 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2555,3 +2555,7 @@ AddMoreParams=Add more parameters for connection (cookies, tokens, ...)
    Exam ParamName=Name of parameter ParamValue=Value of parameter HelpMariaDBToGetPossibleValues=You can get a list of possible values by running the following SQL command: %s +HelpMariaDBToGetValue=This value was retrieved with command: %s +Captcha=Captcha +CaptchaDesc=If you want to protect your login page with a Captcha, you can choose which one to use here +DolibarrStandardCaptcha=A native captcha generated by Dolibarr From 048072d3db609a7a7600772e0a71d6366cb340c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 20:23:27 +0200 Subject: [PATCH 180/329] FIX Tool to convert into utf8 --- htdocs/admin/system/database-tables.php | 26 +++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index bb76acce6af4c..fd361b504fc4c 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -53,12 +53,30 @@ $db->query($sql); } if ($action == 'convertutf8') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; - $db->query($sql); + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Set the default value on table + $resql1 = $db->query($sql); + if (!$resql1) { + setEventMessages($db->lasterror(), null, 'warnings'); + } else { + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Switch fields (may fails due to foreign key) + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } + } } if ($action == 'convertutf8mb4') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; - $db->query($sql); + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Set the default value on table + $resql1 = $db->query($sql); + if (!$resql1) { + setEventMessages($db->lasterror(), null, 'warnings'); + } else { + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Switch fields (may fails due to foreign key) + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } + } } if ($action == 'convertdynamic') { $sql = "ALTER TABLE ".$db->sanitize($table)." ROW_FORMAT=DYNAMIC;"; From b5c6ead33bb19bb7c62f9c66674aa4b87ba899cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 20:23:27 +0200 Subject: [PATCH 181/329] FIX Tool to convert into utf8 --- htdocs/admin/system/database-tables.php | 26 +++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index cf8f5771b32d2..fa7a86480baac 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -52,12 +52,30 @@ $db->query($sql); } if ($action == 'convertutf8') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; - $db->query($sql); + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Set the default value on table + $resql1 = $db->query($sql); + if (!$resql1) { + setEventMessages($db->lasterror(), null, 'warnings'); + } else { + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Switch fields (may fails due to foreign key) + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } + } } if ($action == 'convertutf8mb4') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; - $db->query($sql); + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Set the default value on table + $resql1 = $db->query($sql); + if (!$resql1) { + setEventMessages($db->lasterror(), null, 'warnings'); + } else { + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Switch fields (may fails due to foreign key) + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } + } } if ($action == 'convertdynamic') { $sql = "ALTER TABLE ".$db->sanitize($table)." ROW_FORMAT=DYNAMIC;"; From 4a3d081dca46372f9104c70b3c2fc8fbab356716 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 23:11:31 +0200 Subject: [PATCH 182/329] FIX Toolt to convert utf8mb4 --- htdocs/admin/system/database-tables.php | 18 +++++++--- htdocs/admin/system/database.php | 48 +++++++++++++++++++++++-- htdocs/admin/system/dbtable.php | 26 +++++++++++--- htdocs/core/db/mysqli.class.php | 5 +-- htdocs/install/repair.php | 16 +++++++-- 5 files changed, 98 insertions(+), 15 deletions(-) diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index fd361b504fc4c..62bf71af96c8b 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -53,12 +53,17 @@ $db->query($sql); } if ($action == 'convertutf8') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Set the default value on table + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); // Set the default value on table $resql1 = $db->query($sql); if (!$resql1) { setEventMessages($db->lasterror(), null, 'warnings'); } else { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Switch fields (may fails due to foreign key) + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); // Switch fields (may fails due to foreign key) $resql2 = $db->query($sql); if (!$resql2) { setEventMessages($db->lasterror(), null, 'warnings'); @@ -66,12 +71,17 @@ } } if ($action == 'convertutf8mb4') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Set the default value on table + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); // Set the default value on table $resql1 = $db->query($sql); if (!$resql1) { setEventMessages($db->lasterror(), null, 'warnings'); } else { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Switch fields (may fails due to foreign key) + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); // Switch fields (may fails due to foreign key) $resql2 = $db->query($sql); if (!$resql2) { setEventMessages($db->lasterror(), null, 'warnings'); diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 51f5a4afbee1b..d6fd9155172cd 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -29,11 +29,34 @@ $langs->load("admin"); +$action = GETPOST('action', 'aZ09'); + if (!$user->admin) { accessforbidden(); } +/* + * Actions + */ + +if ($action == 'convertutf8unicode') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; + $db->query($sql); +} +if ($action == 'convertutf8mb4unicode') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; + $db->query($sql); +} +if ($action == 'convertutf8general') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_general_ci"; + $db->query($sql); +} +if ($action == 'convertutf8mb4general') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"; + $db->query($sql); +} + /* * View @@ -59,14 +82,33 @@ print ''."\n"; print ''."\n"; -print ''."\n"; print '
    '; print '
    '; - print ''.dolPrintLabel($title).''; // $title may contains HTML + print ''.dolPrintLabel($title).''; // $title may contains HTML if (!empty($title) && $savtotalnboflines >= 0 && (string) $savtotalnboflines != '') { - print '('.$totalnboflines.')'; + print '('.$totalnboflines.')'; } print '
    '; - print price(price2num((float) $depreciation_info['base_depreciation_ht'] - $line['cumulative_depreciation_ht'], 'MT')); + print price(price2num((float) $depreciation_info['base_depreciation_ht'] - (float) $line['cumulative_depreciation_ht'], 'MT')); print '
    '; print dolPrintHTML($obj->note_public); - print ''; //if ($obj->progress != '') { - print getTaskProgressView($object, false, false); + print getTaskProgressView($object, false, false); //} print ''.price((float) $totalarray['totalbudgetamount'], 0, $langs, 1, 0, 0, $conf->currency).''; + // @phan-suppress-next-line PhanTypeInvalidDimOffset if (isset($totalarray['type']) && $totalarray['type'][$i] == 'duration') { print(!empty($totalarray['val'][$totalarray['pos'][$i]]) ? convertSecondToTime($totalarray['val'][$totalarray['pos'][$i]], 'allhourmin') : 0); } else { diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 8e1efb1c77377..a917a292a768a 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -2033,6 +2033,7 @@ function setDetailVisibility() { $totalarray['nbfield']++; } if (!empty($arrayfields['s.name_alias']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['s.name_alias']['label'], $_SERVER['PHP_SELF'], 's.name_alias', '', $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 11bf1fc5f2d29..77d1e4a42688f 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -784,7 +784,7 @@ public function getStatusDispatch() // there are some difference between the two arrays // scan the array of results foreach ($diff_array as $key => $value) { - // if the quantity delivered is greater or equal to ordered quantity + // if the quantity delivered is greater or equal to ordered quantity @phan-suppress-next-line PhanTypeInvalidDimOffset if ($qty_received[$key] >= $qty_wished[$key]) { $close++; } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index c5db5505322d5..7c7c665488c08 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -112,7 +112,7 @@ // List of fields to search into when doing a "search in all" $fieldstosearchall = array( 'e.ref' => "Ref", - 'e.ref_supplier'=>"RefSupplier", + 'e.ref_supplier' => "RefSupplier", 's.nom' => "ThirdParty", 'e.note_public' => 'NotePublic', ); @@ -1097,6 +1097,7 @@ $totalarray['nbfield']++; } if (!empty($arrayfields['e.ref']['checked'])) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset print_liste_field_titre($arrayfields['e.ref']['label'], $_SERVER["PHP_SELF"], "e.ref", "", $param, '', $sortfield, $sortorder); $totalarray['nbfield']++; } diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 39cb1790b8c65..2bcda88a25ae0 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -281,6 +281,7 @@ public function createFromClone(User $user, $fromid) $object->ref = empty($this->fields['ref']['default']) ? "Copy_Of_".$object->ref : $this->fields['ref']['default']; } if (property_exists($object, 'label')) { + // @phan-suppress-next-line PhanTypeInvalidDimOffset $object->label = empty($this->fields['label']['default']) ? $langs->trans("CopyOf")." ".$object->label : $this->fields['label']['default']; } if (property_exists($object, 'status')) { diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 56d93f9a17b32..d7edfe1a4b497 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -337,11 +337,11 @@ public function fetch(int $id, string $ref = '') /** * Update object in database * - * @param User|null $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param ?User $user User that modifies + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int if KO: <0 || if OK: >0 */ - public function update(User $user = null, int $notrigger = 0) + public function update($user = null, int $notrigger = 0) { global $conf, $langs; $error = 0; @@ -715,11 +715,11 @@ public function fetchAll(string $sortorder, string $sortfield, int $limit, int $ /** * Update element resource in database * - * @param User|null $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param ?User $user User that modifies + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers * @return int if KO: <0 || if OK: >0 */ - public function updateElementResource(User $user = null, int $notrigger = 0) + public function updateElementResource($user = null, int $notrigger = 0) { $error = 0; $this->date_modification = dol_now(); diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 7d0d4c506baba..a9ff5a705a94f 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -526,6 +526,7 @@ print '
    '.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'
    '.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").''; print ''; print ''; From 8236aed22f1047abf8b90e23ea67cf5ef00fb7ef Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 30 Sep 2024 10:05:24 +0200 Subject: [PATCH 151/329] Qual: Fix phan notices (#31193) # Qual: Fix phan notices Fix phan notices in several classes that have UnknownObjectMethod calls and classes that had notices in relation with these classes --- dev/tools/phan/baseline.txt | 100 ++++++--------- dev/tools/phan/stubs/ovhsms.php | 115 ++++++++++++++++++ htdocs/barcode/codeinit.php | 4 +- htdocs/bookcal/availabilities_card.php | 7 +- htdocs/bookcal/calendar_card.php | 3 +- htdocs/comm/propal/card.php | 4 +- htdocs/commande/class/commande.class.php | 52 ++++---- htdocs/compta/accounting-files.php | 2 +- htdocs/compta/bank/various_payment/list.php | 3 +- htdocs/compta/deplacement/card.php | 3 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/compta/sociales/card.php | 14 ++- .../sociales/class/chargesociales.class.php | 41 ++++++- htdocs/compta/sociales/document.php | 3 +- htdocs/compta/sociales/info.php | 3 +- htdocs/compta/tva/card.php | 3 +- htdocs/compta/tva/document.php | 3 +- htdocs/compta/tva/info.php | 3 +- htdocs/contact/card.php | 2 +- htdocs/contrat/card.php | 2 + htdocs/core/actions_setmoduleoptions.inc.php | 6 + htdocs/core/ajax/saveinplace.php | 2 + htdocs/core/ajax/ziptown.php | 2 +- htdocs/core/class/CSMSFile.class.php | 28 +++++ htdocs/core/class/canvas.class.php | 24 +++- htdocs/core/class/commonobject.class.php | 5 + htdocs/core/class/html.form.class.php | 8 +- htdocs/core/class/html.formcompany.class.php | 43 ++++--- .../class/html.formsocialcontrib.class.php | 17 +-- htdocs/core/class/html.formticket.class.php | 104 +++++++++++++--- htdocs/core/class/interfaces.class.php | 12 +- htdocs/core/class/rssparser.class.php | 2 +- htdocs/core/class/validate.class.php | 4 +- htdocs/core/class/vcard.class.php | 8 +- htdocs/core/customreports.php | 21 +++- htdocs/core/lib/company.lib.php | 16 +-- ...e_20_modWorkflow_WorkflowManager.class.php | 2 +- .../class/emailcollector.class.php | 76 ++++++++++-- .../class/expensereport.class.php | 48 +++++--- htdocs/holiday/class/holiday.class.php | 35 ++++-- htdocs/holiday/define_holiday.php | 5 +- htdocs/takepos/admin/setup.php | 2 +- 42 files changed, 618 insertions(+), 221 deletions(-) create mode 100644 dev/tools/phan/stubs/ovhsms.php diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 7352582772d9d..1c990c53c7862 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,26 +9,26 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 1430+ occurrences - // PhanUndeclaredProperty : 850+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 700+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 670+ occurrences + // PhanPluginUnknownPropertyType : 1330+ occurrences + // PhanUndeclaredProperty : 840+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 690+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 630+ occurrences // PhanUndeclaredGlobalVariable : 440+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 430+ occurrences - // PhanPluginUnknownArrayMethodParamType : 350+ occurrences - // PhanPossiblyUndeclaredVariable : 300+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 420+ occurrences + // PhanPluginUnknownArrayMethodParamType : 340+ occurrences + // PhanPossiblyUndeclaredVariable : 280+ occurrences // PhanTypeMismatchProperty : 190+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 150+ occurrences - // PhanPluginUnknownObjectMethodCall : 150+ occurrences // PhanPluginUnknownArrayFunctionParamType : 140+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 95+ occurrences - // PhanPluginUnknownArrayPropertyType : 75+ occurrences + // PhanPluginUnknownObjectMethodCall : 130+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 80+ occurrences // PhanPluginUndeclaredVariableIsset : 70+ occurrences + // PhanPluginUnknownArrayPropertyType : 70+ occurrences // PhanPluginEmptyStatementIf : 55+ occurrences - // PhanTypeMismatchDimFetch : 55+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences // PhanTypeInvalidDimOffset : 35+ occurrences + // PhanTypeMismatchDimFetch : 35+ occurrences // PhanTypeExpectedObjectPropAccess : 25+ occurrences // PhanPossiblyNullTypeMismatchProperty : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences @@ -36,16 +36,16 @@ return [ // PhanEmptyForeach : 10+ occurrences // PhanPluginConstantVariableNull : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences - // PhanUndeclaredMethod : 9 occurrences + // PhanTypeMismatchDimFetchNullable : 10+ occurrences + // PhanUndeclaredMethod : 10+ occurrences // PhanPluginBothLiteralsBinaryOp : 8 occurrences // PhanPluginDuplicateExpressionBinaryOp : 7 occurrences - // PhanTypeMismatchDimFetchNullable : 7 occurrences - // PhanTypeExpectedObjectPropAccessButGotNull : 6 occurrences + // PhanTypeExpectedObjectPropAccessButGotNull : 5 occurrences + // PhanParamTooMany : 4 occurrences // PhanPluginDuplicateArrayKey : 4 occurrences - // PhanParamTooMany : 3 occurrences - // PhanInvalidFQSENInClasslike : 2 occurrences + // PhanEmptyFQSENInClasslike : 3 occurrences + // PhanInvalidFQSENInClasslike : 3 occurrences // PhanAccessMethodProtected : 1 occurrence - // PhanEmptyFQSENInClasslike : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ @@ -60,7 +60,7 @@ return [ 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], 'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -76,7 +76,6 @@ return [ 'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'], - 'htdocs/barcode/codeinit.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], @@ -90,14 +89,13 @@ return [ 'htdocs/bookcal/availabilities_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/availabilities_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/bookcal/calendar_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'], 'htdocs/categories/edit.php' => ['PhanTypeMismatchDimFetch'], @@ -123,21 +121,20 @@ return [ 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'], - 'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'], - 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/comm/propal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], + 'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'], 'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -158,7 +155,6 @@ return [ 'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/deplacement/card.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/deplacement/class/deplacement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/compta/deplacement/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -208,12 +204,9 @@ return [ 'htdocs/compta/resultat/clientfourn.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], 'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], - 'htdocs/compta/sociales/class/chargesociales.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/sociales/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/compta/sociales/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/sociales/list.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'], @@ -224,13 +217,11 @@ return [ 'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable'], - 'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/compta/tva/class/tva.class.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/tva/document.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/index.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], - 'htdocs/compta/tva/info.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/quadri_detail.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], @@ -240,7 +231,7 @@ return [ 'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'], 'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/contrat/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/contrat/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], @@ -254,15 +245,14 @@ return [ 'htdocs/core/actions_massactions.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'], 'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall'], 'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/core/ajax/fileupload.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/ajax/onlineSign.php' => ['PhanPluginUnknownArrayFunctionParamType'], - 'htdocs/core/ajax/saveinplace.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'], + 'htdocs/core/ajax/saveinplace.php' => ['PhanUndeclaredProperty'], 'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'], - 'htdocs/core/ajax/ziptown.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_actions.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/boxes/box_actions_future.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownPropertyType'], @@ -283,8 +273,7 @@ return [ 'htdocs/core/boxes/box_services_contracts.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'], 'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/cgenericdic.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], @@ -319,32 +308,27 @@ return [ 'htdocs/core/class/html.formaccounting.class.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formcategory.class.php' => ['PhanPluginUnknownArrayMethodParamType'], - 'htdocs/core/class/html.formcompany.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/class/html.formcompany.class.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formldap.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/html.formmail.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/class/html.formmargin.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'], 'htdocs/core/class/html.formprojet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/class/html.formwebsite.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/ldap.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/class/link.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/mastodonhandler.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'], 'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/core/class/reddithandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'], - 'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/socialnetworkmanager.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/core/class/stats.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'], 'htdocs/core/class/timespent.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPossiblyUndeclaredVariable'], - 'htdocs/core/class/validate.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'], - 'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'], - 'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable'], 'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/core/db/Database.interface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/db/mysqli.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray'], @@ -359,7 +343,7 @@ return [ 'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'], 'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'], - 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'], + 'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'], 'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'], @@ -417,7 +401,7 @@ return [ 'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/core/menus/standard/eldy_menu.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], + 'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'], @@ -565,7 +549,7 @@ return [ 'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'], 'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], - 'htdocs/document.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/document.php' => ['PhanRedefineFunction'], 'htdocs/don/admin/donation.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], @@ -589,7 +573,7 @@ return [ 'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_auto.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ecm/index_medias.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], @@ -616,7 +600,6 @@ return [ 'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccessButGotNull'], 'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], 'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], @@ -665,9 +648,8 @@ return [ 'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/holiday/card_group.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'], - 'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'], 'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], + 'htdocs/holiday/view_log.php' => ['PhanTypeMismatchDimFetch'], 'htdocs/hrm/admin/admin_hrm.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/hrm/class/evaluation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/hrm/class/evaluationdet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], @@ -770,7 +752,7 @@ return [ 'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], - 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], + 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], 'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], @@ -873,7 +855,7 @@ return [ 'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], + 'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], @@ -949,10 +931,8 @@ return [ 'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/societe/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/societe/project.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/stripe/admin/stripe.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], 'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], @@ -1021,7 +1001,7 @@ return [ 'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'], 'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'], + 'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'], 'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownPropertyType'], diff --git a/dev/tools/phan/stubs/ovhsms.php b/dev/tools/phan/stubs/ovhsms.php new file mode 100644 index 0000000000000..74d2adecb396f --- /dev/null +++ b/dev/tools/phan/stubs/ovhsms.php @@ -0,0 +1,115 @@ + + */ + +namespace { + /** + * Use an OVH account to send SMS with Dolibarr + */ + class OvhSms extends \CommonObject + { + public $db; + //!< To store db handler + public $error; + //!< To return error code (or message) + public $errors = array(); + //!< To return several error codes (or messages) + public $element = 'ovhsms'; + //!< Id that identify managed object + public $id; + public $account; + public $socid; + public $contact_id; + public $member_id; + public $fk_project; + public $nostop; + public $expe; + public $dest; + public $message; + public $validity; + public $class; + public $deferred; + public $priority; + public $soap; + // Old API + public $conn; + // New API + public $endpoint; + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + } + /** + * Logout + * + * @return void + */ + public function logout() + { + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Send SMS + * + * @return int <=0 if error, >0 if OK + */ + public function SmsSend() + { + } + /** + * Show HTML select box to select account + * + * @return void + */ + public function printListAccount() + { + } + /** + * Return list of SMSAccounts + * + * @return array + */ + public function getSmsListAccount() + { + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Return Credit + * + * @return array + */ + public function CreditLeft() + { + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Return History + * + * @return array + */ + public function SmsHistory() + { + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Return list of possible SMS senders + * + * @return array|int <0 if KO, array with list of available senders if OK + */ + public function SmsSenderList() + { + } + /** + * Call soapDebug method to output traces + * + * @return void + */ + public function soapDebug() + { + } + } +} diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index 7334ec261187b..e45ddb08da2ea 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -140,7 +140,7 @@ $thirdpartystatic->id = $obj->rowid; $nextvalue = $modBarCodeThirdparty->getNextValue($thirdpartystatic, ''); - $result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'THIRDPARTY_MODIFY'); + $result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', null, 'text', '', $user, 'THIRDPARTY_MODIFY'); $nbtry++; if ($result > 0) { @@ -249,7 +249,7 @@ $nextvalue = $modBarCodeProduct->getNextValue($productstatic, ''); //print 'Set value '.$nextvalue.' to product '.$productstatic->id." ".$productstatic->ref." ".$productstatic->type."
    \n"; - $result = $productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY'); + $result = $productstatic->setValueFrom('barcode', $nextvalue, '', null, 'text', '', $user, 'PRODUCT_MODIFY'); $nbtry++; if ($result > 0) { diff --git a/htdocs/bookcal/availabilities_card.php b/htdocs/bookcal/availabilities_card.php index 4cd7fc5dd2fad..512fd618c4482 100644 --- a/htdocs/bookcal/availabilities_card.php +++ b/htdocs/bookcal/availabilities_card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2022 Alice Adminson * Copyright (C) 2024 Frédéric France + * 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 @@ -180,8 +181,8 @@ } - // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen - include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; // Actions when linking object each other include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; @@ -196,7 +197,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOSTINT('projectid')); diff --git a/htdocs/bookcal/calendar_card.php b/htdocs/bookcal/calendar_card.php index 070b0c01ff183..30e3bf7b8e458 100644 --- a/htdocs/bookcal/calendar_card.php +++ b/htdocs/bookcal/calendar_card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2023 Alice Adminson * Copyright (C) 2024 Frédéric France + * 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 @@ -158,7 +159,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOSTINT('projectid')); diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index c988dcef24cea..ad445ce6fe0d5 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1016,7 +1016,7 @@ $line->multicurrency_total_tva = $line->tva_tx * $line->qty * (float) $subprice * $line->multicurrency_subprice / $line->subprice; $line->multicurrency_total_ttc = (1 + $line->tva_tx) * $line->qty * (float) $subprice * $line->multicurrency_subprice / $line->subprice; // Used previous $line->subprice and $line->multicurrency_subprice above, now they can be set to their new values - $line->subprice = $subprice; + $line->subprice = (float) $subprice; $line->multicurrency_subprice = $multicurrency_subprice; } } elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && $usercancreate) { // Add line @@ -1170,7 +1170,7 @@ } } - if ( !$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment + if (!$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment $pu_ht = $prod->multiprices[$object->thirdparty->price_level]; $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 74e2785152a21..1c42c8d3720b2 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -203,7 +203,7 @@ class Commande extends CommonOrder public $date_commande; /** - * @var null|int|'' Date expected of shipment (date of start of shipment, not the reception that occurs some days after) + * @var null|int|'' Expected shipment date (date of start of shipment, not the reception that occurs some days after) */ public $delivery_date; @@ -213,10 +213,14 @@ class Commande extends CommonOrder public $fk_remise_except; /** - * @deprecated + * @var string + * @deprecated See $fk_remise_except */ public $remise_percent; + /** + * @var int + */ public $source; // Order mode. How we received order (by phone, by email, ...) /** @@ -253,13 +257,17 @@ class Commande extends CommonOrder public $lines = array(); - //! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...) + /** + * @var string key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...) + */ public $module_source; - //! key of pos source ('0', '1', ...) + /** + * @var string key of pos source ('0', '1', ...) + */ public $pos_source; /** - * @var array Array with line of all shipments + * @var array Array with lines of all shipments (qty) */ public $expeditions; @@ -1325,7 +1333,7 @@ public function createFromClone(User $user, $socid = 0) /** * Load an object from a proposal and create a new order into database * - * @param Object $object Object source + * @param Propal $object Object source * @param User $user User making creation * @return int Return integer <0 if KO, 0 if nothing done, 1 if OK */ @@ -1506,11 +1514,11 @@ public function createFromProposal($object, User $user) * @param int $fk_fournprice Id supplier price * @param int $pa_ht Buying price (without tax) * @param string $label Label - * @param array $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) - * @param int|null $fk_unit Code of the unit to use. Null to use the default one + * @param array $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...) + * @param ?int $fk_unit Code of the unit to use. Null to use the default one * @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'.... * @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id - * @param double $pu_ht_devise Unit price in currency + * @param float $pu_ht_devise Unit price in currency * @param string $ref_ext line external reference * @param int $noupdateafterinsertline No update after insert of line * @return int >0 if OK, <0 if KO @@ -3116,12 +3124,12 @@ public function classifyUnBilled(User $user, $notrigger = 0) * @param int $pa_ht Price (without tax) of product when it was bought * @param string $label Label * @param int $special_code Special code (also used by externals modules!) - * @param array $array_options extrafields array - * @param int|null $fk_unit Code of the unit to use. Null to use the default one - * @param double $pu_ht_devise Amount in currency + * @param array $array_options extrafields array + * @param ?int $fk_unit Code of the unit to use. Null to use the default one + * @param float $pu_ht_devise Amount in currency * @param int $notrigger disable line update trigger * @param string $ref_ext external reference - * @param integer $rang line rank + * @param int $rang line rank * @return int Return integer < 0 if KO, > 0 if OK */ public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = array(), $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '', $rang = 0) @@ -4132,11 +4140,11 @@ public function getLinesArray() * * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information - * @return int 0 if KO, 1 if OK + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param array $moreparams Array to provide more information + * @return int<0,1> 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { @@ -4235,10 +4243,10 @@ public function showDelay() /** * Set signed status * - * @param User $user Object user that modify - * @param int $status Newsigned status to set (often a constant like self::STATUS_XXX) - * @param int $notrigger 1 = Does not execute triggers, 0 = Execute triggers - * @param string $triggercode Trigger code to use + * @param User $user Object user that modify + * @param int $status Newsigned status to set (often a constant like self::STATUS_XXX) + * @param int<0,1> $notrigger 1 = Does not execute triggers, 0 = Execute triggers + * @param string $triggercode Trigger code to use * @return int 0 < if KO, > 0 if OK */ public function setSignedStatus(User $user, int $status = 0, int $notrigger = 0, $triggercode = ''): int diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index aec781054b422..3fc40eb9b7714 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -831,7 +831,7 @@ } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; $expensereport->ref = $data['ref']; - print $expensereport->getNomUrl(1, 0, 0, '', 0, 0); + print $expensereport->getNomUrl(1, 0, 0, 0, 0, 0); } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 52ef3ce8f2405..773b840b1cd81 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -230,6 +230,7 @@ */ $form = new Form($db); +$proj = null; if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) { $formaccounting = new FormAccounting($db); } @@ -783,7 +784,7 @@ // Project if ($arrayfields['project']['checked']) { print '
    '; - if ($obj->fk_project > 0) { + if ($obj->fk_project > 0 && is_object($proj)) { $proj->fetch($obj->fk_project); print $proj->getNomUrl(1); } diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index cfe75817e6832..de576e65c83d7 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -5,6 +5,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -172,7 +173,7 @@ // Set fields $dated = dol_mktime(GETPOSTINT('datedhour'), GETPOSTINT('datedmin'), GETPOSTINT('datedsec'), GETPOSTINT('datedmonth'), GETPOSTINT('datedday'), GETPOSTINT('datedyear')); $object->fetch($id); - $result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); + $result = $object->setValueFrom('dated', $dated, '', null, 'date', '', $user, 'DEPLACEMENT_MODIFY'); if ($result < 0) { dol_print_error($db, $object->error); } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index e8d5b2af6a7ef..9f4446027a313 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -180,7 +180,7 @@ class Facture extends CommonInvoice */ public $module_source; /** - * @var int key of pos source ('0', '1', ...) + * @var string key of pos source ('0', '1', ...) */ public $pos_source; /** diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 4bebe93f086d4..faa4c2e26d677 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -4,6 +4,7 @@ * Copyright (C) 2016-2018 Frédéric France * Copyright (C) 2017-2022 Alexandre Spangaro * Copyright (C) 2021 Gauthier VERDOL + * 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 @@ -63,7 +64,7 @@ $dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear')); $dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear')); $label = GETPOST('label', 'alpha'); -$actioncode = GETPOST('actioncode'); +$actioncode = GETPOSTINT('actioncode'); $fk_user = GETPOSTINT('userid') > 0 ? GETPOSTINT('userid') : 0; // Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context @@ -138,7 +139,7 @@ } if ($action == 'setlib' && $permissiontoadd) { - $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } @@ -374,7 +375,7 @@ print $langs->trans("Type"); print ''; - $formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode", 'alpha') ? GETPOST("actioncode", 'alpha') : '', 'actioncode', 1); + $formsocialcontrib->select_type_socialcontrib(GETPOST('actioncode', 'alpha') ? GETPOST('actioncode', 'alpha') : '', 'actioncode', 1); print '
    '; print $langs->trans("Type").""; if ($action == 'edit' && $object->getSommePaiement() == 0) { - $formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode", 'alpha') ? GETPOST("actioncode", 'alpha') : $object->type, 'actioncode', 1); + $actionPostValue = GETPOSTINT('actioncode'); + $formsocialcontrib->select_type_socialcontrib($actionPostValue ? $actionPostValue : $object->type, 'actioncode', 1); } else { print $object->type_label; } diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 99169e06a0246..cb464d87482be 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -65,20 +65,43 @@ class ChargeSociales extends CommonObject * @var string label */ public $label; + /** + * @var int + */ public $type; + /** + * @var string + */ public $type_label; + /** + * @var string + */ public $type_code; + /** + * @var string + */ public $type_accountancy_code; + /** + * @var int|string + */ public $amount; + /** + * @var int<0,1> + */ public $paye; /** - * @deprecated + * @deprecated Use $period + * @var int|string */ public $periode; + /** + * @var int|string + */ public $period; /** + * @var string * @deprecated Use label instead */ public $lib; @@ -102,7 +125,13 @@ class ChargeSociales extends CommonObject * @var int ID */ public $mode_reglement_id; + /** + * @var string + */ public $mode_reglement_code; + /** + * @var string + */ public $mode_reglement; /** @@ -301,7 +330,7 @@ public function delete($user) // Get bank transaction lines for this social contributions include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $account = new Account($this->db); - $lines_url = $account->get_url('', $this->id, 'sc'); + $lines_url = $account->get_url(0, $this->id, 'sc'); // Delete bank urls foreach ($lines_url as $line_url) { @@ -520,8 +549,8 @@ public function setUnpaid($user) /** * Retourne le libelle du statut d'une charge (impaye, payee) * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto - * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise) + * @param int<0,6> $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto + * @param float $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function getLibStatut($mode = 0, $alreadypaid = -1) @@ -535,7 +564,7 @@ public function getLibStatut($mode = 0, $alreadypaid = -1) * * @param int $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto - * @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise) + * @param float $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise) * @return string Label */ public function LibStatut($status, $mode = 0, $alreadypaid = -1) @@ -792,7 +821,7 @@ public function getKanbanView($option = '', $arraydata = null) if (property_exists($this, 'label')) { $return .= '  
    '.$this->label.'
    '; } - if (!empty($arraydata['project']) && $arraydata['project']->id > 0) { + if (!empty($arraydata['project']) && $arraydata['project'] instanceof Project && $arraydata['project']->id > 0) { $return .= '
    '.$arraydata['project']->getNomUrl(1).''; } if (property_exists($this, 'date_ech')) { diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 0666335cc4dd7..bf22354189bb4 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -6,6 +6,7 @@ * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador + * 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 @@ -90,7 +91,7 @@ if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/compta/sociales/info.php b/htdocs/compta/sociales/info.php index e6ad49531293a..80c4c9b291a98 100644 --- a/htdocs/compta/sociales/info.php +++ b/htdocs/compta/sociales/info.php @@ -1,5 +1,6 @@ + * 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 @@ -56,7 +57,7 @@ if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index d5687c9f25f5d..03ac361feada0 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -5,6 +5,7 @@ * Copyright (C) 2015-2023 Alexandre Spangaro * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2021 Gauthier VERDOL + * 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 @@ -115,7 +116,7 @@ if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index b9cf49d5dff47..cac5f7898cd03 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -7,6 +7,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2018 Philippe Grand + * 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 @@ -91,7 +92,7 @@ if ($action == 'setlib' && $permissiontoadd) { $object->fetch($id); - $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index 3e02aaa8c0cf7..922c6d6dfd06b 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -1,5 +1,6 @@ + * 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 @@ -49,7 +50,7 @@ if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) { $object->fetch($id); - $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY'); + $result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY'); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index a3a6ba51d34c4..c08400b749ea3 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -896,7 +896,7 @@ if (!empty($socid)) { print '
    '.$langs->trans("ContactByDefaultFor").''; - $contactType = $object->listeTypeContacts('external', '', 1); + $contactType = $object->listeTypeContacts('external', 0, 1); print img_picto('', 'contact', 'class="pictofixedwidth"').$form->multiselectarray('roles', $contactType, array(), 0, 0, '', 0, '90%'); print '
    '; - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories")); + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories")); print "
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'character_set_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("DBSortingCharset").''.$db->getDefaultCollationDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'collation_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); } print '
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'character_set_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("DBSortingCharset").''.$db->getDefaultCollationDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'collation_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); } print '
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'character_set_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET")); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("DBSortingCharset").''.$db->getDefaultCollationDatabase(); +print '
    '.$langs->trans("DBSortingCharset").''; +$defaultcollation = $db->getDefaultCollationDatabase(); +print dolPrintHTML($defaultcollation); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'collation_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); + if ($defaultcollation != $dolibarr_main_db_collation) { + print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$dolibarr_main_db_collation); + } + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION")); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); + + print '       '.$langs->trans("ConvertInto"); + if (!in_array($defaultcollation, array("utf8_unicode_ci"))) { + print '   utf8 unicode'; + } + if (!in_array($defaultcollation, array("utf8_general_ci"))) { + print '   utf8 general'; + } + if (!in_array($defaultcollation, array("utf8mb4_unicode_ci"))) { + print '   utf8mb4 unicode'; + } + if (!in_array($defaultcollation, array("utf8mb4_general_ci"))) { + print '   utf8mb4 general'; + } } print '
    '; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 203d41b805d42..68d2b98cdf58e 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -56,8 +56,17 @@ $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." CHARACTER SET utf8"; // We must not sanitize the $row[1] $db->query($sql); - $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] - $db->query($sql); + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + + $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE ".$db->sanitize($collation); // We must not sanitize the $row[1] + $reslq2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } break; } @@ -77,8 +86,17 @@ $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] $db->query($sql); - $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] - $db->query($sql); + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + + $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE ".$db->sanitize($collation); // We must not sanitize the $row[1] + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } break; } diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 1592aee417fdb..b0776c70842d3 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -106,6 +106,8 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) dol_syslog(get_class($this)."::DoliDBMysqli Connect error: ".$this->error, LOG_ERR); } + $disableforcecharset = 0; // Set to 1 to test without charset forcing + // If server connection is ok, we try to connect to the database if ($this->connected && $name) { if ($this->select_db($name)) { @@ -119,7 +121,6 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) $clientmustbe = 'utf8'; } - $disableforcecharset = 0; // Set to 1 to test without charset forcing if (empty($disableforcecharset) && $this->db->character_set_name() != $clientmustbe) { try { dol_syslog(get_class($this)."::DoliDBMysqli You should set the \$dolibarr_main_db_character_set and \$dolibarr_main_db_collation for the PHP to the same as the database default, so to ".$this->db->character_set_name(). " or upgrade database default to ".$clientmustbe.".", LOG_WARNING); @@ -174,7 +175,7 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) $clientmustbe = 'utf8'; } - if ($this->db->character_set_name() != $clientmustbe) { + if (empty($disableforcecharset) && $this->db->character_set_name() != $clientmustbe) { $this->db->set_charset($clientmustbe); // This set utf8_unicode_ci $collation = $conf->db->dolibarr_main_db_collation; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 43d9dcf422f83..a7272675d7eda 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1347,10 +1347,16 @@ continue; } + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + print '
    '; print $table[0]; $sql1 = "ALTER TABLE ".$db->sanitize($table[0])." ROW_FORMAT=dynamic"; - $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; + $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); print ''; print ''; if ($force_utf8_on_tables == 'confirmed') { @@ -1471,10 +1477,16 @@ continue; } + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + print '
    '; print $table[0]; $sql1 = "ALTER TABLE ".$db->sanitize($table[0])." ROW_FORMAT=dynamic"; - $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; + $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); print ''; print ''; if ($force_utf8mb4_on_tables == 'confirmed') { From 471668b9406957d1cc9ba5a3af907fa53fd188de Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2024 23:11:31 +0200 Subject: [PATCH 183/329] FIX Toolt to convert utf8mb4 --- htdocs/admin/system/database-tables.php | 18 +++++++--- htdocs/admin/system/database.php | 48 +++++++++++++++++++++++-- htdocs/admin/system/dbtable.php | 26 +++++++++++--- htdocs/core/db/mysqli.class.php | 5 +-- htdocs/install/repair.php | 16 +++++++-- 5 files changed, 98 insertions(+), 15 deletions(-) diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index fa7a86480baac..7ea4ba8336bcc 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -52,12 +52,17 @@ $db->query($sql); } if ($action == 'convertutf8') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Set the default value on table + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); // Set the default value on table $resql1 = $db->query($sql); if (!$resql1) { setEventMessages($db->lasterror(), null, 'warnings'); } else { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; // Switch fields (may fails due to foreign key) + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); // Switch fields (may fails due to foreign key) $resql2 = $db->query($sql); if (!$resql2) { setEventMessages($db->lasterror(), null, 'warnings'); @@ -65,12 +70,17 @@ } } if ($action == 'convertutf8mb4') { - $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Set the default value on table + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + $sql = "ALTER TABLE ".$db->sanitize($table)." CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); // Set the default value on table $resql1 = $db->query($sql); if (!$resql1) { setEventMessages($db->lasterror(), null, 'warnings'); } else { - $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; // Switch fields (may fails due to foreign key) + $sql = "ALTER TABLE ".$db->sanitize($table)." CONVERT TO CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); // Switch fields (may fails due to foreign key) $resql2 = $db->query($sql); if (!$resql2) { setEventMessages($db->lasterror(), null, 'warnings'); diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 1c9bb6b2f93af..7d2990f77bebe 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -29,11 +29,34 @@ $langs->load("admin"); +$action = GETPOST('action', 'aZ09'); + if (!$user->admin) { accessforbidden(); } +/* + * Actions + */ + +if ($action == 'convertutf8unicode') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; + $db->query($sql); +} +if ($action == 'convertutf8mb4unicode') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; + $db->query($sql); +} +if ($action == 'convertutf8general') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_general_ci"; + $db->query($sql); +} +if ($action == 'convertutf8mb4general') { // Test on permission already done. + $sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"; + $db->query($sql); +} + /* * View @@ -59,14 +82,33 @@ print '
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'character_set_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW CHARSET")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET")); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("DBSortingCharset").''.$db->getDefaultCollationDatabase(); +print '
    '.$langs->trans("DBSortingCharset").''; +$defaultcollation = $db->getDefaultCollationDatabase(); +print dolPrintHTML($defaultcollation); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "SHOW VARIABLES LIKE 'collation_database'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "SHOW COLLATION")); + if ($defaultcollation != $dolibarr_main_db_collation) { + print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$dolibarr_main_db_collation); + } + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'collation_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW COLLATION")); // We can use $db->getDefaultCollationDatabase(), $db->getListOfCollation(); + + print '       '.$langs->trans("ConvertInto"); + if (!in_array($defaultcollation, array("utf8_unicode_ci"))) { + print '   utf8 unicode'; + } + if (!in_array($defaultcollation, array("utf8_general_ci"))) { + print '   utf8 general'; + } + if (!in_array($defaultcollation, array("utf8mb4_unicode_ci"))) { + print '   utf8mb4 unicode'; + } + if (!in_array($defaultcollation, array("utf8mb4_general_ci"))) { + print '   utf8mb4 general'; + } } print '
    '; diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 95e738c250c3d..8167f1e6db97d 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -55,8 +55,17 @@ $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." CHARACTER SET utf8"; // We must not sanitize the $row[1] $db->query($sql); - $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1] - $db->query($sql); + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + + $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE ".$db->sanitize($collation); // We must not sanitize the $row[1] + $reslq2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } break; } @@ -76,8 +85,17 @@ $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." CHARACTER SET utf8mb4"; // We must not sanitize the $row[1] $db->query($sql); - $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1] - $db->query($sql); + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + + $sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE ".$db->sanitize($collation); // We must not sanitize the $row[1] + $resql2 = $db->query($sql); + if (!$resql2) { + setEventMessages($db->lasterror(), null, 'warnings'); + } break; } diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 7931374eb70cd..45d60332fdff3 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -105,6 +105,8 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) dol_syslog(get_class($this)."::DoliDBMysqli Connect error: ".$this->error, LOG_ERR); } + $disableforcecharset = 0; // Set to 1 to test without charset forcing + // If server connection is ok, we try to connect to the database if ($this->connected && $name) { if ($this->select_db($name)) { @@ -118,7 +120,6 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) $clientmustbe = 'utf8'; } - $disableforcecharset = 0; // Set to 1 to test without charset forcing if (empty($disableforcecharset) && $this->db->character_set_name() != $clientmustbe) { try { dol_syslog(get_class($this)."::DoliDBMysqli You should set the \$dolibarr_main_db_character_set and \$dolibarr_main_db_collation for the PHP to the same as the database default, so to ".$this->db->character_set_name(). " or upgrade database default to ".$clientmustbe.".", LOG_WARNING); @@ -173,7 +174,7 @@ public function __construct($type, $host, $user, $pass, $name = '', $port = 0) $clientmustbe = 'utf8'; } - if ($this->db->character_set_name() != $clientmustbe) { + if (empty($disableforcecharset) && $this->db->character_set_name() != $clientmustbe) { $this->db->set_charset($clientmustbe); // This set utf8_unicode_ci $collation = $conf->db->dolibarr_main_db_collation; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 9294990860ce8..20b6a9572bc1f 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1347,10 +1347,16 @@ continue; } + $collation = 'utf8_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8_general_ci'; + } + print '
    '; print $table[0]; $sql1 = "ALTER TABLE ".$db->sanitize($table[0])." ROW_FORMAT=dynamic"; - $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci"; + $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8 COLLATE ".$db->sanitize($collation); print ''; print ''; if ($force_utf8_on_tables == 'confirmed') { @@ -1471,10 +1477,16 @@ continue; } + $collation = 'utf8mb4_unicode_ci'; + $defaultcollation = $db->getDefaultCollationDatabase(); + if (preg_match('/general/', $defaultcollation)) { + $collation = 'utf8mb4_general_ci'; + } + print '
    '; print $table[0]; $sql1 = "ALTER TABLE ".$db->sanitize($table[0])." ROW_FORMAT=dynamic"; - $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; + $sql2 = "ALTER TABLE ".$db->sanitize($table[0])." CONVERT TO CHARACTER SET utf8mb4 COLLATE ".$db->sanitize($collation); print ''; print ''; if ($force_utf8mb4_on_tables == 'confirmed') { From 0cb9fbc39abbb0f03bd13a899719741edf4d40a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 01:06:53 +0200 Subject: [PATCH 184/329] CSS --- htdocs/societe/paymentmodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index b8e4af6b264e8..4ab780cfabfd3 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1739,7 +1739,7 @@ // Show online signature link if (!getDolGlobalInt('SOCIETE_DISABLE_BANKACCOUNT') && getDolGlobalInt("SOCIETE_RIB_ALLOW_ONLINESIGN")) { - print ''; + print ''; $useonlinesignature = 1; if ($useonlinesignature) { require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; From f57b4f26b4e30a0c6c2f0d3133dee52ecc12e6ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 03:41:55 +0200 Subject: [PATCH 185/329] Look and feel v21 --- htdocs/admin/system/about.php | 29 +++++++++++++------ htdocs/core/class/html.form.class.php | 5 ++-- htdocs/main.inc.php | 2 +- htdocs/societe/card.php | 12 ++++++-- htdocs/theme/eldy/global.inc.php | 40 +++++++++++++++++++++------ 5 files changed, 64 insertions(+), 24 deletions(-) diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index a09ae2a044fff..0f540e144e730 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -58,27 +58,30 @@ print load_fiche_titre($langs->trans("ExternalResources"), '', 'title_setup'); -print '
    '.img_picto_common('', 'dolibarr_box.png', 'height="120"').'
    '; - - print '
    '; +print '
    '; +print '
    '.img_picto_common('', 'dolibarr_box.png', 'height="100"').'
    '; print $langs->trans("DolibarrLicense").' : '; print ''; +print'
    '; //print "
    \n"; +print '
    '; print $langs->trans("Developpers").':'; print ''; +print '
    '; //print "
    \n"; +print '
    '; print $langs->trans("OtherInformations").':'; print ''; +print '
    '; +print '
    '; print $langs->trans("Demo").':'; print ''; +print '
    '; +print '
    '; print $langs->trans("ModulesMarketPlaces").':'; print ''; - +print '
    '; print '
    '; - +print '
    '; print $langs->trans("HelpCenter").':'; print ''; +print '
    '; - +print '
    '; print $langs->trans("Foundation").':'; print ''; +print '
    '; +print '
    '; print $langs->trans("SocialNetworks").':'; print ''; +print '
    '; - +print '
    '; print $langs->trans("OtherResources").':'; print '
      '; @@ -191,6 +201,7 @@ print ''; print '
    '; +print '
    '; print '
    '; print '
    '; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c1d2f0ebe5b86..a7c4484da8511 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1125,6 +1125,7 @@ public function select_incoterms($selected = '', $location_incoterms = '', $page } } $out .= ''; + $out .= ajax_combobox($htmlname); if ($conf->use_javascript_ajax && empty($disableautocomplete)) { $out .= ajax_multiautocompleter('location_incoterms', array(), DOL_URL_ROOT . '/core/ajax/locationincoterms.php') . "\n"; @@ -8893,7 +8894,7 @@ public static function selectArrayAjax($htmlname, $url, $id = '', $moreparam = ' cache: true }, language: select2arrayoflanguage, - containerCssClass: \':all:\', /* Line to add class of origin SELECT propagated to the new tag */ placeholder: "' . dol_escape_js($placeholder) . '", escapeMarkup: function (markup) { return markup; }, // let our custom formatter work minimumInputLength: ' . ((int) $minimumInputLength) . ', @@ -8983,7 +8984,7 @@ public static function selectArrayFilter($htmlname, $array, $id = '', $moreparam $(".' . $htmlname . '").select2({ data: data, language: select2arrayoflanguage, - containerCssClass: \':all:\', /* Line to add class of origin SELECT propagated to the new tag */ placeholder: "' . dol_escape_js($placeholder) . '", escapeMarkup: function (markup) { return markup; }, // let our custom formatter work minimumInputLength: ' . $minimumInputLength . ', diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 79de2f1c0a389..0996eae15bc02 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -3362,7 +3362,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ //$textsearch = $langs->trans("Search"); $textsearch = ''.$langs->trans("Search"); - $searchform .= $form->selectArrayFilter('searchselectcombo', $arrayresult, $selected, 'accesskey="s"', 1, 0, (!getDolGlobalString('MAIN_SEARCHBOX_CONTENT_LOADED_BEFORE_KEY') ? 1 : 0), 'vmenusearchselectcombo', 1, $textsearch, 1, $stringforfirstkey.' s'); + $searchform .= $form->selectArrayFilter('searchselectcombo', $arrayresult, $selected, 'accesskey="s"', 1, 0, (getDolGlobalString('MAIN_SEARCHBOX_CONTENT_LOADED_BEFORE_KEY') ? 0 : 1), 'vmenusearchselectcombo', 1, $textsearch, 1, $stringforfirstkey.' s'); } else { if (is_array($arrayresult)) { // @phan-suppress-next-line PhanEmptyForeach // array is really empty in else case. diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 955f702668130..ec4f64e8905a8 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1692,7 +1692,7 @@ function manageprospectcustomer(element) { } print '
    '; - print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOSTINT("no_email") : getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS')), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2)); + print $form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOSTINT("no_email") : getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS')), 1, false, (getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 ? 1 : 0), 1); print '
    '.$form->editfieldkey('Capital', 'capital', '', $object, 0).' '; if (isModEnabled("multicurrency")) { - print ''.$langs->trans("Currency".$object->multicurrency_code).'
    '.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).''."\n"; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 40b62833cd29c..b5cbeb764436f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3499,7 +3499,7 @@ .vmenu { width: px; - margin-left: 6px; + margin-left: 8px; display: none; @@ -3593,10 +3593,23 @@ { margin: 0 0 8px 2px; } -.vmenu div.blockvmenusearch -{ - padding-bottom: 13px; +.vmenu div.blockvmenusearch { + margin-top: 5px; + margin-bottom: 15px; +} +/* +.vmenu div.blockvmenusearch { + border: 1px solid #888; + padding-top: 8px; + padding-bottom: 8px; + padding-left: 0; + padding-right: 0; + border-radius: 6px; + box-sizing: border-box; + margin-left: 3px; + margin-left: 3px; } +*/ .vmenu div.blockvmenuend { padding-bottom: 5px; @@ -5446,7 +5459,11 @@ border: 1px solid #e0e0e0; border-radius: 6px; } - +.ui-dialog { + padding-left: 10px; + padding-right: 10px; + padding-top: 10px; +} /* ============================================================================== */ /* For content of image preview */ @@ -6910,7 +6927,7 @@ .select2-dropdown { /*background-color: var(--colorbackvmenu1); border: 1px solid var(--colorbackvmenu1); */ - box-shadow: 1px 2px 10px var(--colorbackvmenu1); + box-shadow: 1px 2px 10px #8884; background-color: var(--colorbackbody); color: var(--colortext); } @@ -7078,9 +7095,14 @@ cursor: text; overflow: hidden; } - -ul.select2-results__options li { - font-size: 0.95em; +.select2-results__option { + padding: 8px; +} +span.select2-dropdown--below { + margin-top: -1px; +} +span.select2-dropdown--above { + margin-bottom: -1px; } .parentonrightofpage { From 764c97765ae85c650c0de3b7ae7193d12d9fd19b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 03:43:27 +0200 Subject: [PATCH 186/329] css --- htdocs/admin/system/about.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 0f540e144e730..a9f36965ca13a 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -65,7 +65,7 @@ print '
    '.img_picto_common('', 'dolibarr_box.png', 'height="100"').'
    '; print $langs->trans("DolibarrLicense").' : '; print ''; print''; From d10f69226fc405a4818024000393dbe06dea196e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 1 Oct 2024 10:08:16 +0200 Subject: [PATCH 187/329] Fix phpunit --- htdocs/admin/system/database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 7d2990f77bebe..e5056cfd561a8 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -82,7 +82,7 @@ print '
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$conf->db->name."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET")); + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET")); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("Password").''.preg_replace('/./i', '*', $dolibarr_main_db_pass).'
    '.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase(); if ($db->type == 'mysqli') { - print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'").'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET")); + $tooltipexample = "
    SHOW VARIABLES LIKE 'character_set_database' (cached)
    You can avoid cache effect with:
    SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'"; + print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", $tooltipexample.'
    '.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "
    SHOW CHARSET"))); // We can use $db->getDefaultCharacterSetDatabase(), $db->getListOfCharacterSet(), } print '
    '.$langs->trans("AGENDA_USE_EVENT_TYPE_DEFAULT").' '."\n"; - $formactions->select_type_actions(getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT'), "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1); + print $formactions->select_type_actions(getDolGlobalString('AGENDA_USE_EVENT_TYPE_DEFAULT'), "AGENDA_USE_EVENT_TYPE_DEFAULT", 'systemauto', 0, 1, 0, 1, 'minwidth300', 1); print '
    '.$langs->trans("ResourceFormLabel_ref").'
    '.$langs->trans("ResourceType").''; + $formresource->select_types_resource($object->fk_code_type_resource, 'fk_code_type_resource', '', 2, 0, 0, 0, 1, 'minwidth200'); + print '
    '.$langs->trans("Description").''; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('description', ($description ?: $object->description), '', '200', 'dolibarr_notes', false); + $doleditor->Create(); + print '
    '.$form->editfieldkey('Address', 'address', '', $object, 0).''; print $form->widgetForTranslation("address", $object, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent'); print '
    '.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).''; - print $formresource->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); + print $formresource->select_ziptown(GETPOSTISSET('zipcode') ? GETPOST('zipcode') : $object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); print '
    '.$form->editfieldkey('Town', 'town', '', $object, 0).''; - print $formresource->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); + print $formresource->select_ziptown(GETPOSTISSET('town') ? GETPOST('town') : $object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); print '
    '.$langs->trans("CountryOrigin").''; - print $form->select_country($object->country_id); + print $form->select_country(GETPOSTISSET('country_id') ? GETPOSTINT('country_id') : $object->country_id, 'country_id'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print '
    '.$form->editfieldkey('Region-State', 'state_id', '', $object, 0).''; } else { print '
    '.$form->editfieldkey('State', 'state_id', '', $object, 0).''; } - if ($object->country_id) { + if ($country_id > 0) { print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formresource->select_state($object->state_id, $object->country_code); + print $formresource->select_state($countryid, $country_id); } else { - print $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; + print ''.$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; } print '
    '.$langs->trans("ResourceType").''; - $formresource->select_types_resource($object->fk_code_type_resource, 'fk_code_type_resource', '', 2); - print '
    '.$langs->trans("Description").''; - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('description', ($description ?: $object->description), '', '200', 'dolibarr_notes', false); - $doleditor->Create(); - print '
    '.$form->editfieldkey('Phone', 'phone', '', $object, 0).''; @@ -327,7 +341,7 @@ print '
    '.$form->editfieldkey('MaxUsers', 'max_users', '', $object, 0).''; print img_picto('', 'object_user', 'class="pictofixedwidth"'); - print '
    '.$langs->trans("URLOfServiceForAuthorization").''; @@ -413,7 +415,7 @@ // TODO Move this into token generation ? if ($supported) { - if ($keyforsupportedoauth2array == 'OAUTH_OTHER_NAME') { + if ($keyforsupportedoauth2array == 'OAUTH_GENERIC_NAME') { print '
    '.$langs->trans("Scopes").''; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index fdd7f86e0b383..1d80659c1765d 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -179,8 +179,9 @@ $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - - $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); + $nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'])); + $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); + $OAUTH_SERVICENAME = $nameofservice; $shortscope = ''; if (getDolGlobalString($key[4])) { diff --git a/htdocs/core/lib/oauth.lib.php b/htdocs/core/lib/oauth.lib.php index 0131a05d32c5b..31c9c9a45e9ec 100644 --- a/htdocs/core/lib/oauth.lib.php +++ b/htdocs/core/lib/oauth.lib.php @@ -33,238 +33,238 @@ function getAllOauth2Array() { $list = array( - array( - 'OAUTH_AMAZON_NAME', - 'OAUTH_AMAZON_ID', - 'OAUTH_AMAZON_SECRET', - ), - array( - 'OAUTH_BITBUCKET_NAME', - 'OAUTH_BITBUCKET_ID', - 'OAUTH_BITBUCKET_SECRET', - ), - array( - 'OAUTH_BITLY_NAME', - 'OAUTH_BITLY_ID', - 'OAUTH_BITLY_SECRET', - ), - array( - 'OAUTH_BITRIX24_NAME', - 'OAUTH_BITRIX24_ID', - 'OAUTH_BITRIX24_SECRET', - ), - array( - 'OAUTH_BOX_NAME', - 'OAUTH_BOX_ID', - 'OAUTH_BOX_SECRET', - ), - array( - 'OAUTH_BUFFER_NAME', - 'OAUTH_BUFFER_ID', - 'OAUTH_BUFFER_SECRET', - ), - array( - 'OAUTH_DAILYMOTION_NAME', - 'OAUTH_DAILYMOTION_ID', - 'OAUTH_DAILYMOTION_SECRET', - ), - array( - 'OAUTH_DEVIANTART_NAME', - 'OAUTH_DEVIANTART_ID', - 'OAUTH_DEVIANTART_SECRET', - ), - array( - 'OAUTH_DROPBOX_NAME', - 'OAUTH_DROPBOX_ID', - 'OAUTH_DROPBOX_SECRET', - ), - array( - 'OAUTH_ETSY_NAME', - 'OAUTH_ETSY_ID', - 'OAUTH_ETSY_SECRET', - ), - array( - 'OAUTH_EVEONLINE_NAME', - 'OAUTH_EVEONLINE_ID', - 'OAUTH_EVEONLINE_SECRET', - ), - array( - 'OAUTH_FACEBOOK_NAME', - 'OAUTH_FACEBOOK_ID', - 'OAUTH_FACEBOOK_SECRET', - ), - array( - 'OAUTH_FITBIT_NAME', - 'OAUTH_FITBIT_ID', - 'OAUTH_FITBIT_SECRET', - ), - array( - 'OAUTH_FIVEHUNDREDPX_NAME', - 'OAUTH_FIVEHUNDREDPX_ID', - 'OAUTH_FIVEHUNDREDPX_SECRET', - ), - array( - 'OAUTH_FLICKR_NAME', - 'OAUTH_FLICKR_ID', - 'OAUTH_FLICKR_SECRET', - ), - array( - 'OAUTH_FOURSQUARE_NAME', - 'OAUTH_FOURSQUARE_ID', - 'OAUTH_FOURSQUARE_SECRET', - ), - array( - 'OAUTH_GITHUB_NAME', - 'OAUTH_GITHUB_ID', - 'OAUTH_GITHUB_SECRET', - 'OAUTH_GITHUB_DESC', - ), - array( - 'OAUTH_GOOGLE_NAME', - 'OAUTH_GOOGLE_ID', - 'OAUTH_GOOGLE_SECRET', - 'OAUTH_GOOGLE_DESC', - ), - array( - 'OAUTH_HUBIC_NAME', - 'OAUTH_HUBIC_ID', - 'OAUTH_HUBIC_SECRET', - ), - array( - 'OAUTH_INSTAGRAM_NAME', - 'OAUTH_INSTAGRAM_ID', - 'OAUTH_INSTAGRAM_SECRET', - ), - array( - 'OAUTH_LINKEDIN_NAME', - 'OAUTH_LINKEDIN_ID', - 'OAUTH_LINKEDIN_SECRET', - ), - array( - 'OAUTH_MAILCHIMP_NAME', - 'OAUTH_MAILCHIMP_ID', - 'OAUTH_MAILCHIMP_SECRET', - ), - array( - 'OAUTH_MICROSOFT_NAME', - 'OAUTH_MICROSOFT_ID', - 'OAUTH_MICROSOFT_SECRET', - ), - array( - 'OAUTH_MICROSOFT2_NAME', - 'OAUTH_MICROSOFT2_ID', - 'OAUTH_MICROSOFT2_SECRET', - ), - array( - 'OAUTH_NEST_NAME', - 'OAUTH_NEST_ID', - 'OAUTH_NEST_SECRET', - ), - array( - 'OAUTH_NETATMO_NAME', - 'OAUTH_NETATMO_ID', - 'OAUTH_NETATMO_SECRET', - ), - array( - 'OAUTH_PARROTFLOWERPOWER_NAME', - 'OAUTH_PARROTFLOWERPOWER_ID', - 'OAUTH_PARROTFLOWERPOWER_SECRET', - ), - array( - 'OAUTH_PAYPAL_NAME', - 'OAUTH_PAYPAL_ID', - 'OAUTH_PAYPAL_SECRET', - ), - array( - 'OAUTH_POCKET_NAME', - 'OAUTH_POCKET_ID', - 'OAUTH_POCKET_SECRET', - ), - array( - 'OAUTH_QUICKBOOKS_NAME', - 'OAUTH_QUICKBOOKS_ID', - 'OAUTH_QUICKBOOKS_SECRET', - ), - array( - 'OAUTH_REDDIT_NAME', - 'OAUTH_REDDIT_ID', - 'OAUTH_REDDIT_SECRET', - ), - array( - 'OAUTH_REDMINE_NAME', - 'OAUTH_REDMINE_ID', - 'OAUTH_REDMINE_SECRET', - ), - array( - 'OAUTH_RUNKEEPER_NAME', - 'OAUTH_RUNKEEPER_ID', - 'OAUTH_RUNKEEPER_SECRET', - ), - array( - 'OAUTH_SCOOPIT_NAME', - 'OAUTH_SCOOPIT_ID', - 'OAUTH_SCOOPIT_SECRET', - ), - array( - 'OAUTH_SOUNDCLOUD_NAME', - 'OAUTH_SOUNDCLOUD_ID', - 'OAUTH_SOUNDCLOUD_SECRET', - ), - array( - 'OAUTH_SPOTIFY_NAME', - 'OAUTH_SPOTIFY_ID', - 'OAUTH_SPOTIFY_SECRET', - ), - array( - 'OAUTH_STRAVA_NAME', - 'OAUTH_STRAVA_ID', - 'OAUTH_STRAVA_SECRET', - ), - array( - 'OAUTH_STRIPE_TEST_NAME', - 'OAUTH_STRIPE_TEST_ID', - 'STRIPE_TEST_SECRET_KEY', - ), - array( - 'OAUTH_STRIPE_LIVE_NAME', - 'OAUTH_STRIPE_LIVE_ID', - 'STRIPE_LIVE_SECRET_KEY', - ), - array( - 'OAUTH_TUMBLR_NAME', - 'OAUTH_TUMBLR_ID', - 'OAUTH_TUMBLR_SECRET', - ), - array( - 'OAUTH_TWITTER_NAME', - 'OAUTH_TWITTER_ID', - 'OAUTH_TWITTER_SECRET', - ), - array( - 'OAUTH_USTREAM_NAME', - 'OAUTH_USTREAM_ID', - 'OAUTH_USTREAM_SECRET', - ), - array( - 'OAUTH_VIMEO_NAME', - 'OAUTH_VIMEO_ID', - 'OAUTH_VIMEO_SECRET', - ), - array( - 'OAUTH_YAHOO_NAME', - 'OAUTH_YAHOO_ID', - 'OAUTH_YAHOO_SECRET', - ), - array( - 'OAUTH_YAMMER_NAME', - 'OAUTH_YAMMER_ID', - 'OAUTH_YAMMER_SECRET', - ), - array( - 'OAUTH_OTHER_NAME', - 'OAUTH_OTHER_ID', - 'OAUTH_OTHER_SECRET', - ) + array( + 'OAUTH_AMAZON_NAME', + 'OAUTH_AMAZON_ID', + 'OAUTH_AMAZON_SECRET', + ), + array( + 'OAUTH_BITBUCKET_NAME', + 'OAUTH_BITBUCKET_ID', + 'OAUTH_BITBUCKET_SECRET', + ), + array( + 'OAUTH_BITLY_NAME', + 'OAUTH_BITLY_ID', + 'OAUTH_BITLY_SECRET', + ), + array( + 'OAUTH_BITRIX24_NAME', + 'OAUTH_BITRIX24_ID', + 'OAUTH_BITRIX24_SECRET', + ), + array( + 'OAUTH_BOX_NAME', + 'OAUTH_BOX_ID', + 'OAUTH_BOX_SECRET', + ), + array( + 'OAUTH_BUFFER_NAME', + 'OAUTH_BUFFER_ID', + 'OAUTH_BUFFER_SECRET', + ), + array( + 'OAUTH_DAILYMOTION_NAME', + 'OAUTH_DAILYMOTION_ID', + 'OAUTH_DAILYMOTION_SECRET', + ), + array( + 'OAUTH_DEVIANTART_NAME', + 'OAUTH_DEVIANTART_ID', + 'OAUTH_DEVIANTART_SECRET', + ), + array( + 'OAUTH_DROPBOX_NAME', + 'OAUTH_DROPBOX_ID', + 'OAUTH_DROPBOX_SECRET', + ), + array( + 'OAUTH_ETSY_NAME', + 'OAUTH_ETSY_ID', + 'OAUTH_ETSY_SECRET', + ), + array( + 'OAUTH_EVEONLINE_NAME', + 'OAUTH_EVEONLINE_ID', + 'OAUTH_EVEONLINE_SECRET', + ), + array( + 'OAUTH_FACEBOOK_NAME', + 'OAUTH_FACEBOOK_ID', + 'OAUTH_FACEBOOK_SECRET', + ), + array( + 'OAUTH_FITBIT_NAME', + 'OAUTH_FITBIT_ID', + 'OAUTH_FITBIT_SECRET', + ), + array( + 'OAUTH_FIVEHUNDREDPX_NAME', + 'OAUTH_FIVEHUNDREDPX_ID', + 'OAUTH_FIVEHUNDREDPX_SECRET', + ), + array( + 'OAUTH_FLICKR_NAME', + 'OAUTH_FLICKR_ID', + 'OAUTH_FLICKR_SECRET', + ), + array( + 'OAUTH_FOURSQUARE_NAME', + 'OAUTH_FOURSQUARE_ID', + 'OAUTH_FOURSQUARE_SECRET', + ), + array( + 'OAUTH_GITHUB_NAME', + 'OAUTH_GITHUB_ID', + 'OAUTH_GITHUB_SECRET', + 'OAUTH_GITHUB_DESC', + ), + array( + 'OAUTH_GOOGLE_NAME', + 'OAUTH_GOOGLE_ID', + 'OAUTH_GOOGLE_SECRET', + 'OAUTH_GOOGLE_DESC', + ), + array( + 'OAUTH_HUBIC_NAME', + 'OAUTH_HUBIC_ID', + 'OAUTH_HUBIC_SECRET', + ), + array( + 'OAUTH_INSTAGRAM_NAME', + 'OAUTH_INSTAGRAM_ID', + 'OAUTH_INSTAGRAM_SECRET', + ), + array( + 'OAUTH_LINKEDIN_NAME', + 'OAUTH_LINKEDIN_ID', + 'OAUTH_LINKEDIN_SECRET', + ), + array( + 'OAUTH_MAILCHIMP_NAME', + 'OAUTH_MAILCHIMP_ID', + 'OAUTH_MAILCHIMP_SECRET', + ), + array( + 'OAUTH_MICROSOFT_NAME', + 'OAUTH_MICROSOFT_ID', + 'OAUTH_MICROSOFT_SECRET', + ), + array( + 'OAUTH_MICROSOFT2_NAME', + 'OAUTH_MICROSOFT2_ID', + 'OAUTH_MICROSOFT2_SECRET', + ), + array( + 'OAUTH_NEST_NAME', + 'OAUTH_NEST_ID', + 'OAUTH_NEST_SECRET', + ), + array( + 'OAUTH_NETATMO_NAME', + 'OAUTH_NETATMO_ID', + 'OAUTH_NETATMO_SECRET', + ), + array( + 'OAUTH_PARROTFLOWERPOWER_NAME', + 'OAUTH_PARROTFLOWERPOWER_ID', + 'OAUTH_PARROTFLOWERPOWER_SECRET', + ), + array( + 'OAUTH_PAYPAL_NAME', + 'OAUTH_PAYPAL_ID', + 'OAUTH_PAYPAL_SECRET', + ), + array( + 'OAUTH_POCKET_NAME', + 'OAUTH_POCKET_ID', + 'OAUTH_POCKET_SECRET', + ), + array( + 'OAUTH_QUICKBOOKS_NAME', + 'OAUTH_QUICKBOOKS_ID', + 'OAUTH_QUICKBOOKS_SECRET', + ), + array( + 'OAUTH_REDDIT_NAME', + 'OAUTH_REDDIT_ID', + 'OAUTH_REDDIT_SECRET', + ), + array( + 'OAUTH_REDMINE_NAME', + 'OAUTH_REDMINE_ID', + 'OAUTH_REDMINE_SECRET', + ), + array( + 'OAUTH_RUNKEEPER_NAME', + 'OAUTH_RUNKEEPER_ID', + 'OAUTH_RUNKEEPER_SECRET', + ), + array( + 'OAUTH_SCOOPIT_NAME', + 'OAUTH_SCOOPIT_ID', + 'OAUTH_SCOOPIT_SECRET', + ), + array( + 'OAUTH_SOUNDCLOUD_NAME', + 'OAUTH_SOUNDCLOUD_ID', + 'OAUTH_SOUNDCLOUD_SECRET', + ), + array( + 'OAUTH_SPOTIFY_NAME', + 'OAUTH_SPOTIFY_ID', + 'OAUTH_SPOTIFY_SECRET', + ), + array( + 'OAUTH_STRAVA_NAME', + 'OAUTH_STRAVA_ID', + 'OAUTH_STRAVA_SECRET', + ), + array( + 'OAUTH_STRIPETEST_NAME', + 'OAUTH_STRIPETEST_ID', + 'OAUTH_STRIPETEST_SECRET_KEY', + ), + array( + 'OAUTH_STRIPELIVE_NAME', + 'OAUTH_STRIPELIVE_ID', + 'OAUTH_STRIPELIVE_SECRET_KEY', + ), + array( + 'OAUTH_TUMBLR_NAME', + 'OAUTH_TUMBLR_ID', + 'OAUTH_TUMBLR_SECRET', + ), + array( + 'OAUTH_TWITTER_NAME', + 'OAUTH_TWITTER_ID', + 'OAUTH_TWITTER_SECRET', + ), + array( + 'OAUTH_USTREAM_NAME', + 'OAUTH_USTREAM_ID', + 'OAUTH_USTREAM_SECRET', + ), + array( + 'OAUTH_VIMEO_NAME', + 'OAUTH_VIMEO_ID', + 'OAUTH_VIMEO_SECRET', + ), + array( + 'OAUTH_YAHOO_NAME', + 'OAUTH_YAHOO_ID', + 'OAUTH_YAHOO_SECRET', + ), + array( + 'OAUTH_YAMMER_NAME', + 'OAUTH_YAMMER_ID', + 'OAUTH_YAMMER_SECRET', + ), + array( + 'OAUTH_GENERIC_NAME', + 'OAUTH_GENERIC_ID', + 'OAUTH_GENERIC_SECRET', + ) ); return $list; @@ -291,7 +291,7 @@ function getSupportedOauth2Array() ), ); if (isModEnabled('stripe')) { - $supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array( + $supportedoauth2array['OAUTH_STRIPETEST_NAME'] = array( 'callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', @@ -300,7 +300,7 @@ function getSupportedOauth2Array() 'availablescopes' => 'read_write', 'returnurl' => '/core/modules/oauth/stripetest_oauthcallback.php' ); - $supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array( + $supportedoauth2array['OAUTH_STRIPELIVE_NAME'] = array( 'callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', @@ -341,10 +341,10 @@ function getSupportedOauth2Array() 'returnurl' => '/core/modules/oauth/microsoft_oauthcallback.php' ); if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { - $supportedoauth2array['OAUTH_OTHER_NAME'] = array( + $supportedoauth2array['OAUTH_GENERIC_NAME'] = array( 'callbackfile' => 'generic', 'picto' => 'generic', - 'urlforapp' => 'OAUTH_OTHER_DESC', + 'urlforapp' => 'OAUTH_GENERIC_DESC', 'name' => 'Other', 'urlforcredentials' => '', 'availablescopes' => 'Standard', diff --git a/htdocs/core/modules/oauth/generic_oauthcallback.php b/htdocs/core/modules/oauth/generic_oauthcallback.php index b2c75f381b4f9..c8bf1951f4ca7 100644 --- a/htdocs/core/modules/oauth/generic_oauthcallback.php +++ b/htdocs/core/modules/oauth/generic_oauthcallback.php @@ -40,7 +40,7 @@ if (empty($keyforprovider) && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) { $keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"]; } -$genericstring = 'OTHER'; +$genericstring = 'GENERIC'; /** @@ -138,7 +138,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); // This was a callback request from service, get the token try { diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index 23f9be9272411..07153e9de326e 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -118,7 +118,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); // This was a callback request from service, get the token try { diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 2b6d484c51ace..7e9288af27e15 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -219,7 +219,7 @@ exit(); } else { // We are coming from the return of an OAuth2 provider page. - dol_syslog("We are coming from the oauth provider page keyforprovider=".$keyforprovider." code=".dol_trunc(GETPOST('code'), 5)); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page keyforprovider=".$keyforprovider." code=".dol_trunc(GETPOST('code'), 5)); // We must validate that the $state is the same than the one into $_SESSION['oauthstateanticsrf'], return error if not. if (isset($_SESSION['oauthstateanticsrf']) && $state != $_SESSION['oauthstateanticsrf']) { diff --git a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php index 6ee6ca64430ca..fc5090364bee6 100644 --- a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/modules/oauth/microsoft_oauthcallback.php + * \file htdocs/core/modules/oauth/microsoft2_oauthcallback.php * \ingroup oauth * \brief Page to get oauth callback */ @@ -49,7 +49,7 @@ $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); -$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/microsoft_oauthcallback.php'); +$currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/microsoft2_oauthcallback.php'); /** @@ -94,7 +94,8 @@ // $requestedpermissionsarray contains list of scopes. // Conversion into URL is done by Reflection on constant with name SCOPE_scope_in_uppercase try { - $apiService = $serviceFactory->createService(ucfirst(strtolower($genericstring)), $credentials, $storage, $requestedpermissionsarray); + $nameofservice = ucfirst(strtolower($genericstring)); + $apiService = $serviceFactory->createService($nameofservice, $credentials, $storage, $requestedpermissionsarray); } catch (Exception $e) { print $e->getMessage(); exit; @@ -122,6 +123,9 @@ if (!getDolGlobalString($keyforparamsecret)) { accessforbidden('Setup of service is not complete. Secret key is missing'); } +if (!getDolGlobalString($keyforparamtenant)) { + accessforbidden('Setup of service is not complete. Tenant/Annuary ID key is missing'); +} /* @@ -148,7 +152,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); // This was a callback request from service, get the token try { diff --git a/htdocs/core/modules/oauth/microsoft_oauthcallback.php b/htdocs/core/modules/oauth/microsoft_oauthcallback.php index c8cd593bf078c..53df4f9653a6e 100644 --- a/htdocs/core/modules/oauth/microsoft_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft_oauthcallback.php @@ -42,7 +42,6 @@ } $genericstring = 'MICROSOFT'; - /** * Create a new instance of the URI class with the current URI, stripping the query string */ @@ -94,7 +93,8 @@ // $requestedpermissionsarray contains list of scopes. // Conversion into URL is done by Reflection on constant with name SCOPE_scope_in_uppercase try { - $apiService = $serviceFactory->createService(ucfirst(strtolower($genericstring)), $credentials, $storage, $requestedpermissionsarray); + $nameofservice = ucfirst(strtolower($genericstring)); + $apiService = $serviceFactory->createService($nameofservice, $credentials, $storage, $requestedpermissionsarray); } catch (Exception $e) { print $e->getMessage(); exit; @@ -122,6 +122,9 @@ if (!getDolGlobalString($keyforparamsecret)) { accessforbidden('Setup of service is not complete. Secret key is missing'); } +if (!getDolGlobalString($keyforparamtenant)) { + accessforbidden('Setup of service is not complete. Tenant/Annuary ID key is missing'); +} /* @@ -148,7 +151,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)." error=".GETPOST('error')); // This was a callback request from service, get the token try { diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index 3fde132ea258f..f8cf42ab46ad5 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -67,8 +67,8 @@ $storage = new DoliStorage($db, $conf, $keyforprovider); // Setup the credentials for the requests -$keyforparamid = 'OAUTH_STRIPE_LIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; -$keyforparamsecret = 'OAUTH_STRIPE_LIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; +$keyforparamid = 'OAUTH_STRIPELIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_STRIPELIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( getDolGlobalString($keyforparamid), getDolGlobalString($keyforparamsecret), @@ -128,7 +128,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); // This was a callback request from service, get the token try { diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index a9f50b95fc4fd..6189de2e25547 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -67,8 +67,8 @@ $storage = new DoliStorage($db, $conf, $keyforprovider); // Setup the credentials for the requests -$keyforparamid = 'OAUTH_STRIPE_TEST'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; -$keyforparamsecret = 'OAUTH_STRIPE_TEST'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; +$keyforparamid = 'OAUTH_STRIPETEST'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_STRIPETEST'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( getDolGlobalString($keyforparamid), getDolGlobalString($keyforparamsecret), @@ -124,7 +124,7 @@ // We should have //$_GET=array('code' => string 'aaaaaaaaaaaaaa' (length=20), 'state' => string 'user,public_repo' (length=16)) - dol_syslog("We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); + dol_syslog(basename(__FILE__)." We are coming from the oauth provider page code=".dol_trunc(GETPOST('code'), 5)); // This was a callback request from service, get the token try { From 4361da7e2ba914afd15dc2008f1694fa886bea32 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 11:04:04 +0200 Subject: [PATCH 205/329] Fix responsive --- htdocs/admin/system/dbtable.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index 8167f1e6db97d..890dc36cd4396 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -21,7 +21,7 @@ /** * \file htdocs/admin/system/dbtable.php - * \brief Page d'info des contraintes d'une table + * \brief Page with information about a database table */ // Load Dolibarr environment @@ -153,6 +153,7 @@ } } + print '
    '; print ''; print ''; print ''; @@ -231,13 +232,14 @@ print ""; - print ''; - print ''; + print ''; + print ''; print ''; $i++; } } print '
    '.$langs->trans("Fields").'".(isset($link[$row[0]][0]) ? $link[$row[0]][0] : '')."."; print(isset($link[$row[0]][1]) ? $link[$row[0]][1] : '')."
    '; + print '
    '; } } From d25dfc961d1491a99cb2abaa255e4919a2e71cf5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 11:29:52 +0200 Subject: [PATCH 206/329] Simplify tooltip for syntax website --- htdocs/langs/en_US/website.lang | 5 +++-- htdocs/website/index.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 1213f426afe20..25a049843ee93 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -63,9 +63,10 @@ YouCanCreatePageOrImportTemplate=You can create a new page or import a full webs SyntaxHelp=Help on specific syntax tips YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor. YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>
    You can also make a redirection with GET parameters:
    <?php redirectToContainer('alias_of_container_to_redirect_to', '', 0, 0, $array_of_get_params); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    You can dynamically set the page title and SEO meta tags (title, keywords, description). Simply define the following variables:
    $__PAGE__TITLE__ = "Title value …";
    $__PAGE__KEYWORDS__ = "keyword1, keyword2, keyword3 …"; // Comma separated
    $__PAGE__DESC__ = "Description …";


    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">
    -YouCanEditHtmlSource1=
    To include an image stored into the documents directory, use the viewimage.php wrapper.
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    +YouCanEditHtmlSource1=
    To include an image stored into the medias directory (directory open for public access), use the relative path starting with /medias, example:
    <img src="/medias/image/myimagepath/filename.ext">
    +YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), use the wrapper:
    <img src="/viewimage.php?hashp=12345679012...">
    YouCanEditHtmlSource3=To get the URL of the image of a PHP object, use
    <img src="<?php print getImagePublicURLOfObject($object, 1, "_small") ?>">
    +YouCanEditHtmlSource4=To get the URL of an image inside a html content of an article, use
    <img src="<?php print getImageFromHtmlContent($htmlcontent, 1) ?>">
    YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation.
    ClonePage=Clone page/container CloneSite=Clone site diff --git a/htdocs/website/index.php b/htdocs/website/index.php index a9d30c1778103..a05c0d079830e 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3721,6 +3721,7 @@ function switchEditorOnline(forceenable) $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource1", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource2", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource3", $url); + $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource4", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSourceMore", $url); $htmltext .= '
    '; $htmltext .= ''; @@ -4656,6 +4657,7 @@ function switchEditorOnline(forceenable) $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource1", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource2", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource3", $url); + $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSource4", $url); $htmltext .= $langs->transnoentitiesnoconv("YouCanEditHtmlSourceMore", $url); $htmltext .= '
    '; $htmltext .= ''; From 7f8a0860cf2e19e014e7ffcc5d3b9c98ce0772f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 12:16:46 +0200 Subject: [PATCH 207/329] Fix error --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0ac5ea25bb04b..31297c84a9a80 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13497,7 +13497,7 @@ function jsonOrUnserialize($stringtodecode) /** * forgeSQLFromUniversalSearchCriteria * - * @param string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with + * @param ?string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with * aaa is a field name (with alias or not) and * bbb is one of this operator '=', '<', '>', '<=', '>=', '!=', 'in', 'notin', 'like', 'notlike', 'is', 'isnot'. * ccc must not contains ( or ) @@ -13514,7 +13514,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if ($filter === '') { + if (is_null($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with () From 9c98e3816ac9c20aabbddefbafa43eb5710e3518 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 12:18:55 +0200 Subject: [PATCH 208/329] Fix error --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 31297c84a9a80..89c9e6f1f2c76 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13514,7 +13514,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if (is_null($filter) || $filter === '') { + if (is_null($filter) || is_array($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with () From 8bdd3fe3cdc5acb8c196653244af07c37b9651dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 12:16:46 +0200 Subject: [PATCH 209/329] Fix error --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 360cbb05edfcb..3760620da52e0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13319,7 +13319,7 @@ function jsonOrUnserialize($stringtodecode) /** * forgeSQLFromUniversalSearchCriteria * - * @param string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with + * @param ?string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with * aaa is a field name (with alias or not) and * bbb is one of this operator '=', '<', '>', '<=', '>=', '!=', 'in', 'notin', 'like', 'notlike', 'is', 'isnot'. * ccc must not contains ( or ) @@ -13336,7 +13336,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if ($filter === '') { + if (is_null($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with () From b5730db759609e5187be808f88d790c01ed349e1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 12:18:55 +0200 Subject: [PATCH 210/329] Fix error --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3760620da52e0..0173a56863988 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13336,7 +13336,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if (is_null($filter) || $filter === '') { + if (is_null($filter) || is_array($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with () From 11ea0ad9fdfaa04b69c00ffc3462c07bdc1d4cc0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 15:15:52 +0200 Subject: [PATCH 211/329] Fix fatal error with bad parameters --- htdocs/core/lib/functions.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0173a56863988..69f97d0d929b0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13319,7 +13319,7 @@ function jsonOrUnserialize($stringtodecode) /** * forgeSQLFromUniversalSearchCriteria * - * @param ?string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with + * @param string $filter String with universal search string. Must be '(aaa:bbb:ccc) OR (ddd:eeee:fff) ...' with * aaa is a field name (with alias or not) and * bbb is one of this operator '=', '<', '>', '<=', '>=', '!=', 'in', 'notin', 'like', 'notlike', 'is', 'isnot'. * ccc must not contains ( or ) @@ -13336,7 +13336,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$errorstr = '', $noand = { global $db, $user; - if (is_null($filter) || is_array($filter) || $filter === '') { + if (is_null($filter) || !is_string($filter) || $filter === '') { return ''; } if (!preg_match('/^\(.*\)$/', $filter)) { // If $filter does not start and end with () From c5eb24e65619c265c02f72d8205b2e46d62401ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 16:14:22 +0200 Subject: [PATCH 212/329] Trans --- htdocs/langs/en_US/recruitment.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 04919e2a1b29f..389aa94c5329e 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -64,3 +64,4 @@ NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature Recruitment=Recruitment +NoOpenJobOpen=No open job offers at the moment From 03c974df6b03bf177634310eaacea3b608d5fbaa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 16:15:18 +0200 Subject: [PATCH 213/329] trans --- htdocs/langs/en_US/recruitment.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 389aa94c5329e..047455d5e2b95 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -64,4 +64,4 @@ NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature Recruitment=Recruitment -NoOpenJobOpen=No open job offers at the moment +NoOpenJobOffer=No open job offers at the moment From ae7902c6ba6c51f19cc518c9c4d39b14272bbad1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 18:19:45 +0200 Subject: [PATCH 214/329] Add hidden option CONTRACT_HIDE_MYCOMPANY_SIGNATURE_SECTION_PDF --- .../contract/doc/pdf_strato.modules.php | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 194f8846b4862..10bc3ed2ecbb7 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -548,6 +548,7 @@ protected function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $ /** * Show footer signature of page + * * @param TCPDF $pdf Object PDF * @param int $tab_top tab height position * @param int $tab_height tab height @@ -560,17 +561,21 @@ protected function tabSignature(&$pdf, $tab_top, $tab_height, $outputlangs) $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite) / 2); $posy = $tab_top + $tab_height + 3 + 3; - $pdf->SetXY($this->marge_gauche, $posy); - $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name), 0, 'L', 0); + if (!getDolGlobalString('CONTRACT_HIDE_MYCOMPANY_SIGNATURE_SECTION_PDF')) { + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name), 0, 'L', 0); - $pdf->SetXY($this->marge_gauche, $posy + 5); - $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1); + $pdf->SetXY($this->marge_gauche, $posy + 5); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1); + } - $pdf->SetXY($posmiddle + 5, $posy); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name), 0, 'L', 0); + if (!getDolGlobalString('CONTRACT_HIDE_THIRPARTY_SIGNATURE_SECTION_PDF')) { + $pdf->SetXY($posmiddle + 5, $posy); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name), 0, 'L', 0); - $pdf->SetXY($posmiddle + 5, $posy + 5); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 20, '', 1); + $pdf->SetXY($posmiddle + 5, $posy + 5); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $posmiddle - 5, 20, '', 1); + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore From 294cab04be420c62b477e632f0d08d62d91eea48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 19:46:02 +0200 Subject: [PATCH 215/329] Track event BILL_SUPPLIER_CREATE in agenda --- ...terface_50_modAgenda_ActionsAuto.class.php | 17 ++++++++++++++ .../mysql/data/llx_c_action_trigger.sql | 23 ++++++++++--------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 4a2a8f9880ffa..81c3cb34a376d 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -924,6 +924,23 @@ public function runTrigger($action, $object, User $user, Translate $langs, Conf $object->actionmsg = $langs->transnoentities("SupplierOrderClassifiedBilled", $object->ref); } + $object->sendtoid = array(); + } elseif ($action == 'BILL_SUPPLIER_CREATE') { + '@phan-var-force FactureFournisseur $object'; + // Load translation files required by the page + $langs->loadLangs(array("agenda", "other", "orders")); + + if (empty($object->actionmsg2)) { + if (empty($object->context['actionmsg2'])) { + $object->actionmsg2 = $langs->transnoentities("InvoiceCreatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + } else { + $object->actionmsg2 = $object->context['actionmsg2']; + } + } + if (empty($object->actionmsg)) { + $object->actionmsg = $langs->transnoentities("InvoiceCreatedInDolibarr", ($object->newref ? $object->newref : $object->ref)); + } + $object->sendtoid = array(); } elseif ($action == 'BILL_SUPPLIER_VALIDATE') { // Load translation files required by the page diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index a6c2b504489e5..4b7ae6aff699f 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -70,17 +70,18 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_SIGNED','Price request closed signed','Executed when a customer proposal is closed signed','proposal_supplier',10); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_CLOSE_REFUSED','Price request closed refused','Executed when a customer proposal is closed refused','proposal_supplier',10); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('PROPOSAL_SUPPLIER_DELETE','Price request deleted','Executed when a customer proposal delete','proposal_supplier',10); ---insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CREATE','Supplier order created','Executed when a supplier order is created','order_supplier',11); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Supplier order validated','Executed when a supplier order is validated','order_supplier',12); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_APPROVE','Supplier order request approved','Executed when a supplier order is approved','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_MODIFY','Supplier order request modified','Executed when a supplier order is modified','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SUBMIT','Supplier order request submited','Executed when a supplier order is approved','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_RECEIVE','Supplier order request received','Executed when a supplier order is received','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_REFUSE','Supplier order request refused','Executed when a supplier order is refused','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CANCEL','Supplier order request canceled','Executed when a supplier order is canceled','order_supplier',13); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Supplier order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CLASSIFY_BILLED','Supplier order set billed','Executed when a supplier order is set as billed','order_supplier',14); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_DELETE','Supplier order deleted','Executed when a supplier order is deleted','order_supplier',14); +--insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CREATE','Purchase order created','Executed when a supplier order is created','order_supplier',11); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_VALIDATE','Purchase order validated','Executed when a supplier order is validated','order_supplier',12); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_APPROVE','Purchase order request approved','Executed when a supplier order is approved','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_MODIFY','Purchase order request modified','Executed when a supplier order is modified','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SUBMIT','Purchase order request submited','Executed when a supplier order is approved','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_RECEIVE','Purchase order request received','Executed when a supplier order is received','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_REFUSE','Purchase order request refused','Executed when a supplier order is refused','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CANCEL','Purchase order request canceled','Executed when a supplier order is canceled','order_supplier',13); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_SENTBYMAIL','Purchase order sent by mail','Executed when a supplier order is sent by mail','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_CLASSIFY_BILLED','Purchase order set billed','Executed when a supplier order is set as billed','order_supplier',14); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('ORDER_SUPPLIER_DELETE','Purchase order deleted','Executed when a supplier order is deleted','order_supplier',14); +--insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_CREATE','Supplier invoice created','Executed when a supplier invoice is created','order_supplier',11); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_VALIDATE','Supplier invoice validated','Executed when a supplier invoice is validated','invoice_supplier',15); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_MODIFY','Supplier invoice modified','Executed when a supplier invoice is modified','invoice_supplier',15); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BILL_SUPPLIER_UNVALIDATE','Supplier invoice unvalidated','Executed when a supplier invoice status is set back to draft','invoice_supplier',15); From 8c1b3aa53c14d372e2175ce6dd266b08056a43ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 21:00:17 +0200 Subject: [PATCH 216/329] CSS --- htdocs/theme/eldy/global.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index b5cbeb764436f..733dac47b4cdd 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2267,7 +2267,7 @@ float: ; } .classforhorizontalscrolloftabs #id-right { - width: calc(100% - px); + width: calc(100% - px); display: inline-block; } From 50d26131243ce071bef55581cb52ffa6da3173a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Oct 2024 21:23:06 +0200 Subject: [PATCH 217/329] Fix use of OAUTH for SMTP use with Microsoft --- htdocs/admin/emailcollector_card.php | 8 +++++++- htdocs/core/class/CMailFile.class.php | 19 +++++++++++-------- .../class/emailcollector.class.php | 11 ++++++----- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index fdc44b83b7ae2..8da0fed486f9b 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -416,7 +416,13 @@ $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); + if (!empty($supportedoauth2array)) { + $nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'])); + $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); + $OAUTH_SERVICENAME = $nameofservice; + } else { + $OAUTH_SERVICENAME = 'Unknown'; + } require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; //$debugtext = "Host: ".$this->host."
    Port: ".$this->port."
    Login: ".$this->login."
    Password: ".$this->password."
    access type: ".$this->acces_type."
    oauth service: ".$this->oauth_service."
    Max email per collect: ".$this->maxemailpercollect; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 9b72013965f2f..913a76c48b6e7 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1074,7 +1074,9 @@ public function sendfile() $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; if (!empty($supportedoauth2array)) { - $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); + $nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'])); + $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); + $OAUTH_SERVICENAME = $nameofservice; } else { $OAUTH_SERVICENAME = 'Unknown'; } @@ -1211,10 +1213,10 @@ public function sendfile() $this->transport = new Swift_SmtpTransport($server, getDolGlobalString($keyforsmtpport), $secure); if (!empty($conf->global->$keyforsmtpid)) { - $this->transport->setUsername($conf->global->$keyforsmtpid); + $this->transport->setUsername(getDolGlobalString($keyforsmtpid)); } if (!empty($conf->global->$keyforsmtppw) && getDolGlobalString($keyforsmtpauthtype) != "XOAUTH2") { - $this->transport->setPassword($conf->global->$keyforsmtppw); + $this->transport->setPassword(getDolGlobalString($keyforsmtppw)); } if (getDolGlobalString($keyforsmtpauthtype) === "XOAUTH2") { require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php'; @@ -1230,11 +1232,12 @@ public function sendfile() $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - $OAUTH_SERVICENAME = 'Unknown'; - if (array_key_exists($keyforsupportedoauth2array, $supportedoauth2array) - && array_key_exists('name', $supportedoauth2array[$keyforsupportedoauth2array]) - && !empty($supportedoauth2array[$keyforsupportedoauth2array]['name'])) { - $OAUTH_SERVICENAME = $supportedoauth2array[$keyforsupportedoauth2array]['name'].(!empty($keyforprovider) ? '-'.$keyforprovider : ''); + if (!empty($supportedoauth2array)) { + $nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'])); + $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); + $OAUTH_SERVICENAME = $nameofservice; + } else { + $OAUTH_SERVICENAME = 'Unknown'; } require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index e33a09c68f146..69c07ea8ec3c9 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1147,11 +1147,12 @@ public function doCollectOneCollector($mode = 0) $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - $OAUTH_SERVICENAME = 'Unknown'; - if (array_key_exists($keyforsupportedoauth2array, $supportedoauth2array) - && array_key_exists('name', $supportedoauth2array[$keyforsupportedoauth2array]) - && !empty($supportedoauth2array[$keyforsupportedoauth2array]['name'])) { - $OAUTH_SERVICENAME = $supportedoauth2array[$keyforsupportedoauth2array]['name'].(!empty($keyforprovider) ? '-'.$keyforprovider : ''); + if (!empty($supportedoauth2array)) { + $nameofservice = ucfirst(strtolower(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile'])); + $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); + $OAUTH_SERVICENAME = $nameofservice; + } else { + $OAUTH_SERVICENAME = 'Unknown'; } require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; From b37773cf947a75488e0f75605a2a94d96b2bbc17 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 00:05:33 +0200 Subject: [PATCH 218/329] Fix mutitenant MS oauth --- htdocs/core/lib/oauth.lib.php | 2 +- htdocs/core/modules/oauth/microsoft2_oauthcallback.php | 9 ++++++--- htdocs/core/modules/oauth/microsoft_oauthcallback.php | 7 ++++--- htdocs/includes/OAuth/Common/Storage/DoliStorage.php | 6 ++++-- htdocs/includes/OAuth/OAuth2/Service/Microsoft2.php | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/oauth.lib.php b/htdocs/core/lib/oauth.lib.php index 31c9c9a45e9ec..009db50596b52 100644 --- a/htdocs/core/lib/oauth.lib.php +++ b/htdocs/core/lib/oauth.lib.php @@ -338,7 +338,7 @@ function getSupportedOauth2Array() 'urlforcredentials' => 'https://portal.azure.com/', // User.Read is a microsoftgraph scope, if it's not working, do not select it 'availablescopes' => 'openid,offline_access,profile,email,User.Read,https://outlook.office.com/.default', - 'returnurl' => '/core/modules/oauth/microsoft_oauthcallback.php' + 'returnurl' => '/core/modules/oauth/microsoft2_oauthcallback.php' ); if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) { $supportedoauth2array['OAUTH_GENERIC_NAME'] = array( diff --git a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php index fc5090364bee6..4692c3af7c6f4 100644 --- a/htdocs/core/modules/oauth/microsoft2_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft2_oauthcallback.php @@ -49,6 +49,7 @@ $uriFactory = new \OAuth\Common\Http\Uri\UriFactory(); //$currentUri = $uriFactory->createFromSuperGlobalArray($_SERVER); //$currentUri->setQuery(''); + $currentUri = $uriFactory->createFromAbsolute($urlwithroot.'/core/modules/oauth/microsoft2_oauthcallback.php'); @@ -64,19 +65,21 @@ //$httpClient->setCurlParameters($params); $serviceFactory->setHttpClient($httpClient); -// Dolibarr storage -$storage = new DoliStorage($db, $conf, $keyforprovider); - // Setup the credentials for the requests $keyforparamid = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; $keyforparamsecret = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $keyforparamtenant = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + +// Dolibarr storage +$storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); + $credentials = new Credentials( getDolGlobalString($keyforparamid), getDolGlobalString($keyforparamsecret), $currentUri->getAbsoluteUri() ); + $state = GETPOST('state'); $requestedpermissionsarray = array(); diff --git a/htdocs/core/modules/oauth/microsoft_oauthcallback.php b/htdocs/core/modules/oauth/microsoft_oauthcallback.php index 53df4f9653a6e..551d4dc63e74c 100644 --- a/htdocs/core/modules/oauth/microsoft_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft_oauthcallback.php @@ -63,13 +63,14 @@ //$httpClient->setCurlParameters($params); $serviceFactory->setHttpClient($httpClient); -// Dolibarr storage -$storage = new DoliStorage($db, $conf, $keyforprovider); - // Setup the credentials for the requests $keyforparamid = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; $keyforparamsecret = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $keyforparamtenant = 'OAUTH_'.$genericstring.($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + +// Dolibarr storage +$storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); + $credentials = new Credentials( getDolGlobalString($keyforparamid), getDolGlobalString($keyforparamsecret), diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 070a5d2b92a14..d3de6d2028033 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -71,8 +71,9 @@ class DoliStorage implements TokenStorageInterface * @param DoliDB $db Database handler * @param \Conf $conf Conf object * @param string $keyforprovider Key to manage several providers of the same type. For example 'abc' will be added to 'Google' to defined storage key. + * @param string $tenant Value of tenant if used */ - public function __construct(DoliDB $db, \Conf $conf, $keyforprovider = '') + public function __construct(DoliDB $db, \Conf $conf, $keyforprovider = '', $tenant = '') { $this->db = $db; $this->conf = $conf; @@ -80,6 +81,7 @@ public function __construct(DoliDB $db, \Conf $conf, $keyforprovider = '') $this->token = ''; $this->tokens = array(); $this->states = array(); + $this->tenant = $tenant; //$this->key = $key; //$this->stateKey = $stateKey; } @@ -381,7 +383,7 @@ public function getTenant() { // Set/Reset tenant now so it will be defined for. // TODO We must store it into the table llx_oauth_token - $this->tenant = getDolGlobalString('OAUTH_MICROSOFT'.($this->keyforprovider ? '-'.$this->keyforprovider : '').'_TENANT'); + //$this->tenant = getDolGlobalString('OAUTH_MICROSOFT'.($this->keyforprovider ? '-'.$this->keyforprovider : '').'_TENANT'); return $this->tenant; } diff --git a/htdocs/includes/OAuth/OAuth2/Service/Microsoft2.php b/htdocs/includes/OAuth/OAuth2/Service/Microsoft2.php index 727cd05b8427a..83149fc639a8b 100644 --- a/htdocs/includes/OAuth/OAuth2/Service/Microsoft2.php +++ b/htdocs/includes/OAuth/OAuth2/Service/Microsoft2.php @@ -10,7 +10,7 @@ use OAuth\Common\Storage\TokenStorageInterface; use OAuth\Common\Http\Uri\UriInterface; -class Microsoft extends AbstractService +class Microsoft2 extends AbstractService { const SCOPE_BASIC = 'basic'; const SCOPE_OFFLINE_ACCESS = 'offline_access'; From fb6601e0dad125e951adee17647c27780db985d7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 00:05:59 +0200 Subject: [PATCH 219/329] better error message --- htdocs/core/class/smtps.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 898cdd2a212ae..bda4da73c57ed 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -652,7 +652,7 @@ private function _server_authenticate() $this->_setErr(130, 'Invalid Authentication Credentials.'); } } else { - $this->_setErr(126, '"'.$host.'" does not support authenticated connections or temporary error. Error after sending EHLO '.$hosth.' : '.$this->lastretval); + $this->_setErr(126, '"'.$host.'" refused the EHLO command. Error after sending EHLO '.$hosth.' : '.$this->lastretval); } return $_retVal; From 72eb80e03a02820a000943324f7b6b80f1efaa12 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 00:36:09 +0200 Subject: [PATCH 220/329] css --- htdocs/theme/eldy/global.inc.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 733dac47b4cdd..9fbf10b000b9d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5460,9 +5460,10 @@ border-radius: 6px; } .ui-dialog { - padding-left: 10px; - padding-right: 10px; - padding-top: 10px; + padding-left: 5px; + padding-right: 5px; + padding-top: 5px; + padding-top: 5px; } /* ============================================================================== */ From 52616db1b7cf70ac41e57c21e128806348933ab4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 01:06:44 +0200 Subject: [PATCH 221/329] Fix mutitenant MS oauth refresh --- htdocs/admin/emailcollector_card.php | 4 +++- htdocs/admin/oauthlogintokens.php | 4 +++- htdocs/core/class/CMailFile.class.php | 8 ++++++-- htdocs/emailcollector/class/emailcollector.class.php | 4 +++- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 8da0fed486f9b..e5bf314225909 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -424,13 +424,15 @@ $OAUTH_SERVICENAME = 'Unknown'; } + $keyforparamtenant = 'OAUTH_'.strtoupper(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']).($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; //$debugtext = "Host: ".$this->host."
    Port: ".$this->port."
    Login: ".$this->login."
    Password: ".$this->password."
    access type: ".$this->acces_type."
    oauth service: ".$this->oauth_service."
    Max email per collect: ".$this->maxemailpercollect; //dol_syslog($debugtext); $token = ''; - $storage = new DoliStorage($db, $conf, $keyforprovider); + $storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 1d80659c1765d..08f98cebad58f 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -183,6 +183,8 @@ $nameofservice .= ($keyforprovider ? '-'.$keyforprovider : ''); $OAUTH_SERVICENAME = $nameofservice; + $keyforparamtenant = 'OAUTH_'.strtoupper(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']).($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + $shortscope = ''; if (getDolGlobalString($key[4])) { $shortscope = getDolGlobalString($key[4]); @@ -227,7 +229,7 @@ // Token require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; // Dolibarr storage - $storage = new DoliStorage($db, $conf, $keyforprovider); + $storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); try { // $OAUTH_SERVICENAME is for example 'Google-keyforprovider' print ''."\n"; diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 913a76c48b6e7..a9df71408486e 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1081,9 +1081,11 @@ public function sendfile() $OAUTH_SERVICENAME = 'Unknown'; } + $keyforparamtenant = 'OAUTH_'.strtoupper(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']).($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; - $storage = new DoliStorage($db, $conf, $keyforprovider); + $storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); @@ -1240,9 +1242,11 @@ public function sendfile() $OAUTH_SERVICENAME = 'Unknown'; } + $keyforparamtenant = 'OAUTH_'.strtoupper(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']).($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; - $storage = new DoliStorage($db, $conf, $keyforprovider); + $storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 69c07ea8ec3c9..493c7e7434d8e 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1155,13 +1155,15 @@ public function doCollectOneCollector($mode = 0) $OAUTH_SERVICENAME = 'Unknown'; } + $keyforparamtenant = 'OAUTH_'.strtoupper(empty($supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['callbackfile']).($keyforprovider ? '-'.$keyforprovider : '').'_TENANT'; + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; //$debugtext = "Host: ".$this->host."
    Port: ".$this->port."
    Login: ".$this->login."
    Password: ".$this->password."
    access type: ".$this->acces_type."
    oauth service: ".$this->oauth_service."
    Max email per collect: ".$this->maxemailpercollect; //dol_syslog($debugtext); $token = ''; - $storage = new DoliStorage($db, $conf, $keyforprovider); + $storage = new DoliStorage($db, $conf, $keyforprovider, getDolGlobalString($keyforparamtenant)); try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); From b4014e83a9daf703bf028eb91a36d2e6c96717da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 01:48:19 +0200 Subject: [PATCH 222/329] Add a test tool to test smtp with oauth2 token --- test/other/test_smtp_oauth2.py | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 test/other/test_smtp_oauth2.py diff --git a/test/other/test_smtp_oauth2.py b/test/other/test_smtp_oauth2.py new file mode 100755 index 0000000000000..3a1e00826562d --- /dev/null +++ b/test/other/test_smtp_oauth2.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python3 +import smtplib +import base64 + +# Information connection +smtp_server = "smtp.office365.com" +smtp_port = 587 +access_token = "tokenhere" +email_from = "emailfrom@domain.com" +email_to = "test@example.com" +subject = "Test Email" +body = "This is a test email sent using OAuth2 and Office365." + +# Prepare the token for authentication +auth_string = f"user={email_from}\1auth=Bearer {access_token}\1\1" +auth_string = base64.b64encode(auth_string.encode()).decode() + +# Create connection SMTP +server = smtplib.SMTP(smtp_server, smtp_port) +server.ehlo() +server.starttls() +server.ehlo() + +try: + print (auth_string) + response = server.docmd("AUTH", "XOAUTH2 " + auth_string) + + # Check authentication + if response[0] != 235: + raise Exception(f"Authentication fails : {response[1].decode()}") + +except Exception as e: + print (f"Error : {e}") + +finally: + server.quit() From 22944a24402e8045360c143bf30ff799d721cd69 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 02:56:34 +0200 Subject: [PATCH 223/329] Code comment --- htdocs/core/modules/oauth/microsoft_oauthcallback.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/oauth/microsoft_oauthcallback.php b/htdocs/core/modules/oauth/microsoft_oauthcallback.php index 551d4dc63e74c..486f401938a4b 100644 --- a/htdocs/core/modules/oauth/microsoft_oauthcallback.php +++ b/htdocs/core/modules/oauth/microsoft_oauthcallback.php @@ -169,7 +169,7 @@ // Microsoft is a service that does not need state to be stored as second parameter of requestAccessToken //print $token->getAccessToken().'

    '; - //print $token->getExtraParams()['id_token'].'
    '; + //print $token->getExtraParams()['id_token'].'

    '; //print $token->getRefreshToken().'
    ';exit; setEventMessages($langs->trans('NewTokenStored'), null, 'mesgs'); // Stored into object managed by class DoliStorage so into table oauth_token From 388107172be02750d10f5dcf421c66870b8a2d8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 10:47:12 +0200 Subject: [PATCH 224/329] CSS --- htdocs/theme/eldy/global.inc.php | 12 ++++++++++++ htdocs/theme/md/style.css.php | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 9fbf10b000b9d..216ff9b608681 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1003,12 +1003,24 @@ .nopaddingright { padding-: 0; } +.nopaddingtop { + padding-top: 0; +} +.nopaddingbottom { + padding-bottom: 0; +} .nopaddingleftimp { padding-: 0 !important; } .nopaddingrightimp { padding-: 0 !important; } +.nopaddingtopimp { + padding-top: 0 !important; +} +.nopaddingbottomimp { + padding-bottom: 0 !important; +} .paddingleft { padding-: 4px; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index b7508b8ab9f92..fc5c7ab6f0949 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1225,12 +1225,24 @@ .nopaddingright { padding-: 0; } +.nopaddingtop { + padding-top: 0; +} +.nopaddingbottom { + padding-bottom: 0; +} .nopaddingleftimp { padding-: 0 !important; } .nopaddingrightimp { padding-: 0 !important; } +.nopaddingtopimp { + padding-top: 0 !important; +} +.nopaddingbottomimp { + padding-bottom: 0 !important; +} .paddingleft { padding-: 4px; } From ee11342fb41aedd1ca4810a0141152b911f55387 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Oct 2024 10:52:55 +0200 Subject: [PATCH 225/329] css --- htdocs/core/class/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a7c4484da8511..022742e7e0fef 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -254,7 +254,7 @@ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofda } $editmode = ($editaction == 'edit' . $htmlname); if ($editmode) { // edit mode - $ret .= "\n"; + $ret .= "\n"; $ret .= ''; $ret .= ''; $ret .= ''; @@ -332,11 +332,11 @@ public function editfieldval($text, $htmlname, $value, $object, $perm, $typeofda $ret .= '
    '; } //else $ret.='
    '; - $ret .= ''; + $ret .= ''; if (preg_match('/ckeditor|textarea/', $typeofdata) && empty($notabletag)) { $ret .= '
    ' . "\n"; } - $ret .= ''; + $ret .= ''; if (empty($notabletag)) { $ret .= '
    '; + print '
    '.$form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0).''; @@ -2414,7 +2419,7 @@ function manageprospectcustomer(element) { print '
    '.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).''; print img_picto('', 'barcode', 'class="pictofixedwidth"'); - print ''; + print ''; print '
    '.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).''; print img_picto('', 'globe-americas', 'class="pictofixedwidth"'); - print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx'); + print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth200 maxwidth400 widthcentpercentminusx'); if ($user->admin) { print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } @@ -2464,7 +2469,7 @@ function manageprospectcustomer(element) { } print img_picto('', 'state', 'class="pictofixedwidth"'); - print $formcompany->select_state($object->state_id, $object->country_code); + print $formcompany->select_state($object->state_id, $object->country_code, 'state_id', 'minwidth200 maxwidth400 widthcentpercentminusx'); print '
    '.$langs->trans("showInputBorder").''; - print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1); - print '
    ' . $langs->trans("WeekStartOnDay") . ''; - print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0); + print $formother->select_dayofweek(getDolGlobalString('MAIN_START_WEEK', '1'), 'MAIN_START_WEEK', 0); print '
    ' . $langs->trans("DefaultWorkingDays") . ''; - print ''; + print ''; print '
    ' . $langs->trans("DefaultWorkingHours") . ''; - print ''; + print ''; print '
    ' . $langs->trans("FirstnameNamePosition") . ''; $array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname")); - print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0)); + print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, getDolGlobalInt('MAIN_FIRSTNAME_NAME_POSITION', 0)); print '
    '; print $form->textwithpicto($langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")), $langs->trans("ShowBugTrackLinkDesc")); print ''; - print ''; + print ''; print '
    '; - $doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); + $doleditor = new DolEditor('main_motd', getDolGlobalString('MAIN_MOTD'), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%'); $doleditor->Create(); - print '
    ' . $langs->trans('BoxstatsDisableGlobal') . ''; - print ajax_constantonoff("MAIN_DISABLE_GLOBAL_BOXSTATS", array(), $conf->entity, 0, 0, 1, 0); - print '
    '; print ''; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 2593cfbb8cb36..47874f4516d23 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -166,7 +166,12 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $ //$out.= ''; @@ -204,6 +209,7 @@ public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $ $htmlencode_force = preg_match('/_encoded$/', $this->toolbarname) ? 'true' : 'false'; $out .= ''."\n"; + //$out .= ''; $out .= ''."\n"; + print ''."\n"; } } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e4f78fde20e7a..401fe67e13cc5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5476,7 +5476,7 @@ padding-left: 5px; padding-right: 5px; padding-top: 5px; - padding-top: 5px; + padding-bottom: 5px; } /* ============================================================================== */ From 4a7ad31f8505e84bd53c7356a1dcd4e5ef4109a0 Mon Sep 17 00:00:00 2001 From: Mohamed DAOUD Date: Fri, 4 Oct 2024 18:37:41 +0200 Subject: [PATCH 286/329] NEW Stars Field for Module Builder (#31216) * stars field for modulebuilder * Update commonobject.class.php --------- Co-authored-by: Laurent Destailleur --- htdocs/core/class/commonobject.class.php | 102 +++++++++++++++++++++++ htdocs/core/lib/functions.lib.php | 1 + htdocs/core/lib/modulebuilder.lib.php | 11 ++- htdocs/langs/en_US/modulebuilder.lang | 2 +- htdocs/modulebuilder/index.php | 3 + htdocs/theme/eldy/global.inc.php | 12 +++ htdocs/theme/md/style.css.php | 12 +++ 7 files changed, 141 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bbcb07fad3603..6121f90d23cbc 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7422,6 +7422,10 @@ public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = } elseif (preg_match('/varchar/', $val['type'])) { $param['options'] = array(); $type = 'varchar'; + } elseif (preg_match('/stars\((\d+)\)/', $val['type'], $reg)) { + $param['options'] = array(); + $type = 'stars'; + $size = $reg[1]; } else { $param['options'] = array(); $type = $this->fields[$key]['type']; @@ -7613,6 +7617,44 @@ function handlemultiinputdisabling(htmlname){ $value = price($value); } $out = ' '.$langs->getCurrencySymbol($conf->currency); + } elseif ($type == 'stars') { + $out = ''; + $out .= '
    '; + $i = 1; + while ($i <= $size) { + $out .= ''.img_picto('', 'fontawesome_star_fas').''; + $i++; + } + $out .= '
    '; + $out .= ''; } elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/', (string) $type)) { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); @@ -8278,6 +8320,10 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix } elseif (preg_match('/^chkbxlst:(.*)/i', $val['type'], $reg)) { $param['options'] = array($reg[1] => 'N'); $type = 'chkbxlst'; + } elseif (preg_match('/stars\((\d+)\)/', $val['type'], $reg)) { + $param['options'] = array(); + $type = 'stars'; + $size = $reg[1]; } $langfile = empty($val['langfile']) ? '' : $val['langfile']; @@ -8365,6 +8411,62 @@ public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix $value = dol_print_phone($value, '', 0, 0, '', ' ', 'phone'); } elseif ($type == 'ip') { $value = dol_print_ip($value, 0); + } elseif ($type == 'stars') { + $value = ''; + $value .= '
    '; + $i = 1; + while ($i <= $size) { + $value .= ''.img_picto('', 'fontawesome_star_fas').''; + $i++; + } + $value .= '
    '; + $value .= ''; } elseif ($type == 'price') { if (!is_null($value) && $value !== '') { $value = price($value, 0, $langs, 0, 0, -1, $conf->currency); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 349df99e18896..2568eb5f8b769 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4879,6 +4879,7 @@ function getPictoForType($key, $morecss = '') 'ip' => 'country', 'select' => 'list', 'sellist' => 'list', + 'stars' => 'fontawesome_star_fas', 'radio' => 'check-circle', 'checkbox' => 'list', 'chkbxlst' => 'list', diff --git a/htdocs/core/lib/modulebuilder.lib.php b/htdocs/core/lib/modulebuilder.lib.php index 0ebfb8b8d9494..205f3254d4bcb 100644 --- a/htdocs/core/lib/modulebuilder.lib.php +++ b/htdocs/core/lib/modulebuilder.lib.php @@ -65,11 +65,18 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir = setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Label")), null, 'errors'); return -2; } - if (!preg_match('/^(integer|price|sellist|varchar|double|text|html|duration)/', $addfieldentry['type']) + if (!preg_match('/^(integer|price|sellist|varchar|double|text|html|duration|stars)/', $addfieldentry['type']) && !preg_match('/^(boolean|smallint|real|date|datetime|timestamp|phone|mail|url|ip|password)$/', $addfieldentry['type'])) { setEventMessages($langs->trans('BadValueForType', $addfieldentry['type']), null, 'errors'); return -2; } + // Check for type stars(NumberOfStars), NumberOfStars must be an integer between 1 and 10 + if (preg_match('/^stars\((.+)\)$/', $addfieldentry['type'], $matches)) { + if (!ctype_digit($matches[1]) || $matches[1] < 1 || $matches[1] > 10) { + setEventMessages($langs->trans('BadValueForType', $addfieldentry['type']), null, 'errors'); + return -2; + } + } } $pathoffiletoeditsrc = $readdir.'/class/'.strtolower($objectname).'.class.php'; @@ -343,6 +350,8 @@ function rebuildObjectSql($destdir, $module, $objectname, $newmask, $readdir = ' $type = 'integer'; } elseif ($type == 'mail') { $type = 'varchar(128)'; + } elseif (strpos($type, 'stars(') === 0) { + $type = 'integer'; } elseif ($type == 'phone') { $type = 'varchar(20)'; } elseif ($type == 'ip') { diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 00a94855e1bee..6db8966838fcf 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -148,7 +148,7 @@ CSSListClass=CSS for list NotEditable=Not editable ForeignKey=Foreign key ForeignKeyDesc=If the value of this field must be guaranteed to exist into another table. Enter here a value matching syntax: tablename.parentfieldtocheck -TypeOfFieldsHelp=Example:
    varchar(99)
    email
    phone
    ip
    url
    password
    double(24,8)
    real
    text
    html
    date
    datetime
    timestamp
    integer
    integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]]

    '1' means we add a + button after the combo to create the record
    'filter' is an Universal Filter syntax condition, example: '((status:=:1) AND (fk_user:=:__USER_ID__) AND (entity:IN:(__SHARED_ENTITIES__))' +TypeOfFieldsHelp=Example:
    varchar(99)
    email
    phone
    ip
    url
    password
    double(24,8)
    real
    text
    html
    date
    datetime
    timestamp
    stars(NumberOfStars) NumberOfStars must be between 1 and 10.
    integer
    integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]]

    '1' means we add a + button after the combo to create the record
    'filter' is an Universal Filter syntax condition, example: '((status:=:1) AND (fk_user:=:__USER_ID__) AND (entity:IN:(__SHARED_ENTITIES__))' TypeOfFieldsHelpIntro=This is the type of the field/attribute. AsciiToHtmlConverter=Ascii to HTML converter AsciiToPdfConverter=Ascii to PDF converter diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 153cff1658909..ea8ffa11260de 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -4085,6 +4085,7 @@ function getLicenceHeader($user, $langs, $now) print ''; print ''; print ''; + print ''; print ''; print ''; print ''; @@ -4652,6 +4653,8 @@ function cleanString( stringtoclean ) $pictoType = 'datetime'; } elseif (strpos($proptype, 'real') === 0) { $pictoType = 'double'; + } elseif (strpos($proptype, 'stars') === 0) { + $pictoType = 'stars'; } print(!empty($pictoType) ? getPictoForType($pictoType) : getPictoForType($proptype)).''.dol_escape_htmltag($proptype).''; print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 401fe67e13cc5..ab56a7e4fb891 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -5142,6 +5142,18 @@ padding: 16px; } +.star-selection { + font-size: 1rem; + cursor: pointer; + display: flex; +} +.star { + color: #ccc; + transition: color 0.4s; +} +.star:hover, .star.active { + color: ; +} /* * Ok, Warning, Error diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 9d9f595fefd83..f34c06483ca11 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -5154,6 +5154,18 @@ border: 1px solid #888; padding: 16px; } +.star-selection { + font-size: 1rem; + cursor: pointer; + display: flex; +} +.star { + color: #ccc; + transition: color 0.4s; +} +.star:hover, .star.active { + color: ; +} From 934d291194fc54b8296cb7710860b3b1f3cf58dd Mon Sep 17 00:00:00 2001 From: HENRY Florian Date: Fri, 4 Oct 2024 18:45:54 +0200 Subject: [PATCH 287/329] fix: action/card.php do not display priority field if hidden conf not activated (#31277) --- htdocs/comm/action/card.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 5f5da42d23303..2b004f0ff10d8 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -2511,9 +2511,11 @@ function setdatefields() } // Priority - print ''.$langs->trans("Priority").''; - print($object->priority ? $object->priority : ''); - print ''; + if (getDolGlobalString('AGENDA_SUPPORT_PRIORITY_IN_EVENTS')) { + print '' . $langs->trans("Priority") . ''; + print($object->priority ? $object->priority : ''); + print ''; + } // Object linked (if link is for thirdparty, contact, project it is a recording error. We should not have links in link table // for such objects because there is already a dedicated field into table llx_actioncomm. From 3f0aef062eb346d447d7985028dfbde803cbf220 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Oct 2024 19:09:00 +0200 Subject: [PATCH 288/329] Standardize code --- .../adherents/class/adherent_type.class.php | 22 +++++++++++++ htdocs/adherents/type.php | 33 +++++++++++++++---- htdocs/langs/en_US/members.lang | 4 +-- htdocs/theme/eldy/global.inc.php | 3 +- 4 files changed, 53 insertions(+), 9 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index a6b0ebe051377..2947f20b15895 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -143,6 +143,28 @@ class AdherentType extends CommonObject public $multilangs = array(); + // BEGIN MODULEBUILDER PROPERTIES + /** + * @inheritdoc + * 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" => "-1",), + "tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 20, 'notnull' => 1, "visible" => "-1",), + "statut" => array("type" => "smallint(6)", "label" => "Statut", "enabled" => "1", 'position' => 500, 'notnull' => 1, "visible" => "-1",), + "libelle" => array("type" => "varchar(50)", "label" => "Label", "enabled" => "1", 'position' => 30, 'notnull' => 1, "visible" => "-1",), + "subscription" => array("type" => "varchar(3)", "label" => "Subscription", "enabled" => "1", 'position' => 35, 'notnull' => 1, "visible" => "-1",), + "amount" => array("type" => "double(24,8)", "label" => "Amount", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1",), + "caneditamount" => array("type" => "integer", "label" => "Caneditamount", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1",), + "vote" => array("type" => "varchar(3)", "label" => "Vote", "enabled" => "1", 'position' => 50, 'notnull' => 1, "visible" => "-1",), + "note" => array("type" => "longtext", "label" => "Note", "enabled" => "1", 'position' => 55, 'notnull' => 0, "visible" => "-1",), + "mail_valid" => array("type" => "longtext", "label" => "Mailvalid", "enabled" => "1", 'position' => 60, 'notnull' => 0, "visible" => "-1",), + "morphy" => array("type" => "varchar(3)", "label" => "Morphy", "enabled" => "1", 'position' => 65, 'notnull' => 0, "visible" => "-1",), + "duration" => array("type" => "varchar(6)", "label" => "Duration", "enabled" => "1", 'position' => 70, 'notnull' => 0, "visible" => "-1",), + ); + // END MODULEBUILDER PROPERTIES + + /** * Constructor * diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 478402f301854..1f2916e0957b3 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -100,6 +100,25 @@ // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); + +// Definition of array of fields for columns +$tableprefix = 't'; +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (!empty($val['visible'])) { + $visible = (int) dol_eval((string) $val['visible'], 1); + $arrayfields[$tableprefix.'.'.$key] = array( + 'label' => $val['label'], + 'checked' => (($visible < 0) ? 0 : 1), + 'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)), + 'position' => $val['position'], + 'help' => isset($val['help']) ? $val['help'] : '' + ); + } +} + + // Security check $result = restrictedArea($user, 'adherent', $rowid, 'adherent_type'); @@ -420,16 +439,18 @@ $i++; } + // Show total line + include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // If no record found if ($num == 0) { - /*$colspan = 1; + $colspan = 1; foreach ($arrayfields as $key => $val) { - if (!empty($val['checked'])) { + //if (!empty($val['checked'])) { $colspan++; - } - }*/ - $colspan = 9; - print ''.$langs->trans("NoRecordFound").''; + //} + } + print ''.$langs->trans("NoRecordFound").''; } print ""; diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 4434ad072ac06..8f444e389ba56 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -99,8 +99,8 @@ SubscriptionRequiredDesc=If subscription is required, a subscription with a star DeleteType=Delete VoteAllowed=Vote allowed Physical=Individual -Moral=Corporation -MorAndPhy=Corporation and Individual +Moral=Legal entty +MorAndPhy=Legal entity and Individual Reenable=Re-enable ExcludeMember=Exclude a member Exclude=Exclude diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index ab56a7e4fb891..5f0fffe3db665 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3887,10 +3887,11 @@ .imgTabTitle { max-height: 14px; } +/* div.tabs div.tabsElem:first-of-type a.tab { margin-left: 0px !important; } - +*/ a.tabunactive { color: var(--colortextlink) !important; } From 9d79175638cddbc216f35b4fc2b8469e14c58287 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Oct 2024 19:25:02 +0200 Subject: [PATCH 289/329] Clean code --- htdocs/comm/action/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 20611e45db040..855a7f2e6034f 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -148,10 +148,10 @@ $TRemindTypes = array(); if (getDolGlobalString('AGENDA_REMINDER_BROWSER')) { - $TRemindTypes['browser'] = array('label' => $langs->trans('BrowserPush'), 'disabled' => (!getDolGlobalString('AGENDA_REMINDER_BROWSER') ? 1 : 0)); + $TRemindTypes['browser'] = array('label' => $langs->trans('BrowserPush'), 'disabled' => (getDolGlobalString('AGENDA_REMINDER_BROWSER') ? 0 : 1)); } if (getDolGlobalString('AGENDA_REMINDER_EMAIL')) { - $TRemindTypes['email'] = array('label' => $langs->trans('EMail'), 'disabled' => (!getDolGlobalString('AGENDA_REMINDER_EMAIL') ? 1 : 0)); + $TRemindTypes['email'] = array('label' => $langs->trans('EMail'), 'disabled' => (getDolGlobalString('AGENDA_REMINDER_EMAIL') ? 0 : 1)); } $TDurationTypes = array('y' => $langs->trans('Years'), 'm' => $langs->trans('Month'), 'w' => $langs->trans('Weeks'), 'd' => $langs->trans('Days'), 'h' => $langs->trans('Hours'), 'i' => $langs->trans('Minutes')); @@ -2251,9 +2251,9 @@ function setdatefields() print '$(document).ready(function () { $("#addreminder").click(function(){ if (this.checked) { - $(".reminderparameters").show(); + $(".reminderparameters").show(); } else { - $(".reminderparameters").hide(); + $(".reminderparameters").hide(); } }); From 956fffce3e4ac2c4d8694077bf62324c52c3a214 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Oct 2024 19:30:06 +0200 Subject: [PATCH 290/329] Fix title --- htdocs/bookcal/bookcalindex.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/bookcal/bookcalindex.php b/htdocs/bookcal/bookcalindex.php index cbb6ae1f74a85..a368c928ce6c8 100644 --- a/htdocs/bookcal/bookcalindex.php +++ b/htdocs/bookcal/bookcalindex.php @@ -63,9 +63,9 @@ $form = new Form($db); $formfile = new FormFile($db); -llxHeader("", $langs->trans("BookCalArea"), '', '', 0, 0, '', '', '', 'mod-bookcal page-index'); +llxHeader("", $langs->trans("BookcalBookingTitle"), '', '', 0, 0, '', '', '', 'mod-bookcal page-index'); -print load_fiche_titre($langs->trans("BookCalArea"), '', 'fa-calendar-check'); +print load_fiche_titre($langs->trans("BookcalBookingTitle"), '', 'fa-calendar-check'); print '
    '; From 965558e309dbffc2b3af02f2c4787c1d8c9e9f48 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Oct 2024 19:30:34 +0200 Subject: [PATCH 291/329] Clean trans --- dev/translation/ignore_translation_keys.lst | 1 - 1 file changed, 1 deletion(-) diff --git a/dev/translation/ignore_translation_keys.lst b/dev/translation/ignore_translation_keys.lst index 46124cff57e09..1002aae7500ef 100644 --- a/dev/translation/ignore_translation_keys.lst +++ b/dev/translation/ignore_translation_keys.lst @@ -164,7 +164,6 @@ BlockLogNeedElement BlockedLogAuthorityNeededToStoreYouFingerprintsInNonAlterableRemote BlockedLogAuthorityUrl BlockedLogSetup -BookCalArea BookCalSystem Bookings BoxTitleLast From 0bd42eb1dadd92003453a646e1151daab360a7e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Oct 2024 12:57:39 +0200 Subject: [PATCH 292/329] Better tooltip --- htdocs/langs/en_US/website.lang | 2 +- htdocs/website/index.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 24c3e4b792779..527e967a9ff44 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -56,7 +56,7 @@ ReadPerm=Read WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=Preview %s in a new tab.

    The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:
    %s
    URL served by external server:
    %s -PreviewSiteServedByDolibarr=Preview %s in a new tab.

    The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
    The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.
    URL served by Dolibarr:
    %s

    To use your own external web server to serve this web site, create a virtual host on your web server that points on directory
    %s
    then enter the name of this virtual server in the properties of this website and click on the link "Test/Deploy on the web". +PreviewSiteServedByDolibarr=Preview %s in a new tab.

    The %s will be served by Dolibarr server so it does not need any extra web server (like Apache, Nginx, IIS) to be installed.
    The inconvenient is that the URLs of pages are not user friendly and start with the path of your Dolibarr.
    URL served by Dolibarr:
    %s

    To deploy or test using your own external web server (like Apache, Nginx, Lighttp) use the link "%s". VirtualHostUrlNotDefined=URL of the virtual host served by external web server not defined NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template diff --git a/htdocs/website/index.php b/htdocs/website/index.php index a05c0d079830e..eb834ab530c75 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3652,9 +3652,9 @@ function switchEditorOnline(forceenable) $realpage = $urlwithroot.'/public/website/index.php?website='.$websitekey.'&pageref='.$websitepage->pageurl; $pagealias = $websitepage->pageurl; - $htmltext = $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot); - $htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), '{s1}'); - $htmltext = str_replace('{s1}', $dataroot.'
    '.DOL_DATA_ROOT.'/medias
    '.DOL_DOCUMENT_ROOT, $htmltext); + $htmltext = $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $langs->transnoentitiesnoconv("TestDeployOnWeb")); + //$htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("ReadPerm"), '{s1}'); + //$htmltext = str_replace('{s1}', $dataroot.'
    '.DOL_DATA_ROOT.'/medias
    '.DOL_DOCUMENT_ROOT, $htmltext); //$htmltext .= '
    '.$langs->trans("CheckVirtualHostPerms", $langs->transnoentitiesnoconv("WritePerm"), '{s1}'); //$htmltext = str_replace('{s1}', DOL_DATA_ROOT.'/medias', $htmltext); From 2b528c1385b77782d97a8d84da021f7daf1d9863 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Oct 2024 14:30:20 +0200 Subject: [PATCH 293/329] Fix missing links --- htdocs/contrat/agenda.php | 2 +- htdocs/contrat/card.php | 2 +- htdocs/contrat/contact.php | 3 +++ htdocs/contrat/document.php | 2 +- htdocs/contrat/note.php | 3 +++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 1ab24f2c28c4d..8731ffa4354bf 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -187,7 +187,7 @@ // Thirdparty $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; } // Project if (isModEnabled('project')) { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 5fb5b3676068b..5539666bace8d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1471,7 +1471,7 @@ // Thirdparty $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; } // Project if (isModEnabled('project')) { diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 0cfb9dc306b26..2f22275e00d12 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -171,6 +171,9 @@ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); + if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + } // Project if (isModEnabled('project')) { $langs->load("projects"); diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 2d4a02ada5dec..8b4ad58593747 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -145,7 +145,7 @@ // Thirdparty $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { - $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; } // Project if (isModEnabled('project')) { diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 76d0d6cb6ccad..d201a21f12b44 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -116,6 +116,9 @@ $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
    '.$object->thirdparty->getNomUrl(1); + if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { + $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; + } // Project if (isModEnabled('project')) { $langs->load("projects"); From 916a906d9b30ca5f82cd546af2c2a24e07e24c99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Oct 2024 14:51:45 +0200 Subject: [PATCH 294/329] Enhance the csvclean to support the charset encoding --- htdocs/core/class/translate.class.php | 11 ++++++++--- htdocs/core/lib/functions2.lib.php | 15 ++++++++++++--- htdocs/core/modules/export/exportcsv.class.php | 4 +--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index cef98ab273df0..4cc81b629bdfc 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -843,14 +843,19 @@ public function transcountrynoentities($str, $countrycode) * * @param string $str String to convert * @param string $pagecodefrom Page code of src string + * @param string $pagecodeto Expected page code of returned string * @return string Converted string */ - public function convToOutputCharset($str, $pagecodefrom = 'UTF-8') + public function convToOutputCharset($str, $pagecodefrom = 'UTF-8', $pagecodeto = '') { - if ($pagecodefrom == 'ISO-8859-1' && $this->charset_output == 'UTF-8') { + if (empty($pagecodeto)) { + $pagecodeto = $this->charset_output; + } + + if ($pagecodefrom == 'ISO-8859-1' && $pagecodeto == 'UTF-8') { $str = mb_convert_encoding($str, 'UTF-8', 'ISO-8859-1'); } - if ($pagecodefrom == 'UTF-8' && $this->charset_output == 'ISO-8859-1') { + if ($pagecodefrom == 'UTF-8' && $pagecodeto == 'ISO-8859-1') { $str = mb_convert_encoding(str_replace('€', chr(128), $str), 'ISO-8859-1'); // TODO Replace with iconv("UTF-8", "ISO-8859-1", str_replace('€', chr(128), $str)); ? } diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index aeb6086e29ce3..115baba4bee01 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -3080,19 +3080,28 @@ function removeEmoji($text, $allowedemoji = 1) /** * Clean a cell to respect rules of CSV file cells * - * @param string $newvalue String to clean - * @param string $charset Input AND Output character set + * @param string $newvalue String to clean (must be UTF-8 encoded) + * @param string $charset Expected output character set ('UTF-8', 'ISO-8859-1', ...). Default '' will use the value into EXPORT_CSV_FORCE_CHARSET. * @param string $separator CSV char separator (often ',' or ';'). Default '' will use the value into EXPORT_CSV_SEPARATOR_TO_USE. * @return string Value cleaned */ -function csvClean($newvalue, $charset, $separator = '') +function csvClean($newvalue, $charset = '', $separator = '') { + global $langs; + $addquote = 0; + if (empty($charset)) { + $charset = getDolGlobalString('EXPORT_CSV_FORCE_CHARSET'); + } if (empty($separator)) { $separator = getDolGlobalString('EXPORT_CSV_SEPARATOR_TO_USE'); } + + $newvalue = $langs->convToOutputCharset($newvalue, 'UTF-8', $charset); // newvalue is now encoded into $charset + + // Rule Dolibarr: No HTML //print $charset.' '.$newvalue."\n"; //$newvalue=dol_string_nohtmltag($newvalue,0,$charset); diff --git a/htdocs/core/modules/export/exportcsv.class.php b/htdocs/core/modules/export/exportcsv.class.php index 91b7f63a16101..64acefab72a39 100644 --- a/htdocs/core/modules/export/exportcsv.class.php +++ b/htdocs/core/modules/export/exportcsv.class.php @@ -208,8 +208,6 @@ public function write_title($array_export_fields_label, $array_selected_sorted, continue; } - $newvalue = $outputlangs->transnoentities($array_export_fields_label[$code]); // newvalue is now $outputlangs->charset_output encoded - // Clean data and add encloser if required (depending on value of USE_STRICT_CSV_RULES) include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $newvalue = csvClean($newvalue, $outputlangs->charset_output, $this->separator); @@ -261,7 +259,7 @@ public function write_record($array_selected_sorted, $objp, $outputlangs, $array continue; } - $newvalue = $outputlangs->convToOutputCharset($objp->$alias); // objp->$alias must be utf8 encoded as any var in memory // newvalue is now $outputlangs->charset_output encoded + $newvalue = $objp->$alias; $typefield = isset($array_types[$code]) ? $array_types[$code] : ''; // Translation newvalue From 9e9af80fe03abebd882c8ccdc721df7b41490ec2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 Oct 2024 18:33:36 +0200 Subject: [PATCH 295/329] Fix regression --- htdocs/core/modules/export/exportcsv.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/export/exportcsv.class.php b/htdocs/core/modules/export/exportcsv.class.php index 64acefab72a39..1e263a6728402 100644 --- a/htdocs/core/modules/export/exportcsv.class.php +++ b/htdocs/core/modules/export/exportcsv.class.php @@ -208,6 +208,8 @@ public function write_title($array_export_fields_label, $array_selected_sorted, continue; } + $newvalue = $array_export_fields_label[$code]; + // Clean data and add encloser if required (depending on value of USE_STRICT_CSV_RULES) include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $newvalue = csvClean($newvalue, $outputlangs->charset_output, $this->separator); From f74b072d726c41ba0e5055bc4ceff521665d5b1a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sat, 5 Oct 2024 18:46:16 +0200 Subject: [PATCH 296/329] NEW retrieve Thirdparty by account (#31283) * NEW retreive Thirdparty by account usefull for external link * Update api_thirdparties.class.php * Update api_thirdparties.class.php * Update api_thirdparties.class.php --- .../societe/class/api_thirdparties.class.php | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index c4c549f25e90e..b757b28c6b0fb 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1729,6 +1729,44 @@ public function getSocieteAccounts($id, $site = null) return $returnAccounts; } + /** + * Get a specific thirdparty by account + * + * @param string $site Site key + * @param string $key_account Key of account + * + * @return array|mixed + * @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 /accounts/{site}/{key_account} + */ + public function getSocieteByAccounts($site, $key_account) + { + if (!DolibarrApiAccess::$user->hasRight('societe', 'lire')) { + throw new RestException(403); + } + + $sql = "SELECT rowid, fk_soc, key_account, site, date_creation, tms FROM ".MAIN_DB_PREFIX."societe_account"; + $sql .= " WHERE site = '".$this->db->escape($site)."' AND key_account = '".$this->db->escape($key_account)."'"; + $sql .= " AND entity IN (".getEntity('societe').")"; + + $result = $this->db->query($sql); + + if ($result && $this->db->num_rows($result) == 1) { + $obj = $this->db->fetch_object($result); + $returnThirdparty = $this->_fetch($obj->fk_soc); + } else { + throw new RestException(404, 'This account have many thirdparties attached or does not exist.'); + } + + if (!DolibarrApi::_checkAccessToResource('societe', $returnThirdparty->id)) { + throw new RestException(403, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + return $returnThirdparty; + } + /** * Create and attach a new account to an existing thirdparty * From 868d8858064b83eefade32f3258dd756d9d975f8 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 5 Oct 2024 18:49:34 +0200 Subject: [PATCH 297/329] NEW Accountancy - Add general account on thirdparty - SQL Part (#31280) --- .../install/mysql/migration/20.0.0-21.0.0.sql | 12 ++++++++++++ htdocs/install/mysql/tables/llx_societe.sql | 8 ++++++-- .../llx_societe_perentity-multicompany.sql | 18 ++++++++++-------- htdocs/install/mysql/tables/llx_user.sql | 12 ++++++++---- 4 files changed, 36 insertions(+), 14 deletions(-) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index ba603342da794..07159bd1847ef 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -136,3 +136,15 @@ ALTER TABLE llx_recruitment_recruitmentcandidature MODIFY fk_user_creat integer ALTER TABLE llx_ecm_files ADD COLUMN agenda_id integer; +-- Add accountancy code general on user / customer / supplier subledger +ALTER TABLE llx_user ADD COLUMN accountancy_code_user_general varchar(32) DEFAULT NULL AFTER fk_barcode_type; +ALTER TABLE llx_societe ADD COLUMN accountancy_code_customer_general varchar(32) DEFAULT NULL AFTER code_fournisseur; +ALTER TABLE llx_societe ADD COLUMN accountancy_code_supplier_general varchar(32) DEFAULT NULL AFTER code_compta; +ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_customer_general varchar(32) DEFAULT NULL AFTER entity; +ALTER TABLE llx_societe_perentity ADD COLUMN accountancy_code_supplier_general varchar(32) DEFAULT NULL AFTER accountancy_code_customer; + +-- Uniformize length of accountancy account +ALTER TABLE llx_societe MODIFY COLUMN code_compta varchar(32); +ALTER TABLE llx_societe MODIFY COLUMN code_compta_fournisseur varchar(32); +ALTER TABLE llx_societe_perentity MODIFY COLUMN accountancy_code_customer varchar(32); +ALTER TABLE llx_societe_perentity MODIFY COLUMN accountancy_code_supplier varchar(32); diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index ab5a3782ab683..a4ce431ada2eb 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -38,8 +38,12 @@ create table llx_societe code_client varchar(24), -- code client code_fournisseur varchar(24), -- code fournisseur - code_compta varchar(24), -- customer accountancy auxiliary account - code_compta_fournisseur varchar(24), -- supplier accountancy auxiliary account + + accountancy_code_customer_general varchar(32) DEFAULT NULL, -- customer accountancy general account + code_compta varchar(32), -- customer accountancy auxiliary account + accountancy_code_supplier_general varchar(32) DEFAULT NULL, -- supplier accountancy general account + code_compta_fournisseur varchar(32), -- supplier accountancy auxiliary account + address varchar(255), -- company address zip varchar(25), -- zipcode town varchar(50), -- town diff --git a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql index 78943d8463512..a8d28fb6b22d7 100644 --- a/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql +++ b/htdocs/install/mysql/tables/llx_societe_perentity-multicompany.sql @@ -19,12 +19,14 @@ create table llx_societe_perentity ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_soc integer, - entity integer DEFAULT 1 NOT NULL, -- multi company id - accountancy_code_customer varchar(24), -- customer accountancy auxiliary account - accountancy_code_supplier varchar(24), -- supplier accountancy auxiliary account - accountancy_code_sell varchar(32), -- Selling accountancy code - accountancy_code_buy varchar(32), -- Buying accountancy code - vat_reverse_charge tinyint DEFAULT 0 -- VAT reverse charge + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_soc integer, + entity integer DEFAULT 1 NOT NULL, -- multi company id + accountancy_code_customer_general varchar(32) DEFAULT NULL, -- customer accountancy general account + accountancy_code_customer varchar(32), -- customer accountancy auxiliary account + accountancy_code_supplier_general varchar(32) DEFAULT NULL, -- supplier accountancy general account + accountancy_code_supplier varchar(32), -- supplier accountancy auxiliary account + accountancy_code_sell varchar(32), -- Selling accountancy code + accountancy_code_buy varchar(32), -- Buying accountancy code + vat_reverse_charge tinyint DEFAULT 0 -- VAT reverse charge )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 06c8ad99a0b20..065c6bd4f0d85 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -1,7 +1,8 @@ -- ============================================================================ --- Copyright (C) 2001-2003 Rodolphe Quiedeville --- Copyright (C) 2006-2013 Laurent Destailleur --- Copyright (C) 2007-2013 Regis Houssin +-- Copyright (C) 2001-2003 Rodolphe Quiedeville +-- Copyright (C) 2006-2013 Laurent Destailleur +-- Copyright (C) 2007-2013 Regis Houssin +-- Copyright (C) 2024 Alexandre Spangaro -- -- 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 @@ -98,7 +99,10 @@ create table llx_user color varchar(6), barcode varchar(255) DEFAULT NULL, fk_barcode_type integer DEFAULT 0, - accountancy_code varchar(32) NULL, + + accountancy_code_user_general varchar(32) DEFAULT NULL, + accountancy_code varchar(32) NULL, + nb_holiday integer DEFAULT 0, thm double(24,8), tjm double(24,8), From 7fe28032d1e2016b4730b090cd80f960f66a18dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 5 Oct 2024 18:49:54 +0200 Subject: [PATCH 298/329] phpstan (#31276) * phpstan * phpstan --- htdocs/core/lib/functions.lib.php | 4 ++-- phpstan.neon.dist | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2568eb5f8b769..acf959b9a19fa 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4825,8 +4825,8 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF } elseif ($trunc == 'middle') { $newstring = dol_textishtml($string) ? dol_string_nohtmltag($string, 1) : $string; if (dol_strlen($newstring, $stringencoding) > 2 && dol_strlen($newstring, $stringencoding) > ($size + 1)) { - $size1 = round($size / 2); - $size2 = round($size / 2); + $size1 = (int) round($size / 2); + $size2 = (int) round($size / 2); return dol_substr($newstring, 0, $size1, $stringencoding).'…'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size2, $size2, $stringencoding); } else { return $string; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index a04c5ab4ba9ee..502b0961488bc 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -71,7 +71,7 @@ parameters: - '# SMTPs::(getFrom|getErrorsTo|getReplyTo)\(\) expects bool, string given.#' - '# getLocalTaxesFromRate expects int\|string#' - '#::(options)\(\) expects int\|string#' - - '# (print_barre_liste|dol_substr) expects int\|null#' + - '# print_barre_liste expects int\|null#' - '#(?:colorAdjustBrightness|imap_(?:(?:fetch)?body|fetchstructure)) expects int, string#' - '#(sendTicketMessageByEmail|addItemsFact|update_price|recur|addDepreciationLine|addline|generate|update|getSelectConditionsPaiements|select_state|listBoxes|literalBarcodeType)\(\) expects int, string#' - '#on array{url: mixed} in empty\(\) does not exist.#' From f70c9459313c3470e8b5d1ec24c3d706197755cf Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 5 Oct 2024 18:55:36 +0200 Subject: [PATCH 299/329] Qual: Fix phan/stan notices (#31271) # Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall Fix notices in classes with UnknownObjectMethodCall notices or classes related with these. --- .../codespell/codespell-lines-ignore.txt | 17 +--- dev/tools/phan/baseline.txt | 77 +++++++--------- .../class/api_accountancy.class.php | 8 +- .../accountancy/class/bookkeeping.class.php | 26 ++++-- htdocs/admin/translation.php | 2 +- htdocs/admin/webhook.php | 4 +- htdocs/bookcal/admin/calendar_extrafields.php | 3 +- htdocs/commande/class/commande.class.php | 18 ++-- htdocs/compta/facture/class/facture.class.php | 33 +++---- htdocs/core/class/html.form.class.php | 32 +++---- htdocs/core/lib/functions.lib.php | 4 +- htdocs/core/modules/DolibarrModules.class.php | 4 +- htdocs/core/modules/action/modules_action.php | 7 +- .../asset/doc/pdf_standard_asset.modules.php | 6 +- htdocs/core/modules/dons/modules_don.php | 7 +- htdocs/core/modules/member/modules_cards.php | 8 +- htdocs/loan/info.php | 1 + htdocs/loan/note.php | 1 + .../template/admin/myobject_extrafields.php | 2 +- .../template/class/actions_mymodule.class.php | 4 +- htdocs/mrp/class/mo.class.php | 3 +- htdocs/mrp/mo_movements.php | 4 +- htdocs/mrp/mo_production.php | 2 +- htdocs/mrp/tpl/linkedobjectblock.tpl.php | 6 +- .../partnership/class/partnership.class.php | 86 ++++++++++++++++-- .../class/partnership_type.class.php | 13 +-- .../class/partnershiputils.class.php | 17 +++- .../partnership/mod_partnership_advanced.php | 4 +- .../partnership/mod_partnership_standard.php | 4 +- .../partnership/modules_partnership.php | 15 +++- htdocs/partnership/partnership_card.php | 3 +- htdocs/printing/admin/printing.php | 3 + htdocs/product/admin/product_lot.php | 3 +- htdocs/product/ajax/product_lot.php | 3 +- .../product/actions_card_product.class.php | 59 ++++++++++-- htdocs/product/card.php | 90 ++++++++++--------- htdocs/product/class/api_products.class.php | 41 +++++---- .../public/eventorganization/attendee_new.php | 29 +++--- htdocs/public/partnership/new.php | 16 ++-- ...tandard_recruitmentjobposition.modules.php | 6 +- htdocs/societe/card.php | 2 +- .../societe/class/api_thirdparties.class.php | 2 +- .../class/api_workstations.class.php | 9 +- phpstan.neon.dist | 9 +- 44 files changed, 431 insertions(+), 262 deletions(-) diff --git a/dev/tools/codespell/codespell-lines-ignore.txt b/dev/tools/codespell/codespell-lines-ignore.txt index b355752270221..4a92b80dc80f0 100644 --- a/dev/tools/codespell/codespell-lines-ignore.txt +++ b/dev/tools/codespell/codespell-lines-ignore.txt @@ -2,17 +2,14 @@ if (empty($objMod->dictionaries) && !empty($objMod->{"dictionnaries"})) { print 'id.'&token='.newToken().'">'; $object->date_ech = $object->periode; - $object->periode = $object->date_ech; $reponsesadd = str_split($obj->reponses); $sql .= " SET reponses = '".$db->escape($reponsesadd)."'"; $sql .= " SET reponses = '0".$db->escape($obj->reponses)."'"; $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); - // $object->periode = dol_get_last_day(year of $object->date_ech - 1m, month or $object->date_ech -1m) //$pice = ''; //$typea = ($objp->typea == 'birth') ? $picb : $pice; print ''; $dateemail = dol_stringtotime((string) $overview[0]->udate, 'gmt'); - $object->periode = $newdateperiod; $pice = ''; $typea = ($data[$j]->typea == 'birth') ? $picb : $pice; GETPOSTINT("mouvement"), @@ -25,8 +22,6 @@ $date_liv = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $newfiletmp = preg_replace('/\.od(s|t)/i', '', $newfile); $newfiletmp = preg_replace('/\.od[ts]/i', '', $newfile); - $object->period = dol_time_plus_duree($object->periode, 1, 'm'); - $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); $this->category->childs[] = $this->_cleanObjectDatas($cat); $this->periode = $this->db->jdate($obj->period); $tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses); @@ -58,12 +53,9 @@ 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"); "sme", $action = 'transfert'; $cle_rib = strtolower(checkES($rib, $CCC)); @@ -97,9 +89,7 @@ if ($user->hasRight('stock', 'mouvement', 'creer')) { if (GETPOSTISSET("reday") && GETPOSTISSET("remonth") && GETPOSTISSET("reyear")) { if (empty($reyear) || empty($remonth) || empty($reday)) { - print ''; - print ''.$langs->trans("AddIn").''; - * @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing. + * @param float|string $selectedrate Force preselected vat rate. Can be '8.5' or '8.5 (NOO)' for example. Use '' for no forcing. $date = $obj->periode; $datepaid = dol_mktime(12, 0, 0, GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear")); $datepaid = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear")); @@ -132,14 +122,12 @@ // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire TaskItem(pID, pName, pStart, pEnd, pColor, pLink, pMile, pRes, pComp, pGroup, pParent, pOpen, pDepend, pCaption, pNotes, pGantt)

    if ($action == "transfert") { - if ($object->id > 0 && $action == 'addin') { if (GETPOST('reday')) { if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) { print ''; print ''; - print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'maxwidth200'); + print $formproduct->selectWarehouses($search_warehouse, 'search_warehouse', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'maxwidth200'); print ''; } if (!empty($arrayfields['m.fk_user_author']['checked'])) { diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index a3f7348a3322c..b6ea1c26941b8 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -173,7 +173,7 @@ //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOSTINT('projectid')); diff --git a/htdocs/mrp/tpl/linkedobjectblock.tpl.php b/htdocs/mrp/tpl/linkedobjectblock.tpl.php index 6eb5076da8bd7..e4cfc5b84355d 100644 --- a/htdocs/mrp/tpl/linkedobjectblock.tpl.php +++ b/htdocs/mrp/tpl/linkedobjectblock.tpl.php @@ -33,6 +33,7 @@ $langs = $GLOBALS['langs']; '@phan-var-force Translate $langs'; $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; +'@phan-var-force array $linkedObjectBlock'; $object = $GLOBALS['object']; // Load translation files required by the page @@ -45,8 +46,9 @@ $mo_static = new Mo($db); $res = $mo_static->fetch($object->id); $TMoChilds = $mo_static->getMoChilds(); + '@phan-var-force Mo[] $TMoChilds'; - $hookmanager->initHooks('LinesLinkedObjectBlock'); + $hookmanager->initHooks(array('LinesLinkedObjectBlock')); $parameters = array('TMoChilds' => $TMoChilds); $reshook = $hookmanager->executeHooks('LinesLinkedObjectBlock', $parameters, $object, $action); // Note that $action and $object may have been modified by hook if (empty($reshook)) { @@ -90,7 +92,7 @@ } } else { $linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); - + '@phan-var-force array $linkedObjectBlock'; $total = 0; $ilink = 0; foreach ($linkedObjectBlock as $key => $objectlink) { diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index a4b5d9680792a..bdc155c78cd19 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -54,7 +54,13 @@ class Partnership extends CommonObject */ public $picto = 'partnership'; + /** + * @var string + */ public $type_code; + /** + * @var string + */ public $type_label; @@ -119,26 +125,89 @@ class Partnership extends CommonObject 'ip' => array('type' => 'ip', 'label' => 'IPOfApplicant', 'enabled' => 1, 'position' => 74, 'notnull' => 0, 'visible' => -2,), 'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 2000, 'notnull' => 1, 'visible' => 2, 'default' => '0', 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'Approved', '3' => 'Refused', '9' => 'Terminated'),), ); + /** + * @var int + */ public $rowid; + /** + * @var string + */ public $ref; + /** + * @var int + */ public $entity; + /** + * @var int + */ public $fk_type; + /** + * @var string + */ public $note_public; + /** + * @var string + */ public $note_private; + /** + * @var int + */ public $fk_user_creat; + /** + * @var int + */ public $fk_user_modif; + /** + * @var string + */ public $last_main_doc; + /** + * @var string + */ public $import_key; + /** + * @var string + */ public $model_pdf; + /** + * @var int|string + */ public $date_partnership_start; + /** + * @var int|string + */ public $date_partnership_end; + /** + * @var string + */ public $url_to_check; + /** + * @var int|float + */ public $count_last_url_check_error; + /** + * @var int|string + */ public $last_check_backlink; + /** + * @var string + */ public $reason_decline_or_cancel; + /** + * @var int + */ public $fk_soc; + /** + * @var int + */ public $fk_member; + /** + * @var string + */ public $ip; + /** + * @var int + */ public $status; // END MODULEBUILDER PROPERTIES @@ -422,9 +491,9 @@ public function fetchLines() * @param string $sortfield Sort field * @param int $limit Limit * @param int $offset Offset page - * @param string|array $filter Filter USF. - * @param string $filtermode Filter mode (AND or OR) - * @return array|int int <0 if KO, array of pages if OK + * @param string|array $filter Filter USF. + * @param 'AND'|'OR' $filtermode Filter mode (AND or OR) + * @return self[]|int int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') { @@ -1177,7 +1246,7 @@ public function initAsSpecimen() /** * Create an array of lines * - * @return array|int array of lines if OK, <0 if KO + * @return PartnershipLine[]|int array of lines if OK, <0 if KO */ public function getLinesArray() { @@ -1232,6 +1301,7 @@ public function getNextNumRef() if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force ModeleNumRefPartnership $obj'; $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { @@ -1256,10 +1326,10 @@ public function getNextNumRef() * * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php index 82719f1338fbd..73653c0dc468f 100644 --- a/htdocs/partnership/class/partnership_type.class.php +++ b/htdocs/partnership/class/partnership_type.class.php @@ -61,6 +61,9 @@ class PartnershipType extends CommonObject */ public $label; + /** + * @var int<0,1> + */ public $active; @@ -122,9 +125,9 @@ public function __construct(DoliDB $db) /** * Create object into database * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int Return integer <0 if KO, Id of created object if OK + * @param User $user User that creates + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @return int Return integer <0 if KO, Id of created object if OK */ public function create(User $user, $notrigger = 0) { @@ -154,8 +157,8 @@ public function fetch($id, $ref = null) * @param int $offset Offset * @param string $filter Filter as an Universal Search string. * Example: '((client:=:1) OR ((client:>=:2) AND (client:<=:3))) AND (client:!=:8) AND (nom:like:'a%')' - * @param string $filtermode No more used - * @return array|int int <0 if KO, array of pages if OK + * @param 'AND'|'OR' $filtermode No more used + * @return self[]|int int <0 if KO, array of pages if OK */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = '', $filtermode = 'AND') { diff --git a/htdocs/partnership/class/partnershiputils.class.php b/htdocs/partnership/class/partnershiputils.class.php index 20309559f0e62..fa158f5b0df04 100644 --- a/htdocs/partnership/class/partnershiputils.class.php +++ b/htdocs/partnership/class/partnershiputils.class.php @@ -38,11 +38,23 @@ */ class PartnershipUtils { + /** + * @var DoliDB + */ public $db; //!< To store db handler + /** + * @var string + */ public $error; //!< To return error code (or message) + /** + * @var string[] + */ public $errors = array(); //!< To return several error codes (or messages) - public $output; // To store output of some cron methods + /** + * @var string To store output of some cron methods + */ + public $output; /** @@ -107,6 +119,7 @@ public function doCancelStatusOfMemberPartnership() $sql .= $this->db->order('d.rowid', 'ASC'); // Limit is managed into loop later + $numofexpiredmembers = 0; $resql = $this->db->query($sql); if ($resql) { $numofexpiredmembers = $this->db->num_rows($resql); @@ -326,6 +339,7 @@ public function doWarningOfPartnershipIfDolibarrBacklinkNotfound($maxpercall = 0 $sql .= $this->db->order('p.rowid', 'ASC'); // Limit is managed into loop later + $numofexpiredmembers = 0; $resql = $this->db->query($sql); if ($resql) { $numofexpiredmembers = $this->db->num_rows($resql); @@ -541,6 +555,7 @@ private function checkDolibarrBacklink($website = null) for ($i = 0; $i < $hrefs->length; $i++) { $href = $hrefs->item($i); + '@phan-var-force DOMElement $href'; $url = $href->getAttribute('href'); $url = filter_var($url, FILTER_SANITIZE_URL); if (!(!filter_var($url, FILTER_VALIDATE_URL))) { diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index b447a44ac35ad..1c677e2b28273 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -125,8 +125,8 @@ public function getExample() /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|0 Next value if OK, 0 if KO + * @param Partnership $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php index 4ab8eb6eacee0..710fbc60d3832 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_standard.php @@ -117,8 +117,8 @@ public function canBeActivated($object) /** * Return next free value * - * @param Object $object Object we need next value for - * @return string|-1 Next value if OK, -1 if KO + * @param Partnership $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO */ public function getNextValue($object) { diff --git a/htdocs/partnership/core/modules/partnership/modules_partnership.php b/htdocs/partnership/core/modules/partnership/modules_partnership.php index 0f8fde60cfa33..d76dfb63473f6 100644 --- a/htdocs/partnership/core/modules/partnership/modules_partnership.php +++ b/htdocs/partnership/core/modules/partnership/modules_partnership.php @@ -6,6 +6,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * 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 @@ -42,9 +43,9 @@ abstract class ModelePDFPartnership extends CommonDocGenerator /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { @@ -68,5 +69,11 @@ public static function liste_modeles($db, $maxfilenamelength = 0) */ abstract class ModeleNumRefPartnership extends CommonNumRefGenerator { - // No overload code + /** + * Return next free value + * + * @param Partnership $object Object we need next value for + * @return string|int<-1,0> Next value if OK, 0 if KO + */ + abstract public function getNextValue($object); } diff --git a/htdocs/partnership/partnership_card.php b/htdocs/partnership/partnership_card.php index d8ff622ae65b7..b4b75732c66d7 100644 --- a/htdocs/partnership/partnership_card.php +++ b/htdocs/partnership/partnership_card.php @@ -1,6 +1,7 @@ * Copyright (C) 2021 NextGestion + * 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 @@ -238,7 +239,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOSTINT('projectid')); diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index 20a9dc71d7be3..ba4f793a898ba 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -1,6 +1,7 @@ * Copyright (C) 2014-2024 Frédéric France + * 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 @@ -69,6 +70,7 @@ $error = 0; $db->begin(); foreach ($_POST['setupdriver'] as $setupconst) { + '@phan-var-force array $setupconst'; //print '
    '.print_r($setupconst, true).'
    '; $result = dolibarr_set_const($db, $setupconst['varname'], $setupconst['value'], 'chaine', 0, '', $conf->entity); if (!($result > 0)) { @@ -334,6 +336,7 @@ require_once $classfile; $classname = 'printing_'.$driver; $printer = new $classname($db); + '@phan-var-force PrintingDriver $printer'; $langs->load($driver); $langs->load('printing'); diff --git a/htdocs/product/admin/product_lot.php b/htdocs/product/admin/product_lot.php index c68bbaa96f91a..be06a33f5e7ea 100644 --- a/htdocs/product/admin/product_lot.php +++ b/htdocs/product/admin/product_lot.php @@ -446,6 +446,7 @@ require_once $dir . '/' . $file; $module = new $classname($db); + '@phan-var-force ModelePDFProductBatch $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -460,7 +461,7 @@ print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/product/ajax/product_lot.php b/htdocs/product/ajax/product_lot.php index 3c2596e1e1061..71de65202a8b9 100644 --- a/htdocs/product/ajax/product_lot.php +++ b/htdocs/product/ajax/product_lot.php @@ -1,6 +1,7 @@ * Copyright (C) 2023 Lionel Vessiller + * 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 @@ -60,7 +61,7 @@ if ($action == 'search' && $batch != '' && $permissiontoread) { $productLot = new Productlot($db); - $result = $productLot->fetch('', $productId, $batch); + $result = $productLot->fetch(0, $productId, $batch); if ($result > 0 && $productLot->id > 0) { $rows[] = array( diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 6ccec54629789..03d81e8a42166 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * 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 @@ -34,27 +35,69 @@ class ActionsCardProduct */ public $db; + /** + * @var string + */ public $dirmodule; + /** + * @var string + */ public $targetmodule; + /** + * @var string + */ public $canvas; + /** + * @var string + */ public $card; + /** + * @var string + */ public $name; + /** + * @var string + */ public $definition; + /** + * @var string + */ public $description; + /** + * @var string + */ public $price_base_type; + /** + * @var string + */ public $accountancy_code_sell; + /** + * @var string + */ public $accountancy_code_buy; + /** + * @var string + */ public $fieldListName; + /** + * @var string + */ public $next_prev_filter; - //! Object container + /** + * @var Product Object container + */ public $object; - //! Template container + /** + * @var array Template container + */ public $tpl = array(); - // List of fields for action=list + /** + * array,enabled:int<0,1>,order:int}> List of fields for action=list + */ public $field_list = array(); /** @@ -96,8 +139,8 @@ public function __construct($db, $dirmodule, $targetmodule, $canvas, $card) /** * Assign custom values for canvas (for example into this->tpl to be used by templates) * - * @param string $action Type of action - * @param integer $id Id of object + * @param string $action Type of action + * @param int $id Id of object * @param string $ref Ref of object * @return void */ @@ -107,6 +150,9 @@ public function assign_values(&$action, $id = 0, $ref = '') global $conf, $langs, $user, $mysoc, $canvas; global $form, $formproduct; + '@phan-var-force Form $form'; + '@phan-var-force FormProduct $formproduct'; + $tmpobject = new Product($this->db); if (!empty($id) || !empty($ref)) { $tmpobject->fetch($id, $ref); @@ -147,7 +193,7 @@ public function assign_values(&$action, $id = 0, $ref = '') $this->tpl['price_base_type'] = $form->selectPriceBaseType($this->price_base_type, "price_base_type"); // VAT - $this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, ''); + $this->tpl['tva_tx'] = $form->load_tva("tva_tx", -1, $mysoc, null); } if ($action == 'view') { @@ -290,7 +336,6 @@ private function getFieldListCanvas() // @phpstan-ignore-line $fieldlist["visible"] = $obj->visible; $fieldlist["enabled"] = verifCond($obj->enabled); $fieldlist["order"] = $obj->rang; - array_push($this->field_list, $fieldlist); $i++; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d2e547e5e6549..a263499408533 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -97,6 +97,7 @@ $errors = array(); $refalreadyexists = 0; +$formbarcode = null; // Get parameters $id = GETPOSTINT('id'); @@ -1057,8 +1058,11 @@ // Add product into object (when PRODUCT_ADD_FORM_ADD_TO is set) if ($object->id > 0 && $action == 'addin') { // Test on permission not required here. it is done later according to object. - $thirpdartyid = 0; + $thirdpartyid = 0; $permissiontoaddline = false; + $propal = null; + $facture = null; + $commande = null; // Get object and test permission if (GETPOST('propalid') > 0) { @@ -1068,7 +1072,7 @@ dol_print_error($db, $propal->error); exit; } - $thirpdartyid = $propal->socid; + $thirdpartyid = $propal->socid; $permissiontoaddline = $user->hasRight('propal', 'creer'); } elseif (GETPOST('commandeid') > 0) { $commande = new Commande($db); @@ -1077,7 +1081,7 @@ dol_print_error($db, $commande->error); exit; } - $thirpdartyid = $commande->socid; + $thirdpartyid = $commande->socid; $permissiontoaddline = $user->hasRight('commande', 'creer'); } elseif (GETPOST('factureid') > 0) { $facture = new Facture($db); @@ -1086,13 +1090,13 @@ dol_print_error($db, $facture->error); exit; } - $thirpdartyid = $facture->socid; + $thirdpartyid = $facture->socid; $permissiontoaddline = $user->hasRight('facture', 'creer'); } - if ($thirpdartyid > 0) { + if ($thirdpartyid > 0) { $soc = new Societe($db); - $result = $soc->fetch($thirpdartyid); + $result = $soc->fetch($thirdpartyid); if ($result <= 0) { dol_print_error($db, $soc->error); exit; @@ -1148,7 +1152,7 @@ } } - if (GETPOST('propalid') > 0 && $permissiontoaddline) { + if (GETPOST('propalid') > 0 && $permissiontoaddline && is_object($propal)) { // Define cost price for margin calculation $buyprice = 0; if (($result = $propal->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) { @@ -1188,7 +1192,7 @@ } setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors'); - } elseif (GETPOST('commandeid') > 0 && $permissiontoaddline) { + } elseif (GETPOST('commandeid') > 0 && $permissiontoaddline && is_object($commande)) { // Define cost price for margin calculation $buyprice = 0; if (($result = $commande->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) { @@ -1207,8 +1211,8 @@ $localtax2_tx, // localtax2 $object->id, price2num(GETPOST('remise_percent'), '', 2), - '', - '', + 0, + 0, $price_base_type, $pu_ttc, '', @@ -1217,10 +1221,10 @@ -1, 0, 0, - null, + 0, $buyprice, '', - 0, + array(), $object->fk_unit ); @@ -1230,7 +1234,7 @@ } setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors'); - } elseif (GETPOST('factureid') > 0 && $permissiontoaddline) { + } elseif (GETPOST('factureid') > 0 && $permissiontoaddline && is_object($facture)) { // Define cost price for margin calculation $buyprice = 0; if (($result = $facture->defineBuyPrice($pu_ht, price2num(GETPOST('remise_percent'), '', 2), $object->id)) < 0) { @@ -1251,9 +1255,9 @@ price2num(GETPOST('remise_percent'), '', 2), '', '', - '', - '', - '', + 0, + 0, + 0, $price_base_type, $pu_ttc, Facture::TYPE_STANDARD, @@ -1262,12 +1266,12 @@ '', 0, 0, - null, + 0, $buyprice, '', - 0, + array(), 100, - '', + 0, $object->fk_unit ); @@ -1328,6 +1332,7 @@ // Load object modBarCodeProduct $res = 0; +$modBarCodeProduct = null; if (isModEnabled('barcode') && getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')) { $module = strtolower(getDolGlobalString('BARCODE_PRODUCT_ADDON_NUM')); $dirbarcode = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); @@ -1339,6 +1344,7 @@ } if ($res > 0) { $modBarCodeProduct = new $module(); + '@phan-var-force ModeleBarCode $modBarCodeProduct'; } } @@ -1522,7 +1528,7 @@ $showbarcode = 0; } - if ($showbarcode) { + if ($showbarcode && is_object($modBarCodeProduct)) { print ''.$langs->trans('BarcodeType').''; if (GETPOSTISSET('fk_barcode_type')) { $fk_barcode_type = GETPOST('fk_barcode_type') ? GETPOST('fk_barcode_type') : 0; @@ -1740,7 +1746,7 @@ // Categories print ''.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 3); - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } @@ -1802,7 +1808,7 @@ } else { $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; // Accountancy_code_sell_intra @@ -1814,7 +1820,7 @@ } else { $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; } @@ -1826,7 +1832,7 @@ } else { $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; // Accountancy_code_buy @@ -1837,7 +1843,7 @@ } else { $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : getDolGlobalString("ACCOUNTING_SERVICE_BUY_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; // Accountancy_code_buy_intra @@ -1849,7 +1855,7 @@ } else { $accountancy_code_buy_intra = (GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_buy_intra, 'accountancy_code_buy_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; } @@ -1861,7 +1867,7 @@ } else { $accountancy_code_buy_export = (GETPOST('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export', 'alpha') : getDolGlobalString("ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT")); } - print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, 'minwidth150 maxwidth300', 1); + print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, array(), 1, 1, 'minwidth150 maxwidth300', 1); print ''; } else {// For external software if (!empty($accountancy_code_sell)) { @@ -2367,7 +2373,7 @@ $arrayselected[] = $cat; } } - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } @@ -2392,41 +2398,41 @@ // Accountancy_code_sell print ''.$langs->trans("ProductAccountancySellCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell') : $object->accountancy_code_sell), 'accountancy_code_sell', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell') : $object->accountancy_code_sell), 'accountancy_code_sell', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; // Accountancy_code_sell_intra if ($mysoc->isInEEC()) { print ''.$langs->trans("ProductAccountancySellIntraCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra') : $object->accountancy_code_sell_intra), 'accountancy_code_sell_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra') : $object->accountancy_code_sell_intra), 'accountancy_code_sell_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; } // Accountancy_code_sell_export print ''.$langs->trans("ProductAccountancySellExportCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export') : $object->accountancy_code_sell_export), 'accountancy_code_sell_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export') : $object->accountancy_code_sell_export), 'accountancy_code_sell_export', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; // Accountancy_code_buy print ''.$langs->trans("ProductAccountancyBuyCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy') ? GETPOST('accountancy_code_buy') : $object->accountancy_code_buy), 'accountancy_code_buy', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy') ? GETPOST('accountancy_code_buy') : $object->accountancy_code_buy), 'accountancy_code_buy', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; // Accountancy_code_buy_intra if ($mysoc->isInEEC()) { print ''.$langs->trans("ProductAccountancyBuyIntraCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra') : $object->accountancy_code_buy_intra), 'accountancy_code_buy_intra', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_intra') ? GETPOST('accountancy_code_buy_intra') : $object->accountancy_code_buy_intra), 'accountancy_code_buy_intra', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; } // Accountancy_code_buy_export print ''.$langs->trans("ProductAccountancyBuyExportCode").''; print ''; - print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export') : $object->accountancy_code_buy_export), 'accountancy_code_buy_export', 1, '', 1, 1, 'minwidth150 maxwidth300'); + print $formaccounting->select_account((GETPOSTISSET('accountancy_code_buy_export') ? GETPOST('accountancy_code_buy_export') : $object->accountancy_code_buy_export), 'accountancy_code_buy_export', 1, array(), 1, 1, 'minwidth150 maxwidth300'); print ''; } else { // For external software @@ -2535,7 +2541,7 @@ } $fk_barcode_type = ''; - if ($action == 'editbarcodetype') { + if ($action == 'editbarcodetype' && is_object($formbarcode)) { print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type'); $fk_barcode_type = $object->barcode_type; } else { @@ -2601,7 +2607,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell)) { $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch('', $object->accountancy_code_sell, 1); + $accountingaccount->fetch(0, $object->accountancy_code_sell, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); } @@ -2618,7 +2624,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell_intra)) { $accountingaccount2 = new AccountingAccount($db); - $accountingaccount2->fetch('', $object->accountancy_code_sell_intra, 1); + $accountingaccount2->fetch(0, $object->accountancy_code_sell_intra, 1); print $accountingaccount2->getNomUrl(0, 1, 1, '', 1); } @@ -2635,7 +2641,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_sell_export)) { $accountingaccount3 = new AccountingAccount($db); - $accountingaccount3->fetch('', $object->accountancy_code_sell_export, 1); + $accountingaccount3->fetch(0, $object->accountancy_code_sell_export, 1); print $accountingaccount3->getNomUrl(0, 1, 1, '', 1); } @@ -2651,7 +2657,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy)) { $accountingaccount4 = new AccountingAccount($db); - $accountingaccount4->fetch('', $object->accountancy_code_buy, 1); + $accountingaccount4->fetch(0, $object->accountancy_code_buy, 1); print $accountingaccount4->getNomUrl(0, 1, 1, '', 1); } @@ -2668,7 +2674,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy_intra)) { $accountingaccount5 = new AccountingAccount($db); - $accountingaccount5->fetch('', $object->accountancy_code_buy_intra, 1); + $accountingaccount5->fetch(0, $object->accountancy_code_buy_intra, 1); print $accountingaccount5->getNomUrl(0, 1, 1, '', 1); } @@ -2685,7 +2691,7 @@ if (isModEnabled('accounting')) { if (!empty($object->accountancy_code_buy_export)) { $accountingaccount6 = new AccountingAccount($db); - $accountingaccount6->fetch('', $object->accountancy_code_buy_export, 1); + $accountingaccount6->fetch(0, $object->accountancy_code_buy_export, 1); print $accountingaccount6->getNomUrl(0, 1, 1, '', 1); } @@ -2930,7 +2936,7 @@ 'name' => 'product_origin', 'label' => $langs->trans('MergeOriginProduct'), 'type' => 'other', - 'value' => $form->select_produits('', 'product_origin', '', 0, 0, 1, 2, '', 1, array(), 0, 1, 0, 'minwidth200', 0, '', null, 1), + 'value' => $form->select_produits(0, 'product_origin', '', 0, 0, 1, 2, '', 1, array(), 0, 1, 0, 'minwidth200', 0, '', null, 1), ) ); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("MergeProducts"), $langs->trans("ConfirmMergeProducts"), "confirm_merge", $formquestion, 'no', 1, 250); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 665aea2e83141..e61257b216bc1 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -1,7 +1,8 @@ - * Copyright (C) 2019 Cedric Ancelin + * Copyright (C) 2019 Cedric Ancelin * Copyright (C) 2024 Frédéric France + * 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 @@ -291,7 +292,7 @@ public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $p $obj_ret['pagination'] = array( 'total' => (int) $total, 'page' => $page, //count starts from 0 - 'page_count' => ceil((int) $total/$limit), + 'page_count' => ceil((int) $total / $limit), 'limit' => $limit ); } @@ -466,13 +467,23 @@ public function put($id, $request_data = null) if ($this->product->multiprices_base_type[$key] != $oldproduct->multiprices_base_type[$key]) { $pricemodified = true; } else { - if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) $pricemodified = true; + if ($this->product->multiprices_tva_tx[$key] != $oldproduct->multiprices_tva_tx[$key]) { + $pricemodified = true; + } if ($this->product->multiprices_base_type[$key] == 'TTC') { - if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) $pricemodified = true; - if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) $pricemodified = true; + if ($this->product->multiprices_ttc[$key] != $oldproduct->multiprices_ttc[$key]) { + $pricemodified = true; + } + if ($this->product->multiprices_min_ttc[$key] != $oldproduct->multiprices_min_ttc[$key]) { + $pricemodified = true; + } } else { - if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; - if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) $pricemodified = true; + if ($this->product->multiprices[$key] != $oldproduct->multiprices[$key]) { + $pricemodified = true; + } + if ($this->product->multiprices_min[$key] != $oldproduct->multiprices[$key]) { + $pricemodified = true; + } } } if ($pricemodified && $result > 0) { @@ -700,12 +711,12 @@ public function getCustomerPricesPerSegment($id) } return array( - 'multiprices'=>$this->product->multiprices, - 'multiprices_inc_tax'=>$this->product->multiprices_ttc, - 'multiprices_min'=>$this->product->multiprices_min, - 'multiprices_min_inc_tax'=>$this->product->multiprices_min_ttc, - 'multiprices_vat'=>$this->product->multiprices_tva_tx, - 'multiprices_base_type'=>$this->product->multiprices_base_type, + 'multiprices' => $this->product->multiprices, + 'multiprices_inc_tax' => $this->product->multiprices_ttc, + 'multiprices_min' => $this->product->multiprices_min, + 'multiprices_min_inc_tax' => $this->product->multiprices_min_ttc, + 'multiprices_vat' => $this->product->multiprices_tva_tx, + 'multiprices_base_type' => $this->product->multiprices_base_type, //'multiprices_default_vat_code'=>$this->product->multiprices_default_vat_code ); } @@ -791,8 +802,8 @@ public function getCustomerPricesPerQuantity($id) } return array( - 'prices_by_qty'=>$this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product - 'prices_by_qty_list'=>$this->product->prices_by_qty_list[0] + 'prices_by_qty' => $this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product + 'prices_by_qty_list' => $this->product->prices_by_qty_list[0] ); } diff --git a/htdocs/public/eventorganization/attendee_new.php b/htdocs/public/eventorganization/attendee_new.php index f983652d56150..53ab522f66e46 100644 --- a/htdocs/public/eventorganization/attendee_new.php +++ b/htdocs/public/eventorganization/attendee_new.php @@ -267,6 +267,8 @@ function llxFooterVierge() $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Country"))."
    \n"; } + $thirdparty = null; + if (!$error) { // Check if attendee already exists (by email and for this event) $filter = array(); @@ -327,7 +329,7 @@ function llxFooterVierge() } } - $resultconforbooth = -1; + $resultconfattendee = -1; if ($nb_post_max > 0 && $nb_post_ip >= $nb_post_max) { $error++; @@ -375,7 +377,7 @@ function llxFooterVierge() if (!getDolGlobalString('EVENTORGANIZATION_DISABLE_RETREIVE_THIRDPARTY_FROM_NAME')) { // Fetch using the field input by end user if we have just created the attendee if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($emailcompany)) { - $resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $emailcompany); + $resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', $emailcompany); if ($resultfetchthirdparty > 0) { // We found a unique result with the name + emailcompany, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -386,7 +388,7 @@ function llxFooterVierge() } // Fetch using the field input by end user if we have just created the attendee if ($resultfetchthirdparty <= 0 && !empty($societe) && !empty($email) && $email != $emailcompany) { - $resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', $email); + $resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', $email); if ($resultfetchthirdparty > 0) { // We found a unique result with the name + email, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -398,7 +400,7 @@ function llxFooterVierge() } if ($resultfetchthirdparty <= 0 && !empty($emailcompany)) { // Try to find thirdparty from the email only - $resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $emailcompany); + $resultfetchthirdparty = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', $emailcompany); if ($resultfetchthirdparty > 0) { // We found a unique result with that email only, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -409,7 +411,7 @@ function llxFooterVierge() } if ($resultfetchthirdparty <= 0 && !empty($email) && $email != $emailcompany) { // Try to find thirdparty from the email only - $resultfetchthirdparty = $thirdparty->fetch('', '', '', '', '', '', '', '', '', '', $email); + $resultfetchthirdparty = $thirdparty->fetch(0, '', '', '', '', '', '', '', '', '', $email); if ($resultfetchthirdparty > 0) { // We found a unique result with that email only, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -420,7 +422,7 @@ function llxFooterVierge() } if ($resultfetchthirdparty <= 0 && !empty($genericcompanyname)) { // Try to find thirdparty from the generic mail only - $resultfetchthirdparty = $thirdparty->fetch('', $genericcompanyname, '', '', '', '', '', '', '', '', ''); + $resultfetchthirdparty = $thirdparty->fetch(0, $genericcompanyname, '', '', '', '', '', '', '', '', ''); if ($resultfetchthirdparty > 0) { // We found a unique result with that name + email, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -434,7 +436,7 @@ function llxFooterVierge() if ($resultfetchthirdparty <= 0 && !empty($email)) { // Try to find the thirdparty from the contact - $resultfetchcontact = $contact->fetch('', null, '', $email); + $resultfetchcontact = $contact->fetch(0, null, '', $email); if ($resultfetchcontact > 0 && $contact->fk_soc > 0) { $thirdparty->fetch($contact->fk_soc); $confattendee->fk_soc = $thirdparty->id; @@ -445,7 +447,7 @@ function llxFooterVierge() if ($resultfetchthirdparty <= 0 && !empty($societe)) { // Try to find thirdparty from the company name only - $resultfetchthirdparty = $thirdparty->fetch('', $societe, '', '', '', '', '', '', '', '', ''); + $resultfetchthirdparty = $thirdparty->fetch(0, $societe, '', '', '', '', '', '', '', '', ''); if ($resultfetchthirdparty > 0) { // We found a unique result with that name only, so we set the fk_soc of attendee $confattendee->fk_soc = $thirdparty->id; @@ -495,6 +497,7 @@ function llxFooterVierge() } } $modCodeClient = new $module($db); + '@phan-var-force ModeleThirdPartyCode $modCodeClient'; if (empty($tmpcode) && !empty($modCodeClient->code_auto)) { $tmpcode = $modCodeClient->getNextValue($thirdparty, 0); @@ -517,7 +520,7 @@ function llxFooterVierge() } } - if (!$error) { + if (!$error && is_object($thirdparty)) { // If the registration needs a payment if (!empty((float) $project->price_registration)) { $outputlangs = $langs; @@ -535,6 +538,7 @@ function llxFooterVierge() $resultprod = $productforinvoicerow->fetch(getDolGlobalString('SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION')); } + $facture = null; // Create the draft invoice for the payment if ($resultprod < 0) { $error++; @@ -596,7 +600,7 @@ function llxFooterVierge() $pu_ht = 0; $price_base_type = 'TTC'; - $result = $facture->addline($labelforproduct, $pu_ht, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0, '', $price_base_type, $pu_ttc, 1); + $result = $facture->addline($labelforproduct, $pu_ht, 1, $vattouse, 0, 0, $productforinvoicerow->id, 0, $date_start, $date_end, 0, 0, 0, $price_base_type, $pu_ttc, 1); if ($result <= 0) { $confattendee->error = $facture->error; $confattendee->errors = $facture->errors; @@ -605,7 +609,7 @@ function llxFooterVierge() } } - if (!$error) { + if (!$error && is_object($facture)) { $db->commit(); // Registration was recorded and invoice was generated, but payment not yet done. @@ -657,6 +661,9 @@ function llxFooterVierge() if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; $msg = $arraydefaultmessage->content; + } else { + $subject = null; + $msg = null; } $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty); diff --git a/htdocs/public/partnership/new.php b/htdocs/public/partnership/new.php index da85456f3ad3b..a7cb09f6b37d6 100644 --- a/htdocs/public/partnership/new.php +++ b/htdocs/public/partnership/new.php @@ -94,10 +94,10 @@ * * @param string $title Title * @param string $head Head array - * @param int $disablejs More content into html header - * @param int $disablehead More content into html header - * @param string[]|string $arrayofjs Array of complementary js files - * @param string[]|string $arrayofcss Array of complementary css files + * @param int<0,1> $disablejs More content into html header + * @param int<0,1> $disablehead More content into html header + * @param string[] $arrayofjs Array of complementary js files + * @param string[] $arrayofcss Array of complementary css files * @return void */ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = []) @@ -604,13 +604,13 @@ function llxFooterVierge() $listofpartnership[$partnershipobj->id] = $partnershipobj->label; } -if (getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) { - print $listofpartnership[getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')]; - print ''; +if (getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')) { + print $listofpartnership[getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')]; + print ''; } print ''."\n"; -if (!getDolGlobalString('PARTNERSHIP_NEWFORM_FORCETYPE')) { +if (!getDolGlobalInt('PARTNERSHIP_NEWFORM_FORCETYPE')) { print ''."\n"; diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index f8f68ff261c20..ecd08ea71a604 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -645,9 +645,9 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param int<0,max> $maxfilenamelength Max length of value to show + * @return string[]|int<-1,0> List of templates */ public static function liste_modeles($db, $maxfilenamelength = 0) { diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 563269809c452..0e8fee903711a 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2570,7 +2570,7 @@ function init_check_no_email(input) { } $i++; } - if ($NBCOLS > 0 && $j % 2 == 1) { + if ($NBCOLS > 0 && ($j % 2) == 1) { print ''; } diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index b757b28c6b0fb..2362599a432d1 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2018 Pierre Chéné - * Copyright (C) 2019 Cedric Ancelin + * Copyright (C) 2019 Cedric Ancelin * Copyright (C) 2020-2024 Frédéric France * Copyright (C) 2023 Alexandre Janniaux * Copyright (C) 2024 MDW diff --git a/htdocs/workstation/class/api_workstations.class.php b/htdocs/workstation/class/api_workstations.class.php index a35388697d780..263a7b28c777d 100644 --- a/htdocs/workstation/class/api_workstations.class.php +++ b/htdocs/workstation/class/api_workstations.class.php @@ -1,7 +1,8 @@ - * Copyright (C) 2019 Cedric Ancelin - * Copyright (C) 2024 Christian Humpel +/* Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2019 Cedric Ancelin + * Copyright (C) 2024 Christian Humpel + * 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 @@ -170,7 +171,7 @@ public function index($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $p $obj_ret['pagination'] = array( 'total' => (int) $total, 'page' => $page, //count starts from 0 - 'page_count' => ceil((int) $total/$limit), + 'page_count' => ceil((int) $total / $limit), 'limit' => $limit ); } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 502b0961488bc..4dbc3a640b43b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -51,9 +51,11 @@ parameters: - '#(?:Variable \$(?:_(?:FILES|POST|SERVER)|array_propal_object|baseUri|current_fiscal_period|d(?:b_create_(?:database|user)|olibarr_main_(?:db_prefix|url_root)|raftchecked)|erreur_ajout_date|isImageValid|keyforstripeterminalbank|(?:lo|mar)gin|max|n(?:ewProperty|um)|p(?:ermsgroupbyentitypluszero|ro(?:gressCalculated|parrayofkeyval)|ublic)|t(?:(?:itl|otal_tim)e|va_tx)|var)) in isset\(\) always exists and is not nullable#' - '#(?:Property CommonOrderLine::\$multicurrency_subprice \(float\) on left side of \?\?|isset\(\)) is not nullable#' - '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always false#' - - '#(?:Comparison operation "(?:<(?:" between (?:0(?:(?:\|1)? and 0)|21(?: and 14|\.0 and 17)|int<(?:0, max>(?:(?:\|false)? and 0)|1, max> and 1)|null and 0)|=" between int<2, max> and 1)|>(?:" between (?:(?:-1|0) and 0|0(?: and 1(?:000)?|\|1\|2\|3 and 999)|1 and 1)|=" between 0 and 8))) is always fal#' + - '#(?:Comparison operation "(?:<(?:" between (?:0(?:(?:\|1)? and 0)|int<(?:0, max>(?:(?:\|false)? and 0)|1, max> and 1)|null and 0)|=" between int<2, max> and 1)|>(?:" between (?:(?:-1|0) and 0|0(?: and 1(?:000)?|\|1\|2\|3 and 999)|1 and 1)))) is always false#' + - '#(?:Comparison operation ">=" between 0 and 8) is always false#' + - "#(?:Comparison operation .<. between '' and 0 is always) true#" - - '#(?:Comparison operation "(?:<(?:" between (?:(?:..|-1) and 0|0 and 4)|=" between (?:0 and 0|int<100, 999> and 999))|>(?:" between (?:1(?:(?:\|2)? and 0)|int<(?:1, max> and 0|2, max> and 1))|=" between (?:\S+ and 0|21\.0 and (?:15|6\.0)|int<(?:0, max> and 0|1, max> and 1))))) is always true#' + - '#(?:Comparison operation "(?:<(?:" between (?:(?:..|-1) and 0|0 and 4)|=" between (?:0 and 0|int<100, 999> and 999))|>(?:" between (?:1(?:(?:\|2)? and 0)|int<(?:1, max> and 0|2, max> and 1))|=" between (?:\S+ and 0|int<(?:0, max> and 0|1, max> and 1))))) is always true#' - '#(?:Else branch is unreachable because (?:(?:previous|ternary operator) condition)) is always true#' - '#(?:(?:Elsei|I)f condition|Left side of (?:&&|\|\|)|Negated boolean expression|R(?:esult of (?:&&|\|\|)|ight side of (?:&&|\|\|))|Ternary operator condition) is always true#' - '#is_object\(\) with mixed will always evaluate to false#' @@ -78,7 +80,8 @@ parameters: - '#EvalMath::trigger\(\) expects string, int given#' - '# Diff::generatePartialDiff\(\) expects array#' - '# EmailCollector::getpart\(\) expects string#' - - '#expects int, float#' + - '#(?:convertSecondToTime) expects int, float\|string given#' + - '#(?:Comm(?:(?:ande::updateline|on(?:Invoice::getLibStatut|StickerGenerator::(?:Set_Char_Size|_Croix|convertMetric)))\(\))|Facture(?:(?:::update|FournisseurRec::add)line\(\))|(?:Holiday::addLogCP|Loan::getLibStatut|SupplierProposal::updateline)\(\)|c(?:alcul_price_total|onvert(?:DurationtoHour|SecondToTime))|dol_(?:substr|time_plus_duree)|pdf_(?:azur::_tableau_(?:(?:info|tot)\(\))|ban(?:::_tableau\(\)|k)|c(?:anelle::_tableau_(?:(?:tot|versements)\(\))|ornas::_tableau_(?:(?:info|tot)\(\))|rabe::_tableau_(?:(?:info|tot|versements)\(\))|yan::draw(?:(?:Info|Total)Table\(\)))|e(?:agle(?:(?:::_tableau_tot|_proforma::drawTotalTable)\(\))|instein::_tableau_(?:(?:info|tot)\(\))|ratosthene::draw(?:(?:Info|Total)Table\(\))|spadon::_tableau_tot\(\))|muscadet::_tableau_(?:(?:info|tot)\(\))|octopus::(?:_table(?:(?:FirstPage|au)\(\))|draw(?:(?:Info|Total)Table\(\)))|page(?:foot|head)|(?:rouget::_tableau_tot|s(?:epamandate::_tableau(?:_info)?|ponge::draw(?:(?:Info|Total)Table)|quille::_tableau_tot|t(?:andard_(?:e(?:(?:valuation|xpensereport)::_tableau|xpensereport::tablePayments)|(?:myobjec|supplierpaymen)t::_tableau|supplierpayment::_tableau_cheque)|orm::_tableau_info|rato::tabSignature))|t(?:cpdflabel::writeBarcode|yphon::_tableau_info)|vinci::_tableau_info)\(\)|w(?:atermark|rite(?:LinkedObjects|linedesc))|zenith::_tableau_tot\(\))|usleep) expects int, float given\.#' - '#::saveboxorder\(\) expects int, array#' - '# (fetchObjectByElement|print_actions_filter|dol_mktime|dol_remove_file_process) expects int, array\|string given.#' - '# (CSMSFile) constructor expects int, array\|string given.#' From 34e3717dda5266d71a7a97b2f3fe1b553e4fb1ad Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 6 Oct 2024 13:03:43 +0200 Subject: [PATCH 300/329] Qual: Fix phan/phpstan notices (#31289) * Qual: Fix phan/phpstan notices # Qual: Fix phan/phpstan notices Fix several phan/phpstan notices * Fix spelling in Changelog --- ChangeLog | 4 +- dev/tools/codespell/codespell-dict.txt | 3 +- dev/tools/phan/baseline.txt | 45 +++---- htdocs/admin/system/dolibarr.php | 6 +- htdocs/core/lib/functions.lib.php | 24 ++-- .../modules/project/mod_project_simple.php | 2 +- .../modules/project/mod_project_universal.php | 2 +- .../core/modules/project/modules_project.php | 2 +- htdocs/product/card.php | 22 ++-- .../class/productfournisseurprice.class.php | 121 ++++++++++++++++-- htdocs/product/stock/massstockmove.php | 13 +- .../class/stocktransfer.class.php | 32 ++++- .../class/stocktransferline.class.php | 30 ++++- .../lib/stocktransfer_stocktransfer.lib.php | 3 +- .../stocktransfer/stocktransfer_card.php | 8 +- .../product/stock/tpl/stockcorrection.tpl.php | 12 +- .../product/stock/tpl/stocktransfer.tpl.php | 11 +- htdocs/projet/activity/index.php | 3 + htdocs/projet/admin/project.php | 6 +- htdocs/projet/card.php | 11 +- htdocs/projet/class/api_projects.class.php | 29 ++++- htdocs/projet/class/project.class.php | 2 +- htdocs/projet/element.php | 13 +- htdocs/projet/tasks/time.php | 12 +- htdocs/public/cron/cron_run_jobs_by_url.php | 5 +- htdocs/public/project/new.php | 2 + htdocs/societe/class/societe.class.php | 2 +- phpstan.neon.dist | 5 +- 28 files changed, 317 insertions(+), 113 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73f9213db9423..a5a0368f78340 100644 --- a/ChangeLog +++ b/ChangeLog @@ -165,7 +165,7 @@ NEW: Module Website: Can link/unlink translation between web pages NEW: Move dir of cache for widgets NEW: multiselect with checkbox in categories/tags search for thirdparty list (#28335) NEW: new consts to redirect from massaction createbills (#29436) -NEW: new global string to preselect yes for one bill per thirparty in orderlist massaction (#29359) +NEW: new global string to preselect yes for one bill per third party in orderlist massaction (#29359) NEW: notification action triggers for cancelling orders and invoices NEW: now button when editing an event NEW: online signature of shipments (#29559) @@ -3303,7 +3303,7 @@ FIX: fix checkbox displayed according to module project setup parameters - work FIX: inconsistency in margin recording with option "Force to sale price" FIX: invoice PDF generation after payment FIX: mask selector fournisseur if module not activate -FIX: merge thirparty also work for bank URL entry +FIX: merge third party also works for bank URL entry FIX: Missing extrafields into export of agenda record FIX: missing parameter in select for POP FIX: missing return edit if update error diff --git a/dev/tools/codespell/codespell-dict.txt b/dev/tools/codespell/codespell-dict.txt index 9b3a3e36f02de..f26d7250488ec 100644 --- a/dev/tools/codespell/codespell-dict.txt +++ b/dev/tools/codespell/codespell-dict.txt @@ -43,7 +43,8 @@ tableau de bord->state board tagret->target tdoverflowmax100aaa->tdoverflowmax100 tdoverlowmax200->tdoverflowmax200 -thridparty->thirdparty +thirparty->thirdparty, third party, +thridparty->thirdparty, third party, with100->width100 with75->width75 wysiwig->wysiwyg diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 781764f5fe1a9..e30ba6f11ffde 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,35 +9,35 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 1150+ occurrences - // PhanUndeclaredProperty : 850+ occurrences - // PhanPossiblyUndeclaredGlobalVariable : 660+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 500+ occurrences + // PhanPluginUnknownPropertyType : 1100+ occurrences + // PhanUndeclaredProperty : 840+ occurrences + // PhanPossiblyUndeclaredGlobalVariable : 640+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 490+ occurrences // PhanUndeclaredGlobalVariable : 420+ occurrences // PhanPluginUnknownArrayMethodReturnType : 410+ occurrences - // PhanPluginUnknownArrayMethodParamType : 310+ occurrences + // PhanPluginUnknownArrayMethodParamType : 300+ occurrences // PhanPossiblyUndeclaredVariable : 270+ occurrences // PhanTypeMismatchProperty : 180+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 140+ occurrences // PhanPluginUnknownArrayFunctionParamType : 120+ occurrences - // PhanTypeMismatchArgumentNullableInternal : 75+ occurrences // PhanPluginUnknownArrayPropertyType : 70+ occurrences + // PhanTypeMismatchArgumentNullableInternal : 70+ occurrences // PhanPluginUndeclaredVariableIsset : 65+ occurrences // PhanPluginEmptyStatementIf : 50+ occurrences - // PhanPluginUnknownObjectMethodCall : 50+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences + // PhanPluginUnknownObjectMethodCall : 40+ occurrences // PhanTypeInvalidDimOffset : 35+ occurrences // PhanTypeMismatchDimFetch : 30+ occurrences // PhanTypeExpectedObjectPropAccess : 25+ occurrences // PhanPossiblyNullTypeMismatchProperty : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences - // PhanUndeclaredMethod : 15+ occurrences // PhanEmptyForeach : 10+ occurrences // PhanPluginConstantVariableNull : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences + // PhanUndeclaredMethod : 10+ occurrences // PhanPluginBothLiteralsBinaryOp : 8 occurrences // PhanPluginDuplicateExpressionBinaryOp : 7 occurrences // PhanParamTooMany : 5 occurrences @@ -709,13 +709,13 @@ return [ 'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'], 'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'], - 'htdocs/product/card.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'], + 'htdocs/product/card.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], 'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'], 'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], 'htdocs/product/class/productcustomerprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'], - 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/product/class/productfournisseurprice.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'], 'htdocs/product/class/propalmergepdfproduct.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/product/dynamic_price/class/price_global_variable.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'], @@ -740,7 +740,6 @@ return [ 'htdocs/product/stock/class/productstockentrepot.class.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/massstockmove.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'], @@ -752,28 +751,24 @@ return [ 'htdocs/product/stock/stats/mo.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stats/reception.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stockatdate.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stock/stocktransfer/class/stocktransfer.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'], - 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanUndeclaredProperty'], 'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], - 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], + 'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], - 'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/projet/activity/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'], + 'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanUndeclaredProperty'], + 'htdocs/product/stock/tpl/stocktransfer.tpl.php' => ['PhanUndeclaredProperty'], + 'htdocs/projet/activity/index.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeExpectedObjectPropAccessButGotNull', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/activity/perday.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/activity/perweek.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/admin/project.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/projet/admin/project.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/projet/class/api_projects.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall'], + 'htdocs/projet/card.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/projet/class/api_tasks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], - 'htdocs/projet/class/project.class.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/projet/class/taskstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/projet/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/projet/element.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], + 'htdocs/projet/element.php' => ['PhanUndeclaredProperty'], 'htdocs/projet/ganttchart.inc.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/projet/ganttview.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/projet/graph_opportunities.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'], @@ -792,7 +787,7 @@ return [ 'htdocs/public/agenda/agendaexport.php' => ['PhanRedefineFunction'], 'htdocs/public/bookcal/index.php' => ['PhanRedefineFunction'], 'htdocs/public/company/new.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/public/cron/cron_run_jobs_by_url.php' => ['PhanUndeclaredProperty'], 'htdocs/public/demo/index.php' => ['PhanRedefineFunction'], 'htdocs/public/donations/donateurs_code.php' => ['PhanRedefineFunction'], 'htdocs/public/emailing/mailing-read.php' => ['PhanRedefineFunction'], @@ -808,7 +803,7 @@ return [ 'htdocs/public/payment/paymentko.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/public/payment/paymentok.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], 'htdocs/public/project/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], - 'htdocs/public/project/new.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanUndeclaredProperty'], + 'htdocs/public/project/new.php' => ['PhanRedefineFunction', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestbooth.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'], diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index 19c7ec5f819af..a216e256d554b 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -244,10 +244,10 @@ $dec = $langs->transnoentitiesnoconv("SeparatorDecimal"); print ''."\n"; // Show results of functions to see if everything works -print ''."\n"; -print '\n"; +print ''."\n"; +print '\n"; if (($thousand != ',' && $thousand != '.') || ($thousand != ' ')) { - print '"; + print '"; print "\n"; } print ''."\n"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 36320d98fb5ff..f0c1d6c19aa4a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1102,7 +1102,7 @@ function GETPOSTINT($paramname, $method = 0) * Return the value of a $_GET or $_POST supervariable, converted into float. * * @param string $paramname Name of the $_GET or $_POST parameter - * @param string|int $rounding Type of rounding ('', 'MU', 'MT, 'MS', 'CU', 'CT', integer) {@see price2num()} + * @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int $rounding Type of rounding ('', 'MU', 'MT, 'MS', 'CU', 'CT', integer) {@see price2num()} * @return float Value converted into float * @since Dolibarr V20 */ @@ -6670,8 +6670,8 @@ function vatrate($rate, $addpercent = false, $info_bits = 0, $usestarfornpr = 0, * @param int<0,1> $form Type of formatting: 1=HTML, 0=no formatting (no by default) * @param Translate|string|null $outlangs Object langs for output. '' use default lang. 'none' use international separators. * @param int $trunc 1=Truncate if there is more decimals than MAIN_MAX_DECIMALS_SHOWN (default), 0=Does not truncate. Deprecated because amount are rounded (to unit or total amount accuracy) before being inserted into database or after a computation, so this parameter should be useless. - * @param int $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), getDolGlobalString('MAIN_MAX_DECIMALS_TOT')) - * @param int|string $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, -2=keep non zero part, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal + * @param int<-1,max> $rounding MINIMUM number of decimal to show: 0=no change, -1=we use min(getDolGlobalString('MAIN_MAX_DECIMALS_UNIT'), getDolGlobalString('MAIN_MAX_DECIMALS_TOT')) + * @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int<-2,max> $forcerounding MAXIMUM number of decimal to forcerounding decimal: -1=no change, -2=keep non zero part, 'MU' or 'MT' or a numeric to round to MU or MT or to a given number of decimal * @param string $currency_code To add currency symbol (''=add nothing, 'auto'=Use default currency, 'XXX'=add currency symbols for XXX currency) * @return string String with formatted amount * @@ -6786,14 +6786,14 @@ function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $ * should be roundtext2num(). * * @param string|float $amount Amount to convert/clean or round - * @param string|int $rounding ''=No rounding - * 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT) - * 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT) - * 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK) - * 'CU'=Round to Max unit price of foreign currency accuracy - * 'CT'=Round to Max for totals with Tax of foreign currency accuracy - * Numeric = Nb of digits for rounding (For example 2 for a percentage) - * @param int $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done) + * @param ''|'MU'|'MT'|'MS'|'CU'|'CT'|int<0,max> $rounding ''=No rounding + * 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT) + * 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT) + * 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK) + * 'CU'=Round to Max unit price of foreign currency accuracy + * 'CT'=Round to Max for totals with Tax of foreign currency accuracy + * Numeric = Nb of digits for rounding (For example 2 for a percentage) + * @param int<0,2> $option Put 1 if you know that content is already universal format number (so no correction on decimal will be done) * Put 2 if you know that number is a user input (so we know we have to fix decimal separator). * @return string Amount with universal numeric format (Example: '99.99999'), or error message. * If conversion fails to return a numeric, it returns: @@ -6931,7 +6931,7 @@ function price2num($amount, $rounding = '', $option = 0) * @param int $unit Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...) * @param string $type 'weight', 'volume', ... * @param Translate $outputlangs Translate language object - * @param int $round -1 = non rounding, x = number of decimal + * @param int<-1,max> $round -1 = non rounding, x = number of decimal * @param string $forceunitoutput 'no' or numeric (-3, -6, ...) compared to $unit (In most case, this value is value defined into $conf->global->MAIN_WEIGHT_DEFAULT_UNIT) * @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated. * @return string String to show dimensions diff --git a/htdocs/core/modules/project/mod_project_simple.php b/htdocs/core/modules/project/mod_project_simple.php index 1d4df75aaf296..5319b83156ee1 100644 --- a/htdocs/core/modules/project/mod_project_simple.php +++ b/htdocs/core/modules/project/mod_project_simple.php @@ -123,7 +123,7 @@ public function canBeActivated($object) /** * Return next value * - * @param Societe $objsoc Object third party + * @param ?Societe $objsoc Object third party * @param Project $project Object project * @return string|int<-1,0> Value if OK, 0 if KO */ diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index 93215ba2bf0f9..2be62efa5f399 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -133,7 +133,7 @@ public function getExample() /** * Return next value * - * @param Societe $objsoc Object third party + * @param ?Societe $objsoc Object third party * @param Project $project Object project * @return string|int<-1,0> Value if OK, 0 if KO */ diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 92bd6d61c7731..48885f0e4c7e7 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -87,7 +87,7 @@ abstract class ModeleNumRefProjects extends CommonNumRefGenerator /** * Return next value * - * @param Societe $objsoc Object third party + * @param ?Societe $objsoc Object third party * @param Project $project Object project * @return string|int<-1,0> Value if OK, 0 if KO */ diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a263499408533..331ff7d85fcf9 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -518,14 +518,14 @@ $object->price_base_type = GETPOST('price_base_type', 'aZ09'); $object->mandatory_period = !empty(GETPOST("mandatoryperiod", 'alpha')) ? 1 : 0; if ($object->price_base_type == 'TTC') { - $object->price_ttc = GETPOST('price'); + $object->price_ttc = GETPOSTFLOAT('price'); } else { - $object->price = GETPOST('price'); + $object->price = GETPOSTFLOAT('price'); } if ($object->price_base_type == 'TTC') { - $object->price_min_ttc = GETPOST('price_min'); + $object->price_min_ttc = GETPOSTFLOAT('price_min'); } else { - $object->price_min = GETPOST('price_min'); + $object->price_min = GETPOSTFLOAT('price_min'); } $tva_tx_txt = GETPOST('tva_tx', 'alpha'); // tva_tx can be '8.5' or '8.5*' or '8.5 (XXX)' or '8.5* (XXX)' @@ -570,13 +570,13 @@ $object->localtax2_type = $localtax2_type; $object->type = $type; - $object->status = GETPOST('statut'); - $object->status_buy = GETPOST('statut_buy'); - $object->status_batch = GETPOST('status_batch'); + $object->status = GETPOSTINT('statut'); + $object->status_buy = GETPOSTINT('statut_buy'); + $object->status_batch = GETPOSTINT('status_batch'); $object->sell_or_eat_by_mandatory = GETPOSTINT('sell_or_eat_by_mandatory'); $object->batch_mask = GETPOST('batch_mask'); - $object->barcode_type = GETPOST('fk_barcode_type'); + $object->barcode_type = GETPOSTINT('fk_barcode_type'); $object->barcode = GETPOST('barcode'); // Set barcode_type_xxx from barcode_type id $stdobject = new GenericObject($db); @@ -821,7 +821,7 @@ $object->fk_unit = null; } - $object->barcode_type = GETPOST('fk_barcode_type'); + $object->barcode_type = GETPOSTINT('fk_barcode_type'); $object->barcode = GETPOST('barcode'); // Set barcode_type_xxx from barcode_type id $stdobject = new GenericObject($db); @@ -1183,7 +1183,7 @@ '', '', '', - 0, + array(), $object->fk_unit ); if ($result > 0) { @@ -1344,7 +1344,7 @@ } if ($res > 0) { $modBarCodeProduct = new $module(); - '@phan-var-force ModeleBarCode $modBarCodeProduct'; + '@phan-var-force ModeleNumRefBarCode $modBarCodeProduct'; } } diff --git a/htdocs/product/class/productfournisseurprice.class.php b/htdocs/product/class/productfournisseurprice.class.php index 27636098c5a26..b0f9850423fd5 100644 --- a/htdocs/product/class/productfournisseurprice.class.php +++ b/htdocs/product/class/productfournisseurprice.class.php @@ -120,39 +120,141 @@ class ProductFournisseurPrice extends CommonObject 'fk_barcode_type' => array('type' => 'integer', 'label' => 'Fkbarcodetype', 'enabled' => '1', 'position' => 175, 'notnull' => 0, 'visible' => -1,), 'packaging' => array('type' => 'varchar(64)', 'label' => 'Packaging', 'enabled' => '1', 'position' => 180, 'notnull' => 0, 'visible' => -1,), ); + /** + * @var int + */ public $rowid; + /** + * @var int + */ public $entity; + /** + * @var int|string + */ public $datec; + /** + * @var int + */ public $fk_product; + /** + * @var int + */ public $fk_soc; + /** + * @var string + */ public $ref_fourn; + /** + * @var string + */ public $desc_fourn; + /** + * @var int + */ public $fk_availability; + /** + * @var float + */ public $price; + /** + * @var float + */ public $quantity; + /** + * @var float + */ public $remise_percent; + /** + * @var float + */ public $remise; + /** + * @var float + */ public $unitprice; + /** + * @var float + */ public $charges; + /** + * @var string + */ public $default_vat_code; + /** + * @var float + */ public $tva_tx; + /** + * @var int + */ public $info_bits; + /** + * @var int + */ public $fk_user; + /** + * @var int + */ public $fk_supplier_price_expression; + /** + * @var string + */ public $import_key; + /** + * @var int + */ public $delivery_time_days; + /** + * @var string + */ public $supplier_reputation; + /** + * @var int + */ public $fk_multicurrency; + /** + * @var string + */ public $multicurrency_code; + /** + * @var float + */ public $multicurrency_tx; + /** + * @var float + */ public $multicurrency_price; + /** + * @var float + */ public $multicurrency_unitprice; + /** + * @var float + */ public $localtax1_tx; + /** + * @var string + */ public $localtax1_type; + /** + * @var float + */ public $localtax2_tx; + /** + * @var string + */ public $localtax2_type; + /** + * @var string + */ public $barcode; + /** + * @var int + */ public $fk_barcode_type; + /** + * @var string + */ public $packaging; // END MODULEBUILDER PROPERTIES @@ -601,11 +703,11 @@ public function reopen($user, $notrigger = 0) /** * Return a link to the object card (with optionally the picto) * - * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) - * @param string $option On what the link point to ('nolink', ...) - * @param int $notooltip 1=Disable tooltip - * @param string $morecss Add more css on link - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int<0,2> $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int<0,1> $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int<-1,1> $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) @@ -826,6 +928,7 @@ public function getNextNumRef() if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force CommonNumRefGenerator $obj'; $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { @@ -850,10 +953,10 @@ public function getNextNumRef() * * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index e1d9b2cdf8b6a..463b39d5723ad 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -88,6 +88,9 @@ $listofdata = array(); if (!empty($_SESSION['massstockmove'])) { $listofdata = json_decode($_SESSION['massstockmove'], true); + if (!is_array($listofdata)) { + $listofdata = array(); + } } $error = 0; @@ -693,17 +696,17 @@ $limit = getDolGlobalString('PRODUIT_LIMIT_SIZE'); } print img_picto($langs->trans("Product"), 'product', 'class="paddingright"'); -print $form->select_produits((isset($id_product)?$id_product:0), 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1, '', null, 1); +print $form->select_produits((isset($id_product) ? $id_product : 0), 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1, '', null, 1); print ''; // Batch number if (isModEnabled('productbatch')) { print ''; } // Qty -print ''; +print ''; // Button to add line print ''; @@ -821,7 +824,7 @@ function startsWith($haystack, $needle) /** * Fetch object with ref * - * @param Object $static_object static object to fetch + * @param CommonObject $static_object static object to fetch * @param string $tmp_ref ref of the object to fetch * @return int Return integer <0 if Ko or Id of object */ @@ -831,6 +834,6 @@ function fetchref($static_object, $tmp_ref) $tmp_ref = str_replace('ref:', '', $tmp_ref); } $static_object->id = 0; - $static_object->fetch('', $tmp_ref); + $static_object->fetch(0, $tmp_ref); return $static_object->id; } diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index 4ba9ea6f01e70..b5dcf35939897 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -169,22 +169,41 @@ class StockTransfer extends CommonObject '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'),), ); + /** + * @var int + */ public $rowid; + /** + * @var string + */ public $ref; + /** + * @var string + */ public $label; + + /** + * @var string + */ public $description; /** - * @var int ID of thirparty + * @var int ID of third party */ public $socid; /** - * @var int ID of thirparty + * @var int ID of third party * @deprecated */ public $fk_soc; + /** + * @var int + */ public $lead_time_for_warning; + /** + * @var int + */ public $status; /** @@ -1014,6 +1033,7 @@ public function getNextNumRef() if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force ModeleNumRefStockTransfer $obj'; $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { @@ -1038,10 +1058,10 @@ public function getNextNumRef() * * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index 6d4ec87f02ee5..bcaf9d3d6f788 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -96,17 +96,38 @@ class StockTransferLine extends CommonObjectLine '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",), ); + /** + * @var int + */ public $rowid; + /** + * @var float + */ public $amount; /** * @var float Quantity */ public $qty; + /** + * @var int + */ public $fk_warehouse_destination; + /** + * @var int + */ public $fk_warehouse_source; + /** + * @var int + */ public $fk_stocktransfer; + /** + * @var int + */ public $fk_product; + /** + * @var string + */ public $batch; /** @@ -919,6 +940,7 @@ public function getNextNumRef() if (class_exists($classname)) { $obj = new $classname(); + '@phan-var-force ModeleNumRefStockTransfer $obj'; $numref = $obj->getNextValue($this); if ($numref != '' && $numref != '-1') { @@ -943,10 +965,10 @@ public function getNextNumRef() * * @param string $modele Force template to use ('' to not force) * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) diff --git a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php index af8444991edd6..3434264cd49de 100644 --- a/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php +++ b/htdocs/product/stock/stocktransfer/lib/stocktransfer_stocktransfer.lib.php @@ -1,6 +1,7 @@ + * 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 @@ -26,7 +27,7 @@ * Prepare array of tabs for StockTransfer * * @param StockTransfer $object StockTransfer - * @return array Array of tabs + * @return array Array of tabs */ function stocktransferPrepareHead($object) { diff --git a/htdocs/product/stock/stocktransfer/stocktransfer_card.php b/htdocs/product/stock/stocktransfer/stocktransfer_card.php index 94f564465ee4c..ca0aadaa0475a 100644 --- a/htdocs/product/stock/stocktransfer/stocktransfer_card.php +++ b/htdocs/product/stock/stocktransfer/stocktransfer_card.php @@ -153,7 +153,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname); + $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { $object->setProject(GETPOSTINT('projectid')); @@ -193,7 +193,7 @@ } } - if ($prod->status_batch==2 && abs($qty)>1) { + if ($prod->status_batch == 2 && abs($qty) > 1) { $error++; setEventMessages($langs->transnoentities('TooManyQtyForSerialNumber', $prod->ref), null, 'errors'); } @@ -256,7 +256,7 @@ } } - if ($prod->status_batch==2 && abs($qty)>1) { + if ($prod->status_batch == 2 && abs($qty) > 1) { $error++; setEventMessages($langs->transnoentities('TooManyQtyForSerialNumber', $prod->ref), null, 'errors'); $action = 'editline'; @@ -547,10 +547,10 @@ if ($action == 'deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); } + $formquestion = array(); // Clone confirmation if ($action == 'clone') { // Create an array for form - $formquestion = array(); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } elseif ($action == 'destock') { // Destock confirmation // Create an array for form diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 59cb0fa4ad120..c5a592bd2dd73 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -1,6 +1,7 @@ * Copyright (C) 2018-2024 Frédéric France + * 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 @@ -25,6 +26,13 @@ exit(1); } +' +@phan-var-force Entrepot|MouvementStock $object +@phan-var-force FormProduct $formproduct +@phan-var-force FormProjets $formproject +@phan-var-force string $backtopage +'; + ?> @@ -150,14 +158,14 @@ function init_price() if (empty($ident) && getDolGlobalString('MAIN_DEFAULT_WAREHOUSE')) { $ident = getDolGlobalString('MAIN_DEFAULT_WAREHOUSE'); } - print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100 maxwidth300 widthcentpercentminusx'); + print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth100 maxwidth300 widthcentpercentminusx'); print ''; } if ($object->element == 'stockmouvement') { print ''; print ''; } print ''; diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index c7bac77a67b42..e5c9b2333aa3a 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Frédéric France + * 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 @@ -25,9 +26,15 @@ exit(1); } +' +@phan-var-force Entrepot|MouvementStock $object +@phan-var-force FormProduct $formproduct +@phan-var-force string $backtopage +'; + ?> - + element == 'product') { @@ -82,7 +89,7 @@ print ''; print ''; } diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 7ac394fd752af..a38be8a555b81 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2010 Regis Houssin * Copyright (C) 2019 Nicolas ZABOURI * Copyright (C) 2023 Gauthier VERDOL + * 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 @@ -563,6 +564,8 @@ } else { $percentcompletion = intval($obj->duration_effective * 100 / $obj->planned_workload).'%'; } + } else { + $percentcompletion = 0; } print $percentcompletion; print ''; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index a1e2c984e58b5..444599eefba18 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -561,6 +561,7 @@ require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFProjects $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -575,7 +576,7 @@ print(empty($module->name) ? $name : $module->name); print ""; } @@ -981,7 +982,7 @@ function change_percent() if ($action == 'delete') { $text = $langs->trans("ConfirmDeleteAProject"); $task = new Task($db); - $taskarray = $task->getTasksArray(0, 0, $object->id, 0, 0); + $taskarray = $task->getTasksArray(null, null, $object->id, 0, 0); $nboftask = count($taskarray); if ($nboftask) { $text .= '
    '.img_warning().' '.$langs->trans("ThisWillAlsoRemoveTasks", $nboftask); @@ -993,7 +994,7 @@ function change_percent() if ($action == 'clone') { $formquestion = array( 'text' => $langs->trans("ConfirmClone"), - 0 => array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid') > 0 ? GETPOSTINT('socid') : $object->socid, 'socid', '', "None", 0, 0, null, 0, 'minwidth200 maxwidth250')), + 0 => array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid') > 0 ? GETPOSTINT('socid') : $object->socid, 'socid', '', "None", 0, 0, array(), 0, 'minwidth200 maxwidth250')), 1 => array('type' => 'checkbox', 'name' => 'clone_contacts', 'label' => $langs->trans("CloneContacts"), 'value' => true), 2 => array('type' => 'checkbox', 'name' => 'clone_tasks', 'label' => $langs->trans("CloneTasks"), 'value' => true), 3 => array('type' => 'checkbox', 'name' => 'move_date', 'label' => $langs->trans("CloneMoveDate"), 'value' => true), diff --git a/htdocs/projet/class/api_projects.class.php b/htdocs/projet/class/api_projects.class.php index 81f4bea74964a..979745c38051f 100644 --- a/htdocs/projet/class/api_projects.class.php +++ b/htdocs/projet/class/api_projects.class.php @@ -31,7 +31,7 @@ class Projects extends DolibarrApi { /** - * @var array $FIELDS Mandatory fields, checked when create and update object + * @var string[] $FIELDS Mandatory fields, checked when create and update object */ public static $FIELDS = array( 'ref', @@ -197,6 +197,8 @@ public function getByMsgId($email_msgid) * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names * @param bool $pagination_data If this parameter is set to true the response will include pagination data. Default value is false. Page starts from 0* * @return array Array of project objects + * @phan-return array{data:Project[],pagination:array{total:int,page:int,page_count:int,limit:int}} + * @phpstan-return array{data:Project[],pagination:array{total:int,page:int,page_count:int,limit:int}} */ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $category = 0, $sqlfilters = '', $properties = '', $pagination_data = false) { @@ -302,6 +304,8 @@ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, * Create project object * * @param array $request_data Request data + * @phan-param array $request_data + * @phpstan-param array $request_data * @return int ID of project */ public function post($request_data = null) @@ -352,6 +356,7 @@ public function post($request_data = null) $result = dol_include_once($reldir . "core/modules/project/" . $modele . '.php'); if ($result !== false && class_exists($classname)) { $modProject = new $classname(); + '@phan-var-force ModeleNumRefProjects $modProject'; $defaultref = $modProject->getNextValue(null, $this->project); } else { dol_syslog("Failed to include module file or invalid classname: " . $reldir . "core/modules/project/" . $modele . '.php', LOG_ERR); @@ -385,6 +390,8 @@ public function post($request_data = null) * @param int $id Id of project * @param int $includetimespent 0=Return only list of tasks. 1=Include a summary of time spent, 2=Include details of time spent lines * @return array + * @phan-return Object[] + * @phpstan-return Object[] * * @url GET {id}/tasks */ @@ -423,6 +430,8 @@ public function getLines($id, $includetimespent = 0) * @param int $id Id of project * @param int $userid Id of user (0 = connected user) * @return array + * @phan-return Object[] + * @phpstan-return Object[] * * @url GET {id}/roles */ @@ -465,6 +474,8 @@ public function getRoles($id, $userid = 0) * * @param int $id Id of project to update * @param array $request_data Projectline data + * @phan-param array $request_data + * @phpstan-param array $request_data * * @url POST {id}/tasks * @@ -532,6 +543,8 @@ public function postLine($id, $request_data = null) * @param int $id Id of project to update * @param int $taskid Id of task to update * @param array $request_data Projectline data + * @phan-param array $request_data + * @phpstan-param array $request_data * * @url PUT {id}/tasks/{taskid} * @@ -596,7 +609,11 @@ public function putLine($id, $lineid, $request_data = null) * * @param int $id Id of project to update * @param array $request_data Datas + * @phan-param ?array $request_data + * @phpstan-param ?array $request_data * @return Object Updated object + * @phan-return Object|false + * @phpstan-return Object|false */ public function put($id, $request_data = null) { @@ -644,6 +661,8 @@ public function put($id, $request_data = null) * @param int $id Project ID * * @return array + * @phan-return array{success:array{code:int,message:string}} + * @phpstan-return array{success:array{code:int,message:string}} */ public function delete($id) { @@ -678,10 +697,14 @@ public function delete($id) * * @param int $id Project ID * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @phan-param int<0,1> $notrigger + * @phpstan-param int<0,1> $notrigger * * @url POST {id}/validate * * @return array + * @phan-return array{success:array{code:int,message:string}} + * @phpstan-return array{success:array{code:int,message:string}} * FIXME An error 403 is returned if the request has an empty body. * Error message: "Forbidden: Content type `text/plain` is not supported." * Workaround: send this in the body @@ -775,8 +798,8 @@ protected function _cleanObjectDatas($object) /** * Validate fields before create or update object * - * @param array $data Array with data to verify - * @return array + * @param array $data Array with data to verify + * @return array * @throws RestException */ private function _validate($data) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 4e76f06bc26ca..99e27f816ce2b 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1930,7 +1930,7 @@ public function createFromClone(User $user, $fromid, $clone_contact = false, $cl $tasksarray = $taskstatic->getTasksArray(null, null, $fromid, $socid, 0); $tab_conv_child_parent = array(); - $result_clonse = 0; + $result_clone = 0; // Loop on each task, to clone it foreach ($tasksarray as $tasktoclone) { diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 5a25eee1a7f46..738ce921f7eb4 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -190,6 +190,13 @@ //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignment. $result = restrictedArea($user, 'projet', $object->id, 'projet&project'); +$total_duration = 0; +$total_ttc_by_line = 0; +$total_ht_by_line = 0; +$expensereport = null; +$othermessage = ''; +$tmpprojtime = array(); +$nbAttendees = 0; /* * Actions @@ -1707,14 +1714,16 @@ function canApplySubtotalOn($tablename) /** * sortElementsByClientName * - * @param array $elementarray Element array - * @return array Element array sorted + * @param int[] $elementarray Element array + * @return int[] Element array sorted */ function sortElementsByClientName($elementarray) { global $db, $classname; + '@phan-var-force string $classname'; $element = new $classname($db); + '@phan-var-force CommonObject $element'; $clientname = array(); foreach ($elementarray as $key => $id) { // id = id of object diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index a917a292a768a..f86e08adf6cde 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -2184,12 +2184,12 @@ function setDetailVisibility() { if (!empty($arrayfields['p.fk_soc']['checked'])) { print ''; $userstatic->id = $tabuser[$key]['id']; $userstatic->name = $tabuser[$key]['name']; - print ""; + print ""; print '"; print '"; print ""; @@ -769,7 +784,7 @@ function writebookkeeping() { print $accountoshow; } print ''; - print ""; + print ""; print '"; print '"; print ""; @@ -806,8 +821,10 @@ function writebookkeeping() { // Subledger account print "'; - print ""; + $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); + $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); + print ""; print '"; print '"; print ""; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 31e08f0bdaf9f..0652a6bfc5223 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -1,14 +1,14 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2013-2016 Olivier Geffroy - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2018-2024 Frédéric France - * Copyright (C) 2018 Eric Seigne - * Copyright (C) 2024 MDW +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2018 Eric Seigne + * 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 @@ -413,6 +413,7 @@ $companystatic = new Societe($db); $invoicestatic = new FactureFournisseur($db); $accountingaccountsupplier = new AccountingAccount($db); + $bookkeepingstatic = new BookKeeping($db); $accountingaccountsupplier->fetch(0, getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), true); @@ -481,7 +482,7 @@ $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'); $bookkeeping->label_compte = $accountingaccountsupplier->label; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("SubledgerAccount"); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount")); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt <= 0) ? -$mt : 0; @@ -559,7 +560,7 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $label_account; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref_supplier.' - '.$label_account; + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref_supplier, $label_account); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt > 0) ? $mt : 0; @@ -647,7 +648,11 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $label_account; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("VAT").' '.implode(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : ''); + $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); + $labelvataccount = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvataccount .= ($numtax ? ' - Localtax '.$numtax : ''); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref_supplier, $labelvataccount); + $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt > 0) ? $mt : 0; @@ -699,7 +704,7 @@ $bookkeeping->numero_compte = $k; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("VAT").' NPR'; + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref_supplier, $langs->trans("VAT").' NPR'); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt > 0) ? $mt : 0; @@ -793,6 +798,7 @@ $companystatic = new Fournisseur($db); $invoicestatic = new FactureFournisseur($db); + $bookkeepingstatic = new BookKeeping($db); foreach ($tabfac as $key => $val) { $companystatic->id = $tabcompany[$key]['id']; @@ -831,12 +837,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["refsologest"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER')).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.$langs->trans("Thirdparty").'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$val["refsuppliersologest"].' - '.$langs->trans("Thirdparty").'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $val["refsuppliersologest"], $langs->trans("Thirdparty"))).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -852,12 +858,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["refsologest"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; - print '"'.mb_convert_encoding(dol_trunc($accountingaccount->label, 32), 'ISO-8859-1').'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$val["refsuppliersologest"].' - '.dol_trunc($accountingaccount->label, 32).'"'.$sep; + print '"'.csvClean(dol_trunc($accountingaccount->label, 32)).'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $val["refsuppliersologest"], $accountingaccount->label)).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -904,12 +910,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["refsologest"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; print '"'.$langs->trans("VAT").' - '.implode(', ', $def_tva[$key][$k]).' %"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").implode(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : '').'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $val["refsuppliersologest"], $langs->trans("VAT").implode($def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : ''))).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -924,12 +930,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["refsologest"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.$langs->trans("Thirdparty").'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").' NPR"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $val["refsuppliersologest"], $langs->trans("VAT").' NPR')).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -1046,6 +1052,7 @@ function writebookkeeping() { $invoicestatic = new FactureFournisseur($db); $companystatic = new Fournisseur($db); + $bookkeepingstatic = new BookKeeping($db); foreach ($tabfac as $key => $val) { $companystatic->id = $tabcompany[$key]['id']; @@ -1140,7 +1147,7 @@ function writebookkeeping() { print $accountoshow; } print ''; - print ""; + print ""; print '"; print '"; print ""; @@ -1183,7 +1190,7 @@ function writebookkeeping() { print ''; $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; - print ""; + print ""; print '"; print '"; print ""; @@ -1244,7 +1251,10 @@ function writebookkeeping() { print "'; print ""; print ""; print '"; print '"; @@ -1275,7 +1285,7 @@ function writebookkeeping() { // Subledger account print "'; - print ""; + print ""; print '"; print '"; print ""; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index f0c0b1a894a60..6f175879c40ea 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -1,15 +1,15 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2016 Olivier Geffroy - * Copyright (C) 2014 Raphaël Doursenaud - * Copyright (C) 2018-2021 Frédéric France - * Copyright (C) 2024 MDW +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2014 Raphaël Doursenaud + * Copyright (C) 2018-2021 Frédéric France + * 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 @@ -457,6 +457,7 @@ $companystatic = new Societe($db); $invoicestatic = new Facture($db); + $bookkeepingstatic = new BookKeeping($db); $accountingaccountcustomer = new AccountingAccount($db); $accountingaccountcustomer->fetch(0, getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), true); @@ -529,7 +530,7 @@ $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY'); $bookkeeping->label_compte = $accountingaccountcustomerwarranty->label; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RetainedWarranty"); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("RetainedWarranty")); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C'; $bookkeeping->debit = ($mt >= 0) ? $mt : 0; @@ -579,7 +580,7 @@ $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'); $bookkeeping->label_compte = $accountingaccountcustomer->label; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$langs->trans("SubledgerAccount"); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("SubledgerAccount")); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'D' : 'C'; $bookkeeping->debit = ($mt >= 0) ? $mt : 0; @@ -657,7 +658,7 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $label_account; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref.' - '.$label_account; + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $label_account); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; $bookkeeping->debit = ($mt < 0) ? -$mt : 0; @@ -722,10 +723,10 @@ $bookkeeping->label_compte = $label_account; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16).' - '.$invoicestatic->ref; $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); - $bookkeeping->label_operation .= ' - '.$langs->trans("Taxes").' '.$tmpvatrate.' %'; - $bookkeeping->label_operation .= ($numtax ? ' - Localtax '.$numtax : ''); + $labelvataccount = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvataccount .= ($numtax ? ' - Localtax '.$numtax : ''); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $labelvataccount); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; @@ -782,7 +783,7 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $label_account; - $bookkeeping->label_operation = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp"); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("RevenueStamp")); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'D' : 'C'; $bookkeeping->debit = ($mt < 0) ? -$mt : 0; @@ -880,6 +881,7 @@ $companystatic = new Client($db); $invoicestatic = new Facture($db); + $bookkeepingstatic = new BookKeeping($db); foreach ($tabfac as $key => $val) { $companystatic->id = $tabcompany[$key]['id']; @@ -918,12 +920,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY')).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.$langs->trans("Thirdparty").'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$invoicestatic->ref.' - '.$langs->trans("RetainedWarranty").'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("RetainedWarranty"))).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -938,12 +940,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER')).'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; print '"'.$langs->trans("Thirdparty").'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$invoicestatic->ref.' - '.$langs->trans("Thirdparty").'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("Thirdparty"))).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -959,12 +961,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; - print '"'.mb_convert_encoding(dol_trunc($accountingaccount->label, 32), 'ISO-8859-1').'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.dol_trunc($accountingaccount->label, 32).'"'.$sep; + print '"'.csvClean(dol_trunc($accountingaccount->label, 32)).'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $accountingaccount->label)).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -988,12 +990,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; print '"'.$langs->trans("VAT").' - '.implode(', ', $def_tva[$key][$k]).' %"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$invoicestatic->ref.' - '.$langs->trans("VAT").implode(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : '').'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("VAT").implode($def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : ''))).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -1009,12 +1011,12 @@ print '"'.$key.'"'.$sep; print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 32), 'ISO-8859-1').'"'.$sep; + print '"'.csvClean(dol_trunc($companystatic->name, 32)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; print '"'.$langs->trans("RevenueStamp").'"'.$sep; - print '"'.mb_convert_encoding(dol_trunc($companystatic->name, 16), 'ISO-8859-1').' - '.$invoicestatic->ref.' - '.$langs->trans("RevenueStamp").'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($companystatic->name, $invoicestatic->ref, $langs->trans("RevenueStamp"))).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.$journal.'"'; @@ -1132,6 +1134,7 @@ function writebookkeeping() { $companystatic = new Client($db); $invoicestatic = new Facture($db); + $bookkeepingstatic = new BookKeeping($db); foreach ($tabfac as $key => $val) { $companystatic->id = $tabcompany[$key]['id']; @@ -1226,7 +1229,7 @@ function writebookkeeping() { print $accountoshow; } print ''; - print ""; + print ""; print '"; print '"; print ""; @@ -1257,7 +1260,7 @@ function writebookkeeping() { print $accountoshow; } print ''; - print ""; + print ""; print '"; print '"; print ""; @@ -1300,7 +1303,7 @@ function writebookkeeping() { print ''; $companystatic->id = $tabcompany[$key]['id']; $companystatic->name = $tabcompany[$key]['name']; - print ""; + print ""; print '"; print '"; print ""; @@ -1338,13 +1341,12 @@ function writebookkeeping() { // Subledger account print "'; - print ""; + $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); + print ""; print '"; print '"; print ""; @@ -1373,7 +1375,7 @@ function writebookkeeping() { // Subledger account print "'; - print ""; + print ""; print '"; print '"; print ""; diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index 60050fa52b42d..3ae29327ff016 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2021-2024 Alexandre Spangaro * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index fdc99e5e71805..30e5966f98173 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -166,6 +166,7 @@ ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties, break ability to search on a part of value) ACCOUNTING_DATE_START_BINDING=Disable binding & transfer in accountancy when date is below this date (the transactions before this date will be excluded by default) ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On the page to transfer data into accountancy, what is the period selected by default +ACCOUNTING_LABEL_OPERATION_ON_TRANSFER=When accounting is generated, default operation label ACCOUNTING_SELL_JOURNAL=Sales journal - sales and returns ACCOUNTING_PURCHASE_JOURNAL=Purchase journal - purchase and returns ACCOUNTING_BANK_JOURNAL=Cash journal - receipts and disbursements From 0b8a66f354052c00c18e9884c8a7da90e42aa152 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 16:41:31 +0200 Subject: [PATCH 306/329] Rename files to match table name --- .../mysql/tables/{llx_bank_categ.sql => llx_category_bank.sql} | 0 .../{llx_bank_class.key.sql => llx_category_bankline.key.sql} | 0 .../tables/{llx_bank_class.sql => llx_category_bankline.sql} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename htdocs/install/mysql/tables/{llx_bank_categ.sql => llx_category_bank.sql} (100%) rename htdocs/install/mysql/tables/{llx_bank_class.key.sql => llx_category_bankline.key.sql} (100%) rename htdocs/install/mysql/tables/{llx_bank_class.sql => llx_category_bankline.sql} (100%) diff --git a/htdocs/install/mysql/tables/llx_bank_categ.sql b/htdocs/install/mysql/tables/llx_category_bank.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_bank_categ.sql rename to htdocs/install/mysql/tables/llx_category_bank.sql diff --git a/htdocs/install/mysql/tables/llx_bank_class.key.sql b/htdocs/install/mysql/tables/llx_category_bankline.key.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_bank_class.key.sql rename to htdocs/install/mysql/tables/llx_category_bankline.key.sql diff --git a/htdocs/install/mysql/tables/llx_bank_class.sql b/htdocs/install/mysql/tables/llx_category_bankline.sql similarity index 100% rename from htdocs/install/mysql/tables/llx_bank_class.sql rename to htdocs/install/mysql/tables/llx_category_bankline.sql From 483bdab75b05ffcb7a8cdce45a513c604248aebc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 17:03:51 +0200 Subject: [PATCH 307/329] Close #31279 --- .../install/mysql/migration/20.0.0-21.0.0.sql | 33 +++++++++++++++++++ .../mysql/tables/llx_category_bank.sql | 2 ++ 2 files changed, 35 insertions(+) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 07159bd1847ef..92b76a5973307 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -148,3 +148,36 @@ ALTER TABLE llx_societe MODIFY COLUMN code_compta varchar(32); ALTER TABLE llx_societe MODIFY COLUMN code_compta_fournisseur varchar(32); ALTER TABLE llx_societe_perentity MODIFY COLUMN accountancy_code_customer varchar(32); ALTER TABLE llx_societe_perentity MODIFY COLUMN accountancy_code_supplier varchar(32); + + + +-- Copy categories from llx_category_bank into llx_categorie + +INSERT INTO llx_categorie (entity, fk_parent, label, type, description, color, position, visible, date_creation) +SELECT + llx_category_bank.entity, + 0 AS fk_parent, + llx_category_bank.label, + 8 AS type, + '' AS description, + '' AS color, + 0 AS position, + 1 AS visible, + NOW() AS date_creation +FROM llx_category_bank +LEFT JOIN llx_categorie + ON llx_category_bank.label = llx_categorie.label + AND llx_category_bank.entity = llx_categorie.entity + AND llx_categorie.type = 8 +WHERE llx_categorie.rowid IS NULL; + +-- Update llx_category_bankline with the new rowid from llx_categorie +UPDATE llx_category_bankline AS bl +INNER JOIN llx_category_bank AS b + ON bl.fk_categ = b.rowid +INNER JOIN llx_categorie AS c + ON b.label = c.label + AND b.entity = c.entity + AND c.type = 8 +SET bl.fk_categ = c.rowid +WHERE c.rowid IS NOT NULL; diff --git a/htdocs/install/mysql/tables/llx_category_bank.sql b/htdocs/install/mysql/tables/llx_category_bank.sql index b97764a774561..10ed331b06978 100644 --- a/htdocs/install/mysql/tables/llx_category_bank.sql +++ b/htdocs/install/mysql/tables/llx_category_bank.sql @@ -17,6 +17,8 @@ -- -- =================================================================== +-- TODO : Remove this file, content of this table has been moved into llx_categories table + create table llx_category_bank ( rowid integer AUTO_INCREMENT PRIMARY KEY, From db065d28cceab9e92c44db4e5af164b1e5d6c82b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 17:14:11 +0200 Subject: [PATCH 308/329] Complete migration for old structure. --- .../install/mysql/migration/20.0.0-21.0.0.sql | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 92b76a5973307..36b67257183a8 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -181,3 +181,32 @@ INNER JOIN llx_categorie AS c AND c.type = 8 SET bl.fk_categ = c.rowid WHERE c.rowid IS NOT NULL; + +INSERT INTO llx_categorie (entity, fk_parent, label, type, description, color, position, visible, date_creation) +SELECT + llx_bank_categ.entity, + 0 AS fk_parent, + llx_bank_categ.label, + 8 AS type, + '' AS description, + '' AS color, + 0 AS position, + 1 AS visible, + NOW() AS date_creation +FROM llx_bank_categ +LEFT JOIN llx_categorie + ON llx_bank_categ.label = llx_categorie.label + AND llx_bank_categ.entity = llx_categorie.entity + AND llx_categorie.type = 8 +WHERE llx_categorie.rowid IS NULL; + +-- Update llx_category_bankline with the new rowid from llx_categorie +UPDATE llx_category_bankline AS bl +INNER JOIN llx_bank_categ AS b + ON bl.fk_categ = b.rowid +INNER JOIN llx_categorie AS c + ON b.label = c.label + AND b.entity = c.entity + AND c.type = 8 +SET bl.fk_categ = c.rowid +WHERE c.rowid IS NOT NULL; From a2c942389b7b45cd32052c74a5d79c885dd1a463 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 18:35:51 +0200 Subject: [PATCH 309/329] Add option #24387 manually to avoid visible option --- htdocs/mrp/mo_production.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index b6ea1c26941b8..95b670ec03079 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -1358,7 +1358,7 @@ // Ref print ''; $preselected = (GETPOSTISSET('qty-'.$line->id.'-'.$i) ? GETPOST('qty-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyconsumed)); - if ($action == 'consumeorproduce' && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) { + if ($action == 'consumeorproduce' && !getDolGlobalString('MRP_AUTO_SET_REMAINING_QUANTITIES_TO_BE_CONSUMED') && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) { $preselected = 0; } From 447e5e2ee20489ce5d454c9b85ce8b0cb7ebcfd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Champlon?= <85104766+Kazimir42@users.noreply.github.com> Date: Sun, 6 Oct 2024 19:04:09 +0200 Subject: [PATCH 310/329] remove css (#25043) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rémi Champlon --- htdocs/theme/eldy/global.inc.php | 4 ---- htdocs/theme/md/style.css.php | 4 ---- 2 files changed, 8 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 5f0fffe3db665..dc8cb6d450ac2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2345,10 +2345,6 @@ max-width: 100px; vertical-align: middle; } -.backgroundforcompanylogo { - background-color: rgba(255,255,255,0.2); - border-radius: 4px; -} .menulogocontainer img.mycompany { object-fit: contain; width: inherit; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f34c06483ca11..12e667b2495a9 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3724,10 +3724,6 @@ max-width: 100px; vertical-align: middle; } -.backgroundforcompanylogo { - background-color: rgba(255,255,255,0.7); - border-radius: 5px; -} .menulogocontainer img.mycompany { object-fit: contain; width: inherit; From 93a872e8e14970bae6407191a11a3e8f916b03b0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 21:08:40 +0200 Subject: [PATCH 311/329] PERF: Reduce size for VCF files and virtualcard qrcode --- htdocs/core/class/vcard.class.php | 54 ++++++++++++++++++++++--------- htdocs/public/users/view.php | 20 ++++++++---- htdocs/user/vcard.php | 38 ++++++++++++++++++++++ htdocs/user/virtualcard.php | 43 +++++++++++++++++------- 4 files changed, 122 insertions(+), 33 deletions(-) diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index b2f755e54f92d..581af62fc8f91 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -148,7 +148,15 @@ public function setPhoto($type, $photo) */ public function setFormattedName($name) { - $this->properties["FN;".$this->encoding] = encode($name); + $stringencoded = encode($name); + $stringnotencoded = $name; + + $key = "FN"; + if ($stringencoded != $stringnotencoded) { + $key .= ";".$this->encoding; + } + + $this->properties[$key] = $stringencoded; } /** @@ -166,7 +174,9 @@ public function setName($family = "", $first = "", $additional = "", $prefix = " { //$this->properties["N;".$this->encoding] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix); $this->properties["N"] = encode($family).";".encode($first).";".encode($additional).";".encode($prefix).";".encode($suffix); + $this->filename = "$first%20$family.vcf"; + if (empty($this->properties["FN"])) { $this->setFormattedName(trim("$prefix $first $additional $family $suffix")); } @@ -209,8 +219,15 @@ public function setAddress($postoffice = "", $extended = "", $street = "", $city if ($label != "") { $key .= ';LABEL="'.encode($label).'"'; } - $key .= ";".$this->encoding; - $this->properties[$key] = encode($postoffice).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country); + + $stringencoded = encode($postoffice).";".encode($extended).";".encode($street).";".encode($city).";".encode($region).";".encode($zip).";".encode($country); + $stringnotencoded = $postoffice.";".$extended.";".$street.";".$city.";".$region.";".$zip.";".$country; + + if ($stringencoded != $stringnotencoded) { + $key .= ";".$this->encoding; + } + + $this->properties[$key] = $stringencoded; //if ($this->properties["LABEL;".$type.";".$this->encoding] == '') { //$this->setLabel($postoffice, $extended, $street, $city, $region, $zip, $country, $type); @@ -269,10 +286,14 @@ public function setLabel($postoffice = "", $extended = "", $street = "", $city = public function setEmail($address, $type = "") { $key = "EMAIL"; - if ($type == "PREF") { + if ($type === "PREF") { $key .= ";PREF=1"; } elseif (!empty($type)) { - $key .= ";TYPE=".dol_strtolower($type); + if (stripos($type, 'TYPE=') === 0) { + $key .= ";".$type; + } else { + $key .= ";TYPE=".dol_strtolower($type); + } } $this->properties[$key] = $address; } @@ -401,7 +422,7 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out $this->setProdId('Dolibarr '.DOL_VERSION); - $this->setUID('DOLIBARR-USERID-'.dol_trunc(md5('vcard'.$dolibarr_main_instance_unique_id), 8, 'right', 'UTF-8', 1).'-'.$object->id); + $this->setUID('DOL-USERID-'.dol_trunc(md5('vcard'.$dolibarr_main_instance_unique_id), 8, 'right', 'UTF-8', 1).'-'.$object->id); $this->setName($object->lastname, $object->firstname, "", $object->civility_code, ""); $this->setFormattedName($object->getFullName($langs, 1)); @@ -415,6 +436,9 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out if ($object->office_phone) { $this->setPhoneNumber($object->office_phone, "TYPE=WORK,VOICE"); } + if ($object->office_fax) { + $this->setPhoneNumber($object->office_fax, "TYPE=WORK,FAX"); + } /* disabled if ($object->personal_mobile) { $this->setPhoneNumber($object->personal_mobile, "TYPE=CELL,VOICE"); @@ -422,9 +446,6 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out if ($object->user_mobile) { $this->setPhoneNumber($object->user_mobile, "TYPE=CELL,VOICE"); } - if ($object->office_fax) { - $this->setPhoneNumber($object->office_fax, "TYPE=WORK,FAX"); - } if (!empty($object->socialnetworks)) { foreach ($object->socialnetworks as $key => $val) { @@ -460,10 +481,11 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out $country = $object->country_code ? $object->country : ''; // User address + $addressalreadyset = 0; if (!($object->element != 'user') || getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) { if ($object->address || $object->town || $object->state || $object->zip || $object->country) { $this->setAddress("", "", $object->address, $object->town, $object->state, $object->zip, $country, ""); - //$this->setLabel("", "", $object->address, $object->town, $object->state, $object->zip, $country, "TYPE=HOME"); + $addressalreadyset = 1; } } @@ -474,9 +496,9 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out if ($object->personal_email) { $this->setEmail($object->personal_email, "TYPE=HOME"); } */ - if ($object->note_public) { + /*if ($object->note_public) { $this->setNote($object->note_public); - } + }*/ if ($object->job) { $this->setTitle($object->job); } @@ -495,17 +517,17 @@ public function buildVCardString($object, $company, $langs, $urlphoto = '', $out $this->setURL($company->url, ""); - if ($company->phone && $company->phone != $object->office_phone) { + if ($company->phone && empty($object->office_phone)) { // If we already set the type TYPE=WORK,VOICE with office_phone $this->setPhoneNumber($company->phone, "TYPE=WORK,VOICE"); } - if ($company->fax && $company->fax != $object->office_fax) { + if ($company->fax && empty($object->office_fax)) { // If we already set the type TYPE=WORK,FAX with office_phone $this->setPhoneNumber($company->fax, "TYPE=WORK,FAX"); } - if ($company->address || $company->town || $company->state || $company->zip || $company->country) { + if (($company->address || $company->town || $company->state || $company->zip || $company->country) && !$addressalreadyset) { $this->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK"); } - if ($company->email && $company->email != $object->email) { + if ($company->email && empty($object->email)) { $this->setEmail($company->email, "TYPE=WORK"); } diff --git a/htdocs/public/users/view.php b/htdocs/public/users/view.php index f7c38cffc2bea..31a13d4de3954 100644 --- a/htdocs/public/users/view.php +++ b/htdocs/public/users/view.php @@ -161,9 +161,13 @@ $object->state = ''; $object->country = ''; } + if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object)) { $company = null; } +if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) && is_object($company)) { + $company->socialnetworks = []; +} // Output vcard @@ -267,7 +271,6 @@ $socialnetworksdict = getArrayOfSocialNetworks(); - // Show barcode $showbarcode = GETPOST('nobarcode') ? 0 : 1; if ($showbarcode) { @@ -277,6 +280,7 @@ print '
    '; print '
    '; + //print ''; print ''; print '
    '; print '
    '; @@ -302,22 +306,24 @@ $usersection .= ''; } -// User phone +// Office phone if ($object->office_phone && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) { $usersection .= '
    '; $usersection .= img_picto('', 'phone', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->office_phone, $object->country_code, 0, $mysoc->id, 'tel', ' ', '', ''); $usersection .= '
    '; } +// Office fax if ($object->office_fax && !getDolUserInt('USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) { $usersection .= '
    '; $usersection .= img_picto('', 'phoning_fax', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->office_fax, $object->country_code, 0, $mysoc->id, 'fax', ' ', '', ''); $usersection .= '
    '; } +// Mobile if ($object->user_mobile && !getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) { $usersection .= '
    '; - $usersection .= img_picto('', 'phone', 'class="pictofixedwidth"'); + $usersection .= img_picto('', 'phoning_mobile', 'class="pictofixedwidth"'); $usersection .= dol_print_phone($object->user_mobile, $object->country_code, 0, $mysoc->id, 'tel', ' ', '', ''); $usersection .= '
    '; } @@ -406,9 +412,11 @@ // Social networks if (!empty($mysoc->socialnetworks) && is_array($mysoc->socialnetworks) && count($mysoc->socialnetworks) > 0) { - foreach ($mysoc->socialnetworks as $key => $value) { - if ($value) { - $companysection .= '
    '.dol_print_socialnetworks($value, 0, $mysoc->id, $key, $socialnetworksdict).'
    '; + if (!getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object)) { + foreach ($mysoc->socialnetworks as $key => $value) { + if ($value) { + $companysection .= '
    '.dol_print_socialnetworks($value, 0, $mysoc->id, $key, $socialnetworksdict).'
    '; + } } } } diff --git a/htdocs/user/vcard.php b/htdocs/user/vcard.php index 09300441456b3..9678491ae42b1 100644 --- a/htdocs/user/vcard.php +++ b/htdocs/user/vcard.php @@ -59,6 +59,44 @@ * View */ +if (GETPOST('mode') == 'virtualcard') { + // Clean the data to show according to options + if (getDolUserInt('USER_PUBLIC_HIDE_PHOTO', 0, $object)) { + $object->photo = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_EMAIL', 0, $object)) { + $object->email = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_URL', 0, $object)) { + $object->url = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_OFFICE_PHONE', 0, $object)) { + $object->office_phone = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_OFFICE_FAX', 0, $object)) { + $object->office_fax = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_USER_MOBILE', 0, $object)) { + $object->user_mobile = ''; + } + if (!getDolUserInt('USER_PUBLIC_SHOW_BIRTH', 0, $object)) { + $object->birth = ''; + } + if (!getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object)) { + $object->country_code = ''; + $object->zip = ''; + $object->address = ''; + } + if (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS', 0, $object)) { + $object->socialnetworks = array(); + } + + // Business section + if (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object) || getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object)) { + $company->socialnetworks = array(); + } +} + // We create VCard $v = new vCard(); $output = $v->buildVCardString($object, $company, $langs); diff --git a/htdocs/user/virtualcard.php b/htdocs/user/virtualcard.php index b4ec5a4507749..8e1da5deca2e9 100644 --- a/htdocs/user/virtualcard.php +++ b/htdocs/user/virtualcard.php @@ -71,15 +71,16 @@ if ($action == 'update' && $permissiontoedit) { $tmparray = array(); $tmparray['USER_PUBLIC_HIDE_PHOTO'] = (GETPOST('USER_PUBLIC_HIDE_PHOTO') ? 1 : 0); - $tmparray['USER_PUBLIC_HIDE_JOBPOSITION'] = (GETPOST('USER_PUBLIC_HIDE_JOBPOSITION') ? 1 : 0); $tmparray['USER_PUBLIC_HIDE_EMAIL'] = (GETPOST('USER_PUBLIC_HIDE_EMAIL') ? 1 : 0); - $tmparray['USER_PUBLIC_HIDE_OFFICE_PHONE'] = (GETPOST('USER_PUBLIC_HIDE_OFFICE_PHONE') ? 1 : 0); - $tmparray['USER_PUBLIC_HIDE_OFFICE_FAX'] = (GETPOST('USER_PUBLIC_HIDE_OFFICE_FAX') ? 1 : 0); - $tmparray['USER_PUBLIC_HIDE_USER_MOBILE'] = (GETPOST('USER_PUBLIC_HIDE_USER_MOBILE') ? 1 : 0); $tmparray['USER_PUBLIC_HIDE_SOCIALNETWORKS'] = (GETPOST('USER_PUBLIC_HIDE_SOCIALNETWORKS') ? 1 : 0); $tmparray['USER_PUBLIC_SHOW_BIRTH'] = (GETPOST('USER_PUBLIC_SHOW_BIRTH') ? 1 : 0); $tmparray['USER_PUBLIC_SHOW_ADDRESS'] = (GETPOST('USER_PUBLIC_SHOW_ADDRESS') ? 1 : 0); $tmparray['USER_PUBLIC_HIDE_COMPANY'] = (GETPOST('USER_PUBLIC_HIDE_COMPANY') ? 1 : 0); + $tmparray['USER_PUBLIC_HIDE_JOBPOSITION'] = (GETPOST('USER_PUBLIC_HIDE_JOBPOSITION') ? 1 : 0); + $tmparray['USER_PUBLIC_HIDE_OFFICE_PHONE'] = (GETPOST('USER_PUBLIC_HIDE_OFFICE_PHONE') ? 1 : 0); + $tmparray['USER_PUBLIC_HIDE_OFFICE_FAX'] = (GETPOST('USER_PUBLIC_HIDE_OFFICE_FAX') ? 1 : 0); + $tmparray['USER_PUBLIC_HIDE_USER_MOBILE'] = (GETPOST('USER_PUBLIC_HIDE_USER_MOBILE') ? 1 : 0); + $tmparray['USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS'] = (GETPOST('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS') ? 1 : 0); $tmparray['USER_PUBLIC_MORE'] = (GETPOST('USER_PUBLIC_MORE') ? GETPOST('USER_PUBLIC_MORE') : ''); dol_set_user_param($db, $conf, $object, $tmparray); @@ -111,20 +112,22 @@ $title = $langs->trans("User"); //print dol_get_fiche_head($head, 'info', $title, -1, 'user'); - +/* $linkback = ''; if ($user->hasRight('user', 'user', 'lire') || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } +*/ -$morehtmlref = ''; +/* +$morehtmlref = ''; $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); $morehtmlref .= ''; $urltovirtualcard = '/user/virtualcard.php?id='.((int) $object->id); $morehtmlref .= dolButtonToOpenUrlInDialogPopup('publicvirtualcard', $langs->transnoentitiesnoconv("PublicVirtualCardUrl").' - '.$object->getFullName($langs), img_picto($langs->trans("PublicVirtualCardUrl"), 'card', 'class="valignmiddle marginleftonly paddingrightonly"'), $urltovirtualcard, '', 'nohover'); - +*/ print '
    '; @@ -148,7 +151,7 @@ $enabledisablehtml .= ''; } print $enabledisablehtml; -print ''; +print ''; print '

    '; @@ -208,8 +211,8 @@ function hideoptions(domelem) { print '
    '.$langs->trans('PartnershipType').' *'."\n"; print $form->selectarray("partnershiptype", $listofpartnership, GETPOSTISSET('partnershiptype') ? GETPOSTINT('partnershiptype') : 'ifone', 1); print '
    '.$langs->trans("CurrentValueSeparatorDecimal").''.$dec.'
      => price2num(1233.56+1)'.price2num(1233.56 + 1, '2').'
      => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56", '2')."
      => price2num(1233.56+1)'.price2num(1233.56 + 1, 2).'
      => price2num('."'1".$thousand."234".$dec."56')".price2num("1".$thousand."234".$dec."56", 2)."
      => price2num('."'1 234.56')".price2num("1 234.56", '2')."
      => price2num('."'1 234.56')".price2num("1 234.56", 2)."
      => price(1234.56)'.price(1234.56).'
    '; print img_picto($langs->trans("LotSerial"), 'lot', 'class="paddingright"'); - print ''; + print ''; print ''.$langs->trans("Product").''; print img_picto('', 'product'); - $form->select_produits(GETPOSTINT('product_id'), 'product_id', (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + $form->select_produits(GETPOSTINT('product_id'), 'product_id', (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') ? '0' : ''), 0, 0, -1, 2, '', 0, array(), 0, 1, 0, 'maxwidth500'); print ''.$langs->trans("NumberOfUnit").''.$langs->trans("Product").''; print img_picto('', 'product'); - $form->select_produits(GETPOSTINT('product_id'), 'product_id', (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') ? '0' : ''), 0, 0, -1, 2, '', 0, null, 0, 1, 0, 'maxwidth500'); + $form->select_produits(GETPOSTINT('product_id'), 'product_id', (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') ? '0' : ''), 0, 0, -1, 2, '', 0, array(), 0, 1, 0, 'maxwidth500'); print '\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } @@ -706,6 +707,7 @@ require_once $dir.'/'.$file; $module = new $classname($db); + '@phan-var-force ModelePDFTask $module'; $modulequalified = 1; if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { @@ -720,7 +722,7 @@ print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) { - print $module->info($langs); + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod } else { print $module->description; } diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 55a9785db388e..02b6f6699714e 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -307,7 +307,7 @@ } $db->begin(); - + $old_start_date = null; if (!$error) { $object->oldcopy = clone $object; @@ -622,6 +622,7 @@ // Search template files $file = ''; $classname = ''; + $reldir = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { @@ -637,7 +638,7 @@ $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); if (class_exists($classname)) { $modProject = new $classname(); - + '@phan-var-force ModeleNumRefProjects $modProject'; $defaultref = $modProject->getNextValue($thirdparty, $object); } } @@ -891,7 +892,7 @@ print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 3); $arrayselected = GETPOST('categories', 'array'); - print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); + print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print "
    '; if ($task_time->fk_soc > 0) { - if (empty($conf->cache['thridparty'][$task_time->fk_soc])) { + if (empty($conf->cache['thirdparty'][$task_time->fk_soc])) { $tmpsociete = new Societe($db); $tmpsociete->fetch($task_time->fk_soc); - $conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete; + $conf->cache['thirdparty'][$task_time->fk_soc] = $tmpsociete; } else { - $tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc]; + $tmpsociete = $conf->cache['thirdparty'][$task_time->fk_soc]; } print $tmpsociete->getNomUrl(1, '', 100, 0, 1, empty($arrayfields['s.name_alias']['checked']) ? 0 : 1); } @@ -2202,12 +2202,12 @@ function setDetailVisibility() { // Thirdparty alias if (!empty($arrayfields['s.name_alias']['checked'])) { if ($task_time->fk_soc > 0) { - if (empty($conf->cache['thridparty'][$task_time->fk_soc])) { + if (empty($conf->cache['thirdparty'][$task_time->fk_soc])) { $tmpsociete = new Societe($db); $tmpsociete->fetch($task_time->fk_soc); - $conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete; + $conf->cache['thirdparty'][$task_time->fk_soc] = $tmpsociete; } else { - $tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc]; + $tmpsociete = $conf->cache['thirdparty'][$task_time->fk_soc]; } $valtoshow = $tmpsociete->name_alias; } diff --git a/htdocs/public/cron/cron_run_jobs_by_url.php b/htdocs/public/cron/cron_run_jobs_by_url.php index 86c0cc7629957..2ded3bfb8325e 100644 --- a/htdocs/public/cron/cron_run_jobs_by_url.php +++ b/htdocs/public/cron/cron_run_jobs_by_url.php @@ -3,6 +3,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2017 Regis Houssin + * 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 @@ -106,7 +107,7 @@ } require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $user = new User($db); -$result = $user->fetch('', $userlogin); +$result = $user->fetch(0, $userlogin); if ($result < 0) { echo "User Error:".$user->error; dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR); @@ -168,7 +169,7 @@ // Force recheck that user is ok for the entity to process and reload permission for entity if ($conf->entity != $user->entity && $user->entity != 0) { - $result = $user->fetch('', $userlogin, '', 0, $conf->entity); + $result = $user->fetch(0, $userlogin, '', 0, $conf->entity); if ($result < 0) { echo "\nUser Error: ".$user->error."\n"; dol_syslog("cron_run_jobs.php:: User Error:".$user->error, LOG_ERR); diff --git a/htdocs/public/project/new.php b/htdocs/public/project/new.php index 4d1c514d3c7cf..70344778e439c 100644 --- a/htdocs/public/project/new.php +++ b/htdocs/public/project/new.php @@ -263,6 +263,7 @@ function llxFooterVierge() // Search template files $file = ''; $classname = ''; + $reldir = ''; $filefound = 0; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { @@ -278,6 +279,7 @@ function llxFooterVierge() $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); if (class_exists($classname)) { $modProject = new $classname(); + '@phan-var-force ModeleNumRefProjects $modProject'; $defaultref = $modProject->getNextValue($thirdparty, $object); } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 7d7b9f47dd771..5ef48d7d39769 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -5563,7 +5563,7 @@ public function mergeCompany($soc_origin_id) 'Account' => '/compta/bank/class/account.class.php', 'ConferenceOrBoothAttendee' => '/eventorganization/class/conferenceorboothattendee.class.php', 'Societe' => '/societe/class/societe.class.php', - //'SocieteAccount', 'SocietePrice', 'SocieteRib',... are processed into the replaceThirparty of Societe. + //'SocieteAccount', 'SocietePrice', 'SocieteRib',... are processed into the replaceThirdparty of Societe. ); if ($this->db->DDLListTables($conf->db->name, $this->db->prefix().'delivery')) { $objects['Delivery'] = '/delivery/class/delivery.class.php'; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 4dbc3a640b43b..c31b481b3c8da 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -65,7 +65,10 @@ parameters: - '#(?:empty\(\) is always) fals#' - '#(\$force_dolibarr_lib|\$dolibarr_main_db).*in empty\(\) is never defined.#' - '#Sprain\\SwissQrBill\\#' - - '#Constructor of class (?:Dol(?:Editor|iDB(?:Mysqli|Pgsql|Sqlite3))|(?:ModeleBox|box_accountancy_last_manual_entri)es|box_(?:ac(?:countancy_suspense_account|ti(?:ons(?:_future)?|vity))|b(?:irthdays(?:_members)?|o(?:(?:okmark|m)s))|c(?:(?:lient|o(?:m(?:(?:mand|pt)e)|nt(?:r?act)))s|ustomers_outstanding_bill_reached)|dolibarr_state_board|f(?:actures(?:_(?:fourn(?:_imp)?|imp))?|icheinter|ournisseurs|unnel_of_prospection)|g(?:oodcustomers|raph_(?:invoices_(?:per(?:month|year)|supplier_permonth)|n(?:b_ticket(?:_last_x_days|s_type)|ew_vs_close_ticket)|orders_(?:(?:supplier_)?permonth)|pro(?:duct_distribution|pales_permonth)|ticket_by_severity))|last(?:_(?:(?:modified_)?knowledgerecord|(?:modified_)?ticket)|login)|m(?:embers_(?:by_t(?:ags|ype)|last_(?:modified|subscriptions)|subscriptions_by_year)|os)|pro(?:duits(?:_alerte_stock)?|ject(?:_opportunities)?|pales|spect)|s(?:(?:cheduled_job|ervices_contract)s|ervices_expired|(?:hipment|upplier_order)s|upplier_orders_awaiting_reception)|task|validated_projects)).* has an unused parameter #' + - '#(?:Constructor of class (?:(?:ModeleBox|box_accountancy_last_manual_entri)es|box_(?:ac(?:countancy_suspense_account|ti(?:ons(?:_future)?|vity))|b(?:irthdays(?:_members)?|o(?:(?:okmark|m)s))|c(?:(?:lient|o(?:m(?:(?:mand|pt)e)|nt(?:r?act)))s|ustomers_outstanding_bill_reached)|dolibarr_state_board|f(?:actures(?:_(?:fourn(?:_imp)?|imp))?|icheinter|ournisseurs|unnel_of_prospection)|g(?:oodcustomers|raph_(?:invoices_(?:per(?:month|year)|supplier_permonth)|n(?:b_ticket(?:_last_x_days|s_type)|ew_vs_close_ticket)|orders_(?:(?:supplier_)?permonth)|pro(?:duct_distribution|pales_permonth)|ticket_by_severity))|last(?:_(?:(?:modified_)?knowledgerecord|(?:modified_)?ticket)|login)|m(?:embers_(?:by_t(?:ags|ype)|last_(?:modified|subscriptions)|subscriptions_by_year)|os)|pro(?:duits(?:_alerte_stock)?|ject(?:_opportunities)?|pales|spect)|s(?:(?:cheduled_job|ervices_contract)s|ervices_expired|(?:hipment|upplier_order)s|upplier_orders_awaiting_reception)|task|validated_projects))) has an unused parameter \$param\.#' + - '#(?:Constructor of class DoliDB(?:Mysqli|Pgsql|Sqlite3)) has an unused parameter \$type\.#' + - '#(?:Constructor of class DolEditor) has an unused parameter \$toolbarlocation\.#' + - '#Dead catch - Exception is never thrown in the try block#' - '#.*phan-var#' - '#(?:(?:s(?:(?:et_error_handl|pl_autoload_regist)er)|array_filter)) expects \(callable#' From 07809bba486ac1154e59f468d1283b0aa8fda1f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 13:50:37 +0200 Subject: [PATCH 301/329] Trans --- htdocs/langs/en_US/admin.lang | 2 +- htdocs/langs/fr_FR/admin.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5160fd7b196b4..4797ef3c59b8b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2007,7 +2007,7 @@ BackupZipWizard=Wizard to build the archive of documents directory SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason: SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform. InstallModuleFromWebHasBeenDisabledContactUs=Install or development of external modules or dynamic websites, from the application, is currently locked for security purpose. Please contact us if you need to enable this feature. -InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. +InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application and usage of features that allow to run code on server has been disabled by your administrator. You must ask him to remove the file %s to allow this feature. ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory %s. To have this directory processed by Dolibarr, you must setup your conf/conf.php to add the 2 directive lines:
    $dolibarr_main_url_root_alt='/custom';
    $dolibarr_main_document_root_alt='%s/custom'; HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over HighlightLinesColor=Highlight color of the line when the mouse passes over (use 'ffffff' for no highlight) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index b5f5b221024f1..7998c09a8f660 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2006,7 +2006,7 @@ BackupZipWizard=Assistant pour générer l'archive du répertoire documents SomethingMakeInstallFromWebNotPossible=L'installation de module externe est impossible depuis l'interface web pour la raison suivante : SomethingMakeInstallFromWebNotPossible2=Pour cette raison, le processus de mise à jour décrit ici est une processus manuel que seul un utilisateur ayant des droits privilégiés peut réaliser. InstallModuleFromWebHasBeenDisabledContactUs=L'installation ou le développement de modules externes ou de sites Web dynamiques, à partir de l'application, est actuellement verrouillé pour des raisons de sécurité. Veuillez nous contacter si vous avez besoin d'activer cette fonctionnalité. -InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe depuis l'application a été désactivé par l'administrateur. Vous devez lui demander de supprimer le fichier %s pour permettre cette fonctionnalité. +InstallModuleFromWebHasBeenDisabledByFile=L'installation de module externe ou l'usage de fonction permettant l'execution de code local depuis l'application a été désactivé par l'administrateur. Vous devez lui demander de supprimer le fichier %s pour permettre cette fonctionnalité. ConfFileMustContainCustom=Installer ou créer un module externe à partir de l'application nécessite de sauvegarder les fichiers du module dans le répertoire %s. Pour que ce répertoire soit reconnu par Dolibarr, vous devez paramétrer le fichier de configuration conf/conf.php en ajoutant les 2 lignes suivantes :
    $dolibarr_main_url_root_alt='/custom'
    $dolibarr_main_document_root_alt='%s/custom'; HighlightLinesOnMouseHover=Mettre en surbrillance les lignes de la table lorsque la souris passe au-dessus HighlightLinesColor=Couleur de la ligne de surbrillance lorsque la souris passe au-dessus (mettre 'ffffff' pour ne pas mettre en surbrillance) From 0c26110636fd754ca7f7ff39fde0de6d48ddb522 Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 6 Oct 2024 13:52:05 +0200 Subject: [PATCH 302/329] Qual: Fix notices related to user classes (#31291) # Qual: Fix notices related to user classes This fixes several notices related to user classes (and reveals some actual bugs or inconsistent typing). --- dev/tools/phan/baseline.txt | 24 +++-- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- htdocs/comm/propal/list.php | 8 +- htdocs/holiday/class/holiday.class.php | 4 +- htdocs/margin/agentMargins.php | 3 +- htdocs/projet/activity/perday.php | 4 +- htdocs/projet/activity/permonth.php | 6 +- htdocs/projet/activity/perweek.php | 6 +- htdocs/projet/list.php | 2 +- htdocs/user/card.php | 4 +- htdocs/user/class/api_users.class.php | 34 +++++-- htdocs/user/class/user.class.php | 135 ++++++++++++++++++++----- htdocs/user/passwordforgotten.php | 6 +- htdocs/webservices/server_user.php | 2 +- 15 files changed, 176 insertions(+), 66 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index e30ba6f11ffde..7bb605829a6b4 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,33 +9,33 @@ */ return [ // # Issue statistics: - // PhanPluginUnknownPropertyType : 1100+ occurrences + // PhanPluginUnknownPropertyType : 1070+ occurrences // PhanUndeclaredProperty : 840+ occurrences // PhanPossiblyUndeclaredGlobalVariable : 640+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 490+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 480+ occurrences // PhanUndeclaredGlobalVariable : 420+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 410+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 400+ occurrences // PhanPluginUnknownArrayMethodParamType : 300+ occurrences - // PhanPossiblyUndeclaredVariable : 270+ occurrences + // PhanPossiblyUndeclaredVariable : 260+ occurrences // PhanTypeMismatchProperty : 180+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 140+ occurrences // PhanPluginUnknownArrayFunctionParamType : 120+ occurrences - // PhanPluginUnknownArrayPropertyType : 70+ occurrences // PhanTypeMismatchArgumentNullableInternal : 70+ occurrences // PhanPluginUndeclaredVariableIsset : 65+ occurrences + // PhanPluginUnknownArrayPropertyType : 65+ occurrences // PhanPluginEmptyStatementIf : 50+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences - // PhanPluginUnknownObjectMethodCall : 40+ occurrences + // PhanPluginUnknownObjectMethodCall : 35+ occurrences // PhanTypeInvalidDimOffset : 35+ occurrences // PhanTypeMismatchDimFetch : 30+ occurrences // PhanTypeExpectedObjectPropAccess : 25+ occurrences - // PhanPossiblyNullTypeMismatchProperty : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences // PhanEmptyForeach : 10+ occurrences // PhanPluginConstantVariableNull : 10+ occurrences // PhanPluginSuspiciousParamPosition : 10+ occurrences + // PhanPossiblyNullTypeMismatchProperty : 10+ occurrences // PhanTypeMismatchDimFetchNullable : 10+ occurrences // PhanUndeclaredMethod : 10+ occurrences // PhanPluginBothLiteralsBinaryOp : 8 occurrences @@ -46,6 +46,7 @@ return [ // PhanEmptyFQSENInClasslike : 3 occurrences // PhanInvalidFQSENInClasslike : 3 occurrences // PhanAccessMethodProtected : 1 occurrence + // PhanTypeMismatchArgumentInternal : 1 occurrence // Currently, file_suppressions and directory_suppressions are the only supported suppressions 'file_suppressions' => [ @@ -120,6 +121,7 @@ return [ 'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'], + 'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'], 'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'], 'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'], 'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'], @@ -672,6 +674,7 @@ return [ 'htdocs/loan/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'], 'htdocs/loan/schedule.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/mailmanspip/class/mailmanspip.class.php' => ['PhanPluginUnknownArrayPropertyType'], + 'htdocs/main.inc.php' => ['PhanTypeMismatchArgumentInternal'], 'htdocs/margin/customerMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/margin/lib/margins.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], 'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'], @@ -931,11 +934,10 @@ return [ 'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'], 'htdocs/user/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'], - 'htdocs/user/class/api_users.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], - 'htdocs/user/class/user.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/user/class/api_users.class.php' => ['PhanTypeMismatchProperty'], + 'htdocs/user/class/user.class.php' => ['PhanUndeclaredProperty'], 'htdocs/user/class/usergroup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/user/param_ihm.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], - 'htdocs/user/passwordforgotten.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/variants/ajax/get_attribute_values.php' => ['PhanTypeComparisonFromArray'], 'htdocs/variants/class/ProductAttribute.class.php' => ['PhanPluginUnknownArrayMethodParamType'], 'htdocs/variants/class/ProductCombination.class.php' => ['PhanPluginSuspiciousParamPosition'], @@ -968,7 +970,7 @@ return [ 'htdocs/webservices/server_project.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_supplier_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], 'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], - 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'], 'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'], diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index a3af20c887bb6..b42264712ab79 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -295,7 +295,7 @@ $param .= "&search_filter=".urlencode($filter); } if ($filtert) { - $param .= "&search_filtert=".urlencode($filtert); + $param .= "&search_filtert=".urlencode((string) $filtert); } if ($usergroup > 0) { $param .= "&search_usergroup=".urlencode((string) ($usergroup)); diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index d84d55b921026..88dd5e5d7c8ef 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -292,7 +292,7 @@ $param .= "&search_filter=".urlencode($filter); } if ($filtert) { - $param .= "&search_filtert=".urlencode($filtert); + $param .= "&search_filtert=".urlencode((string) $filtert); } if ($usergroup > 0) { $param .= "&search_usergroup=".urlencode((string) ($usergroup)); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 7e3695b1dc5db..fe3d3560b35c5 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -991,7 +991,7 @@ $param .= '&search_user='.urlencode((string) ($search_user)); } if ($search_sale > 0) { - $param .= '&search_sale='.urlencode($search_sale); + $param .= '&search_sale='.urlencode((string) $search_sale); } if ($search_montant_ht) { $param .= '&search_montant_ht='.urlencode($search_montant_ht); @@ -1730,9 +1730,9 @@ || !empty($arrayfields['total_margin']['checked']) || !empty($arrayfields['total_margin_rate']['checked']) || !empty($arrayfields['total_mark_rate']['checked']) - ) - ) { - $with_margin_info = true; +) +) { + $with_margin_info = true; } $total_ht = 0; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 9ef6d189e87b9..1086bf64a75f5 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -1839,7 +1839,7 @@ public function getCPforUser($user_id, $fk_type = 0) * @param boolean $stringlist If true return a string list of id. If false, return an array with detail. * @param boolean $type If true, read Dolibarr user list, if false, return vacation balance list. * @param string $filters Filters. Warning: This must not contains data from user input. - * @return array|string|int<-1,-1> Return an array + * @return array|string|int<-1,-1> Return an array */ public function fetchUsers($stringlist = true, $type = true, $filters = '') { @@ -1981,7 +1981,7 @@ public function fetchUsers($stringlist = true, $type = true, $filters = '') $tab_result[$i]['firstname'] = $obj->firstname; $tab_result[$i]['gender'] = $obj->gender; $tab_result[$i]['status'] = (int) $obj->status; - $tab_result[$i]['employee'] = $obj->employee; + $tab_result[$i]['employee'] = (int) $obj->employee; $tab_result[$i]['photo'] = $obj->photo; $tab_result[$i]['fk_user'] = (int) $obj->fk_user; // rowid of manager //$tab_result[$i]['type'] = $obj->type; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index f56da675ec2a9..31bb24a27b01a 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -2,6 +2,7 @@ /* Copyright (C) 2012-2013 Christophe Battarel * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Marcos García + * 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 @@ -206,7 +207,7 @@ $param = ''; if (!empty($agentid)) { - $param .= "&agentid=".urlencode($agentid); + $param .= "&agentid=".urlencode((string) $agentid); } if (!empty($startdateday)) { $param .= "&startdateday=".urlencode((string) ($startdateday)); diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 4d0efede2272f..d5c9d691b468e 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -322,7 +322,7 @@ setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); // Redirect to avoid submit twice on back - header('Location: '.$_SERVER["PHP_SELF"].'?'.($projectid ? 'id='.$projectid : '').($search_usertoprocessid ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : '').($mode ? '&mode='.$mode : '').'&year='.$yearofday.'&month='.$monthofday.'&day='.$dayofday); + header('Location: '.$_SERVER["PHP_SELF"].'?'.($projectid ? 'id='.$projectid : '').($search_usertoprocessid ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : '').($mode ? '&mode='.$mode : '').'&year='.$yearofday.'&month='.$monthofday.'&day='.$dayofday); exit; } } else { @@ -412,7 +412,7 @@ $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); -$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); +$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); $param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : ''); diff --git a/htdocs/projet/activity/permonth.php b/htdocs/projet/activity/permonth.php index efd640f20e165..801e300fc2c26 100644 --- a/htdocs/projet/activity/permonth.php +++ b/htdocs/projet/activity/permonth.php @@ -329,10 +329,10 @@ $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($projectid ? 'id='.urlencode((string) ($projectid)) : ''); - $param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); + $param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($day ? '&day='.urlencode((string) ($day)) : '').($month ? '&month='.urlencode((string) ($month)) : '').($year ? '&year='.urlencode((string) ($year)) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); - $param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); + $param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_declared_progress ? '&search_declared_progress='.urlencode($search_declared_progress) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); @@ -432,7 +432,7 @@ $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); -$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); +$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); $param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : ''); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 5e3d83014fe9f..b670c2ae9633d 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -331,10 +331,10 @@ $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($projectid ? 'id='.urlencode((string) ($projectid)) : ''); - $param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); + $param .= ($search_usertoprocessid ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($day ? '&day='.urlencode((string) ($day)) : '').($month ? '&month='.urlencode((string) ($month)) : '').($year ? '&year='.urlencode((string) ($year)) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); - $param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); + $param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_declared_progress ? '&search_declared_progress='.urlencode($search_declared_progress) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); @@ -431,7 +431,7 @@ $param = ''; $param .= ($mode ? '&mode='.urlencode($mode) : ''); $param .= ($search_project_ref ? '&search_project_ref='.urlencode($search_project_ref) : ''); -$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode($search_usertoprocessid) : ''); +$param .= ($search_usertoprocessid > 0 ? '&search_usertoprocessid='.urlencode((string) $search_usertoprocessid) : ''); $param .= ($search_thirdparty ? '&search_thirdparty='.urlencode($search_thirdparty) : ''); $param .= ($search_task_ref ? '&search_task_ref='.urlencode($search_task_ref) : ''); $param .= ($search_task_label ? '&search_task_label='.urlencode($search_task_label) : ''); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 2ec3af767f71c..ab729c49007e3 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -1038,7 +1038,7 @@ $param .= '&search_public='.urlencode($search_public); } if ($search_project_user > 0) { - $param .= '&search_project_user='.urlencode($search_project_user); + $param .= '&search_project_user='.urlencode((string) $search_project_user); } if ($search_project_contact > 0) { $param .= '&search_project_contact='.urlencode((string) ($search_project_contact)); diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 6af2386fa77a1..d37db64cf58ca 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -299,7 +299,7 @@ $object->fk_user = GETPOSTINT("fk_user") > 0 ? GETPOSTINT("fk_user") : 0; $object->fk_user_expense_validator = GETPOSTINT("fk_user_expense_validator") > 0 ? GETPOSTINT("fk_user_expense_validator") : 0; $object->fk_user_holiday_validator = GETPOSTINT("fk_user_holiday_validator") > 0 ? GETPOSTINT("fk_user_holiday_validator") : 0; - $object->employee = GETPOST('employee', 'alphanohtml'); + $object->employee = GETPOSTINT('employee'); $object->thm = GETPOST("thm", 'alphanohtml') != '' ? GETPOST("thm", 'alphanohtml') : ''; $object->thm = price2num($object->thm); @@ -804,7 +804,7 @@ $person_name = !empty($object->firstname) ? $object->lastname.", ".$object->firstname : $object->lastname; $title = $person_name." - ".$langs->trans('Card'); } else { - if (GETPOST('employee', 'alphanohtml')) { + if (GETPOSTINT('employee')) { $title = $langs->trans("NewEmployee"); } else { $title = $langs->trans("NewUser"); diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index 2c01f4f84be5e..b703b58ab9a24 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -33,14 +33,14 @@ class Users extends DolibarrApi { /** - * @var array $FIELDS Mandatory fields, checked when create and update object + * @var string[] $FIELDS Mandatory fields, checked when create and update object */ public static $FIELDS = array( 'login', ); /** - * @var User $user {@type User} + * @var User $useraccount {@type User} */ public $useraccount; @@ -70,6 +70,8 @@ public function __construct() * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names * @return array Array of User objects + * @phan-return Object[] + * @phpstan-return Object[] */ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $user_ids = '0', $category = 0, $sqlfilters = '', $properties = '') { @@ -144,6 +146,8 @@ public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, * @param int $id ID of user * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) * @return array|mixed data without useless information + * @phan-return Object + * @phpstan-return Object * * @throws RestException 401 Insufficient rights * @throws RestException 404 User or group not found @@ -180,6 +184,8 @@ public function get($id, $includepermissions = 0) * @param string $login Login of user * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) * @return array|mixed Data without useless information + * @phan-return Object + * @phpstan-return Object * * @url GET login/{login} * @@ -197,7 +203,7 @@ public function getByLogin($login, $includepermissions = 0) throw new RestException(403, 'Not allowed'); } - $result = $this->useraccount->fetch('', $login); + $result = $this->useraccount->fetch(0, $login); if (!$result) { throw new RestException(404, 'User not found'); } @@ -219,6 +225,8 @@ public function getByLogin($login, $includepermissions = 0) * @param string $email Email of user * @param int $includepermissions Set this to 1 to have the array of permissions loaded (not done by default for performance purpose) * @return array|mixed Data without useless information + * @phan-return Object + * @phpstan-return Object[ * * @url GET email/{email} * @@ -236,7 +244,7 @@ public function getByEmail($email, $includepermissions = 0) throw new RestException(403, 'Not allowed'); } - $result = $this->useraccount->fetch('', '', '', 0, -1, $email); + $result = $this->useraccount->fetch(0, '', '', 0, -1, $email); if (!$result) { throw new RestException(404, 'User not found'); } @@ -299,6 +307,8 @@ public function getInfo($includepermissions = 0) * Create user account * * @param array $request_data New user data + * @phan-param ?array $request_data + * @phpstan-param ?array $request_data * @return int * * @throws RestException 401 Not allowed @@ -352,6 +362,8 @@ public function post($request_data = null) * * @param int $id Id of account to update * @param array $request_data Datas + * @phan-param ?array $request_data + * @phpstan-param ?array $request_data * @return Object Updated object * * @throws RestException 403 Not allowed @@ -490,6 +502,8 @@ public function setPassword($id, $send_password = false) * * @param int $id Id of user * @return array Array of group objects + * @phan-return Object[] + * @phpstan-return Object[] * * @throws RestException 403 Not allowed * @throws RestException 404 Not found @@ -580,6 +594,8 @@ public function setGroup($id, $group, $entity = 1) * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" * @param string $properties Restrict the data returned to these properties. Ignored if empty. Comma separated list of properties names * @return array Array of User objects + * @phan-return Object[] + * @phpstan-return Object[] * * @throws RestException 403 Not allowed * @throws RestException 404 User not found @@ -679,6 +695,8 @@ public function infoGroups($group, $load_members = 0) * * @param int $id Account ID * @return array + * @phan-return array{success:array{code:int,message:string}} + * @phpstan-return array{success:array{code:int,message:string}} * * @throws RestException 403 Not allowed * @throws RestException 404 User not found @@ -771,8 +789,8 @@ protected function _cleanObjectDatas($object) /** * Clean sensible user group list datas * - * @param array $objectList Array of object to clean - * @return array Array of cleaned object properties + * @param array $objectList Array of object to clean + * @return array Array of cleaned object properties */ private function _cleanUserGroupListDatas($objectList) { @@ -818,8 +836,8 @@ private function _cleanUserGroupListDatas($objectList) /** * Validate fields before create or update object * - * @param array|null $data Data to validate - * @return array + * @param ?array $data Data to validate + * @return array * @throws RestException */ private function _validate($data) // @phpstan-ignore-line diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 27e974d56b7fc..42b74b2bdc89b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -70,6 +70,9 @@ class User extends CommonObject */ public $picto = 'user'; + /** + * @var int + */ public $id = 0; /** @@ -79,11 +82,14 @@ class User extends CommonObject /** * @var int - * @deprecated + * @deprecated Use $status * @see $status */ public $statut; + /** + * @var int + */ public $status; /** @@ -91,9 +97,21 @@ class User extends CommonObject */ public $openid; + /** + * @var string + */ public $ldap_sid; + /** + * @var string + */ public $search_sid; + /** + * @var int + */ public $employee; + /** + * @var string + */ public $civility_code; /** @@ -106,6 +124,9 @@ class User extends CommonObject */ public $gender; + /** + * @var null|int|string + */ public $birth; /** @@ -124,7 +145,7 @@ class User extends CommonObject public $personal_email; /** - * @var array array of socialnetwo18dprks + * @var array array of socialnetworks */ public $socialnetworks; @@ -248,7 +269,7 @@ class User extends CommonObject public $fk_user_holiday_validator; /** - * @string clicktodial url + * @var string clicktodial url */ public $clicktodial_url; @@ -273,12 +294,33 @@ class User extends CommonObject public $clicktodial_loaded; + /** + * @var int|string + */ public $datelastlogin; + /** + * @var int|string + */ public $datepreviouslogin; + /** + * @var int|string + */ public $flagdelsessionsbefore; + /** + * @var string + */ public $iplastlogin; + /** + * @var string + */ public $ippreviouslogin; + /** + * @var int|string + */ public $datestartvalidity; + /** + * @var int|string + */ public $dateendvalidity; /** @@ -307,12 +349,12 @@ class User extends CommonObject public $nb_rights; /** - * @var array To store list of groups of user (used by API /info for example) + * @var UserGroup[] To store list of groups of user (used by API /info for example) */ public $user_group_list; /** - * @var array Cache array of already loaded permissions + * @var array Cache array of already loaded permissions */ private $_tab_loaded = array(); @@ -321,25 +363,58 @@ class User extends CommonObject */ public $conf; + /** + * @var array> + */ public $default_values; // To store default values for user. Loaded by loadDefaultValues(). + /** + * @var array> + */ public $lastsearch_values_tmp; // To store current search criteria for user + /** + * @var array Note: seems unused + */ public $lastsearch_values; // To store last saved search criteria for user /** * @var array|array,admin:int<0,1>,photo:string,fullpath:string,fullname:string,level:int}> Array of User (filled from fetchAll) or Array with hierarchy of user information (filled with get_full_tree() */ public $users = array(); + /** + * @var array + */ public $parentof; // To store an array of all parents for all ids. + /** + * @var array> + */ private $cache_childids; // Cache array of already loaded children + /** + * @var string + */ public $accountancy_code; // Accountancy code in prevision of the complete accountancy module + /** + * @var string + */ public $thm; // Average cost of employee - Used for valuation of time spent + /** + * @var string + */ public $tjm; // Average cost of employee + /** + * @var string + */ public $salary; // Monthly salary - Denormalized value from llx_user_employment + /** + * @var string + */ public $salaryextra; // Monthly salary extra - Denormalized value from llx_user_employment + /** + * @var string + */ public $weeklyhours; // Weekly hours - Denormalized value from llx_user_employment /** @@ -347,9 +422,18 @@ class User extends CommonObject */ public $color; + /** + * @var int|string + */ public $dateemployment; // Define date of employment by company + /** + * @var int|string + */ public $dateemploymentend; // Define date of employment end by company + /** + * @var int + */ public $default_c_exp_tax_cat; /** @@ -362,6 +446,9 @@ class User extends CommonObject */ public $national_registration_number; + /** + * @var int + */ public $default_range; /** @@ -440,11 +527,11 @@ public function __construct($db) * @param int $id If defined, id to used for search * @param string $login If defined, login to used for search * @param string $sid If defined, sid to used for search - * @param int $loadpersonalconf 1=also load personal conf of user (in $user->conf->xxx), 0=do not load personal conf. + * @param int<0,1> $loadpersonalconf 1=also load personal conf of user (in $user->conf->xxx), 0=do not load personal conf. * @param int $entity If a value is >= 0, we force the search on a specific entity. If -1, means search depens on default setup. * @param string $email If defined, email to used for search * @param int $fk_socpeople If defined, id of contact for search - * @param int $use_email_oauth2 1=Use also email_oauth2 to fetch on email + * @param int<0,1> $use_email_oauth2 1=Use also email_oauth2 to fetch on email * @return int Return integer <0 if KO, 0 not found, >0 if OK */ public function fetch($id = 0, $login = '', $sid = '', $loadpersonalconf = 0, $entity = -1, $email = '', $fk_socpeople = 0, $use_email_oauth2 = 0) @@ -2405,6 +2492,7 @@ public function setPassword($user, $password = '', $changelater = 0, $notrigger $password = getRandomPassword(false); } + $password_crypted = null; // Check and encrypt the password if (empty($passwordalreadycrypted)) { if (getDolGlobalString('USER_PASSWORD_GENERATED')) { @@ -2414,6 +2502,7 @@ public function setPassword($user, $password = '', $changelater = 0, $notrigger include_once DOL_DOCUMENT_ROOT.'/core/modules/security/generate/'.$modGeneratePassClass.'.class.php'; if (class_exists($modGeneratePassClass)) { $modGeneratePass = new $modGeneratePassClass($this->db, $conf, $langs, $user); + '@phan-var-force ModeleGenPassword $modGeneratePass'; // To check an input user password, we disable the cleaning on ambiguous characters (this is used only for auto-generated password) $modGeneratePass->WithoutAmbi = 0; @@ -2459,7 +2548,7 @@ public function setPassword($user, $password = '', $changelater = 0, $notrigger if ($this->db->affected_rows($result)) { $this->pass = $password; $this->pass_indatabase = $password; - $this->pass_indatabase_crypted = $password_crypted; + $this->pass_indatabase_crypted = (string) $password_crypted; if ($this->fk_member && !$nosyncmember) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; @@ -2993,7 +3082,7 @@ public function getTooltipContentArray($params) * @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user * @param string $mode ''=Show firstname and lastname, 'firstname'=Show only firstname, 'firstelselast'=Show firstname or lastname if not defined, 'login'=Show login * @param string $morecss Add more css on link - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int<-1,1> $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ public function getNomUrl($withpictoimg = 0, $option = '', $infologin = 0, $notooltip = 0, $maxlen = 24, $hidethirdpartylogo = 0, $mode = '', $morecss = '', $save_lastsearch_value = -1) @@ -3291,11 +3380,11 @@ public function getKanbanView($option = '', $arraydata = null) /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * - * @param array $info Info array loaded by _load_ldap_info - * @param int $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) - * 1=Return parent (ou=xxx,dc=aaa,dc=bbb) - * 2=Return key only (RDN) (uid=qqq) - * @return string DN + * @param array $info Info array loaded by _load_ldap_info + * @param int<0,2> $mode 0=Return full DN (uid=qqq,ou=xxx,dc=aaa,dc=bbb) + * 1=Return parent (ou=xxx,dc=aaa,dc=bbb) + * 2=Return key only (RDN) (uid=qqq) + * @return string DN */ public function _load_ldap_dn($info, $mode = 0) { @@ -3317,7 +3406,7 @@ public function _load_ldap_dn($info, $mode = 0) /** * Initialize the info array (array of LDAP values) that will be used to call LDAP functions * - * @return array Table with attribute information + * @return array Table with attribute information */ public function _load_ldap_info() { @@ -3851,8 +3940,8 @@ public function get_full_tree($deleteafterid = 0, $filter = '') * Return list of all child user ids in hierarchy (all sublevels). * Note: Calling this function also reset full list of users into $this->users. * - * @param int $addcurrentuser 1=Add also current user id to the list. - * @return array Array of user id lower than user (all levels under user). This overwrite this->users. + * @param int<0,1> $addcurrentuser 1=Add also current user id to the list. + * @return array Array of user id lower than user (all levels under user). This overwrites this->users. * @see get_children() */ public function getAllChildIds($addcurrentuser = 0) @@ -3911,7 +4000,7 @@ public function build_path_from_id_user($id_user, $protection = 0) $cursor_user = $id_user; $useridfound = array($id_user); - while (!empty($this->parentof[$cursor_user]) && !empty($this->users[$this->parentof[$cursor_user]])) { + while (!empty($this->parentof[$cursor_user]) && !empty($this->users[$this->parentof[$cursor_user]])) { // @phan-suppress-current-line PhanTypeMismatchProperty if (in_array($this->parentof[$cursor_user], $useridfound)) { dol_syslog("The hierarchy of user has a recursive loop", LOG_WARNING); return -1; // Should not happen. Protection against looping hierarchy @@ -3989,10 +4078,10 @@ public function loadStateBoard() * * @param string $modele Force model to use ('' to not force) * @param Translate $outputlangs Object langs to use for output - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) @@ -4168,7 +4257,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = * * NOTE: findUserIdByEmailCache[...] === -1 means not found in database * - * @var array + * @var array> */ private $findUserIdByEmailCache; diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index a2338f7973e45..6ebf7baafcc85 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -93,7 +93,7 @@ // Validate new password if ($action == 'validatenewpassword' && $username && $passworduidhash) { // Test on permission not required here. Security is managed by $passworduihash $edituser = new User($db); - $result = $edituser->fetch('', $username, '', 0, $conf->entity); + $result = $edituser->fetch(0, $username, '', 0, $conf->entity); if ($result < 0) { $message = '
    '.dol_escape_htmltag($langs->trans("ErrorTechnicalError")).'
    '; } else { @@ -129,9 +129,9 @@ $isanemail = preg_match('/@/', $username); $edituser = new User($db); - $result = $edituser->fetch('', $username, '', 1, $conf->entity); + $result = $edituser->fetch(0, $username, '', 1, $conf->entity); if ($result == 0 && $isanemail) { - $result = $edituser->fetch('', '', '', 1, $conf->entity, $username); + $result = $edituser->fetch(0, '', '', 1, $conf->entity, $username); } // Set the message to show (must be the same if login/email exists or not diff --git a/htdocs/webservices/server_user.php b/htdocs/webservices/server_user.php index fd6a4e96f14f6..6d6bd486fd4d4 100644 --- a/htdocs/webservices/server_user.php +++ b/htdocs/webservices/server_user.php @@ -720,7 +720,7 @@ function setUserPassword($authentication, $shortuser) if ($fuser->hasRight('user', 'user', 'password') || $fuser->hasRight('user', 'self', 'password')) { $userstat = new User($db); - $res = $userstat->fetch('', $shortuser['login']); + $res = $userstat->fetch(0, $shortuser['login']); if ($res) { $res = $userstat->setPassword($userstat, $shortuser['password']); if (is_int($res) && $res < 0) { From 63f6d0aa43e0a48a356c719dee53fd11b6737899 Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sun, 6 Oct 2024 13:53:16 +0200 Subject: [PATCH 303/329] Fix: Number of decimals for stock values ignores configuration (#31285) * Fix: Number of decimals for stock values ignores configuration In the select filed for adding a new line for a proposal/invoice/... product as a line, the stock level is always printed with exactly two decimals. The number of decimals should be controlled by the existing global variable MAIN_MAX_DECIMALS_STOCK, but it is not taken into account: Building the stock level with the function price from the function price2num, which uses the configured number of decimals always lead to exactly two decimals. * Fixed patch according to suggestion. --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a4b050def56d0..aaf856152b70a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3334,7 +3334,7 @@ protected function constructProductListOption(&$objp, &$opt, &$optJson, $price_l if (isModEnabled('stock') && isset($objp->stock) && ($objp->fk_product_type == Product::TYPE_PRODUCT || getDolGlobalString('STOCK_SUPPORTS_SERVICES'))) { if ($user->hasRight('stock', 'lire')) { - $opt .= ' - ' . $langs->trans("Stock") . ': ' . price(price2num($objp->stock, 'MS')); + $opt .= ' - ' . $langs->trans("Stock") . ': ' . price(price2num($objp->stock, 'MS'), 0, $langs, 0, 0); if ($objp->stock > 0) { $outval .= ' - '; From d8a980444a3d6f834fd2e564f1d92a03e8adaa52 Mon Sep 17 00:00:00 2001 From: MDW Date: Sun, 6 Oct 2024 13:55:48 +0200 Subject: [PATCH 304/329] Flow: Setup mariadb after restoring cache (#31274) # Flow: Setup mariadb after restoring cache To use the cache, it has to be restored first. The original order of actions did not enable the reuse of the mariadb executable from cache --- .github/workflows/windows-ci.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index e245a67683e28..e7d330324dd2a 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -36,11 +36,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup MariaDB - uses: frederic34/setup-mariadb@v1 - with: - # mariadb-version: ${{ matrix.mariadb-version }} - database: travis # Specify your database name - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -79,6 +74,12 @@ jobs: ${{ env.KEY_ROOT }}-${{ env.HASH }}- ${{ env.KEY_ROOT }}- + - name: Setup MariaDB + uses: frederic34/setup-mariadb@v1 + with: + # mariadb-version: ${{ matrix.mariadb-version }} + database: travis # Specify your database name + - name: Create local php.ini with open_basedir restrictions shell: cmd # Objective: separate step, and before database initialisation to verify open_basedir restrictions From dfa1a5dd6ed99562b3e68b42a7af07d404d9a208 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 6 Oct 2024 14:06:20 +0200 Subject: [PATCH 305/329] NEW Accountancy - Option to select the label operation (#31200) * NEW Accountancy - Option to select the label operation * NEW Accountancy - Option to select the label operation * NEW Accountancy - Option to select the label operation * NEW Accountancy - Option to select the label operation * Fix codespell * Fix CodeSniffer * Fix Phan * Some fix * User function csvClean * User function csvClean --- htdocs/accountancy/admin/index.php | 10 ++- .../accountancy/class/bookkeeping.class.php | 41 ++++++++++ htdocs/accountancy/journal/bankjournal.php | 28 +++---- .../journal/expensereportsjournal.php | 55 +++++++++----- .../accountancy/journal/purchasesjournal.php | 64 +++++++++------- htdocs/accountancy/journal/sellsjournal.php | 76 ++++++++++--------- htdocs/accountancy/journal/variousjournal.php | 2 +- htdocs/langs/en_US/accountancy.lang | 1 + 8 files changed, 178 insertions(+), 99 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index a0f34150a8d14..517a43158545c 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2024 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -57,6 +57,7 @@ $list_binding = array( 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 'ACCOUNTING_DATE_START_BINDING', + 'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER' ); $error = 0; @@ -403,6 +404,13 @@ } elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') { $array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear")); print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); + } elseif ($key == 'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') { + $array = array( + 0=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece") . ' - ' . $langs->trans("LabelAccount"), + 1=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece"), + 2=>$langs->trans("ThirdPartyName") + ); + print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); } else { print ''; } diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 925c08f39e91b..2671adb04dff6 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2431,6 +2431,47 @@ public function canModifyBookkeeping($id, $mode = '') } } + /** + * Generate label operation when operation is transferred into accounting + * + * @param string $thirdpartyname Thirdparty name + * @param string $reference Reference of the element + * @param string $labelaccount Label of the accounting account + * @return string Label of the operation + */ + public function accountingLabelForOperation($thirdpartyname, $reference, $labelaccount) + { + global $conf; + + $accountingLabelOperation = ''; + + if (!getDolGlobalString('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') || getDolGlobalString('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') == 0) { + $truncThirdpartyName = 16; + // Avoid trunc with dot in accountancy for the compatibility with another accounting software + $accountingLabelOperation = dol_trunc($thirdpartyname, $truncThirdpartyName, 'right', 'UTF-8', 1); + if (!empty($reference)) { + $accountingLabelOperation .= ' - '. $reference; + } + if (!empty($labelaccount)) { + $accountingLabelOperation .= ' - '. $labelaccount; + } + } elseif (getDolGlobalString('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') == 1) { + $truncThirdpartyName = 32; + // Avoid trunc with dot in accountancy for the compatibility with another accounting software + $accountingLabelOperation = dol_trunc($thirdpartyname, $truncThirdpartyName, 'right', 'UTF-8', 1); + if (!empty($reference)) { + $accountingLabelOperation .= ' - '. $reference; + } + } elseif (getDolGlobalString('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') == 2) { + $truncThirdpartyName = 64; + // Avoid trunc with dot in accountancy for the compatibility with another accounting software + $accountingLabelOperation = dol_trunc($thirdpartyname, $truncThirdpartyName, 'right', 'UTF-8', 1); + } + dol_syslog('label'.$accountingLabelOperation, LOG_ERR); + + return $accountingLabelOperation; + } + /** * Is the bookkeeping date valid (on an open period or not on a closed period) ? * diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 8ec10ca961ebc..7d3c02eab2543 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -1,18 +1,18 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2022 Open-DSI - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2014 Olivier Geffroy - * Copyright (C) 2017-2024 Frédéric France - * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2018-2024 Eric Seigne - * Copyright (C) 2021 Gauthier VERDOL - * Copyright (C) 2024 MDW +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013 Christophe Battarel + * Copyright (C) 2013-2022 Open-DSI + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2014 Olivier Geffroy + * Copyright (C) 2017-2024 Frédéric France + * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018-2024 Eric Seigne + * Copyright (C) 2021 Gauthier VERDOL + * 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 diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 681ffd5d0ac82..4407435bf8053 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -1,13 +1,13 @@ - * Copyright (C) 2007-2010 Jean Heimburger - * Copyright (C) 2011 Juanjo Menent - * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2024 Alexandre Spangaro - * Copyright (C) 2013-2016 Olivier Geffroy - * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Eric Seigne +/* Copyright (C) 2007-2010 Laurent Destailleur + * Copyright (C) 2007-2010 Jean Heimburger + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2013-2024 Alexandre Spangaro + * Copyright (C) 2013-2016 Olivier Geffroy + * Copyright (C) 2013-2016 Florian Henry + * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Eric Seigne * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -261,6 +261,9 @@ $now = dol_now(); $error = 0; + $userstatic = new User($db); + $bookkeepingstatic = new BookKeeping($db); + $accountingaccountexpense = new AccountingAccount($db); $accountingaccountexpense->fetch(0, getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT'), true); @@ -272,6 +275,10 @@ $db->begin(); + $userstatic->id = $tabuser[$key]['id']; + $userstatic->name = $tabuser[$key]['name']; + $userstatic->accountancy_code = $tabuser[$key]['user_accountancy_code']; + // Error if some lines are not binded/ready to be journalized if (!empty($errorforinvoice[$key]) && $errorforinvoice[$key] == 'somelinesarenotbound') { $error++; @@ -297,7 +304,7 @@ $bookkeeping->numero_compte = getDolGlobalString('ACCOUNTING_ACCOUNT_EXPENSEREPORT'); $bookkeeping->label_compte = $accountingaccountexpense->label; - $bookkeeping->label_operation = $tabuser[$key]['name']; + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("SubledgerAccount")); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt <= 0) ? -$mt : 0; @@ -348,7 +355,7 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $accountingaccount->label; - $bookkeeping->label_operation = $accountingaccount->label; + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $accountingaccount->label); $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt > 0) ? $mt : 0; @@ -419,7 +426,11 @@ $bookkeeping->numero_compte = $k; $bookkeeping->label_compte = $account_label; - $bookkeeping->label_operation = $langs->trans("VAT").' '.implode(', ', $def_tva[$key][$k]).' %'; + $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); + $labelvataccount = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvataccount .= ($numtax ? ' - Localtax '.$numtax : ''); + $bookkeeping->label_operation = $bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $labelvataccount); + $bookkeeping->montant = $mt; $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; $bookkeeping->debit = ($mt > 0) ? $mt : 0; @@ -516,6 +527,9 @@ $type_export = 'journal'; include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php'; + $userstatic = new User($db); + $bookkeepingstatic = new BookKeeping($db); + // CSV header line print '"'.$langs->transnoentitiesnoconv("Date").'"'.$sep; print '"'.$langs->transnoentitiesnoconv("Piece").'"'.$sep; @@ -539,7 +553,7 @@ print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; - print '"'.dol_trunc($accountingaccount->label, 32).'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $accountingaccount->label)).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'; print "\n"; @@ -552,7 +566,7 @@ print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; - print '"'.dol_trunc($langs->trans("VAT")).'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("VAT").implode($def_tva[$key][$k]).' %')).'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'; print "\n"; @@ -564,7 +578,7 @@ print '"'.$date.'"'.$sep; print '"'.$val["ref"].'"'.$sep; print '"'.length_accounta(html_entity_decode($k)).'"'.$sep; - print '"'.dol_trunc($userstatic->name).'"'.$sep; + print '"'.csvClean($bookkeepingstatic->accountingLabelForOperation($userstatic->name, '', $langs->trans("Thirdparty"))).'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'; } @@ -673,6 +687,7 @@ function writebookkeeping() { $expensereportstatic = new ExpenseReport($db); $expensereportlinestatic = new ExpenseReportLine($db); + $bookkeepingstatic = new BookKeeping($db); foreach ($taber as $key => $val) { $expensereportstatic->id = $key; @@ -733,7 +748,7 @@ function writebookkeeping() { print '
    ".$userstatic->getNomUrl(0, 'user', 16).' - '.$accountingaccount->label."" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $accountingaccount->label) . "'.($mt >= 0 ? price($mt) : '')."'.($mt < 0 ? price(-$mt) : '')."
    ".$userstatic->getNomUrl(0, 'user', 16).' - '.$langs->trans("SubledgerAccount")."" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $langs->trans("SubledgerAccount")) . "'.($mt < 0 ? price(-$mt) : '')."'.($mt >= 0 ? price($mt) : '')."
    "; print '".$userstatic->getNomUrl(0, 'user', 16).' - '.$langs->trans("VAT").' '.implode(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : ''); - print "" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $labelvatrate) . "'.($mt >= 0 ? price($mt) : '')."'.($mt < 0 ? price(-$mt) : '')."
    ".$companystatic->getNomUrl(0, 'supplier', 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("SubledgerAccount")."" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount")) . "'.($mt < 0 ? price(-$mt) : '')."'.($mt >= 0 ? price($mt) : '')."
    ".$companystatic->getNomUrl(0, 'supplier', 16).' - '.$invoicestatic->ref_supplier.' - '.$accountingaccount->label."" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $accountingaccount->label) . "'.($mt >= 0 ? price($mt) : '')."'.($mt < 0 ? price(-$mt) : '')."
    "; print '"; - print $companystatic->getNomUrl(0, 'supplier', 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("VAT").' '.implode(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : ''); + $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); + $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; + $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); + print "" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate) . "'.($mt >= 0 ? price($mt) : '')."'.($mt < 0 ? price(-$mt) : '').""; print '".$companystatic->getNomUrl(0, 'supplier', 16).' - '.$invoicestatic->ref_supplier.' - '.$langs->trans("VAT")." NPR (counterpart)" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("VAT")." NPR (counterpart)") . "'.($mt < 0 ? price(-$mt) : '')."'.($mt >= 0 ? price($mt) : '')."
    " . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RetainedWarranty") . "" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0), $invoicestatic->ref, $langs->trans("RetainedWarranty")) . "' . ($mt >= 0 ? price($mt) : '') . "' . ($mt < 0 ? price(-$mt) : '') . "
    ".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$langs->trans("SubledgerAccount")."" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("SubledgerAccount")) . "'.($mt >= 0 ? price($mt) : '')."'.($mt < 0 ? price(-$mt) : '')."
    ".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref.' - '.$accountingaccount->label."" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $accountingaccount->label) . "'.($mt < 0 ? price(-$mt) : '')."'.($mt >= 0 ? price($mt) : '')."
    "; print '".$companystatic->getNomUrl(0, 'customer', 16).' - '.$invoicestatic->ref; // $def_tva is array[invoiceid][accountancy_code_sell_of_vat_rate_found][vatrate]=vatrate //var_dump($arrayofvat[$key]); //var_dump($key); //var_dump($k); $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); - print ' - '.$langs->trans("Taxes").' '.$tmpvatrate.' %'; - print($numtax ? ' - Localtax '.$numtax : ''); - print "" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $labelvatrate) . "'.($mt < 0 ? price(-$mt) : '')."'.($mt >= 0 ? price($mt) : '')."
    "; print '" . $companystatic->getNomUrl(0, 'customer', 16) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("RevenueStamp") . "" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("RevenueStamp")) . "' . ($mt < 0 ? price(-$mt) : '') . "' . ($mt >= 0 ? price($mt) : '') . "
    '.$langs->trans("ToConsume").'
    '; print ''; - print ''; - print ''; + print ''; + print ''; print "\n"; // User photo @@ -275,13 +278,31 @@ function hideoptions(domelem) { print $form->selectyesno("USER_PUBLIC_SHOW_ADDRESS", (getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object) ? getDolUserInt('USER_PUBLIC_SHOW_ADDRESS', 0, $object) : 0), 1); print "\n"; - // Company name + print ''; + print ''; + print ''; + print "\n"; + + // Company section print '\n"; + // Social networks + print '\n"; + + + print ''; + print ''; + print ''; + print "\n"; + // More print '
    '.$langs->trans("Options").''.$langs->trans("Value").''.$langs->trans("User").'
    '.$langs->trans("Company").'
    '; print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("CompanySection")); print ''; print $form->selectyesno("USER_PUBLIC_HIDE_COMPANY", (getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object) ? getDolUserInt('USER_PUBLIC_HIDE_COMPANY', 0, $object) : 0), 1); print "
    '; + print $langs->trans("HideOnVCard", $langs->transnoentitiesnoconv("SocialNetworksInformation")); + print ''; + print $form->selectyesno("USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS", (getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) ? getDolUserInt('USER_PUBLIC_HIDE_SOCIALNETWORKS_BUSINESS', 0, $object) : 0), 1); + print "
    '.$langs->trans("Other").'
    '; print $langs->trans("Text"); From badb9f8cbf7822704e8ffcf9486cebee41344b10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 21:50:32 +0200 Subject: [PATCH 312/329] Fix link to url --- htdocs/contrat/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 5539666bace8d..92ecbc68ad77d 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2274,7 +2274,7 @@ $arrayforbutaction = array(); if ($object->nbofservicesclosed > 0 || $object->nbofserviceswait > 0) { $arrayforbutaction[] = array( - 'url' => $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=activate&token='.newToken(), + 'url' => '/contrat/card.php?id='.$object->id.'&action=activate&token='.newToken(), 'label' => $langs->trans('ActivateAllContracts'), 'lang' => 'bills', 'perm' => $user->hasRight('contrat', 'activer'), @@ -2283,7 +2283,7 @@ } if ($object->nbofservicesclosed < $nbofservices) { $arrayforbutaction[] = array( - 'url' => $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close&token='.newToken(), + 'url' => '/contrat/card.php?id='.$object->id.'&action=close&token='.newToken(), 'label' => $langs->trans('CloseAllContracts'), 'lang' => 'bills', 'perm' => $user->hasRight('contrat', 'desactiver'), From a7cbf6eeb1e76dc3ab8122135e76dcdc845da798 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2024 21:55:46 +0200 Subject: [PATCH 313/329] Fix: closing of butAction dropdown was also closing the login dropdown when we just lick inside a link into login dropdown. --- htdocs/core/js/lib_head.js.php | 10 ++++++---- htdocs/main.inc.php | 9 +++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index c4179667a8fbb..4e36e04983271 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1333,7 +1333,8 @@ function price2numjs(amount) { if (widthPopup + right >= widthDocument) { //right = 10; } - parentHolder.toggleClass("open"); + + parentHolder.toggleClass("open"); /* If open, it closes, if closed, it opens */ // Check tooltip is in viewport let dropDownContentTop = dropDownContent.offset().top; @@ -1363,9 +1364,10 @@ function price2numjs(amount) { // Close drop down jQuery(document).on("click", function(event) { // search if click was outside drop down - if (!$(event.target).closest('.dropdown-toggle').length) { - let parentholder = jQuery(".dropdown-toggle").closest(".dropdown.open"); - if(parentholder){ + if (!$(event.target).closest('.butAction.dropdown-toggle').length) { + /* console.log("click close butAction - we click outside"); */ + let parentholder = jQuery(".butAction.dropdown-toggle").closest(".dropdown.open"); + if (parentholder){ // Hide the menus. parentholder.removeClass("open --up --left"); } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7487cb09a590b..36388ed486e9e 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2735,14 +2735,14 @@ function top_menu_user($hideloginname = 0, $urllogout = '')