forked from Wavyzz/dolibarr
Merge pull request #11147 from frederic34/patch-2
fix reassort with not using product units
This commit is contained in:
@@ -118,8 +118,8 @@ $htmlother=new FormOther($db);
|
||||
$sql = 'SELECT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type, p.entity,';
|
||||
$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,';
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $sql.= ' u.short_label as unit_short';
|
||||
$sql.= ' SUM(s.reel) as stock_physique';
|
||||
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';
|
||||
if (! empty($conf->global->PRODUCT_USE_UNITS)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_units as u on p.fk_unit = u.rowid';
|
||||
|
||||
Reference in New Issue
Block a user