From 660612cb849e9615e09c5fb98abd424b9d37493a Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 13 Jul 2023 10:22:41 +0200 Subject: [PATCH 1/2] refs #5999 url --- modules/client/front/defaulter/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/client/front/defaulter/index.js b/modules/client/front/defaulter/index.js index 95c7622f9..a2efdcb5c 100644 --- a/modules/client/front/defaulter/index.js +++ b/modules/client/front/defaulter/index.js @@ -32,6 +32,7 @@ export default class Controller extends Section { }, { field: 'country', autocomplete: { + url: 'Countries', showField: 'country', valueField: 'country' } -- 2.40.1 From 2627cafc229aa0910e07198e7f19f99d44883c07 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 13 Jul 2023 10:54:22 +0200 Subject: [PATCH 2/2] refs #5999 defaulter country autocomplete --- modules/client/back/methods/defaulter/filter.js | 3 ++- modules/client/back/models/defaulter.json | 4 ++-- modules/client/front/defaulter/index.html | 4 ++-- modules/client/front/defaulter/index.js | 6 +++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/client/back/methods/defaulter/filter.js b/modules/client/back/methods/defaulter/filter.js index 736c29f9c..ec6088ff0 100644 --- a/modules/client/back/methods/defaulter/filter.js +++ b/modules/client/back/methods/defaulter/filter.js @@ -69,11 +69,12 @@ module.exports = Self => { c.creditInsurance, d.defaulterSinced, cn.country, + c.countryFk, pm.name payMethod FROM vn.defaulter d JOIN vn.client c ON c.id = d.clientFk JOIN vn.country cn ON cn.id = c.countryFk - JOIN vn.payMethod pm ON pm.id = c.payMethodFk + JOIN vn.payMethod pm ON pm.id = c.payMethodFk LEFT JOIN vn.clientObservation co ON co.clientFk = c.id LEFT JOIN account.user u ON u.id = c.salesPersonFk LEFT JOIN account.user uw ON uw.id = co.workerFk diff --git a/modules/client/back/models/defaulter.json b/modules/client/back/models/defaulter.json index 03d68ea71..ef22c2429 100644 --- a/modules/client/back/models/defaulter.json +++ b/modules/client/back/models/defaulter.json @@ -33,7 +33,7 @@ "country": { "type": "belongsTo", "model": "Country", - "foreignKey": "country" + "foreignKey": "countryFk" }, "payMethod": { "type": "belongsTo", @@ -41,4 +41,4 @@ "foreignKey": "payMethod" } } -} \ No newline at end of file +} diff --git a/modules/client/front/defaulter/index.html b/modules/client/front/defaulter/index.html index 4f662b62b..3c66e6459 100644 --- a/modules/client/front/defaulter/index.html +++ b/modules/client/front/defaulter/index.html @@ -57,7 +57,7 @@ Comercial - + Country {{::defaulter.payMethod}} - + {{::defaulter.amount | currency: 'EUR': 2}}