feat: refs #7039 country #2361

Merged
robert merged 18 commits from 7039-country-country into dev 2024-05-14 08:12:14 +00:00
7 changed files with 7 additions and 6 deletions
Showing only changes of commit 7899cf230e - Show all commits

View File

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

View File

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

View File

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

View File

@ -43,7 +43,7 @@ BEGIN
INSERT INTO stockBuyed(buyed, dated, description)
SELECT SUM(ic.cm3 * ito.quantity / vc.palletM3 / 1000000),
vDated,
IF(c.code = 'ES', p.name, c.country) destiny
IF(c.code = 'ES', p.name, c.name) destiny
FROM itemTicketOut ito
JOIN ticket t ON t.id = ito.ticketFk
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`
AS SELECT `t`.`nickname` AS `Cliente`,
`p`.`name` AS `Provincia`,
`c`.`country` AS `Pais`,
`c`.`name` AS `Pais`,
cast(sum(`sv`.`volume`) AS decimal(5, 1)) AS `volume`
FROM (
(

View File

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

View File

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