Skip to content
Snippets Groups Projects
Commit d629c55e authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #1514 from KreizIT/batchfix

Batch Fix
parents f027482b fcb588f4
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
*/ */
/** /**
* \file expedtion/class/productbatch.class.php * \file expedition/class/productbatch.class.php
* \ingroup productbatch * \ingroup productbatch
* \brief This file implements CRUD method for managing product's shipment * \brief This file implements CRUD method for managing product's shipment
* with batch record * with batch record
......
...@@ -856,7 +856,7 @@ if ($action == 'create') ...@@ -856,7 +856,7 @@ if ($action == 'create')
if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0; if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0;
} }
if (empty($conf->productbatch->enabled) || ! $product->hasbatch()) { if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_array($product->stock_warehouse[GETPOST('entrepot_id','int')] ))) {
// Quantity to send // Quantity to send
print '<td align="center">'; print '<td align="center">';
if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES)) if ($line->product_type == 0 || ! empty($conf->global->STOCK_SUPPORTS_SERVICES))
...@@ -897,27 +897,27 @@ if ($action == 'create') ...@@ -897,27 +897,27 @@ if ($action == 'create')
print "</tr>\n"; print "</tr>\n";
// Show subproducts of product // Show subproducts of product
if (! empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0) if (! empty($conf->global->PRODUIT_SOUSPRODUITS) && $line->fk_product > 0)
{ {
$product->get_sousproduits_arbo(); $product->get_sousproduits_arbo();
$prods_arbo = $product->get_arbo_each_prod($qtyProdCom); $prods_arbo = $product->get_arbo_each_prod($qtyProdCom);
if(count($prods_arbo) > 0) if(count($prods_arbo) > 0)
{ {
foreach($prods_arbo as $key => $value) foreach($prods_arbo as $key => $value)
{ {
//print $value[0]; //print $value[0];
$img=''; $img='';
if ($value['stock'] < $value['stock_alert']) if ($value['stock'] < $value['stock_alert'])
{ {
$img=img_warning($langs->trans("StockTooLow")); $img=img_warning($langs->trans("StockTooLow"));
} }
print "<tr ".$bc[$var]."><td>&nbsp; &nbsp; &nbsp; -> print "<tr ".$bc[$var]."><td>&nbsp; &nbsp; &nbsp; ->
<a href=\"".DOL_URL_ROOT."/product/fiche.php?id=".$value['id']."\">".$value['fullpath']." <a href=\"".DOL_URL_ROOT."/product/fiche.php?id=".$value['id']."\">".$value['fullpath']."
</a> (".$value['nb'].")</td><td align=\"center\"> ".$value['nb_total']."</td><td>&nbsp</td><td>&nbsp</td> </a> (".$value['nb'].")</td><td align=\"center\"> ".$value['nb_total']."</td><td>&nbsp</td><td>&nbsp</td>
<td align=\"center\">".$value['stock']." ".$img."</td></tr>"; <td align=\"center\">".$value['stock']." ".$img."</td></tr>";
} }
} }
} }
} else { } else {
print '<td></td><td></td></tr>'; print '<td></td><td></td></tr>';
$subj=0; $subj=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment