IDEMPIERE-3080 Production doesn't create transactions for children lines with ASI

This commit is contained in:
Carlos Ruiz 2016-04-19 11:31:46 -07:00
parent 9a558f8997
commit 3379872f0a
1 changed files with 5 additions and 1 deletions

View File

@ -200,7 +200,8 @@ public class MProductionLine extends X_M_ProductionLine {
} }
else else
{ {
MStorageOnHand storage = MStorageOnHand.getCreate(Env.getCtx(), getM_Locator_ID(), getM_Product_ID(), 0, date, get_TrxName(), true); MStorageOnHand storage = MStorageOnHand.getCreate(Env.getCtx(), getM_Locator_ID(), getM_Product_ID(),
asi.get_ID(), date, get_TrxName(), true);
BigDecimal lineQty = qtyToMove; BigDecimal lineQty = qtyToMove;
MAttributeSetInstance slASI = new MAttributeSetInstance(getCtx(), MAttributeSetInstance slASI = new MAttributeSetInstance(getCtx(),
@ -239,6 +240,9 @@ public class MProductionLine extends X_M_ProductionLine {
storage.addQtyOnHand(lineQty.negate()); storage.addQtyOnHand(lineQty.negate());
qtyToMove = qtyToMove.subtract(lineQty); qtyToMove = qtyToMove.subtract(lineQty);
if (log.isLoggable(Level.FINE))log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove ); if (log.isLoggable(Level.FINE))log.log(Level.FINE, getLine() + " Qty moved = " + lineQty + ", Remaining = " + qtyToMove );
} else {
errorString.append( "Storage doesn't match ASI " + prod.toString() + " / "
+ slASIString + " vs. " + asiString + "\n");
} }
} }