FIX sql error with the new sql forge filter

This commit is contained in:
Regis Houssin 2025-01-25 07:50:24 +01:00
parent c2ebd83779
commit 6ae1c60097
14 changed files with 14 additions and 10 deletions

View File

@ -102,6 +102,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_head($head, 'margin', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref');

View File

@ -161,7 +161,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
print dol_get_fiche_head($head, 'agenda', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
print dol_get_fiche_head($head, 'card', $titre, -1, 'product');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -33,7 +33,7 @@ $titre = $langs->trans("CardProduct".$object->type);
print dol_get_fiche_head($head, 'card', $titre, -1, 'service');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = " fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -2450,7 +2450,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
print dol_get_fiche_head($head, 'card', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type:=:".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -240,7 +240,7 @@ if ($object->id) {
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -160,7 +160,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
print dol_get_fiche_head($head, 'agenda', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -123,7 +123,7 @@ if ($id > 0 || !empty($ref)) {
print dol_get_fiche_head($head, 'note', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -898,7 +898,7 @@ $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product');
print dol_get_fiche_head($head, 'price', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -393,7 +393,7 @@ if ($id > 0 || $ref) {
print dol_get_fiche_head($head, 'suppliers', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$prod->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")"; // use $prod instead $object
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -150,6 +150,7 @@ if ($result && ($id > 0 || !empty($ref)) && empty($notab)) {
print dol_get_fiche_head($head, 'stats', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', '', '', '', 0, '', '', 1);

View File

@ -169,6 +169,7 @@ if ($id > 0 || !empty($ref)) {
}
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('product', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -613,6 +613,7 @@ if ($id > 0 || $ref) {
dol_htmloutput_events();
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?restore_lastsearch_values=1&type='.$object->type.'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
$shownav = 1;
if ($user->socid && !in_array('stock', explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')))) {

View File

@ -417,7 +417,7 @@ if (!empty($id) || !empty($ref)) {
print dol_get_fiche_head($head, 'combinations', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php?type='.((int) $object->type).'">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter = "fk_product_type = ".((int) $object->type);
$object->next_prev_filter = "(te.fk_product_type:=:".((int) $object->type).")";
dol_banner_tab($object, 'ref', $linkback, ($user->socid ? 0 : 1), 'ref', '', '', '', 0, '', '');