@@ -266,7 +266,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"
+
>
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js
index 42988113f..1c9965d3b 100755
--- a/print/templates/reports/invoice/invoice.js
+++ b/print/templates/reports/invoice/invoice.js
@@ -11,8 +11,12 @@ module.exports = {
this.client = await this.findOneFromDef('client', [this.reference]);
this.taxes = await this.rawSqlFromDef(`taxes`, [this.reference]);
this.hasIntrastat = await this.findValueFromDef(`hasIntrastat`, [this.reference]);
- this.intrastat = await this.rawSqlFromDef(`intrastat`,
- [this.reference, this.reference, this.reference, this.reference]);
+ this.intrastat = await this.rawSqlFromDef(`intrastat`, [
+ this.reference,
+ this.reference,
+ this.reference,
+ this.reference
+ ]);
this.rectified = await this.rawSqlFromDef(`rectified`, [this.reference]);
this.hasIncoterms = await this.findValueFromDef(`hasIncoterms`, [this.reference]);
diff --git a/print/templates/reports/invoice/sql/invoice.sql b/print/templates/reports/invoice/sql/invoice.sql
index 0f12e4f53..303fa937f 100644
--- a/print/templates/reports/invoice/sql/invoice.sql
+++ b/print/templates/reports/invoice/sql/invoice.sql
@@ -11,7 +11,7 @@ FROM invoiceOut io
JOIN client c ON c.id = io.clientFk
JOIN payMethod pm ON pm.id = c.payMethodFk
JOIN company cny ON cny.id = io.companyFk
- JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
+ LEFT JOIN supplierAccount sa ON sa.id = cny.supplierAccountFk
LEFT JOIN invoiceOutSerial ios ON ios.code = io.serial
LEFT JOIN ticket t ON t.refFk = io.ref
WHERE t.refFk = ?
\ No newline at end of file