5999-defaultCountry #1665

Merged
carlossa merged 4 commits from 5999-defaultCountry into master 2023-07-14 07:38:26 +00:00
4 changed files with 9 additions and 8 deletions
Showing only changes of commit 2627cafc22 - Show all commits

View File

@ -69,11 +69,12 @@ module.exports = Self => {
c.creditInsurance, c.creditInsurance,
d.defaulterSinced, d.defaulterSinced,
cn.country, cn.country,
c.countryFk,
pm.name payMethod pm.name payMethod
FROM vn.defaulter d FROM vn.defaulter d
JOIN vn.client c ON c.id = d.clientFk JOIN vn.client c ON c.id = d.clientFk
JOIN vn.country cn ON cn.id = c.countryFk 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 vn.clientObservation co ON co.clientFk = c.id
LEFT JOIN account.user u ON u.id = c.salesPersonFk LEFT JOIN account.user u ON u.id = c.salesPersonFk
LEFT JOIN account.user uw ON uw.id = co.workerFk LEFT JOIN account.user uw ON uw.id = co.workerFk

View File

@ -33,7 +33,7 @@
"country": { "country": {
"type": "belongsTo", "type": "belongsTo",
"model": "Country", "model": "Country",
"foreignKey": "country" "foreignKey": "countryFk"
}, },
"payMethod": { "payMethod": {
"type": "belongsTo", "type": "belongsTo",
@ -41,4 +41,4 @@
"foreignKey": "payMethod" "foreignKey": "payMethod"
} }
} }
} }

View File

@ -57,7 +57,7 @@
<th field="salesPersonFk"> <th field="salesPersonFk">
<span translate>Comercial</span> <span translate>Comercial</span>
</th> </th>
<th field="country"> <th field="countryFk">
<span translate>Country</span> <span translate>Country</span>
</th> </th>
<th field="payMethod" <th field="payMethod"
@ -123,7 +123,7 @@
</td> </td>
<td> <td>
{{::defaulter.payMethod}} {{::defaulter.payMethod}}
</td> </td>
<td>{{::defaulter.amount | currency: 'EUR': 2}}</td> <td>{{::defaulter.amount | currency: 'EUR': 2}}</td>
<td> <td>
<span <span

View File

@ -30,11 +30,11 @@ export default class Controller extends Section {
valueField: 'id', valueField: 'id',
} }
}, { }, {
field: 'country', field: 'countryFk',
autocomplete: { autocomplete: {
url: 'Countries', url: 'Countries',
showField: 'country', showField: 'country',
valueField: 'country' valueField: 'id'
} }
}, { }, {
field: 'payMethodFk', field: 'payMethodFk',
@ -155,7 +155,7 @@ export default class Controller extends Section {
case 'amount': case 'amount':
case 'clientFk': case 'clientFk':
case 'workerFk': case 'workerFk':
case 'country': case 'countryFk':
case 'payMethod': case 'payMethod':
case 'salesPersonFk': case 'salesPersonFk':
return {[`d.${param}`]: value}; return {[`d.${param}`]: value};