#1283 Informe core francia LCR
This commit is contained in:
parent
8336db59d4
commit
4dfd927947
|
@ -99,6 +99,10 @@
|
|||
width: 35.4px
|
||||
}
|
||||
|
||||
.emptyField {
|
||||
border-bottom: 1px dotted grey
|
||||
}
|
||||
|
||||
.field.rectangle span {
|
||||
height: 2em;
|
||||
width: 8em
|
||||
|
@ -185,20 +189,45 @@ table {
|
|||
color: #888
|
||||
}
|
||||
|
||||
|
||||
.line {
|
||||
border-bottom: 1px solid #DDD;
|
||||
border-right: 1px solid #DDD;
|
||||
border-left: 1px solid #DDD;
|
||||
position: relative;
|
||||
margin-left: -1px;
|
||||
margin-right: 1px;
|
||||
margin-top: 10px;
|
||||
color: #999;
|
||||
padding: 5px
|
||||
padding: 5px 0
|
||||
}
|
||||
|
||||
.line .vertical-aligned {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.line span {
|
||||
background-color: #FFF;
|
||||
margin: -5px 0 0 50px;
|
||||
display: block;
|
||||
padding: 5px;
|
||||
float: left
|
||||
padding: 5px
|
||||
}
|
||||
|
||||
.signature {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.signature td {
|
||||
text-align: center;
|
||||
margin: auto;
|
||||
width: 40%;
|
||||
padding: 0 50px 0 50px;
|
||||
}
|
||||
|
||||
.signature-image {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
.signature-line {
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
|
@ -14,6 +14,7 @@
|
|||
{"type": "report", "name": "rpt-receipt"},
|
||||
{"type": "report", "name": "rpt-zone"},
|
||||
{"type": "report", "name": "rpt-route"},
|
||||
{"type": "report", "name": "rpt-lcr"},
|
||||
{"type": "static", "name": "email-header"},
|
||||
{"type": "static", "name": "email-footer"},
|
||||
{"type": "static", "name": "report-header"},
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
const CssReader = require(`${appPath}/lib/cssReader`);
|
||||
|
||||
module.exports = new CssReader([
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/report.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${__dirname}/style.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,19 @@
|
|||
.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
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
.grey-background {
|
||||
background-color: #DDD
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 101 KiB |
|
@ -0,0 +1,197 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<body>
|
||||
<section class="container">
|
||||
<!-- Header component -->
|
||||
<report-header :locale="locale"></report-header>
|
||||
<!-- End header component -->
|
||||
<section class="main">
|
||||
<h1 class="title centered">{{$t('title')}}</h1>
|
||||
<section class="panel">
|
||||
<section class="header">{{$t('Creditor')}}</section>
|
||||
<section class="body">
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td >{{$t('supplier.name')}}:</td>
|
||||
<th>{{supplierName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('supplier.street')}}:</td>
|
||||
<th>{{supplierStreet}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>{{supplierPostCode}}, {{supplierCity}} ({{supplierProvince}})</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>{{supplierCountry}}</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<section class="panel">
|
||||
<section class="header">{{$t('Deptor')}}</section>
|
||||
<section class="body">
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{$t('client.name')}}:</td>
|
||||
<th>{{clientName}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.street')}}:</td>
|
||||
<th>{{clientStreet}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>{{clientPostCode}}, {{clientCity}} ({{clientProvince}})</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<th>{{clientCountry}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.fi')}}:</td>
|
||||
<th>
|
||||
<section class="field square">
|
||||
<span v-for="i in 11">{{fi.charAt(i)}}</span>
|
||||
</section>
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<p class="font">{{$t('description')}}</p>
|
||||
<section class="panel">
|
||||
<section class="header">{{$t('Bank')}}</section>
|
||||
<section class="body">
|
||||
<section class="vertical-text">
|
||||
{{$t('client.toCompleteByClient')}}
|
||||
</section>
|
||||
<table class="row-oriented">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{$t('bank.name')}}:</td>
|
||||
<td class="emptyField"><span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('bank.street')}}:</td>
|
||||
<td class="emptyField"><span></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- RIB -->
|
||||
<table class="table-margin">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{$t('bank.account')}}:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 1em">
|
||||
<section class="field square">
|
||||
<span v-for="i in 5"></span>
|
||||
</section>
|
||||
</td>
|
||||
<td style="padding-right: 1em">
|
||||
<section class="field square">
|
||||
<span v-for="i in 5"></span>
|
||||
</section>
|
||||
</td>
|
||||
<td style="padding-right: 1em">
|
||||
<section class="field square">
|
||||
<span v-for="i in 11"></span>
|
||||
</section>
|
||||
</td>
|
||||
<td>
|
||||
<section class="field square" >
|
||||
<span v-for="i in 2"></span>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-right: 1em">
|
||||
<div class="line">
|
||||
<div class="vertical-aligned">
|
||||
<span>{{$t('bank.bankCode')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-right: 1em">
|
||||
<div class="line">
|
||||
<div class="vertical-aligned">
|
||||
<span>{{$t('bank.agencyCode')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td style="padding-right: 1em">
|
||||
<div class="line">
|
||||
<div class="vertical-aligned">
|
||||
<span>{{$t('bank.accountNumber')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="line">
|
||||
<div class="vertical-aligned">
|
||||
<span>{{$t('bank.ribKey')}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- IBAN -->
|
||||
<table class="table-margin">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>IBAN:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<section class="field square">
|
||||
<span class="grey-background">F</span>
|
||||
<span class="grey-background">R</span>
|
||||
<span v-for="i in 23"></span>
|
||||
</section>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
</section>
|
||||
<p>{{$t('authorization')}}</p>
|
||||
|
||||
<!-- signature -->
|
||||
<table class="signature">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<img class="signature-image" :src="embeded['/assets/images/signature.png']">
|
||||
<div class="signature-line"></div>
|
||||
<p>(signature autorisée du tiré)</p>
|
||||
</td>
|
||||
<td>
|
||||
<div class="signature-image"></div>
|
||||
<div class="signature-line"></div>
|
||||
<p>(lieu et date)</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<!-- Footer component -->
|
||||
<report-footer id="pageFooter"
|
||||
:left-text="$t('order', [mandateCode])"
|
||||
:center-text="clientName"
|
||||
:locale="locale">
|
||||
</report-footer>
|
||||
<!-- End footer component -->
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,80 @@
|
|||
const strftime = require('strftime');
|
||||
const database = require(`${appPath}/lib/database`);
|
||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||
|
||||
module.exports = {
|
||||
name: 'rpt-lcr',
|
||||
async asyncData(ctx, params) {
|
||||
if (!params.clientFk)
|
||||
throw new UserException('No client id specified');
|
||||
|
||||
if (!params.companyFk)
|
||||
throw new UserException('No company id specified');
|
||||
|
||||
return this.methods.fetchClient(params.clientFk, params.companyFk)
|
||||
.then(([[client]]) => {
|
||||
if (!client)
|
||||
throw new UserException('No client data found');
|
||||
|
||||
return client;
|
||||
});
|
||||
},
|
||||
created() {
|
||||
if (this.locale)
|
||||
this.$i18n.locale = this.locale;
|
||||
|
||||
const embeded = [];
|
||||
this.files.map(file => {
|
||||
embeded[file] = `file://${__dirname + file}`;
|
||||
});
|
||||
this.embeded = embeded;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
files: ['/assets/images/signature.png']
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
fetchClient(clientFk, companyFk) {
|
||||
return database.pool.query(
|
||||
`SELECT
|
||||
c.id clientId,
|
||||
u.lang locale,
|
||||
m.code mandateCode,
|
||||
c.socialName AS clientName,
|
||||
c.street AS clientStreet,
|
||||
c.postcode AS clientPostCode,
|
||||
c.city AS clientCity,
|
||||
c.fi,
|
||||
p.name AS clientProvince,
|
||||
ct.country AS clientCountry,
|
||||
s.name AS supplierName,
|
||||
s.street AS supplierStreet,
|
||||
sc.country AS supplierCountry,
|
||||
s.postCode AS supplierPostCode,
|
||||
s.city AS supplierCity,
|
||||
sp.name AS supplierProvince
|
||||
FROM client c
|
||||
JOIN account.user u ON u.id = c.id
|
||||
JOIN country ct ON ct.id = c.countryFk
|
||||
LEFT JOIN mandate m ON m.clientFk = c.id
|
||||
AND m.companyFk = ? AND m.finished IS NULL
|
||||
LEFT JOIN supplier s ON s.id = m.companyFk
|
||||
LEFT JOIN country sc ON sc.id = s.countryFk
|
||||
LEFT JOIN province sp ON sp.id = s.provinceFk
|
||||
LEFT JOIN province p ON p.id = c.provinceFk
|
||||
WHERE (m.companyFk = ? OR m.companyFk IS NULL) AND c.id = ?
|
||||
ORDER BY m.created DESC LIMIT 1`, [companyFk, companyFk, clientFk]);
|
||||
},
|
||||
dated: () => {
|
||||
return strftime('%d-%m-%Y', new Date());
|
||||
},
|
||||
toISOString: date => {
|
||||
return strftime('%d-%m-%Y', date);
|
||||
},
|
||||
},
|
||||
components: {
|
||||
'report-header': require('../report-header'),
|
||||
'report-footer': require('../report-footer'),
|
||||
},
|
||||
};
|
|
@ -0,0 +1,44 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
es: {
|
||||
title: 'Autorisation pour débit',
|
||||
Creditor: 'Tireur',
|
||||
Deptor: 'Tiré',
|
||||
Bank: 'Banque',
|
||||
description: `Nous, soussignés, autorisons que tout effet émis par le tireur , susmentionné, et tiré sur notre Société,
|
||||
soit automatiquement débité dans notre compte selon les suivants détails de domiciliation:`,
|
||||
authorization: `Cette autorisation maintient sa validité jusqu'à à la réception de
|
||||
nouvelles instructions.`,
|
||||
supplier: {
|
||||
name: 'Nom',
|
||||
street: 'Adresse'
|
||||
},
|
||||
bank: {
|
||||
name: 'Nom',
|
||||
street: 'Adresse',
|
||||
account: 'RIB',
|
||||
bankCode: 'Code banque',
|
||||
agencyCode: 'Code agence',
|
||||
accountNumber: 'Numero de compte',
|
||||
ribKey: 'Clé RIB'
|
||||
},
|
||||
client: {
|
||||
name: 'Nom',
|
||||
street: 'Adresse',
|
||||
fi: 'Siren',
|
||||
location: 'CP - Población - Provincia',
|
||||
country: 'País del deudor',
|
||||
swift: 'Swift BIC',
|
||||
accountNumber: 'Número de cuenta - IBAN',
|
||||
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',
|
||||
toCompleteByClient: 'À remplir par le débiteur',
|
||||
},
|
||||
order: 'Ord. domiciliación {0}',
|
||||
},
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue