Skip to content

Commit

Permalink
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Nov 23, 2023
2 parents cc85a1a + 3294b72 commit a257dcf
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 30 deletions.
16 changes: 9 additions & 7 deletions htdocs/conf/conf.php.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ $dolibarr_main_url_root='';
// Examples:
// $dolibarr_main_document_root='/var/www/dolibarr/htdocs';
// $dolibarr_main_document_root='C:/My web sites/dolibarr/htdocs';
// $dolibarr_main_document_root=realpath(__DIR__.'/..');
//
$dolibarr_main_document_root='';

Expand All @@ -44,7 +45,7 @@ $dolibarr_main_document_root='';
// ==========================
// This parameter defines the relative sub URLs to add to $dolibarr_main_url_root to
// forge alternative root directories (used by modules developers).
// You can put several values, separated by a coma, but number of entries must match
// You can put several values, separated by a comma, but number of entries must match
// number of entries into $dolibarr_main_document_root_alt.
//
// Examples:
Expand All @@ -57,7 +58,7 @@ $dolibarr_main_document_root='';
// dolibarr_main_document_root_alt
// ===============================
// This parameter contains absolute alternative root file system directories (used by modules developers).
// You can put several values, separated by a coma, but number of entries must match
// You can put several values, separated by a comma, but number of entries must match
// number of entries into $dolibarr_main_url_root_alt.
//
// Examples:
Expand All @@ -75,6 +76,7 @@ $dolibarr_main_document_root='';
// Examples:
// $dolibarr_main_data_root='/var/www/dolibarr/documents';
// $dolibarr_main_data_root='E:/My web sites/dolibarr/documents';
// $dolibarr_main_data_root=realpath(__DIR__.'/../../documents');
//
$dolibarr_main_data_root='';

Expand Down Expand Up @@ -175,7 +177,7 @@ $dolibarr_main_db_collation='utf8_unicode_ci';

// dolibarr_main_db_readonly
// =========================
// Set this to 1 to have the application working in readonly mode. All SQL commands INSERT/UPDATE/DELETE/CREATE/ALTER/TRUNCATE/DROP will be disabled.
// Set this to 1 to have the application working in readonly mode. All SQL commands INSERT/UPDATE/DELETE/CREATE/ALTER/TRUNCATE/DROP will be disabled.
// Default value: 0
// Examples:
// $dolibarr_main_db_readonly='0';
Expand Down Expand Up @@ -260,8 +262,8 @@ $dolibarr_main_authentication='dolibarr';
// 'https://my.domain.com' = Force redirect to https using this domain name.
// Warning: If you enable this parameter, your web server must be configured to respond URL with https protocol.
// According to your web server setup, some values may works and other not. Try different values (1,2 or 'https://my.domain.com') if you experience problems.
// Even if a redirect to HTTPS is forced by the webserver, it is recommanded to set this value to another value than 0, so your session cookies will be
// flagged as secured.
// Even if a redirect to HTTPS is forced by the webserver, it is recommended to set this value to another value than 0, so your session cookies will be
// flagged as secured.
// Default value: 0
// Possible values: 0, 1, 2 or 'https://my.domain.com'
// Examples:
Expand Down Expand Up @@ -365,7 +367,7 @@ $dolibarr_cron_allow_cli='0';
// =========================
// If this value is set to a value, it forces the creation of a file install.lock once an upgrade process into a new version end.
// The value is the octal value of permission to set on created file.
// The file install.lock prevents the use of the migration process another time. You will have to delete it manually for
// The file install.lock prevents the use of the migration process another time. You will have to delete it manually for
// next upgrade.
// Default value: '0'
// Example: '444';
Expand All @@ -379,7 +381,7 @@ $dolibarr_cron_allow_cli='0';

