This reverts commit 73b389652f
.
This commit is contained in:
parent
0232b2e8f3
commit
de1e9011c8
|
@ -263,6 +263,8 @@ public class MProduction extends X_M_Production implements DocAction {
|
||||||
|
|
||||||
int M_Warehouse_ID = finishedLocator.getM_Warehouse_ID();
|
int M_Warehouse_ID = finishedLocator.getM_Warehouse_ID();
|
||||||
|
|
||||||
|
int asi = 0;
|
||||||
|
|
||||||
// products used in production
|
// products used in production
|
||||||
String sql = " SELECT bl.M_Product_ID, bl.QtyBOM" + " FROM PP_Product_BOMLine bl"
|
String sql = " SELECT bl.M_Product_ID, bl.QtyBOM" + " FROM PP_Product_BOMLine bl"
|
||||||
+ " JOIN PP_Product_BOM b ON b.PP_Product_BOM_ID = bl.PP_Product_BOM_ID "
|
+ " JOIN PP_Product_BOM b ON b.PP_Product_BOM_ID = bl.PP_Product_BOM_ID "
|
||||||
|
@ -353,7 +355,6 @@ public class MProduction extends X_M_Production implements DocAction {
|
||||||
MProductionLine BOMLine = null;
|
MProductionLine BOMLine = null;
|
||||||
int prevLoc = -1;
|
int prevLoc = -1;
|
||||||
int previousAttribSet = -1;
|
int previousAttribSet = -1;
|
||||||
int prevAsi = -1;
|
|
||||||
// Create lines from storage until qty is reached
|
// Create lines from storage until qty is reached
|
||||||
for (int sl = 0; sl < storages.length; sl++) {
|
for (int sl = 0; sl < storages.length; sl++) {
|
||||||
|
|
||||||
|
@ -365,11 +366,11 @@ public class MProduction extends X_M_Production implements DocAction {
|
||||||
|
|
||||||
int loc = storages[sl].getM_Locator_ID();
|
int loc = storages[sl].getM_Locator_ID();
|
||||||
int slASI = storages[sl].getM_AttributeSetInstance_ID();
|
int slASI = storages[sl].getM_AttributeSetInstance_ID();
|
||||||
int locAttribSet = new MAttributeSetInstance(getCtx(), slASI,
|
int locAttribSet = new MAttributeSetInstance(getCtx(), asi,
|
||||||
get_TrxName()).getM_AttributeSet_ID();
|
get_TrxName()).getM_AttributeSet_ID();
|
||||||
|
|
||||||
// roll up costing attributes if in the same locator
|
// roll up costing attributes if in the same locator
|
||||||
if (((locAttribSet == 0 && previousAttribSet == 0) || (slASI == prevAsi))
|
if (locAttribSet == 0 && previousAttribSet == 0
|
||||||
&& prevLoc == loc) {
|
&& prevLoc == loc) {
|
||||||
BOMLine.setQtyUsed(BOMLine.getQtyUsed()
|
BOMLine.setQtyUsed(BOMLine.getQtyUsed()
|
||||||
.add(lineQty));
|
.add(lineQty));
|
||||||
|
@ -394,7 +395,6 @@ public class MProduction extends X_M_Production implements DocAction {
|
||||||
}
|
}
|
||||||
prevLoc = loc;
|
prevLoc = loc;
|
||||||
previousAttribSet = locAttribSet;
|
previousAttribSet = locAttribSet;
|
||||||
prevAsi = slASI;
|
|
||||||
// enough ?
|
// enough ?
|
||||||
BOMMovementQty = BOMMovementQty.subtract(lineQty);
|
BOMMovementQty = BOMMovementQty.subtract(lineQty);
|
||||||
if (BOMMovementQty.signum() == 0)
|
if (BOMMovementQty.signum() == 0)
|
||||||
|
|
Loading…
Reference in New Issue