Waste Receipt

--HG--
branch : EDII
This commit is contained in:
hodianto 2019-09-11 11:56:56 +07:00
parent 6018df204f
commit 03e4d4aebd
1 changed files with 1 additions and 7 deletions

View File

@ -29,10 +29,7 @@ public class MID_InventoryLineValidator {
else if (!line.isEndProduct()) else if (!line.isEndProduct())
inv.setQtyInternalUse(inv.getQtyInternalUse().abs()); inv.setQtyInternalUse(inv.getQtyInternalUse().abs());
} }
else if (inv.getM_Product().getM_Product_Category().getValue().contains("SCRAP")) { else {
if(inv.getQtyInternalUse().signum()>0)
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}else {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType(); MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) { if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate()); inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
@ -51,9 +48,6 @@ public class MID_InventoryLineValidator {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate()); inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
else if (!line.isEndProduct()) else if (!line.isEndProduct())
inv.setQtyInternalUse(inv.getQtyInternalUse().abs()); inv.setQtyInternalUse(inv.getQtyInternalUse().abs());
}else if (inv.getM_Product().getM_Product_Category().getValue().contains("SCRAP")) {
if(inv.getQtyInternalUse().signum()>0)
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}else { }else {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType(); MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) { if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {