From c12a2ceec9f4d5e02beae6910d05f75072438097 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Tue, 4 May 2021 11:53:47 +0200 Subject: [PATCH 1/5] instructions added to sepa core report --- .../reports/sepa-core/assets/css/style.css | 12 +++++++++++ .../templates/reports/sepa-core/locale/es.yml | 7 ++++++- .../templates/reports/sepa-core/locale/fr.yml | 7 ++++++- .../templates/reports/sepa-core/locale/pt.yml | 7 ++++++- .../reports/sepa-core/sepa-core.html | 20 +++++++++++++++++++ 5 files changed, 50 insertions(+), 3 deletions(-) diff --git a/print/templates/reports/sepa-core/assets/css/style.css b/print/templates/reports/sepa-core/assets/css/style.css index 89d458332..157ea59af 100644 --- a/print/templates/reports/sepa-core/assets/css/style.css +++ b/print/templates/reports/sepa-core/assets/css/style.css @@ -13,3 +13,15 @@ .wide { width: 900px !important } + +.content { + position: absolute; + margin-top: -200px; + height: 400px; + top: 50% +} + +p { + font-size: 1.2em; + margin: 0 +} diff --git a/print/templates/reports/sepa-core/locale/es.yml b/print/templates/reports/sepa-core/locale/es.yml index ac2d4d72f..bb9cc4e49 100644 --- a/print/templates/reports/sepa-core/locale/es.yml +++ b/print/templates/reports/sepa-core/locale/es.yml @@ -39,4 +39,9 @@ client: order: Ord. domiciliación {0} Francia: Francia España: España -Portugal: Portugal \ No newline at end of file +Portugal: Portugal +instructions: + title: Instrucciones + accountFields: Rellenar los campos relativos a la cuenta bancaria + signDocument: Firmar y sellar el documento. Para que tenga validez, en el sello debe aparecer el CIF/NIF. De no ser así, deberá acompañarse la solicitud de un certificado de titularidad de la cuenta. + thanks: ¡Gracias por su colaboración! \ No newline at end of file diff --git a/print/templates/reports/sepa-core/locale/fr.yml b/print/templates/reports/sepa-core/locale/fr.yml index bb213d93e..45a9039ea 100644 --- a/print/templates/reports/sepa-core/locale/fr.yml +++ b/print/templates/reports/sepa-core/locale/fr.yml @@ -36,4 +36,9 @@ client: order: Réf. mandat {0} Francia: France España: Espagne -Portugal: Portugal \ No newline at end of file +Portugal: Portugal +instructions: + title: instructions + accountFields: Remplissez les champs relatifs au compte bancaire + signDocument: Signez et scellez le document. Pour être valide, le CIF / NIF doit apparaître sur le cachet. Sinon, la demande de certificat de propriété du compte doit être jointe. + thanks: Merci de votre collaboration! \ No newline at end of file diff --git a/print/templates/reports/sepa-core/locale/pt.yml b/print/templates/reports/sepa-core/locale/pt.yml index b98cb5211..e7127d06b 100644 --- a/print/templates/reports/sepa-core/locale/pt.yml +++ b/print/templates/reports/sepa-core/locale/pt.yml @@ -39,4 +39,9 @@ client: order: Referência da ordem {0} Francia: França España: Espanha -Portugal: Portugal \ No newline at end of file +Portugal: Portugal +instructions: + title: instruções + accountFields: Preencha os campos relacionados à conta bancária + signDocument: Assine e lacre o documento. Para ser válido, o CIF / NIF deve constar no selo. Caso contrário, o pedido de um certificado de propriedade da conta deve ser anexado. + thanks: Obrigado pela sua cooperação! \ No newline at end of file diff --git a/print/templates/reports/sepa-core/sepa-core.html b/print/templates/reports/sepa-core/sepa-core.html index e0f8f03bc..c935bc2a8 100644 --- a/print/templates/reports/sepa-core/sepa-core.html +++ b/print/templates/reports/sepa-core/sepa-core.html @@ -5,6 +5,26 @@ + + + +
+
+
+

{{$t('instructions.title')}}

+

+ 1. {{$t('instructions.accountFields')}} +

+

+ 2. {{$t('instructions.signDocument')}} +

+

+ {{$t('instructions.thanks')}} +

