refactor: refs #8106 Optimized ticket_getTax #3122
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#3122
Loading…
Reference in New Issue
No description provided.
Delete Branch "8106-negativeBasesOptimize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
refactor: refs #8106 refs #1406 Optimized ticket_getTaxto refactor: refs #8106 Optimized ticket_getTax@ -36,2 +38,2 @@
SELECT * FROM (
SELECT tmpTicket.ticketFk,
WITH sales AS (
SELECT s.id,
los campos s.id y s.ticketFk no son necesarios en la primera SELECT
El s.id ok, pero el s.ticketFk sí es necesario, ya que se utiliza en el GROUP BY
@ -58,2 +72,3 @@
HAVING taxableBase
) t3
)
SELECT *
Se puede eliminar el alias de la consulta ticketTax, se puede añadir el ORDER BY priority en la consulta superior y así simplificarlo