diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index e823ec95cdc..da97b627858 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2016 Marcos García - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * Copyright (C) 2020 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -1557,12 +1557,11 @@ if ($action == 'create') } print ''."\n"; - if ($socid > 0) - { + if ($socid > 0) { // Contacts (ask contact only if thirdparty already defined). print "".$langs->trans("DefaultContact").''; print img_picto('', 'contact'); - $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist); + print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist); print ''; // Third party discounts info line @@ -1612,8 +1611,9 @@ if ($action == 'create') // Delivery delay print ''.$langs->trans('AvailabilityPeriod'); - if (!empty($conf->commande->enabled)) + if (!empty($conf->commande->enabled)) { print ' ('.$langs->trans('AfterOrder').')'; + } print ''; print img_picto('', 'clock').' '; $form->selectAvailabilityDelay('', 'availability_id', '', 1); diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f6b3a1b3fa4..f7cc3e7af47 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -12,7 +12,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2021 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 @@ -1603,7 +1603,7 @@ if ($action == 'create' && $usercancreate) // Contacts (ask contact only if thirdparty already defined). print "".$langs->trans("DefaultContact").''; print img_picto('', 'contact'); - $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1); + print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1); print ''; // Ligne info remises tiers @@ -1644,8 +1644,7 @@ if ($action == 'create' && $usercancreate) print ''; // Bank Account - if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && !empty($conf->banque->enabled)) - { + if (!empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && !empty($conf->banque->enabled)) { print ''.$langs->trans('BankAccount').''; print img_picto('', 'bank_account'); $form->select_comptes($fk_account, 'fk_account', 0, '', 1); diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 2946aea94b5..4c2f643df1c 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -11,6 +11,7 @@ * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2016-2018 Ferran Marcet + * Copyright (C) 2021 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 @@ -126,6 +127,10 @@ class Commande extends CommonOrder * @var int Draft Status of the order */ public $brouillon; + + /** + * @var string Condition payment code + */ public $cond_reglement_code; /** @@ -166,8 +171,16 @@ class Commande extends CommonOrder */ public $availability; - public $demand_reason_id; // Source reason. Why we receive order (after a phone campaign, ...) + /** + * @var int Source demand reason Id + */ + public $demand_reason_id; + + /** + * @var string Source reason code. Why we receive order (after a phone campaign, ...) + */ public $demand_reason_code; + /** * @var int Date of order */ @@ -182,11 +195,15 @@ class Commande extends CommonOrder /** * @var int Date expected for delivery + * @see delivery_date * @deprecated */ - public $date_livraison; // deprecated; Use delivery_date instead. + public $date_livraison; - public $delivery_date; // Date expected of shipment (date starting shipment, not the reception that occurs some days after) + /** + * @var int Date expected of shipment (date starting shipment, not the reception that occurs some days after) + */ + public $delivery_date; /** * @var int ID @@ -200,6 +217,9 @@ class Commande extends CommonOrder public $special_code; public $source; // Order mode. How we received order (by phone, by email, ...) + /** + * @var int Warehouse Id + */ public $warehouse_id; public $extraparams = array(); @@ -227,6 +247,9 @@ class Commande extends CommonOrder */ public $fk_multicurrency; + /** + * @var string multicurrency code + */ public $multicurrency_code; public $multicurrency_tx; public $multicurrency_total_ht; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index db751735bb0..03bc3d8754e 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -47,6 +47,8 @@ $type = GETPOST('type', 'aZ09'); // Get supervariables $action = GETPOST('action', 'aZ09'); +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list $mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real'; $format = GETPOST('format', 'aZ09'); $id_bankaccount = GETPOST('id_bankaccount', 'int'); @@ -61,6 +63,7 @@ $hookmanager->initHooks(array('directdebitcreatecard', 'globalcard')); /* * Actions */ +if (GETPOST('cancel', 'alpha')) { $massaction = ''; } $parameters = array('mode' => $mode, 'format' => $format, 'limit' => $limit, 'page' => $page, 'offset' => $offset); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -122,6 +125,9 @@ if (empty($reshook)) { exit; } } + $objectclass = "BonPrelevement"; + $uploaddir = $conf->prelevement->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } @@ -138,6 +144,12 @@ if ($type != 'bank-transfer') { $invoicestatic = new FactureFournisseur($db); } $bprev = new BonPrelevement($db); +$arrayofselected = is_array($toselect) ? $toselect : array(); +// List of mass actions available +$arrayofmassactions = array( +); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); llxHeader('', $langs->trans("NewStandingOrder")); @@ -273,7 +285,7 @@ print '
'; */ $sql = "SELECT f.ref, f.rowid, f.total_ttc, s.nom as name, s.rowid as socid,"; -$sql .= " pfd.date_demande, pfd.amount"; +$sql .= " pfd.rowid as request_row_id, pfd.date_demande, pfd.amount"; if ($type == 'bank-transfer') { $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f,"; } else { @@ -332,7 +344,7 @@ if ($resql) if ($type == 'bank-transfer') { $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); } - print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', $massactionbutton, $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); $tradinvoice = "Invoice"; if ($type == 'bank-transfer') { @@ -347,6 +359,10 @@ if ($resql) print ''.$langs->trans("RUM").''; print ''.$langs->trans("AmountTTC").''; print ''.$langs->trans("DateRequest").''; + if ($massactionbutton || $massaction ) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + print ''.$form->showCheckAddButtons('checkforselect', 1).''; + } print ''; if ($num) @@ -402,6 +418,15 @@ if ($resql) print ''; print dol_print_date($db->jdate($obj->date_demande), 'day'); print ''; + // Action column + if ($massactionbutton || $massaction ) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + print ''; + $selected = 0; + if (in_array($obj->request_row_id, $arrayofselected)) $selected = 1; + print ''; + print ''; + } print ''; $i++; } diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 41e23819266..9575208f485 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -201,6 +201,13 @@ if ($type == 'directory') 'mrp-mo' ); + $parameters = array('modulepart'=>$module); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) + { + $automodules[]=$hookmanager->resArray['module']; + } + // TODO change for multicompany sharing if ($module == 'company') $upload_dir = $conf->societe->dir_output; elseif ($module == 'invoice') $upload_dir = $conf->facture->dir_output; @@ -220,6 +227,13 @@ if ($type == 'directory') elseif ($module == 'recruitment-recruitmentcandidature') $upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature'; elseif ($module == 'banque') $upload_dir = $conf->bank->dir_output; elseif ($module == 'mrp-mo') $upload_dir = $conf->mrp->dir_output.'/mo'; + else { + $parameters = array('modulepart'=>$module); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray) > 0) { + $upload_dir = $hookmanager->resArray['directory']; + } + } // Automatic list if (in_array($module, $automodules)) diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index d610203b3ad..9ecd6a659a1 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -161,6 +161,7 @@ class HookManager 'addMoreMassActions', 'addSearchEntry', 'addStatisticLine', + 'addSectionECMAuto', 'createDictionaryFieldlist', 'editDictionaryFieldlist', 'getFormMail', diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1a9d52e4a9c..1d23953e4d4 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1479,7 +1479,7 @@ class Form if (!empty($conf->global->CONTACT_HIDE_INACTIVE_IN_COMBOBOX)) $sql .= " AND sp.statut <> 0"; $sql .= " ORDER BY sp.lastname ASC"; - dol_syslog(get_class($this)."::select_contacts", LOG_DEBUG); + dol_syslog(get_class($this)."::selectcontacts", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 6f31f0ff8de..c9c895148bf 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1570,6 +1570,20 @@ class FormFile { include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; $object_instance = new Mo($this->db); + } else { + $parameters = array('modulepart'=>$modulepart); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) + { + if (array_key_exists('classpath', $hookmanager->resArray) && !empty($hookmanager->resArray['classpath'])) { + dol_include_once($hookmanager->resArray['classpath']); + if (array_key_exists('classname', $hookmanager->resArray) && !empty($hookmanager->resArray['classname'])) { + if (class_exists($hookmanager->resArray['classname'])) { + $object_instance = new ${$hookmanager->resArray['classname']}($this->db); + } + } + } + } } //var_dump($filearray); @@ -1623,6 +1637,17 @@ class FormFile 'banque'))) { preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = (isset($reg[1]) ? $reg[1] : ''); } else { + $parameters = array('modulepart'=>$modulepart,'fileinfo'=>$file); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) + { + if (array_key_exists('ref', $hookmanager->resArray) && !empty($hookmanager->resArray['ref'])) { + $ref = $hookmanager->resArray['ref']; + } + if (array_key_exists('id', $hookmanager->resArray) && !empty($hookmanager->resArray['id'])) { + $id = $hookmanager->resArray['id']; + } + } //print 'Error: Value for modulepart = '.$modulepart.' is not yet implemented in function list_of_autoecmfiles'."\n"; } diff --git a/htdocs/core/modules/cheque/modules_chequereceipts.php b/htdocs/core/modules/cheque/modules_chequereceipts.php index 66b2f9f7d82..bc552aec070 100644 --- a/htdocs/core/modules/cheque/modules_chequereceipts.php +++ b/htdocs/core/modules/cheque/modules_chequereceipts.php @@ -142,14 +142,14 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator global $conf; $type = 'chequereceipt'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); // TODO Remove this to use getListOfModels only - $liste = array('blochet'=>'blochet'); + $list = array('blochet'=>'blochet'); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/contract/modules_contract.php b/htdocs/core/modules/contract/modules_contract.php index c259c247304..5e39dd7d587 100644 --- a/htdocs/core/modules/contract/modules_contract.php +++ b/htdocs/core/modules/contract/modules_contract.php @@ -57,12 +57,12 @@ abstract class ModelePDFContract extends CommonDocGenerator global $conf; $type = 'contract'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/delivery/modules_delivery.php b/htdocs/core/modules/delivery/modules_delivery.php index 80e2b092d42..a0d2da43494 100644 --- a/htdocs/core/modules/delivery/modules_delivery.php +++ b/htdocs/core/modules/delivery/modules_delivery.php @@ -55,12 +55,12 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator global $conf; $type = 'delivery'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/dons/modules_don.php b/htdocs/core/modules/dons/modules_don.php index 73186354285..92982d91404 100644 --- a/htdocs/core/modules/dons/modules_don.php +++ b/htdocs/core/modules/dons/modules_don.php @@ -53,12 +53,12 @@ abstract class ModeleDon extends CommonDocGenerator global $conf; $type = 'donation'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/facture/modules_facture.php b/htdocs/core/modules/facture/modules_facture.php index 775864eec52..03c65f3595c 100644 --- a/htdocs/core/modules/facture/modules_facture.php +++ b/htdocs/core/modules/facture/modules_facture.php @@ -60,12 +60,12 @@ abstract class ModelePDFFactures extends CommonDocGenerator global $conf; $type = 'invoice'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/member/modules_cards.php b/htdocs/core/modules/member/modules_cards.php index a6de637b24f..0f4a04bcaf0 100644 --- a/htdocs/core/modules/member/modules_cards.php +++ b/htdocs/core/modules/member/modules_cards.php @@ -54,12 +54,12 @@ class ModelePDFCards global $conf; $type = 'member'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/movement/modules_movement.php b/htdocs/core/modules/movement/modules_movement.php index 80a61c75074..0116a87ff38 100644 --- a/htdocs/core/modules/movement/modules_movement.php +++ b/htdocs/core/modules/movement/modules_movement.php @@ -50,11 +50,11 @@ abstract class ModelePDFMovement extends CommonDocGenerator global $conf; $type = 'movement'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/printsheet/modules_labels.php b/htdocs/core/modules/printsheet/modules_labels.php index c04d0acc4ed..9106c8f4eac 100644 --- a/htdocs/core/modules/printsheet/modules_labels.php +++ b/htdocs/core/modules/printsheet/modules_labels.php @@ -54,12 +54,12 @@ class ModelePDFLabels global $conf; $type = 'members_labels'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 79950e4f14f..e0141348568 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -53,11 +53,11 @@ abstract class ModelePDFProduct extends CommonDocGenerator global $conf; $type = 'product'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + $list = getListOfModels($db, $type, $maxfilenamelength); + return $list; } } @@ -163,7 +163,7 @@ abstract class ModeleProductCode public static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable - $liste = array(); + $list = array(); $sql = ""; $resql = $db->query($sql); @@ -172,13 +172,13 @@ abstract class ModeleProductCode $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); - $liste[$row[0]] = $row[1]; + $list[$row[0]] = $row[1]; $i++; } } else { return -1; } - return $liste; + return $list; } /** diff --git a/htdocs/core/modules/project/modules_project.php b/htdocs/core/modules/project/modules_project.php index 6f174a27d7a..c2d546348ff 100644 --- a/htdocs/core/modules/project/modules_project.php +++ b/htdocs/core/modules/project/modules_project.php @@ -106,12 +106,12 @@ abstract class ModelePDFProjects extends CommonDocGenerator global $conf; $type = 'project'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/project/task/modules_task.php b/htdocs/core/modules/project/task/modules_task.php index 2600538f273..9addc4bc56e 100644 --- a/htdocs/core/modules/project/task/modules_task.php +++ b/htdocs/core/modules/project/task/modules_task.php @@ -52,12 +52,12 @@ abstract class ModelePDFTask extends CommonDocGenerator global $conf; $type = 'project_task'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 7b2ac19a016..caaa92f8238 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -183,24 +183,24 @@ class doc_generic_proposal_odt extends ModelePDFPropales if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFPropales::liste_modeles($this->db); + $list = ModelePDFPropales::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
'.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->PROPALE_ADDON_PDF_ODT_DEFAULT); $texte .= "
'.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL); $texte .= "
'.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->PROPALE_ADDON_PDF_ODT_CLOSED); $texte .= "
'; } diff --git a/htdocs/core/modules/propale/modules_propale.php b/htdocs/core/modules/propale/modules_propale.php index 2127ff1f70c..ffcc13dc269 100644 --- a/htdocs/core/modules/propale/modules_propale.php +++ b/htdocs/core/modules/propale/modules_propale.php @@ -56,12 +56,12 @@ abstract class ModelePDFPropales extends CommonDocGenerator global $conf; $type = 'propal'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/reception/modules_reception.php b/htdocs/core/modules/reception/modules_reception.php index 28b0bce6500..a7b7cae7344 100644 --- a/htdocs/core/modules/reception/modules_reception.php +++ b/htdocs/core/modules/reception/modules_reception.php @@ -46,12 +46,12 @@ abstract class ModelePdfReception extends CommonDocGenerator global $conf; $type = 'reception'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/societe/modules_societe.class.php b/htdocs/core/modules/societe/modules_societe.class.php index 03463f364bd..28d0120da72 100644 --- a/htdocs/core/modules/societe/modules_societe.class.php +++ b/htdocs/core/modules/societe/modules_societe.class.php @@ -51,12 +51,12 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator global $conf; $type = 'company'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } @@ -168,7 +168,7 @@ abstract class ModeleThirdPartyCode public static function liste_modeles($db, $maxfilenamelength = 0) { // phpcs:enable - $liste = array(); + $list = array(); $sql = ""; $resql = $db->query($sql); @@ -177,13 +177,13 @@ abstract class ModeleThirdPartyCode $i = 0; while ($i < $num) { $row = $db->fetch_row($resql); - $liste[$row[0]] = $row[1]; + $list[$row[0]] = $row[1]; $i++; } } else { return -1; } - return $liste; + return $list; } /** diff --git a/htdocs/core/modules/stock/modules_stock.php b/htdocs/core/modules/stock/modules_stock.php index cd4fed5665f..2c9f9e82591 100644 --- a/htdocs/core/modules/stock/modules_stock.php +++ b/htdocs/core/modules/stock/modules_stock.php @@ -43,11 +43,11 @@ abstract class ModelePDFStock extends CommonDocGenerator global $conf; $type = 'stock'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index dcd48b25913..d7d28afa9e8 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -57,12 +57,12 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator global $conf; $type = 'order_supplier'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php index c5c5fd489f9..0d4cbaff529 100644 --- a/htdocs/core/modules/supplier_payment/modules_supplier_payment.php +++ b/htdocs/core/modules/supplier_payment/modules_supplier_payment.php @@ -42,12 +42,12 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator global $conf; $type = 'supplier_payment'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 8c42681e986..e54d9db3076 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -184,24 +184,24 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFSupplierProposal::liste_modeles($this->db); + $list = ModelePDFSupplierProposal::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
'.$langs->trans("DefaultModelSupplierProposalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT); $texte .= "
'.$langs->trans("DefaultModelSupplierProposalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_TOBILL); $texte .= "
'.$langs->trans("DefaultModelSupplierProposalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_CLOSED); $texte .= "
'; } diff --git a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php index 4e32817ff19..195533b1ce1 100644 --- a/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php +++ b/htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php @@ -56,12 +56,12 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator global $conf; $type = 'supplier_proposal'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); + $list = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + return $list; } } diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index 2e39bf53ea2..47e9e8bccc5 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -166,24 +166,24 @@ class doc_generic_user_odt extends ModelePDFUser if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFUser::liste_modeles($this->db); + $list = ModelePDFUser::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
'.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->USER_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->USER_ADDON_PDF_ODT_DEFAULT); $texte .= "
'.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->USER_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->USER_ADDON_PDF_ODT_TOBILL); $texte .= "
'.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->USER_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->USER_ADDON_PDF_ODT_CLOSED); $texte .= "
'; } diff --git a/htdocs/core/modules/user/modules_user.class.php b/htdocs/core/modules/user/modules_user.class.php index 2269d530c97..b0142687ce5 100644 --- a/htdocs/core/modules/user/modules_user.class.php +++ b/htdocs/core/modules/user/modules_user.class.php @@ -58,10 +58,10 @@ abstract class ModelePDFUser extends CommonDocGenerator global $conf; $type = 'user'; - $liste = array(); + $list = array(); include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $liste = getListOfModels($db, $type, $maxfilenamelength); - return $liste; + $list = getListOfModels($db, $type, $maxfilenamelength); + return $list; } } diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 6fcc6160a97..4c718db5654 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -169,24 +169,24 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0) { // Model for creation - $liste = ModelePDFUserGroup::liste_modeles($this->db); + $list = ModelePDFUserGroup::liste_modeles($this->db); $texte .= ''; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= ''; $texte .= ''; $texte .= '"; $texte .= '
'.$langs->trans("DefaultModelPropalCreate").''; - $texte .= $form->selectarray('value2', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_DEFAULT); + $texte .= $form->selectarray('value2', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_DEFAULT); $texte .= "
'.$langs->trans("DefaultModelPropalToBill").''; - $texte .= $form->selectarray('value3', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_TOBILL); + $texte .= $form->selectarray('value3', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_TOBILL); $texte .= "
'.$langs->trans("DefaultModelPropalClosed").''; - $texte .= $form->selectarray('value4', $liste, $conf->global->USERGROUP_ADDON_PDF_ODT_CLOSED); + $texte .= $form->selectarray('value4', $list, $conf->global->USERGROUP_ADDON_PDF_ODT_CLOSED); $texte .= "
'; } diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index 452f06efb0a..ae7aa840ab9 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -81,6 +81,9 @@ $error = 0; * Actions */ +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ecmautocard', 'globalcard')); + // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { @@ -327,6 +330,14 @@ if (!empty($conf->global->ECM_AUTO_TREE_ENABLED)) if (!empty($conf->mrp->enabled)) { $langs->load("mrp"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'mrp-mo', 'test'=>$conf->mrp->enabled, 'label'=>$langs->trans("MOs"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("ManufacturingOrders"))); } if (!empty($conf->recruitment->enabled)) { $langs->load("recruitment"); $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'recruitment-recruitmentcandidature', 'test'=>$conf->recruitment->enabled, 'label'=>$langs->trans("Candidatures"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("JobApplications"))); } $rowspan++; $sectionauto[] = array('level'=>1, 'module'=>'user', 'test'=>1, 'label'=>$langs->trans("Users"), 'desc'=>$langs->trans("ECMDocsBy", $langs->transnoentitiesnoconv("Users"))); + + $parameters = array(); + $reshook = $hookmanager->executeHooks('addSectionECMAuto', $parameters); + if ($reshook > 0 && is_array($hookmanager->resArray) && count($hookmanager->resArray)>0) + { + $sectionauto[]=$hookmanager->resArray; + $rowspan += count($hookmanager->resArray); + } } $head = ecm_prepare_dasboard_head(''); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index c13206e9450..0652424d919 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -1013,12 +1013,12 @@ if ($action == 'create') // Document model include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; - $liste = ModelePdfExpedition::liste_modeles($db); - if (count($liste) > 1) + $list = ModelePdfExpedition::liste_modeles($db); + if (count($list) > 1) { print "".$langs->trans("DefaultModel").""; print ''; - print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF); + print $form->selectarray('model', $list, $conf->global->EXPEDITION_ADDON_PDF); print "\n"; } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 344ede7d0cd..1f8e6bb0bea 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -502,8 +502,8 @@ if ($step == 2 && $datatoimport) print ''; print $langs->trans("FileMustHaveOneOfFollowingFormat"); print ''; - $liste = $objmodelimport->liste_modeles($db); - foreach ($liste as $key) + $list = $objmodelimport->liste_modeles($db); + foreach ($list as $key) { print ''; print ''.img_picto_common($key, $objmodelimport->getPictoForKey($key)).''; @@ -533,7 +533,7 @@ if ($step == 3 && $datatoimport) if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:Módulo_Importaciones'); @@ -731,7 +731,7 @@ if ($step == 3 && $datatoimport) if ($step == 4 && $datatoimport) { $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); // Create classe to use for import $dir = DOL_DOCUMENT_ROOT."/core/modules/import/"; @@ -1264,7 +1264,7 @@ if ($step == 5 && $datatoimport) } $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); // Create classe to use for import $dir = DOL_DOCUMENT_ROOT."/core/modules/import/"; @@ -1703,7 +1703,7 @@ if ($step == 6 && $datatoimport) } $model = $format; - $liste = $objmodelimport->liste_modeles($db); + $list = $objmodelimport->liste_modeles($db); $importid = GETPOST("importid", 'alphanohtml'); diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 4c556325b05..e27712a5e56 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -68,9 +68,9 @@ print ''; include_once DOL_DOCUMENT_ROOT.'/core/modules/import/modules_import.php'; $model = new ModeleImports(); -$liste = $model->liste_modeles($db); +$list = $model->liste_modeles($db); -foreach ($liste as $key) +foreach ($list as $key) { print ''; print ''.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).''; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 81f3f1783f7..ad8418dfc0e 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -563,11 +563,10 @@ if (!empty($arrayfields['p.title']['checked'])) if (!empty($arrayfields['s.nom']['checked'])) { print ''; - if ($socid > 0) - { + if ($socid > 0) { $tmpthirdparty = new Societe($db); $tmpthirdparty->fetch($socid); - $search_societe = $tmpthirdparty->nom; + $search_societe = $tmpthirdparty->name; } print ''; print ''; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 27ba05f24bb..41e8f60e634 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -860,13 +860,13 @@ if ($action == 'create') // Document model include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php'; - $liste = ModelePdfReception::liste_modeles($db); + $list = ModelePdfReception::liste_modeles($db); - if (count($liste) > 1) + if (count($list) > 1) { print "".$langs->trans("DefaultModel").""; print ''; - print $form->selectarray('model', $liste, $conf->global->RECEPTION_ADDON_PDF); + print $form->selectarray('model', $list, $conf->global->RECEPTION_ADDON_PDF); print "\n"; } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 05bc3aec44d..92d38c519de 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1216,9 +1216,9 @@ if ($action == 'create') print ''; print ''.$langs->trans("DefaultModel").''; print ''; - $liste = ModelePDFSupplierProposal::liste_modeles($db); + $list = ModelePDFSupplierProposal::liste_modeles($db); $preselected = ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT ? $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_DEFAULT : $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF); - print $form->selectarray('model', $liste, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray('model', $list, $preselected, 0, 0, 0, '', 0, 0, 0, '', '', 1); print ""; // Project diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index ce67dc0b839..52efe3a0147 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -189,7 +189,7 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase /** * testAccountingAccountUpdate * - * @param Object $localobject AccountingAccount + * @param AccountingAccount $localobject AccountingAccount * @return int ID accounting account * * @depends testAccountingAccountFetch diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index db1ff5667ef..cb908416535 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -207,7 +207,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase /** * testActionCommUpdate * - * @param Object $localobject ActionComm + * @param ActionComm $localobject ActionComm * @return int Id action comm updated * * @depends testActionCommFetch diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 0c43d2e53e8..3e229d3b41c 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -180,7 +180,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase /** * testBankAccountOther * - * @param Object $localobject Object contract + * @param Account $localobject Account * @return int * * @depends testBankAccountFetch diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 4c26edcd644..28fc9b8daac 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -272,7 +272,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase /** * testCommandeFournisseurValid * - * @param Object $localobject Supplier order + * @param CommandeFournisseur $localobject Supplier order * @return CommandeFournisseur Supplier order * * @depends testCommandeFournisseurFetch @@ -296,7 +296,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase /** * testCommandeFournisseurApprove * - * @param Object $localobject Supplier order + * @param CommandeFournisseur $localobject Supplier order * @return CommandeFournisseur Supplier order * * @depends testCommandeFournisseurValid @@ -320,7 +320,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase /** * testCommandeFournisseurCancel * - * @param Object $localobject Supplier order + * @param CommandeFournisseur $localobject Supplier order * @return CommandeFournisseur Supplier order * * @depends testCommandeFournisseurApprove @@ -344,7 +344,7 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase /** * testCommandeFournisseurOther * - * @param Object $localobject Supplier order + * @param CommandeFournisseur $localobject Supplier order * @return int Id of purchase order * * @depends testCommandeFournisseurCancel diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index c735890b02e..4ab81d63524 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -180,7 +180,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase /** * testCommandeUpdate * - * @param Object $localobject Commande + * @param Commande $localobject Commande * @return Commande * * @depends testCommandeFetch @@ -205,7 +205,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase /** * testCommandeValid * - * @param Object $localobject Order + * @param Commande $localobject Order * @return Commande * * @depends testCommandeUpdate @@ -229,7 +229,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase /** * testCommandeCancel * - * @param Object $localobject Order + * @param Commande $localobject Order * @return Commande * * @depends testCommandeValid @@ -253,7 +253,7 @@ class CommandeTest extends PHPUnit\Framework\TestCase /** * testCommandeOther * - * @param Object $localobject Order + * @param Commande $localobject Order * @return int Order id * * @depends testCommandeCancel diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index 9addda59cef..f4cfaefb809 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -17,7 +17,7 @@ */ /** - * \file test/phpunit/CommonObjectTest.php + * \file test/phpunit/CommonInvoiceTest.php * \ingroup test * \brief PHPUnit test * \remarks To run this script as CLI: phpunit filename.php diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 17f6a9ccacf..8b78712209f 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -150,8 +150,8 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase /** * testCompanyBankAccountFetch * - * @param int $id Id of bank account - * @return Object Bank account object + * @param int $id Id of bank account + * @return CompanyBankAccount Bank account object * * @depends testCompanyBankAccountCreate * The depends says test is run only if previous is ok @@ -174,7 +174,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase /** * testCompanyBankAccountSetAsDefault * - * @param Object $localobject Bank account + * @param CompanyBankAccount $localobject Bank account * @return int * * @depends testCompanyBankAccountFetch @@ -196,7 +196,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase /** * testCompanyBankAccountUpdate * - * @param Object $localobject Bank account object + * @param CompanyBankAccount $localobject Bank account object * @return int * * @depends testCompanyBankAccountFetch @@ -221,7 +221,7 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase /** * testCompanyBankAccountOther * - * @param Object $localobject Bank account + * @param CompanyBankAccount $localobject Bank account * @return int * * @depends testCompanyBankAccountFetch diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index 5749d08cbae..cd21427eba7 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -176,7 +176,7 @@ class ContratTest extends PHPUnit\Framework\TestCase /** * testContratOther * - * @param Object $localobject Object contract + * @param Contract $localobject Object contract * @return int * * @depends testContratFetch diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index c24bf9d19e9..247a9dd1012 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -195,7 +195,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase /** * testExpenseReportValid * - * @param Object $localobject Supplier order + * @param ExpenseReport $localobject ExpenseReport * @return void * * @depends testExpenseReportFetch @@ -219,7 +219,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase /** * testExpenseReportApprove * - * @param Object $localobject Supplier order + * @param ExpenseReport $localobject ExpenseReport * @return void * * @depends testExpenseReportValid @@ -243,7 +243,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase /** * testExpenseReportCancel * - * @param Object $localobject Supplier order + * @param ExpenseReport $localobject ExpenseReport * @return void * * @depends testExpenseReportApprove @@ -267,7 +267,7 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase /** * testExpenseReportOther * - * @param Object $localobject Supplier order + * @param ExpenseReport $localobject ExpenseReport * @return void * * @depends testExpenseReportCancel diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index c7873ae3206..06d28a03067 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -175,7 +175,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase /** * testFactureFournisseurUpdate * - * @param Object $localobject Supplier invoice + * @param FactureFournisseur $localobject Supplier invoice * @return int * * @depends testFactureFournisseurFetch @@ -200,7 +200,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase /** * testFactureFournisseurValid * - * @param Object $localobject Supplier invoice + * @param FactureFournisseur $localobject Supplier invoice * @return void * * @depends testFactureFournisseurUpdate @@ -224,7 +224,7 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase /** * testFactureFournisseurOther * - * @param Object $localobject Supplier invoice + * @param FactureFournisseur $localobject Supplier invoice * @return void * * @depends testFactureFournisseurValid diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 459bea8ae87..2a0b8823973 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -152,15 +152,10 @@ class FactureRecTest extends PHPUnit\Framework\TestCase return $result; } - - - - - /** * Edit an object to test updates * - * @param mixed $localobject Object Facture + * @param Facture $localobject Object Facture * @return void */ public function changeProperties(&$localobject) diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 700507a4edf..ddb895d1b96 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -183,7 +183,7 @@ class FactureTest extends PHPUnit\Framework\TestCase /** * testFactureFetch * - * @param Object $localobject Invoice + * @param Facture $localobject Invoice * @return int * * @depends testFactureFetch @@ -208,7 +208,7 @@ class FactureTest extends PHPUnit\Framework\TestCase /** * testFactureValid * - * @param Object $localobject Invoice + * @param Facture $localobject Invoice * @return void * * @depends testFactureUpdate @@ -257,7 +257,7 @@ class FactureTest extends PHPUnit\Framework\TestCase /** * testFactureOther * - * @param Object $localobject Invoice + * @param Facture $localobject Invoice * @return int * * @depends testFactureValid @@ -345,7 +345,7 @@ class FactureTest extends PHPUnit\Framework\TestCase /** * Edit an object to test updates * - * @param mixed $localobject Object Facture + * @param Facture $localobject Object Facture * @return void */ public function changeProperties(&$localobject) diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index b2b0b3daf91..fb8cdd0b12e 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -200,7 +200,7 @@ class FichinterTest extends PHPUnit\Framework\TestCase /** * testFichinterValid * - * @param Object $localobject Object intervention + * @param Fichinter $localobject Object intervention * @return int * * @depends testFichinterValid diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 5d73067760d..fddff66e9ea 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -1,6 +1,4 @@ * Copyright (C) 2012 Regis Houssin *