|
@@ -298,10 +298,10 @@ let calcTools = {
|
|
|
let aprice = calcTools.hasAdjustPrice() ? me.uiGLJPrice(glj["adjustPrice"], glj) : me.uiGLJPrice(glj["basePrice"], glj);
|
|
|
|
|
|
if (priceType == priceTypes.ptDiffPrice){
|
|
|
- if (aprice != mprice){
|
|
|
+ // if (aprice != mprice){
|
|
|
temp = (temp + (qty * mprice).toDecimal(decimalObj.process)).toDecimal(decimalObj.process);
|
|
|
temp2 = (temp2 + (qty * aprice).toDecimal(decimalObj.process)).toDecimal(decimalObj.process);
|
|
|
- }
|
|
|
+ // }
|
|
|
}
|
|
|
else {
|
|
|
if (priceType == priceTypes.ptBasePrice){ price = me.uiGLJPrice(glj["basePrice"], glj);}
|
|
@@ -343,12 +343,13 @@ let calcTools = {
|
|
|
if (md.type == gljType.MACHINE_LABOUR) {
|
|
|
let q = md["consumption"] ? md["consumption"] : 0;
|
|
|
let p = md["basePrice"] ? md["basePrice"] : 0;
|
|
|
- mdSum = mdSum + (q * p).toDecimal(decimalObj.ration.unitPrice);
|
|
|
- mdSum = (mdSum).toDecimal(decimalObj.ration.unitPrice);
|
|
|
+ mdSum = mdSum + (q * p).toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
|
+ mdSum = (mdSum).toDecimal(decimalObj.glj.unitPriceHasMix);
|
|
|
}
|
|
|
}
|
|
|
- result = result + (gljQ * mdSum).toDecimal(decimalObj.process);
|
|
|
- result = (result).toDecimal(decimalObj.process);
|
|
|
+ // result = result + (gljQ * mdSum).toDecimal(decimalObj.process);
|
|
|
+ result = result + (gljQ * mdSum).toDecimal(decimalObj.ration.unitPrice);
|
|
|
+ result = (result).toDecimal(decimalObj.ration.unitPrice);
|
|
|
}
|
|
|
}
|
|
|
result = (result).toDecimal(decimalObj.ration.unitPrice);
|