1. Double Crosscheck Inventory Receipt/Issue

--HG--
branch : EDII
This commit is contained in:
hodianto 2019-03-16 23:33:03 +07:00
parent c3440be2dd
commit 39f9b936c8
2 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ public class MID_CalloutInventoryLine extends CalloutEngine implements IColumnCa
if(mTab.getValue("ps_ppoline_ID") != null) {
PS_PPOLine_ID = (int) mTab.getValue("ps_ppoline_ID");
isEnd = DB.getSQLValueStringEx(null, "SELECT IsEndProduct FROM PS_PPOLine WHERE PS_PPOLine_ID =?", new Object[] { PS_PPOLine_ID });
if(isEnd==null) isEnd="N";
if(isEnd.equals("Y"))
retValue = retValue.multiply(new BigDecimal(-1));
else

View File

@ -35,7 +35,8 @@ public class MID_InventoryLineValidator {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}
}else if(!dt.get_ValueAsBoolean("IsReceipt"))
inv.setQtyInternalUse(inv.getQtyInternalUse().abs());
}
return "";
}
@ -55,6 +56,8 @@ public class MID_InventoryLineValidator {
MDocType dt = (MDocType) inv.getM_Inventory().getC_DocType();
if(dt.get_ValueAsBoolean("IsReceipt") && inv.getQtyInternalUse().signum()>0) {
inv.setQtyInternalUse(inv.getQtyInternalUse().negate());
}else if(!dt.get_ValueAsBoolean("IsReceipt")) {
inv.setQtyInternalUse(inv.getQtyInternalUse().abs());
}
}
return "";