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"
plugins:
- jasmine
- html
env:
jasmine: true
rules:

View File

@ -2,7 +2,10 @@
{
// Carácter predeterminado de final de línea.
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
"editor.bracketPairColorization.enabled": 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",
"eslint": "^7.11.0",
"eslint-config-google": "^0.11.0",
"eslint-plugin-html": "^7.1.0",
"eslint-plugin-jasmine": "^2.10.1",
"fancy-log": "^1.3.2",
"file-loader": "^1.1.11",

View File

@ -1,190 +1,167 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row info-panel">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
</div>
</div>
<!-- Block -->
<table>
<tbody>
<tr>
<td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="info-panel">
<div class="green-background">
<h3>{{$t('fields.companyInfo')}}</h3>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row info-panel">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
</div>
</div>
<table>
<tbody>
<tr>
<td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
<div class="grid-row">
<div class="grid-block">
<div class="info-panel">
<div class="green-background">
<h3>{{$t('fields.companyInfo')}}</h3>
</div>
<div class="body">
<table style="width: 100%">
<tbody>
<tr>
<td>{{$t('fields.companyName')}}:</td>
<th colspan="3">
<div class="field wide-rectangle">
<span></span>
</div>
<div class="body">
<table style="width: 100%">
<tbody>
<tr>
<td>{{$t('fields.companyName')}}:</td>
<th colspan="3">
<div class="field wide-rectangle">
<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>
</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>
</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>
<!-- Block -->
<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>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</div>
</div>
<!-- Block -->
<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>
</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>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<report-footer
id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</report-body>

View File

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

View File

@ -1,161 +1,146 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row route-block" v-for="route in routes">
<div class="grid-block">
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('route')}}</th>
<td>{{route.id}}</td>
<th class="font gray align-right">{{$t('driver')}}</th>
<td>{{route.userNickName}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('date')}}</th>
<td>{{route.created | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('vehicle')}}</th>
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('time')}}</th>
<td>{{route.time | date('%H:%M')}}</td>
<td></td>
<td>{{route.plateNumber}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('volume')}}</th>
<td>{{route.m3}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{route.agencyName}}</td>
</tr>
</tbody>
</table>
<div class="contained">
<table class="middle centered" width="70%">
<tbody>
<tr>
<td>
<p class="small">Hora inicio</p>
</td>
<td>
<p class="small">Hora fin</p>
</td>
<td class="gap"></td>
<td>
<p class="small">Km inicio</p>
</td>
<td>
<p class="small">Km fin</p>
</td>
</tr>
<tr>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
<td class="gap"></td>
<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>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row route-block" v-for="route in routes">
<div class="grid-block">
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('route')}}</th>
<td>{{route.id}}</td>
<th class="font gray align-right">{{$t('driver')}}</th>
<td>{{route.userNickName}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('date')}}</th>
<td>{{route.created | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('vehicle')}}</th>
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('time')}}</th>
<td>{{route.time | date('%H:%M')}}</td>
<td></td>
<td>{{route.plateNumber}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('volume')}}</th>
<td>{{route.m3}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{route.agencyName}}</td>
</tr>
</tbody>
</table>
<div class="contained">
<table class="middle centered" width="70%">
<tbody>
<tr>
<td>
<p class="small">Hora inicio</p>
</td>
<td>
<p class="small">Hora fin</p>
</td>
<td class="gap"></td>
<td>
<p class="small">Km inicio</p>
</td>
<td>
<p class="small">Km fin</p>
</td>
</tr>
<tr>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
<td class="gap"></td>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('routeId', [id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
<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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -39,6 +40,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,127 +1,107 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="entry.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<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">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<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>
<report-body>
<report-header v-bind="$props" v-bind:company-code="entry.companyCode">
</report-header>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<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">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.name}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})
</div>
<div>
{{supplier.nif}}
</div>
</div>
<!-- Footer block -->
<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>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

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

View File

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

View File

@ -1,84 +1,67 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<h1 class="title uppercase">{{$t('title')}}</h1>
</div>
</div>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<h1 class="title uppercase">{{$t('title')}}</h1>
</div>
</div>
<div class="grid-row vn-mb-lg" v-for="travel in travels">
<div class="grid-block">
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<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 -->
<div class="grid-row vn-mb-lg" v-for="travel in travels">
<div class="grid-block">
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<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>
<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>
<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>
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props">
</report-footer>
</report-body>

View File

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

View File

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

View File

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

View File

@ -1,123 +1,109 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid no-page-break page-break-after">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</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>
<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>
<report-body>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
</report-header>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</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>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</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>
</report-body>

View File

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

View File

@ -1,319 +1,277 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Incoterms block -->
<invoice-incoterms
v-if="hasIncoterms"
v-bind="$props">
</invoice-incoterms>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</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 -->
<report-body>
<invoice-incoterms v-if="hasIncoterms" v-bind="$props">
</invoice-incoterms>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
</report-header>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</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>
<!-- Footer block -->
<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>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<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>
<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 Report = require(`vn-print/core/report`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const invoiceIncoterms = new Report('invoice-incoterms');
@ -110,6 +111,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build(),
'invoice-incoterms': invoiceIncoterms.build()

View File

@ -1,214 +1,187 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('supplierId')}}</td>
<th>{{invoice.supplierId}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoiceId')}}</td>
<th>{{invoice.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.created | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{invoice.name}}</h3>
<div>
{{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 -->
<report-body>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode">
</report-header>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('supplierId')}}</td>
<th>{{invoice.supplierId}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoiceId')}}</td>
<th>{{invoice.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.created | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{invoice.name}}</h3>
<div>
{{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>
<!-- Footer block -->
<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>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -82,6 +83,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build(),
},

View File

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

View File

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

View File

@ -1,95 +1,79 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row">
<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('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<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>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<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('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</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>
</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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -58,6 +59,7 @@ module.exports = {
},
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,45 +1,29 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
<p class="centered">
Recibo de <strong class="uppercase">{{client.socialName}}</strong>,
la cantidad de <strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta',
quedando pendiente en la cuenta del cliente
un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
</p>
<div class="signature">
<img v-bind:src="getReportSrc('signature.png')">
<p class="centered">{{$t('payed', [
'Algemesí',
receipt.payed.getDate(),
$t('months')[receipt.payed.getMonth()],
receipt.payed.getFullYear()])
}}
</p>
</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>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
<p class="centered">
Recibo de <strong class="uppercase">{{client.socialName}}</strong>,
la cantidad de <strong>{{receipt.amountPaid}} €</strong> en concepto de 'entrega a cuenta',
quedando pendiente en la cuenta del cliente
un saldo de <strong>{{receipt.amountUnpaid}} €</strong>.
</p>
<div class="signature">
<img v-bind:src="getReportSrc('signature.png')">
<p class="centered">{{$t('payed', [
'Algemesí',
receipt.payed.getDate(),
$t('months')[receipt.payed.getMonth()],
receipt.payed.getFullYear()])
}}
</p>
</div>
</div>
</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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -20,6 +21,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,201 +1,183 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row no-page-break page-break-after">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('instructions.title')}}</h1>
<p class="centered">
1. {{$t('instructions.accountFields')}}
</p>
<p class="centered">
2. {{$t('instructions.signDocument')}}
</p>
<p class="centered">
{{$t('instructions.thanks')}}
</p>
</div>
</div>
</div>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row no-page-break page-break-after">
<div class="grid-block">
<div class="content">
<h1 class="title centered uppercase">{{$t('instructions.title')}}</h1>
<p class="centered">
1. {{$t('instructions.accountFields')}}
</p>
<p class="centered">
2. {{$t('instructions.signDocument')}}
</p>
<p class="centered">
{{$t('instructions.thanks')}}
</p>
</div>
</div>
</div>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<h1 class="title centered">{{$t('title')}}</h1>
<div class="panel supplierPanel" style="width: 98%">
<div class="body">
<div class="vertical-text">
{{$t('supplier.toCompleteBySupplier')}}
</div>
<table class="row-oriented">
<tbody>
<tr>
<td>{{$t('supplier.orderReference')}}</td>
<th>{{supplier.mandateCode}}</th>
</tr>
<tr>
<td>{{$t('supplier.identifier')}}</td>
<th>
<div>ES89000B97367486</div>
<div>B97367486-000</div>
</th>
</tr>
<tr>
<td>{{$t('supplier.name')}}</td>
<th>{{supplier.name}}</th>
</tr>
<tr>
<td>{{$t('supplier.street')}}</td>
<th>{{supplier.street}}</th>
</tr>
<tr>
<td>{{$t('supplier.location')}}</td>
<th>{{supplier.postCode}}, {{supplier.city}} ({{supplier.province}})</th>
</tr>
<tr>
<td>{{$t('supplier.country')}}</td>
<th>{{supplier.country}}</th>
</tr>
</tbody>
</table>
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<h1 class="title centered">{{$t('title')}}</h1>
<div class="panel supplierPanel" style="width: 98%">
<div class="body">
<div class="vertical-text">
{{$t('supplier.toCompleteBySupplier')}}
</div>
<table class="row-oriented">
<tbody>
<tr>
<td>{{$t('supplier.orderReference')}}</td>
<th>{{supplier.mandateCode}}</th>
</tr>
<tr>
<td>{{$t('supplier.identifier')}}</td>
<th>
<div>ES89000B97367486</div>
<div>B97367486-000</div>
</th>
</tr>
<tr>
<td>{{$t('supplier.name')}}</td>
<th>{{supplier.name}}</th>
</tr>
<tr>
<td>{{$t('supplier.street')}}</td>
<th>{{supplier.street}}</th>
</tr>
<tr>
<td>{{$t('supplier.location')}}</td>
<th>{{supplier.postCode}}, {{supplier.city}} ({{supplier.province}})</th>
</tr>
<tr>
<td>{{$t('supplier.country')}}</td>
<th>{{supplier.country}}</th>
</tr>
</tbody>
</table>
</div>
</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>
<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>
</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>
</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>
</div>
<p class="font small">{{$t('mandatoryFields')}}</p>
<p class="font small">{{$t('sendOrder')}}</p>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('order', [supplier.mandateCode])"
v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ const rptSepaCore = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,105 +1,89 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<div class="size75">
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray">{{$t('Supplier')}}</td>
<th>{{supplier.id}}</th>
</tr>
<tr>
<td class="font gray">{{$t('From')}}</td>
<th>{{from | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray">{{$t('To')}}</td>
<th>{{to | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.supplierName}}</h3>
<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>
<report-body>
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<div class="size75">
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray">{{$t('Supplier')}}</td>
<th>{{supplier.id}}</th>
</tr>
<tr>
<td class="font gray">{{$t('From')}}</td>
<th>{{from | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray">{{$t('To')}}</td>
<th>{{to | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.supplierName}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postcode}}, {{supplier.city}} ({{supplier.province}})
</div>
<div>
{{supplier.country}}
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('supplier', [supplier.id])"
v-bind:center-text="supplier.supplierName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</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>
<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 reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -44,6 +45,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

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

View File

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

View File

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

View File

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