added sepa-core & letter-debtor
This commit is contained in:
parent
e1207edb95
commit
7986405a72
|
@ -147,8 +147,8 @@ class Controller {
|
|||
this.$scope.descriptor.ticketFk = sale.origin;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
showClientDescriptor(event, sale) {
|
||||
|
@ -157,8 +157,8 @@ class Controller {
|
|||
this.$scope.clientDescriptor.clientFk = sale.clientFk;
|
||||
this.$scope.clientDescriptor.parent = event.target;
|
||||
this.$scope.clientDescriptor.show();
|
||||
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.container {
|
||||
font-family: verdana, sans-serif;
|
||||
font-family: arial, sans-serif;
|
||||
font-size: 16px;
|
||||
zoom: 0.55
|
||||
}
|
||||
|
@ -33,9 +33,18 @@
|
|||
float: left
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
clear: both
|
||||
}
|
||||
|
||||
.row {
|
||||
white-space: nowrap;
|
||||
margin-bottom: 15px
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
clear: both;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.row.small {
|
||||
|
@ -52,13 +61,36 @@
|
|||
box-sizing: border-box
|
||||
}
|
||||
|
||||
.row:last-child {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.row.inline .text {
|
||||
display: table-cell;
|
||||
margin-bottom: 0;
|
||||
width: 30%
|
||||
}
|
||||
|
||||
.row.inline .control {
|
||||
display: table-cell;
|
||||
padding-left: 20px;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
width: 70%
|
||||
}
|
||||
|
||||
.row.inline .description {
|
||||
position: static;
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.row .description {
|
||||
position: relative;
|
||||
padding-top: 2px;
|
||||
overflow: hidden;
|
||||
font-size: 9px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
color: #999
|
||||
clear: both
|
||||
}
|
||||
|
||||
.row .line {
|
||||
|
@ -78,42 +110,17 @@
|
|||
float: left
|
||||
}
|
||||
|
||||
.row:last-child {
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.row.inline .text {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
width: 40%;
|
||||
|
||||
}
|
||||
|
||||
.row.inline .control {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
padding-left: 20px;
|
||||
color: #000;
|
||||
width: 60%
|
||||
}
|
||||
|
||||
.row.inline .description {
|
||||
position: static;
|
||||
overflow: visible
|
||||
}
|
||||
|
||||
.panel {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.panel .header {
|
||||
background-color: #FFF;
|
||||
position:absolute;
|
||||
left: 17.5px;
|
||||
top: -12px;
|
||||
padding: 2.5px 5px;
|
||||
|
||||
position: absolute;
|
||||
font-weight: bold;
|
||||
left: 17.5px;
|
||||
top: -12px
|
||||
}
|
||||
|
||||
.panel .body {
|
||||
|
@ -127,22 +134,27 @@
|
|||
margin-top: 0
|
||||
}
|
||||
|
||||
.box {
|
||||
border-top: 1px solid #CCC;
|
||||
border-right: 1px solid #CCC;
|
||||
.field {
|
||||
border-bottom: 1px solid #CCC;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
width: 25px;
|
||||
height: 21px;
|
||||
color: #000;
|
||||
border-left: 1px solid #CCC;
|
||||
border-top: 1px solid #CCC;
|
||||
float: left
|
||||
}
|
||||
|
||||
.box.crossed {
|
||||
font-weight: 100;
|
||||
font-size: 16px
|
||||
.field span {
|
||||
border-right: 1px solid #CCC;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.field.square span {
|
||||
height: 35.4px;
|
||||
width: 35.4px
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
|
@ -153,53 +165,89 @@
|
|||
float: right
|
||||
}
|
||||
|
||||
.verticalText {
|
||||
.vertical-text {
|
||||
-moz-transform: rotate(90deg);
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
font-size: .65em;
|
||||
right: -108px;
|
||||
width: 200px;
|
||||
border: 2px solid #000;
|
||||
right: -110px;
|
||||
top: 50%
|
||||
}
|
||||
|
||||
vn-table {
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
display: table;
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
vn-thead {
|
||||
.row-oriented, .column-oriented {
|
||||
text-align: left;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
.row-oriented .description,
|
||||
.column-oriented .description {
|
||||
font-size: 0.6em;
|
||||
color: #888;
|
||||
padding: 0 !important
|
||||
}
|
||||
|
||||
.row-oriented .description .line,
|
||||
.column-oriented .description .line {
|
||||
border-bottom: 1px solid #DDD;
|
||||
border-right: 1px solid #DDD;
|
||||
border-left: 1px solid #DDD;
|
||||
margin-top: 10px;
|
||||
color: #999;
|
||||
padding: 5px
|
||||
}
|
||||
|
||||
.row-oriented .description span,
|
||||
.column-oriented .description span {
|
||||
background-color: #FFF;
|
||||
margin: -5px 0 0 50px;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
float: left
|
||||
}
|
||||
|
||||
.column-oriented {
|
||||
margin: 20px 0
|
||||
}
|
||||
|
||||
.column-oriented tfoot {
|
||||
border-top: 1px solid #808080;
|
||||
}
|
||||
|
||||
.column-oriented td, .column-oriented th {
|
||||
padding: 5px 10px
|
||||
}
|
||||
|
||||
.column-oriented thead {
|
||||
background-color: #c0c0c0
|
||||
}
|
||||
|
||||
.column-oriented thead tr {
|
||||
border-bottom: 1px solid #808080;
|
||||
border-top: 1px solid #808080;
|
||||
display: table-header-group
|
||||
background-color: #c0c0c0
|
||||
}
|
||||
|
||||
vn-tbody {
|
||||
border-top: 3px solid #888888;
|
||||
display: table-row-group
|
||||
.column-oriented tfoot tr:first-child td {
|
||||
padding-top: 20px !important;
|
||||
}
|
||||
|
||||
vn-tfoot {
|
||||
border-top: 1px solid #808080;
|
||||
display: table-footer-group
|
||||
.panel .row-oriented td, .panel .row-oriented th {
|
||||
padding: 10px 0
|
||||
}
|
||||
|
||||
vn-tr {
|
||||
display: table-row
|
||||
}
|
||||
|
||||
vn-th {
|
||||
font-weight: bold
|
||||
.row-oriented > tbody > tr > td {
|
||||
width: 30%
|
||||
}
|
||||
|
||||
vn-td, vn-th {
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
text-align: left;
|
||||
padding: 5px 0
|
||||
}
|
||||
.row-oriented > tbody > tr > th {
|
||||
padding-left: 30px;
|
||||
width: 70%
|
||||
}
|
|
@ -10,6 +10,14 @@
|
|||
text-align: right
|
||||
}
|
||||
|
||||
.gray {
|
||||
.font.gray {
|
||||
color: #555
|
||||
}
|
||||
|
||||
.font.light-gray {
|
||||
color: #888
|
||||
}
|
||||
|
||||
.font.small {
|
||||
font-size: 0.65em
|
||||
}
|
|
@ -5,6 +5,7 @@
|
|||
{"type": "email", "name": "letter-debtor-st"},
|
||||
{"type": "email", "name": "letter-debtor-nd"},
|
||||
{"type": "email", "name": "claim-pickup-order"},
|
||||
{"type": "email", "name": "sepa-core"},
|
||||
{"type": "report", "name": "delivery-note"},
|
||||
{"type": "report", "name": "invoice"},
|
||||
{"type": "report", "name": "rpt-claim-pickup-order"},
|
||||
|
|
|
@ -107,7 +107,7 @@ module.exports = {
|
|||
format: 'A4',
|
||||
border: '1.5cm',
|
||||
footer: {
|
||||
height: '80px',
|
||||
height: '60px',
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
if (!params.clientFk)
|
||||
throw new UserException('No client id specified');
|
||||
|
||||
return this.methods.fetchClientData(params.clientFk)
|
||||
return this.methods.fetchClient(params.clientFk)
|
||||
.then(([result]) => {
|
||||
if (!result)
|
||||
throw new UserException('No client data found');
|
||||
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
this.$i18n.locale = this.locale;
|
||||
},
|
||||
methods: {
|
||||
fetchClientData(clientFk) {
|
||||
fetchClient(clientFk) {
|
||||
return database.pool.query(`
|
||||
SELECT
|
||||
u.lang locale,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
const database = require(`${appPath}/lib/database`);
|
||||
const emailHeader = require('../email-header');
|
||||
const emailFooter = require('../email-footer');
|
||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||
|
||||
module.exports = {
|
||||
|
@ -13,7 +11,7 @@ module.exports = {
|
|||
if (!params.clientFk)
|
||||
throw new UserException('No client id specified');
|
||||
|
||||
return this.methods.fetchClientData(params.clientFk)
|
||||
return this.methods.fetchClient(params.clientFk)
|
||||
.then(([result]) => {
|
||||
if (!result)
|
||||
throw new UserException('No client data found');
|
||||
|
@ -29,7 +27,7 @@ module.exports = {
|
|||
};
|
||||
},
|
||||
methods: {
|
||||
fetchClientData(clientFk) {
|
||||
fetchClient(clientFk) {
|
||||
return database.pool.query(`
|
||||
SELECT
|
||||
c.id,
|
||||
|
@ -47,7 +45,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
'email-header': emailHeader,
|
||||
'email-footer': emailFooter,
|
||||
'email-header': require('../email-header'),
|
||||
'email-footer': require('../email-footer'),
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
footer {
|
||||
font-family: verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
font-size: 0.55em;
|
||||
color: #555;
|
||||
zoom: 0.55
|
||||
zoom: 0.65
|
||||
}
|
||||
|
||||
footer, footer p {
|
||||
text-align: center;
|
||||
font-size: 12px
|
||||
text-align: center
|
||||
}
|
||||
|
||||
footer .page {
|
||||
|
|
|
@ -3,11 +3,11 @@ header {
|
|||
padding-bottom: 10px;
|
||||
margin-bottom: 40px;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
font-size: 0.65em;
|
||||
color: #555
|
||||
}
|
||||
|
||||
header img {
|
||||
margin-bottom: 10px;
|
||||
width: 350px
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
font-size: 2em
|
||||
}
|
||||
|
||||
vn-table {
|
||||
table.column-oriented {
|
||||
margin-top: 50px !important
|
||||
}
|
||||
|
||||
|
|
|
@ -8,18 +8,22 @@
|
|||
<section class="size50">
|
||||
<section class="size75">
|
||||
<h1 class="title uppercase">{{$t('title')}}</h1>
|
||||
<section class="row inline small">
|
||||
<section class="text uppercase gray">{{$t('claimId')}}:</section>
|
||||
<section class="control">{{claimId}}</section>
|
||||
</section>
|
||||
<section class="row inline small">
|
||||
<section class="text uppercase gray">{{$t('clientId')}}:</section>
|
||||
<section class="control">{{clientId}}</section>
|
||||
</section>
|
||||
<section class="row inline small">
|
||||
<section class="text uppercase gray">{{$t('date')}}:</section>
|
||||
<section class="control">{{dated()}}</section>
|
||||
</section>
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('claimId')}}</td>
|
||||
<th>{{claimId}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('clientId')}}</td>
|
||||
<th>{{clientId}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('date')}}</td>
|
||||
<th>{{dated()}}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<section class="size50">
|
||||
|
@ -41,24 +45,24 @@
|
|||
</section>
|
||||
</section>
|
||||
|
||||
<vn-table>
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th>{{$t('reference')}}</vn-th>
|
||||
<vn-th>{{$t('quantity')}}</vn-th>
|
||||
<vn-th>{{$t('claims')}}</vn-th>
|
||||
<vn-th>{{$t('concept')}}</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr v-for="sale in sales" :key="sale.id">
|
||||
<vn-td class="gray">{{sale.id}}</vn-td>
|
||||
<vn-td>{{sale.quantity}}</vn-td>
|
||||
<vn-td>{{sale.claimQuantity}}</vn-td>
|
||||
<vn-td>{{sale.concept}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
<table class="column-oriented">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{$t('reference')}}</th>
|
||||
<th>{{$t('quantity')}}</th>
|
||||
<th>{{$t('claims')}}</th>
|
||||
<th>{{$t('concept')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="sale in sales" :key="sale.id">
|
||||
<td class="font gray">{{sale.id}}</td>
|
||||
<td>{{sale.quantity}}</td>
|
||||
<td>{{sale.claimQuantity}}</td>
|
||||
<td>{{sale.concept}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<section class="panel sign">
|
||||
<section class="body centered">
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
font-size: 2em
|
||||
}
|
||||
|
||||
vn-table {
|
||||
table.column-oriented {
|
||||
margin-top: 50px !important
|
||||
}
|
|
@ -8,14 +8,18 @@
|
|||
<section class="size50">
|
||||
<section class="size75">
|
||||
<h1 class="title uppercase">{{$t('title')}}</h1>
|
||||
<section class="row inline small">
|
||||
<section class="text uppercase gray">{{$t('clientId')}}:</section>
|
||||
<section class="control">{{clientId}}</section>
|
||||
</section>
|
||||
<section class="row inline small">
|
||||
<section class="text uppercase gray">{{$t('date')}}:</section>
|
||||
<section class="control">{{dated()}}</section>
|
||||
</section>
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('clientId')}}</td>
|
||||
<th>{{clientId}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="font gray uppercase">{{$t('date')}}</td>
|
||||
<th>{{dated()}}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<section class="size50">
|
||||
|
@ -37,35 +41,35 @@
|
|||
</section>
|
||||
</section>
|
||||
|
||||
<vn-table>
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th>{{$t('date')}}</vn-th>
|
||||
<vn-th>{{$t('concept')}}</vn-th>
|
||||
<vn-th class="number">{{$t('invoiced')}}</vn-th>
|
||||
<vn-th class="number">{{$t('payed')}}</vn-th>
|
||||
<vn-th class="number">{{$t('balance')}}</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr v-for="sale in sales" :key="sale.id">
|
||||
<vn-td>{{toISOString(sale.issued)}}</vn-td>
|
||||
<vn-td>{{sale.ref}}</vn-td>
|
||||
<vn-td class="number">{{sale.debtOut}}</vn-td>
|
||||
<vn-td class="number">{{sale.debtIn}}</vn-td>
|
||||
<vn-td class="number">{{getBalance(sale)}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
<vn-tfoot>
|
||||
<vn-tr>
|
||||
<vn-td></vn-td>
|
||||
<vn-td><strong class="pull-right">Total</strong></vn-td>
|
||||
<vn-td class="number">{{getTotalDebtOut()}}</vn-td>
|
||||
<vn-td class="number">{{getTotalDebtIn()}}</vn-td>
|
||||
<vn-td class="number">{{totalBalance}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tfoot>
|
||||
</vn-table>
|
||||
<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>
|
||||
<tr v-for="sale in sales" :key="sale.id">
|
||||
<td>{{toISOString(sale.issued)}}</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()}}</td>
|
||||
<td class="number">{{getTotalDebtIn()}}</td>
|
||||
<td class="number">{{totalBalance}}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
<report-footer id="pageFooter"
|
||||
|
|
|
@ -3,12 +3,21 @@
|
|||
}
|
||||
|
||||
.title {
|
||||
margin-bottom: 10px;
|
||||
font-weight: 100;
|
||||
margin-top: 0;
|
||||
margin-bottom: 20px;
|
||||
font-size: 2em
|
||||
font-size: 1.5em;
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.payment-type {
|
||||
width: auto
|
||||
}
|
||||
|
||||
.payment-type th:nth-child(2), .payment-type th:nth-child(5) {
|
||||
padding: 10px !important
|
||||
}
|
||||
|
||||
.payment-type th:nth-child(3){
|
||||
padding: 0 50px !important
|
||||
}
|
||||
|
||||
vn-table {
|
||||
margin-top: 50px !important
|
||||
}
|
|
@ -4,265 +4,144 @@
|
|||
<section class="container">
|
||||
<report-header></report-header>
|
||||
<section class="main">
|
||||
<h1 class="title centered">{{$t('title')}}</h1>
|
||||
<section class="panel supplierPanel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
<section class="vertical-text">
|
||||
{{$t('supplier.toCompleteBySupplier')}}
|
||||
</section>
|
||||
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{$t('supplier.orderReference')}}</td>
|
||||
<th>{{mandateCode}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.identifier')}}</td>
|
||||
<th>ES89000B97367486</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.name')}}</td>
|
||||
<th>{{supplierName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.street')}}</td>
|
||||
<th>{{supplierStreet}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.location')}}</td>
|
||||
<th>{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.country')}}</td>
|
||||
<th>{{supplierCountry}}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section class="panel supplierPanel">
|
||||
<p class="font small light-gray">{{$t('description')}}</p>
|
||||
<p class="font small">
|
||||
<strong>{{$t('documentCopy')}}</strong>
|
||||
</p>
|
||||
|
||||
<section class="panel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
<section class="vertical-text">
|
||||
{{$t('client.toCompleteByClient')}}
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section class="panel supplierPanel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="panel supplierPanel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section class="panel supplierPanel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
<section class="panel supplierPanel">
|
||||
<section class="body">
|
||||
<section class="verticalText">{{$t('supplier.toCompleteBySupplier')}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.orderReference')}}</section>
|
||||
<section class="control">{{mandateCode}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.identifier')}}</section>
|
||||
<section class="control">ES89000B97367486</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.name')}}</section>
|
||||
<section class="control">{{supplierName}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.street')}}</section>
|
||||
<section class="control">{{supplierStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.location')}}</section>
|
||||
<section class="control">{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('supplier.country')}}</section>
|
||||
<section class="control">{{supplierCountry}}</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<!-- <p class="font small">{{$t('bodyDescription}}</p>
|
||||
<p class="font small"><strong>{{$t('clientAdvice}}</strong></p>
|
||||
|
||||
<section class="panel">
|
||||
<section class="verticalText">{{$t('toCompleteByClient}}</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('clientName}}</section>
|
||||
<section class="control">{{clientName}}</section>
|
||||
<section class="description">{{$t('accountHolder}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('clientStreet}}</section>
|
||||
<section class="control">{{clientStreet}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('clientLocation}}</section>
|
||||
<section class="control">{{clientPostCode}}, {{clientCity}} ({{clientProvince}})</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('clientCountry}}</section>
|
||||
<section class="control">{{clientCountry}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text font verticalAlign">{{$t('swift}}</section>
|
||||
<section class="control">
|
||||
{{#swiftFields}}
|
||||
<section class="box"></section>
|
||||
{{/swiftFields}}
|
||||
</section>
|
||||
</section>
|
||||
<section class="row">
|
||||
<section class="text">{{$t('accountNumber}}</section>
|
||||
<section class="control">
|
||||
<section class="box">ES</section>
|
||||
{{#accountNumberFields}}
|
||||
<section class="box"></section>
|
||||
{{/accountNumberFields}}
|
||||
</section>
|
||||
<section class="description">
|
||||
<section class="line"><span>{{$t('accountNumberFormat}}</span></section>
|
||||
</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text font verticalAlign">{{$t('paymentType}}</section>
|
||||
<section class="control">
|
||||
<section class="columns">
|
||||
<section class="size33">
|
||||
<section class="size25">
|
||||
<section class="box crossed">X</section>
|
||||
</section>
|
||||
<section class="size25 font verticalAlign">{{$t('recurrent}}</section>
|
||||
</section>
|
||||
<section class="size33 font centered">O</section>
|
||||
<section class="size33">
|
||||
<section class="size25">
|
||||
<section class="box"></section>
|
||||
</section>
|
||||
<section class="size25 font verticalAlign">{{$t('unique}}</section>
|
||||
</section>
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
{{$t('client.name')}}
|
||||
<section class="description">{{$t('client.accountHolder')}}</section>
|
||||
</td>
|
||||
<th>{{clientName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.street')}}</td>
|
||||
<th>{{clientStreet}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.location')}}</td>
|
||||
<th>{{clientPostCode}}, {{clientCity}} ({{clientProvince}})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.country')}}</td>
|
||||
<th>{{clientCountry}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.swift')}}</td>
|
||||
<th>
|
||||
<section class="field square">
|
||||
<span v-for="i in 11"></span>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('signLocation}}</section>
|
||||
<section class="control">{{currentDate}}, {{supplierProvince}}</section>
|
||||
</section>
|
||||
<section class="row inline">
|
||||
<section class="text">{{$t('sign}}</section>
|
||||
<section class="control"></section>
|
||||
</section>
|
||||
</section>
|
||||
<p class="font small">{{$t('mandatoryFields}}</p>
|
||||
<p class="font small">{{$t('sendOrder}}</p> -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">{{$t('client.accountNumber')}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<section class="field square">
|
||||
<span>E</span>
|
||||
<span>S</span>
|
||||
<span v-for="i in 22"></span>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="description" colspan="2">
|
||||
<section class="line">
|
||||
<span>{{$t('client.accountNumberFormat')}}</span>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.paymentType')}}</td>
|
||||
<th>
|
||||
<table class="payment-type">
|
||||
<tr>
|
||||
<td>
|
||||
<section class="field square">
|
||||
<span class="crossed">X</span>
|
||||
</section>
|
||||
</td>
|
||||
<th>{{$t('client.recurrent')}}</th>
|
||||
<th>O</th>
|
||||
<td>
|
||||
<section class="field square">
|
||||
<span></span>
|
||||
</section>
|
||||
</td>
|
||||
<th>{{$t('client.unique')}}</th>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.signLocation')}}</td>
|
||||
<th>{{dated()}}, {{supplierProvince}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.sign')}}</td>
|
||||
<th></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<p class="font small">{{$t('mandatoryFields')}}</p>
|
||||
<p class="font small">{{$t('sendOrder')}}</p>
|
||||
</section>
|
||||
|
||||
<report-footer id="pageFooter"
|
||||
:left-text="$t('client', [clientId])"
|
||||
:left-text="$t('order', [mandateCode])"
|
||||
:center-text="clientName">
|
||||
</report-footer>
|
||||
</section>
|
||||
|
|
|
@ -2,6 +2,15 @@ module.exports = {
|
|||
messages: {
|
||||
es: {
|
||||
title: 'Orden de domiciliación de adeudo SEPA CORE',
|
||||
description: `Mediante la firma de esta orden de domiciliación, el deudor autoriza (A) al acreedor a enviar instrucciones
|
||||
a la entidad del deudor para adeudar su cuenta y (B) a la entidad para efectuar los adeudos en su cuenta siguiendo las
|
||||
instrucciones del acreedor.Como parte de sus derechos, el deudor está legitimado al reembolso por su entidad en los
|
||||
términos y condiciones del contrato suscrito con la misma. La solicitud de reembolso deberá efectuarse dentro de las
|
||||
ocho semanas que adeudo en cuenta. Puede obtener información adicional sobre sus derechos en su entidad financiera.`,
|
||||
documentCopy: `Debe llevar a su Entidad Bancaria una copia
|
||||
del documento firmado para que lo registre y evitar la devolución.`,
|
||||
mandatoryFields: `TODOS LOS CAMPOS HAN DE SER CUMPLIMENTADOS OBLIGATORIAMENTE.`,
|
||||
sendOrder: `UNA VEZ FIRMADA ESTA ORDEN DE DOMICILIACIÓN DEBE SER ENVIADA AL ACREEDOR PARA SU CUSTODIA Y ES RECOMENDABLE FACILITAR UNA COPIA A SU ENTIDAD BANCARIA.`,
|
||||
supplier: {
|
||||
toCompleteBySupplier: 'A cumplimentar por el acreedor',
|
||||
orderReference: 'Referencia de la orden de domiciliación',
|
||||
|
@ -9,11 +18,25 @@ module.exports = {
|
|||
name: 'Nombre del acreedor',
|
||||
street: 'Dirección',
|
||||
location: 'CP - Población - Provincia',
|
||||
country: 'País',
|
||||
country: 'País'
|
||||
},
|
||||
client: {
|
||||
toCompleteByClient: 'A cumplimentar por el deudor',
|
||||
name: 'Nombre del deudor/es',
|
||||
street: 'Dirección del deudor',
|
||||
location: 'CP - Población - Provincia',
|
||||
country: 'País del deudor',
|
||||
swift: 'Swift BIC',
|
||||
accountNumber: 'Número de cuenta - IBAN',
|
||||
accountHolder: '(Titular/es de la cuenta de cargo)',
|
||||
accountNumberFormat: 'En España el IBAN consta de 24 posiciones comenzando siempre por ES',
|
||||
paymentType: 'Tipo de pago',
|
||||
recurrent: 'Recurrente',
|
||||
unique: 'Único',
|
||||
signLocation: 'Fecha - Localidad',
|
||||
sign: 'Firma del deudor y sello',
|
||||
},
|
||||
order: 'Ord. domiciliación {0}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
const CssReader = require(`${appPath}/lib/cssReader`);
|
||||
|
||||
module.exports = new CssReader([
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${__dirname}/style.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,40 @@
|
|||
body {
|
||||
background-color: #EEE
|
||||
}
|
||||
|
||||
.container {
|
||||
max-width: 600px;
|
||||
min-width: 320px;
|
||||
margin: 0 auto;
|
||||
color: #555
|
||||
}
|
||||
|
||||
.main {
|
||||
background-color: #FFF;
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
.main a {
|
||||
color: #8dba25
|
||||
}
|
||||
|
||||
.main h1 {
|
||||
color: #999
|
||||
}
|
||||
|
||||
.main h3 {
|
||||
font-size: 16px
|
||||
}
|
||||
|
||||
.title {
|
||||
background-color: #95d831;
|
||||
text-transform: uppercase;
|
||||
text-align: center;
|
||||
padding: 35px 0
|
||||
}
|
||||
|
||||
.title h1 {
|
||||
font-size: 32px;
|
||||
color: #333;
|
||||
margin: 0
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<title>{{ $t('subject') }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<section class="container">
|
||||
<!-- Header component -->
|
||||
<email-header></email-header>
|
||||
<!-- End header component -->
|
||||
|
||||
<section class="main">
|
||||
<!-- Title block -->
|
||||
<div class="title">
|
||||
<h1>{{ $t('title') }}</h1>
|
||||
</div>
|
||||
<!-- Title block end -->
|
||||
|
||||
<p>{{$t('description.dear')}},</p>
|
||||
<p>{{$t('description.instructions')}}</p>
|
||||
<p>{{$t('description.conclusion')}}</p>
|
||||
|
||||
</section>
|
||||
<!-- Footer component -->
|
||||
<email-footer></email-footer>
|
||||
<!-- End footer component -->
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,48 @@
|
|||
const database = require(`${appPath}/lib/database`);
|
||||
const reportEngine = require(`${appPath}/lib/reportEngine.js`);
|
||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||
|
||||
module.exports = {
|
||||
name: 'sepa-core',
|
||||
async asyncData(ctx, params) {
|
||||
const promises = [];
|
||||
const data = {
|
||||
isPreview: ctx.method === 'GET',
|
||||
};
|
||||
|
||||
if (!params.clientFk)
|
||||
throw new UserException('No client id specified');
|
||||
|
||||
promises.push(reportEngine.toPdf('rpt-sepa-core', ctx));
|
||||
promises.push(this.methods.fetchClient(params.clientFk));
|
||||
|
||||
return Promise.all(promises).then(result => {
|
||||
const stream = result[0];
|
||||
const [[client]] = result[1];
|
||||
|
||||
Object.assign(data, client);
|
||||
Object.assign(data, {attachments: [{filename: 'rpt-sepa-core.pdf', content: stream}]});
|
||||
|
||||
return data;
|
||||
});
|
||||
},
|
||||
created() {
|
||||
this.$i18n.locale = this.locale;
|
||||
},
|
||||
|
||||
methods: {
|
||||
fetchClient(clientFk) {
|
||||
return database.pool.query(`
|
||||
SELECT
|
||||
u.lang locale,
|
||||
c.email recipient
|
||||
FROM client c
|
||||
JOIN account.user u ON u.id = c.id
|
||||
WHERE c.id = ?`, [clientFk]);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'email-header': require('../email-header'),
|
||||
'email-footer': require('../email-footer'),
|
||||
},
|
||||
};
|
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
es: {
|
||||
subject: 'Solicitud de domiciliación bancaria',
|
||||
title: 'Domiciliación SEPA CORE',
|
||||
description: {
|
||||
dear: 'Estimado cliente',
|
||||
instructions: `Para poder tramitar tu solicitud de cambio de tu forma de pago a giro bancario,
|
||||
te adjuntamos los documentos correspondientes a la ley de pago, que tienes que cumplimentar y enviarnos.`,
|
||||
conclusion: 'Gracias por tu atención.'
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue