Compare commits

...

16 Commits

Author SHA1 Message Date
Laurent Destailleur
e1b5e024f5 Merge 2025-12-15 15:56:34 +01:00
Laurent Destailleur
a0be2c8890 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2025-12-15 15:54:00 +01:00
Laurent Destailleur
77d7ec8a2b Merge branch '16.0' of git@github.com:/Dolibarr/dolibarr.git into 17.0 2025-12-15 15:53:38 +01:00
Laurent Destailleur
cc37c778dc Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2025-12-15 15:53:00 +01:00
Laurent Destailleur
722c31d182 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0 2025-12-15 15:52:34 +01:00
Laurent Destailleur
ba2c173936 Merge pull request #36203 from Easya-Solutions/14.0_fix-purge-files-api-temp
FIX re-create API temp dir after purging temp files
2025-12-15 15:51:52 +01:00
lvessiller-opendsi
3c2e85bdb1 Merge pull request #36541 from rycks/18_fix_deposit_backport_43f551e270a00165dcb7274c0904b66b9eaf30b8
backport of PR36378 : Problem with deposit line on Type of operation
2025-12-11 10:18:58 +01:00
Eric Seigne
18f85df343 remove spaces from prev fix 2025-12-11 10:11:58 +01:00
Eric - CAP-REL
9afa5c713d Merge pull request #36585 from Easya-Solutions/18.0_fix-invoice-card-variables2
FIX undefined variables on create invoice card from order (backport f…
2025-12-11 09:30:15 +01:00
VESSILLER
157aa32e0a FIX undefined variables on create invoice card from order (backport from v19) 2025-12-09 10:12:10 +01:00
Laurent Destailleur
5822887d32 Merge pull request #36555 from noec764/17_FIX_missing_product_ref
FIX: Missing Product ref in Bom stats
2025-12-07 23:50:13 +01:00
Noé
aa6ef5ae11 FIX: Missing Product ref in Bom stats 2025-12-05 17:22:18 +01:00
Eric Seigne
c6ed34ebcc backport of PR36378 : Problem with deposit line on Type of operation 2025-12-05 09:32:03 +01:00
lvessiller-opendsi
0beee0bec5 Merge branch '14.0' into 14.0_fix-purge-files-api-temp 2025-12-01 11:53:59 +01:00
VESSILLER
c2ae7d2da1 FIX create API temp directory in Dolibarr API constructor 2025-11-13 14:01:34 +01:00
VESSILLER
71ec381d3e FIX re-create API temp dir after purging temp files 2025-11-10 10:56:07 +01:00
4 changed files with 41 additions and 2 deletions

View File

@@ -57,7 +57,20 @@ class DolibarrApi
Defaults::$cacheDirectory = $cachedir;
$this->db = $db;
$production_mode = (!getDolGlobalString('API_PRODUCTION_MODE') ? false : true);
$production_mode = (getDolGlobalString('API_PRODUCTION_MODE') ? true : false);
if ($production_mode) {
// Create the directory Defaults::$cacheDirectory if it does not exist. If dir does not exist, using production_mode generates an error 500.
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
if (!dol_is_dir(Defaults::$cacheDirectory)) {
dol_mkdir(Defaults::$cacheDirectory, DOL_DATA_ROOT);
}
if (getDolGlobalString('MAIN_API_DEBUG')) {
dol_syslog("Debug API construct::cacheDirectory=".Defaults::$cacheDirectory, LOG_DEBUG, 0, '_api');
}
}
$this->r = new Restler($production_mode, $refreshCache);
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));

View File

@@ -379,6 +379,19 @@ class pdf_crabe extends ModelePDFFactures
$this->atleastonediscount++;
}
// determine category of operation
$is_deposit = false;
if (preg_match('/^\((.*)\)$/', $object->lines[$i]->desc, $reg)) {
if ($reg[1] == 'DEPOSIT') {
$is_deposit = true;
}
}
// If DEPOSIT, this line is completely ignored for calculations.
if ($is_deposit) {
continue;
}
// determine category of operation
if ($categoryOfOperation < 2) {
$lineProductType = $object->lines[$i]->product_type;

View File

@@ -404,6 +404,19 @@ class pdf_sponge extends ModelePDFFactures
$this->atleastonediscount++;
}
// Do not take into account lines of the type “deposit.”
$is_deposit = false;
if (preg_match('/^\((.*)\)$/', $object->lines[$i]->desc, $reg)) {
if ($reg[1] == 'DEPOSIT') {
$is_deposit = true;
}
}
// If DEPOSIT, this line is completely ignored for calculations.
if ($is_deposit) {
continue;
}
// determine category of operation
if ($categoryOfOperation < 2) {
$lineProductType = $object->lines[$i]->product_type;

View File

@@ -230,7 +230,7 @@ if ($id > 0 || !empty($ref)) {
$bomtmp->ref = $objp->ref;
$product = new Product($db);
if (!empty($objp->fk_product)) {
if (!array_key_exists($product->id, $product_cache)) {
if (!array_key_exists($objp->fk_product, $product_cache)) {
$resultFetch = $product->fetch($objp->fk_product);
if ($resultFetch < 0) {
setEventMessages($product->error, $product->errors, 'errors');