Compare commits

...

21 Commits

Author SHA1 Message Date
Eric - CAP-REL
db3d8a0a1a Merge pull request #35863 from RyAbn/18.0_FIX_CMailFile_syslog_message
FIX: php8.1 warning in syslog message
2026-01-08 09:56:27 +01:00
Eric - CAP-REL
d5cab67f4c Fix log message for empty cid_list
apply same fix as 20.0 to avoid conflicts on next merges
2026-01-08 09:55:28 +01:00
Eric - CAP-REL
85a0383b46 Merge branch '18.0' into 18.0_FIX_CMailFile_syslog_message 2026-01-08 09:52:47 +01:00
Eric - CAP-REL
c981b7ccb6 Merge pull request #36343 from noec764/18_FIX_socid_undefined
FIX: TakePos sometimes thirdpartyid = undefined
2026-01-08 09:47:52 +01:00
lvessiller-opendsi
590bf2dd0e Merge pull request #36616 from rycks/18_fix_ticket_double_slash_on_url
remove slash like other parts of dolibarr code for TICKET_URL_PUBLIC_…
2026-01-08 09:41:28 +01:00
lvessiller-opendsi
c25dda01b4 Merge pull request #36815 from lemathou/mmi-fix-reception-delete-stock-mvt
FIX : remove stock correctly when reception is deleted (like 82e092f)
2026-01-08 09:30:04 +01:00
Laurent Destailleur
f450dd00a8 Merge branch '18.0' into mmi-fix-reception-delete-stock-mvt 2026-01-07 18:41:06 +01:00
Laurent Destailleur
05c11e71e2 Fix CI 2026-01-07 18:33:22 +01:00
Mathieu Moulin
ad3304832d FIX : remove stock correctly when reception is deleted (like 82e092f) 2026-01-06 15:32:59 +01:00
Eric - CAP-REL
2e22f9e75a fix concat for a undef entry of array (#36754) 2025-12-27 23:04:40 +01:00
Eric Seigne
c017ea0341 Merge branch '18_fix_ticket_double_slash_on_url' of github.com:rycks/dolibarr into 18_fix_ticket_double_slash_on_url 2025-12-18 09:36:48 +01:00
Eric Seigne
eb4d9dec53 thanks to lionel : remove view.php in default value like other part of dolibarr 2025-12-18 09:36:45 +01:00
Laurent Destailleur
2ca80ffa67 Merge branch '18.0' into 18_fix_ticket_double_slash_on_url 2025-12-17 13:27:57 +01:00
Eric Seigne
8d84cec3ca remove slash like other parts of dolibarr code for TICKET_URL_PUBLIC_INTERFACE 2025-12-11 10:43:24 +01:00
Noé
2ee07bb049 FIX: Remove <?= 2025-12-04 17:27:57 +01:00
Noé
3416c6ccc0 FIX: getDolGlobalInt 2025-11-27 10:00:43 +01:00
Noé
92197cb100 FIX: php echo instead of <? 2025-11-21 16:06:09 +01:00
Noé
9319059349 FIX: Sometimes socid = undefined 2025-11-20 14:01:29 +01:00
Laurent Destailleur
1eed0e18a9 Update CMailFile.class.php 2025-10-21 02:11:56 +02:00
Laurent Destailleur
2153dbb0f1 Update CMailFile.class.php 2025-10-21 02:09:51 +02:00
Ryad ABANI
52446678d0 FIX: php8.1 warning in syslog message 2025-10-20 16:23:22 +02:00
8 changed files with 37 additions and 10 deletions

View File

@@ -82,7 +82,7 @@ repos:
pass_filenames: false # Run on all files
- id: php-lint
exclude:
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
(?x)^(htdocs/includes/symfony/var-dumper/Tests/.*)$
- id: php-stan
stages: [manual]
files: \.(php)$

View File

@@ -128,7 +128,7 @@ tools:
enabled: true
# Disabled unused code. In most cases, we want to keep it.
unused_code:
enabled: false
enabled: false
deprecation_checks:
enabled: true
useless_function_calls:

View File

@@ -319,7 +319,7 @@ class CMailFile
foreach ($filename_list as $i => $val) {
if ($filename_list[$i]) {
$this->atleastonefile = 1;
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".$cid_list[$i], LOG_DEBUG);
dol_syslog("CMailFile::CMailfile: filename_list[$i]=".$filename_list[$i].", mimetype_list[$i]=".$mimetype_list[$i]." mimefilename_list[$i]=".$mimefilename_list[$i]." cid_list[$i]=".(empty($cid_list[$i]) ? '' : $cid_list[$i]), LOG_DEBUG);
}
}
}

