Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/compta/accounting-files.php
This commit is contained in:
commit
5960d5971c
@ -19,11 +19,11 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/accounting-files.php
|
||||
* \ingroup compta
|
||||
* \brief Page to show portoflio and files of a thirdparty and download it
|
||||
*/
|
||||
/**
|
||||
* \file htdocs/compta/accounting-files.php
|
||||
* \ingroup compta
|
||||
* \brief Page to show portoflio and files of a thirdparty and download it
|
||||
*/
|
||||
|
||||
if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file
|
||||
if (!defined('NOTOKENRENEWAL')) {
|
||||
|
||||
@ -1275,9 +1275,9 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) {
|
||||
$model = $objecttmp->model_pdf;
|
||||
$ret = $objecttmp->fetch($objecttmp->id); // Reload to get new records
|
||||
// To be sure vars is defined
|
||||
$hidedetails = !empty($hidedetails) ? $hidedetails : 0;
|
||||
$hidedesc = !empty($hidedesc) ? $hidedesc : 0;
|
||||
$hideref = !empty($hideref) ? $hideref : 0;
|
||||
$hidedetails = !empty($hidedetails) ? $hidedetails : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||
$hidedesc = !empty($hidedesc) ? $hidedesc : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||
$hideref = !empty($hideref) ? $hideref : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||
$moreparams = !empty($moreparams) ? $moreparams : null;
|
||||
|
||||
$result = $objecttmp->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
@ -1426,13 +1426,13 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) {
|
||||
|
||||
// To be sure vars is defined
|
||||
if (empty($hidedetails)) {
|
||||
$hidedetails = 0;
|
||||
$hidedetails = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0);
|
||||
}
|
||||
if (empty($hidedesc)) {
|
||||
$hidedesc = 0;
|
||||
$hidedesc = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0);
|
||||
}
|
||||
if (empty($hideref)) {
|
||||
$hideref = 0;
|
||||
$hideref = (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0);
|
||||
}
|
||||
if (empty($moreparams)) {
|
||||
$moreparams = null;
|
||||
|
||||
@ -343,35 +343,35 @@ class modCommande extends DolibarrModules
|
||||
}
|
||||
// End add extra fields
|
||||
|
||||
$this->import_fieldshidden_array[$r] = ['extra.fk_object' => 'lastrowid-'.MAIN_DB_PREFIX.'commande'];
|
||||
$this->import_regex_array[$r] = [
|
||||
$this->import_fieldshidden_array[$r] = array('extra.fk_object' => 'lastrowid-'.MAIN_DB_PREFIX.'commande');
|
||||
$this->import_regex_array[$r] = array(
|
||||
'c.multicurrency_code' => 'code@'.MAIN_DB_PREFIX.'multicurrency'
|
||||
];
|
||||
);
|
||||
|
||||
$this->import_updatekeys_array[$r] = ['c.ref' => 'Ref'];
|
||||
$this->import_convertvalue_array[$r] = [
|
||||
'c.fk_soc' => [
|
||||
$this->import_updatekeys_array[$r] = array('c.ref' => 'Ref');
|
||||
$this->import_convertvalue_array[$r] = array(
|
||||
'c.fk_soc' => array(
|
||||
'rule' => 'fetchidfromref',
|
||||
'file' => '/societe/class/societe.class.php',
|
||||
'class' => 'Societe',
|
||||
'method' => 'fetch',
|
||||
'element' => 'ThirdParty'
|
||||
],
|
||||
'c.fk_user_valid' => [
|
||||
),
|
||||
'c.fk_user_valid' => array(
|
||||
'rule' => 'fetchidfromref',
|
||||
'file' => '/user/class/user.class.php',
|
||||
'class' => 'User',
|
||||
'method' => 'fetch',
|
||||
'element' => 'user'
|
||||
],
|
||||
'c.fk_mode_reglement' => [
|
||||
),
|
||||
'c.fk_mode_reglement' => array(
|
||||
'rule' => 'fetchidfromcodeorlabel',
|
||||
'file' => '/compta/paiement/class/cpaiement.class.php',
|
||||
'class' => 'Cpaiement',
|
||||
'method' => 'fetch',
|
||||
'element' => 'cpayment'
|
||||
],
|
||||
];
|
||||
),
|
||||
);
|
||||
|
||||
//Import CPV Lines
|
||||
$r++;
|
||||
|
||||
@ -1336,6 +1336,15 @@ if (empty($reshook)) {
|
||||
|
||||
$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref);
|
||||
}
|
||||
|
||||
unset($qty);
|
||||
unset($value_unit_ht);
|
||||
unset($value_unit);
|
||||
unset($vatrate);
|
||||
unset($comments);
|
||||
unset($fk_c_type_fees);
|
||||
unset($fk_project);
|
||||
unset($date);
|
||||
}
|
||||
|
||||
//header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user