fixed bug related to inventory move
This commit is contained in:
parent
030ebd747e
commit
80e81f4c86
|
@ -123,7 +123,7 @@ public class CalloutMovement extends CalloutEngine
|
||||||
if (M_Locator_ID <= 0)
|
if (M_Locator_ID <= 0)
|
||||||
return;
|
return;
|
||||||
//@win - IDEMPIERE-385
|
//@win - IDEMPIERE-385
|
||||||
int M_Warehouse_ID = DB.getSQLValue(null, "SELECT M_Warehouse_ID FROM M_Locator WHERE M_Locator_ID=?");
|
int M_Warehouse_ID = DB.getSQLValue(null, "SELECT M_Warehouse_ID FROM M_Locator WHERE M_Locator_ID=?", M_Locator_ID);
|
||||||
//
|
//
|
||||||
int M_AttributeSetInstance_ID = Env.getContextAsInt(ctx, WindowNo, "M_AttributeSetInstance_ID");
|
int M_AttributeSetInstance_ID = Env.getContextAsInt(ctx, WindowNo, "M_AttributeSetInstance_ID");
|
||||||
BigDecimal available = MStorageReservation.getQtyAvailable(M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID, null);
|
BigDecimal available = MStorageReservation.getQtyAvailable(M_Warehouse_ID, M_Product_ID, M_AttributeSetInstance_ID, null);
|
||||||
|
|
|
@ -87,10 +87,12 @@ public class MStorageReservation extends X_M_StorageReservation {
|
||||||
public static BigDecimal getQtyReserved(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName){
|
public static BigDecimal getQtyReserved(int M_Product_ID, int M_Warehouse_ID, int M_AttributeSetInstance_ID, String trxName){
|
||||||
ArrayList<Object> params = new ArrayList<Object>();
|
ArrayList<Object> params = new ArrayList<Object>();
|
||||||
StringBuffer sql = new StringBuffer();
|
StringBuffer sql = new StringBuffer();
|
||||||
sql.append(" SELECT SUM(QtyReserved) FROM M_StorageReservation oh")
|
sql.append(" SELECT SUM(Qty) FROM M_StorageReservation oh")
|
||||||
.append(" WHERE oh.M_Product_ID=? AND oh.M_Warehouse_ID=?");
|
.append(" WHERE oh.M_Product_ID=? AND oh.M_Warehouse_ID=?")
|
||||||
|
.append(" AND oh.IsSOTrx='Y'");
|
||||||
|
|
||||||
params.add(M_Product_ID,M_Warehouse_ID);
|
params.add(M_Product_ID);
|
||||||
|
params.add(M_Warehouse_ID);
|
||||||
|
|
||||||
// With ASI
|
// With ASI
|
||||||
if (M_AttributeSetInstance_ID != 0) {
|
if (M_AttributeSetInstance_ID != 0) {
|
||||||
|
|
Loading…
Reference in New Issue