@ -422,13 +422,13 @@ class PrAdapter extends Adapter {
|
|||||||
|
|
||||||
if (nik) {
|
if (nik) {
|
||||||
if (!proc_users.includes(nik)) {
|
if (!proc_users.includes(nik)) {
|
||||||
swherenik = '(v.iby="' + nik + '" or v.nikapproval="' + nik + '") and ';
|
swherenik = '(v.iby="' + nik + '" or v.nikapproval="' + nik + '")';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let sdivision = "";
|
let sdivision = "";
|
||||||
if (division && division.trim() !== "") {
|
if (division && division.trim() !== "") {
|
||||||
sdivision = " and v.division = '" + division + "'";
|
sdivision = "v.division = '" + division + "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
let sorder = sort === "past" ? "id asc" : "id desc";
|
let sorder = sort === "past" ? "id asc" : "id desc";
|
||||||
@ -449,7 +449,12 @@ class PrAdapter extends Adapter {
|
|||||||
if (status !== "-1") {
|
if (status !== "-1") {
|
||||||
qry += "and v.status in(" + status + ") ";
|
qry += "and v.status in(" + status + ") ";
|
||||||
}
|
}
|
||||||
qry += "and " + swherenik + sdivision.substring(5);
|
if (swherenik) {
|
||||||
|
qry += "and " + swherenik + " ";
|
||||||
|
}
|
||||||
|
if (sdivision) {
|
||||||
|
qry += "and " + sdivision + " ";
|
||||||
|
}
|
||||||
// qry += "order by id asc limit " + offset + ", " + limit;
|
// qry += "order by id asc limit " + offset + ", " + limit;
|
||||||
|
|
||||||
// console.log("qry paging => ", qry);
|
// console.log("qry paging => ", qry);
|
||||||
|
|||||||
Reference in New Issue
Block a user