IDEMPIERE-1447 Posting fails on reversal shipment with services
This commit is contained in:
parent
5803ed9602
commit
533302fbc1
|
@ -168,6 +168,7 @@ public class Doc_InOut extends Doc
|
|||
for (int i = 0; i < p_lines.length; i++)
|
||||
{
|
||||
DocLine line = p_lines[i];
|
||||
MProduct product = line.getProduct();
|
||||
BigDecimal costs = null;
|
||||
if (!isReversal(line))
|
||||
{
|
||||
|
@ -178,7 +179,6 @@ public class Doc_InOut extends Doc
|
|||
// end MZ
|
||||
if (costs == null || costs.signum() == 0) // zero costs OK
|
||||
{
|
||||
MProduct product = line.getProduct();
|
||||
if (product.isStocked())
|
||||
{
|
||||
//ok if we have purchased zero cost item from vendor before
|
||||
|
@ -227,6 +227,10 @@ public class Doc_InOut extends Doc
|
|||
if (!dr.updateReverseLine (MInOut.Table_ID,
|
||||
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
|
||||
{
|
||||
if (! product.isStocked()) { // ignore service
|
||||
fact.remove(dr);
|
||||
continue;
|
||||
}
|
||||
p_Error = "Original Shipment/Receipt not posted yet";
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue