Merge branch 'dev' of http://git.verdnatura.es/salix into dev
This commit is contained in:
commit
f412d3c486
|
@ -6,53 +6,7 @@ export default class Controller {
|
||||||
this.ticketSelected = null;
|
this.ticketSelected = null;
|
||||||
|
|
||||||
this.filter = {
|
this.filter = {
|
||||||
include: [
|
order: 'shipped DESC'
|
||||||
{
|
|
||||||
relation: 'address',
|
|
||||||
scope: {
|
|
||||||
fields: ['provinceFk'],
|
|
||||||
include: {
|
|
||||||
relation: 'province',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'warehouse',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'agencyMode',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'tracking',
|
|
||||||
scope: {
|
|
||||||
fields: ['stateFk'],
|
|
||||||
include: {
|
|
||||||
relation: 'state',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
|
||||||
relation: 'client',
|
|
||||||
scope: {
|
|
||||||
fields: ['salesPersonFk'],
|
|
||||||
include: {
|
|
||||||
relation: 'salesPerson',
|
|
||||||
scope: {
|
|
||||||
fields: ['name']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
order: 'shipped DESC, ticketFk'
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ BEGIN
|
||||||
-- El disponible es menor que 0
|
-- El disponible es menor que 0
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
||||||
SELECT tt.ticketFk, i.name
|
SELECT tt.ticketFk, i.name
|
||||||
FROM tmp.ticketGetProblems tt
|
FROM tmp.ticketListFiltered tt
|
||||||
JOIN vn.ticket t ON t.id = tt.ticketFk
|
JOIN vn.ticket t ON t.id = tt.ticketFk
|
||||||
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
JOIN vn.item i ON i.id = s.itemFk
|
||||||
|
@ -122,7 +122,7 @@ BEGIN
|
||||||
-- Amarillo: El disponible es mayor que cero y la cantidad supera el visible, estando aun sin preparar
|
-- Amarillo: El disponible es mayor que cero y la cantidad supera el visible, estando aun sin preparar
|
||||||
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
INSERT INTO tmp.ticketProblems(ticketFk, problem)
|
||||||
SELECT tt.ticketFk, CONCAT('Delay', i.name)
|
SELECT tt.ticketFk, CONCAT('Delay', i.name)
|
||||||
FROM tmp.ticketGetProblems tt
|
FROM tmp.ticketListFiltered tt
|
||||||
JOIN vn.ticket t ON t.id = tt.ticketFk
|
JOIN vn.ticket t ON t.id = tt.ticketFk
|
||||||
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
LEFT JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
JOIN vn.item i ON i.id = s.itemFk
|
JOIN vn.item i ON i.id = s.itemFk
|
||||||
|
@ -148,3 +148,4 @@ BEGIN
|
||||||
END$$
|
END$$
|
||||||
|
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ module.exports = Self => {
|
||||||
tp.problem
|
tp.problem
|
||||||
FROM tmp.filter f
|
FROM tmp.filter f
|
||||||
LEFT JOIN tmp.ticketProblems tp ON tp.ticketFk = f.ticketFk`);
|
LEFT JOIN tmp.ticketProblems tp ON tp.ticketFk = f.ticketFk`);
|
||||||
stmt.merge(Self.buildSuffix(filter, 'f'));
|
stmt.merge(Self.buildOrderBy(filter, 'f'));
|
||||||
let ticketsIndex = stmts.push(stmt) - 1;
|
let ticketsIndex = stmts.push(stmt) - 1;
|
||||||
|
|
||||||
stmts.push(
|
stmts.push(
|
||||||
|
|
Loading…
Reference in New Issue