1003475 IDEMPIERE-1530 Allow Material Receipt Line with Quantity Receipt more then Purchase Order Line's Quantity Ordered. Fixed NPE when create MR line without order line.
This commit is contained in:
parent
d365cb1fb8
commit
6937c2dbdb
|
@ -1340,13 +1340,16 @@ public class MInOut extends X_M_InOut implements DocAction
|
|||
{
|
||||
if (!isReversal())
|
||||
{
|
||||
BigDecimal toDelivered = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered());
|
||||
if (sLine.getMovementQty().compareTo(toDelivered) > 0)
|
||||
overReceipt = sLine.getMovementQty().subtract(toDelivered);
|
||||
if (overReceipt.signum() != 0)
|
||||
if (oLine != null)
|
||||
{
|
||||
sLine.setQtyOverReceipt(overReceipt);
|
||||
sLine.saveEx();
|
||||
BigDecimal toDelivered = oLine.getQtyOrdered().subtract(oLine.getQtyDelivered());
|
||||
if (sLine.getMovementQty().compareTo(toDelivered) > 0)
|
||||
overReceipt = sLine.getMovementQty().subtract(toDelivered);
|
||||
if (overReceipt.signum() != 0)
|
||||
{
|
||||
sLine.setQtyOverReceipt(overReceipt);
|
||||
sLine.saveEx();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue