IDEMPIERE-2035 Generate Shipments is not adjusting QtyEntered. Accept patch from Alan Rodrigo Lescano.
This commit is contained in:
parent
15596ee282
commit
2bcf6c577e
|
@ -525,6 +525,10 @@ public class InOutGenerate extends SvrProcess
|
||||||
MInOutLine line = new MInOutLine (m_shipment);
|
MInOutLine line = new MInOutLine (m_shipment);
|
||||||
line.setOrderLine(orderLine, 0, order.isSOTrx() ? toDeliver : Env.ZERO);
|
line.setOrderLine(orderLine, 0, order.isSOTrx() ? toDeliver : Env.ZERO);
|
||||||
line.setQty(toDeliver);
|
line.setQty(toDeliver);
|
||||||
|
if (orderLine.getQtyEntered().compareTo(orderLine.getQtyOrdered()) != 0)
|
||||||
|
line.setQtyEntered(line.getMovementQty().multiply(orderLine.getQtyEntered())
|
||||||
|
.divide(orderLine.getQtyOrdered(), 12, BigDecimal.ROUND_HALF_UP));
|
||||||
|
line.setLine(m_line + orderLine.getLine());
|
||||||
if (!line.save())
|
if (!line.save())
|
||||||
throw new IllegalStateException("Could not create Shipment Line");
|
throw new IllegalStateException("Could not create Shipment Line");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue