Merge branch 'dev' of http://git.verdnatura.es/salix into dev

This commit is contained in:
Carlos Jimenez 2018-08-31 13:07:05 +02:00
commit f412d3c486
3 changed files with 5 additions and 50 deletions

View File

@ -6,53 +6,7 @@ export default class Controller {
this.ticketSelected = null;
this.filter = {
include: [
{
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'
order: 'shipped DESC'
};
}

View File

@ -98,7 +98,7 @@ BEGIN
-- El disponible es menor que 0
INSERT INTO tmp.ticketProblems(ticketFk, problem)
SELECT tt.ticketFk, i.name
FROM tmp.ticketGetProblems tt
FROM tmp.ticketListFiltered tt
JOIN vn.ticket t ON t.id = tt.ticketFk
LEFT JOIN vn.sale s ON s.ticketFk = t.id
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
INSERT INTO tmp.ticketProblems(ticketFk, problem)
SELECT tt.ticketFk, CONCAT('Delay', i.name)
FROM tmp.ticketGetProblems tt
FROM tmp.ticketListFiltered tt
JOIN vn.ticket t ON t.id = tt.ticketFk
LEFT JOIN vn.sale s ON s.ticketFk = t.id
JOIN vn.item i ON i.id = s.itemFk
@ -148,3 +148,4 @@ BEGIN
END$$
DELIMITER ;

View File

@ -89,7 +89,7 @@ module.exports = Self => {
tp.problem
FROM tmp.filter f
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;
stmts.push(