Report template
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2022-11-10 08:57:42 +01:00
parent 89e49c3843
commit b8add5b0bc
35 changed files with 1608 additions and 1868 deletions

View File

@ -4,6 +4,7 @@ parserOptions:
sourceType: "module" sourceType: "module"
plugins: plugins:
- jasmine - jasmine
- html
env: env:
jasmine: true jasmine: true
rules: rules:

View File

@ -2,7 +2,10 @@
{ {
// Carácter predeterminado de final de línea. // Carácter predeterminado de final de línea.
"files.eol": "\n", "files.eol": "\n",
"editor.codeActionsOnSave": { "editor.bracketPairColorization.enabled": true,
"source.fixAll.eslint": true "editor.guides.bracketPairs": true,
} "editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": ["javascript", "html"]
} }

View File

@ -63,6 +63,7 @@
"del": "^2.2.2", "del": "^2.2.2",
"eslint": "^7.11.0", "eslint": "^7.11.0",
"eslint-config-google": "^0.11.0", "eslint-config-google": "^0.11.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-jasmine": "^2.10.1", "eslint-plugin-jasmine": "^2.10.1",
"fancy-log": "^1.3.2", "fancy-log": "^1.3.2",
"file-loader": "^1.1.11", "file-loader": "^1.1.11",

View File

