Fix: la variable stock_reel n'tait pas remise 0

This commit is contained in:
Regis Houssin 2007-11-12 19:02:37 +00:00
parent 62cac982cb
commit cb023f4345

View File

@ -63,6 +63,7 @@ class Product extends CommonObject
//! Type 0 for regural product, 1 for service, 2 for assembly kit, 3 for stock kit
var $type;
var $typestring;
var $stock_reel;
var $seuil_stock_alerte;
//! Duree de validite du service
var $duration_value;
@ -119,6 +120,7 @@ class Product extends CommonObject
$this->db = $DB;
$this->id = $id ;
$this->status = 0;
$this->stock_reel = 0;
$this->seuil_stock_alerte = 0;
$this->canvas = '';
@ -2117,6 +2119,8 @@ class Product extends CommonObject
*/
function load_stock()
{
$this->stock_reel = 0;
$sql = "SELECT reel, fk_entrepot";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock";
$sql.= " WHERE fk_product = '".$this->id."'";