Merge pull request 'refactor: refs #7252 Deprecated vn.deliveryNote.farmingFk' (!2429) from 7252-deliveryNoteFarmingFk into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #2429 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
778f368300
|
@ -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`
|
|
@ -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`
|
|
@ -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`
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE vn.deliveryNote CHANGE farmingFk farmingFk__ int(10) unsigned DEFAULT NULL NULL;
|
Loading…
Reference in New Issue