View File

@@ -725,7 +725,7 @@ class TimeSpent extends CommonObject
if (isset($this->status)) {
$datas['picto'] .= ' '.$this->getLibStatut(5);
}
$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
return $datas;
}

View File

@@ -774,7 +774,7 @@ class MyObject extends CommonObject
if (isset($this->status)) {
$datas['picto'] .= ' '.$this->getLibStatut(5);
}
$datas['ref'] .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
$datas['ref'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
return $datas;
}

View File

@@ -12,6 +12,7 @@
* Copyright (C) 2016-2022 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
* Copyright (C) 2022-2023 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2026 Mathieu Moulin <mathieu@iprospective.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
@@ -1033,7 +1034,10 @@ class Reception extends CommonObject
$this->db->begin();
// Stock control
if (isModEnabled('stock') && $conf->global->STOCK_CALCULATE_ON_RECEPTION && $this->statut > 0) {
if (isModEnabled('stock') &&
((getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION') && $this->statut > self::STATUS_DRAFT) ||
(getDolGlobalInt('STOCK_CALCULATE_ON_RECEPTION_CLOSE') && $this->statut == self::STATUS_CLOSED))
) {
require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php";
$langs->load("agenda");

View File

@@ -93,6 +93,8 @@ if ($conf->browser->layout == 'phone') {
$MAXCATEG = (empty($conf->global->TAKEPOS_NB_MAXCATEG) ? $maxcategbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXCATEG);
$MAXPRODUCT = (empty($conf->global->TAKEPOS_NB_MAXPRODUCT) ? $maxproductbydefaultforthisdevice : $conf->global->TAKEPOS_NB_MAXPRODUCT);
$term = empty($_SESSION['takeposterminal']) ? 1 : $_SESSION['takeposterminal'];
$socid = getDolGlobalInt('CASHDESK_ID_THIRDPARTY' . $term);
/*
$constforcompanyid = 'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"];
$soc = new Societe($db);
@@ -329,8 +331,15 @@ function LoadProducts(position, issubcat) {
if (maxproduct >= 1) {
limit = maxproduct-1;
}
// Get socid
let socid = jQuery('#thirdpartyid').val();
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
}
// Only show products for sale (tosell=1)
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + socid + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset=0', function(data) {
console.log("Call ajax.php (in LoadProducts) to get Products of category "+currentcat+" then loop on result to fill image thumbs");
console.log(data);
while (ishow < maxproduct) {
@@ -437,8 +446,15 @@ function MoreProducts(moreorless) {
limit = maxproduct-1;
}
var offset = <?php echo ($MAXPRODUCT - 2); ?> * pageproducts;
// Get socid
let socid = jQuery('#thirdpartyid').val();
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
}
// Only show products for sale (tosell=1)
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=getProducts&token=<?php echo newToken();?>&thirdpartyid=' + socid + '&category='+currentcat+'&tosell=1&limit='+limit+'&offset='+offset, function(data) {
console.log("Call ajax.php (in MoreProducts) to get Products of category "+currentcat);
if (typeof (data[0]) == "undefined" && moreorless=="more"){ // Return if no more pages
@@ -662,7 +678,14 @@ function Search2(keyCodeForEnter, moreorless) {
pageproducts = 0;
jQuery(".wrapper2 .catwatermark").hide();
var nbsearchresults = 0;
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + jQuery('#thirdpartyid').val() + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
// Only show products for sale (tosell=1)
let socid = jQuery('#thirdpartyid').val();
if ((socid === undefined || socid === "") && parseInt("<?php echo dol_escape_js($socid) ?>") > 0) {
socid = parseInt("<?php echo dol_escape_js($socid); ?>");
}
$.getJSON('<?php echo DOL_URL_ROOT ?>/takepos/ajax/ajax.php?action=search&token=<?php echo newToken();?>&term=' + search_term + '&thirdpartyid=' + socid + '&search_start=' + search_start + '&search_limit=' + search_limit, function (data) {
for (i = 0; i < <?php echo $MAXPRODUCT ?>; i++) {
if (typeof (data[i]) == "undefined") {
$("#prowatermark" + i).html("");

View File

@@ -2767,7 +2767,7 @@ class Ticket extends CommonObject
}
// If public interface is not enable, use link to internal page into mail
$url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/view.php', 2)) . '/view.php?track_id='.$object->track_id;
$url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 2)) . 'view.php?track_id='.$object->track_id;
$message .= '<br>'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : <a href="'.$url_public_ticket.'">'.$object->track_id.'</a><br>';
// Build final message