7965-unifyProblems #2990

Open
carlosap wants to merge 10 commits from 7965-unifyProblems into dev
3 changed files with 4 additions and 7 deletions
Showing only changes of commit 69cafd5a04 - Show all commits

View File

@ -289,7 +289,7 @@ module.exports = Self => {
{'tp.hasTicketRequest': true},
{'tp.hasComponentLack': true},
{'tp.isTaxDataChecked': false},
{'tp.itemShortage': {neq: null}},
{'tp.hasItemShortage': true},
{'tp.isTooLittle': true}
]};
} else if (hasProblems === false) {
@ -299,7 +299,7 @@ module.exports = Self => {
{'tp.hasTicketRequest': false},
{'tp.hasComponentLack': false},
{'tp.isTaxDataChecked': true},
{'tp.itemShortage': null},
{'tp.hasItemShortage': false},
{'tp.isTooLittle': false}
]};
}

View File

@ -345,7 +345,7 @@ module.exports = Self => {
{'tp.isFreezed': hasProblem},
{'tp.hasRisk': hasProblem},
{'tp.hasTicketRequest': hasProblem},
{'tp.itemShortage': range},
{'tp.hasItemShortage': range},
{'tp.hasRounding': hasProblem}
]};

View File

@ -175,20 +175,17 @@ module.exports = Self => {
let condition;
let hasProblem;
let range;
let hasWhere;
switch (args.problems) {
case true:
condition = `or`;
hasProblem = true;
range = {neq: null};
hasWhere = true;
break;
case false:
condition = `and`;
hasProblem = null;
range = null;
hasWhere = true;
break;
}
@ -198,7 +195,7 @@ module.exports = Self => {
{'tp.isFreezed': hasProblem},
{'tp.hasRisk': hasProblem},
{'tp.hasTicketRequest': hasProblem},
{'tp.itemShortage': range},
{'tp.hasItemShortage': hasProblem},
{'tp.hasComponentLack': hasProblem},
{'tp.isTooLittle': hasProblem},
{'tp.hasRounding': hasProblem}