232201_test_to_master #1582
|
@ -0,0 +1,20 @@
|
||||||
|
-- vn.defaulter source
|
||||||
|
|
||||||
|
CREATE OR REPLACE
|
||||||
|
ALGORITHM = UNDEFINED VIEW `vn`.`defaulter` AS
|
||||||
|
select
|
||||||
|
`d`.`clientFk` AS `clientFk`,
|
||||||
|
`d`.`created` AS `created`,
|
||||||
|
`d`.`amount` AS `amount`,
|
||||||
|
`d`.`defaulterSinced` AS `defaulterSinced`,
|
||||||
|
`d`.`hasChanged` AS `hasChanged`,
|
||||||
|
`c`.`countryFk` AS `country`,
|
||||||
|
`c`.`payMethodFk` AS `payMethod`
|
||||||
|
from
|
||||||
|
(((`bs`.`defaulter` `d`
|
||||||
|
join `vn`.`client` `c` on
|
||||||
|
(`c`.`id` = `d`.`clientFk`))
|
||||||
|
join `vn`.`country` `co` on
|
||||||
|
(`co`.`id` = `c`.`countryFk`))
|
||||||
|
join `vn`.`payMethod` `pm` on
|
||||||
|
(`pm`.`id` = `c`.`payMethodFk`));
|
|
@ -313,7 +313,7 @@ export default {
|
||||||
anyClient: 'vn-client-defaulter tbody > tr',
|
anyClient: 'vn-client-defaulter tbody > tr',
|
||||||
firstClientName: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(2) > span',
|
firstClientName: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(2) > span',
|
||||||
firstSalesPersonName: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(3) > span',
|
firstSalesPersonName: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(3) > span',
|
||||||
firstObservation: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(6) > vn-textarea[ng-model="defaulter.observation"]',
|
firstObservation: 'vn-client-defaulter tbody > tr:nth-child(1) > td:nth-child(8) > vn-textarea[ng-model="defaulter.observation"]',
|
||||||
allDefaulterCheckbox: 'vn-client-defaulter thead vn-multi-check',
|
allDefaulterCheckbox: 'vn-client-defaulter thead vn-multi-check',
|
||||||
addObservationButton: 'vn-client-defaulter vn-button[icon="icon-notes"]',
|
addObservationButton: 'vn-client-defaulter vn-button[icon="icon-notes"]',
|
||||||
observation: '.vn-dialog.shown vn-textarea[ng-model="$ctrl.defaulter.observation"]',
|
observation: '.vn-dialog.shown vn-textarea[ng-model="$ctrl.defaulter.observation"]',
|
||||||
|
|
|
@ -67,9 +67,13 @@ module.exports = Self => {
|
||||||
uw.id workerFk,
|
uw.id workerFk,
|
||||||
uw.name workerName,
|
uw.name workerName,
|
||||||
c.creditInsurance,
|
c.creditInsurance,
|
||||||
d.defaulterSinced
|
d.defaulterSinced,
|
||||||
|
cn.country,
|
||||||
|
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.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
|
||||||
|
|
|
@ -29,6 +29,16 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Client",
|
"model": "Client",
|
||||||
"foreignKey": "clientFk"
|
"foreignKey": "clientFk"
|
||||||
|
},
|
||||||
|
"country": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "Country",
|
||||||
|
"foreignKey": "country"
|
||||||
|
},
|
||||||
|
"payMethod": {
|
||||||
|
"type": "belongsTo",
|
||||||
|
"model": "PayMethod",
|
||||||
|
"foreignKey": "payMethod"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -57,6 +57,13 @@
|
||||||
<th field="salesPersonFk">
|
<th field="salesPersonFk">
|
||||||
<span translate>Comercial</span>
|
<span translate>Comercial</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th field="country">
|
||||||
|
<span translate>Country</span>
|
||||||
|
</th>
|
||||||
|
<th field="payMethod"
|
||||||
|
vn-tooltip="Pay Method">
|
||||||
|
<span translate>P.Method</span>
|
||||||
|
</th>
|
||||||
<th
|
<th
|
||||||
field="amount"
|
field="amount"
|
||||||
vn-tooltip="Balance due">
|
vn-tooltip="Balance due">
|
||||||
|
@ -111,6 +118,12 @@
|
||||||
{{::defaulter.salesPersonName | dashIfEmpty}}
|
{{::defaulter.salesPersonName | dashIfEmpty}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
{{::defaulter.country}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{::defaulter.payMethod}}
|
||||||
|
</td>
|
||||||
<td>{{::defaulter.amount | currency: 'EUR': 2}}</td>
|
<td>{{::defaulter.amount | currency: 'EUR': 2}}</td>
|
||||||
<td>
|
<td>
|
||||||
<span
|
<span
|
||||||
|
|
|
@ -20,8 +20,7 @@ export default class Controller extends Section {
|
||||||
showField: 'name',
|
showField: 'name',
|
||||||
valueField: 'id'
|
valueField: 'id'
|
||||||
}
|
}
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
field: 'salesPersonFk',
|
field: 'salesPersonFk',
|
||||||
autocomplete: {
|
autocomplete: {
|
||||||
url: 'Workers/activeWithInheritedRole',
|
url: 'Workers/activeWithInheritedRole',
|
||||||
|
@ -30,6 +29,18 @@ export default class Controller extends Section {
|
||||||
showField: 'name',
|
showField: 'name',
|
||||||
valueField: 'id',
|
valueField: 'id',
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
field: 'country',
|
||||||
|
autocomplete: {
|
||||||
|
showField: 'country',
|
||||||
|
valueField: 'country'
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
field: 'payMethodFk',
|
||||||
|
autocomplete: {
|
||||||
|
showField: 'name',
|
||||||
|
valueField: 'id'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'workerFk',
|
field: 'workerFk',
|
||||||
|
@ -132,7 +143,7 @@ export default class Controller extends Section {
|
||||||
sendMail() {
|
sendMail() {
|
||||||
const params = {
|
const params = {
|
||||||
defaulters: this.checked,
|
defaulters: this.checked,
|
||||||
observation: this.defaulter.observation
|
observation: this.defaulter.observation,
|
||||||
};
|
};
|
||||||
this.$http.post(`Defaulters/observationEmail`, params);
|
this.$http.post(`Defaulters/observationEmail`, params);
|
||||||
}
|
}
|
||||||
|
@ -143,6 +154,8 @@ export default class Controller extends Section {
|
||||||
case 'amount':
|
case 'amount':
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
case 'workerFk':
|
case 'workerFk':
|
||||||
|
case 'country':
|
||||||
|
case 'payMethod':
|
||||||
case 'salesPersonFk':
|
case 'salesPersonFk':
|
||||||
return {[`d.${param}`]: value};
|
return {[`d.${param}`]: value};
|
||||||
case 'created':
|
case 'created':
|
||||||
|
|
|
@ -9,3 +9,6 @@ Search client: Buscar clientes
|
||||||
Worker who made the last observation: Trabajador que ha realizado la última observación
|
Worker who made the last observation: Trabajador que ha realizado la última observación
|
||||||
Email sended!: Email enviado!
|
Email sended!: Email enviado!
|
||||||
Observation saved!: Observación añadida!
|
Observation saved!: Observación añadida!
|
||||||
|
P.Method: F.Pago
|
||||||
|
Pay Method: Forma de Pago
|
||||||
|
Country: Pais
|
Loading…
Reference in New Issue