From dcd74bacc0dd49f688f45f151d2a77da6e2aaf92 Mon Sep 17 00:00:00 2001 From: Pau Navarro Date: Wed, 1 Feb 2023 08:32:22 +0100 Subject: [PATCH 1/5] refs #5181 @1h30 --- modules/ticket/back/methods/ticket/summary.js | 2 +- modules/ticket/front/summary/index.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ticket/back/methods/ticket/summary.js b/modules/ticket/back/methods/ticket/summary.js index 848913fe1..a57968fc1 100644 --- a/modules/ticket/back/methods/ticket/summary.js +++ b/modules/ticket/back/methods/ticket/summary.js @@ -71,7 +71,7 @@ module.exports = Self => { }, { relation: 'address', scope: { - fields: ['street', 'city', 'provinceFk', 'phone', 'mobile', 'postalCode'], + fields: ['street', 'city', 'provinceFk', 'phone', 'mobile', 'postalCode', 'isEqualizated'], include: { relation: 'province', scope: { diff --git a/modules/ticket/front/summary/index.html b/modules/ticket/front/summary/index.html index af44ed67c..a7441dcf1 100644 --- a/modules/ticket/front/summary/index.html +++ b/modules/ticket/front/summary/index.html @@ -105,7 +105,10 @@

Subtotal {{$ctrl.summary.totalWithoutVat | currency: 'EUR':2}}

-

VAT {{$ctrl.summary.totalWithVat - $ctrl.summary.totalWithoutVat | currency: 'EUR':2}}

+

VAT + RE + VAT + {{$ctrl.summary.totalWithVat - $ctrl.summary.totalWithoutVat | currency: 'EUR':2}} +

Total {{$ctrl.summary.totalWithVat | currency: 'EUR':2}}

