Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2279-save_button_if_new_data
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2020-12-16 14:53:29 +01:00
commit 9d2f9e45ff
26 changed files with 309 additions and 239 deletions

View File

@ -442,13 +442,13 @@ INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
VALUES
(241, 442, 'ES111122333344111122221111', 128);
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`)
INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, `companyCode`, `sage200Company`, `expired`, `phytosanitary`)
VALUES
(69 , 'CCs', NULL, 30, NULL, 0, NULL),
(442 , 'VNL', 241, 30, 2 , 1, NULL),
(567 , 'VNH', NULL, 30, NULL, 4, NULL),
(791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30'),
(1381, 'ORN', NULL, 30, NULL, 7, NULL);
(69 , 'CCs', NULL, 30, NULL, 0, NULL, NULL),
(442 , 'VNL', 241, 30, 2 , 1, NULL, 'VNL Company - Plant passport'),
(567 , 'VNH', NULL, 30, NULL, 4, NULL, 'VNH Company - Plant passport'),
(791 , 'FTH', NULL, 30, NULL, 3, '2015-11-30', NULL),
(1381, 'ORN', NULL, 30, NULL, 7, NULL, 'ORN Company - Plant passport');
INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`)
VALUES

View File

@ -4,7 +4,7 @@
*/
.grid {
font-family: Arial, sans-serif;
font-family: Arial, Helvetica, sans-serif;
font-size: 16px !important;
width: 100%
}
@ -63,7 +63,6 @@
.panel {
position: relative;
margin-bottom: 15px;
padding-top: 10px;
break-inside: avoid;
break-before: always;
break-after: always;
@ -72,10 +71,11 @@
.panel .header {
background-color: #FFF;
padding: 2.5px 10px;
position: absolute;
position: relative;
font-weight: bold;
top: 0px;
display: inline-block;
left: 17.5px;
top: 10px;
}
.panel .body {
@ -168,18 +168,22 @@ table {
.column-oriented td,
.column-oriented th {
padding: 5px 10px
padding: 10px
}
.column-oriented thead {
display: table-header-group;
background-color: #e5e5e5
display: table-header-group
}
.column-oriented thead tr {
border-bottom: 1px solid #808080;
border-top: 1px solid #808080;
background-color: #e5e5e5
border-top: 1px solid #AFB1B2;
background-color: #BABDBD;
border-bottom: 1px solid #AFB1B2;
}
.column-oriented thead.light tr {
background-color: #FFF;
color: #AFB1B2
}
.column-oriented tfoot {
@ -193,13 +197,10 @@ table {
}
.column-oriented tfoot tr:first-child td {
border-top: 2px solid #AFB1B2;
padding-top: 20px !important;
}
.column-oriented tfoot tr:first-child {
border-top: 2px solid #808080;
}
.column-oriented .description {
font-size: 0.8em
}

View File

@ -9,6 +9,6 @@ body {
.title {
margin-bottom: 20px;
font-weight: 100;
font-size: 2em;
font-size: 3em;
margin-top: 0
}

View File

@ -5,7 +5,6 @@
<div class="centerText" v-if="centerText" class="uppercase">{{centerText}}</div>
<div class="pageCount" v-html="$t('numPages')"></div>
</div>
<p class="phytosanitary" v-if="showPhytosanitary">{{phytosanitary}}</p>
<p class="privacy" v-html="$t('law.privacy')"></p>
</div>
</div>

View File

@ -1,18 +1,4 @@
const db = require('../../database');
module.exports = {
name: 'report-footer',
async serverPrefetch() {
const companyCode = this.companyCode || 'VNL';
this.phytosanitary = await this.getPhytosanitary(companyCode);
},
methods: {
getPhytosanitary(code) {
return db.findValue(`
SELECT phytosanitary FROM company c
WHERE c.code = :code`, {code});
}
},
props: ['companyCode', 'showPhytosanitary', 'leftText', 'centerText']
props: ['leftText', 'centerText']
};

View File

@ -4,4 +4,5 @@ require('./uppercase');
require('./currency');
require('./percentage');
require('./number');
require('./zerofill');

View File

@ -0,0 +1,9 @@
import zerofill from '../zerofill.js';
describe('zerofill filter', () => {
const superDuperNumber = 1984;
it('should filter the number filling it with zeros up to 6 characters length', () => {
expect(zerofill(superDuperNumber, '000000')).toEqual('001984');
});
});

View File

@ -0,0 +1,11 @@
const {KeyValueModel} = require('loopback');
const Vue = require('vue');
const zerofill = function(value, pad) {
const valueStr = String(value);
return pad.substring(0, pad.length - valueStr.length) + valueStr;
};
Vue.filter('zerofill', zerofill);
module.exports = zerofill;

View File

@ -9,3 +9,11 @@
.bottom-line tr:nth-last-child() {
border-bottom: none;
}
.report-info {
font-size: 20px
}
.description strong {
text-transform: uppercase;
}

View File

@ -14,7 +14,7 @@
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<div class="size75">
<table class="row-oriented">
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray">{{$t('Client')}}</td>
@ -59,29 +59,22 @@
</tr>
</thead>
<tbody v-for="sale in sales">
<tr class="font bold">
<td>{{sale.itemFk}}</td>
<tr>
<td>{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{Math.trunc(sale.subtotal)}}</td>
<td width="50%">{{sale.concept}}</td>
</tr>
<tr class="description">
<td>
<div v-if="sale.value5">
<strong class="font gray">{{sale.tag5}}</strong>
<span>{{sale.value5}}</span>
</div>
</td>
<td class="centered">
<div v-if="sale.value6">
<strong class="font gray">{{sale.tag6}}</strong>
<span>{{sale.value6}}</span>
</div>
</td>
<td class="align-right">
<div v-if="sale.value7">
<strong class="font gray">{{sale.tag7}}</strong>
<span>{{sale.value7}}</span>
</div>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</span>
<span v-if="sale.value6">
<strong>{{sale.tag6}}</strong> {{sale.value6}}
</span>
<span v-if="sale.value7">
<strong>{{sale.tag7}}</strong> {{sale.value7}}
</span>
</td>
</tr>
</tbody>

View File

@ -1,7 +1,3 @@
table.column-oriented {
margin-top: 50px !important
}
.sign {
margin: 150px auto;
width: 300px

View File

@ -12,25 +12,23 @@
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="size75">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('claimId')}}</td>
<th>{{claimId}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('claimId')}}</td>
<th>{{claimId}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
<div class="size50">
<div class="panel">
@ -51,7 +49,7 @@
</div>
</div>
<table class="column-oriented">
<table class="column-oriented vn-mt-lg">
<thead>
<tr>
<th>{{$t('reference')}}</th>

View File

@ -9,15 +9,32 @@
max-width: 150px
}
.description.phytosanitary {
background-color: #e5e5e5
.description strong {
text-transform: uppercase;
}
h3 {
h2 {
font-weight: 100;
color: #555
}
.ticket-info {
font-size: 20px
font-size: 26px
}
#phytosanitary {
padding-right: 10px
}
#phytosanitary .flag img {
width: 100%
}
#phytosanitary .flag .flag-text {
padding-left: 10px;
box-sizing: border-box;
}
.phytosanitary-info {
margin-top: 10px
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -14,7 +14,7 @@
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="size75">
<div class="size75 vn-mt-lg">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
@ -66,59 +66,46 @@
</div>
<!-- Sales block -->
<h3>{{$t('saleLines')}}</h3>
<h2>{{$t('saleLines')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<td>{{$t('reference')}}</td>
<td class="number">{{$t('quantity')}}</td>
<td width="50%">{{$t('concept')}}</td>
<td class="number">{{$t('price')}}</td>
<td class="centered">{{$t('discount')}}</td>
<td class="centered">{{$t('vat')}}</td>
<td class="number">{{$t('amount')}}</td>
<th width="5%">{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number">{{$t('price')}}</th>
<th class="centered" width="5%">{{$t('discount')}}</th>
<th class="centered">{{$t('vat')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales">
<tr class="font bold">
<td>{{sale.itemFk}}</td>
<tbody v-for="sale in sales" class="no-page-break">
<tr>
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered">{{(sale.discount / 100) | percentage}}</td>
<td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td>
<td class="number">{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description">
<td colspan="2" class="centered">
<div v-if="sale.value5">
<strong class="font gray">{{sale.tag5}}</strong>
<span>{{sale.value5}}</span>
</div>
</td>
<td colspan="3" class="centered">
<div v-if="sale.value6">
<strong class="font gray">{{sale.tag6}}</strong>
<span>{{sale.value6}}</span>
</div>
</td>
<td colspan="2" class="centered">
<div v-if="sale.value7">
<strong class="font gray">{{sale.tag7}}</strong>
<span>{{sale.value7}}</span>
</div>
</td>
</tr>
<tr class="description phytosanitary" v-if="sale.passportNumber">
<tr class="description font light-gray">
<td colspan="7">
{{sale.ediBotanic}} {{sale.denomination}} {{sale.countryCode}}-{{sale.passportNumber}}
<span v-if="sale.isProtectedZone">ZP</span>
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</span>
<span v-if="sale.value6">
<strong>{{sale.tag6}}</strong> {{sale.value6}}
</span>
<span v-if="sale.value7">
<strong>{{sale.tag7}}</strong> {{sale.value7}}
</span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6">
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{getSubTotal() | currency('EUR', $i18n.locale)}}</td>
@ -130,52 +117,89 @@
<div class="columns">
<!-- Services block-->
<div class="size100 no-page-break" v-if="services.length > 0">
<h3>{{$t('services')}}</h3>
<h2>{{$t('services')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<td>{{$t('concept')}}</td>
<td class="number">{{$t('quantity')}}</td>
<td>{{$t('vatType')}}</td>
<td class="number">{{$t('amount')}}</td>
<th width="5%"></th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number">{{$t('price')}}</th>
<th class="centered" width="5%"></th>
<th class="centered">{{$t('vat')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="service in services">
<td>{{service.description}}</td>
<td width="5%"></td>
<td class="number">{{service.quantity}}</td>
<td>{{service.taxDescription}}</td>
<td width="50%">{{service.description}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%"></td>
<td class="centered">{{service.taxDescription}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3"></td>
<td class="number">{{$t('total')}} {{serviceTotal | currency('EUR', $i18n.locale)}}</td>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{serviceTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<!-- End of services block -->
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<h3>{{$t('taxBreakdown')}}</h3>
</div>
<div class="columns">
<!-- Packages block -->
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
<h2>{{$t('packagings')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<td width="45%">{{$t('type')}}</td>
<td width="20%" class="number">
<th>{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th wihth="75%">{{$t('concept')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="packaging in packagings">
<td>{{packaging.itemFk | zerofill('000000')}}</td>
<td class="number">{{packaging.quantity}}</td>
<td width="85%">{{packaging.name}}</td>
</tr>
</tbody>
</table>
</div>
<!-- End of packages block -->
</div>
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<!-- <h2>{{$t('taxBreakdown')}}</h2> -->
<table class="column-oriented">
<thead>
<tr>
<th colspan="4">{{$t('taxBreakdown')}}</th>
</tr>
</thead>
<thead class="light">
<tr>
<th width="45%">{{$t('type')}}</th>
<th width="25%" class="number">
{{$t('taxBase')}}
</td>
<td>{{$t('tax')}}</td>
<td class="number">{{$t('fee')}}</td>
</th>
<th>{{$t('tax')}}</th>
<th class="number">{{$t('fee')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="20%" class="number">
<td width="25%" class="number">
{{tax.Base | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.vatPercent | percentage}}</td>
@ -199,29 +223,45 @@
</table>
</div>
<!-- End of taxes block -->
<!-- Packages block -->
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
<h3>{{$t('packagings')}}</h3>
<table class="column-oriented">
<thead>
<tr>
<td>Id</td>
<td>{{$t('concept')}}</td>
<td class="number">{{$t('quantity')}}</td>
</tr>
</thead>
<tbody>
<tr v-for="packaging in packagings">
<td>{{packaging.itemFk}}</td>
<td>{{packaging.name}}</td>
<td class="number">{{packaging.quantity}}</td>
</tr>
</tbody>
</table>
<!-- Phytosanitary block -->
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
<div class="flag">
<div class="columns">
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')"/>
</div>
<div class="size75 flag-text">
<strong>{{$t('plantPassport')}}</strong><br/>
</div>
</div>
</div>
<div class="phytosanitary-info">
<div>
<strong>A</strong>
<span>{{getBotanical()}}</span>
</div>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<div>
<strong>C</strong>
<span>{{ticket.id}}</span>
</div>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
</div>
<!-- End of packages block -->
<!-- End of phytosanitary block -->
</div>
<div class="columns">
<!-- Signature block -->
<div class="size50 pull-left no-page-break">
<div id="signature" class="panel" v-if="signature && signature.id">
@ -239,7 +279,6 @@
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:company-code="ticket.companyCode"
v-bind:show-phytosanitary="true"
v-bind:left-text="$t('ticket', [ticket.id])"
v-bind:center-text="client.socialName"
v-bind="$props">

View File

@ -95,6 +95,22 @@ module.exports = {
},
getTotal() {
return this.getTotalBase() + this.getTotalTax();
},
getBotanical() {
let phytosanitary = [];
this.sales.forEach(sale => {
let itemPhytosanitary;
if (sale.latinGenusName || sale.latinSpeciesName)
itemPhytosanitary = [sale.latinGenusName, sale.latinSpeciesName].filter(Boolean).join(' ');
else if (sale.botanical)
itemPhytosanitary = sale.botanical;
phytosanitary.push(itemPhytosanitary);
});
return phytosanitary.filter((item, index) =>
phytosanitary.indexOf(item) == index
).join(', ');
}
},
components: {

View File

@ -23,4 +23,5 @@ packagings: Buckets and packaging
services: Services
vatType: VAT Type
digitalSignature: Digital signature
ticket: Delivery note {0}
ticket: Delivery note {0}
plantPassport: Plant passport

View File

@ -23,4 +23,5 @@ packagings: Cubos y embalajes
services: Servicios
vatType: Tipo de IVA
digitalSignature: Firma digital
ticket: Albarán {0}
ticket: Albarán {0}
plantPassport: Pasaporte fitosanitario

View File

@ -23,4 +23,5 @@ packagings: Bacs et emballages
services: Service
vatType: Type de TVA
digitalSignature: Signature numérique
ticket: BL {0}
ticket: BL {0}
plantPassport: Passeport phytosanitaire

View File

@ -23,4 +23,5 @@ packagings: Baldes e Embalagens
services: Serviços
vatType: Tipo de IVA
digitalSignature: Assinatura digital
ticket: Nota de Entrega {0}
ticket: Nota de Entrega {0}
plantPassport: Passaporte vegetal

View File

@ -14,10 +14,9 @@ SELECT
i.inkFk,
s.ticketFk,
tcl.code vatType,
ibwg.ediBotanic,
ppa.denomination,
pp.number passportNumber,
be.isProtectedZone, c.code AS countryCode,
ib.botanical,
eg.latinGenusName,
es.latinSpeciesName,
i.tag5,
i.value5,
i.tag6,
@ -34,20 +33,14 @@ FROM vn.sale s
LEFT JOIN country c ON c.id = o.countryFk
LEFT JOIN supplier sp ON sp.id = t.companyFk
LEFT JOIN itemType it ON it.id = i.typeFk
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
LEFT JOIN itemTaxCountry itc ON itc.itemFk = i.id
AND itc.countryFk = sp.countryFk
LEFT JOIN taxClass tcl ON tcl.id = itc.taxClassFk
LEFT JOIN plantpassport pp ON pp.producerFk = i.producerFk
LEFT JOIN plantpassportAuthority ppa ON ppa.id = pp.plantpassportAuthorityFk
LEFT JOIN itemBotanicalWithGenus ibwg ON ibwg.itemFk = i.id
LEFT JOIN botanicExport be ON be.restriction = 'pasaporte fitosanitario'
LEFT JOIN ediGenus eg ON eg.id = be.ediGenusFk
LEFT JOIN ediSpecie es ON es.id = be.ediSpecieFk
AND ibwg.ediBotanic LIKE CONCAT(
IFNULL(eg.latinGenusName, ''),
IF(es.latinSpeciesName > '',
CONCAT(' ', es.latinSpeciesName), ''),
'%')
LEFT JOIN itemBotanical ib ON ib.itemFk = i.id
AND ic.code = 'plant'
LEFT JOIN ediGenus eg ON eg.id = ib.genusFk
LEFT JOIN ediSpecie es ON es.id = ib.specieFk
WHERE s.ticketFk = ?
GROUP BY s.id
ORDER BY (it.isPackaging), s.concept, s.itemFk

View File

@ -1,5 +1,5 @@
SELECT
tc.description taxDescription,
tc.code taxDescription,
ts.description,
ts.quantity,
ts.price

View File

@ -86,11 +86,11 @@
<table class="column-oriented repeatable">
<thead>
<tr>
<td class="number">{{$t('order')}}</td>
<td class="number">{{$t('ticket')}}</td>
<td width="50%">{{$t('client')}}</td>
<td class="number">{{$t('address')}}</td>
<td class="number">{{$t('packages')}}</td>
<th class="number">{{$t('order')}}</th>
<th class="number">{{$t('ticket')}}</th>
<th width="50%">{{$t('client')}}</th>
<th class="number">{{$t('address')}}</th>
<th class="number">{{$t('packages')}}</th>
</tr>
</thead>
<tbody>

View File

@ -21,4 +21,4 @@ import: Importe
stowaway: Encajado dentro del ticket
route: Ruta
routeId: Ruta {0}
ticket: Tiquet
ticket: Ticket

View File

@ -3,4 +3,12 @@
h3 {
font-weight: 100;
color: #555
}
.report-info {
font-size: 20px
}
.description strong {
text-transform: uppercase;
}

View File

@ -14,26 +14,24 @@
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="size75">
<div class="body">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('entryId')}}</td>
<th>{{entry.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{entry.landed | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('ref')}}</td>
<th>{{entry.ref}}</th>
</tr>
</tbody>
</table>
</div>
<div class="body">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('entryId')}}</td>
<th>{{entry.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{entry.landed | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('ref')}}</td>
<th>{{entry.ref}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
@ -56,50 +54,43 @@
</div>
<!-- Buy block -->
<table class="column-oriented">
<table class="column-oriented vn-mt-lg">
<thead>
<tr>
<td class="number">{{$t('boxes')}}</td>
<td class="number">{{$t('packing')}}</td>
<td width="50%">{{$t('concept')}}</td>
<td width="10%" class="number">{{$t('quantity')}}</td>
<td width="15%" class="number">{{$t('price')}}</td>
<td width="15%" class="number">{{$t('amount')}}</td>
<th class="number">{{$t('boxes')}}</th>
<th class="number">{{$t('packing')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th width="10%" class="number">{{$t('quantity')}}</th>
<th width="15%" class="number">{{$t('price')}}</th>
<th width="15%" class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in buys">
<tr class="font bold">
<tr>
<td class="number">{{buy.box}}</td>
<td class="number">{{buy.packing}}</td>
<td width="50%">{{buy.itemName}}</td>
<td width="10%" class="number">{{buy.quantity | number}}</td>
<td width="10%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description">
<td colspan="2">
<div v-if="buy.value5">
<strong class="font gray">{{buy.tag5}}</strong>
<span>{{buy.value5}}</span>
</div>
</td>
<td colspan="2" class="centered">
<div v-if="buy.value6">
<strong class="font gray">{{buy.tag6}}</strong>
<span>{{buy.value6}}</span>
</div>
</td>
<td colspan="2" class="align-right">
<div v-if="buy.value7">
<strong class="font gray">{{buy.tag7}}</strong>
<span>{{buy.value7}}</span>
</div>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="buy.value5">
<strong>{{buy.tag5}}</strong> {{buy.value5}}
</span>
<span v-if="buy.value6">
<strong>{{buy.tag6}}</strong> {{buy.value6}}
</span>
<span v-if="buy.value7">
<strong>{{buy.tag7}}</strong> {{buy.value7}}
</span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<td colspan="5" class="font bold">
<span class="pull-right">{{$t('total')}}</span>
</td>
<td class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>