feat: refs #6500 procRefactor8 #2131

Merged
robert merged 28 commits from 6500-procRefactor8 into dev 2024-04-17 11:32:54 +00:00
2 changed files with 6 additions and 6 deletions
Showing only changes of commit f30f907d8e - Show all commits

View File

@ -10,7 +10,7 @@ BEGIN
JOIN (
SELECT *
FROM (
SELECT id, landed, tt.warehouseInFk, tt.warehouseOutFk
SELECT t.id, t.landed, tt.warehouseInFk, tt.warehouseOutFk
robert marked this conversation as resolved Outdated

faltan alias en los campos

faltan alias en los campos
FROM travel t
JOIN (
SELECT t.warehouseInFk, t.warehouseOutFk
@ -19,11 +19,11 @@ BEGIN
JOIN travel t ON t.id = e.travelFk
GROUP BY t.warehouseInFk, t.warehouseOutFk
) tt ON t.warehouseInFk = tt.warehouseInFk AND t.warehouseOutFk = tt.warehouseOutFk
WHERE shipped > util.VN_CURDATE() AND isDelivered = FALSE
WHERE shipped > util.VN_CURDATE() AND NOT isDelivered
robert marked this conversation as resolved Outdated

isDelivered = FALSE

NOT isDelivered

Faltan alias

isDelivered = FALSE NOT isDelivered Faltan alias
ORDER BY t.landed
LIMIT 10000000000000000000
) t
GROUP BY warehouseInFk, warehouseOutFk
GROUP BY t.warehouseInFk, t.warehouseOutFk
) tt ON t.warehouseInFk = tt.warehouseInFk AND t.warehouseOutFk = tt.warehouseOutFk
SET e.travelFk = t.id;

View File

@ -18,14 +18,14 @@ BEGIN
( SELECT
t.year,
t.month,
CAST(SUM(divisa) AS DECIMAL(10,2)) dollars,
CAST(SUM(divisa) / SUM(amount) AS DECIMAL(5,4)) changePractical,
CAST(SUM(p.divisa) AS DECIMAL(10,2)) dollars,
robert marked this conversation as resolved Outdated

faltan alias, no se sabe de que tablas vienen los campos

faltan alias, no se sabe de que tablas vienen los campos
CAST(SUM(p.divisa) / SUM(p.amount) AS DECIMAL(5,4)) changePractical,
CAST(rr.value * 0.998 AS DECIMAL(5,4)) changeOfficial
FROM payment p
JOIN time t ON t.dated = p.received
JOIN referenceRate rr ON rr.dated = p.received
JOIN currency c ON c.id = rr.currencyFk
WHERE divisa
WHERE p.divisa
AND c.code = 'USD'
GROUP BY t.year, t.month
) pagos ON t.year = pagos.year AND t.month = pagos.MONTH
robert marked this conversation as resolved Outdated

En la medida de lo posible no se debe de escribir en español, en este caso el nombre de la subconsulta es totalmente evitable que este en español, traducir

En la medida de lo posible no se debe de escribir en español, en este caso el nombre de la subconsulta es totalmente evitable que este en español, traducir