Merge branch 'develop' of github.com:Dolibarr/dolibarr into develop#5
This commit is contained in:
commit
0250baa0fe
52
ChangeLog
52
ChangeLog
@ -21,6 +21,58 @@ Following changes may create regressions for some external modules, but were nec
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.1 compared to 13.0.0 *****
|
||||
|
||||
FIX: 10.0 before crediting a withdrawal receipt, check whether it has been credited already.
|
||||
FIX: 11.0 when a mandatory extrafield of type sellist contains '0' it should be considered empty and trigger an error message upon insertion
|
||||
FIX: 11.0 when a new intervention is created from an object, a new $extrafields object is instantiated but not initialized
|
||||
FIX: create MO, Column 'tms' cannot be null
|
||||
FIX: #14290 #15900
|
||||
FIX: #16076
|
||||
FIX: #16077
|
||||
FIX: #16079
|
||||
FIX: #16080
|
||||
FIX: 16084
|
||||
FIX: #16107
|
||||
FIX: #16118 Timezone problem on some fields
|
||||
FIX: #16131
|
||||
FIX: #16135
|
||||
FIX: #16143
|
||||
FIX: #16156
|
||||
FIX: #16160
|
||||
FIX: #16185
|
||||
FIX: #16189, fix download/see check deposit PDF
|
||||
FIX: #16215
|
||||
FIX: Accountancy - label_operation is used instead of label_compte
|
||||
FIX: Add critical price patch
|
||||
FIX: Assignement of actors on tasks
|
||||
FIX: Bad dates on info tabs
|
||||
FIX: cash fence for takepos with multientity
|
||||
FIX: CSRF errors on margin forms
|
||||
FIX: encoding status in graph of vendor proposals
|
||||
FIX: Fix detect dispached product and set to received completely when the supplier order have services (support STOCK_SUPPORTS_SERVICES)
|
||||
FIX: Hide/Unhide external ICSS calendars
|
||||
FIX: link to create event when task is in a project with a thirdparty
|
||||
FIX: Localtax must be converted with price2num
|
||||
FIX: manage price min for PRODUIT_CUSTOMER_PRICES
|
||||
FIX: Missing language ico
|
||||
FIX: Must not be able to edit vat of all lines if not draft
|
||||
FIX: Bad "htdocs" found into a path
|
||||
FIX: removed no more used proc update_modified_column_date_m on pgsql (its presence triggered errors)
|
||||
FIX: Vulnerability report by Ricardo Matias
|
||||
FIX: select default mail template
|
||||
FIX: Select transport mode function when creating a supplier invoice and add unique key to the table llx_c_transport_mode in migrate sql
|
||||
FIX: Merge of thirdparties : "unknow column fk_soc" + "Delivery" label
|
||||
FIX: SQL Error in group by with postgres or mysql strict mode
|
||||
FIX: takepos : load date function
|
||||
FIX: Timeout during import
|
||||
FIX: Trigger on expense report was not fired
|
||||
FIX: User creation of expense report not visible
|
||||
FIX: warning when adding a line if $remise_percent is an empty string
|
||||
FIX: status late on purchase orders
|
||||
FIX: ODT generation very slow
|
||||
|
||||
|
||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||
|
||||
For users:
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -1381,7 +1381,7 @@ if ($resql)
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
//print '<div class="float">':
|
||||
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
print ' ';
|
||||
|
||||
@ -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;
|
||||
@ -739,11 +762,11 @@ class Commande extends CommonOrder
|
||||
|
||||
if ($usercanclose)
|
||||
{
|
||||
$this->db->begin();
|
||||
if ($this->statut == self::STATUS_CLOSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
$this->db->begin();
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
||||
@ -33,6 +33,7 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
|
||||
@ -740,7 +741,7 @@ while ($i < min($num, $limit))
|
||||
$userstatic->gender = $val['gender'];
|
||||
|
||||
//print '<div class="float">':
|
||||
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
print ' ';
|
||||
|
||||
@ -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))
|
||||
|
||||
@ -970,7 +970,7 @@ abstract class CommonObject
|
||||
* @param int|string $type_contact Type of contact (code or id). Must be id or code found into table llx_c_type_contact. For example: SALESREPFOLL
|
||||
* @param string $source external=Contact extern (llx_socpeople), internal=Contact intern (llx_user)
|
||||
* @param int $notrigger Disable all triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
* @return int <0 if KO, 0 if already added, >0 if OK
|
||||
*/
|
||||
public function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0)
|
||||
{
|
||||
@ -1075,7 +1075,9 @@ abstract class CommonObject
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
} else return 0;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@ -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)
|
||||
{
|
||||
@ -4308,7 +4308,7 @@ class Form
|
||||
* @param string $question Question
|
||||
* @param string $action Action
|
||||
* @param array|string $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , 'size'=>, 'morecss'=>, 'moreattr'=>))
|
||||
* type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ...
|
||||
* type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', 'other' or 'onecolumn'...
|
||||
* @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0'
|
||||
* @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx
|
||||
* @param int|string $height Force height of box (0 = auto)
|
||||
@ -4422,6 +4422,8 @@ class Form
|
||||
$moreonecolumn .= '<div class="margintoponly">';
|
||||
$moreonecolumn .= $input['value'];
|
||||
$moreonecolumn .= '</div>'."\n";
|
||||
} else {
|
||||
$more .= 'Error type '.$input['type'].' for the confirm box is not a supported type';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4449,16 +4451,24 @@ class Form
|
||||
}
|
||||
$pageyes = $page.(preg_match('/\?/', $page) ? '&' : '?').'action='.$action.'&confirm=yes';
|
||||
$pageno = ($useajax == 2 ? $page.(preg_match('/\?/', $page) ? '&' : '?').'confirm=no' : '');
|
||||
|
||||
// Add input fields into list of fields to read during submit (inputok and inputko)
|
||||
if (is_array($formquestion))
|
||||
{
|
||||
foreach ($formquestion as $key => $input)
|
||||
{
|
||||
if (is_array($formquestion)) {
|
||||
foreach ($formquestion as $key => $input) {
|
||||
//print "xx ".$key." rr ".is_array($input)."<br>\n";
|
||||
if (is_array($input) && isset($input['name'])) array_push($inputok, $input['name']);
|
||||
// Add name of fields to propagate with the GET when submitting the form with button OK.
|
||||
if (is_array($input) && isset($input['name'])) {
|
||||
if (strpos($input['name'], ',') > 0) {
|
||||
$inputok = array_merge($inputok, explode(',', $input['name']));
|
||||
} else {
|
||||
array_push($inputok, $input['name']);
|
||||
}
|
||||
}
|
||||
// Add name of fields to propagate with the GET when submitting the form with button KO.
|
||||
if (isset($input['inputko']) && $input['inputko'] == 1) array_push($inputko, $input['name']);
|
||||
}
|
||||
}
|
||||
|
||||
// Show JQuery confirm box.
|
||||
$formconfirm .= '<div id="'.$dialogconfirm.'" title="'.dol_escape_htmltag($title).'" style="display: none;">';
|
||||
if (is_array($formquestion) && !empty($formquestion['text'])) {
|
||||
|
||||
@ -758,9 +758,10 @@ class FormCompany extends Form
|
||||
* @param int $showempty 1=Add en empty line
|
||||
* @param string $morecss Add more css to select component
|
||||
* @param int $output 0=return HTML, 1= direct print
|
||||
* @param int $forcehidetooltip Force hide tooltip for admin
|
||||
* @return void
|
||||
*/
|
||||
public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '', $output = 1)
|
||||
public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '', $output = 1, $forcehidetooltip = 0)
|
||||
{
|
||||
global $user, $langs;
|
||||
$out = '';
|
||||
@ -777,7 +778,7 @@ class FormCompany extends Form
|
||||
$out .= '>'.$value.'</option>';
|
||||
}
|
||||
$out .= "</select>";
|
||||
if ($user->admin) $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
if ($user->admin && empty($forcehidetooltip)) $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
|
||||
$out .= ajax_combobox($htmlname);
|
||||
|
||||
|
||||
@ -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>';
|
||||
}
|
||||
|
||||
@ -710,8 +710,8 @@ if (!empty($usemargins) && $user->rights->margins->creer)
|
||||
jQuery.each(data.array_options, function( key, value ) {
|
||||
jQuery('div[class$="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value);
|
||||
});
|
||||
<?php
|
||||
}?>
|
||||
<?php
|
||||
} ?>
|
||||
},
|
||||
'json'
|
||||
);
|
||||
|
||||
@ -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";
|
||||
}
|
||||
|
||||
|
||||
@ -3069,8 +3069,10 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
/**
|
||||
* Is the supplier order delayed?
|
||||
* We suppose a purchase ordered as late if a the purchase order has been sent and the delivery date is set and before the delay.
|
||||
* If order has not been sent, we use the order date.
|
||||
*
|
||||
* @return bool
|
||||
* @return bool True if object is delayed
|
||||
*/
|
||||
public function hasDelay()
|
||||
{
|
||||
@ -3078,14 +3080,28 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
if (empty($this->delivery_date) && !empty($this->date_livraison)) $this->delivery_date = $this->date_livraison; // For backward compatibility
|
||||
|
||||
$now = dol_now();
|
||||
$date_to_test = empty($this->delivery_date) ? $this->date_commande : $this->delivery_date;
|
||||
if ($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY) {
|
||||
$now = dol_now();
|
||||
if (!empty($this->delivery_date)) {
|
||||
$date_to_test = $this->delivery_date;
|
||||
return $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||
} else {
|
||||
//$date_to_test = $this->date_commande;
|
||||
//return $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
$now = dol_now();
|
||||
$date_to_test = $this->date_commande;
|
||||
|
||||
return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||
return ($this->statut > 0 && $this->statut < 5) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the customer delayed info
|
||||
* Show the customer delayed info.
|
||||
* We suppose a purchase ordered as late if a the purchase order has been sent and the delivery date is set and before the delay.
|
||||
* If order has not been sent, we use the order date.
|
||||
*
|
||||
* @return string Show delayed information
|
||||
*/
|
||||
@ -3095,12 +3111,20 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
if (empty($this->delivery_date) && !empty($this->date_livraison)) $this->delivery_date = $this->date_livraison; // For backward compatibility
|
||||
|
||||
if (empty($this->delivery_date)) {
|
||||
$text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day');
|
||||
$text = '';
|
||||
|
||||
if ($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY) {
|
||||
if (!empty($this->delivery_date)) {
|
||||
$text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day');
|
||||
} else {
|
||||
$text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day');
|
||||
}
|
||||
} else {
|
||||
$text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day');
|
||||
$text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day');
|
||||
}
|
||||
if ($text) {
|
||||
$text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today");
|
||||
}
|
||||
$text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today");
|
||||
|
||||
return $text;
|
||||
}
|
||||
|
||||
@ -2153,6 +2153,12 @@ if ($action == 'create')
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Delivery delay (in days)
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('NbDaysToDelivery').' '.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>';
|
||||
print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Delivery date planed
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding centpercent"><tr><td>';
|
||||
@ -2181,12 +2187,6 @@ if ($action == 'create')
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Delivery delay (in days)
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('NbDaysToDelivery').' '.img_picto($langs->trans('DescNbDaysToDelivery'), 'info', 'style="cursor:help"').'</td>';
|
||||
print '<td>'.$object->getMaxDeliveryTimeDay($langs).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Incoterms
|
||||
if (!empty($conf->incoterm->enabled))
|
||||
{
|
||||
|
||||
@ -724,7 +724,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
$sql .= $hookmanager->resPrint;
|
||||
|
||||
$sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
||||
$sql .= " GROUP BY p.ref, p.label, p.tobatch, p.fk_default_warehouse, l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product
|
||||
$sql .= " ORDER BY p.ref, p.label";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
@ -142,30 +142,30 @@ if (empty($user->socid)) $fieldstosearchall["cf.note_private"] = "NotePrivate";
|
||||
|
||||
$checkedtypetiers = 0;
|
||||
$arrayfields = array(
|
||||
'cf.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1),
|
||||
'cf.ref_supplier'=>array('label'=>$langs->trans("RefOrderSupplierShort"), 'checked'=>1, 'enabled'=>1),
|
||||
'p.project_ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>1),
|
||||
'u.login'=>array('label'=>$langs->trans("AuthorRequest"), 'checked'=>1),
|
||||
's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1),
|
||||
's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1),
|
||||
's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1),
|
||||
'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0),
|
||||
'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers),
|
||||
'cf.date_commande'=>array('label'=>$langs->trans("OrderDateShort"), 'checked'=>1),
|
||||
'cf.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)),
|
||||
'cf.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1),
|
||||
'cf.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0),
|
||||
'cf.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0),
|
||||
'cf.ref'=>array('label'=>"Ref", 'checked'=>1),
|
||||
'cf.ref_supplier'=>array('label'=>"RefOrderSupplierShort", 'checked'=>1, 'enabled'=>1),
|
||||
'p.project_ref'=>array('label'=>"ProjectRef", 'checked'=>0, 'enabled'=>1),
|
||||
'u.login'=>array('label'=>"AuthorRequest", 'checked'=>1),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>1),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1),
|
||||
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
|
||||
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
|
||||
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
|
||||
'cf.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1),
|
||||
'cf.date_livraison'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)),
|
||||
'cf.total_ht'=>array('label'=>"AmountHT", 'checked'=>1),
|
||||
'cf.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0),
|
||||
'cf.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0),
|
||||
'cf.multicurrency_code'=>array('label'=>'Currency', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_tx'=>array('label'=>'CurrencyRate', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_ht'=>array('label'=>'MulticurrencyAmountHT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_vat'=>array('label'=>'MulticurrencyAmountVAT', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.multicurrency_total_ttc'=>array('label'=>'MulticurrencyAmountTTC', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1)),
|
||||
'cf.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500),
|
||||
'cf.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500),
|
||||
'cf.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000),
|
||||
'cf.billed'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>1)
|
||||
'cf.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500),
|
||||
'cf.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||
'cf.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||
'cf.billed'=>array('label'=>"Billed", 'checked'=>1, 'position'=>1000, 'enabled'=>1)
|
||||
);
|
||||
// Extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
||||
@ -539,7 +539,7 @@ if ($sall || $search_product_category > 0 || $search_user > 0) $sql = 'SELECT DI
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.town, s.zip, s.fk_pays, s.client, s.code_client, s.email,';
|
||||
$sql .= " typent.code as typent_code,";
|
||||
$sql .= " state.code_departement as state_code, state.nom as state_name,";
|
||||
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_delivery,";
|
||||
$sql .= " cf.rowid, cf.ref, cf.ref_supplier, cf.fk_statut, cf.billed, cf.total_ht, cf.tva as total_tva, cf.total_ttc, cf.fk_user_author, cf.date_commande as date_commande, cf.date_livraison as date_livraison,";
|
||||
$sql .= ' cf.fk_multicurrency, cf.multicurrency_code, cf.multicurrency_tx, cf.multicurrency_total_ht, cf.multicurrency_total_tva as multicurrency_total_vat, cf.multicurrency_total_ttc,';
|
||||
$sql .= ' cf.date_creation as date_creation, cf.tms as date_update,';
|
||||
$sql .= ' cf.note_public, cf.note_private,';
|
||||
@ -890,7 +890,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
}
|
||||
// Date delivery
|
||||
if (!empty($arrayfields['cf.date_delivery']['checked']))
|
||||
if (!empty($arrayfields['cf.date_livraison']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre nowraponall center">';
|
||||
if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat width25 valignmiddle" type="text" maxlength="2" name="search_deliveryday" value="'.$search_deliveryday.'">';
|
||||
@ -1009,7 +1009,7 @@ if ($resql)
|
||||
if (!empty($arrayfields['typent.code']['checked'])) print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.fk_author']['checked'])) print_liste_field_titre($arrayfields['cf.fk_author']['label'], $_SERVER["PHP_SELF"], "cf.fk_author", "", $param, '', $sortfield, $sortorder);
|
||||
if (!empty($arrayfields['cf.date_commande']['checked'])) print_liste_field_titre($arrayfields['cf.date_commande']['label'], $_SERVER["PHP_SELF"], "cf.date_commande", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.date_delivery']['checked'])) print_liste_field_titre($arrayfields['cf.date_delivery']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.date_livraison']['checked'])) print_liste_field_titre($arrayfields['cf.date_livraison']['label'], $_SERVER["PHP_SELF"], 'cf.date_livraison', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['cf.total_ht']['checked'])) print_liste_field_titre($arrayfields['cf.total_ht']['label'], $_SERVER["PHP_SELF"], "cf.total_ht", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.total_vat']['checked'])) print_liste_field_titre($arrayfields['cf.total_vat']['label'], $_SERVER["PHP_SELF"], "cf.tva", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['cf.total_ttc']['checked'])) print_liste_field_titre($arrayfields['cf.total_ttc']['label'], $_SERVER["PHP_SELF"], "cf.total_ttc", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
@ -1059,7 +1059,7 @@ if ($resql)
|
||||
$objectstatic->total_tva = $obj->total_tva;
|
||||
$objectstatic->total_ttc = $obj->total_ttc;
|
||||
$objectstatic->date_commande = $db->jdate($obj->date_commande);
|
||||
$objectstatic->date_delivery = $db->jdate($obj->date_delivery);
|
||||
$objectstatic->delivery_date = $db->jdate($obj->date_livraison);
|
||||
$objectstatic->note_public = $obj->note_public;
|
||||
$objectstatic->note_private = $obj->note_private;
|
||||
$objectstatic->statut = $obj->fk_statut;
|
||||
@ -1169,19 +1169,23 @@ if ($resql)
|
||||
{
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_commande), 'day');
|
||||
if ($objectstatic->hasDelay() && !empty($objectstatic->date_delivery)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
|
||||
if ($objectstatic->statut != $objectstatic::STATUS_ORDERSENT && $objectstatic->statut != $objectstatic::STATUS_RECEIVED_PARTIALLY) {
|
||||
if ($objectstatic->hasDelay()) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
}
|
||||
// Plannned date of delivery
|
||||
if (!empty($arrayfields['cf.date_delivery']['checked']))
|
||||
if (!empty($arrayfields['cf.date_livraison']['checked']))
|
||||
{
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($obj->date_delivery), 'day');
|
||||
if ($objectstatic->hasDelay() && !empty($objectstatic->date_delivery)) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
|
||||
print dol_print_date($db->jdate($obj->date_livraison), 'day');
|
||||
if ($objectstatic->statut == $objectstatic::STATUS_ORDERSENT || $objectstatic->statut == $objectstatic::STATUS_RECEIVED_PARTIALLY) {
|
||||
if ($objectstatic->hasDelay()) {
|
||||
print ' '.img_picto($langs->trans("Late").' : '.$objectstatic->showDelay(), "warning");
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) $totalarray['nbfield']++;
|
||||
|
||||
@ -498,7 +498,6 @@ if ($search_all || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_P
|
||||
if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet";
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
|
||||
// We'll need this table joined to the select in order to filter by sale
|
||||
if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
if ($search_user > 0)
|
||||
|
||||
@ -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>';
|
||||
|
||||
@ -138,6 +138,7 @@ class Odf
|
||||
if (strpos($this->contentXml, $tag) === false && strpos($this->stylesXml, $tag) === false) {
|
||||
// Add the throw only for development. In most cases, it is normal to not having the key into the document (only few keys are presents).
|
||||
//throw new OdfException("var $key not found in the document");
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->vars[$tag] = $this->convertVarToOdf($value, $encode, $charset);
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/intracommreport/class/intracommreport.class.php';
|
||||
|
||||
$langs->loadLangs(array("intracommreport"));
|
||||
var_dump($_POST);
|
||||
|
||||
$action = GETPOST('action');
|
||||
$exporttype = GETPOSTISSET('exporttype') ? GETPOST('exporttype', 'alphanohtml') : 'deb'; // DEB ou DES
|
||||
$year = GETPOSTINT('year');
|
||||
|
||||
@ -48,7 +48,9 @@ $object->fetch($loanid);
|
||||
$echeances = new LoanSchedule($db);
|
||||
$echeances->fetchAll($object->id);
|
||||
|
||||
if ($object->paid > 0 && count($echeances->lines) == 0) $pay_without_schedule = 1;
|
||||
if ($object->paid > 0 && count($echeances->lines) == 0) {
|
||||
$pay_without_schedule = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -86,8 +88,9 @@ if ($action == 'createecheancier' && empty($pay_without_schedule)) {
|
||||
$echeances->lines[] = $new_echeance;
|
||||
$i++;
|
||||
}
|
||||
var_dump($result);
|
||||
if ($result > 0) $db->commit();
|
||||
if ($result > 0) {
|
||||
$db->commit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'updateecheancier' && empty($pay_without_schedule)) {
|
||||
|
||||
@ -1517,7 +1517,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
// To use external ckeditor 4 js lib
|
||||
$pathckeditor = constant('JS_CKEDITOR');
|
||||
}
|
||||
print '<script><!-- enable ckeditor by main.inc.php -->';
|
||||
print '<script>';
|
||||
print '/* enable ckeditor by main.inc.php */';
|
||||
print 'var CKEDITOR_BASEPATH = \''.$pathckeditor.'\';'."\n";
|
||||
print 'var ckeditorConfig = \''.dol_buildpath($themesubdir.'/theme/'.$conf->theme.'/ckeditor/config.js'.($ext ? '?'.$ext : ''), 1).'\';'."\n"; // $themesubdir='' in standard usage
|
||||
print 'var ckeditorFilebrowserBrowseUrl = \''.DOL_URL_ROOT.'/core/filemanagerdol/browser/default/browser.php?Connector='.DOL_URL_ROOT.'/core/filemanagerdol/connectors/php/connector.php\';'."\n";
|
||||
@ -1525,8 +1526,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
||||
print '</script>'."\n";
|
||||
print '<script src="'.$pathckeditor.$jsckeditor.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
print '<script>';
|
||||
if (GETPOST('mode', 'aZ09') == 'Full_inline')
|
||||
{
|
||||
if (GETPOST('mode', 'aZ09') == 'Full_inline') {
|
||||
print 'CKEDITOR.disableAutoInline = false;'."\n";
|
||||
} else {
|
||||
print 'CKEDITOR.disableAutoInline = true;'."\n";
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
@ -53,24 +54,116 @@ $result = restrictedArea($user, 'projet', $id, 'projet&project');
|
||||
|
||||
$hookmanager->initHooks(array('projectcontactcard', 'globalcard'));
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Test if we can add contact to the tasks at the same times, if not or not required, make a redirect
|
||||
$formconfirmtoaddtasks = '';
|
||||
if ($action == 'addcontact') {
|
||||
$form = new Form($db);
|
||||
|
||||
$source=GETPOST("source", 'aZ09');
|
||||
|
||||
$taskstatic = new Task($db);
|
||||
$task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0);
|
||||
$nbTasks = count($task_array);
|
||||
|
||||
//If no task avaiblable, redirec to to add confirm
|
||||
$type_to = (GETPOST('typecontact') ? 'typecontact='.GETPOST('typecontact') : 'type='.GETPOST('type'));
|
||||
$personToAffect = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$affect_to = (GETPOST('userid') ? 'userid='.$personToAffect : 'contactid='.$personToAffect);
|
||||
$url_redirect='?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source;
|
||||
|
||||
if ($personToAffect > 0 && (empty($conf->global->PROJECT_HIDE_TASKS) || $nbTasks > 0)) {
|
||||
$text = $langs->trans('AddPersonToTask');
|
||||
$textbody = $text.' (<a href="#" class="selectall">'.$langs->trans("SelectAll").'</a>)';
|
||||
$formquestion = array('text' => $textbody);
|
||||
|
||||
$task_to_affect = array();
|
||||
foreach ($task_array as $task) {
|
||||
$task_already_affected=false;
|
||||
$personsLinked = $task->liste_contact(-1, $source);
|
||||
if (!is_array($personsLinked) && coun($personsLinked) < 0) {
|
||||
setEventMessage($object->error, 'errors');
|
||||
} else {
|
||||
foreach ($personsLinked as $person) {
|
||||
if ($person['id']==$personToAffect) {
|
||||
$task_already_affected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$task_already_affected) {
|
||||
$task_to_affect[$task->id] = $task->id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($task_to_affect)) {
|
||||
$action = 'addcontact_confirm';
|
||||
} else {
|
||||
$formcompany = new FormCompany($db);
|
||||
foreach ($task_array as $task) {
|
||||
$key = $task->id;
|
||||
$val = $task->ref . ' '.dol_trunc($task->label);
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'person_'.$key.',person_role_'.$key,
|
||||
'label' => '<input type="checkbox" class="flat'.(in_array($key, $task_to_affect) ? ' taskcheckboxes"' : '" checked disabled').' id="person_'.$key.'" name="person_'.$key.'" value="1"> <label for="person_'.$key.'">'.$val.'<label>',
|
||||
'value' => $formcompany->selectTypeContact($taskstatic, '', 'person_role_'.$key, $source, 'position', 0, 'minwidth100imp', 0, 1)
|
||||
);
|
||||
}
|
||||
$formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">');
|
||||
}
|
||||
|
||||
$formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590);
|
||||
$formconfirmtoaddtasks .='
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var saveprop = false;
|
||||
$(".selectall").click(function(){
|
||||
console.log("We click on select all with "+saveprop);
|
||||
if (!saveprop) {
|
||||
$(".taskcheckboxes").prop("checked", true);
|
||||
saveprop = true;
|
||||
} else {
|
||||
$(".taskcheckboxes").prop("checked", false);
|
||||
saveprop = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
} else {
|
||||
$action = 'addcontact_confirm';
|
||||
}
|
||||
}
|
||||
|
||||
// Add new contact
|
||||
if ($action == 'addcontact_confirm' && $user->rights->projet->creer)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||
|
||||
if (! ($contactid > 0)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors');
|
||||
}
|
||||
|
||||
$result = 0;
|
||||
$result = $object->fetch($id);
|
||||
|
||||
if ($result > 0 && $id > 0)
|
||||
if (!$error && $result > 0 && $id > 0)
|
||||
{
|
||||
$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
|
||||
$result = $object->add_contact($contactid, $typeid, GETPOST("source", 'aZ09'));
|
||||
if ( $result < 0) {
|
||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
|
||||
if ($result == 0) {
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
|
||||
}
|
||||
elseif ($result < 0) {
|
||||
if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors');
|
||||
} else {
|
||||
@ -84,11 +177,11 @@ if ($action == 'addcontact_confirm' && $user->rights->projet->creer)
|
||||
$task_to_affect = explode(',', $affecttotask);
|
||||
if (!empty($task_to_affect)) {
|
||||
foreach ($task_to_affect as $task_id) {
|
||||
if (GETPOSTISSET('person_'.$task_id, 'san_alpha') && GETPOST('person_'.$task_id, 'san_alpha')=='on') {
|
||||
if (GETPOSTISSET('person_'.$task_id, 'san_alpha') && GETPOST('person_'.$task_id, 'san_alpha')) {
|
||||
$tasksToAffect = new Task($db);
|
||||
$result=$tasksToAffect->fetch($task_id);
|
||||
if ($result < 0) {
|
||||
setEventMessage($tasksToAffect->error, 'errors');
|
||||
setEventMessages($tasksToAffect->error, null, 'errors');
|
||||
} else {
|
||||
$result = $tasksToAffect->add_contact($contactid, GETPOST('person_role_'.$task_id), GETPOST("source", 'aZ09'));
|
||||
if ($result < 0) {
|
||||
@ -140,6 +233,7 @@ if (($action == 'deleteline' || $action == 'deletecontact') && $user->rights->pr
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -150,7 +244,6 @@ $help_url = "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos";
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
$contactstatic = new Contact($db);
|
||||
$userstatic = new User($db);
|
||||
|
||||
@ -173,76 +266,7 @@ if ($id > 0 || !empty($ref))
|
||||
$head = project_prepare_head($object);
|
||||
print dol_get_fiche_head($head, 'contact', $langs->trans("Project"), -1, ($object->public ? 'projectpub' : 'project'));
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
// Test if we can add contact to task at the same times
|
||||
if ($action == 'addcontact') {
|
||||
$source=GETPOST("source", 'aZ09');
|
||||
|
||||
$taskstatic = new Task($db);
|
||||
$task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0);
|
||||
$nbTasks = count($task_array);
|
||||
|
||||
//If no task avaiblable, redirec to to add confirm
|
||||
$type_to = (GETPOST('typecontact') ? 'typecontact='.GETPOST('typecontact') : 'type='.GETPOST('type'));
|
||||
$personToAffect = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
|
||||
$affect_to = (GETPOST('userid') ? 'userid='.$personToAffect : 'contactid='.$personToAffect);
|
||||
$url_redirect='?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source;
|
||||
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS) || $nbTasks > 0) {
|
||||
$text = $langs->trans('AddPersonToTask');
|
||||
$formquestion = array('text' => $text);
|
||||
|
||||
$task_to_affect = array();
|
||||
foreach ($task_array as $task) {
|
||||
$task_already_affected=false;
|
||||
$personsLinked = $task->liste_contact(-1, $source);
|
||||
if (!is_array($personsLinked) && coun($personsLinked) < 0) {
|
||||
setEventMessage($object->error, 'errors');
|
||||
} else {
|
||||
foreach ($personsLinked as $person) {
|
||||
if ($person['id']==$personToAffect) {
|
||||
$task_already_affected = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$task_already_affected) {
|
||||
$task_to_affect[$task->id] = $task->ref . ' '.dol_trunc($task->label);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (empty($task_to_affect)) {
|
||||
//If person is already add to all task (how it can happen ????, anyway), redirect to to add confirm
|
||||
header("Location: ".$_SERVER['PHP_SELF'].$url_redirect);
|
||||
exit;
|
||||
} else {
|
||||
foreach ($task_to_affect as $key=>$val) {
|
||||
$formquestion[] = array('type' => 'checkbox', 'name' => 'person_'.$key, 'label' => $val, 'value' => true);
|
||||
$formquestion[] = array(
|
||||
'type' => 'other',
|
||||
'name' => 'person_role_'. $key,
|
||||
'label' => $langs->trans("ContactType"),
|
||||
'value' => $formcompany->selectTypeContact($taskstatic, '', 'person_role_' . $key, $source, 'position', 0, 'minwidth100imp', 0));
|
||||
}
|
||||
$formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">');
|
||||
}
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590);
|
||||
$formconfirm .='
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("input:checkbox[name^=\'person_\']").change(function(){
|
||||
let taskid=$(this).attr("name").replace("person_","");
|
||||
$("#person_role_"+taskid).parents("div.tagtr").toggle();
|
||||
});
|
||||
});
|
||||
</script>';
|
||||
} else {
|
||||
//If no task avaiblable, redirec to to add confirm
|
||||
header("Location: ".$_SERVER['PHP_SELF'].$url_redirect.'&action=addcontact_confirm');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$formconfirm = $formconfirmtoaddtasks;
|
||||
|
||||
// Call Hook formConfirm
|
||||
$parameters = array('formConfirm' => $formconfirm);
|
||||
|
||||
@ -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>';
|
||||
@ -800,7 +799,7 @@ while ($i < min($num, $limit))
|
||||
$userstatic->phone = $val['phone'];
|
||||
$userstatic->job = $val['job'];
|
||||
$userstatic->gender = $val['gender'];
|
||||
print ($nbofsalesrepresentative < 3) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
print ($nbofsalesrepresentative < 2) ? $userstatic->getNomUrl(-1, '', 0, 0, 12) : $userstatic->getNomUrl(-2);
|
||||
$j++;
|
||||
if ($j < $nbofsalesrepresentative) {
|
||||
print ' ';
|
||||
|
||||
@ -46,6 +46,16 @@ $id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$taskref = GETPOST('taskref', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
@ -83,6 +93,12 @@ if ($id > 0 || !empty($ref))
|
||||
$extrafields->fetch_name_optionals_label($taskstatic->table_element);
|
||||
$search_array_options = $extrafields->getOptionalsFromPost($taskstatic->table_element, '', 'search_');
|
||||
|
||||
|
||||
// Default sort order (if not yet defined by previous GETPOST)
|
||||
if (!$sortfield) { reset($object->fields); $sortfield="t.".key($object->fields); } // Set here default search field. By default 1st field in definition. Reset is required to avoid key() to return null.
|
||||
if (!$sortorder) $sortorder = "ASC";
|
||||
|
||||
|
||||
// Security check
|
||||
$socid = 0;
|
||||
//if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement.
|
||||
@ -772,11 +788,11 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
if (!empty($arrayfields['t.description']['checked'])) print_liste_field_titre($arrayfields['t.description']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, '');
|
||||
if (!empty($arrayfields['t.dateo']['checked'])) print_liste_field_titre($arrayfields['t.dateo']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.datee']['checked'])) print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.progress']['checked'])) print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
if (!empty($arrayfields['t.progress_summary']['checked'])) print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
if (!empty($arrayfields['t.planned_workload']['checked'])) print_liste_field_titre($arrayfields['t.planned_workload']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1);
|
||||
if (!empty($arrayfields['t.duration_effective']['checked'])) print_liste_field_titre($arrayfields['t.duration_effective']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1);
|
||||
if (!empty($arrayfields['t.progress_calculated']['checked'])) print_liste_field_titre($arrayfields['t.progress_calculated']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1);
|
||||
if (!empty($arrayfields['t.progress']['checked'])) print_liste_field_titre($arrayfields['t.progress']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ', '', 1);
|
||||
if (!empty($arrayfields['t.progress_summary']['checked'])) print_liste_field_titre($arrayfields['t.progress_summary']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center ', '', 1);
|
||||
if ($object->usage_bill_time)
|
||||
{
|
||||
if (!empty($arrayfields['t.tobill']['checked'])) print_liste_field_titre($arrayfields['t.tobill']['label'], $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user