|
|
@@ -1800,7 +1800,8 @@ class CalcProgram {
|
|
|
// console.log(`[${calcItem.ID}]: ${calcItem.compiledExpr}`); // for test.
|
|
|
let tf = (eval(calcItem.compiledExpr) * feeRate * 0.01).toDecimal(decimalObj.process);
|
|
|
calcItem.totalFee = tf.toDecimal(decimalObj.decimal('totalPrice', treeNode));
|
|
|
- calcItem.unitFee = uf.toDecimal(decimalObj.decimal('unitPrice', treeNode));
|
|
|
+ let nodeQ = calcTools.uiNodeQty(treeNode) ? calcTools.uiNodeQty(treeNode) : 1;
|
|
|
+ calcItem.unitFee = (tf / nodeQ).toDecimal(decimalObj.decimal('unitPrice', treeNode));
|
|
|
|
|
|
if (tender == tenderTypes.ttCalc) {
|
|
|
let tExpr = analyzer.getCompiledTenderExpr(calcItem.compiledExpr);
|