Fix: Can find product with ajax on product ref even in supplier objects
This commit is contained in:
parent
f338666b7f
commit
247daaabc5
@ -941,7 +941,7 @@ class Form
|
|||||||
if ($socid) $sql.= " AND pf.fk_soc = ".$socid;
|
if ($socid) $sql.= " AND pf.fk_soc = ".$socid;
|
||||||
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
|
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
|
||||||
if (! empty($filtre)) $sql.=" ".$filtre;
|
if (! empty($filtre)) $sql.=" ".$filtre;
|
||||||
if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (pf.ref_fourn like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')";
|
if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (pf.ref_fourn like '%".$ajaxkeysearch."%' OR p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')";
|
||||||
$sql.= " ORDER BY pf.ref_fourn DESC";
|
$sql.= " ORDER BY pf.ref_fourn DESC";
|
||||||
|
|
||||||
dolibarr_syslog("Form::select_produits_fournisseurs_do sql=".$sql,LOG_DEBUG);
|
dolibarr_syslog("Form::select_produits_fournisseurs_do sql=".$sql,LOG_DEBUG);
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \file htdocs/html.formproduct.class.php
|
* \file htdocs/html.formproduct.class.php
|
||||||
* \brief Fichier de la classe des fonctions prédéfinie de composants html
|
* \brief Fichier de la classe des fonctions pr<EFBFBD>d<EFBFBD>finie de composants html
|
||||||
* \version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class FormProduct
|
* \class FormProduct
|
||||||
* \brief Classe permettant la génération de composants html
|
* \brief Class with static methods for buildinf HTML components related to products
|
||||||
* \remarks Only common components must be here.
|
* \remarks Only common components must be here.
|
||||||
*/
|
*/
|
||||||
class FormProduct
|
class FormProduct
|
||||||
@ -41,8 +41,8 @@ class FormProduct
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Constructeur
|
* \brief Constructeur
|
||||||
\param DB handler d'accès base de donnée
|
* \param DB Database handler
|
||||||
*/
|
*/
|
||||||
function FormProduct($DB)
|
function FormProduct($DB)
|
||||||
{
|
{
|
||||||
@ -91,7 +91,7 @@ class FormProduct
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne la liste des modes de paiements possibles
|
* \brief Retourne la liste des modes de paiements possibles
|
||||||
* \param selected Id du mode de paiement pré-sélectionné
|
* \param selected Id du mode de paiement pr<EFBFBD>-s<EFBFBD>lectionn<EFBFBD>
|
||||||
* \param htmlname Nom de la zone select
|
* \param htmlname Nom de la zone select
|
||||||
* \param filtertype Pour filtre
|
* \param filtertype Pour filtre
|
||||||
* \param empty 1=peut etre vide, 0 sinon
|
* \param empty 1=peut etre vide, 0 sinon
|
||||||
@ -123,7 +123,7 @@ class FormProduct
|
|||||||
* \brief Selection des unites de mesure
|
* \brief Selection des unites de mesure
|
||||||
* \param name Nom champ html
|
* \param name Nom champ html
|
||||||
* \param measuring_style Le style de mesure : weight, volume,...
|
* \param measuring_style Le style de mesure : weight, volume,...
|
||||||
* \param default Forçage de l'unite
|
* \param default For<EFBFBD>age de l'unite
|
||||||
* \remarks pour l'instant on ne definit pas les unites dans la base
|
* \remarks pour l'instant on ne definit pas les unites dans la base
|
||||||
*/
|
*/
|
||||||
function select_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0)
|
function select_measuring_units($name='measuring_units', $measuring_style='', $default='0', $adddefault=0)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
/* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2007-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -19,10 +19,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/ajaxproducts.php
|
* \file htdocs/product/ajaxproducts.php
|
||||||
\brief Fichier de reponse sur evenement Ajax
|
* \brief Fichier de reponse sur evenement Ajax
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
require('../main.inc.php');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user