BF [3160928] - Error reversing a shipment

https://sourceforge.net/tracker/?func=detail&aid=3160928&group_id=176962&atid=879332
This commit is contained in:
Carlos Ruiz 2011-03-26 01:07:13 -05:00
parent 2534e2b3ae
commit 86e2b60b3c
1 changed files with 4 additions and 2 deletions

View File

@ -263,7 +263,7 @@ public class MInOut extends X_M_InOut implements DocAction
if (counter)
from.setRef_InOut_ID(to.getM_InOut_ID());
if (to.copyLinesFrom(from, counter, setOrder) == 0)
if (to.copyLinesFrom(from, counter, setOrder) <= 0)
throw new IllegalStateException("Could not create Shipment Lines");
return to;
@ -746,8 +746,10 @@ public class MInOut extends X_M_InOut implements DocAction
fromLine.save(get_TrxName());
}
}
if (fromLines.length != count)
if (fromLines.length != count) {
log.log(Level.SEVERE, "Line difference - From=" + fromLines.length + " <> Saved=" + count);
count = -1; // caller must validate error in count and rollback accordingly - BF [3160928]
}
return count;
} // copyLinesFrom