last steps to preview credit request #692
|
@ -179,8 +179,7 @@
|
||||||
<!-- Footer block -->
|
<!-- Footer block -->
|
||||||
<report-footer
|
<report-footer
|
||||||
id="pageFooter"
|
id="pageFooter"
|
||||||
v-bind:left-text="$t('client', [client.id])"
|
v-bind:left-text="dated"
|
||||||
v-bind:center-text="client.socialName"
|
|
||||||
v-bind="$props">
|
v-bind="$props">
|
||||||
</report-footer>
|
</report-footer>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -4,15 +4,11 @@ const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
const rptCreditRequest = {
|
const rptCreditRequest = {
|
||||||
name: 'credit-request',
|
name: 'credit-request',
|
||||||
async serverPrefetch() {
|
computed: {
|
||||||
this.client = await this.fetchClient(this.recipientId);
|
dated: function() {
|
||||||
|
const filters = this.$options.filters;
|
||||||
|
|
||||||
if (!this.client)
|
return filters.date(new Date(), '%d-%m-%Y');
|
||||||
throw new Error('Something went wrong');
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
fetchClient(clientId) {
|
|
||||||
return this.findOneFromDef('client', [clientId]);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
SELECT
|
|
||||||
c.id,
|
|
||||||
c.socialName,
|
|
||||||
c.street,
|
|
||||||
c.postcode,
|
|
||||||
c.city,
|
|
||||||
c.fi,
|
|
||||||
p.name AS province,
|
|
||||||
ct.country
|
|
||||||
FROM client c
|
|
||||||
JOIN country ct ON ct.id = c.countryFk
|
|
||||||
LEFT JOIN province p ON p.id = c.provinceFk
|
|
||||||
WHERE c.id = ?
|
|
Loading…
Reference in New Issue