feat: refs #7039 country #2361
|
@ -45,7 +45,7 @@ module.exports = Self => {
|
||||||
{'pc.code': {like: `%${value}%`}},
|
{'pc.code': {like: `%${value}%`}},
|
||||||
{'t.name': {like: `%${value}%`}},
|
{'t.name': {like: `%${value}%`}},
|
||||||
{'p.name': {like: `%${value}%`}},
|
{'p.name': {like: `%${value}%`}},
|
||||||
{'c.country': {like: `%${value}%`}}
|
{'c.name': {like: `%${value}%`}}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ module.exports = Self => {
|
||||||
pc.code,
|
pc.code,
|
||||||
t.name as town,
|
t.name as town,
|
||||||
p.name as province,
|
p.name as province,
|
||||||
c.country
|
c.name country
|
||||||
FROM
|
FROM
|
||||||
postCode pc
|
postCode pc
|
||||||
JOIN town t on t.id = pc.townFk
|
JOIN town t on t.id = pc.townFk
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"country": {
|
"name": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -162,7 +162,7 @@ INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
||||||
(4, 'JPY', 'Yen Japones', 1),
|
(4, 'JPY', 'Yen Japones', 1),
|
||||||
(5, 'CNY', 'Yuan Chino', 1.2);
|
(5, 'CNY', 'Yuan Chino', 1.2);
|
||||||
|
|
||||||
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`)
|
INSERT INTO `vn`.`country`(`id`, `name`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 'España', 1, 'ES', 1, 24, 4, 0, 1),
|
(1, 'España', 1, 'ES', 1, 24, 4, 0, 1),
|
||||||
(2, 'Italia', 1, 'IT', 1, 27, 4, 0, 1),
|
(2, 'Italia', 1, 'IT', 1, 27, 4, 0, 1),
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -5,14 +5,17 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_afterInsert`
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE sage.Naciones
|
UPDATE sage.Naciones
|
||||||
SET countryFk = NEW.id
|
SET countryFk = NEW.id
|
||||||
WHERE Nacion = NEW.country;
|
WHERE Nacion = NEW.name;
|
||||||
|
|
||||||
IF ROW_COUNT() = 0 THEN
|
IF ROW_COUNT() = 0 THEN
|
||||||
CALL mail_insert(
|
CALL mail_insert(
|
||||||
'cau@verdnatura.es',
|
'cau@verdnatura.es',
|
||||||
NULL,
|
NULL,
|
||||||
'Actualizar tabla sage.Naciones',
|
'Actualizar tabla sage.Naciones',
|
||||||
CONCAT('Se ha insertado un nuevo país en la tabla vn.conuntry. Para el correcto funcionamiento del sistema \n\t\t\t\tde contabilidad es necesario actualizar la columna sage.Naciones.countryFk con el valor del nuevo país. \n\t\t\t Hay que buscar el nuevo país: ', NEW.country, ' en la tabla sage.Naciones y actualizar el campo sage.Naciones.countryFk con el valor ', NEW.id)
|
CONCAT('Se ha insertado un nuevo país en la tabla vn.conuntry.
|
||||||
|
Para el correcto funcionamiento del sistema \n\t\t\t\tde contabilidad es necesario actualizar la columna
|
||||||
|
sage.Naciones.countryFk con el valor del nuevo país. \n\t\t\t Hay que buscar el nuevo país: ', NEW.name,
|
||||||
|
' en la tabla sage.Naciones y actualizar el campo sage.Naciones.countryFk con el valor ', NEW.id)
|
||||||
);
|
);
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -3,8 +3,8 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_afterUpdate`
|
||||||
AFTER UPDATE ON `country`
|
AFTER UPDATE ON `country`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
IF !(OLD.country <=> NEW.country) THEN
|
IF !(OLD.name <=> NEW.name) THEN
|
||||||
UPDATE zoneGeo SET `name` = NEW.country
|
UPDATE zoneGeo SET `name` = NEW.name
|
||||||
WHERE id = NEW.geoFk;
|
WHERE id = NEW.geoFk;
|
||||||
END IF;
|
END IF;
|
||||||
END$$
|
END$$
|
||||||
|
|
|
@ -3,6 +3,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`country_beforeInsert`
|
||||||
BEFORE INSERT ON `country`
|
BEFORE INSERT ON `country`
|
||||||
FOR EACH ROW
|
FOR EACH ROW
|
||||||
BEGIN
|
BEGIN
|
||||||
SET NEW.geoFk = zoneGeo_new('country', NEW.country, NULL);
|
SET NEW.geoFk = zoneGeo_new('country', NEW.name, NULL);
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -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 (
|
||||||
(
|
(
|
||||||
|
|
|
@ -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`,
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE vn.country CHANGE country name varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.country ADD COLUMN country VARCHAR(25) AS (name) VIRTUAL;
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
ng-model="$ctrl.data.countryFk"
|
ng-model="$ctrl.data.countryFk"
|
||||||
url="Countries"
|
url="Countries"
|
||||||
fields="['id', 'country', 'code']"
|
fields="['id', 'country', 'code']"
|
||||||
show-field="country"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
label="Country">
|
label="Country">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
|
|
@ -123,7 +123,7 @@ module.exports = Self => {
|
||||||
c.hasLcr,
|
c.hasLcr,
|
||||||
c.hasCoreVnl,
|
c.hasCoreVnl,
|
||||||
ct.id AS countryFk,
|
ct.id AS countryFk,
|
||||||
ct.country,
|
ct.name country,
|
||||||
p.id AS provinceFk,
|
p.id AS provinceFk,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
u.id AS salesPersonFk,
|
u.id AS salesPersonFk,
|
||||||
|
|
|
@ -69,7 +69,7 @@ module.exports = Self => {
|
||||||
uw.name workerName,
|
uw.name workerName,
|
||||||
c.creditInsurance,
|
c.creditInsurance,
|
||||||
d.defaulterSinced,
|
d.defaulterSinced,
|
||||||
cn.country,
|
cn.name country,
|
||||||
c.countryFk,
|
c.countryFk,
|
||||||
pm.name payMethod
|
pm.name payMethod
|
||||||
FROM vn.defaulter d
|
FROM vn.defaulter d
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -83,7 +83,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-autocomplete vn-id="province" vn-one
|
<vn-autocomplete vn-id="province" vn-one
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-autocomplete vn-id="province" vn-one
|
<vn-autocomplete vn-id="province" vn-one
|
||||||
|
@ -107,7 +107,7 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<span ng-show="::address.postalCode">{{::address.postalCode}} -</span>
|
<span ng-show="::address.postalCode">{{::address.postalCode}} -</span>
|
||||||
<span ng-show="::address.city">{{::address.city}},</span>
|
<span ng-show="::address.city">{{::address.city}},</span>
|
||||||
<span ng-show="::address.province.name">{{::address.province.name}},</span>
|
<span ng-show="::address.province.name">{{::address.province.name}},</span>
|
||||||
{{::address.province.country.country}}
|
{{::address.province.country.name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ellipsize">
|
<div class="ellipsize">
|
||||||
{{::address.phone}}<span ng-if="::address.mobile">, </span>
|
{{::address.phone}}<span ng-if="::address.mobile">, </span>
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -101,14 +101,14 @@
|
||||||
url="Provinces/location"
|
url="Provinces/location"
|
||||||
fields="['id', 'name', 'countryFk']"
|
fields="['id', 'name', 'countryFk']"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-id="country"
|
vn-id="country"
|
||||||
label="Country"
|
label="Country"
|
||||||
ng-model="$ctrl.client.countryFk"
|
ng-model="$ctrl.client.countryFk"
|
||||||
url="Countries"
|
url="Countries"
|
||||||
show-field="country">
|
show-field="name">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
url="Countries"
|
url="Countries"
|
||||||
data="countries"
|
data="countries"
|
||||||
order="country">
|
order="name">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -126,14 +126,14 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
vn-id="country"
|
vn-id="country"
|
||||||
ng-model="$ctrl.client.countryFk"
|
ng-model="$ctrl.client.countryFk"
|
||||||
data="countries"
|
data="countries"
|
||||||
show-field="country"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
label="Country"
|
label="Country"
|
||||||
rule>
|
rule>
|
||||||
|
|
|
@ -104,7 +104,7 @@
|
||||||
value="{{$ctrl.summary.province.name}}">
|
value="{{$ctrl.summary.province.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Country"
|
<vn-label-value label="Country"
|
||||||
value="{{$ctrl.summary.country.country}}">
|
value="{{$ctrl.summary.country.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value label="Street" no-ellipsize
|
<vn-label-value label="Street" no-ellipsize
|
||||||
value="{{$ctrl.summary.street}}">
|
value="{{$ctrl.summary.street}}">
|
||||||
|
|
|
@ -59,7 +59,7 @@ module.exports = Self => {
|
||||||
`CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
`CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
SELECT co.code company,
|
SELECT co.code company,
|
||||||
cou.country,
|
cou.name country,
|
||||||
robert marked this conversation as resolved
Outdated
guillermo
commented
Quitar el AS Quitar el AS
|
|||||||
c.id clientId,
|
c.id clientId,
|
||||||
c.socialName clientSocialName,
|
c.socialName clientSocialName,
|
||||||
u.nickname workerSocialName,
|
u.nickname workerSocialName,
|
||||||
|
|
|
@ -181,7 +181,7 @@
|
||||||
ng-show="!$ctrl.isBuyer && !$ctrl.isAdministrative">
|
ng-show="!$ctrl.isBuyer && !$ctrl.isAdministrative">
|
||||||
Tax
|
Tax
|
||||||
</h4>
|
</h4>
|
||||||
<vn-label-value label="{{tax.country.country}}"
|
<vn-label-value label="{{tax.country.name}}"
|
||||||
ng-repeat="tax in $ctrl.summary.item.taxes"
|
ng-repeat="tax in $ctrl.summary.item.taxes"
|
||||||
value="{{tax.taxClass.description}}">
|
value="{{tax.taxClass.description}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
vn-one
|
vn-one
|
||||||
label="Country"
|
label="Country"
|
||||||
ng-model="tax.country.country"
|
ng-model="tax.country.name"
|
||||||
disabled="true">
|
disabled="true">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
|
|
|
@ -103,7 +103,7 @@ module.exports = Self => {
|
||||||
SELECT t.cmrFk,
|
SELECT t.cmrFk,
|
||||||
t.id ticketFk,
|
t.id ticketFk,
|
||||||
t.routeFk,
|
t.routeFk,
|
||||||
co.country,
|
co.name country,
|
||||||
robert marked this conversation as resolved
Outdated
guillermo
commented
Quitar el AS Quitar el AS
|
|||||||
t.clientFk,
|
t.clientFk,
|
||||||
IF(sub.id, TRUE, FALSE) hasCmrDms,
|
IF(sub.id, TRUE, FALSE) hasCmrDms,
|
||||||
DATE(t.shipped) shipped
|
DATE(t.shipped) shipped
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-autocomplete vn-id="province" vn-one
|
<vn-autocomplete vn-id="province" vn-one
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-autocomplete vn-id="province" vn-one
|
<vn-autocomplete vn-id="province" vn-one
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
url="Countries"
|
url="Countries"
|
||||||
data="countries"
|
data="countries"
|
||||||
order="country">
|
order="name">
|
||||||
</vn-crud-model>
|
</vn-crud-model>
|
||||||
<vn-crud-model
|
<vn-crud-model
|
||||||
auto-load="true"
|
auto-load="true"
|
||||||
|
@ -143,7 +143,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
|
@ -187,7 +187,7 @@
|
||||||
show-field="name"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
vn-name="country"
|
vn-name="country"
|
||||||
ng-model="$ctrl.supplier.countryFk"
|
ng-model="$ctrl.supplier.countryFk"
|
||||||
data="countries"
|
data="countries"
|
||||||
show-field="country"
|
show-field="name"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
rule>
|
rule>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
|
|
@ -162,7 +162,7 @@
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Country"
|
label="Country"
|
||||||
value="{{::$ctrl.summary.country.country}}">
|
value="{{::$ctrl.summary.country.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{code}} - {{town.name}} ({{town.province.name}},
|
{{code}} - {{town.name}} ({{town.province.name}},
|
||||||
{{town.province.country.country}})
|
{{town.province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
<append>
|
<append>
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
url="Provinces/location"
|
url="Provinces/location"
|
||||||
fields="['id', 'name', 'countryFk']"
|
fields="['id', 'name', 'countryFk']"
|
||||||
rule>
|
rule>
|
||||||
<tpl-item>{{name}} ({{country.country}})</tpl-item>
|
<tpl-item>{{name}} ({{country.name}})</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
value-field="name">
|
value-field="name">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
{{name}}, {{province.name}}
|
{{name}}, {{province.name}}
|
||||||
({{province.country.country}})
|
({{province.country.name}})
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-datalist>
|
</vn-datalist>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
{{code}} {{town.name}}
|
{{code}} {{town.name}}
|
||||||
</div>
|
</div>
|
||||||
<div class="text-caption text-secondary">
|
<div class="text-caption text-secondary">
|
||||||
{{town.province.name}}, {{town.province.country.country}}
|
{{town.province.name}}, {{town.province.country.name}}
|
||||||
</div>
|
</div>
|
||||||
</tpl-item>
|
</tpl-item>
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
|
|
@ -6,7 +6,7 @@ SELECT
|
||||||
c.id,
|
c.id,
|
||||||
c.name AS clientName,
|
c.name AS clientName,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
co.country
|
co.name country
|
||||||
FROM client c
|
FROM client c
|
||||||
JOIN province p ON c.provinceFk = p.id
|
JOIN province p ON c.provinceFk = p.id
|
||||||
JOIN country co ON c.countryFk = co.id
|
JOIN country co ON c.countryFk = co.id
|
||||||
|
|
|
@ -8,7 +8,7 @@ SELECT
|
||||||
a.street,
|
a.street,
|
||||||
a.nickname,
|
a.nickname,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
ct.country,
|
ct.name country,
|
||||||
IFNULL(c.phone, cc.phone) AS phone
|
IFNULL(c.phone, cc.phone) AS phone
|
||||||
FROM claim cl
|
FROM claim cl
|
||||||
JOIN client c ON c.id = cl.clientFk
|
JOIN client c ON c.id = cl.clientFk
|
||||||
|
|
|
@ -6,7 +6,7 @@ SELECT
|
||||||
c.city,
|
c.city,
|
||||||
c.fi,
|
c.fi,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
ct.country
|
ct.name country
|
||||||
FROM client c
|
FROM client c
|
||||||
JOIN country ct ON ct.id = c.countryFk
|
JOIN country ct ON ct.id = c.countryFk
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
LEFT JOIN province p ON p.id = c.provinceFk
|
||||||
|
|
|
@ -14,12 +14,12 @@ SELECT c.id cmrFk,
|
||||||
s.street carrierStreet,
|
s.street carrierStreet,
|
||||||
s.postCode carrierPostCode,
|
s.postCode carrierPostCode,
|
||||||
s.city carrierCity,
|
s.city carrierCity,
|
||||||
cou.country carrierCountry,
|
cou.name carrierCountry,
|
||||||
s2.name senderName,
|
s2.name senderName,
|
||||||
s2.street senderStreet,
|
s2.street senderStreet,
|
||||||
s2.postCode senderPostCode,
|
s2.postCode senderPostCode,
|
||||||
s2.city senderCity,
|
s2.city senderCity,
|
||||||
cou2.country senderCountry,
|
cou2.name senderCountry,
|
||||||
a.street deliveryStreet,
|
a.street deliveryStreet,
|
||||||
a.id deliveryAddressFk,
|
a.id deliveryAddressFk,
|
||||||
a.postalCode deliveryPostalCode,
|
a.postalCode deliveryPostalCode,
|
||||||
|
@ -27,12 +27,12 @@ SELECT c.id cmrFk,
|
||||||
a.nickname deliveryName,
|
a.nickname deliveryName,
|
||||||
a.phone deliveryPhone,
|
a.phone deliveryPhone,
|
||||||
a.mobile deliveryMobile,
|
a.mobile deliveryMobile,
|
||||||
cou3.country deliveryCountry,
|
cou3.name deliveryCountry,
|
||||||
cl.phone clientPhone,
|
cl.phone clientPhone,
|
||||||
a2.street loadStreet,
|
a2.street loadStreet,
|
||||||
a2.postalCode loadPostalCode,
|
a2.postalCode loadPostalCode,
|
||||||
a2.city loadCity,
|
a2.city loadCity,
|
||||||
cou4.country loadCountry,
|
cou4.name loadCountry,
|
||||||
co.stamp senderStamp,
|
co.stamp senderStamp,
|
||||||
s.stamp deliveryStamp
|
s.stamp deliveryStamp
|
||||||
FROM cmr c
|
FROM cmr c
|
||||||
|
|
|
@ -4,7 +4,7 @@ SELECT
|
||||||
c.name,
|
c.name,
|
||||||
c.fi,
|
c.fi,
|
||||||
c.street,
|
c.street,
|
||||||
cty.country
|
cty.name country
|
||||||
robert marked this conversation as resolved
Outdated
guillermo
commented
Quitar AS Quitar AS
|
|||||||
FROM client c
|
FROM client c
|
||||||
JOIN country cty ON cty.id = c.countryFk
|
JOIN country cty ON cty.id = c.countryFk
|
||||||
WHERE c.id = ?
|
WHERE c.id = ?
|
|
@ -6,7 +6,7 @@ SELECT
|
||||||
c.city,
|
c.city,
|
||||||
c.fi,
|
c.fi,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
ct.country
|
ct.name country
|
||||||
FROM client c
|
FROM client c
|
||||||
JOIN country ct ON ct.id = c.countryFk
|
JOIN country ct ON ct.id = c.countryFk
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
LEFT JOIN province p ON p.id = c.provinceFk
|
||||||
|
|
|
@ -7,7 +7,7 @@ SELECT
|
||||||
c.city,
|
c.city,
|
||||||
c.fi,
|
c.fi,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
ct.country,
|
ct.name country,
|
||||||
ct.code AS countryCode,
|
ct.code AS countryCode,
|
||||||
ct.ibanLength AS ibanLength
|
ct.ibanLength AS ibanLength
|
||||||
FROM client c
|
FROM client c
|
||||||
|
|
|
@ -2,7 +2,7 @@ SELECT
|
||||||
m.code mandateCode,
|
m.code mandateCode,
|
||||||
s.name,
|
s.name,
|
||||||
s.street,
|
s.street,
|
||||||
sc.country,
|
sc.name country,
|
||||||
robert marked this conversation as resolved
Outdated
guillermo
commented
Quitar AS Quitar AS
|
|||||||
s.postCode,
|
s.postCode,
|
||||||
s.city,
|
s.city,
|
||||||
sp.name province,
|
sp.name province,
|
||||||
|
|
|
@ -5,7 +5,7 @@ SELECT
|
||||||
s.id,
|
s.id,
|
||||||
s.name AS supplierName,
|
s.name AS supplierName,
|
||||||
p.name AS province,
|
p.name AS province,
|
||||||
co.country
|
co.name country
|
||||||
robert marked this conversation as resolved
Outdated
guillermo
commented
Quitar AS Quitar AS
|
|||||||
FROM supplier s
|
FROM supplier s
|
||||||
JOIN province p ON s.provinceFk = p.id
|
JOIN province p ON s.provinceFk = p.id
|
||||||
JOIN country co ON s.countryFk = co.id
|
JOIN country co ON s.countryFk = co.id
|
||||||
|
|
Loading…
Reference in New Issue
Per que fas aço?