Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
623d7b9819
@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2013-2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -1557,12 +1557,11 @@ if ($action == 'create')
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
if ($socid > 0)
|
||||
{
|
||||
if ($socid > 0) {
|
||||
// Contacts (ask contact only if thirdparty already defined).
|
||||
print "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
|
||||
print img_picto('', 'contact');
|
||||
$form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
||||
print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, $srccontactslist);
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party discounts info line
|
||||
@ -1612,8 +1611,9 @@ if ($action == 'create')
|
||||
|
||||
// Delivery delay
|
||||
print '<tr class="fielddeliverydelay"><td>'.$langs->trans('AvailabilityPeriod');
|
||||
if (!empty($conf->commande->enabled))
|
||||
if (!empty($conf->commande->enabled)) {
|
||||
print ' ('.$langs->trans('AfterOrder').')';
|
||||
}
|
||||
print '</td><td>';
|
||||
print img_picto('', 'clock').' ';
|
||||
$form->selectAvailabilityDelay('', 'availability_id', '', 1);
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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 "<tr><td>".$langs->trans("DefaultContact").'</td><td>';
|
||||
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 '</td></tr>';
|
||||
|
||||
// Ligne info remises tiers
|
||||
@ -1644,8 +1644,7 @@ if ($action == 'create' && $usercancreate)
|
||||
print '</td></tr>';
|
||||
|
||||
// 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 '<tr><td>'.$langs->trans('BankAccount').'</td><td>';
|
||||
print img_picto('', 'bank_account');
|
||||
$form->select_comptes($fk_account, 'fk_account', 0, '', 1);
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2016-2018 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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;
|
||||
|
||||
@ -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 '<br>';
|
||||
*/
|
||||
|
||||
$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 '<td>'.$langs->trans("RUM").'</td>';
|
||||
print '<td class="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td class="right">'.$langs->trans("DateRequest").'</td>';
|
||||
if ($massactionbutton || $massaction ) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
{
|
||||
print '<td align="center">'.$form->showCheckAddButtons('checkforselect', 1).'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
if ($num)
|
||||
@ -402,6 +418,15 @@ if ($resql)
|
||||
print '<td class="right">';
|
||||
print dol_print_date($db->jdate($obj->date_demande), 'day');
|
||||
print '</td>';
|
||||
// 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 '<td class="nowrap center">';
|
||||
$selected = 0;
|
||||
if (in_array($obj->request_row_id, $arrayofselected)) $selected = 1;
|
||||
print '<input id="cb'.$obj->request_row_id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->request_row_id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
print '</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -161,6 +161,7 @@ class HookManager
|
||||
'addMoreMassActions',
|
||||
'addSearchEntry',
|
||||
'addStatisticLine',
|
||||
'addSectionECMAuto',
|
||||
'createDictionaryFieldlist',
|
||||
'editDictionaryFieldlist',
|
||||
'getFormMail',
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 .= '<table width="50%;">';
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '<tr>';
|
||||
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '</table>';
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 .= '<table width="50%;">';
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalCreate").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalToBill").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '<tr>';
|
||||
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelSupplierProposalClosed").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '</table>';
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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 .= '<table width="50%;">';
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '<tr>';
|
||||
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '</table>';
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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 .= '<table width="50%;">';
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalCreate").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
|
||||
$texte .= '<tr>';
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalToBill").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '<tr>';
|
||||
|
||||
$texte .= '<td width="60%;">'.$langs->trans("DefaultModelPropalClosed").'</td>';
|
||||
$texte .= '<td colspan="">';
|
||||
$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 .= "</td></tr>";
|
||||
$texte .= '</table>';
|
||||
}
|
||||
|
||||
@ -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('');
|
||||
|
||||
@ -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 "<tr><td>".$langs->trans("DefaultModel")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray('model', $liste, $conf->global->EXPEDITION_ADDON_PDF);
|
||||
print $form->selectarray('model', $list, $conf->global->EXPEDITION_ADDON_PDF);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -502,8 +502,8 @@ if ($step == 2 && $datatoimport)
|
||||
print '<tr class="liste_titre"><td colspan="6">';
|
||||
print $langs->trans("FileMustHaveOneOfFollowingFormat");
|
||||
print '</td></tr>';
|
||||
$liste = $objmodelimport->liste_modeles($db);
|
||||
foreach ($liste as $key)
|
||||
$list = $objmodelimport->liste_modeles($db);
|
||||
foreach ($list as $key)
|
||||
{
|
||||
print '<tr class="oddeven">';
|
||||
print '<td width="16">'.img_picto_common($key, $objmodelimport->getPictoForKey($key)).'</td>';
|
||||
@ -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');
|
||||
|
||||
|
||||
|
||||
@ -68,9 +68,9 @@ print '</tr>';
|
||||
|
||||
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 '<tr class="oddeven">';
|
||||
print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>';
|
||||
|
||||
@ -563,11 +563,10 @@ if (!empty($arrayfields['p.title']['checked']))
|
||||
if (!empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
if ($socid > 0)
|
||||
{
|
||||
if ($socid > 0) {
|
||||
$tmpthirdparty = new Societe($db);
|
||||
$tmpthirdparty->fetch($socid);
|
||||
$search_societe = $tmpthirdparty->nom;
|
||||
$search_societe = $tmpthirdparty->name;
|
||||
}
|
||||
print '<input type="text" class="flat" name="search_societe" size="8" value="'.dol_escape_htmltag($search_societe).'">';
|
||||
print '</td>';
|
||||
|
||||
@ -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 "<tr><td>".$langs->trans("DefaultModel")."</td>";
|
||||
print '<td colspan="3">';
|
||||
print $form->selectarray('model', $liste, $conf->global->RECEPTION_ADDON_PDF);
|
||||
print $form->selectarray('model', $list, $conf->global->RECEPTION_ADDON_PDF);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
|
||||
@ -1216,9 +1216,9 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("DefaultModel").'</td>';
|
||||
print '<td colspan="2">';
|
||||
$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 "</td></tr>";
|
||||
|
||||
// Project
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -180,7 +180,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase
|
||||
/**
|
||||
* testBankAccountOther
|
||||
*
|
||||
* @param Object $localobject Object contract
|
||||
* @param Account $localobject Account
|
||||
* @return int
|
||||
*
|
||||
* @depends testBankAccountFetch
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
use Sabre\VObject\Property\Boolean;
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user