diff --git a/client/client/src/address-create/address-create.html b/client/client/src/address-create/address-create.html
index 712a771de..3d66656ae 100644
--- a/client/client/src/address-create/address-create.html
+++ b/client/client/src/address-create/address-create.html
@@ -33,7 +33,8 @@
url="/client/api/AgencyModes"
show-field="name"
value-field="id"
- label="Agency">
+ label="Agency"
+ where="{isActive: {neq: '0'}}">
diff --git a/services/db/changes/1.0.2/07-agencyMode.sql b/services/db/changes/1.0.2/07-agencyMode.sql
new file mode 100644
index 000000000..268288135
--- /dev/null
+++ b/services/db/changes/1.0.2/07-agencyMode.sql
@@ -0,0 +1,22 @@
+USE `vn`;
+CREATE
+ OR REPLACE ALGORITHM = UNDEFINED
+ DEFINER = `root`@`%`
+ SQL SECURITY DEFINER
+VIEW `agencyMode` AS
+ SELECT
+ `a`.`Id_Agencia` AS `id`,
+ `a`.`Agencia` AS `name`,
+ `a`.`description` AS `description`,
+ `a`.`Vista` AS `deliveryMethodFk`,
+ `a`.`m3` AS `m3`,
+ `a`.`cod71` AS `cod71`,
+ `a`.`web` AS `web`,
+ `a`.`agency_id` AS `agencyFk`,
+ `a`.`agency_service_id` AS `agencyServiceFk`,
+ `a`.`inflacion` AS `inflation`,
+ `a`.`is_volumetric` AS `isVolumetric`,
+ `a`.`send_mail` AS `reportMail`,
+ `a`.`tpv` AS `isActive`
+ FROM
+ `vn2008`.`Agencias` `a`;
diff --git a/services/loopback/common/models/agency-mode.json b/services/loopback/common/models/agency-mode.json
index d29695ae3..86473cc5e 100644
--- a/services/loopback/common/models/agency-mode.json
+++ b/services/loopback/common/models/agency-mode.json
@@ -28,6 +28,9 @@
},
"reportMail": {
"type": "string"
+ },
+ "isActive":{
+ "type": "Number"
}
},
"relations": {