@ -1,190 +1,167 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row info-panel">
<table class="grid"> <div class="grid-block">
<tbody> <h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
<tr> </div>
<td> </div>
<!-- Header block --> <table>
<report-header v-bind="$props"></report-header> <tbody>
<tr>
<!-- Block --> <td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td>
<div class="grid-row info-panel"> <th>
<div class="grid-block"> <div class="field wide-rectangle">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1> <span></span>
</div> </div>
</div> </th>
</tr>
<!-- Block --> </tbody>
<table> </table>
<tbody> <div class="grid-row">
<tr> <div class="grid-block">
<td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td> <div class="info-panel">
<th> <div class="green-background">
<div class="field wide-rectangle"> <h3>{{$t('fields.companyInfo')}}</h3>
<span></span> </div>
</div> <div class="body">
</th> <table style="width: 100%">
</tr> <tbody>
</tbody> <tr>
</table> <td>{{$t('fields.companyName')}}:</td>
<th colspan="3">
<!-- Block --> <div class="field wide-rectangle">
<div class="grid-row"> <span></span>
<div class="grid-block">
<div class="info-panel">
<div class="green-background">
<h3>{{$t('fields.companyInfo')}}</h3>
</div> </div>
<div class="body"> </th>
<table style="width: 100%"> </tr>
<tbody> <tr>
<tr> <td>{{$t('fields.businessType')}}:</td>
<td>{{$t('fields.companyName')}}:</td> <th>
<th colspan="3"> <div class="field wide-rectangle">
<div class="field wide-rectangle"> <span></span>
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.businessType')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.antiquity')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.surface')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.numberOfEmployees')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.owner')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.payer')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div> </div>
</th>
<td>{{$t('fields.antiquity')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.surface')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.numberOfEmployees')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.owner')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.payer')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block">
<div class="info-panel" style="width: 98%">
<div class="green-background">
<h3>{{$t('fields.economicInfo')}}</h3>
</div>
<div class="body">
<table>
<tbody>
<tr class="row-oriented">
<td>{{$t('fields.previousSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedPurchases')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block">
<div>
<table style="border-top: 1px solid #DDD" class="info-panel">
<tbody>
<tr class="row-oriented" style="width: 100%">
<td>{{$t('fields.personFilling')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div> </div>
</div> </th>
</div> <td>{{$t('fields.phone')}}:</td>
<th>
<!-- Block --> <div class="field wide-rectangle">
<div class="grid-row"> <span></span>
<div class="grid-block">
<div class="info-panel" style="width: 98%">
<div class="green-background">
<h3>{{$t('fields.economicInfo')}}</h3>
</div>
<div class="body">
<table>
<tbody>
<tr class="row-oriented">
<td>{{$t('fields.previousSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedPurchases')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div> </div>
</div> </th>
</div> </tr>
</tbody>
<!-- Block --> </table>
<div class="grid-row"> </div>
<div class="grid-block"> </div>
<div> </div>
<table style="border-top: 1px solid #DDD" class="info-panel"> <report-footer
<tbody> id="pageFooter"
<tr class="row-oriented" style="width: 100%"> v-bind:left-text="dated"
<td>{{$t('fields.personFilling')}}:</td> v-bind="$props">
<th> </report-footer>
<div class="field wide-rectangle"> </report-body>
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer
id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -12,6 +13,7 @@ const rptCreditRequest = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
} }

View File

@ -1,161 +1,146 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row route-block" v-for="route in routes">
<table class="grid"> <div class="grid-block">
<tbody> <h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
<tr> <div class="panel">
<td> <div class="header">{{$t('information')}}</div>
<!-- Header block --> <div class="body">
<report-header v-bind="$props"></report-header> <div>
<!-- Block --> <table width="100%">
<div class="grid-row route-block" v-for="route in routes"> <tbody>
<div class="grid-block"> <tr>
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1> <th class="font gray align-right">{{$t('route')}}</th>
<div class="panel"> <td>{{route.id}}</td>
<div class="header">{{$t('information')}}</div> <th class="font gray align-right">{{$t('driver')}}</th>
<div class="body"> <td>{{route.userNickName}}</td>
<div> </tr>
<table width="100%"> <tr>
<tbody> <th class="font gray align-right">{{$t('date')}}</th>
<tr> <td>{{route.created | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('route')}}</th> <th class="font gray align-right">{{$t('vehicle')}}</th>
<td>{{route.id}}</td> <td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
<th class="font gray align-right">{{$t('driver')}}</th> </tr>
<td>{{route.userNickName}}</td> <tr>
</tr> <th class="font gray align-right">{{$t('time')}}</th>
<tr> <td>{{route.time | date('%H:%M')}}</td>
<th class="font gray align-right">{{$t('date')}}</th> <td></td>
<td>{{route.created | date('%d-%m-%Y')}}</td> <td>{{route.plateNumber}}</td>
<th class="font gray align-right">{{$t('vehicle')}}</th> </tr>
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td> <tr>
</tr> <th class="font gray align-right">{{$t('volume')}}</th>
<tr> <td>{{route.m3}}</td>
<th class="font gray align-right">{{$t('time')}}</th> <th class="font gray align-right">{{$t('agency')}}</th>
<td>{{route.time | date('%H:%M')}}</td> <td>{{route.agencyName}}</td>
<td></td> </tr>
<td>{{route.plateNumber}}</td> </tbody>
</tr> </table>
<tr> <div class="contained">
<th class="font gray align-right">{{$t('volume')}}</th> <table class="middle centered" width="70%">
<td>{{route.m3}}</td> <tbody>
<th class="font gray align-right">{{$t('agency')}}</th> <tr>
<td>{{route.agencyName}}</td> <td>
</tr> <p class="small">Hora inicio</p>
</tbody> </td>
</table> <td>
<div class="contained"> <p class="small">Hora fin</p>
<table class="middle centered" width="70%"> </td>
<tbody> <td class="gap"></td>
<tr> <td>
<td> <p class="small">Km inicio</p>
<p class="small">Hora inicio</p> </td>
</td> <td>
<td> <p class="small">Km fin</p>
<p class="small">Hora fin</p> </td>
</td> </tr>
<td class="gap"></td> <tr>
<td> <td v-for="i in 2">
<p class="small">Km inicio</p> <div class="field rectangle">
</td> <span></span>
<td> </div>
<p class="small">Km fin</p> </td>
</td> <td class="gap"></td>
</tr> <td v-for="i in 2">
<tr> <div class="field rectangle">
<td v-for="i in 2"> <span></span>
<div class="field rectangle"> </div>
<span></span> </td>
</div> </tr>
</td> </tbody>
<td class="gap"></td> </table>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Route ticket list -->
<div v-if="route.tickets" v-for="ticket in route.tickets" class="no-page-break">
<div>
<table class="column-oriented repeatable">
<thead>
<tr>
<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>
<th>{{$t('packagingType')}}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="number">{{ticket.priority}}</td>
<td class="number">{{ticket.id}}</td>
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
<td v-if="ticket.addressFk" class="number">
{{ticket.addressFk.toString().substr(0,
ticket.addressFk.toString().length - 3)}}
<span class="black-container">
{{ticket.addressFk.toString().substr(-3, 3)}}
</span>
</td>
<td class="number">{{ticket.packages}}</td>
<td>{{ticket.itemPackingTypes}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('street')}}</th>
<td>{{ticket.street}}</td>
<th class="font gray align-right">{{$t('postcode')}}</th>
<td>{{ticket.postalCode}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('city')}}</th>
<td>{{ticket.city}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{ticket.ticketAgency}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('mobile')}}</th>
<td>{{ticket.mobile}}</td>
<th class="font gray align-right">{{$t('phone')}}</th>
<td>{{ticket.phone}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('warehouse')}}</th>
<td>{{ticket.warehouseName}}</td>
<th class="font gray align-right">{{$t('salesPerson')}}</th>
<td>{{ticket.salesPersonName}}</td>
</tr>
</tbody>
</table>
<div v-if="ticket.description" class="text-area">
<p>{{ticket.description}}</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:left-text="$t('routeId', [id])" <div v-if="route.tickets" v-for="ticket in route.tickets" class="no-page-break">
v-bind="$props"> <div>
</report-footer> <table class="column-oriented repeatable">
</td> <thead>
</tr> <tr>
</tbody> <th class="number">{{$t('order')}}</th>
</table> <th class="number">{{$t('ticket')}}</th>
</body> <th width="50%">{{$t('client')}}</th>
</html> <th class="number">{{$t('address')}}</th>
<th class="number">{{$t('packages')}}</th>
<th>{{$t('packagingType')}}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="number">{{ticket.priority}}</td>
<td class="number">{{ticket.id}}</td>
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
<td v-if="ticket.addressFk" class="number">
{{ticket.addressFk.toString().substr(0,
ticket.addressFk.toString().length - 3)}}
<span class="black-container">
{{ticket.addressFk.toString().substr(-3, 3)}}
</span>
</td>
<td class="number">{{ticket.packages}}</td>
<td>{{ticket.itemPackingTypes}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('street')}}</th>
<td>{{ticket.street}}</td>
<th class="font gray align-right">{{$t('postcode')}}</th>
<td>{{ticket.postalCode}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('city')}}</th>
<td>{{ticket.city}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{ticket.ticketAgency}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('mobile')}}</th>
<td>{{ticket.mobile}}</td>
<th class="font gray align-right">{{$t('phone')}}</th>
<td>{{ticket.phone}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('warehouse')}}</th>
<td>{{ticket.warehouseName}}</td>
<th class="font gray align-right">{{$t('salesPerson')}}</th>
<td>{{ticket.salesPersonName}}</td>
</tr>
</tbody>
</table>
<div v-if="ticket.description" class="text-area">
<p>{{ticket.description}}</p>
</div>
</div>
</div>
</div>
</div>
<report-footer id="pageFooter"
v-bind:left-text="$t('routeId', [id])"
v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -39,6 +40,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,127 +1,107 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props" v-bind:company-code="entry.companyCode">
<body> </report-header>
<table class="grid"> <div class="grid-row">
<tbody> <div class="grid-block">
<tr> <div class="columns">
<td> <div class="size50">
<!-- Header block --> <div class="body">
<report-header v-bind="$props" <h1 class="title uppercase">{{$t('title')}}</h1>
v-bind:company-code="entry.companyCode"> <table class="row-oriented report-info">
</report-header> <tbody>
<!-- Block --> <tr>
<div class="grid-row"> <td class="font gray uppercase">{{$t('entryId')}}</td>
<div class="grid-block"> <th>{{entry.id}}</th>
<div class="columns"> </tr>
<div class="size50"> <tr>
<div class="body"> <td class="font gray uppercase">{{$t('date')}}</td>
<h1 class="title uppercase">{{$t('title')}}</h1> <th>{{entry.landed | date('%d-%m-%Y')}}</th>
<table class="row-oriented report-info"> </tr>
<tbody> <tr>
<tr> <td class="font gray uppercase">{{$t('ref')}}</td>
<td class="font gray uppercase">{{$t('entryId')}}</td> <th>{{entry.ref}}</th>
<th>{{entry.id}}</th> </tr>
</tr> </tbody>
<tr> </table>
<td class="font gray uppercase">{{$t('date')}}</td> </div>
<th>{{entry.landed | date('%d-%m-%Y')}}</th> </div>
</tr> <div class="size50">
<tr> <div class="panel">
<td class="font gray uppercase">{{$t('ref')}}</td> <div class="header">{{$t('supplierData')}}</div>
<th>{{entry.ref}}</th> <div class="body">
</tr> <h3 class="uppercase">{{supplier.name}}</h3>
</tbody> <div>
</table> {{supplier.street}}
</div> </div>
</div> <div>
<div class="size50"> {{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})
<div class="panel"> </div>
<div class="header">{{$t('supplierData')}}</div> <div>
<div class="body"> {{supplier.nif}}
<h3 class="uppercase">{{supplier.name}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})
</div>
<div>
{{supplier.nif}}
</div>
</div>
</div>
</div>
</div>
<!-- Buy block -->
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
<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>
<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($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 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" class="font bold">
<span class="pull-right">{{$t('total')}}</span>
</td>
<td class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<!-- End of buy block -->
<div class="columns">
<div class="size50">
<div id="notes" class="panel no-page-break" v-if="entry.notes">
<div class="body">
<h3>{{$t('notes')}}</h3>
<div>
{{entry.notes}}
</div>
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:left-text="$t('entry', [entry.id])" </div>
v-bind:company-code="entry.companyCode" <table class="column-oriented vn-mt-ml">
v-bind:center-text="supplier.name" <thead>
v-bind:="$props"> <tr>
</report-footer> <th class="number">{{$t('boxes')}}</th>
</td> <th class="number">{{$t('packing')}}</th>
</tr> <th width="50%">{{$t('concept')}}</th>
</tbody> <th width="10%" class="number">{{$t('quantity')}}</th>
</table> <th width="15%" class="number">{{$t('price')}}</th>
</body> <th width="15%" class="number">{{$t('amount')}}</th>
</html> </tr>
</thead>
<tbody v-for="buy in buys">
<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($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 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" class="font bold">
<span class="pull-right">{{$t('total')}}</span>
</td>
<td class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="columns">
<div class="size50">
<div id="notes" class="panel no-page-break" v-if="entry.notes">
<div class="body">
<h3>{{$t('notes')}}</h3>
<div>
{{entry.notes}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<report-footer id="pageFooter" v-bind:left-text="$t('entry', [entry.id])" v-bind:company-code="entry.companyCode"
v-bind:center-text="supplier.name" v-bind:="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,51 +1,35 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <h1 class="title centered uppercase">{{$t('title')}}</h1>
<tr> <p>{{$t('toAttention')}}</p>
<td> <p v-html="$t('declaration', [invoice.ref, issued])"></p>
<!-- Header block --> <p>
<report-header v-bind="$props"></report-header> <ul>
<!-- Block --> <li v-for="responsibility in $t('responsibilities')">
<div class="grid-row"> {{responsibility}}
<div class="grid-block"> </li>
<h1 class="title centered uppercase">{{$t('title')}}</h1> </ul>
<p>{{$t('toAttention')}}</p> </p>
<p v-html="$t('declaration', [invoice.ref, issued])"></p> <div class="signature">
<p> <p>{{$t('issued', [
<ul> 'Algemesí',
<li v-for="responsibility in $t('responsibilities')"> invoice.issued.getDate(),
{{responsibility}} $t('months')[invoice.issued.getMonth()],
</li> invoice.issued.getFullYear()])
</ul> }}
</p> </p>
<div class="signature"> <p><em>({{$t('signature')}})</em></p>
<p>{{$t('issued', [ <img v-bind:src="getReportSrc('signature.png')">
'Algemesí', <p>
invoice.issued.getDate(), <div>{{$t('signer.name')}}: {{company.manager}}</div>
$t('months')[invoice.issued.getMonth()], <div>{{$t('signer.ID')}}: {{company.managerFi}}</div>
invoice.issued.getFullYear()]) <div>{{$t('signer.position')}}: {{$t('manager')}}</div>
}} </p>
</p> </div>
<p><em>({{$t('signature')}})</em></p> </div>
<img v-bind:src="getReportSrc('signature.png')"> </div>
<p> <report-footer id="pageFooter" v-bind:left-text="$t('invoice', [invoice.ref])" v-bind="$props">
<div>{{$t('signer.name')}}: {{company.manager}}</div> </report-footer>
<div>{{$t('signer.ID')}}: {{company.managerFi}}</div> </report-body>
<div>{{$t('signer.position')}}: {{$t('manager')}}</div>
</p>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('invoice', [invoice.ref])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -25,6 +26,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,84 +1,67 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <h1 class="title uppercase">{{$t('title')}}</h1>
<tr> </div>
<td> </div>
<!-- Header block --> <div class="grid-row vn-mb-lg" v-for="travel in travels">
<report-header v-bind="$props"></report-header> <div class="grid-block">
<div class="grid-row"> <div class="panel">
<div class="grid-block"> <div class="header">{{$t('information')}}</div>
<h1 class="title uppercase">{{$t('title')}}</h1> <div class="body">
</div> <div>
</div> <table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('reference')}}</th>
<td>{{travel.ref}}</td>
<th class="font gray align-right">{{$t('blockedKg')}}</th>
<td>{{travel.kg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('packages')}}</th>
<td>{{travel.stickers}}</td>
<th class="font gray align-right">{{$t('volumeKg')}}</th>
<td>{{travel.volumeKg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('shipped')}}</th>
<td>{{travel.shipped | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('physicalKg')}}</th>
<td>{{travel.loadedKg | number($i18n.locale)}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Block --> <table class="column-oriented">
<div class="grid-row vn-mb-lg" v-for="travel in travels"> <thead>
<div class="grid-block"> <tr>
<div class="panel"> <th>{{$t('supplier')}}</th>
<div class="header">{{$t('information')}}</div> <th>{{$t('reference')}}</th>
<div class="body"> <th class="number">{{$t('volKg')}}</th>
<div> <th class="number">{{$t('phyKg')}}</th>
<table width="100%"> <th class="number">{{$t('packages')}}</th>
<tbody> </tr>
<tr> </thead>
<th class="font gray align-right">{{$t('reference')}}</th> <tbody>
<td>{{travel.ref}}</td> <tr v-for="entry in travel.entries">
<th class="font gray align-right">{{$t('blockedKg')}}</th> <td>{{entry.supplierName}}</td>
<td>{{travel.kg | number($i18n.locale)}}</td> <td>{{entry.ref}}</td>
</tr> <td class="number">{{entry.volumeKg | number($i18n.locale)}}</td>
<tr> <td class="number">{{entry.loadedKg | number($i18n.locale)}}</td>
<th class="font gray align-right">{{$t('packages')}}</th> <td class="number">{{entry.stickers}}</td>
<td>{{travel.stickers}}</td> </tr>
<th class="font gray align-right">{{$t('volumeKg')}}</th> <tr v-if="!travel.entries">
<td>{{travel.volumeKg | number($i18n.locale)}}</td> <td colspan="5" class="centered">{{$t('noRows')}}</td>
</tr> </tr>
<tr> </tbody>
<th class="font gray align-right">{{$t('shipped')}}</th> </table>
<td>{{travel.shipped | date('%d-%m-%Y')}}</td> </div>
<th class="font gray align-right">{{$t('physicalKg')}}</th> </div>
<td>{{travel.loadedKg | number($i18n.locale)}}</td> <report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props">
</tr> </report-footer>
</tbody> </report-body>
</table>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('supplier')}}</th>
<th>{{$t('reference')}}</th>
<th class="number">{{$t('volKg')}}</th>
<th class="number">{{$t('phyKg')}}</th>
<th class="number">{{$t('packages')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="entry in travel.entries">
<td>{{entry.supplierName}}</td>
<td>{{entry.ref}}</td>
<td class="number">{{entry.volumeKg | number($i18n.locale)}}</td>
<td class="number">{{entry.loadedKg | number($i18n.locale)}}</td>
<td class="number">{{entry.stickers}}</td>
</tr>
<tr v-if="!travel.entries">
<td colspan="5" class="centered">{{$t('noRows')}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
const db = require(`vn-print/core/database`); const db = require(`vn-print/core/database`);
@ -100,6 +101,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,84 +1,59 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <p v-html="$t('description', {
<tr> socialName: client.socialName,
<td> name: client.name,
<!-- Header block --> address: client.street,
<report-header v-bind="$props"></report-header> country: client.country,
<!-- Block --> fiscalID: client.fi
<div class="grid-row"> })"></p>
<div class="grid-block"> <p v-html="$t('declaration', {
<p v-html="$t('description', { socialName: client.socialName
socialName: client.socialName, })"></p>
name: client.name, <p v-for="(declaration, $index) in $t('declarations')" v-html="$t('declarations[' + $index + ']', {
address: client.street, companyName: company.name,
country: client.country, companyCity: company.city,
fiscalID: client.fi socialName: client.socialName,
})"></p> destinationCountry: client.country
<p v-html="$t('declaration', { })">
socialName: client.socialName </p>
})"></p>
<p
v-for="(declaration, $index) in $t('declarations')"
v-html="$t('declarations[' + $index + ']', {
companyName: company.name,
companyCity: company.city,
socialName: client.socialName,
destinationCountry: client.country
})">
</p>
<div class="columns"> <div class="columns">
<div class="size50 signature"> <div class="size50 signature">
<p class="centered">{{client.name}}</p> <p class="centered">{{client.name}}</p>
<div class="dummy-signature centered"></div> <div class="dummy-signature centered"></div>
<p> <p>
<table> <table>
<tbody> <tbody>
<tr> <tr>
<td>{{$t('signer.representative')}}:</td> <td>{{$t('signer.representative')}}:</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>{{$t('signer.representativeRole')}}:</td> <td>{{$t('signer.representativeRole')}}:</td>
<td></td> <td></td>
</tr> </tr>
<tr> <tr>
<td>{{$t('signer.signed')}}:</td> <td>{{$t('signer.signed')}}:</td>
<td></td> <td></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</p> </p>
</div> </div>
<div class="size50 signature centered"> <div class="size50 signature centered">
<p>{{ company.name }}</p> <p>{{ company.name }}</p>
<img v-bind:src="getReportSrc('signature.png')"> <img v-bind:src="getReportSrc('signature.png')">
<p> <p>
<div>{{company.manager}}</div> <div>{{company.manager}}</div>
<div>{{$t('manager')}}</div> <div>{{$t('manager')}}</div>
<p>{{$t('issued', [ </p>
company.city, </div>
issued.getDate(), </div>
$t('months')[issued.getMonth()], </div>
issued.getFullYear()]) </div>
}} <report-footer id="pageFooter" v-bind:left-text="$t('client', [client.id])" v-bind="$props">
</p> </report-footer>
</p> </report-body>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -16,6 +17,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,123 +1,109 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
<body> </report-header>
<table class="grid no-page-break page-break-after"> <div class="grid-row">
<tbody> <div class="grid-block">
<tr> <div class="columns vn-mb-lg">
<td> <div class="size50">
<!-- Header block --> <div class="size75 vn-mt-ml">
<report-header v-bind="$props" <h1 class="title uppercase">{{$t('title')}}</h1>
v-bind:company-code="invoice.companyCode"> <table class="row-oriented ticket-info">
</report-header> <tbody>
<!-- Block --> <tr>
<div class="grid-row"> <td class="font gray uppercase">{{$t('clientId')}}</td>
<div class="grid-block"> <th>{{client.id}}</th>
<div class="columns vn-mb-lg"> </tr>
<div class="size50"> <tr>
<div class="size75 vn-mt-ml"> <td class="font gray uppercase">{{$t('invoice')}}</td>
<h1 class="title uppercase">{{$t('title')}}</h1> <th>{{invoice.ref}}</th>
<table class="row-oriented ticket-info"> </tr>
<tbody> <tr>
<tr> <td class="font gray uppercase">{{$t('date')}}</td>
<td class="font gray uppercase">{{$t('clientId')}}</td> <th>{{invoice.issued | date('%d-%m-%Y')}}</th>
<th>{{client.id}}</th> </tr>
</tr> </tbody>
<tr> </table>
<td class="font gray uppercase">{{$t('invoice')}}</td> </div>
<th>{{invoice.ref}}</th> </div>
</tr> <div class="size50">
<tr> <div class="panel">
<td class="font gray uppercase">{{$t('date')}}</td> <div class="header">{{$t('invoiceData')}}</div>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th> <div class="body">
</tr> <h3 class="uppercase">{{client.socialName}}</h3>
</tbody> <div>
</table> {{client.postalAddress}}
</div> </div>
</div> <div>
<div class="size50"> {{client.postcodeCity}}
<div class="panel"> </div>
<div class="header">{{$t('invoiceData')}}</div> <div>
<div class="body"> {{$t('fiscalId')}}: {{client.fi}}
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
</div>
</div>
</div>
</div>
</div>
<div id="incoterms" class="panel">
<div class="header">{{$t('incotermsTitle')}}</div>
<div class="body">
<table class="row-oriented">
<tbody>
<tr>
<th>
{{$t('incoterms')}}
</th>
<td>{{incoterms.incotermsFk}} - {{incoterms.incotermsName}}</td>
</tr>
<tr>
<th>
{{$t('productDescription')}}
</th>
<td>{{incoterms.intrastat}}</td>
</tr>
<tr>
<th>{{$t('expeditionDescription')}}</th>
<td></td>
</tr>
<tr>
<th>{{$t('packageNumber')}}</th>
<td>{{incoterms.packages}}</td>
</tr>
<tr>
<th>{{$t('packageGrossWeight')}}</th>
<td>{{incoterms.weight}} KG</td>
</tr>
<tr>
<th>{{$t('packageCubing')}}</th>
<td>{{incoterms.volume}} m3</td>
</tr>
</tbody>
</table>
<p>
<div class="font bold">
<span>{{$t('customsInfo')}}</span>
<span>{{incoterms.customsAgentName}}</span>
</div>
<div class="font bold">
<span>(</span>
<span>{{incoterms.customsAgentNif}}</span>
<span>{{incoterms.customsAgentStreet}}</span>
<span v-if="incoterms.customsAgentPhone">
&#9742; {{incoterms.customsAgentPhone}}
</span>
<span v-if="incoterms.customsAgentEmail">
&#9993; {{incoterms.customsAgentEmail}}
</span>
<span>)</span>
</div>
</p>
<p>
<strong>{{$t('productDisclaimer')}}</strong>
</p>
</div>
</div>
</div> </div>
</div> </div>
</td> </div>
</tr> </div>
</tbody> </div>
</table>
</body> <div id="incoterms" class="panel">
</html> <div class="header">{{$t('incotermsTitle')}}</div>
<div class="body">
<table class="row-oriented">
<tbody>
<tr>
<th>
{{$t('incoterms')}}
</th>
<td>{{incoterms.incotermsFk}} - {{incoterms.incotermsName}}</td>
</tr>
<tr>
<th>
{{$t('productDescription')}}
</th>
<td>{{incoterms.intrastat}}</td>
</tr>
<tr>
<th>{{$t('expeditionDescription')}}</th>
<td></td>
</tr>
<tr>
<th>{{$t('packageNumber')}}</th>
<td>{{incoterms.packages}}</td>
</tr>
<tr>
<th>{{$t('packageGrossWeight')}}</th>
<td>{{incoterms.weight}} KG</td>
</tr>
<tr>
<th>{{$t('packageCubing')}}</th>
<td>{{incoterms.volume}} m3</td>
</tr>
</tbody>
</table>
<p>
<div class="font bold">
<span>{{$t('customsInfo')}}</span>
<span>{{incoterms.customsAgentName}}</span>
</div>
<div class="font bold">
<span>(</span>
<span>{{incoterms.customsAgentNif}}</span>
<span>{{incoterms.customsAgentStreet}}</span>
<span v-if="incoterms.customsAgentPhone">
&#9742; {{incoterms.customsAgentPhone}}
</span>
<span v-if="incoterms.customsAgentEmail">
&#9993; {{incoterms.customsAgentEmail}}
</span>
<span>)</span>
</div>
</p>
<p>
<strong>{{$t('productDisclaimer')}}</strong>
</p>
</div>
</div>
</div>
</div>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -27,6 +28,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,319 +1,277 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <invoice-incoterms v-if="hasIncoterms" v-bind="$props">
<body> </invoice-incoterms>
<table class="grid"> <report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
<tbody> </report-header>
<tr> <div class="grid-row">
<td> <div class="grid-block">
<div class="columns vn-mb-lg">
<!-- Incoterms block --> <div class="size50">
<invoice-incoterms <div class="size75 vn-mt-ml">
v-if="hasIncoterms" <h1 class="title uppercase">{{$t('title')}}</h1>
v-bind="$props"> <table class="row-oriented ticket-info">
</invoice-incoterms> <tbody>
<tr>
<!-- Header block --> <td class="font gray uppercase">{{$t('clientId')}}</td>
<report-header v-bind="$props" <th>{{client.id}}</th>
v-bind:company-code="invoice.companyCode"> </tr>
</report-header> <tr>
<!-- Block --> <td class="font gray uppercase">{{$t('invoice')}}</td>
<div class="grid-row"> <th>{{invoice.ref}}</th>
<div class="grid-block"> </tr>
<div class="columns vn-mb-lg"> <tr>
<div class="size50"> <td class="font gray uppercase">{{$t('date')}}</td>
<div class="size75 vn-mt-ml"> <th>{{invoice.issued | date('%d-%m-%Y')}}</th>
<h1 class="title uppercase">{{$t('title')}}</h1> </tr>
<table class="row-oriented ticket-info"> </tbody>
<tbody> </table>
<tr> </div>
<td class="font gray uppercase">{{$t('clientId')}}</td> </div>
<th>{{client.id}}</th> <div class="size50">
</tr> <div class="panel">
<tr> <div class="header">{{$t('invoiceData')}}</div>
<td class="font gray uppercase">{{$t('invoice')}}</td> <div class="body">
<th>{{invoice.ref}}</th> <h3 class="uppercase">{{client.socialName}}</h3>
</tr> <div>
<tr> {{client.postalAddress}}
<td class="font gray uppercase">{{$t('date')}}</td> </div>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th> <div>
</tr> {{client.postcodeCity}}
</tbody> </div>
</table> <div>
</div> {{$t('fiscalId')}}: {{client.fi}}
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
</div>
</div>
</div>
</div>
</div>
<!-- Rectified invoices block -->
<div class="size100 no-page-break" v-if="rectified.length > 0">
<h2>{{$t('rectifiedInvoices')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('invoice')}}</th>
<th>{{$t('issued')}}</th>
<th class="number">{{$t('amount')}}</th>
<th width="50%">{{$t('description')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in rectified">
<td>{{row.ref}}</td>
<td>{{row.issued | date}}</td>
<td class="number">{{row.amount | currency('EUR', $i18n.locale)}}</td>
<td width="50%">{{row.description}}</td>
</tr>
</tbody>
</table>
</div>
<!-- End of rectified invoices block -->
<!-- Sales block -->
<div class="vn-mt-lg" v-for="ticket in tickets">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('deliveryNote')}}</strong>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
<span>{{ticket.id}}</span>
</div>
</div>
<div class="pull-left">
<h2>{{$t('shipped')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{ticket.shipped | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<h2>{{ticket.nickname}}</h2>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<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 ticket.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" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td>
<td class="number">{{saleImport(sale) | currency('EUR', $i18n.locale)}}</td>
</tr>
<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>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<!-- End of sales block -->
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<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')}}
</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="25%" class="number">
{{tax.base | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'base') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<!-- End of taxes block -->
<!-- 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>{{botanical}}</span>
</div>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<div>
<strong>C</strong>
<span>{{ticketsId}}</span>
</div>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
</div>
<!-- End of phytosanitary block -->
</div>
<!-- Intrastat block -->
<div class="size100 no-page-break" v-if="intrastat.length > 0">
<h2>{{$t('intrastat')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('code')}}</th>
<th width="50%">{{$t('description')}}</th>
<th class="number">{{$t('stems')}}</th>
<th class="number">{{$t('netKg')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in intrastat">
<td>{{row.code}}</td>
<td width="50%">{{row.description || $t('services') }}</td>
<td class="number">{{row.stems | number($i18n.locale)}}</td>
<td class="number">{{row.netKg | number($i18n.locale)}}</td>
<td class="number">{{row.subtotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td class="number">
<strong>{{sumTotal(intrastat, 'stems') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'netKg') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'subtotal') | currency('EUR', $i18n.locale)}}</strong>
</td>
</tr>
</tfoot>
</table>
</div>
<!-- End of intrastat block -->
<!-- Observations block -->
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
<div class="size50 pull-left no-page-break" >
<div class="panel" >
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('wireTransfer')}}</div>
<div>{{$t('accountNumber', [invoice.iban])}}</div>
</div>
</div>
</div>
</div>
<!-- End of observations block -->
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:company-code="invoice.companyCode" </div>
v-bind:left-text="$t('invoiceRef', [invoice.ref])" <div class="size100 no-page-break" v-if="rectified.length > 0">
v-bind:center-text="client.socialName" <h2>{{$t('rectifiedInvoices')}}</h2>
v-bind="$props"> <table class="column-oriented">
</report-footer> <thead>
</td> <tr>
</tr> <th>{{$t('invoice')}}</th>
</tbody> <th>{{$t('issued')}}</th>
</table> <th class="number">{{$t('amount')}}</th>
</body> <th width="50%">{{$t('description')}}</th>
</html> </tr>
</thead>
<tbody>
<tr v-for="row in rectified">
<td>{{row.ref}}</td>
<td>{{row.issued | date}}</td>
<td class="number">{{row.amount | currency('EUR', $i18n.locale)}}</td>
<td width="50%">{{row.description}}</td>
</tr>
</tbody>
</table>
</div>
<div class="vn-mt-lg" v-for="ticket in tickets">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('deliveryNote')}}</strong>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
<span>{{ticket.id}}</span>
</div>
</div>
<div class="pull-left">
<h2>{{$t('shipped')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{ticket.shipped | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<h2>{{ticket.nickname}}</h2>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<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 ticket.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" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td>
<td class="number">{{saleImport(sale) | currency('EUR', $i18n.locale)}}</td>
</tr>
<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>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl">
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<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')}}
</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="25%" class="number">
{{tax.base | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'base') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<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>{{botanical}}</span>
</div>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<div>
<strong>C</strong>
<span>{{ticketsId}}</span>
</div>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="size100 no-page-break" v-if="intrastat.length > 0">
<h2>{{$t('intrastat')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('code')}}</th>
<th width="50%">{{$t('description')}}</th>
<th class="number">{{$t('stems')}}</th>
<th class="number">{{$t('netKg')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in intrastat">
<td>{{row.code}}</td>
<td width="50%">{{row.description || $t('services') }}</td>
<td class="number">{{row.stems | number($i18n.locale)}}</td>
<td class="number">{{row.netKg | number($i18n.locale)}}</td>
<td class="number">{{row.subtotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td class="number">
<strong>{{sumTotal(intrastat, 'stems') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'netKg') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'subtotal') | currency('EUR', $i18n.locale)}}</strong>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('wireTransfer')}}</div>
<div>{{$t('accountNumber', [invoice.iban])}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<report-footer id="pageFooter" v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceRef', [invoice.ref])" v-bind:center-text="client.socialName" v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,5 +1,6 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const Report = require(`vn-print/core/report`); const Report = require(`vn-print/core/report`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
const invoiceIncoterms = new Report('invoice-incoterms'); const invoiceIncoterms = new Report('invoice-incoterms');
@ -110,6 +111,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build(), 'report-footer': reportFooter.build(),
'invoice-incoterms': invoiceIncoterms.build() 'invoice-incoterms': invoiceIncoterms.build()

View File

@ -1,214 +1,187 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
<body> </report-header>
<table class="grid"> <div class="grid-row">
<tbody> <div class="grid-block">
<tr> <div class="columns vn-mb-lg">
<td> <div class="size50">
<div class="size75 vn-mt-ml">
<!-- Header block --> <h1 class="title uppercase">{{$t('title')}}</h1>
<report-header v-bind="$props" <table class="row-oriented ticket-info">
v-bind:company-code="invoice.companyCode"> <tbody>
</report-header> <tr>
<!-- Block --> <td class="font gray uppercase">{{$t('supplierId')}}</td>
<div class="grid-row"> <th>{{invoice.supplierId}}</th>
<div class="grid-block"> </tr>
<div class="columns vn-mb-lg"> <tr>
<div class="size50"> <td class="font gray uppercase">{{$t('invoiceId')}}</td>
<div class="size75 vn-mt-ml"> <th>{{invoice.id}}</th>
<h1 class="title uppercase">{{$t('title')}}</h1> </tr>
<table class="row-oriented ticket-info"> <tr>
<tbody> <td class="font gray uppercase">{{$t('date')}}</td>
<tr> <th>{{invoice.created | date('%d-%m-%Y')}}</th>
<td class="font gray uppercase">{{$t('supplierId')}}</td> </tr>
<th>{{invoice.supplierId}}</th> </tbody>
</tr> </table>
<tr> </div>
<td class="font gray uppercase">{{$t('invoiceId')}}</td> </div>
<th>{{invoice.id}}</th> <div class="size50">
</tr> <div class="panel">
<tr> <div class="header">{{$t('invoiceData')}}</div>
<td class="font gray uppercase">{{$t('date')}}</td> <div class="body">
<th>{{invoice.created | date('%d-%m-%Y')}}</th> <h3 class="uppercase">{{invoice.name}}</h3>
</tr> <div>
</tbody> {{invoice.postalAddress}}
</table> </div>
</div> <div>
</div> {{invoice.postcodeCity}}
<div class="size50"> </div>
<div class="panel"> <div v-if="invoice.nif">
<div class="header">{{$t('invoiceData')}}</div> {{$t('fiscalId')}}: {{invoice.nif}}
<div class="body"> </div>
<h3 class="uppercase">{{invoice.name}}</h3> <div v-if="invoice.phone">
<div> {{$t('phone')}}: {{invoice.phone}}
{{invoice.postalAddress}}
</div>
<div>
{{invoice.postcodeCity}}
</div>
<div v-if="invoice.nif">
{{$t('fiscalId')}}: {{invoice.nif}}
</div>
<div v-if="invoice.phone">
{{$t('phone')}}: {{invoice.phone}}
</div>
</div>
</div>
</div>
</div>
<div class="vn-mt-lg" v-for="entry in entries">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('invoiceId')}}</strong>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
<span>{{entry.id}}</span>
</div>
</div>
<div class="pull-left">
<h2>{{$t('date')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{entry.landed | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<div class="pull-left">
<h2>{{$t('reference')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{entry.ref}}</span>
</div>
</div>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="50%">{{$t('item')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th class="number">{{$t('buyingValue')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in entry.buys" class="no-page-break">
<tr>
<td width="50%">{{buy.name}}</td>
<td class="number">{{buy.quantity}}</td>
<td class="number">{{buy.buyingValue}}</td>
<td class="number">{{buyImport(buy) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="4">
<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="3" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{entrySubtotal(entry) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<!-- End of sales block -->
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<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')}}
</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="25%" class="number">
{{tax.taxableBase | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.rate | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'taxableBase') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<!-- End of taxes block -->
<!-- Observations block -->
<div class="columns vn-mt-xl">
<div class="size50 pull-left no-page-break" >
<div class="panel" >
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('payMethod')}}</div>
<div>{{invoice.payMethod}}</div>
</div>
</div>
</div>
</div>
<!-- End of observations block -->
</div> </div>
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceId')" <div class="vn-mt-lg" v-for="entry in entries">
v-bind:center-text="invoice.name" <div class="table-title clearfix">
v-bind="$props"> <div class="pull-left">
</report-footer> <h2>{{$t('invoiceId')}}</strong>
</td> </div>
</tr> <div class="pull-left vn-mr-md">
</tbody> <div class="field rectangle">
</table> <span>{{entry.id}}</span>
</body> </div>
</html> </div>
<div class="pull-left">
<h2>{{$t('date')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{entry.landed | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<div class="pull-left">
<h2>{{$t('reference')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{entry.ref}}</span>
</div>
</div>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="50%">{{$t('item')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th class="number">{{$t('buyingValue')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in entry.buys" class="no-page-break">
<tr>
<td width="50%">{{buy.name}}</td>
<td class="number">{{buy.quantity}}</td>
<td class="number">{{buy.buyingValue}}</td>
<td class="number">{{buyImport(buy) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="4">
<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="3" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{entrySubtotal(entry) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl">
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<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')}}
</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="25%" class="number">
{{tax.taxableBase | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.rate | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'taxableBase') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<div class="columns vn-mt-xl">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('payMethod')}}</div>
<div>{{invoice.payMethod}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<report-footer id="pageFooter" v-bind:company-code="invoice.companyCode" v-bind:left-text="$t('invoiceId')"
v-bind:center-text="invoice.name" v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -82,6 +83,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build(), 'report-footer': reportFooter.build(),
}, },

View File

@ -1,35 +1,23 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <div class="label">
<body> <div class="barcode">
<table class="grid"> <h1>{{item.id}}</h1>
<tbody> <div class="image">
<tr> <img v-bind:src="barcode" />
<td> </div>
<div class="label"> </div>
<div class="barcode"> <div class="data">
<h1>{{item.id}}</h1> <div class="header">{{item.name}}</div>
<div class="image"> <div class="color">{{tags.color}}</div>
<img v-bind:src="barcode"/> <div class="producer">{{tags.producer}}</div>
</div> <div class="details">
</div> <div class="package">
<div class="data"> <div class="packing">{{packing()}}</div>
<div class="header">{{item.name}}</div> <div class="dated">{{dated}}</div>
<div class="color">{{tags.color}}</div> <div class="labelNumber">{{labelPage}}</div>
<div class="producer">{{tags.producer}}</div> </div>
<div class="details"> <div class="size">{{item.size}}</div>
<div class="package"> </div>
<div class="packing">{{packing()}}</div> </div>
<div class="dated">{{dated}}</div> </div>
<div class="labelNumber">{{labelPage}}</div> </report-body>
</div>
<div class="size">{{item.size}}</div>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
const qrcode = require('qrcode'); const qrcode = require('qrcode');
@ -50,6 +51,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,95 +1,79 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <div class="columns">
<tr> <div class="size50">
<td> <div class="size75">
<!-- Header block --> <h1 class="title uppercase">{{$t('title')}}</h1>
<report-header v-bind="$props"></report-header> <table class="row-oriented">
<!-- Block --> <tbody>
<div class="grid-row"> <tr>
<div class="grid-block"> <td class="font gray uppercase">{{$t('clientId')}}</td>
<div class="columns"> <th>{{client.id}}</th>
<div class="size50"> </tr>
<div class="size75"> <tr>
<h1 class="title uppercase">{{$t('title')}}</h1> <td class="font gray uppercase">{{$t('date')}}</td>
<table class="row-oriented"> <th>{{dated}}</th>
<tbody> </tr>
<tr> </tbody>
<td class="font gray uppercase">{{$t('clientId')}}</td> </table>
<th>{{client.id}}</th> </div>
</tr> </div>
<tr> <div class="size50">
<td class="font gray uppercase">{{$t('date')}}</td> <div class="panel">
<th>{{dated}}</th> <div class="header">{{$t('clientData')}}</div>
</tr> <div class="body">
</tbody> <h3 class="uppercase">{{client.socialName}}</h3>
</table> <div>
</div> {{client.street}}
</div> </div>
<div class="size50"> <div>
<div class="panel"> {{client.postcode}}, {{client.city}} ({{client.province}})
<div class="header">{{$t('clientData')}}</div> </div>
<div class="body"> <div>
<h3 class="uppercase">{{client.socialName}}</h3> {{client.country}}
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
</div>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('date')}}</th>
<th>{{$t('concept')}}</th>
<th class="number">{{$t('invoiced')}}</th>
<th class="number">{{$t('payed')}}</th>
<th class="number">{{$t('balance')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" :key="sale.id">
<tr>
<td>{{sale.issued | date('%d-%m-%Y')}}</td>
<td>{{sale.ref}}</td>
<td class="number">{{sale.debtOut}}</td>
<td class="number">{{sale.debtIn}}</td>
<td class="number">{{getBalance(sale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td class="number">
<strong class="pull-left">Total</strong>
{{getTotalDebtOut() | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{getTotalDebtIn() | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{totalBalance | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:left-text="$t('client', [client.id])" </div>
v-bind:center-text="client.socialName"
v-bind="$props"> <table class="column-oriented">
</report-footer> <thead>
</td> <tr>
</tr> <th>{{$t('date')}}</th>
</tbody> <th>{{$t('concept')}}</th>
</table> <th class="number">{{$t('invoiced')}}</th>
</body> <th class="number">{{$t('payed')}}</th>
</html> <th class="number">{{$t('balance')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" :key="sale.id">
<tr>
<td>{{sale.issued | date('%d-%m-%Y')}}</td>
<td>{{sale.ref}}</td>
<td class="number">{{sale.debtOut}}</td>
<td class="number">{{sale.debtIn}}</td>
<td class="number">{{getBalance(sale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td class="number">
<strong class="pull-left">Total</strong>
{{getTotalDebtOut() | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{getTotalDebtIn() | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{totalBalance | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
</div>
<report-footer id="pageFooter" v-bind:left-text="$t('client', [client.id])" v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -58,6 +59,7 @@ module.exports = {
}, },
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,45 +1,29 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <div class="content">
<tr> <h1 class="title centered uppercase">{{$t('title')}}</h1>
<td> <p class="centered">
<!-- Header block --> Recibo de <strong class="uppercase">{{client.socialName}}</strong>,
<report-header v-bind="$props"></report-header> la cantidad de <strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta',
<!-- Block --> quedando pendiente en la cuenta del cliente
<div class="grid-row"> un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
<div class="grid-block"> </p>
<div class="content"> <div class="signature">
<h1 class="title centered uppercase">{{$t('title')}}</h1> <img v-bind:src="getReportSrc('signature.png')">
<p class="centered"> <p class="centered">{{$t('payed', [
Recibo de <strong class="uppercase">{{client.socialName}}</strong>, 'Algemesí',
la cantidad de <strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta', receipt.payed.getDate(),
quedando pendiente en la cuenta del cliente $t('months')[receipt.payed.getMonth()],
un saldo de <strong>{{receipt.amountUnpaid}} €</strong>. receipt.payed.getFullYear()])
</p> }}
<div class="signature"> </p>
<img v-bind:src="getReportSrc('signature.png')"> </div>
<p class="centered">{{$t('payed', [ </div>
'Algemesí', </div>
receipt.payed.getDate(), </div>
$t('months')[receipt.payed.getMonth()], <report-footer id="pageFooter" v-bind:left-text="$t('client', [client.id])" v-bind:center-text="client.socialName"
receipt.payed.getFullYear()]) v-bind="$props">
}} </report-footer>
</p> </report-body>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -20,6 +21,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,201 +1,183 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row no-page-break page-break-after">
<table class="grid"> <div class="grid-block">
<tbody> <div class="content">
<tr> <h1 class="title centered uppercase">{{$t('instructions.title')}}</h1>
<td> <p class="centered">
<!-- Header block --> 1. {{$t('instructions.accountFields')}}
<report-header v-bind="$props"></report-header> </p>
<!-- Block --> <p class="centered">
<div class="grid-row no-page-break page-break-after"> 2. {{$t('instructions.signDocument')}}
<div class="grid-block"> </p>
<div class="content"> <p class="centered">
<h1 class="title centered uppercase">{{$t('instructions.title')}}</h1> {{$t('instructions.thanks')}}
<p class="centered"> </p>
1. {{$t('instructions.accountFields')}} </div>
</p> </div>
<p class="centered"> </div>
2. {{$t('instructions.signDocument')}}
</p>
<p class="centered">
{{$t('instructions.thanks')}}
</p>
</div>
</div>
</div>
<!-- Header block --> <report-header v-bind="$props"></report-header>
<report-header v-bind="$props"></report-header> <div class="grid-row">
<!-- Block --> <div class="grid-block">
<div class="grid-row"> <h1 class="title centered">{{$t('title')}}</h1>
<div class="grid-block"> <div class="panel supplierPanel" style="width: 98%">
<h1 class="title centered">{{$t('title')}}</h1> <div class="body">
<div class="panel supplierPanel" style="width: 98%"> <div class="vertical-text">
<div class="body"> {{$t('supplier.toCompleteBySupplier')}}
<div class="vertical-text"> </div>
{{$t('supplier.toCompleteBySupplier')}}
</div> <table class="row-oriented">
<tbody>
<table class="row-oriented"> <tr>
<tbody> <td>{{$t('supplier.orderReference')}}</td>
<tr> <th>{{supplier.mandateCode}}</th>
<td>{{$t('supplier.orderReference')}}</td> </tr>
<th>{{supplier.mandateCode}}</th> <tr>
</tr> <td>{{$t('supplier.identifier')}}</td>
<tr> <th>
<td>{{$t('supplier.identifier')}}</td> <div>ES89000B97367486</div>
<th> <div>B97367486-000</div>
<div>ES89000B97367486</div> </th>
<div>B97367486-000</div> </tr>
</th> <tr>
</tr> <td>{{$t('supplier.name')}}</td>
<tr> <th>{{supplier.name}}</th>
<td>{{$t('supplier.name')}}</td> </tr>
<th>{{supplier.name}}</th> <tr>
</tr> <td>{{$t('supplier.street')}}</td>
<tr> <th>{{supplier.street}}</th>
<td>{{$t('supplier.street')}}</td> </tr>
<th>{{supplier.street}}</th> <tr>
</tr> <td>{{$t('supplier.location')}}</td>
<tr> <th>{{supplier.postCode}}, {{supplier.city}} ({{supplier.province}})</th>
<td>{{$t('supplier.location')}}</td> </tr>
<th>{{supplier.postCode}}, {{supplier.city}} ({{supplier.province}})</th> <tr>
</tr> <td>{{$t('supplier.country')}}</td>
<tr> <th>{{supplier.country}}</th>
<td>{{$t('supplier.country')}}</td> </tr>
<th>{{supplier.country}}</th> </tbody>
</tr> </table>
</tbody> </div>
</table> </div>
<p class="font small light-gray">{{$t('description')}}</p>
<p class="font small">
<strong>{{$t('documentCopy')}}</strong>
</p>
<div class="panel" style="width: 98%">
<div class="body">
<div class="vertical-text">
{{$t('client.toCompleteByClient')}}
</div>
<table class="row-oriented">
<tbody>
<tr>
<td>
{{$t('client.name')}}
<div class="description">{{$t('client.accountHolder')}}</div>
</td>
<th>{{client.socialName}}</th>
</tr>
<tr>
<td>
{{$t('client.fiscalId')}}
</td>
<th>{{client.fi}}</th>
</tr>
<tr>
<td>{{$t('client.street')}}</td>
<th>{{client.street}}</th>
</tr>
<tr>
<td>{{$t('client.location')}}</td>
<th>{{client.postcode}}, {{client.city}} ({{client.province}})</th>
</tr>
<tr>
<td>{{$t('client.country')}}</td>
<th>{{client.country}}</th>
</tr>
<tr>
<td>{{$t('client.swift')}}</td>
<th>
<div class="field square">
<span v-for="i in 11"></span>
</div> </div>
</div> </th>
</tr>
<p class="font small light-gray">{{$t('description')}}</p> <tr>
<p class="font small"> <td colspan="2">{{$t('client.accountNumber')}}</td>
<strong>{{$t('documentCopy')}}</strong> </tr>
</p> <tr>
<td colspan="2" v-if="!client.ibanLength">
<div class="panel" style="width: 98%"> <div class="field square">
<div class="body"> <span>{{client.countryCode.substr(0, 1)}}</span>
<div class="vertical-text"> <span>{{client.countryCode.substr(1, 1)}}</span>
{{$t('client.toCompleteByClient')}} <span class="wide"></span>
</div>
<table class="row-oriented">
<tbody>
<tr>
<td>
{{$t('client.name')}}
<div class="description">{{$t('client.accountHolder')}}</div>
</td>
<th>{{client.socialName}}</th>
</tr>
<tr>
<td>
{{$t('client.fiscalId')}}
</td>
<th>{{client.fi}}</th>
</tr>
<tr>
<td>{{$t('client.street')}}</td>
<th>{{client.street}}</th>
</tr>
<tr>
<td>{{$t('client.location')}}</td>
<th>{{client.postcode}}, {{client.city}} ({{client.province}})</th>
</tr>
<tr>
<td>{{$t('client.country')}}</td>
<th>{{client.country}}</th>
</tr>
<tr>
<td>{{$t('client.swift')}}</td>
<th>
<div class="field square">
<span v-for="i in 11"></span>
</div>
</th>
</tr>
<tr>
<td colspan="2">{{$t('client.accountNumber')}}</td>
</tr>
<tr>
<td colspan="2" v-if="!client.ibanLength">
<div class="field square">
<span>{{client.countryCode.substr(0, 1)}}</span>
<span>{{client.countryCode.substr(1, 1)}}</span>
<span class="wide"></span>
</div>
</td>
<td colspan="2" v-if="client.ibanLength">
<div class="field square">
<span>{{client.countryCode.substr(0, 1)}}</span>
<span>{{client.countryCode.substr(1, 1)}}</span>
<span v-for="i in (client.ibanLength - 2)"></span>
</div>
</td>
</tr>
<tr>
<td class="description" colspan="2">
<div class="line">
<span>{{$t('client.accountNumberFormat', [
$t(`${client.country}`),
client.ibanLength,
client.countryCode
])}}
</span>
</div>
</td>
</tr>
<tr>
<td>{{$t('client.paymentType')}}</td>
<th>
<table class="payment-type">
<tr>
<td>
<div class="field square">
<span class="crossed">X</span>
</div>
</td>
<th>{{$t('client.recurrent')}}</th>
<th>O</th>
<td>
<div class="field square">
<span></span>
</div>
</td>
<th>{{$t('client.unique')}}</th>
</tr>
</table>
</th>
</tr>
<tr>
<td>{{$t('client.signLocation')}}</td>
<th>{{dated}}, {{client.province}}</th>
</tr>
<tr>
<td>{{$t('client.sign')}}</td>
<th></th>
</tr>
</tbody>
</table>
</div> </div>
</div> </td>
<td colspan="2" v-if="client.ibanLength">
<p class="font small">{{$t('mandatoryFields')}}</p> <div class="field square">
<p class="font small">{{$t('sendOrder')}}</p> <span>{{client.countryCode.substr(0, 1)}}</span>
</div> <span>{{client.countryCode.substr(1, 1)}}</span>
</div> <span v-for="i in (client.ibanLength - 2)"></span>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </td>
v-bind:left-text="$t('order', [supplier.mandateCode])" </tr>
v-bind:center-text="client.socialName" <tr>
v-bind="$props"> <td class="description" colspan="2">
</report-footer> <div class="line">
</td> <span>{{$t('client.accountNumberFormat', [
</tr> $t(`${client.country}`),
</tbody> client.ibanLength,
</table> client.countryCode
</body> ])}}
</html> </span>
</div>
</td>
</tr>
<tr>
<td>{{$t('client.paymentType')}}</td>
<th>
<table class="payment-type">
<tr>
<td>
<div class="field square">
<span class="crossed">X</span>
</div>
</td>
<th>{{$t('client.recurrent')}}</th>
<th>O</th>
<td>
<div class="field square">
<span></span>
</div>
</td>
<th>{{$t('client.unique')}}</th>
</tr>
</table>
</th>
</tr>
<tr>
<td>{{$t('client.signLocation')}}</td>
<th>{{dated}}, {{client.province}}</th>
</tr>
<tr>
<td>{{$t('client.sign')}}</td>
<th></th>
</tr>
</tbody>
</table>
</div>
</div>
<p class="font small">{{$t('mandatoryFields')}}</p>
<p class="font small">{{$t('sendOrder')}}</p>
</div>
</div>
<report-footer id="pageFooter" v-bind:left-text="$t('order', [supplier.mandateCode])"
v-bind:center-text="client.socialName" v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ const rptSepaCore = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,105 +1,89 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <div class="columns">
<tr> <div class="size50">
<td> <h1 class="title uppercase">{{$t('title')}}</h1>
<!-- Header block --> <div class="size75">
<report-header v-bind="$props"></report-header> <table class="row-oriented">
<!-- Block --> <tbody>
<div class="grid-row"> <tr>
<div class="grid-block"> <td class="font gray">{{$t('Supplier')}}</td>
<div class="columns"> <th>{{supplier.id}}</th>
<div class="size50"> </tr>
<h1 class="title uppercase">{{$t('title')}}</h1> <tr>
<div class="size75"> <td class="font gray">{{$t('From')}}</td>
<table class="row-oriented"> <th>{{from | date('%d-%m-%Y')}}</th>
<tbody> </tr>
<tr> <tr>
<td class="font gray">{{$t('Supplier')}}</td> <td class="font gray">{{$t('To')}}</td>
<th>{{supplier.id}}</th> <th>{{to | date('%d-%m-%Y')}}</th>
</tr> </tr>
<tr> </tbody>
<td class="font gray">{{$t('From')}}</td> </table>
<th>{{from | date('%d-%m-%Y')}}</th> </div>
</tr> </div>
<tr> <div class="size50">
<td class="font gray">{{$t('To')}}</td> <div class="panel">
<th>{{to | date('%d-%m-%Y')}}</th> <div class="header">{{$t('supplierData')}}</div>
</tr> <div class="body">
</tbody> <h3 class="uppercase">{{supplier.supplierName}}</h3>
</table> <div>
</div> {{supplier.street}}
</div> </div>
<div class="size50"> <div>
<div class="panel"> {{supplier.postcode}}, {{supplier.city}} ({{supplier.province}})
<div class="header">{{$t('supplierData')}}</div> </div>
<div class="body"> <div>
<h3 class="uppercase">{{supplier.supplierName}}</h3> {{supplier.country}}
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postcode}}, {{supplier.city}} ({{supplier.province}})
</div>
<div>
{{supplier.country}}
</div>
</div>
</div>
</div>
</div>
<div v-for="entry in entries" v-if="entry.buys">
<h2>
<span>{{$t('entry')}} {{entry.id}}</span>
<span>{{$t('dated')}} {{entry.shipped | date('%d-%m-%Y')}}</span>
<span class="pull-right">{{$t('reference')}} {{entry.ref}}</span>
</h2>
<table class="column-oriented repeatable">
<thead>
<tr>
<th width="50%">{{$t('itemName')}}</th>
<th>{{$t('Quantity')}}</th>
<th>{{$t('price')}}</th>
<th>{{$t('total')}}</th>
</tr>
</thead>
<tbody v-for="buy in entry.buys" class="no-page-break">
<tr>
<td width="50%">{{buy.itemName}}</td>
<td>{{buy.quantity}}</td>
<td>{{buy.price | currency('EUR', $i18n.locale)}}</td>
<td>{{buy.quantity * buy.price | currency('EUR', $i18n.locale)}}</td>
</tr>
<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>
</table>
</div>
</div> </div>
</div> </div>
<!-- Footer block --> </div>
<report-footer id="pageFooter" </div>
v-bind:left-text="$t('supplier', [supplier.id])" </div>
v-bind:center-text="supplier.supplierName" <div v-for="entry in entries" v-if="entry.buys">
v-bind="$props"> <h2>
</report-footer> <span>{{$t('entry')}} {{entry.id}}</span>
</td> <span>{{$t('dated')}} {{entry.shipped | date('%d-%m-%Y')}}</span>
</tr> <span class="pull-right">{{$t('reference')}} {{entry.ref}}</span>
</tbody> </h2>
</table> <table class="column-oriented repeatable">
</body> <thead>
</html> <tr>
<th width="50%">{{$t('itemName')}}</th>
<th>{{$t('Quantity')}}</th>
<th>{{$t('price')}}</th>
<th>{{$t('total')}}</th>
</tr>
</thead>
<tbody v-for="buy in entry.buys" class="no-page-break">
<tr>
<td width="50%">{{buy.itemName}}</td>
<td>{{buy.quantity}}</td>
<td>{{buy.price | currency('EUR', $i18n.locale)}}</td>
<td>{{buy.quantity * buy.price | currency('EUR', $i18n.locale)}}</td>
</tr>
<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>
</table>
</div>
</div>
</div>
<report-footer id="pageFooter" v-bind:left-text="$t('supplier', [supplier.id])"
v-bind:center-text="supplier.supplierName" v-bind="$props">
</report-footer>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`); const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -44,6 +45,7 @@ module.exports = {
} }
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,39 +1,26 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <report-header v-bind="$props"></report-header>
<body> <div class="grid-row">
<table class="grid"> <div class="grid-block">
<tbody> <div class="content">
<tr> <h1 class="title centered uppercase">{{$t('title')}}</h1>
<td> </div>
<!-- Header block --> <table class="column-oriented">
<report-header v-bind="$props"></report-header> <thead>
<!-- Block --> <tr>
<div class="grid-row"> <th>{{$t('Plate')}}</th>
<div class="grid-block"> <th>{{$t('Concept')}}</th>
<div class="content"> <th>{{$t('expirationDate')}}</th>
<h1 class="title centered uppercase">{{$t('title')}}</h1> </tr>
</div> </thead>
<table class="column-oriented"> <tbody v-for="vehicleEvent in vehicleEvents">
<thead> <tr>
<tr> <td>{{vehicleEvent.numberPlate}}</td>
<th>{{$t('Plate')}}</th> <td>{{vehicleEvent.description}}</td>
<th>{{$t('Concept')}}</th> <td>{{vehicleEvent.finished | date('%d-%m-%Y')}}</td>
<th>{{$t('expirationDate')}}</th> </tr>
</tr> </tbody>
</thead> </table>
<tbody v-for="vehicleEvent in vehicleEvents"> </div>
<tr> </div>
<td>{{vehicleEvent.numberPlate}}</td> </report-body>
<td>{{vehicleEvent.description}}</td>
<td>{{vehicleEvent.finished | date('%d-%m-%Y')}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,4 +1,5 @@
const Component = require(`${appPath}/core/component`); const Component = require(`${appPath}/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header'); const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer'); const reportFooter = new Component('report-footer');
@ -16,6 +17,7 @@ module.exports = {
}, },
}, },
components: { components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(), 'report-header': reportHeader.build(),
'report-footer': reportFooter.build() 'report-footer': reportFooter.build()
}, },

View File

@ -1,16 +1,5 @@
<!DOCTYPE html> <report-body>
<html v-bind:lang="$i18n.locale"> <div class="text">{{zone.agencyName}}</div>
<body> <div class="text">{{zone.id}}</div>
<table class="grid"> <div class="text">{{zone.plateNumber}} {{zone.time | date('%H:%M')}}</div>
<tbody> </report-body>
<tr>
<td>
<div class="text">{{zone.agencyName}}</div>
<div class="text">{{zone.id}}</div>
<div class="text">{{zone.plateNumber}} {{zone.time | date('%H:%M')}}</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -1,3 +1,6 @@
const Component = require(`${appPath}/core/component`);
const reportBody = new Component('report-body');
module.exports = { module.exports = {
name: 'zone', name: 'zone',
async serverPrefetch() { async serverPrefetch() {
@ -11,6 +14,9 @@ module.exports = {
return this.findOneFromDef('zone', [id]); return this.findOneFromDef('zone', [id]);
} }
}, },
components: {
'report-body': reportBody.build()
},
props: { props: {
id: { id: {
type: Number, type: Number,