+
+
+
+ From 245243aa147aa8a52cb2804ad04051a98208754c Mon Sep 17 00:00:00 2001 From: carlosjr Date: Wed, 5 May 2021 13:36:54 +0200 Subject: [PATCH 2/5] routes without vehicle or vehicles without drop off now throw --- .../back/methods/route/getDeliveryPoint.js | 7 ++-- modules/route/front/tickets/index.html | 42 ++++++++++--------- modules/route/front/tickets/index.js | 15 ++++--- modules/route/front/tickets/locale/es.yml | 4 +- 4 files changed, 39 insertions(+), 29 deletions(-) diff --git a/modules/route/back/methods/route/getDeliveryPoint.js b/modules/route/back/methods/route/getDeliveryPoint.js index 59b22904f..e5a50805a 100644 --- a/modules/route/back/methods/route/getDeliveryPoint.js +++ b/modules/route/back/methods/route/getDeliveryPoint.js @@ -1,12 +1,12 @@ module.exports = Self => { Self.remoteMethod('getDeliveryPoint', { - description: 'get the deliveryPoint address ', + description: 'get the deliveryPoint address', accessType: 'WRITE', accepts: { arg: 'vehicleId', type: 'number', - required: true, description: 'vehicle id asigned in the route', + required: true, http: {source: 'path'} }, returns: { @@ -21,8 +21,9 @@ module.exports = Self => { Self.getDeliveryPoint = async vehicleId => { let vehicle = await Self.app.models.Vehicle.findById(vehicleId); - let deliveryPoint = await Self.app.models.DeliveryPoint.findById(vehicle.deliveryPointFk); + if (!vehicle.deliveryPointFk) return; + let deliveryPoint = await Self.app.models.DeliveryPoint.findById(vehicle.deliveryPointFk); return deliveryPoint.ubication; }; diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 92a112747..3c4bb439b 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -5,9 +5,10 @@ data="$ctrl.tickets" auto-load="true"> - +
- + - + @@ -31,14 +32,14 @@ model="model"> - Order - Ticket + Order + Street + City + PC Client Packages - Warehouse - PC - Street + Ticket @@ -50,21 +51,18 @@ ng-model="ticket.checked"> - + + class="dense" + display-controls=true> - - - {{ticket.id}} - - + {{ticket.address.street}} + {{ticket.address.city}} + {{ticket.address.postalCode}} {{ticket.packages}} {{::ticket.volume | number:1}} - {{ticket.warehouse.name}} - {{ticket.address.postalCode}} - {{ticket.address.street}} + + + {{ticket.id}} + + { - deliveryPointAddress = response.data; - }).then(() => { - addresses = deliveryPointAddress; + if (!response.data) + throw new UserError(`The route's vehicle doesn't have a delivery point`); + + return response.data; + }).then(address => { + let addresses; + if (address) addresses = address; let lines = this.getSelectedItems(this.tickets); let url = 'http://gps.buscalia.com/usuario/localizar.aspx?bmi=true&addr='; diff --git a/modules/route/front/tickets/locale/es.yml b/modules/route/front/tickets/locale/es.yml index 042f5227b..e1abd31b4 100644 --- a/modules/route/front/tickets/locale/es.yml +++ b/modules/route/front/tickets/locale/es.yml @@ -8,4 +8,6 @@ Add ticket: Añadir ticket Tickets to add: Tickets a añadir Ticket not found: No se ha encontrado el ticket The selected ticket is not suitable for this route: El ticket seleccionado no es apto para esta ruta -PC: CP \ No newline at end of file +PC: CP +The route's vehicle doesn't have a delivery point: El vehículo de la ruta no tiene un punto de entrega +The route doesn't have a vehicle: La ruta no tiene un vehículo \ No newline at end of file From 657896bce07bb8d31146e474671abeb57799eeb4 Mon Sep 17 00:00:00 2001 From: carlosjr Date: Mon, 10 May 2021 10:32:00 +0200 Subject: [PATCH 3/5] increased section width --- modules/route/front/tickets/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/route/front/tickets/index.html b/modules/route/front/tickets/index.html index 3c4bb439b..306e4d94a 100644 --- a/modules/route/front/tickets/index.html +++ b/modules/route/front/tickets/index.html @@ -7,7 +7,9 @@ - + Date: Mon, 10 May 2021 10:39:51 +0200 Subject: [PATCH 4/5] transaltion changes --- modules/route/front/tickets/locale/es.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/front/tickets/locale/es.yml b/modules/route/front/tickets/locale/es.yml index e1abd31b4..ebf9be25b 100644 --- a/modules/route/front/tickets/locale/es.yml +++ b/modules/route/front/tickets/locale/es.yml @@ -9,5 +9,5 @@ Tickets to add: Tickets a añadir Ticket not found: No se ha encontrado el ticket The selected ticket is not suitable for this route: El ticket seleccionado no es apto para esta ruta PC: CP -The route's vehicle doesn't have a delivery point: El vehículo de la ruta no tiene un punto de entrega +The route's vehicle doesn't have a delivery point: El vehículo de la ruta no tiene un almacén de salida The route doesn't have a vehicle: La ruta no tiene un vehículo \ No newline at end of file From ac917b6115bbdf6e889a9ae283b90dbb64d4c8ec Mon Sep 17 00:00:00 2001 From: carlosjr Date: Mon, 10 May 2021 10:46:17 +0200 Subject: [PATCH 5/5] mino changes on translations --- modules/route/front/tickets/index.js | 2 +- modules/route/front/tickets/locale/es.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/route/front/tickets/index.js b/modules/route/front/tickets/index.js index 238e80d27..3619335c8 100644 --- a/modules/route/front/tickets/index.js +++ b/modules/route/front/tickets/index.js @@ -56,7 +56,7 @@ class Controller extends Section { this.$http.get(query).then(response => { if (!response.data) - throw new UserError(`The route's vehicle doesn't have a delivery point`); + throw new UserError(`The route's vehicle doesn't have a departing warehouse`); return response.data; }).then(address => { diff --git a/modules/route/front/tickets/locale/es.yml b/modules/route/front/tickets/locale/es.yml index ebf9be25b..6fa29e5ca 100644 --- a/modules/route/front/tickets/locale/es.yml +++ b/modules/route/front/tickets/locale/es.yml @@ -9,5 +9,5 @@ Tickets to add: Tickets a añadir Ticket not found: No se ha encontrado el ticket The selected ticket is not suitable for this route: El ticket seleccionado no es apto para esta ruta PC: CP -The route's vehicle doesn't have a delivery point: El vehículo de la ruta no tiene un almacén de salida +The route's vehicle doesn't have a departing warehouse: El vehículo de la ruta no tiene un almacén de salida The route doesn't have a vehicle: La ruta no tiene un vehículo \ No newline at end of file