Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
This commit is contained in:
commit
6ecacb9c29
@ -2150,7 +2150,7 @@ class ExtraFields
|
|||||||
|
|
||||||
if (in_array($key_type, array('date', 'datetime')))
|
if (in_array($key_type, array('date', 'datetime')))
|
||||||
{
|
{
|
||||||
if (! GETPOSTISSET($keysuffix."options_".$key.$keyprefix)."year") continue; // Value was not provided, we should not set it.
|
if (! GETPOSTISSET($keysuffix."options_".$key.$keyprefix."year")) continue; // Value was not provided, we should not set it.
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'));
|
$value_key = dol_mktime(GETPOST($keysuffix."options_".$key.$keyprefix."hour", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."min", 'int'), 0, GETPOST($keysuffix."options_".$key.$keyprefix."month", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."day", 'int'), GETPOST($keysuffix."options_".$key.$keyprefix."year", 'int'));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -796,11 +796,11 @@ class Products extends DolibarrApi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$this->productsupplier->fetch($id, $ref);
|
$product_fourn = new ProductFournisseur($this->db);
|
||||||
$this->productsupplier->list_product_fournisseur_price($id, '', '', 0, 0);
|
$product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->_cleanObjectDatas($this->productsupplier);
|
return $this->_cleanObjectDatas($product_fourn_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -702,7 +702,10 @@ while ($i < ($limit ? min($num, $limit) : $num))
|
|||||||
|
|
||||||
//depending on conf, use either physical stock or
|
//depending on conf, use either physical stock or
|
||||||
//virtual stock to compute the stock to buy value
|
//virtual stock to compute the stock to buy value
|
||||||
$stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0);
|
|
||||||
|
if(empty($usevirtualstock)) $stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0);
|
||||||
|
else $stocktobuy = max(max($desiredstock, $alertstock) - $stock, 0); //ordered is already in $stock in virtual mode
|
||||||
|
|
||||||
$disabled = '';
|
$disabled = '';
|
||||||
if ($ordered > 0)
|
if ($ordered > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user