Compare commits

...

24 Commits

Author SHA1 Message Date
Benjamin Falière
7b6051a0d0 FIX(ticket): check on TICKET_IMAGE_PUBLIC_INTERFACE (#36833)
* FIX(ticket): check on TICKET_IMAGE_PUBLIC_INTERFACE

Must use getDolGlobalString instead of getDolGlobalInt here

* Add contributor

---------

Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
2026-01-10 17:46:45 +01:00
Laurent Destailleur
6fabf82f1d Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2026-01-10 17:45:28 +01:00
Laurent Destailleur
b3669d4333 Try to fix script 2026-01-10 17:45:20 +01:00
Mathieu Moulin
a5b106fe70 Fix error removing reception with product batches (eatby/sellby) (#36846) 2026-01-10 17:30:45 +01:00
lvessiller-opendsi
f497a6a4fe FIX warning accountancy export from external module (#36832) 2026-01-08 18:54:15 +01:00
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
Mathieu Moulin
ad3304832d FIX : remove stock correctly when reception is deleted (like 82e092f) 2026-01-06 15:32:59 +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
7 changed files with 41 additions and 10 deletions

View File

@@ -42,9 +42,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
url: ${{ github.event.pull_request.html_url }}
url2: ${{ github.event.pull_request_target.html_url }}
run: |
echo "env.url=${{env.url}}"
gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team"
echo "env.url2=${{env.url2}}"
gh pr edit "${{env.url}}" --add-label "Issue for v18 maintenance Team"
- name: Set reviewers except PR author
id: set-reviewers
@@ -58,6 +60,7 @@ jobs:
FINAL_REVIEWERS+=("$reviewer")
fi
done
echo "AUTHOR=$AUTHOR"
echo "reviewers=$(IFS=, ; echo "${FINAL_REVIEWERS[*]}")" >> $GITHUB_OUTPUT
- name: Assign reviewers

View File

@@ -181,7 +181,7 @@ class AccountancyExport
);
global $hookmanager;
$code = $formatcode[$type];
$code = $formatcode[$type] ?? '';
$parameters = array('type' => $type);
$reshook = $hookmanager->executeHooks('getFormatCode', $parameters, $code);

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

@@ -2,6 +2,7 @@
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
* Copyright (C) 2016 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2025 Benjamin Falière <benjamin@faliere.com>
*
* 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
@@ -261,7 +262,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $
print '</div>';
}
if (getDolGlobalInt('TICKET_IMAGE_PUBLIC_INTERFACE')) {
if (getDolGlobalString('TICKET_IMAGE_PUBLIC_INTERFACE')) {
print '<div class="backimagepublicticket">';
print '<img id="idTICKET_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('TICKET_IMAGE_PUBLIC_INTERFACE').'">';
print '</div>';

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");
@@ -1057,7 +1061,7 @@ class Reception extends CommonObject
// we do not log origin because it will be deleted
$mouvS->origin = null;
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ReceptionDeletedInDolibarr", $this->ref), '', $obj->eatby, $obj->sellby, $obj->batch); // Price is set to 0, because we don't want to see WAP changed
$result = $mouvS->livraison($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ReceptionDeletedInDolibarr", $this->ref), '', $obj->eatby ? $this->db->jdate($obj->eatby) : null, $obj->sellby ? $this->db->jdate($obj->sellby) : null, $obj->batch); // Price is set to 0, because we don't want to see WAP changed
if ($result < 0) {
$error++;
$this->error = $mouvS->error;

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