diff --git a/modules/client/back/methods/defaulter/filter.js b/modules/client/back/methods/defaulter/filter.js index 56afb64db..220cb957b 100644 --- a/modules/client/back/methods/defaulter/filter.js +++ b/modules/client/back/methods/defaulter/filter.js @@ -70,11 +70,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 3ea88088b..33bb751f1 100644 --- a/modules/client/front/defaulter/index.html +++ b/modules/client/front/defaulter/index.html @@ -60,7 +60,7 @@ Comercial - + Country {{::defaulter.payMethod}} - + {{::defaulter.amount | currency: 'EUR': 2}}