Merge pull request 'Fix missing report for the invoice electronic notification' (!1216) from Hotfix-crear-report-Factura-Electronica into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1216
This commit is contained in:
Pau 2022-12-27 08:04:27 +00:00
commit 6e6dc73d59
8 changed files with 51 additions and 2 deletions

View File

@ -1 +0,0 @@
insert into `util`.`notification` (`id`, `name`,`description`) values (2, 'invoiceElectronic', 'A electronic invoice has been generated');

View File

@ -2685,6 +2685,7 @@ INSERT INTO `util`.`notificationConfig`
INSERT INTO `util`.`notification` (`id`, `name`, `description`)
VALUES
(1, 'print-email', 'notification fixture one');
(2, 'invoice-electronic', 'A electronic invoice has been generated')
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
VALUES

View File

@ -254,8 +254,15 @@ class Controller extends Section {
if (client.hasElectronicInvoice) {
this.$http.post(`NotificationQueues`, {
notificationFk: 'invoiceElectronic',
notificationFk: 'invoice-electronic',
authorFk: client.id,
params: JSON.stringify(
{
'name': client.name,
'email': client.email,
'ticketId': this.id,
'url': window.location.href
})
}).then(a => {
this.vnApp.showSuccess(this.$t('Invoice sent'));
});

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html v-bind="$props">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title>{{ $t('subject') }}</title>
</head>
<body>
<h1>{{ $t('title') }} {{name}}</h1>
<p>{{ $t('clientMail') }} {{email}}</p>
<p>{{ $t('ticketId') }} <a :href='url'>{{ticketId}}</a>
</body>
</html>

View File

@ -0,0 +1,21 @@
module.exports = {
name: 'invoice-electronic',
props: {
name: {
type: [String],
required: true
},
email: {
type: [String],
required: true
},
ticketId: {
type: [Number],
required: true
},
url: {
type: [String],
required: true
}
},
};

View File

@ -0,0 +1,4 @@
subject: A electronic invoice has been created
title: A new electronic invoice has been created for the client
clientMail: The client's email is
ticketId: The invoice's ticket is

View File

@ -0,0 +1,4 @@
subject: Se ha creado una factura electrónica
title: Se ha creado una nueva factura electrónica para el cliente
clientMail: El correo del cliente es
ticketId: El ticket de la factura es