mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user