|
@@ -861,10 +861,12 @@ class checkData {
|
|
|
if (posRange.length > 0) {
|
|
|
for (const p of posRange) {
|
|
|
const end_contract_qty = this.ctx.helper.add(p.pre_contract_qty, p.contract_qty);
|
|
|
- if (!p.quantity) return !!end_contract_qty;
|
|
|
- return p.quantity > 0
|
|
|
- ? end_contract_qty > p.quantity
|
|
|
- : end_contract_qty < p.quantity || end_contract_qty > 0;
|
|
|
+ if (!p.quantity && !!end_contract_qty) return true;
|
|
|
+ if (p.quantity > 0) {
|
|
|
+ if (end_contract_qty > p.quantity) return true;
|
|
|
+ } else {
|
|
|
+ if (end_contract_qty < p.quantity || end_contract_qty > 0) return true;
|
|
|
+ }
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
@@ -883,6 +885,7 @@ class checkData {
|
|
|
}
|
|
|
}
|
|
|
checkOverRange() {
|
|
|
+ console.log('checkOverRange');
|
|
|
const isTz = this.ctx.tender.data.measure_type === this.measureType.tz.value;
|
|
|
for (const b of this.checkBills.nodes) {
|
|
|
if (b.children && b.children.length > 0) continue;
|