Deprecated LCR
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
d170f73662
commit
f8c90832fd
|
@ -4,6 +4,6 @@
|
|||
<section v-if="centerText" class="uppercase">{{centerText}}</section>
|
||||
<section class="number">{{$t('numPages')}}</section>
|
||||
</section>
|
||||
<p class="phytosanitary">{{$t('law.phytosanitary')}}</p>
|
||||
<p class="phytosanitary" v-if="showPhytosanitary">{{$t('law.phytosanitary')}}</p>
|
||||
<p class="privacy" v-html="$t('law.privacy')"></p>
|
||||
</footer>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
name: 'report-footer',
|
||||
props: ['leftText', 'centerText', 'locale']
|
||||
props: ['leftText', 'centerText', 'locale', 'showPhytosanitary']
|
||||
};
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
const CssReader = require(`${appPath}/lib/cssReader`);
|
||||
|
||||
module.exports = new CssReader([
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/email.css`,
|
||||
`${appPath}/common/css/misc.css`])
|
||||
.mergeStyles();
|
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<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 :locale="locale"></email-footer>
|
||||
<!-- End footer component -->
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
|
@ -1,49 +0,0 @@
|
|||
const database = require(`${appPath}/lib/database`);
|
||||
const reportEngine = require(`${appPath}/lib/reportEngine.js`);
|
||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||
|
||||
module.exports = {
|
||||
name: 'client-lcr',
|
||||
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-lcr', 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-lcr.pdf', content: stream}]});
|
||||
|
||||
return data;
|
||||
});
|
||||
},
|
||||
created() {
|
||||
if (this.locale)
|
||||
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'),
|
||||
},
|
||||
};
|
|
@ -1,64 +0,0 @@
|
|||
module.exports = {
|
||||
messages: {
|
||||
es: {
|
||||
subject: 'Autorisation pour débit',
|
||||
title: 'Autorisation pour débit',
|
||||
description: {
|
||||
dear: 'Messieurs',
|
||||
instructions: `Étant donné les excellentes relations existantes entre nos
|
||||
deux sociétés et en vue de faciliter les processus de
|
||||
paiement de nos factures, nous vous suggérons l'utilisation
|
||||
du système française de compensation LCR.
|
||||
Ce service consiste à effectuer des recouvrements
|
||||
automatiques, de manière électronique, de nos effets -
|
||||
lettres de change et billets à ordre - tirés sur votre société
|
||||
en Euro, qui présente comme principal avantage pour vous
|
||||
la substantielle réduction de coûts dans des termes de frais
|
||||
et commissions bancaires.
|
||||
Dans le cas où vous accepteriez notre proposition, à
|
||||
l’échéance de chaque effet, votre compte sera débité
|
||||
automatiquement par votre Banque.
|
||||
Ainsi, nous vous demandons de signer et envoyer à votre
|
||||
Banque l'original de l'autorisation pour débit en annexe,
|
||||
dûment remplie, et de nous retourner une photocopie de la
|
||||
dite autorisation.
|
||||
Ce système étant basé sur la transmission de données de
|
||||
manière électronique, le maniement de documents
|
||||
physiques á été éliminé
|
||||
En vous remercieront pour votre collaboration, nous vous
|
||||
prions d’agréer, Messieurs, nos salutations distinguées.`,
|
||||
conclusion: 'Bien cordialement'
|
||||
},
|
||||
},
|
||||
fr: {
|
||||
subject: 'Autorisation pour débit',
|
||||
title: 'Autorisation pour débit',
|
||||
description: {
|
||||
dear: 'Messieurs',
|
||||
instructions: `Étant donné les excellentes relations existantes entre nos
|
||||
deux sociétés et en vue de faciliter les processus de
|
||||
paiement de nos factures, nous vous suggérons l'utilisation
|
||||
du système française de compensation LCR.
|
||||
Ce service consiste à effectuer des recouvrements
|
||||
automatiques, de manière électronique, de nos effets -
|
||||
lettres de change et billets à ordre - tirés sur votre société
|
||||
en Euro, qui présente comme principal avantage pour vous
|
||||
la substantielle réduction de coûts dans des termes de frais
|
||||
et commissions bancaires.
|
||||
Dans le cas où vous accepteriez notre proposition, à
|
||||
l’échéance de chaque effet, votre compte sera débité
|
||||
automatiquement par votre Banque.
|
||||
Ainsi, nous vous demandons de signer et envoyer à votre
|
||||
Banque l'original de l'autorisation pour débit en annexe,
|
||||
dûment remplie, et de nous retourner une photocopie de la
|
||||
dite autorisation.
|
||||
Ce système étant basé sur la transmission de données de
|
||||
manière électronique, le maniement de documents
|
||||
physiques á été éliminé
|
||||
En vous remercieront pour votre collaboration, nous vous
|
||||
prions d’agréer, Messieurs, nos salutations distinguées.`,
|
||||
conclusion: 'Bien cordialement'
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
|
@ -2,7 +2,17 @@ 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.
|
||||
instructions: <p>Dadas las excelentes relaciones existentes entre nuestras
|
||||
dos empresas y para facilitar los procesos de pago de nuestras facturas,
|
||||
sugerimos el uso del sistema de domiciliación bancaria SEPA CORE.</p>
|
||||
<p>Este servicio consiste en realizar de forma automatizada y electrónicamente,
|
||||
la emision de nuestros recibos a su empresa, como principal ventaja para usted de
|
||||
la reducción sustancial de costos en términos de honorarios y gastos bancarios.</p>
|
||||
<p>En caso de que acepte nuestra propuesta, a la fecha de vencimiento de cada efecto,
|
||||
se debitará a su cuenta automáticamente por su banco.
|
||||
Por lo tanto, le pedimos que firme y envíe a su banco la autorización original adjunta,
|
||||
debidamente completado, y devuelva una fotocopia de dicha autorización.</p>
|
||||
<p>Este sistema se basa en la transmisión de datos electrónicamente,
|
||||
el manejo de documentos físico ha sido eliminado.</p>
|
||||
<p>Le agradecemos su cooperación, les pedimos que acepten, nuestros mejores deseos.</p>
|
||||
conclusion: Gracias por tu atención.
|
||||
|
|
|
@ -238,6 +238,7 @@
|
|||
<div class="grid-row">
|
||||
<div class="grid-block">
|
||||
<report-footer id="pageFooter"
|
||||
v-bind:show-phytosanitary="true"
|
||||
v-bind:left-text="$t('ticket', [ticket.id])"
|
||||
v-bind:center-text="client.socialName"
|
||||
v-bind:is-preview="isPreview"
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
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();
|
|
@ -1,31 +0,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
|
||||
}
|
||||
|
||||
.table-margin {
|
||||
margin-top: 20px
|
||||
}
|
||||
|
||||
.grey-background {
|
||||
background-color: #DDD
|
||||
}
|
||||
|
||||
.emptyField {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.row-oriented.input-table > tbody > tr > td {
|
||||
width: 10% !important
|
||||
}
|
||||
|
||||
.row-oriented.input-table > tbody > tr > th {
|
||||
width: 90% !important
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 101 KiB |
|
@ -1,189 +0,0 @@
|
|||
<!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 12">{{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 input-table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{$t('bank.name')}}:</td>
|
||||
<th><span class="emptyField"></span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('bank.street')}}:</td>
|
||||
<th><span class="emptyField"></span></th>
|
||||
</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 -->
|
||||
<section class="signature panel">
|
||||
<section class="header">{{$t('client.sign')}}</section>
|
||||
<section class="body centered">
|
||||
<section>
|
||||
<p>{{$t('client.signDate')}}:</p>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</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>
|
|
@ -1,80 +0,0 @@
|
|||
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'),
|
||||
},
|
||||
};
|
|
@ -1,36 +0,0 @@
|
|||
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',
|
||||
sign: 'Signature autorisée du tiré',
|
||||
signDate: 'Lieu et date',
|
||||
toCompleteByClient: 'À remplir par le débiteur',
|
||||
},
|
||||
order: 'Ord. domiciliación {0}',
|
||||
},
|
||||
},
|
||||
};
|
|
@ -37,3 +37,6 @@ client:
|
|||
signLocation: Fecha - Localidad
|
||||
sign: Firma del deudor y sello
|
||||
order: Ord. domiciliación {0}
|
||||
Francia: Francia
|
||||
España: España
|
||||
Portugal: Portugal
|
|
@ -34,4 +34,5 @@ client:
|
|||
sign: Signature du débiteur et tampon
|
||||
order: Réf. mandat {0}
|
||||
Francia: France
|
||||
España: Espagne
|
||||
España: Espagne
|
||||
Portugal: Portugal
|
|
@ -37,3 +37,6 @@ client:
|
|||
signLocation: Data - Localidade
|
||||
sign: Assinatura e carimbo do devedor
|
||||
order: Referência da ordem {0}
|
||||
Francia: França
|
||||
España: Espanha
|
||||
Portugal: Portugal
|
|
@ -153,7 +153,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.signLocation')}}</td>
|
||||
<th>{{dated}}, {{supplier.province}}</th>
|
||||
<th>{{dated}}, {{client.province}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{$t('client.sign')}}</td>
|
||||
|
|
Loading…
Reference in New Issue