Update reassort.php
This commit is contained in:
parent
475290a4b9
commit
953c9148ff
@ -119,10 +119,10 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price
|
||||
$sql.= ' p.fk_product_type, p.tms as datem,';
|
||||
$sql.= ' p.duration, p.tosell as statut, p.tobuy, p.seuil_stock_alerte, p.desiredstock,';
|
||||
$sql.= ' SUM(s.reel) as stock_physique,';
|
||||
$sql.= ' u.short_label as unit_short';
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $sql.= ' u.short_label as unit_short';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'product as p';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s on p.rowid = s.fk_product';
|
||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid';
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid';
|
||||
// We'll need this table joined to the select in order to filter by categ
|
||||
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product').")";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user