|
|
@@ -158,6 +158,10 @@ $(document).ready(function () {
|
|
|
return data[qtyField] > 0
|
|
|
? data.end_contract_qty > ZhCalc.mul(data[qtyField], per)
|
|
|
: data.end_contract_qty < ZhCalc.mul(data[qtyField], per) || data.end_contract_qty > 0;
|
|
|
+ } else if (!data[qtyField]) {
|
|
|
+ return data[qtyField] > 0
|
|
|
+ ? data.end_contract_qty > ZhCalc.mul(data[qtyField], per)
|
|
|
+ : data.end_contract_qty < ZhCalc.mul(data[qtyField], per) || data.end_contract_qty > 0;
|
|
|
} else {
|
|
|
if (!data[tpField]) return !!data.end_contract_tp;
|
|
|
return data[tpField] > 0
|
|
|
@@ -169,9 +173,9 @@ $(document).ready(function () {
|
|
|
const nPercent = Math.min(Math.max(ZhCalc.div(parseFloat($('#over-percent').val()), 100), 0.5), 1);
|
|
|
for (const node of data) {
|
|
|
if (node) {
|
|
|
- if (node.b_code === '103-4')console.log(node);
|
|
|
const bOverRangeTz = billsGatherOver(node, 'final_1_qty', 'final_1_tp', nPercent);
|
|
|
const bOverRangeDeal = billsGatherOver(node, 'deal_final_1_qty', 'deal_final_1_tp', nPercent);
|
|
|
+ if (node.b_code === '302-4-a') console.log(bOverRangeTz, bOverRangeDeal, node.final_1_qty, node.end_contract_qty);
|
|
|
node.overRange = bQty ? bOverRangeTz : (bDealQty ? bOverRangeDeal : bOverRangeTz || bOverRangeDeal);
|
|
|
}
|
|
|
}
|