refactor: refs #5586 Optimized SQL negativeBases #2007
|
@ -87,7 +87,7 @@ module.exports = Self => {
|
|||
WHERE t.shipped BETWEEN ? AND util.dayEnd(?)
|
||||
guillermo marked this conversation as resolved
|
||||
AND t.refFk IS NULL
|
||||
AND c.typeFk IN ('normal','trust')
|
||||
GROUP BY t.clientFk, t.totalWithoutVat
|
||||
GROUP BY t.clientFk, negativeBase.taxableBase
|
||||
guillermo marked this conversation as resolved
Outdated
jgallego
commented
un ticket que tinga 2 bases imponibles ha de tindre dos linies, amb este group by ho fusiona en una.. un ticket que tinga 2 bases imponibles ha de tindre dos linies, amb este group by ho fusiona en una..
|
||||
HAVING amount < 0`, [args.from, args.to]));
|
||||
|
||||
stmt = new ParameterizedSQL(`SELECT * FROM tmp.filter`);
|
||||
|
|
Loading…
Reference in New Issue
posar una funcio en el where pot fer que no puga indexar, revisa be que vaja rapid
Funciona mes rapid que antes.