1. Double Crosscheck Inventory Receipt/Issue
--HG-- branch : EDII
This commit is contained in:
parent
c3440be2dd
commit
39f9b936c8
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 "";
|
||||
|
|
|
|||
Loading…
Reference in New Issue