From 7b246b1bacb6d8501b9cb8fa5c77d66610081ae0 Mon Sep 17 00:00:00 2001
From: carlossa
Date: Thu, 21 Sep 2023 13:15:00 +0200
Subject: [PATCH 1/7] refs #5768 trad choose address
---
modules/client/front/sample/create/index.html | 17 +++++++++---
.../incoterms-authorization.html | 3 ++-
.../incoterms-authorization.js | 3 +++
.../incoterms-authorization/locale/es.yml | 27 +++++++++----------
.../incoterms-authorization/locale/pt.yml | 21 +++++++--------
5 files changed, 40 insertions(+), 31 deletions(-)
diff --git a/modules/client/front/sample/create/index.html b/modules/client/front/sample/create/index.html
index 5df2b29ef..7d6cab673 100644
--- a/modules/client/front/sample/create/index.html
+++ b/modules/client/front/sample/create/index.html
@@ -8,9 +8,9 @@
auto-load="true"
url="Samples/visible"
fields="[
- 'id',
+ 'id',
'code',
- 'description',
+ 'description',
'model',
'hasCompany',
'hasPreview',
@@ -65,7 +65,16 @@
model="ClientSample.companyFk"
data="companiesData"
show-field="code"
- label="Company"
+ label="Company"
+ ng-if="sampleType.selection.hasCompany"
+ required="true">
+
+
@@ -85,7 +94,7 @@
diff --git a/print/templates/reports/incoterms-authorization/incoterms-authorization.js b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
index 53425487e..0fbbd10d2 100755
--- a/print/templates/reports/incoterms-authorization/incoterms-authorization.js
+++ b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
@@ -17,6 +17,9 @@ module.exports = {
companyId: {
type: Number,
required: true
+ },
+ address: {
+ type: String
}
}
};
diff --git a/print/templates/reports/incoterms-authorization/locale/es.yml b/print/templates/reports/incoterms-authorization/locale/es.yml
index 6936ebda9..8bdce7085 100644
--- a/print/templates/reports/incoterms-authorization/locale/es.yml
+++ b/print/templates/reports/incoterms-authorization/locale/es.yml
@@ -1,28 +1,25 @@
reportName: autorizacion-incoterms
description: '{socialName} una sociedad debidamente constituida con responsabilidad limitada
-y registrada conforme al derecho de sociedades de {country} y aquí representada por
-___________________. {socialName}, con domicilio en {address},
+y registrada conforme al derecho de sociedades de {country} y aquí representada por {socialName}, con domicilio en {address},
CIF {fiscalID}. En adelante denominada {name}.'
issued: 'En {0}, a {1} de {2} de {3}'
client: 'Cliente {0}'
declaration: '{socialName} declara por la presente que:'
declarations:
- - 'Todas las compras realizadas por {socialName} con {companyName} se
-entregan, Ex Works (Incoterms), en el almacén de {companyName} situado en
-{companyCity}.'
- - '{socialName} reconoce que es importante para {companyName} tener
-comprobante de la entrega intracomunitaria de la mercancía a {destinationCountry} para
+ - 'Todas las compras realizadas por {socialName} con {companyName} se entregan según las condiciones definidas en el incoterm {incotermsFk} ({Incoterm description}).'
+ - '{socialName} reconoce que es importante para {companyName} tener
+comprobante de la entrega intracomunitaria de la mercancía a {destinationCountry} para
poder facturar con 0% de IVA.'
- - 'Por tanto, al firmar este acuerdo, {socialName} declara que todos los bienes que
+ - 'Por tanto, al firmar este acuerdo, {socialName} declara que todos los bienes que
se compren a {companyName} serán entregados a {destinationCountry}.'
- - 'Además, {socialName} deberá, a primera solicitud de {companyName},
-proporcionar una prueba de que todos los productos comprados a {companyName} han
+ - 'Además, {socialName} deberá, a primera solicitud de {companyName},
+proporcionar una prueba de que todos los productos comprados a {companyName} han
sido entregados en {destinationCountry}.'
- - 'Además de lo anterior, {companyName} proporcionará a {socialName}
-un resumen mensual en el que se incluyen todas las facturas (y las entregas correspondientes).
-{socialName} firmará y devolverá el resumen mensual a {companyName},
+ - 'Además de lo anterior, {companyName} proporcionará a {socialName}
+un resumen mensual en el que se incluyen todas las facturas (y las entregas correspondientes).
+{socialName} firmará y devolverá el resumen mensual a {companyName},
S.L. dentro de los 5 días posteriores a la recepción del resumen.'
-signer:
+signer:
representative: Representante
representativeRole: Cargo del representante
signed: Fecha de firma
@@ -39,4 +36,4 @@ months:
- 'Septiembre'
- 'Octubre'
- 'Noviembre'
- - 'Diciembre'
\ No newline at end of file
+ - 'Diciembre'
diff --git a/print/templates/reports/incoterms-authorization/locale/pt.yml b/print/templates/reports/incoterms-authorization/locale/pt.yml
index 2d33e6a1a..996c0961e 100644
--- a/print/templates/reports/incoterms-authorization/locale/pt.yml
+++ b/print/templates/reports/incoterms-authorization/locale/pt.yml
@@ -1,28 +1,27 @@
reportName: autorizacion-incoterms
description: '{socialName} uma sociedade devidamente constituída com responsabilidade limitada e registada
-conforme ao direito de sociedades da {country} e aqui representada por
-___________________. {socialName}, com domicílio em {address},
+conforme ao direito de sociedades da {country} e aqui representada por {socialName}, com domicílio em {address},
CIF {fiscalID}. Em adiante denominada {name}.'
issued: 'Em {0}, em {1} de {2} de {3}'
client: 'Cliente {0}'
declaration: '{socialName} declara através da presente que:'
declarations:
- - 'Todas as compras realizadas por {socialName} a {companyName} se entregam,
+ - 'Todas as compras realizadas por {socialName} a {companyName} se entregam,
Ex Works (Incoterms), no armazém da {companyName} situado em
{companyCity}.'
- - '{socialName} reconhece ser importante para {companyName}
- ter o comprovante da entrega intracomunitária da mercadoria a {destinationCountry}
+ - '{socialName} reconhece ser importante para {companyName}
+ ter o comprovante da entrega intracomunitária da mercadoria em {destinationCountry}
para poder faturar com 0% de IVA.'
- - 'Portanto, ao assinar este acordo, {socialName} declara que todos os bens
+ - 'Portanto, ao assinar este acordo, {socialName} declara que todos os bens
que se comprem na {companyName} serão entregues na {destinationCountry}.'
- 'Além disto, {socialName} deverá, na primeira solicitude da {companyName},
- proporcionar uma prova de que todos os produtos comprados na {companyName}
- foram entregues na {destinationCountry}.'
- - 'Além do anterio, {companyName} proporcionará a {socialName}
+ proporcionar uma prova de que todos os produtos comprados em {companyName}
+ foram entregues em {destinationCountry}.'
+ - 'Além do anterior, {companyName} proporcionará a {socialName}
um resumo mensal onde se incluem todas as faturas (e as entregas correspondentes).
{socialName} assinará e devolverá o resumo mensal à {companyName},
dentro dos 5 dias posteriores à receção do resumo.'
-signer:
+signer:
representative: Representante
representativeRole: Cargo de representante
signed: Data da assinatura
@@ -39,4 +38,4 @@ months:
- 'Setembro'
- 'Outubro'
- 'Novembro'
- - 'Dezembro'
\ No newline at end of file
+ - 'Dezembro'
From c7e26f9155e3be023a7f7bdbc745fae1e5b6c23a Mon Sep 17 00:00:00 2001
From: carlossa
Date: Fri, 22 Sep 2023 06:08:07 +0200
Subject: [PATCH 2/7] refs #5768 autocomplete
---
modules/client/front/sample/create/index.html | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/client/front/sample/create/index.html b/modules/client/front/sample/create/index.html
index 7d6cab673..134c097e8 100644
--- a/modules/client/front/sample/create/index.html
+++ b/modules/client/front/sample/create/index.html
@@ -69,15 +69,15 @@
ng-if="sampleType.selection.hasCompany"
required="true">
-
-
+ -->
Date: Tue, 3 Oct 2023 10:15:16 +0200
Subject: [PATCH 3/7] refs #5768 incoterms addressFk
---
modules/client/front/sample/create/index.html | 29 ++++++++--
modules/client/front/sample/create/index.js | 56 ++++++++++++++++++-
.../incoterms-authorization.html | 5 +-
.../incoterms-authorization.js | 5 +-
.../incoterms-authorization/locale/es.yml | 2 +-
.../incoterms-authorization/sql/address.sql | 9 +++
.../incoterms-authorization/sql/company.sql | 4 +-
7 files changed, 95 insertions(+), 15 deletions(-)
create mode 100644 print/templates/reports/incoterms-authorization/sql/address.sql
diff --git a/modules/client/front/sample/create/index.html b/modules/client/front/sample/create/index.html
index 134c097e8..f9db03036 100644
--- a/modules/client/front/sample/create/index.html
+++ b/modules/client/front/sample/create/index.html
@@ -13,6 +13,7 @@
'description',
'model',
'hasCompany',
+ 'hasAddress',
'hasPreview',
'datepickerEnabled'
]"
@@ -69,15 +70,31 @@
ng-if="sampleType.selection.hasCompany"
required="true">
-
+ ng-model="$ctrl.addressId"
+ model="ClientSample.addressFk"
+ order="isActive DESC">
+
+ {{::!isActive ? '(Inactive)' : ''}}
+ {{::nickname}}
+
+ , {{::street}}, {{::city}}, {{::province.name}} - {{::agencyMode.name}}
+
+
+
+
+
+
+
{
+ if (res.data)
+ this.addresses = res.data;
+ });
+ }
+
+ getClientDefaultAddress(value) {
+ let query = `Clients/${value}`;
+ this.$http.get(query).then(res => {
+ if (res.data)
+ this.addressId = res.data.defaultAddressFk;
+ });
+ }
}
Controller.$inject = ['$element', '$scope', 'vnEmail'];
diff --git a/print/templates/reports/incoterms-authorization/incoterms-authorization.html b/print/templates/reports/incoterms-authorization/incoterms-authorization.html
index 5b4e7829b..e4e4635f3 100644
--- a/print/templates/reports/incoterms-authorization/incoterms-authorization.html
+++ b/print/templates/reports/incoterms-authorization/incoterms-authorization.html
@@ -5,7 +5,7 @@
v-html="$t('description', {
socialName: client.socialName,
name: client.name,
- address: client.street,
+ addressId: address.street,
country: client.country,
fiscalID: client.fi
})"
@@ -21,8 +21,7 @@
companyName: company.name,
companyCity: company.city,
socialName: client.socialName,
- destinationCountry: client.country,
- incotermsFk: address.incotermsFk
+ destinationCountry: client.country
})"
>
diff --git a/print/templates/reports/incoterms-authorization/incoterms-authorization.js b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
index 0fbbd10d2..e50cd99ec 100755
--- a/print/templates/reports/incoterms-authorization/incoterms-authorization.js
+++ b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
@@ -7,6 +7,7 @@ module.exports = {
this.client = await this.findOneFromDef('client', [this.id]);
this.checkMainEntity(this.client);
this.company = await this.findOneFromDef('company', [this.companyId]);
+ this.address = await this.findOneFromDef('address', [this.addressId]);
},
props: {
id: {
@@ -18,8 +19,8 @@ module.exports = {
type: Number,
required: true
},
- address: {
- type: String
+ addressId: {
+ type: Number
}
}
};
diff --git a/print/templates/reports/incoterms-authorization/locale/es.yml b/print/templates/reports/incoterms-authorization/locale/es.yml
index 8bdce7085..ef63e9e3c 100644
--- a/print/templates/reports/incoterms-authorization/locale/es.yml
+++ b/print/templates/reports/incoterms-authorization/locale/es.yml
@@ -6,7 +6,7 @@ issued: 'En {0}, a {1} de {2} de {3}'
client: 'Cliente {0}'
declaration: '{socialName} declara por la presente que:'
declarations:
- - 'Todas las compras realizadas por {socialName} con {companyName} se entregan según las condiciones definidas en el incoterm {incotermsFk} ({Incoterm description}).'
+ - 'Todas las compras realizadas por {socialName} con {companyName} se entregan según las condiciones definidas en el incoterm.'
- '{socialName} reconoce que es importante para {companyName} tener
comprobante de la entrega intracomunitaria de la mercancía a {destinationCountry} para
poder facturar con 0% de IVA.'
diff --git a/print/templates/reports/incoterms-authorization/sql/address.sql b/print/templates/reports/incoterms-authorization/sql/address.sql
new file mode 100644
index 000000000..a432c5e53
--- /dev/null
+++ b/print/templates/reports/incoterms-authorization/sql/address.sql
@@ -0,0 +1,9 @@
+SELECT
+ a.nickname,
+ a.street,
+ a.postalCode,
+ a.city,
+ p.name province
+FROM address a
+ LEFT JOIN province p ON p.id = a.provinceFk
+WHERE a.id = ?
diff --git a/print/templates/reports/incoterms-authorization/sql/company.sql b/print/templates/reports/incoterms-authorization/sql/company.sql
index 39c3290d1..8d94859e1 100644
--- a/print/templates/reports/incoterms-authorization/sql/company.sql
+++ b/print/templates/reports/incoterms-authorization/sql/company.sql
@@ -1,8 +1,8 @@
-SELECT
+SELECT
s.name,
s.city,
cl.name AS manager
FROM company c
JOIN supplier s ON s.id = c.id
JOIN client cl ON cl.id = c.workerManagerFk
-WHERE c.id = ?
\ No newline at end of file
+WHERE c.id = ?
From 5b6eb0a2a62a9d481db230c3ffb966272b522026 Mon Sep 17 00:00:00 2001
From: carlossa
Date: Thu, 5 Oct 2023 14:01:07 +0200
Subject: [PATCH 4/7] refs #5768 add address, nickname, pdf, email
---
.../back/methods/client/incotermsAuthorizationEmail.js | 6 ++++++
.../back/methods/client/incotermsAuthorizationHtml.js | 6 ++++++
.../back/methods/client/incotermsAuthorizationPdf.js | 6 ++++++
modules/client/front/sample/create/index.html | 1 +
.../incoterms-authorization/incoterms-authorization.js | 4 ++++
.../incoterms-authorization/incoterms-authorization.html | 8 ++++----
.../incoterms-authorization/incoterms-authorization.js | 3 ++-
7 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/modules/client/back/methods/client/incotermsAuthorizationEmail.js b/modules/client/back/methods/client/incotermsAuthorizationEmail.js
index 4a21f20b0..9b3686b07 100644
--- a/modules/client/back/methods/client/incotermsAuthorizationEmail.js
+++ b/modules/client/back/methods/client/incotermsAuthorizationEmail.js
@@ -33,6 +33,12 @@ module.exports = Self => {
type: 'number',
description: 'The company id',
required: true
+ },
+ {
+ arg: 'addressId',
+ type: 'number',
+ description: 'The address id',
+ required: true
}
],
returns: {
diff --git a/modules/client/back/methods/client/incotermsAuthorizationHtml.js b/modules/client/back/methods/client/incotermsAuthorizationHtml.js
index 0a6bba0a8..af585b1ae 100644
--- a/modules/client/back/methods/client/incotermsAuthorizationHtml.js
+++ b/modules/client/back/methods/client/incotermsAuthorizationHtml.js
@@ -21,6 +21,12 @@ module.exports = Self => {
type: 'number',
description: 'The company id',
required: true
+ },
+ {
+ arg: 'addressId',
+ type: 'number',
+ description: 'The address id',
+ required: true
}
],
returns: [
diff --git a/modules/client/back/methods/client/incotermsAuthorizationPdf.js b/modules/client/back/methods/client/incotermsAuthorizationPdf.js
index d37e473f1..ffe17c72f 100644
--- a/modules/client/back/methods/client/incotermsAuthorizationPdf.js
+++ b/modules/client/back/methods/client/incotermsAuthorizationPdf.js
@@ -21,6 +21,12 @@ module.exports = Self => {
type: 'number',
description: 'The company id',
required: true
+ },
+ {
+ arg: 'addressId',
+ type: 'number',
+ description: 'The address id',
+ required: true
}
],
returns: [
diff --git a/modules/client/front/sample/create/index.html b/modules/client/front/sample/create/index.html
index f9db03036..9dce7ec72 100644
--- a/modules/client/front/sample/create/index.html
+++ b/modules/client/front/sample/create/index.html
@@ -71,6 +71,7 @@
required="true">
diff --git a/print/templates/reports/incoterms-authorization/incoterms-authorization.js b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
index e50cd99ec..22ae13167 100755
--- a/print/templates/reports/incoterms-authorization/incoterms-authorization.js
+++ b/print/templates/reports/incoterms-authorization/incoterms-authorization.js
@@ -20,7 +20,8 @@ module.exports = {
required: true
},
addressId: {
- type: Number
+ type: Number,
+ required: true
}
}
};
From 3b81b511c2d40262ed569ab746c5f5e8c5c45dbd Mon Sep 17 00:00:00 2001
From: carlossa
Date: Thu, 5 Oct 2023 14:01:53 +0200
Subject: [PATCH 5/7] remove consolelog
---
modules/client/front/sample/create/index.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/modules/client/front/sample/create/index.js b/modules/client/front/sample/create/index.js
index 305591511..6a249e84e 100644
--- a/modules/client/front/sample/create/index.js
+++ b/modules/client/front/sample/create/index.js
@@ -80,8 +80,6 @@ class Controller extends Section {
if (this.clientSample.addressId)
params.addressId = this.clientSample.addressId;
-
- console.log(this.clientSample);
}
preview() {
From 4adee11c63f9a673468cba4dbe9cdc149791f59e Mon Sep 17 00:00:00 2001
From: carlossa
Date: Tue, 10 Oct 2023 12:35:34 +0200
Subject: [PATCH 6/7] refs #5768 remove comment
---
modules/client/front/sample/create/index.js | 3 ---
1 file changed, 3 deletions(-)
diff --git a/modules/client/front/sample/create/index.js b/modules/client/front/sample/create/index.js
index 6a249e84e..5370aa8a8 100644
--- a/modules/client/front/sample/create/index.js
+++ b/modules/client/front/sample/create/index.js
@@ -142,9 +142,6 @@ class Controller extends Section {
});
}
- /*
- * Autocompletes address on client change
- */
clientAddressesList(value) {
let filter = {
include: [
From df9d6fd6f82d1700e4e6e323c2856d91861fefd0 Mon Sep 17 00:00:00 2001
From: jgallego
Date: Wed, 11 Oct 2023 14:06:28 +0200
Subject: [PATCH 7/7] efectue con acento
---
modules/ticket/front/descriptor/locale/es.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/ticket/front/descriptor/locale/es.yml b/modules/ticket/front/descriptor/locale/es.yml
index 86b1a6b57..e1006bed4 100644
--- a/modules/ticket/front/descriptor/locale/es.yml
+++ b/modules/ticket/front/descriptor/locale/es.yml
@@ -3,7 +3,7 @@ Are you sure you want to send it?: ¿Seguro que quieres enviarlo?
Show pallet report: Ver hoja de pallet
Change shipped hour: Cambiar hora de envío
Shipped hour: Hora de envío
-Make a payment: "Verdnatura le comunica:\rSu pedido está pendiente de pago.\rPor favor, entre en la página web y efectue el pago con tarjeta.\rMuchas gracias."
+Make a payment: "Verdnatura le comunica:\rSu pedido está pendiente de pago.\rPor favor, entre en la página web y efectúe el pago con tarjeta.\rMuchas gracias."
Minimum is needed: "Verdnatura le recuerda:\rEs necesario un importe mínimo de 50€ (Sin IVA) en su pedido {{ticketId}} del día {{created | date: 'dd/MM/yyyy'}} para recibirlo sin portes adicionales."
Ticket invoiced: Ticket facturado
Make invoice: Crear factura