Depreciate a class not really used
This commit is contained in:
parent
3aaf9dae11
commit
170ad1a265
@ -132,7 +132,7 @@ class Product extends CommonObject
|
|||||||
public $tva_tx;
|
public $tva_tx;
|
||||||
|
|
||||||
//! French VAT NPR (0 or 1)
|
//! French VAT NPR (0 or 1)
|
||||||
public $tva_npr=0;
|
public $tva_npr=0;
|
||||||
|
|
||||||
//! Other local taxes
|
//! Other local taxes
|
||||||
public $localtax1_tx;
|
public $localtax1_tx;
|
||||||
@ -248,7 +248,7 @@ class Product extends CommonObject
|
|||||||
public $stats_commande=array();
|
public $stats_commande=array();
|
||||||
public $stats_contrat=array();
|
public $stats_contrat=array();
|
||||||
public $stats_facture=array();
|
public $stats_facture=array();
|
||||||
public $stats_commande_fournisseur=array();
|
public $stats_commande_fournisseur=array();
|
||||||
|
|
||||||
public $multilangs=array();
|
public $multilangs=array();
|
||||||
|
|
||||||
@ -272,7 +272,7 @@ class Product extends CommonObject
|
|||||||
|
|
||||||
public $oldcopy;
|
public $oldcopy;
|
||||||
|
|
||||||
public $fk_price_expression;
|
public $fk_price_expression;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
@ -302,6 +302,7 @@ class Product extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $price_autogen = 0;
|
public $price_autogen = 0;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regular product
|
* Regular product
|
||||||
*/
|
*/
|
||||||
@ -319,6 +320,7 @@ class Product extends CommonObject
|
|||||||
*/
|
*/
|
||||||
const TYPE_STOCKKIT = 3;
|
const TYPE_STOCKKIT = 3;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -3635,17 +3637,17 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load information about stock of a product into stock_reel, stock_warehouse[] (including stock_warehouse[idwarehouse]->detail_batch for batch products)
|
* Load information about stock of a product into ->stock_reel, ->stock_warehouse[] (including stock_warehouse[idwarehouse]->detail_batch for batch products)
|
||||||
* This function need a lot of load. If you use it on list, use a cache to execute it one for each product id.
|
* This function need a lot of load. If you use it on list, use a cache to execute it once for each product id.
|
||||||
* If ENTREPOT_EXTRA_STATUS set, filtering on warehouse status possible.
|
* If ENTREPOT_EXTRA_STATUS set, filtering on warehouse status possible.
|
||||||
*
|
*
|
||||||
* @param string $option '' = Load all stock info, also from closed and internal warehouses,
|
* @param string $option '' = Load all stock info, also from closed and internal warehouses,
|
||||||
* 'nobatch' = Do not load batch information,
|
* 'nobatch' = Do not load batch information,
|
||||||
* 'novirtual' = Do not load virtual stock,
|
* 'novirtual' = Do not load virtual stock,
|
||||||
* 'warehouseopen' = Load stock from open warehouses,
|
* 'warehouseopen' = Load stock from open warehouses only,
|
||||||
* 'warehouseclosed' = Load stock from closed warehouses,
|
* 'warehouseclosed' = Load stock from closed warehouses only,
|
||||||
* 'warehouseinternal' = Load stock from warehouses for internal correct/transfer only
|
* 'warehouseinternal' = Load stock from warehouses for internal correction/transfer only
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
* @see load_virtual_stock, getBatchInfo
|
* @see load_virtual_stock, getBatchInfo
|
||||||
*/
|
*/
|
||||||
function load_stock($option='')
|
function load_stock($option='')
|
||||||
@ -4223,9 +4225,10 @@ class Product extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Charge indicateurs this->nb de tableau de bord
|
* Charge indicateurs this->nb de tableau de bord
|
||||||
*
|
*
|
||||||
* @return int <0 si ko, >0 si ok
|
* @param int $type 0=Product, 1=Service
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function load_state_board()
|
function load_state_board($type=0)
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
@ -4234,14 +4237,16 @@ class Product extends CommonObject
|
|||||||
$sql = "SELECT count(p.rowid) as nb";
|
$sql = "SELECT count(p.rowid) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||||
$sql.= ' WHERE p.entity IN ('.getEntity($this->element, 1).')';
|
$sql.= ' WHERE p.entity IN ('.getEntity($this->element, 1).')';
|
||||||
$sql.= " AND p.fk_product_type <> 1";
|
if ($type == 1) $sql.= " AND p.fk_product_type = 1";
|
||||||
|
else $sql.= " AND p.fk_product_type <> 1";
|
||||||
|
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
while ($obj=$this->db->fetch_object($resql))
|
while ($obj=$this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->nb["products"]=$obj->nb;
|
if ($type == 1) $this->nb["services"]=$obj->nb;
|
||||||
|
else $this->nb["products"]=$obj->nb;
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return 1;
|
return 1;
|
||||||
@ -4608,4 +4613,5 @@ class Product extends CommonObject
|
|||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage predefined services
|
* Class to manage predefined services
|
||||||
|
*
|
||||||
|
* @deprecated Use class Product compatible for both product and services
|
||||||
*/
|
*/
|
||||||
class Service extends CommonObject
|
class Service extends CommonObject
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user