refactor: refs #7252 Deprecated vn.deliveryNote.farmingFk #2429

Merged
guillermo merged 2 commits from 7252-deliveryNoteFarmingFk into dev 2024-05-15 08:19:36 +00:00
4 changed files with 2 additions and 53 deletions

View File

@ -1,22 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`exchangeReportSource`
AS SELECT `e`.`dated` AS `dated`,
cast(sum(`e`.`amountIn`) AS decimal(10, 2)) AS `amountIn`,
cast(sum(`e`.`rateIn`) AS decimal(10, 4)) AS `rateIn`,
cast(sum(`e`.`amountOut`) AS decimal(10, 2)) AS `amountOut`,
cast(sum(`e`.`rateOut`) AS decimal(10, 4)) AS `rateOut`,
cast(sum(`e`.`amountEntry`) AS decimal(10, 2)) AS `amountEntry`,
cast(sum(`e`.`rateEntry`) AS decimal(10, 4)) AS `rateEntry`,
cast(
IFNULL(`rr`.`value`, `rrc`.`simulatedValue`) AS decimal(10, 4)
) AS `rateECB`
FROM (
(
`vn`.`exchangeReportSourcePrevious` `e`
LEFT JOIN `vn`.`referenceRate` `rr` ON(`rr`.`dated` = `e`.`dated`)
)
JOIN `vn`.`referenceRateConfig` `rrc` ON(1)
)
GROUP BY `e`.`dated`
ORDER BY `e`.`dated`

View File

@ -1,29 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`exchangeReportSourcePrevious`
AS SELECT `exchangeInsuranceIn`.`dated` AS `dated`,
`exchangeInsuranceIn`.`amount` AS `amountIn`,
`exchangeInsuranceIn`.`rate` AS `rateIn`,
0.00 AS `amountOut`,
0.00 AS `rateOut`,
0.00 AS `amountEntry`,
0.00 AS `rateEntry`
FROM `vn`.`exchangeInsuranceIn`
UNION ALL
SELECT `exchangeInsuranceOut`.`received` AS `received`,
0.00 AS `amountIn`,
0.00 AS `ratedIn`,
`exchangeInsuranceOut`.`divisa` AS `amountOut`,
`exchangeInsuranceOut`.`rate` AS `ratedOut`,
0.00 AS `amountEntry`,
0.00 AS `rateEntry`
FROM `vn`.`exchangeInsuranceOut`
UNION ALL
SELECT `exchangeInsuranceEntry`.`dated` AS `dated`,
0.00 AS `amountIn`,
0.00 AS `ratedIn`,
0.00 AS `amountOut`,
0.00 AS `ratedOut`,
`exchangeInsuranceEntry`.`Dolares` AS `amountEntry`,
`exchangeInsuranceEntry`.`rate` AS `rateEntry`
FROM `vn`.`exchangeInsuranceEntry`

View File

@ -14,6 +14,5 @@ AS SELECT `dn`.`id` AS `albaran_id`,
`dn`.`workerFk` AS `Id_Trabajador`,
`dn`.`supervisorFk` AS `Id_Responsable`,
`dn`.`departmentFk` AS `department_id`,
`dn`.`invoiceInFk` AS `recibida_id`,
`dn`.`farmingFk` AS `farmingFk`
`dn`.`invoiceInFk` AS `recibida_id`
FROM `vn`.`deliveryNote` `dn`

View File

@ -0,0 +1 @@
ALTER TABLE vn.deliveryNote CHANGE farmingFk farmingFk__ int(10) unsigned DEFAULT NULL NULL;