diff --git a/print/common/css/report.css b/print/common/css/report.css index 9331481f47..e8161f1fb1 100644 --- a/print/common/css/report.css +++ b/print/common/css/report.css @@ -9,6 +9,6 @@ body { .title { margin-bottom: 20px; font-weight: 100; - font-size: 3em; + font-size: 2.6rem; margin-top: 0 } \ No newline at end of file diff --git a/print/templates/reports/delivery-note/assets/css/style.css b/print/templates/reports/delivery-note/assets/css/style.css index cbe894097e..f99c385fab 100644 --- a/print/templates/reports/delivery-note/assets/css/style.css +++ b/print/templates/reports/delivery-note/assets/css/style.css @@ -19,7 +19,7 @@ h2 { } .ticket-info { - font-size: 26px + font-size: 22px } #phytosanitary { diff --git a/print/templates/reports/invoice/assets/css/style.css b/print/templates/reports/invoice/assets/css/style.css index 6e2a495e89..cd605db9bc 100644 --- a/print/templates/reports/invoice/assets/css/style.css +++ b/print/templates/reports/invoice/assets/css/style.css @@ -4,7 +4,8 @@ h2 { } .table-title { - margin-bottom: 15px + margin-bottom: 15px; + font-size: 0.8rem } .table-title h2 { @@ -12,7 +13,12 @@ h2 { } .ticket-info { - font-size: 26px + font-size: 22px +} + +#nickname h2 { + max-width: 400px; + word-wrap: break-word } #phytosanitary { diff --git a/print/templates/reports/invoice/invoice.html b/print/templates/reports/invoice/invoice.html index e21507f7d8..fa888dafc7 100644 --- a/print/templates/reports/invoice/invoice.html +++ b/print/templates/reports/invoice/invoice.html @@ -101,8 +101,8 @@ {{ticket.shipped | date}} - -

{{ticket.nickname}}

+ +

{{ticket.nickname}}

@@ -125,7 +125,7 @@ - + - +
{{sale.price | currency('EUR', $i18n.locale)}} {{(sale.discount / 100) | percentage}} {{sale.vatType}}{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}{{saleImport(sale) | currency('EUR', $i18n.locale)}}
@@ -146,7 +146,7 @@ {{$t('subtotal')}} {{subTotal(ticket) | currency('EUR', $i18n.locale)}}{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}
diff --git a/print/templates/reports/invoice/invoice.js b/print/templates/reports/invoice/invoice.js index 72f27a69a5..d6f4903336 100755 --- a/print/templates/reports/invoice/invoice.js +++ b/print/templates/reports/invoice/invoice.js @@ -59,15 +59,6 @@ module.exports = { const vat = this.sumTotal(this.taxes, 'vat'); return base + vat; } - /* - serviceTotal() { - let total = 0.00; - this.services.forEach(service => { - total += parseFloat(service.price) * service.quantity; - }); - - return total; - } */ }, methods: { fetchInvoice(invoiceId) { @@ -100,17 +91,18 @@ module.exports = { fetchRectified(invoiceId) { return this.rawSqlFromDef(`rectified`, [invoiceId]); }, - subTotal(ticket) { + saleImport(sale) { + const price = sale.quantity * sale.price; + + return price * (1 - sale.discount / 100); + }, + ticketSubtotal(ticket) { let subTotal = 0.00; - ticket.sales.forEach(sale => { - subTotal += sale.quantity * sale.price * (1 - sale.discount / 100); - }); + for (let sale of ticket.sales) + subTotal += this.saleImport(sale); return subTotal; }, - getTotal() { - return this.getTotalBase() + this.getTotalTax(); - }, sumTotal(rows, prop) { let total = 0.00; for (let row of rows)