Merge pull request #1661 from KreizIT/develop

FIX[ bug #1444 ] Shipment product batch is not proposed
This commit is contained in:
Laurent Destailleur 2014-06-14 13:26:19 +02:00
commit 8e5823ddc6
2 changed files with 5 additions and 1 deletions

View File

@ -1128,6 +1128,10 @@ class Expedition extends CommonObject
// Eat-by date
if (! empty($conf->productbatch->enabled)) {
/* test on conf at begining of file sometimes doesn't include expeditionbatch
* May be conf is not well initialized for dark reason
*/
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php';
$line->detail_batch=ExpeditionLigneBatch::FetchAll($this->db,$obj->line_id);
}
$this->lines[$i] = $line;

View File

@ -863,7 +863,7 @@ if ($action == 'create')
if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0;
}
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_array($product->stock_warehouse[GETPOST('entrepot_id','int')])))
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_object($product->stock_warehouse[GETPOST('entrepot_id','int')])))
{
// Quantity to send
print '<td align="center">';