feat: refs #7039 country
gitea/salix/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Robert Ferrús 2024-04-24 09:05:29 +02:00
parent 8439125655
commit 7899cf230e
7 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,7 @@ BEGIN
DECLARE vEnded DATETIME DEFAULT util.dayEnd(util.VN_CURDATE()); DECLARE vEnded DATETIME DEFAULT util.dayEnd(util.VN_CURDATE());
SELECT ag.id agency_id, SELECT ag.id agency_id,
CONCAT(RPAD(c.country, 16,' _') ,' ',ag.name) Agencia, CONCAT(RPAD(c.name, 16,' _') ,' ',ag.name) Agencia,
COUNT(*) expediciones, COUNT(*) expediciones,
SUM(t.packages) Bultos, SUM(t.packages) Bultos,
SUM(tpe.boxes) Faltan SUM(tpe.boxes) Faltan

View File

@ -22,7 +22,7 @@ BEGIN
c.credit, c.credit,
CAST(r.risk AS DECIMAL (10,2)) risk, CAST(r.risk AS DECIMAL (10,2)) risk,
CAST(c.credit - r.risk AS DECIMAL (10,2)) difference, CAST(c.credit - r.risk AS DECIMAL (10,2)) difference,
co.country co.name country
FROM client c FROM client c
JOIN tmp.risk r ON r.clientFk = c.id JOIN tmp.risk r ON r.clientFk = c.id
JOIN country co ON co.id = c.countryFk JOIN country co ON co.id = c.countryFk

View File

@ -27,7 +27,7 @@ BEGIN
cac.invoiced billedAnnually, cac.invoiced billedAnnually,
c.dueDay, c.dueDay,
cgd.grade, cgd.grade,
c2.country c2.name country
FROM tmp.clientGetDebt cgd FROM tmp.clientGetDebt cgd
LEFT JOIN tmp.risk r ON r.clientFk = cgd.clientFk LEFT JOIN tmp.risk r ON r.clientFk = cgd.clientFk
JOIN client c ON c.id = cgd.clientFk JOIN client c ON c.id = cgd.clientFk

View File

@ -43,7 +43,7 @@ BEGIN
INSERT INTO stockBuyed(buyed, dated, description) INSERT INTO stockBuyed(buyed, dated, description)
SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000), SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000),
vDated, vDated,
IF(c.code = 'ES', p.name, c.country) destiny IF(c.code = 'ES', p.name, c.name) destiny
FROM itemTicketOut ito FROM itemTicketOut ito
JOIN ticket t ON t.id = ito.ticketFk JOIN ticket t ON t.id = ito.ticketFk
JOIN `address` a ON a.id = t.addressFk JOIN `address` a ON a.id = t.addressFk

View File

@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
VIEW `vn`.`saleVolume_Today_VNH` VIEW `vn`.`saleVolume_Today_VNH`
AS SELECT `t`.`nickname` AS `Cliente`, AS SELECT `t`.`nickname` AS `Cliente`,
`p`.`name` AS `Provincia`, `p`.`name` AS `Provincia`,
`c`.`country` AS `Pais`, `c`.`name` AS `Pais`,
cast(sum(`sv`.`volume`) AS decimal(5, 1)) AS `volume` cast(sum(`sv`.`volume`) AS decimal(5, 1)) AS `volume`
FROM ( FROM (
( (

View File

@ -2,7 +2,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER SQL SECURITY DEFINER
VIEW `vn2008`.`Paises` VIEW `vn2008`.`Paises`
AS SELECT `c`.`id` AS `Id`, AS SELECT `c`.`id` AS `Id`,
`c`.`country` AS `Pais`, `c`.`name` AS `Pais`,
`c`.`CEE` AS `CEE`, `c`.`CEE` AS `CEE`,
`c`.`isUeeMember` AS `isUeeMember`, `c`.`isUeeMember` AS `isUeeMember`,
`c`.`code` AS `Codigo`, `c`.`code` AS `Codigo`,

View File

@ -0,0 +1 @@
-- Place your SQL code here