diff --git a/org.idempiere.test/src/org/idempiere/test/model/PurchaseOrderTest.java b/org.idempiere.test/src/org/idempiere/test/model/PurchaseOrderTest.java index 3f66f52acb..d1dbfa6cdf 100644 --- a/org.idempiere.test/src/org/idempiere/test/model/PurchaseOrderTest.java +++ b/org.idempiere.test/src/org/idempiere/test/model/PurchaseOrderTest.java @@ -290,10 +290,11 @@ public class PurchaseOrderTest extends AbstractTestCase { order.load(trxName); assertEquals(DocAction.STATUS_Completed, order.getDocStatus()); line1.load(trxName); - assertEquals(0, line1.getQtyReserved().compareTo(MINUS_THREE)); + // IDEMPIERE-5039 - when reservations go negative they are changed to zero + assertEquals(0, line1.getQtyReserved().compareTo(Env.ZERO)); newQtyOrdered = getQtyOrdered(ctx, PRODUCT_MULCH, trxName); - assertEquals(0, qtyOrderedOriginal.add(MINUS_THREE).compareTo(newQtyOrdered)); + assertEquals(0, qtyOrderedOriginal.compareTo(newQtyOrdered)); // create a new material receipt for the -3 reversed MInOut receipt2 = new MInOut(order, DOCTYPE_RECEIPT, order.getDateOrdered());