7836-futureEntries #2839
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#2839
Loading…
Reference in New Issue
No description provided.
Delete Branch "7836-futureEntries"
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?
@ -0,0 +1,166 @@
DELIMITER $$
$$
Esta linea sobra
@ -0,0 +35,4 @@
IFNULL(invoiceCurrency, 0), 2
) currencyBalance
FROM (
SELECT * FROM
No podrías poner eL ORDER BY en la subconsulta para ahorrate este
SELECT * FROM
?OK. Pensaba que el order by afectaría sólo a la última parte del UNION
@ -0,0 +64,4 @@
JOIN invoiceInDueDay iid ON iid.invoiceInFk = ii.id
JOIN currency c ON c.id = ii.currencyFk
JOIN invoiceInConfig iic
WHERE ii.issued >= iic.balanceStartingDate
Como utilizas este campo iic.balanceStartingDate de la tabla invoiceInConfig, es mejor que lo setees en una variable, así no tienes que acceder a el 2 veces, sino 1.
https://wiki.verdnatura.es/index.php/Convenciones_SQL#Obtener_dato_de_una_tabla_config
ok
@ -0,0 +130,4 @@
FROM supplierExpense se
JOIN currency c ON c.id = se.currencyFk
WHERE se.supplierFk = vSupplierFk
AND vCurrencyFk IN (se.currencyFk,0)
¿Por que pones un 0?
Para que al sumar un NULL no me devuelva toda la suma NULL
@ -0,0 +149,4 @@
FALSE isBooked,
c.code,
'order'
FROM vn.entry e
Quitar vn.
@ -0,0 +162,4 @@
IF(vOrderBy = 'dueDate', id, NULL)
LIMIT 10000000000000000000
) t;
END;$$
END$$