From a2f93e68b139e5845770effc56fd99f72aa62433 Mon Sep 17 00:00:00 2001 From: vicent Date: Mon, 6 Feb 2023 13:57:04 +0100 Subject: [PATCH 2/5] feat: add 'parking' column --- modules/shelving/back/models/parking.json | 7 +++++ modules/ticket/back/model-config.json | 6 ++++ modules/ticket/back/models/sale.json | 5 +++ modules/ticket/back/models/saleGroup.json | 31 +++++++++++++++++++ .../ticket/back/models/saleGroupDetail.json | 31 +++++++++++++++++++ modules/ticket/front/sale-tracking/index.html | 2 ++ modules/ticket/front/sale-tracking/index.js | 21 ++++++++++++- 7 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 modules/ticket/back/models/saleGroup.json create mode 100644 modules/ticket/back/models/saleGroupDetail.json diff --git a/modules/shelving/back/models/parking.json b/modules/shelving/back/models/parking.json index 7efcf72d3..bb1e02607 100644 --- a/modules/shelving/back/models/parking.json +++ b/modules/shelving/back/models/parking.json @@ -29,5 +29,12 @@ "pickingOrder": { "type": "number" } + }, + "relations": { + "saleGroup": { + "type": "hasOne", + "model": "saleGroup", + "foreignKey": "parkingFk" + } } } diff --git a/modules/ticket/back/model-config.json b/modules/ticket/back/model-config.json index 62e763c8f..bee01a875 100644 --- a/modules/ticket/back/model-config.json +++ b/modules/ticket/back/model-config.json @@ -41,6 +41,12 @@ "SaleComponent": { "dataSource": "vn" }, + "SaleGroup": { + "dataSource": "vn" + }, + "SaleGroupDetail": { + "dataSource": "vn" + }, "SaleTracking": { "dataSource": "vn" }, diff --git a/modules/ticket/back/models/sale.json b/modules/ticket/back/models/sale.json index b30954ad1..669b05be6 100644 --- a/modules/ticket/back/models/sale.json +++ b/modules/ticket/back/models/sale.json @@ -75,6 +75,11 @@ "type": "hasOne", "model": "ItemShelvingSale", "foreignKey": "saleFk" + }, + "saleGroupDetail": { + "type": "hasOne", + "model": "SaleGroupDetail", + "foreignKey": "saleFk" } } } diff --git a/modules/ticket/back/models/saleGroup.json b/modules/ticket/back/models/saleGroup.json new file mode 100644 index 000000000..dd34e450b --- /dev/null +++ b/modules/ticket/back/models/saleGroup.json @@ -0,0 +1,31 @@ +{ + "name": "SaleGroup", + "base": "VnModel", + "options": { + "mysql": { + "table": "saleGroup" + } + }, + "properties": { + "id": { + "id": true, + "type": "number", + "description": "Identifier" + }, + "parkingFk": { + "type": "number" + } + }, + "relations": { + "saleGroupDetail": { + "type": "hasOne", + "model": "SaleGroupDetail", + "foreignKey": "saleGroupFk" + }, + "parking": { + "type": "belongsTo", + "model": "Parking", + "foreignKey": "parkingFk" + } + } +} diff --git a/modules/ticket/back/models/saleGroupDetail.json b/modules/ticket/back/models/saleGroupDetail.json new file mode 100644 index 000000000..2fbc71bbd --- /dev/null +++ b/modules/ticket/back/models/saleGroupDetail.json @@ -0,0 +1,31 @@ +{ + "name": "SaleGroupDetail", + "base": "VnModel", + "options": { + "mysql": { + "table": "saleGroupDetail" + } + }, + "properties": { + "id": { + "id": true, + "type": "number", + "description": "Identifier" + }, + "saleFk": { + "type": "number" + } + }, + "relations": { + "sale": { + "type": "belongsTo", + "model": "Sale", + "foreignKey": "saleFk" + }, + "saleGroup": { + "type": "belongsTo", + "model": "SaleGroup", + "foreignKey": "saleGroupFk" + } + } +} diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html index c21eaa46a..71c995a1d 100644 --- a/modules/ticket/front/sale-tracking/index.html +++ b/modules/ticket/front/sale-tracking/index.html @@ -17,6 +17,7 @@ Item Description Quantity + Parking @@ -50,6 +51,7 @@ {{::sale.quantity}} + {{::sale.saleGroupDetail.saleGroup.parking.code}} Date: Mon, 6 Feb 2023 14:03:38 +0100 Subject: [PATCH 3/5] refactor --- modules/ticket/front/sale-tracking/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ticket/front/sale-tracking/index.html b/modules/ticket/front/sale-tracking/index.html index 71c995a1d..8d3f414c2 100644 --- a/modules/ticket/front/sale-tracking/index.html +++ b/modules/ticket/front/sale-tracking/index.html @@ -17,7 +17,7 @@ Item Description Quantity - Parking + Parking @@ -51,7 +51,7 @@ {{::sale.quantity}} - {{::sale.saleGroupDetail.saleGroup.parking.code}} + {{::sale.saleGroupDetail.saleGroup.parking.code | dashIfEmpty}} Date: Mon, 6 Feb 2023 14:32:54 +0100 Subject: [PATCH 4/5] fix: type relation in models --- modules/shelving/back/models/parking.json | 2 +- modules/ticket/back/models/saleGroup.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/shelving/back/models/parking.json b/modules/shelving/back/models/parking.json index bb1e02607..53fec6e69 100644 --- a/modules/shelving/back/models/parking.json +++ b/modules/shelving/back/models/parking.json @@ -32,7 +32,7 @@ }, "relations": { "saleGroup": { - "type": "hasOne", + "type": "hasMany", "model": "saleGroup", "foreignKey": "parkingFk" } diff --git a/modules/ticket/back/models/saleGroup.json b/modules/ticket/back/models/saleGroup.json index dd34e450b..d5cf82cb5 100644 --- a/modules/ticket/back/models/saleGroup.json +++ b/modules/ticket/back/models/saleGroup.json @@ -18,7 +18,7 @@ }, "relations": { "saleGroupDetail": { - "type": "hasOne", + "type": "hasMany", "model": "SaleGroupDetail", "foreignKey": "saleGroupFk" }, From 65df9b87e7f8260301ec995f14f7c433a3994c99 Mon Sep 17 00:00:00 2001 From: alexm Date: Mon, 13 Feb 2023 13:22:53 +0100 Subject: [PATCH 5/5] fix: conflicts --- front/salix/components/recover-password/index.html | 4 ++-- front/salix/components/recover-password/locale/es.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front/salix/components/recover-password/index.html b/front/salix/components/recover-password/index.html index b7587148b..5121f81bd 100644 --- a/front/salix/components/recover-password/index.html +++ b/front/salix/components/recover-password/index.html @@ -1,7 +1,7 @@
Recover password