Update expeditionbatch.class.php

This commit is contained in:
Laurent Destailleur 2018-03-02 18:11:03 +01:00 committed by GitHub
parent 733ca8af7d
commit 45418769b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,14 +59,14 @@ class ExpeditionLineBatch extends CommonObject
function fetchFromStock($id_stockdluo)
{
$sql = "SELECT";
$sql.= " pb.batch,";
$sql.= " pl.sellby,";
$sql.= " pl.eatby,";
$sql.= " pl.batch,";
$sql.= " ps.fk_entrepot";
$sql.= " FROM ".MAIN_DB_PREFIX."product_batch as pb";
$sql.= " JOIN ".MAIN_DB_PREFIX."product_stock as ps on pb.fk_product_stock=ps.rowid";
$sql.= ' JOIN '.MAIN_DB_PREFIX."product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product";
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX."product_lot as pl on pl.batch = pb.batch AND pl.fk_product = ps.fk_product";
$sql.= " WHERE pb.rowid = ".(int) $id_stockdluo;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);