Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2025-08-01 00:15:23 +02:00

View File

@@ -4381,7 +4381,25 @@ if ($action == 'create') {
$thirdparty = $soc; // used by object_discounts.tpl.php
$discount_type = 0; // used by object_discounts.tpl.php
$backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid')));
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
// loading object_discounts.tpl.php from module core/tpl if exists
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
foreach ($dirtpls as $module => $reldir) {
$res = 0;
if (!empty($module)) {
$tpl = dol_buildpath($reldir.'/object_discounts.tpl.php');
} else {
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/object_discounts.tpl.php';
}
if (file_exists($tpl)) {
if (empty($conf->file->strict_mode)) {
$res = @include $tpl;
} else {
$res = include $tpl;
}
}
if ($res) { break; }
}
print '</td></tr>';
}
@@ -5315,7 +5333,25 @@ if ($action == 'create') {
$thirdparty = $soc;
$discount_type = 0;
$backtopage = $_SERVER["PHP_SELF"].'?facid='.$object->id;
include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php';
// loading object_discounts.tpl.php from module core/tpl if exists
$dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir));
foreach ($dirtpls as $module => $reldir) {
$res = 0;
if (!empty($module)) {
$tpl = dol_buildpath($reldir.'/object_discounts.tpl.php');
} else {
$tpl = DOL_DOCUMENT_ROOT.$reldir.'/object_discounts.tpl.php';
}
if (file_exists($tpl)) {
if (empty($conf->file->strict_mode)) {
$res = @include $tpl;
} else {
$res = include $tpl;
}
}
if ($res) { break; }
}
print '</td></tr>';
// Date invoice