This commit is contained in:
parent
1e71f7487a
commit
014998952e
|
@ -1,5 +1,3 @@
|
|||
<!DOCTYPE html>
|
||||
<html v-bind:lang="$i18n.locale">
|
||||
<div>
|
||||
<div class="footer">
|
||||
<div class="page">
|
||||
|
@ -8,10 +6,10 @@
|
|||
<div class="pageCount" v-html="$t('numPages')"></div>
|
||||
</div>
|
||||
<p
|
||||
v-if="companyI18n && companyI18n.footnotes"
|
||||
v-bind="`${companyI18n.footnotes}`">
|
||||
v-if="company?.footnotes"
|
||||
v-html="company.footnotes">
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
|
||||
|
|
|
@ -1,19 +1,17 @@
|
|||
/* eslint-disable no-tabs */
|
||||
const db = require('../../database');
|
||||
|
||||
module.exports = {
|
||||
name: 'report-footer',
|
||||
async serverPrefetch() {
|
||||
const company = await db.findOne(`
|
||||
SELECT
|
||||
ci.footnotes,
|
||||
c.code
|
||||
FROM company c
|
||||
JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1)
|
||||
JOIN companyGroup cg ON cg.id = c.companyGroupFk
|
||||
JOIN supplier s ON s.id = c.id
|
||||
WHERE c.code = ?`, [this.companyCode]);
|
||||
|
||||
this.company = company;
|
||||
this.company = await db.findOne(
|
||||
`SELECT
|
||||
ci.footnotes
|
||||
FROM companyI18n ci
|
||||
JOIN company c ON c.id = ci.companyFk
|
||||
WHERE c.code = ? AND ci.lang = (SELECT lang FROM account.user WHERE id = ?)`,
|
||||
[this.companyCode, this.recipientId]);
|
||||
},
|
||||
props: ['leftText', 'companyCode', 'centerText']
|
||||
|
||||
props: ['leftText', 'companyCode', 'recipientId', 'centerText']
|
||||
};
|
||||
|
|
|
@ -259,7 +259,9 @@
|
|||
v-bind:company-code="invoice.companyCode"
|
||||
v-bind:left-text="$t('invoiceRef', [invoice.ref])"
|
||||
v-bind:center-text="client.socialName"
|
||||
v-bind:recipient-id="client.id"
|
||||
v-bind="$props"
|
||||
|
||||
>
|
||||
</report-footer>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue