[ 2151904 ] The Qty Batch Calculate do not work in Manufacturing Order
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2151904&group_id=176962
This commit is contained in:
parent
1493f5b8ac
commit
bc1d7aa2a4
|
@ -18,6 +18,7 @@ package org.eevolution.model;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.Timestamp;
|
import java.sql.Timestamp;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -363,8 +364,19 @@ public class MPPOrder extends X_PP_Order implements DocAction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
PP_Order_Workflow.saveEx();
|
PP_Order_Workflow.saveEx();
|
||||||
} // workflow valid from/to
|
|
||||||
|
|
||||||
|
BigDecimal QtyBatchs = null;
|
||||||
|
BigDecimal QtyBatchSize = PP_Order_Workflow.getQtyBatchSize().setScale(0, RoundingMode.UP);
|
||||||
|
|
||||||
|
if (QtyBatchSize.signum()==0)
|
||||||
|
QtyBatchs = Env.ONE;
|
||||||
|
else
|
||||||
|
QtyBatchs = getQtyEntered().divide(QtyBatchSize , 0, BigDecimal.ROUND_UP);
|
||||||
|
|
||||||
|
setQtyBatchs(QtyBatchs);
|
||||||
|
setQtyBatchSize(QtyBatchSize);
|
||||||
|
|
||||||
|
} // workflow valid from/to
|
||||||
return true;
|
return true;
|
||||||
} // beforeSave
|
} // beforeSave
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue