refactor: refs #6778 Migrated views of vn2008 to vn #1996
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1996
Loading…
Reference in New Issue
No description provided.
Delete Branch "6778-changeViewDependencesVn2008"
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?
@ -58,2 +56,2 @@
where Fecha <= datFEC
group by Id_Cliente
SELECT clientFk Id_Cliente, sum(amount) as Greuge
FROM vn2.greuge
vn2
@ -101,3 +101,2 @@
IF(MAX(Fecha) < DATE_FORMAT(TIMESTAMPADD(MONTH, - 1, vDate), '%Y- %m-01'), TRUE, FALSE) muerto
FROM vn2008.Facturas f
JOIN vn2008.Clientes c ON c.Id_cliente = f.Id_Cliente
FROM vn.invoiceOut f
modificar alias
@ -26,3 +26,1 @@
JOIN vn2008.Facturas f ON f.Id_Factura = t.Factura
WHERE year(f.Fecha) = vYear
AND month(f.Fecha) = vMonth;
JOIN vn.invoiceOut f ON f.id = t.Factura
modificar alias
@ -16,3 +16,1 @@
JOIN vn2008.Facturas f ON f.Id_Factura = t.Factura
WHERE year(f.Fecha) = vYear
AND month(f.Fecha) = vMonth;
JOIN vn.invoiceOut f ON f.id = t.Factura
modificar alias
@ -27,3 +27,1 @@
(SELECT DISTINCT tm.yearMonth, f.Id_Cliente , 1 as Compra
FROM vn2008.Facturas f
JOIN vn2008.time tm ON tm.date = f.Fecha
(SELECT DISTINCT tm.yearMonth, f.clientFk Id_Cliente , 1 as Compra
alias f?
@ -36,3 +36,1 @@
(SELECT MIN(tm.yearMonth) firstMonth, f.Id_Cliente
FROM vn2008.Facturas f
JOIN vn2008.time tm ON tm.date = f.Fecha
(SELECT MIN(tm.yearMonth) firstMonth, f.clientFk Id_Cliente
modificar alias
@ -49,3 +49,1 @@
SELECT MAX(tm.yearMonth) firstMonth, f.Id_Cliente
FROM vn2008.Facturas f
JOIN vn2008.time tm ON tm.date = f.Fecha
SELECT MAX(tm.yearMonth) firstMonth, f.clientFk Id_Cliente
modificar alias
@ -51,2 +50,2 @@
FROM Facturas f
JOIN Clientes c using(Id_Cliente)
SELECT d.companyFk, f.clientFk Id_Cliente, - f.amount
FROM vn.invoiceOut f
modificar alias
@ -23,2 +21,2 @@
JOIN Clientes c ON f.Id_Cliente = c.Id_Cliente
WHERE f.Id_Cliente = vCustomer
SELECT vn.getDueDate(f.issued,c.Vencimiento), - Importe
FROM vn.invoiceOut f
modificar alias