refs #084200 recipientId
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-04-05 14:39:51 +02:00
parent 1e71f7487a
commit 014998952e
3 changed files with 15 additions and 17 deletions

View File

@ -1,5 +1,3 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<div> <div>
<div class="footer"> <div class="footer">
<div class="page"> <div class="page">
@ -8,10 +6,10 @@
<div class="pageCount" v-html="$t('numPages')"></div> <div class="pageCount" v-html="$t('numPages')"></div>
</div> </div>
<p <p
v-if="companyI18n && companyI18n.footnotes" v-if="company?.footnotes"
v-bind="`${companyI18n.footnotes}`"> v-html="company.footnotes">
</p> </p>
</div> </div>
</div> </div>
</html>

View File

@ -1,19 +1,17 @@
/* eslint-disable no-tabs */
const db = require('../../database'); const db = require('../../database');
module.exports = { module.exports = {
name: 'report-footer', name: 'report-footer',
async serverPrefetch() { async serverPrefetch() {
const company = await db.findOne(` this.company = await db.findOne(
SELECT `SELECT
ci.footnotes, ci.footnotes
c.code FROM companyI18n ci
FROM company c JOIN company c ON c.id = ci.companyFk
JOIN companyI18n ci ON ci.companyFk = c.id AND ci.lang = (SELECT lang FROM account.user LIMIT 1) WHERE c.code = ? AND ci.lang = (SELECT lang FROM account.user WHERE id = ?)`,
JOIN companyGroup cg ON cg.id = c.companyGroupFk [this.companyCode, this.recipientId]);
JOIN supplier s ON s.id = c.id
WHERE c.code = ?`, [this.companyCode]);
this.company = company;
}, },
props: ['leftText', 'companyCode', 'centerText']
props: ['leftText', 'companyCode', 'recipientId', 'centerText']
}; };

View File

@ -259,7 +259,9 @@
v-bind:company-code="invoice.companyCode" v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceRef', [invoice.ref])" v-bind:left-text="$t('invoiceRef', [invoice.ref])"
v-bind:center-text="client.socialName" v-bind:center-text="client.socialName"
v-bind:recipient-id="client.id"
v-bind="$props" v-bind="$props"
> >
</report-footer> </report-footer>
</template> </template>