Add log to help track bug
This commit is contained in:
parent
4bde7e9f51
commit
d6438a51ab
@ -447,12 +447,18 @@ class ProductFournisseur extends Product
|
|||||||
*
|
*
|
||||||
* @param int $prodid Product id
|
* @param int $prodid Product id
|
||||||
* @param int $qty Minimum quantity
|
* @param int $qty Minimum quantity
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, 0=Not found of no product id provided, >0 if OK
|
||||||
*/
|
*/
|
||||||
function find_min_price_product_fournisseur($prodid, $qty=0)
|
function find_min_price_product_fournisseur($prodid, $qty=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
if (empty($prodid))
|
||||||
|
{
|
||||||
|
dol_syslog("Warning function find_min_price_product_fournisseur were called with prodid empty. May be a bug.", LOG_WARNING);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
$this->product_fourn_price_id = '';
|
$this->product_fourn_price_id = '';
|
||||||
$this->product_fourn_id = '';
|
$this->product_fourn_id = '';
|
||||||
$this->fourn_ref = '';
|
$this->fourn_ref = '';
|
||||||
@ -500,7 +506,7 @@ class ProductFournisseur extends Product
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->error();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user