// dolibarr_main_db_prefix
// =======================
// This parameter contains prefix of Dolibarr database.
// This parameter contains prefix of Dolibarr database.
// Default value: 'llx_' if not defined
// Examples:
// $dolibarr_main_db_prefix='llx_';
Expand Down
42 changes: 21 additions & 21 deletions htdocs/core/lib/pdf.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ function pdf_writelinedesc(&$pdf, $object, $i, $outputlangs, $w, $h, $posx, $pos
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = empty($object->lines[$i]->special_code) ? '' : $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('pdf'=>$pdf, 'i'=>$i, 'outputlangs'=>$outputlangs, 'w'=>$w, 'h'=>$h, 'posx'=>$posx, 'posy'=>$posy, 'hideref'=>$hideref, 'hidedesc'=>$hidedesc, 'issupplierline'=>$issupplierline, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1748,7 +1748,7 @@ function pdf_getlinenum($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1781,7 +1781,7 @@ function pdf_getlineref($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1813,7 +1813,7 @@ function pdf_getlineref_supplier($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1844,8 +1844,8 @@ function pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails = 0)
$reshook = 0;
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduce this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
$special_code = empty($object->lines[$i]) ? '' : $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1911,8 +1911,8 @@ function pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails = 0)
$reshook = 0;
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
$special_code = empty($object->lines[$i]) ? '' : $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1955,7 +1955,7 @@ function pdf_getlineupwithtax($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -1991,8 +1991,8 @@ function pdf_getlineqty($object, $i, $outputlangs, $hidedetails = 0)
$reshook = 0;
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
$special_code = empty($object->lines[$i]) ? '' : $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -2032,7 +2032,7 @@ function pdf_getlineqty_asked($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -2072,7 +2072,7 @@ function pdf_getlineqty_shipped($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -2112,7 +2112,7 @@ function pdf_getlineqty_keeptoship($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -2153,7 +2153,7 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array(
Expand Down Expand Up @@ -2198,7 +2198,7 @@ function pdf_getlineremisepercent($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down Expand Up @@ -2242,7 +2242,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i' => $i, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails, 'special_code' => $special_code);
Expand Down Expand Up @@ -2294,8 +2294,8 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
$result = '';
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
$special_code = empty($object->lines[$i]) ? '' : $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code, 'sign'=>$sign);
Expand All @@ -2307,7 +2307,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0)
}
}
if (empty($reshook)) {
if ($object->lines[$i]->special_code == 3) {
if (!empty($object->lines[$i]) && $object->lines[$i]->special_code == 3) {
$result .= $outputlangs->transnoentities("Option");
} elseif (empty($hidedetails) || $hidedetails > 1) {
$total_ht = (isModEnabled("multicurrency") && $object->multicurrency_tx != 1 ? $object->lines[$i]->multicurrency_total_ht : $object->lines[$i]->total_ht);
Expand Down Expand Up @@ -2351,7 +2351,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0)
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line) ) )
if (is_object($hookmanager)) { // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
$special_code = $object->lines[$i]->special_code;
if (!empty($object->lines[$i]->fk_parent_line)) {
if (!empty($object->lines[$i]->fk_parent_line) && $object->lines[$i]->fk_parent_line > 0) {
$special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
}
$parameters = array('i'=>$i, 'outputlangs'=>$outputlangs, 'hidedetails'=>$hidedetails, 'special_code'=>$special_code);
Expand Down
1 change: 1 addition & 0 deletions htdocs/fichinter/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Copyright (C) 2018-2022 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2023 Benjamin Grembi <benjamin@oarces.fr>
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.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
Expand Down
4 changes: 2 additions & 2 deletions htdocs/fourn/class/fournisseur.commande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2960,15 +2960,15 @@ public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $t
$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
$this->line->remise_percent = $remise_percent;
$this->line->subprice = $pu_ht;
$this->line->rang = $this->rang;
$this->line->info_bits = $info_bits;
$this->line->total_ht = $total_ht;
$this->line->total_tva = $total_tva;
$this->line->total_localtax1 = $total_localtax1;
$this->line->total_localtax2 = $total_localtax2;
$this->line->total_ttc = $total_ttc;
$this->line->product_type = $type;
$this->line->special_code = (!empty($this->special_code) ? $this->special_code : 0);
$this->line->special_code = $oldline->special_code;
$this->line->rang = $oldline->rang;
$this->line->origin = $this->origin;
$this->line->fk_unit = $fk_unit;

Expand Down
Loading

0 comments on commit a257dcf

Please sign in to comment.