Qual: Remove deprecated field
This commit is contained in:
parent
7553e0473e
commit
eaa4f3ef3f
@ -1134,19 +1134,6 @@ class Facture extends CommonObject
|
||||
if (! $error && $facref == 'PROV')
|
||||
{
|
||||
// La vérif qu'une remise n'est pas utilisée 2 fois est faite au moment de l'insertion de ligne
|
||||
|
||||
// On met a jour table des ventes
|
||||
// On crée ici une denormalisation pas forcement utilisé !!!
|
||||
// TODO Virer utilisation du champ nbvente si utilisation non justifié
|
||||
foreach($this->lignes as $i => $line)
|
||||
{
|
||||
if ($line->fk_product)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'product SET nbvente=nbvente+1 WHERE rowid = '.$line->rowid;
|
||||
$resql2 = $this->db->query($sql);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
|
||||
@ -1011,7 +1011,7 @@ class Form
|
||||
}
|
||||
if (strval($filtertype) != '') $sql.=" AND p.fk_product_type=".$filtertype;
|
||||
if ($ajaxkeysearch && $ajaxkeysearch != '') $sql.=" AND (p.ref like '%".$ajaxkeysearch."%' OR p.label like '%".$ajaxkeysearch."%')";
|
||||
$sql.= " ORDER BY p.nbvente DESC";
|
||||
$sql.= " ORDER BY p.ref";
|
||||
if ($limit) $sql.= " LIMIT $limit";
|
||||
|
||||
dolibarr_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG);
|
||||
@ -1024,7 +1024,7 @@ class Form
|
||||
$sqld = "SELECT d.fk_product, d.label";
|
||||
$sqld.= " FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."product_det as d ";
|
||||
$sqld.= " WHERE d.fk_product=p.rowid AND p.envente=1 AND d.lang='". $langs->getDefaultLang() ."'";
|
||||
$sqld.= " ORDER BY p.nbvente DESC";
|
||||
$sqld.= " ORDER BY p.ref";
|
||||
|
||||
dolibarr_syslog("Form::select_produits_do sql=".$sql, LOG_DEBUG);
|
||||
$resultd = $this->db->query($sqld);
|
||||
|
||||
@ -911,7 +911,7 @@ class Product extends CommonObject
|
||||
}
|
||||
|
||||
$sql = "SELECT rowid, ref, label, description, note, price, price_ttc, price_min, price_min_ttc, price_base_type, tva_tx, envente,";
|
||||
$sql.= " nbvente, fk_product_type, duration, seuil_stock_alerte,canvas,";
|
||||
$sql.= " fk_product_type, duration, seuil_stock_alerte,canvas,";
|
||||
$sql.= " stock_commande, stock_loc, weight, weight_units, volume, volume_units, barcode, fk_barcode_type";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product";
|
||||
if ($id) $sql.= " WHERE rowid = '".$id."'";
|
||||
@ -935,7 +935,6 @@ class Product extends CommonObject
|
||||
$this->price_base_type = $result["price_base_type"];
|
||||
$this->tva_tx = $result["tva_tx"];
|
||||
$this->type = $result["fk_product_type"];
|
||||
$this->nbvente = $result["nbvente"];
|
||||
$this->status = $result["envente"];
|
||||
$this->duration = $result["duration"];
|
||||
$this->duration_value = substr($result["duration"],0,strlen($result["duration"])-1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user