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 toDeliver = line.getQtyOrdered()
|
||||
.subtract(line.getQtyDelivered());
|
||||
// Nothing to Deliver
|
||||
if (toDeliver.signum() == 0)
|
||||
continue;
|
||||
|
||||
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
|
||||
BigDecimal unconfirmedShippedQty = Env.ZERO;
|
||||
|
@ -295,11 +298,6 @@ public class InOutGenerate extends SvrProcess
|
|||
createLine (order, line, toDeliver, null, false);
|
||||
continue;
|
||||
}
|
||||
if (product == null)
|
||||
{
|
||||
// code must never arrive here - but for safety against NPE
|
||||
continue;
|
||||
}
|
||||
|
||||
// Stored Product
|
||||
String MMPolicy = product.getMMPolicy();
|
||||
|
|
Loading…
Reference in New Issue