Merge pull request #8401 from all3kcis/patch-6

Add batch status
This commit is contained in:
Laurent Destailleur 2018-03-18 12:22:34 +01:00 committed by GitHub
commit 6861dab49e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -272,7 +272,7 @@ print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
* Last modified products
*/
$max=15;
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.fk_price_expression,";
$sql = "SELECT p.rowid, p.label, p.price, p.ref, p.fk_product_type, p.tosell, p.tobuy, p.tobatch, p.fk_price_expression,";
$sql.= " p.entity,";
$sql.= " p.tms as datem";
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
@ -336,7 +336,8 @@ if ($result)
$product_static->ref=$objp->ref;
$product_static->label = $objp->label;
$product_static->type=$objp->fk_product_type;
$product_static->entity = $objp->entity;
$product_static->entity = $objp->entity;
$product_static->status_batch = $objp->tobatch;
print $product_static->getNomUrl(1,'',16);
print "</td>\n";
print '<td>'.dol_trunc($objp->label,32).'</td>';

View File

@ -698,6 +698,7 @@ else
$product_static->type = $obj->fk_product_type;
$product_static->status_buy = $obj->tobuy;
$product_static->status = $obj->tosell;
$product_static->status_batch = $obj->tobatch;
$product_static->entity = $obj->entity;
$product_static->pmp = $obj->pmp;

View File

@ -446,7 +446,7 @@ else
$totalunit=0;
$totalvalue=$totalvaluesell=0;
$sql = "SELECT p.rowid as rowid, p.ref, p.label as produit, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,";
$sql = "SELECT p.rowid as rowid, p.ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.pmp as ppmp, p.price, p.price_ttc, p.entity,";
$sql.= " ps.reel as value";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product as p";
$sql.= " WHERE ps.fk_product = p.rowid";
@ -487,10 +487,11 @@ else
print '<tr class="oddeven">';
print "<td>";
$productstatic->id=$objp->rowid;
$productstatic->ref = $objp->ref;
$productstatic->label = $objp->produit;
$productstatic->ref = $objp->ref;
$productstatic->label = $objp->produit;
$productstatic->type=$objp->type;
$productstatic->entity=$objp->entity;
$productstatic->status_batch=$objp->tobatch;
print $productstatic->getNomUrl(1,'stock',16);
print '</td>';

View File

@ -415,7 +415,7 @@ $formother=new FormOther($db);
$formproduct=new FormProduct($db);
if (!empty($conf->projet->enabled)) $formproject=new FormProjets($db);
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.fk_product_type as type, p.entity,";
$sql = "SELECT p.rowid, p.ref as product_ref, p.label as produit, p.tobatch, p.fk_product_type as type, p.entity,";
$sql.= " e.ref as stock, e.rowid as entrepot_id, e.lieu,";
$sql.= " m.rowid as mid, m.value as qty, m.datem, m.fk_user_author, m.label, m.inventorycode, m.fk_origin, m.origintype,";
$sql.= " m.batch, m.price,";
@ -891,6 +891,7 @@ if ($resql)
$productstatic->label=$objp->produit;
$productstatic->type=$objp->type;
$productstatic->entity=$objp->entity;
$productstatic->status_batch=$objp->tobatch;
$productlot->id = $objp->lotid;
$productlot->batch= $objp->batch;