Revert "IDEMPIERE-4189 Fix potential NPE in generate shipment - based on patch from Martin Schönbeck"
This reverts commit 04001e1055
.
This commit is contained in:
parent
04001e1055
commit
5952da8f97
|
@ -257,11 +257,14 @@ public class InOutGenerate extends SvrProcess
|
||||||
BigDecimal onHand = Env.ZERO;
|
BigDecimal onHand = Env.ZERO;
|
||||||
BigDecimal toDeliver = line.getQtyOrdered()
|
BigDecimal toDeliver = line.getQtyOrdered()
|
||||||
.subtract(line.getQtyDelivered());
|
.subtract(line.getQtyDelivered());
|
||||||
// Nothing to Deliver
|
|
||||||
if (toDeliver.signum() == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
MProduct product = line.getProduct();
|
MProduct product = line.getProduct();
|
||||||
|
// Nothing to Deliver
|
||||||
|
if (product != null && toDeliver.signum() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// or it's a charge - Bug#: 1603966
|
||||||
|
if (line.getC_Charge_ID()!=0 && toDeliver.signum() == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Check / adjust for confirmations
|
// Check / adjust for confirmations
|
||||||
BigDecimal unconfirmedShippedQty = Env.ZERO;
|
BigDecimal unconfirmedShippedQty = Env.ZERO;
|
||||||
|
@ -295,11 +298,6 @@ public class InOutGenerate extends SvrProcess
|
||||||
createLine (order, line, toDeliver, null, false);
|
createLine (order, line, toDeliver, null, false);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (product == null)
|
|
||||||
{
|
|
||||||
// code must never arrive here - but for safety against NPE
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Stored Product
|
// Stored Product
|
||||||
String MMPolicy = product.getMMPolicy();
|
String MMPolicy = product.getMMPolicy();
|
||||||
|
|
Loading…
Reference in New Issue