Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 3928-worker.time-control_sendMail
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
918ea3030d
|
@ -1,4 +1,4 @@
|
||||||
extends: [eslint:recommended, google, plugin:jasmine/recommended]
|
extends: [eslint:recommended, google, plugin:jasmine/recommended, 'prettier',]
|
||||||
parserOptions:
|
parserOptions:
|
||||||
ecmaVersion: 2018
|
ecmaVersion: 2018
|
||||||
sourceType: "module"
|
sourceType: "module"
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
module.exports = {
|
||||||
|
singleQuote: true,
|
||||||
|
printWidth: 120,
|
||||||
|
tabWidth: 4,
|
||||||
|
semi: true,
|
||||||
|
endOfLine: 'auto',
|
||||||
|
};
|
|
@ -2,7 +2,16 @@
|
||||||
{
|
{
|
||||||
// Carácter predeterminado de final de línea.
|
// Carácter predeterminado de final de línea.
|
||||||
"files.eol": "\n",
|
"files.eol": "\n",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.bracketPairColorization.enabled": true,
|
||||||
"source.fixAll.eslint": true
|
"editor.guides.bracketPairs": true,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
|
||||||
|
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
||||||
|
"eslint.validate": [
|
||||||
|
"javascript",
|
||||||
|
"json"
|
||||||
|
],
|
||||||
|
"[html]": {
|
||||||
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -47,20 +47,22 @@ module.exports = Self => {
|
||||||
for (let dms of dmsToDelete) {
|
for (let dms of dmsToDelete) {
|
||||||
const pathHash = DmsContainer.getHash(dms.id);
|
const pathHash = DmsContainer.getHash(dms.id);
|
||||||
const dmsContainer = await DmsContainer.container(pathHash);
|
const dmsContainer = await DmsContainer.container(pathHash);
|
||||||
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
|
|
||||||
try {
|
try {
|
||||||
|
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
|
||||||
await fs.unlink(dstFile);
|
await fs.unlink(dstFile);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
continue;
|
if (err.code != 'ENOENT')
|
||||||
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await dms.destroy(myOptions);
|
||||||
|
|
||||||
const dstFolder = path.join(dmsContainer.client.root, pathHash);
|
const dstFolder = path.join(dmsContainer.client.root, pathHash);
|
||||||
try {
|
try {
|
||||||
await fs.rmdir(dstFolder);
|
await fs.rmdir(dstFolder);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
await dms.destroy(myOptions);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,12 +47,8 @@ module.exports = class Docker {
|
||||||
if (ci) network = `--network="${networkName}"`;
|
if (ci) network = `--network="${networkName}"`;
|
||||||
|
|
||||||
log('Starting container...');
|
log('Starting container...');
|
||||||
const container = await this.execP(`
|
const container = await this.execP(
|
||||||
docker run \
|
`docker run ${network} --env RUN_CHOWN=${runChown} -d ${dockerArgs} salix-db`);
|
||||||
${network} \
|
|
||||||
--env RUN_CHOWN=${runChown} \
|
|
||||||
-d ${dockerArgs} salix-db
|
|
||||||
`);
|
|
||||||
this.id = container.stdout.trim();
|
this.id = container.stdout.trim();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -918,7 +918,7 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
|
||||||
(3, 'Perdida', 'LOST');
|
(3, 'Perdida', 'LOST');
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`, `hostFk`)
|
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `freightItemFk`, `created`, `itemFk`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1, 'pc1'),
|
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1, 'pc1'),
|
||||||
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1, NULL),
|
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1, NULL),
|
||||||
|
|
|
@ -27518,7 +27518,7 @@ CREATE TABLE `expedition` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`agencyModeFk` int(11) NOT NULL,
|
`agencyModeFk` int(11) NOT NULL,
|
||||||
`ticketFk` int(10) NOT NULL,
|
`ticketFk` int(10) NOT NULL,
|
||||||
`isBox` int(11) DEFAULT 1 COMMENT 'Este campo realmente en un campo itemFk, haciendo referencia al artículo que nos va a facturar el proveedor de transporte.\nSe debería llamar freightItemFk',
|
`freightItemFk` int(11) DEFAULT 1 COMMENT 'Este campo realmente en un campo itemFk, haciendo referencia al artículo que nos va a facturar el proveedor de transporte.\nSe debería llamar freightItemFk',
|
||||||
`created` timestamp NULL DEFAULT current_timestamp(),
|
`created` timestamp NULL DEFAULT current_timestamp(),
|
||||||
`isRefund__` bit(1) DEFAULT b'0' COMMENT 'Deprecado 01/06/2022',
|
`isRefund__` bit(1) DEFAULT b'0' COMMENT 'Deprecado 01/06/2022',
|
||||||
`isPickUp__` bit(1) DEFAULT b'0' COMMENT 'Deprecado 01/06/2022',
|
`isPickUp__` bit(1) DEFAULT b'0' COMMENT 'Deprecado 01/06/2022',
|
||||||
|
@ -27534,7 +27534,7 @@ CREATE TABLE `expedition` (
|
||||||
`hasNewRoute` bit(1) NOT NULL DEFAULT b'0',
|
`hasNewRoute` bit(1) NOT NULL DEFAULT b'0',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `index1` (`agencyModeFk`),
|
KEY `index1` (`agencyModeFk`),
|
||||||
KEY `index2` (`isBox`),
|
KEY `index2` (`freightItemFk`),
|
||||||
KEY `index3` (`created`),
|
KEY `index3` (`created`),
|
||||||
KEY `index4` (`ticketFk`),
|
KEY `index4` (`ticketFk`),
|
||||||
KEY `expedition_fk3_idx` (`packagingFk`),
|
KEY `expedition_fk3_idx` (`packagingFk`),
|
||||||
|
@ -27567,7 +27567,7 @@ BEGIN
|
||||||
|
|
||||||
DECLARE vShipFk INT;
|
DECLARE vShipFk INT;
|
||||||
|
|
||||||
IF NEW.isBox > 0 THEN
|
IF NEW.freightItemFk > 0 THEN
|
||||||
|
|
||||||
UPDATE ticket SET packages = nz(packages) + 1 WHERE id = NEW.ticketFk;
|
UPDATE ticket SET packages = nz(packages) + 1 WHERE id = NEW.ticketFk;
|
||||||
|
|
||||||
|
@ -27638,7 +27638,7 @@ DELIMITER ;;
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE ticket t
|
UPDATE ticket t
|
||||||
SET packages = (SELECT COUNT(counter)-1
|
SET packages = (SELECT COUNT(counter)-1
|
||||||
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.isBox)
|
FROM expedition e WHERE e.ticketFk = OLD.ticketFk and e.freightItemFk)
|
||||||
WHERE t.id = OLD.ticketFk;
|
WHERE t.id = OLD.ticketFk;
|
||||||
|
|
||||||
END */;;
|
END */;;
|
||||||
|
@ -36287,7 +36287,7 @@ CREATE TABLE `sorter` (
|
||||||
`created` datetime NOT NULL,
|
`created` datetime NOT NULL,
|
||||||
`routeFk` int(10) unsigned NOT NULL,
|
`routeFk` int(10) unsigned NOT NULL,
|
||||||
`ticketFk` int(10) NOT NULL,
|
`ticketFk` int(10) NOT NULL,
|
||||||
`isBox` int(11) DEFAULT 1,
|
`freightItemFk` int(11) DEFAULT 1,
|
||||||
`itemFk` int(11) DEFAULT NULL,
|
`itemFk` int(11) DEFAULT NULL,
|
||||||
`width` decimal(10,2) DEFAULT 0.00,
|
`width` decimal(10,2) DEFAULT 0.00,
|
||||||
`depth` decimal(10,2) DEFAULT 0.00,
|
`depth` decimal(10,2) DEFAULT 0.00,
|
||||||
|
@ -44956,7 +44956,7 @@ BEGIN
|
||||||
SELECT SUM((t.zonePrice - t.zoneBonus) * ebv.ratio) INTO deliveryPrice
|
SELECT SUM((t.zonePrice - t.zoneBonus) * ebv.ratio) INTO deliveryPrice
|
||||||
FROM vn.ticket t
|
FROM vn.ticket t
|
||||||
LEFT JOIN expedition e ON e.ticketFk = t.id
|
LEFT JOIN expedition e ON e.ticketFk = t.id
|
||||||
JOIN expeditionBoxVol ebv ON ebv.boxFk = e.isBox
|
JOIN expeditionBoxVol ebv ON ebv.boxFk = e.freightItemFk
|
||||||
WHERE t.id = vTicketFk;
|
WHERE t.id = vTicketFk;
|
||||||
|
|
||||||
END IF;
|
END IF;
|
||||||
|
@ -46492,7 +46492,7 @@ BEGIN
|
||||||
LEFT JOIN item i ON i.id = b.itemFk
|
LEFT JOIN item i ON i.id = b.itemFk
|
||||||
LEFT JOIN itemType it ON it.id = i.typeFk
|
LEFT JOIN itemType it ON it.id = i.typeFk
|
||||||
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
|
LEFT JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
LEFT JOIN packaging p ON p.id = b.packageFk AND NOT p.isBox
|
LEFT JOIN packaging p ON p.id = b.packageFk AND NOT p.freightItemFk
|
||||||
JOIN volumeConfig vc ON TRUE
|
JOIN volumeConfig vc ON TRUE
|
||||||
WHERE b.id = vSelf;
|
WHERE b.id = vSelf;
|
||||||
|
|
||||||
|
@ -53229,7 +53229,7 @@ BEGIN
|
||||||
INNER JOIN vn.ticketState ts ON ts.ticketFk = exp.ticketFk
|
INNER JOIN vn.ticketState ts ON ts.ticketFk = exp.ticketFk
|
||||||
LEFT JOIN vn.address a ON t.addressFk = a.id
|
LEFT JOIN vn.address a ON t.addressFk = a.id
|
||||||
LEFT JOIN vn.warehouse w ON t.warehouseFk = w.id
|
LEFT JOIN vn.warehouse w ON t.warehouseFk = w.id
|
||||||
WHERE t.routeFk = vRouteFk AND exp.isBox > 0;
|
WHERE t.routeFk = vRouteFk AND exp.freightItemFk > 0;
|
||||||
END ;;
|
END ;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
||||||
|
@ -53760,7 +53760,7 @@ BEGIN
|
||||||
GROUP BY sub.ticketFk
|
GROUP BY sub.ticketFk
|
||||||
) sub2 ON sub2.ticketFk = t.id
|
) sub2 ON sub2.ticketFk = t.id
|
||||||
LEFT JOIN expeditionStateType est ON est.id = e.stateTypeFk
|
LEFT JOIN expeditionStateType est ON est.id = e.stateTypeFk
|
||||||
WHERE t.routeFk = vRouteFk AND e.isBox <> FALSE
|
WHERE t.routeFk = vRouteFk AND e.freightItemFk <> FALSE
|
||||||
ORDER BY r.created, t.priority DESC;
|
ORDER BY r.created, t.priority DESC;
|
||||||
END ;;
|
END ;;
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
ng-transclude="prepend"
|
ng-transclude="prepend"
|
||||||
class="prepend">
|
class="prepend">
|
||||||
</div>
|
</div>
|
||||||
<div class="infix">
|
<div class="infix" >
|
||||||
<div class="fix prefix"></div>
|
<div class="fix prefix"></div>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<section
|
<section
|
||||||
|
@ -13,8 +13,7 @@
|
||||||
</section>
|
</section>
|
||||||
<input
|
<input
|
||||||
type="file"
|
type="file"
|
||||||
accept="{{$ctrl.accept}}"
|
accept="{{$ctrl.accept}}">
|
||||||
style="display: none;">
|
|
||||||
</input>
|
</input>
|
||||||
</div>
|
</div>
|
||||||
<div class="fix suffix"></div>
|
<div class="fix suffix"></div>
|
||||||
|
|
|
@ -4,4 +4,13 @@
|
||||||
.value {
|
.value {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
.control {
|
||||||
|
& > input[type=file] {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
& > section {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -242,5 +242,6 @@
|
||||||
"You don't have grant privilege": "No tienes privilegios para dar privilegios",
|
"You don't have grant privilege": "No tienes privilegios para dar privilegios",
|
||||||
"You don't own the role and you can't assign it to another user": "No eres el propietario del rol y no puedes asignarlo a otro usuario",
|
"You don't own the role and you can't assign it to another user": "No eres el propietario del rol y no puedes asignarlo a otro usuario",
|
||||||
"Already has this status": "Ya tiene este estado",
|
"Already has this status": "Ya tiene este estado",
|
||||||
"There aren't records for this week": "No existen registros para esta semana"
|
"There aren't records for this week": "No existen registros para esta semana",
|
||||||
|
"Empty data source": "Origen de datos vacio"
|
||||||
}
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
const {Email} = require('vn-print');
|
||||||
|
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('balanceCompensationEmail', {
|
||||||
|
description: 'Sends the debit balances compensation email with an attached PDF',
|
||||||
|
accessType: 'WRITE',
|
||||||
|
accepts: [
|
||||||
|
{
|
||||||
|
arg: 'id',
|
||||||
|
type: 'Number',
|
||||||
|
required: true,
|
||||||
|
description: 'The receipt id',
|
||||||
|
http: { source: 'path' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
returns: {
|
||||||
|
type: ['object'],
|
||||||
|
root: true
|
||||||
|
},
|
||||||
|
http: {
|
||||||
|
path: '/:id/balance-compensation-email',
|
||||||
|
verb: 'POST'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.balanceCompensationEmail = async (ctx, id) => {
|
||||||
|
|
||||||
|
const models = Self.app.models;
|
||||||
|
const receipt = await models.Receipt.findById(id, {fields: ['clientFk']});
|
||||||
|
const client = await models.Client.findById(receipt.clientFk, {fields:['email']});
|
||||||
|
|
||||||
|
const email = new Email('balance-compensation', {
|
||||||
|
lang: ctx.req.getLocale(),
|
||||||
|
recipient: client.email+',administracion@verdnatura.es',
|
||||||
|
id
|
||||||
|
});
|
||||||
|
|
||||||
|
return email.send();
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,50 @@
|
||||||
|
const { Report } = require('vn-print');
|
||||||
|
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('balanceCompensationPdf', {
|
||||||
|
description: 'Returns the the debit balances compensation pdf',
|
||||||
|
accessType: 'READ',
|
||||||
|
accepts: [
|
||||||
|
{
|
||||||
|
arg: 'id',
|
||||||
|
type: 'number',
|
||||||
|
required: true,
|
||||||
|
description: 'The receipt id',
|
||||||
|
http: { source: 'path' }
|
||||||
|
}
|
||||||
|
],
|
||||||
|
returns: [
|
||||||
|
{
|
||||||
|
arg: 'body',
|
||||||
|
type: 'file',
|
||||||
|
root: true
|
||||||
|
}, {
|
||||||
|
arg: 'Content-Type',
|
||||||
|
type: 'String',
|
||||||
|
http: {target: 'header'}
|
||||||
|
}, {
|
||||||
|
arg: 'Content-Disposition',
|
||||||
|
type: 'String',
|
||||||
|
http: {target: 'header'}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
http: {
|
||||||
|
path: '/:id/balance-compensation-pdf',
|
||||||
|
verb: 'GET'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.balanceCompensationPdf = async(ctx, id) => {
|
||||||
|
const args = Object.assign({}, ctx.args);
|
||||||
|
const params = {lang: ctx.req.getLocale()};
|
||||||
|
|
||||||
|
delete args.ctx;
|
||||||
|
for (const param in args)
|
||||||
|
params[param] = args[param];
|
||||||
|
|
||||||
|
const report = new Report('balance-compensation', params);
|
||||||
|
const stream = await report.toPdfStream();
|
||||||
|
|
||||||
|
return [stream, 'application/pdf', `filename="doc-${id}.pdf"`];
|
||||||
|
};
|
||||||
|
};
|
|
@ -2,6 +2,8 @@ const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
module.exports = function(Self) {
|
module.exports = function(Self) {
|
||||||
require('../methods/receipt/filter')(Self);
|
require('../methods/receipt/filter')(Self);
|
||||||
|
require('../methods/receipt/balanceCompensationEmail')(Self);
|
||||||
|
require('../methods/receipt/balanceCompensationPdf')(Self);
|
||||||
require('../methods/receipt/receiptPdf')(Self);
|
require('../methods/receipt/receiptPdf')(Self);
|
||||||
|
|
||||||
Self.validateBinded('amountPaid', isNotZero, {
|
Self.validateBinded('amountPaid', isNotZero, {
|
||||||
|
|
|
@ -121,6 +121,19 @@
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
</a>
|
</a>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
|
<vn-td center shrink ng-if="!balance.isInvoice">
|
||||||
|
<vn-icon-button
|
||||||
|
vn-dialog="send_compensation"
|
||||||
|
icon="outgoing_mail"
|
||||||
|
title="{{'Send compensation' | translate}}">
|
||||||
|
</vn-icon-button>
|
||||||
|
</vn-td>
|
||||||
|
<vn-confirm
|
||||||
|
vn-id="send_compensation"
|
||||||
|
on-accept="$ctrl.sendEmail(balance)"
|
||||||
|
question="Notify compensation"
|
||||||
|
message="Send compensation">
|
||||||
|
</vn-confirm>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-tbody>
|
</vn-tbody>
|
||||||
</vn-table>
|
</vn-table>
|
||||||
|
|
|
@ -2,8 +2,9 @@ import ngModule from '../../module';
|
||||||
import Section from 'salix/components/section';
|
import Section from 'salix/components/section';
|
||||||
|
|
||||||
class Controller extends Section {
|
class Controller extends Section {
|
||||||
constructor($element, $) {
|
constructor($element, $, vnEmail) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
|
this.vnEmail = vnEmail;
|
||||||
this.filter = {
|
this.filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'company',
|
relation: 'company',
|
||||||
|
@ -90,9 +91,13 @@ class Controller extends Section {
|
||||||
this.$http.patch(endpoint, params)
|
this.$http.patch(endpoint, params)
|
||||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendEmail(balance) {
|
||||||
|
return this.vnEmail.send(`Receipts/${balance.id}/balance-compensation-email`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$element', '$scope'];
|
Controller.$inject = ['$element', '$scope', 'vnEmail'];
|
||||||
|
|
||||||
ngModule.vnComponent('vnClientBalanceIndex', {
|
ngModule.vnComponent('vnClientBalanceIndex', {
|
||||||
template: require('./index.html'),
|
template: require('./index.html'),
|
||||||
|
|
|
@ -8,4 +8,6 @@ Havings: Haber
|
||||||
Balance: Balance
|
Balance: Balance
|
||||||
Total by company: Total por empresa
|
Total by company: Total por empresa
|
||||||
Download PDF: Descargar PDF
|
Download PDF: Descargar PDF
|
||||||
|
Send compensation: Enviar compensación
|
||||||
BILL: N/FRA {{ref}}
|
BILL: N/FRA {{ref}}
|
||||||
|
Notify compensation: ¿Desea informar de la compensación al cliente por correo?
|
|
@ -91,7 +91,7 @@
|
||||||
url="Packagings"
|
url="Packagings"
|
||||||
show-field="id"
|
show-field="id"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
where="{isBox: true}"
|
where="{freightItemFk: true}"
|
||||||
ng-model="buy.packageFk"
|
ng-model="buy.packageFk"
|
||||||
on-change="$ctrl.saveBuy(buy)">
|
on-change="$ctrl.saveBuy(buy)">
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = Self => {
|
||||||
`SELECT
|
`SELECT
|
||||||
e.id,
|
e.id,
|
||||||
e.ticketFk,
|
e.ticketFk,
|
||||||
e.isBox,
|
e.freightItemFk,
|
||||||
e.workerFk,
|
e.workerFk,
|
||||||
i1.name packageItemName,
|
i1.name packageItemName,
|
||||||
e.counter,
|
e.counter,
|
||||||
|
@ -51,7 +51,7 @@ module.exports = Self => {
|
||||||
FROM vn.expedition e
|
FROM vn.expedition e
|
||||||
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
|
||||||
LEFT JOIN vn.item i2 ON i2.id = e.itemFk
|
LEFT JOIN vn.item i2 ON i2.id = e.itemFk
|
||||||
INNER JOIN vn.item i1 ON i1.id = e.isBox
|
INNER JOIN vn.item i1 ON i1.id = e.freightItemFk
|
||||||
LEFT JOIN vn.packaging p ON p.id = e.packagingFk
|
LEFT JOIN vn.packaging p ON p.id = e.packagingFk
|
||||||
LEFT JOIN vn.item i3 ON i3.id = p.itemFk
|
LEFT JOIN vn.item i3 ON i3.id = p.itemFk
|
||||||
LEFT JOIN account.user u ON u.id = e.workerFk
|
LEFT JOIN account.user u ON u.id = e.workerFk
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
const {Report} = require('vn-print');
|
||||||
|
|
||||||
|
module.exports = Self => {
|
||||||
|
Self.remoteMethodCtx('collectionLabel', {
|
||||||
|
description: 'Returns the collection label',
|
||||||
|
accessType: 'READ',
|
||||||
|
accepts: [
|
||||||
|
{
|
||||||
|
arg: 'id',
|
||||||
|
type: 'number',
|
||||||
|
required: true,
|
||||||
|
description: 'The ticket id',
|
||||||
|
http: {source: 'path'}
|
||||||
|
},
|
||||||
|
],
|
||||||
|
returns: [
|
||||||
|
{
|
||||||
|
arg: 'body',
|
||||||
|
type: 'file',
|
||||||
|
root: true
|
||||||
|
}, {
|
||||||
|
arg: 'Content-Type',
|
||||||
|
type: 'String',
|
||||||
|
http: {target: 'header'}
|
||||||
|
}, {
|
||||||
|
arg: 'Content-Disposition',
|
||||||
|
type: 'String',
|
||||||
|
http: {target: 'header'}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
http: {
|
||||||
|
path: '/:id/collection-label',
|
||||||
|
verb: 'GET'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
Self.collectionLabel = async(ctx, id) => {
|
||||||
|
const args = Object.assign({}, ctx.args);
|
||||||
|
const params = {lang: ctx.req.getLocale()};
|
||||||
|
|
||||||
|
delete args.ctx;
|
||||||
|
for (const param in args)
|
||||||
|
params[param] = args[param];
|
||||||
|
|
||||||
|
const report = new Report('collection-label', params);
|
||||||
|
const stream = await report.toPdfStream();
|
||||||
|
|
||||||
|
return [stream, 'application/pdf', `filename="doc-${id}.pdf"`];
|
||||||
|
};
|
||||||
|
};
|
|
@ -16,7 +16,7 @@
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"isBox": {
|
"freightItemFk": {
|
||||||
"type": "number"
|
"type": "number"
|
||||||
},
|
},
|
||||||
"created": {
|
"created": {
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
"freightItem": {
|
"freightItem": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "Item",
|
"model": "Item",
|
||||||
"foreignKey": "isBox"
|
"foreignKey": "freightItemFk"
|
||||||
},
|
},
|
||||||
"packaging": {
|
"packaging": {
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
|
|
|
@ -33,4 +33,5 @@ module.exports = function(Self) {
|
||||||
require('../methods/ticket/closeByTicket')(Self);
|
require('../methods/ticket/closeByTicket')(Self);
|
||||||
require('../methods/ticket/closeByAgency')(Self);
|
require('../methods/ticket/closeByAgency')(Self);
|
||||||
require('../methods/ticket/closeByRoute')(Self);
|
require('../methods/ticket/closeByRoute')(Self);
|
||||||
|
require('../methods/ticket/collectionLabel')(Self);
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -63,7 +63,9 @@
|
||||||
"del": "^2.2.2",
|
"del": "^2.2.2",
|
||||||
"eslint": "^7.11.0",
|
"eslint": "^7.11.0",
|
||||||
"eslint-config-google": "^0.11.0",
|
"eslint-config-google": "^0.11.0",
|
||||||
|
"eslint-config-prettier": "^8.5.0",
|
||||||
"eslint-plugin-jasmine": "^2.10.1",
|
"eslint-plugin-jasmine": "^2.10.1",
|
||||||
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"fancy-log": "^1.3.2",
|
"fancy-log": "^1.3.2",
|
||||||
"file-loader": "^1.1.11",
|
"file-loader": "^1.1.11",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
|
@ -92,6 +94,7 @@
|
||||||
"node-sass": "^4.14.1",
|
"node-sass": "^4.14.1",
|
||||||
"nodemon": "^2.0.16",
|
"nodemon": "^2.0.16",
|
||||||
"plugin-error": "^1.0.1",
|
"plugin-error": "^1.0.1",
|
||||||
|
"prettier": "^2.7.1",
|
||||||
"raw-loader": "^1.0.0",
|
"raw-loader": "^1.0.0",
|
||||||
"regenerator-runtime": "^0.13.7",
|
"regenerator-runtime": "^0.13.7",
|
||||||
"sass-loader": "^7.3.1",
|
"sass-loader": "^7.3.1",
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/spacing.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`,
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/email.css`])
|
||||||
|
.mergeStyles();
|
|
@ -0,0 +1,39 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html v-bind:lang="$i18n.locale">
|
||||||
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width" />
|
||||||
|
<meta name="format-detection" content="telephone=no" />
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<table class="grid">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block empty"></div>
|
||||||
|
</div>
|
||||||
|
<slot name="header">
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block">
|
||||||
|
<email-header v-bind="$props"></email-header>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
<slot></slot>
|
||||||
|
<slot name="footer">
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block">
|
||||||
|
<email-footer v-bind="$props"></email-footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</slot>
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block empty"></div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
const Component = require(`vn-print/core/component`);
|
||||||
|
const emailHeader = new Component('email-header');
|
||||||
|
const emailFooter = new Component('email-footer');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
components: {
|
||||||
|
'email-header': emailHeader.build(),
|
||||||
|
'email-footer': emailFooter.build()
|
||||||
|
},
|
||||||
|
name: 'email-body',
|
||||||
|
};
|
|
@ -1,7 +1,7 @@
|
||||||
<header>
|
<header>
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<a href="https://www.verdnatura.es" target="_blank">
|
<a href="https://www.verdnatura.es" target="_blank">
|
||||||
<img v-bind:src="getEmailSrc('logo-black.png')" alt="VerdNatura"/>
|
<img v-bind:src="getEmailSrc('logo-black.png')" alt="VerdNatura" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="topbar"></div>
|
<div class="topbar"></div>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/report.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`])
|
||||||
|
.mergeStyles();
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html v-bind:lang="$i18n.locale">
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<table class="grid">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<slot name="header">
|
||||||
|
<report-header v-bind="$props"></report-header>
|
||||||
|
</slot>
|
||||||
|
<slot></slot>
|
||||||
|
<slot name="footer">
|
||||||
|
<report-footer id="pageFooter" v-bind="$props"></report-footer>
|
||||||
|
</slot>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
const Component = require(`vn-print/core/component`);
|
||||||
|
const reportHeader = new Component('report-header');
|
||||||
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'report-body',
|
||||||
|
components: {
|
||||||
|
'report-header': reportHeader.build(),
|
||||||
|
'report-footer': reportFooter.build()
|
||||||
|
},
|
||||||
|
};
|
|
@ -32,7 +32,7 @@ class Email extends Component {
|
||||||
const rendered = await this.render();
|
const rendered = await this.render();
|
||||||
const attachments = [];
|
const attachments = [];
|
||||||
const getAttachments = async(componentPath, files) => {
|
const getAttachments = async(componentPath, files) => {
|
||||||
for (file of files) {
|
for (const file of files) {
|
||||||
const fileCopy = Object.assign({}, file);
|
const fileCopy = Object.assign({}, file);
|
||||||
const fileName = fileCopy.filename;
|
const fileName = fileCopy.filename;
|
||||||
|
|
||||||
|
@ -54,14 +54,21 @@ class Email extends Component {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
async function getSubcomponentAttachments(instance) {
|
||||||
if (instance.components) {
|
if (instance.components) {
|
||||||
const components = instance.components;
|
const components = instance.components;
|
||||||
for (let componentName in components) {
|
for (let componentName in components) {
|
||||||
const component = components[componentName];
|
const component = components[componentName];
|
||||||
const componentPath = `./components/${componentName}`;
|
const componentPath = `./components/${componentName}`;
|
||||||
await getAttachments(componentPath, component.attachments);
|
await getAttachments(componentPath, component.attachments);
|
||||||
|
|
||||||
|
if (component.components)
|
||||||
|
await getSubcomponentAttachments(component)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await getSubcomponentAttachments(instance)
|
||||||
|
|
||||||
if (this.attachments)
|
if (this.attachments)
|
||||||
await getAttachments(this.path, this.attachments);
|
await getAttachments(this.path, this.attachments);
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/spacing.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`,
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/email.css`])
|
||||||
|
.mergeStyles();
|
|
@ -0,0 +1,6 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"filename": "balance-compensation.pdf",
|
||||||
|
"component": "balance-compensation"
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,17 @@
|
||||||
|
<email-body v-bind="$props">
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block vn-pa-ml">
|
||||||
|
<p>{{$t('description.instructions')}} {{client.name}}</p>
|
||||||
|
<p>{{$t('description.attached')}}</p>
|
||||||
|
<p>{{$t('description.response')}}</p>
|
||||||
|
<p>{{$t('description.regards')}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="grid-row" v-if="isPreview">
|
||||||
|
<div class="grid-block vn-pa-ml">
|
||||||
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
|
</attachment>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</email-body>
|
|
@ -0,0 +1,36 @@
|
||||||
|
const Component = require(`vn-print/core/component`);
|
||||||
|
const emailBody = new Component('email-body');
|
||||||
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'balance-compensation',
|
||||||
|
async serverPrefetch() {
|
||||||
|
this.client = await this.fetchClient(this.id);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchClient(id) {
|
||||||
|
return this.findOneFromDef('client', [id]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'email-body': emailBody.build(),
|
||||||
|
'attachment': attachment.build()
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
filename: 'balance-compensation.pdf',
|
||||||
|
type: 'pdf',
|
||||||
|
path: `Receipts/${this.id}/balance-compensation-pdf`
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,6 @@
|
||||||
|
subject: Compensación VerdNatura SL
|
||||||
|
description:
|
||||||
|
instructions: Buenos días,
|
||||||
|
attached: Adjuntamos escrito para su confirmación
|
||||||
|
response: Rogamos su respuesta a la mayor brevedad
|
||||||
|
regards: Un saludo
|
|
@ -0,0 +1,5 @@
|
||||||
|
SELECT
|
||||||
|
c.name
|
||||||
|
FROM client c
|
||||||
|
JOIN receipt r ON r.clientFk = c.id
|
||||||
|
WHERE r.id = ?;
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -28,7 +6,6 @@
|
||||||
<p v-html="$t('description', [dated])"></p>
|
<p v-html="$t('description', [dated])"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<table class="column-oriented">
|
<table class="column-oriented">
|
||||||
|
@ -57,20 +34,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</email-body>
|
||||||
<!-- Footer block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'buyer-week-waste',
|
name: 'buyer-week-waste',
|
||||||
|
@ -23,8 +22,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build()
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {}
|
props: {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -28,19 +6,4 @@
|
||||||
<p v-html="$t('description', [minDate, maxDate])"></p>
|
<p v-html="$t('description', [minDate, maxDate])"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'campaign-metrics',
|
name: 'campaign-metrics',
|
||||||
|
@ -16,8 +15,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title', [id]) }}</h1>
|
<h1>{{ $t('title', [id]) }}</h1>
|
||||||
|
@ -29,19 +7,4 @@
|
||||||
<p>{{ $t('description.conclusion') }}</p>
|
<p>{{ $t('description.conclusion') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +1,10 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'claim-pickup-order',
|
name: 'claim-pickup-order',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
this.ticket = await this.fetchTicket(this.id);
|
this.ticket = await this.fetchTicket(this.id);
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"filename": "client-debt-statement.pdf",
|
||||||
|
"component": "client-debt-statement"
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,55 +1,15 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
<p>{{$t('description.instructions')}}</p>
|
<p>{{$t('description.instructions')}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Preview block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,13 +1,11 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'client-debt-statement',
|
name: 'client-debt-statement',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -69,24 +47,10 @@
|
||||||
</section>
|
</section>
|
||||||
<section v-if="client.salesPersonEmail">
|
<section v-if="client.salesPersonEmail">
|
||||||
{{$t('salesPersonEmail')}}:
|
{{$t('salesPersonEmail')}}:
|
||||||
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
|
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`"
|
||||||
|
target="_blank">{{client.salesPersonEmail}}</strong>
|
||||||
</section>
|
</section>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'client-welcome',
|
name: 'client-welcome',
|
||||||
|
@ -13,8 +12,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,55 +1,15 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
<p>{{$t('description.instructions')}}</p>
|
<p>{{$t('description.instructions')}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Preview block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,13 +1,11 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'credit-request',
|
name: 'credit-request',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|
|
@ -3,3 +3,7 @@
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-align: center
|
text-align: center
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #8dba25
|
||||||
|
}
|
|
@ -1,31 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
<style type="text/css">
|
|
||||||
a {
|
|
||||||
color: #8dba25
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -33,7 +6,6 @@
|
||||||
<p v-html="$t('description', [id])"></p>
|
<p v-html="$t('description', [id])"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-px-ml">
|
<div class="grid-block vn-px-ml">
|
||||||
<p>{{$t('copyLink')}}</p>
|
<p>{{$t('copyLink')}}</p>
|
||||||
|
@ -42,7 +14,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<p v-html="$t('poll')"></p>
|
<p v-html="$t('poll')"></p>
|
||||||
|
@ -50,20 +21,4 @@
|
||||||
<p v-html="$t('conclusion')"></p>
|
<p v-html="$t('conclusion')"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</email-body>
|
||||||
<!-- Footer block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +1,10 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'delivery-note-link',
|
name: 'delivery-note-link',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -31,19 +9,4 @@
|
||||||
<p v-html="$t('conclusion')"></p>
|
<p v-html="$t('conclusion')"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +1,10 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'delivery-note',
|
name: 'delivery-note',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,45 +1,8 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
<p>{{$t('description.instructions')}}</p>
|
<p>{{$t('description.instructions')}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,12 +1,10 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'driver-route',
|
name: 'driver-route',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -29,29 +7,11 @@
|
||||||
<p>{{$t('description.conclusion')}}</p>
|
<p>{{$t('description.conclusion')}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Attachments block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -17,8 +16,7 @@ module.exports = {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -31,19 +9,4 @@
|
||||||
<p v-html="$t('conclusion')"></p>
|
<p v-html="$t('conclusion')"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,7 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'invoice',
|
name: 'invoice',
|
||||||
async serverPrefetch() {
|
async serverPrefetch() {
|
||||||
|
@ -13,8 +11,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
reference: {
|
reference: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -29,19 +7,4 @@
|
||||||
<p v-html="$t('conclusion')"></p>
|
<p v-html="$t('conclusion')"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,11 +1,8 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'invoiceIn',
|
name: 'invoiceIn',
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -60,29 +38,11 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -28,8 +27,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -43,29 +21,11 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -28,8 +27,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -29,7 +7,10 @@
|
||||||
<p v-html="$t('totalResolved', [resolvedTickets])"></p>
|
<p v-html="$t('totalResolved', [resolvedTickets])"></p>
|
||||||
<p v-html="$t('grafanaLink')"></p>
|
<p v-html="$t('grafanaLink')"></p>
|
||||||
<div class="external-link vn-pa-sm vn-m-md">
|
<div class="external-link vn-pa-sm vn-m-md">
|
||||||
<a v-bind:href="'https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from=' + startedTime + '&to=' + endedTime" target="_blank">
|
<a
|
||||||
|
v-bind:href="'https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from=' + startedTime + '&to=' + endedTime"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}}
|
https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,7 +22,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml" v-for="technician in technicians">
|
<div class="grid-block vn-pa-ml" v-for="technician in technicians">
|
||||||
<div class="table-title clearfix">
|
<div class="table-title clearfix">
|
||||||
|
@ -61,12 +41,8 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ticket.author}}</td>
|
<td>{{ticket.author}}</td>
|
||||||
<td class="font light-gray">
|
<td class="font light-gray">
|
||||||
<div v-bind:title="$t('opened')">
|
<div v-bind:title="$t('opened')">🔓 {{ticket.created | date('%d-%m-%Y %H:%M')}}</div>
|
||||||
🔓 {{ticket.created | date('%d-%m-%Y %H:%M')}}
|
<div v-bind:title="$t('closed')">🔒 {{ticket.closed | date('%d-%m-%Y %H:%M')}}</div>
|
||||||
</div>
|
|
||||||
<div v-bind:title="$t('closed')">
|
|
||||||
🔒 {{ticket.closed | date('%d-%m-%Y %H:%M')}}
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a v-bind:href="'https://cau.verdnatura.es/scp/tickets.php?id=' + ticket.ticket_id">
|
<a v-bind:href="'https://cau.verdnatura.es/scp/tickets.php?id=' + ticket.ticket_id">
|
||||||
|
@ -80,20 +56,4 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</email-body>
|
||||||
<!-- Footer block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'osticket-report',
|
name: 'osticket-report',
|
||||||
|
@ -61,8 +60,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {}
|
props: {}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -38,8 +16,7 @@
|
||||||
</section>
|
</section>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p v-if="payMethod.code == 'bankDraft'"
|
<p v-if="payMethod.code == 'bankDraft'" v-html="$t('sections.pay.accountImplicates', [accountAddress])">
|
||||||
v-html="$t('sections.pay.accountImplicates', [accountAddress])">
|
|
||||||
</p>
|
</p>
|
||||||
<p v-else-if="payMethod.code == 'card'">
|
<p v-else-if="payMethod.code == 'card'">
|
||||||
{{ $t('sections.pay.cardImplicates') }}
|
{{ $t('sections.pay.cardImplicates') }}
|
||||||
|
@ -48,19 +25,4 @@
|
||||||
<p>{{ $t('notifyAnError') }}</p>
|
<p>{{ $t('notifyAnError') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'payment-update',
|
name: 'payment-update',
|
||||||
|
@ -21,8 +20,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -39,7 +17,6 @@
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{$t('sections.help.title')}}</h1>
|
<h1>{{$t('sections.help.title')}}</h1>
|
||||||
|
@ -47,7 +24,6 @@
|
||||||
<p v-html="$t('sections.help.remoteSupport')"></p>
|
<p v-html="$t('sections.help.remoteSupport')"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<div v-if="client.salesPersonName">
|
<div v-if="client.salesPersonName">
|
||||||
|
@ -58,33 +34,16 @@
|
||||||
</div>
|
</div>
|
||||||
<div v-if="client.salesPersonEmail">
|
<div v-if="client.salesPersonEmail">
|
||||||
{{$t('salesPersonEmail')}}:
|
{{$t('salesPersonEmail')}}:
|
||||||
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
|
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`"
|
||||||
|
target="_blank">{{client.salesPersonEmail}}</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment v-for="attachment in attachments" v-bind:key="attachment.filename"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:attachment="attachment" v-bind:args="$props">
|
||||||
v-bind:attachment="attachment"
|
|
||||||
v-bind:args="$props">
|
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
const attachment = new Component('attachment');
|
||||||
const attachments = require('./attachments.json');
|
const attachments = require('./attachments.json');
|
||||||
|
|
||||||
|
@ -18,8 +17,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build(),
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
'attachment': attachment.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -29,29 +7,15 @@
|
||||||
<p>{{$t('description.conclusion')}}</p>
|
<p>{{$t('description.conclusion')}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Attachments block -->
|
|
||||||
<div class="grid-row" v-if="isPreview">
|
<div class="grid-row" v-if="isPreview">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<attachment v-for="attachment in attachments"
|
<attachment
|
||||||
|
v-for="attachment in attachments"
|
||||||
v-bind:key="attachment.filename"
|
v-bind:key="attachment.filename"
|
||||||
v-bind:attachment="attachment"
|
v-bind:attachment="attachment"
|
||||||
v-bind:args="$props">
|
v-bind:args="$props"
|
||||||
|
>
|
||||||
</attachment>
|
</attachment>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
const attachment = new Component('attachment');
|
|
||||||
const attachments = require('./attachments.json');
|
const attachments = require('./attachments.json');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -10,9 +8,7 @@ module.exports = {
|
||||||
return {attachments};
|
return {attachments};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build()
|
||||||
'email-footer': emailFooter.build(),
|
|
||||||
'attachment': attachment.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -1,26 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<email-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta name="format-detection" content="telephone=no">
|
|
||||||
<title>{{ $t('subject') }}</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
<!-- Header block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-header v-bind="$props"></email-header>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block vn-pa-ml">
|
<div class="grid-block vn-pa-ml">
|
||||||
<h1>{{ $t('title') }}</h1>
|
<h1>{{ $t('title') }}</h1>
|
||||||
|
@ -28,19 +6,4 @@
|
||||||
<p v-html="$t('description', [minDate, maxDate])"></p>
|
<p v-html="$t('description', [minDate, maxDate])"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
</email-body>
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block">
|
|
||||||
<email-footer v-bind="$props"></email-footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- Empty block -->
|
|
||||||
<div class="grid-row">
|
|
||||||
<div class="grid-block empty"></div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const emailHeader = new Component('email-header');
|
const emailBody = new Component('email-body');
|
||||||
const emailFooter = new Component('email-footer');
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'supplier-campaign-metrics',
|
name: 'supplier-campaign-metrics',
|
||||||
|
@ -16,8 +15,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'email-header': emailHeader.build(),
|
'email-body': emailBody.build()
|
||||||
'email-footer': emailFooter.build()
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {
|
id: {
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<report-body v-bind="$props">
|
||||||
|
<div class="grid-row">
|
||||||
|
<div class="grid-block">
|
||||||
|
<div class="columns">
|
||||||
|
<div class="size50">
|
||||||
|
<p style="text-align: right">{{$t('Place')}} {{currentDate()}}</p>
|
||||||
|
<h3 style="text-align: center; margin-top: 8%">{{$t('Compensation') | uppercase}}</h3>
|
||||||
|
<p style="margin-top: 8%">{{$t('In one hand')}}:</p>
|
||||||
|
<p style="text-align: justify">
|
||||||
|
{{company.name}} {{$t('CIF')}} {{company.nif}} {{$t('Home')}} {{company.street}},
|
||||||
|
{{company.city}}.
|
||||||
|
</p>
|
||||||
|
<p style="margin-top: 5%">{{$t('In other hand')}}:</p>
|
||||||
|
<p style="text-align: justify">
|
||||||
|
{{$t('Sr')}} {{client.name}} {{$t('NIF')}} {{client.fi}} {{$t('Home')}} {{client.street}},
|
||||||
|
{{client.city}}.
|
||||||
|
</p>
|
||||||
|
<h4 style="text-align: center; margin-top: 10%">{{$t('Agree') | uppercase}}</h4>
|
||||||
|
<p style="margin-top: 8%; text-align: justify">
|
||||||
|
{{$t('Date')}} {{client.payed | date('%d-%m-%Y')}} {{$t('Compensate')}} {{client.amountPaid}} €
|
||||||
|
{{$t('From client')}} {{client.name}} {{$t('Toclient')}} {{company.name}}.
|
||||||
|
</p>
|
||||||
|
<p style="margin-top: 8%">
|
||||||
|
{{$t('Reception')}} <span style="color: blue">administracion@verdnatura.es</span>
|
||||||
|
</p>
|
||||||
|
<div style="margin-top: 8%"><small>{{$t('Greetings')}}</small></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</report-body>
|
|
@ -0,0 +1,34 @@
|
||||||
|
const Component = require(`vn-print/core/component`);
|
||||||
|
const reportBody = new Component('report-body');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'balance-compensation',
|
||||||
|
async serverPrefetch() {
|
||||||
|
this.client = await this.fetchClient(this.id);
|
||||||
|
this.company = await this.fetchCompany(this.id);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchClient(id) {
|
||||||
|
return this.findOneFromDef('client', [id]);
|
||||||
|
},
|
||||||
|
fetchCompany(id) {
|
||||||
|
return this.findOneFromDef('company', [id]);
|
||||||
|
},
|
||||||
|
|
||||||
|
currentDate() {
|
||||||
|
const current = new Date();
|
||||||
|
const date = `${current.getDate()}/${current.getMonth() + 1}/${current.getFullYear()}`;
|
||||||
|
return date;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'report-body': reportBody.build()
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
description: 'The receipt id'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,12 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/spacing.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`,
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/report.css`,
|
||||||
|
`${__dirname}/style.css`])
|
||||||
|
.mergeStyles();
|
|
@ -0,0 +1,16 @@
|
||||||
|
reportName: compensacion-saldo
|
||||||
|
Place: Algemesí, a
|
||||||
|
Compensation: Compensación de saldos deudores y acreedores
|
||||||
|
In one hand: De una parte
|
||||||
|
CIF: con CIF
|
||||||
|
NIF: con NIF
|
||||||
|
Home: y domicilio sito en
|
||||||
|
In other hand: De la otra
|
||||||
|
Sr: Don/Doña
|
||||||
|
Agree: Acuerdan
|
||||||
|
Date: En fecha de
|
||||||
|
Compensate: se ha compensado el saldo de
|
||||||
|
From client: del cliente/proveedor
|
||||||
|
To client: con el cliente/proveedor
|
||||||
|
Reception: Por favor, rogamos confirmen la recepción de esta compensación al email
|
||||||
|
Greetings: Saludos cordiales,
|
|
@ -0,0 +1,12 @@
|
||||||
|
SELECT
|
||||||
|
c.name,
|
||||||
|
c.socialName,
|
||||||
|
c.street,
|
||||||
|
c.fi,
|
||||||
|
c.city,
|
||||||
|
r.amountPaid,
|
||||||
|
r.payed
|
||||||
|
FROM client c
|
||||||
|
JOIN receipt r ON r.clientFk = c.id
|
||||||
|
JOIN supplier s ON c.fi = s.nif
|
||||||
|
WHERE r.id = ?
|
|
@ -0,0 +1,8 @@
|
||||||
|
SELECT
|
||||||
|
s.name,
|
||||||
|
s.nif,
|
||||||
|
s.street,
|
||||||
|
s.city
|
||||||
|
FROM supplier s
|
||||||
|
JOIN receipt r ON r.companyFk = s.id
|
||||||
|
WHERE r.id = ?;
|
|
@ -1,13 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<report-body v-bind="$props">
|
||||||
<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-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -37,15 +28,9 @@
|
||||||
<div class="header">{{$t('clientData')}}</div>
|
<div class="header">{{$t('clientData')}}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<h3 class="uppercase">{{client.socialName}}</h3>
|
<h3 class="uppercase">{{client.socialName}}</h3>
|
||||||
<div>
|
<div>{{client.street}}</div>
|
||||||
{{client.street}}
|
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
|
||||||
</div>
|
<div>{{client.country}}</div>
|
||||||
<div>
|
|
||||||
{{client.postcode}}, {{client.city}} ({{client.province}})
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{client.country}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,30 +51,22 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="description font light-gray">
|
<tr class="description font light-gray">
|
||||||
<td colspan="7">
|
<td colspan="7">
|
||||||
<span v-if="sale.value5">
|
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
|
||||||
<strong>{{sale.tag5}}</strong> {{sale.value5}}
|
<span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
|
||||||
</span>
|
<span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<template v-slot:footer>
|
||||||
<report-footer id="pageFooter"
|
<report-footer
|
||||||
|
id="pageFooter"
|
||||||
v-bind:left-text="$t('client', [client.id])"
|
v-bind:left-text="$t('client', [client.id])"
|
||||||
v-bind:center-text="client.socialName"
|
v-bind:center-text="client.socialName"
|
||||||
v-bind="$props">
|
v-bind="$props"
|
||||||
|
>
|
||||||
</report-footer>
|
</report-footer>
|
||||||
</td>
|
</template>
|
||||||
</tr>
|
</report-body>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const reportHeader = new Component('report-header');
|
const reportBody = new Component('report-body');
|
||||||
const reportFooter = new Component('report-footer');
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'report-header': reportHeader.build(),
|
'report-body': reportBody.build(),
|
||||||
'report-footer': reportFooter.build()
|
'report-footer': reportFooter.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<report-body v-bind="$props">
|
||||||
<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-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -39,15 +30,9 @@
|
||||||
<div class="header">{{$t('clientData')}}</div>
|
<div class="header">{{$t('clientData')}}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<h3 class="uppercase">{{client.nickname}}</h3>
|
<h3 class="uppercase">{{client.nickname}}</h3>
|
||||||
<div>
|
<div>{{client.street}}</div>
|
||||||
{{client.street}}
|
<div>{{client.postalCode}}, {{client.city}} ({{client.province}})</div>
|
||||||
</div>
|
<div>{{client.country}}</div>
|
||||||
<div>
|
|
||||||
{{client.postalCode}}, {{client.city}} ({{client.province}})
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{client.country}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -80,15 +65,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<template v-slot:footer>
|
||||||
<report-footer id="pageFooter"
|
<report-footer
|
||||||
|
id="pageFooter"
|
||||||
v-bind:left-text="$t('claim', [id])"
|
v-bind:left-text="$t('claim', [id])"
|
||||||
v-bind:center-text="client.name"
|
v-bind:center-text="client.name"
|
||||||
v-bind="$props">
|
v-bind="$props"
|
||||||
|
>
|
||||||
</report-footer>
|
</report-footer>
|
||||||
</td>
|
</template>
|
||||||
</tr>
|
</report-body>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const reportHeader = new Component('report-header');
|
const reportBody = new Component('report-body');
|
||||||
const reportFooter = new Component('report-footer');
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -27,7 +27,7 @@ module.exports = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'report-header': reportHeader.build(),
|
'report-body': reportBody.build(),
|
||||||
'report-footer': reportFooter.build()
|
'report-footer': reportFooter.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -1,13 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<report-body v-bind="$props">
|
||||||
<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-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -33,15 +24,9 @@
|
||||||
<div class="header">{{$t('clientData')}}</div>
|
<div class="header">{{$t('clientData')}}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<h3 class="uppercase">{{client.socialName}}</h3>
|
<h3 class="uppercase">{{client.socialName}}</h3>
|
||||||
<div>
|
<div>{{client.street}}</div>
|
||||||
{{client.street}}
|
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
|
||||||
</div>
|
<div>{{client.country}}</div>
|
||||||
<div>
|
|
||||||
{{client.postcode}}, {{client.city}} ({{client.province}})
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{client.country}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -81,15 +66,13 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<template v-slot:footer>
|
||||||
<report-footer id="pageFooter"
|
<report-footer
|
||||||
|
id="pageFooter"
|
||||||
v-bind:left-text="$t('client', [client.id])"
|
v-bind:left-text="$t('client', [client.id])"
|
||||||
v-bind:center-text="client.socialName"
|
v-bind:center-text="client.socialName"
|
||||||
v-bind="$props">
|
v-bind="$props"
|
||||||
|
>
|
||||||
</report-footer>
|
</report-footer>
|
||||||
</td>
|
</template>
|
||||||
</tr>
|
</report-body>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const reportHeader = new Component('report-header');
|
const reportBody = new Component('report-body');
|
||||||
const reportFooter = new Component('report-footer');
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -64,7 +64,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'report-header': reportHeader.build(),
|
'report-body': reportBody.build(),
|
||||||
'report-footer': reportFooter.build()
|
'report-footer': reportFooter.build()
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
const Stylesheet = require(`vn-print/core/stylesheet`);
|
||||||
|
|
||||||
|
const path = require('path');
|
||||||
|
const vnPrintPath = path.resolve('print');
|
||||||
|
|
||||||
|
module.exports = new Stylesheet([
|
||||||
|
`${vnPrintPath}/common/css/spacing.css`,
|
||||||
|
`${vnPrintPath}/common/css/misc.css`,
|
||||||
|
`${vnPrintPath}/common/css/layout.css`,
|
||||||
|
`${vnPrintPath}/common/css/report.css`,
|
||||||
|
`${__dirname}/style.css`])
|
||||||
|
.mergeStyles();
|
|
@ -0,0 +1,37 @@
|
||||||
|
html {
|
||||||
|
font-family: "Roboto";
|
||||||
|
margin-top: -7px;
|
||||||
|
}
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 26px;
|
||||||
|
}
|
||||||
|
#vertical {
|
||||||
|
writing-mode: vertical-rl;
|
||||||
|
height: 226px;
|
||||||
|
margin-left: -13px;
|
||||||
|
}
|
||||||
|
.outline {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
#nickname {
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
#agencyDescripton {
|
||||||
|
font-size: 32px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#barcode{
|
||||||
|
width: 390px;
|
||||||
|
}
|
||||||
|
#shipped {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
#ticketFk, #vertical {
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html v-bind:lang="$i18n.locale">
|
||||||
|
<body>
|
||||||
|
<table v-for="labelData in labelsData" style="break-before: page;">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="6"><span id="vertical">{{labelData.levelV}}</span></td>
|
||||||
|
<td id="ticketFk" >{{labelData.ticketFk}} ⬸ {{labelData.clientFk}}</td>
|
||||||
|
<td colspan="2" id="shipped">{{labelData.shipped}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td rowspan="3"><div v-html="getBarcode(labelData.ticketFk)" id="barcode"></div></td>
|
||||||
|
<td class="outline">{{labelData.workerCode}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="outline">{{labelData.labelCount}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="outline">{{labelData.size}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><div id="agencyDescripton">{{labelData.agencyDescription}}</div></td>
|
||||||
|
<td id="bold">{{labelData.lineCount}}</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td id="nickname">{{labelData.nickName}}</td>
|
||||||
|
<td id="bold">{{labelData.agencyHour}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,46 @@
|
||||||
|
const jsBarcode = require('jsbarcode');
|
||||||
|
const {DOMImplementation, XMLSerializer} = require('xmldom');
|
||||||
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'collection-label',
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: Number,
|
||||||
|
required: true,
|
||||||
|
description: 'The ticket or collection id'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async serverPrefetch() {
|
||||||
|
let ticketIds;
|
||||||
|
const res = await this.rawSqlFromDef('tickets', [this.id]);
|
||||||
|
|
||||||
|
if (res.length) {
|
||||||
|
ticketIds = [];
|
||||||
|
for (const row of res)
|
||||||
|
ticketIds.push(row.ticketFk);
|
||||||
|
} else
|
||||||
|
ticketIds = [this.id];
|
||||||
|
|
||||||
|
this.labelsData = await this.rawSqlFromDef('labelsData', [ticketIds]);
|
||||||
|
|
||||||
|
if (!this.labelsData.length)
|
||||||
|
throw new UserError('Empty data source');
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getBarcode(id) {
|
||||||
|
const xmlSerializer = new XMLSerializer();
|
||||||
|
const document = new DOMImplementation().createDocument('http://www.w3.org/1999/xhtml', 'html', null);
|
||||||
|
const svgNode = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||||
|
|
||||||
|
jsBarcode(svgNode, id, {
|
||||||
|
xmlDocument: document,
|
||||||
|
format: 'code128',
|
||||||
|
displayValue: false,
|
||||||
|
width: 3.8,
|
||||||
|
height: 110,
|
||||||
|
});
|
||||||
|
return xmlSerializer.serializeToString(svgNode);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
reportName: labelCollection
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"width": "10.4cm",
|
||||||
|
"height": "4.8cm",
|
||||||
|
"margin": {
|
||||||
|
"top": "0cm",
|
||||||
|
"right": "0.5cm",
|
||||||
|
"bottom": "0cm",
|
||||||
|
"left": "0cm"
|
||||||
|
},
|
||||||
|
"printBackground": true
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
SELECT c.itemPackingTypeFk,
|
||||||
|
CONCAT(tc.collectionFk, ' ', LEFT(cc.code, 4)) color,
|
||||||
|
CONCAT(tc.collectionFk, ' ', SUBSTRING('ABCDEFGH',tc.wagon, 1), '-', tc.`level`) levelV,
|
||||||
|
tc.ticketFk,
|
||||||
|
LEFT(COALESCE(et.description, zo.name, am.name),12) agencyDescription,
|
||||||
|
am.name,
|
||||||
|
t.clientFk,
|
||||||
|
CONCAT(CAST(SUM(sv.volume) AS DECIMAL(5, 2)), 'm³') m3 ,
|
||||||
|
CAST(IF(ic.code = 'plant', CONCAT(MAX(i.`size`),' cm'), COUNT(*)) AS CHAR) size,
|
||||||
|
w.code workerCode,
|
||||||
|
tt.labelCount,
|
||||||
|
IF(HOUR(t.shipped), TIME_FORMAT(t.shipped, '%H:%i'), TIME_FORMAT(zo.`hour`, '%H:%i')) agencyHour,
|
||||||
|
DATE_FORMAT(t.shipped, '%d/%m/%y') shipped,
|
||||||
|
COUNT(*) lineCount,
|
||||||
|
t.nickName
|
||||||
|
FROM vn.ticket t
|
||||||
|
JOIN vn.ticketCollection tc ON tc.ticketFk = t.id
|
||||||
|
JOIN vn.collection c ON c.id = tc.collectionFk
|
||||||
|
LEFT JOIN vn.collectionColors cc ON cc.shelve = tc.`level`
|
||||||
|
AND cc.wagon = tc.wagon
|
||||||
|
AND cc.trainFk = c.trainFk
|
||||||
|
JOIN vn.sale s ON s.ticketFk = t.id
|
||||||
|
LEFT JOIN vn.saleVolume sv ON sv.saleFk = s.id
|
||||||
|
JOIN vn.item i ON i.id = s.itemFk
|
||||||
|
JOIN vn.itemType it ON it.id = i.typeFk
|
||||||
|
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
|
||||||
|
JOIN vn.worker w ON w.id = c.workerFk
|
||||||
|
JOIN vn.agencyMode am ON am.id = t.agencyModeFk
|
||||||
|
LEFT JOIN vn.ticketTrolley tt ON tt.ticket = t.id
|
||||||
|
LEFT JOIN vn.`zone` zo ON t.zoneFk = zo.id
|
||||||
|
LEFT JOIN vn.routesMonitor rm ON rm.routeFk = t.routeFk
|
||||||
|
LEFT JOIN vn.expeditionTruck et ON et.id = rm.expeditionTruckFk
|
||||||
|
WHERE tc.ticketFk IN (?)
|
||||||
|
GROUP BY t.id
|
||||||
|
ORDER BY cc.`code`;
|
|
@ -0,0 +1,3 @@
|
||||||
|
SELECT ticketFk
|
||||||
|
FROM ticketCollection
|
||||||
|
WHERE collectionFk = ?
|
|
@ -1,21 +1,9 @@
|
||||||
<!DOCTYPE html>
|
<report-body v-bind="$props">
|
||||||
<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-row info-panel">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
|
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Block -->
|
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -28,8 +16,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="info-panel">
|
<div class="info-panel">
|
||||||
|
@ -109,8 +95,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="info-panel" style="width: 98%">
|
<div class="info-panel" style="width: 98%">
|
||||||
|
@ -150,12 +134,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div>
|
<div>
|
||||||
<table style="border-top: 1px solid #DDD" class="info-panel">
|
<table style="border-top: 1px solid #ddd" class="info-panel">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class="row-oriented" style="width: 100%">
|
<tr class="row-oriented" style="width: 100%">
|
||||||
<td>{{$t('fields.personFilling')}}:</td>
|
<td>{{$t('fields.personFilling')}}:</td>
|
||||||
|
@ -176,15 +158,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<template v-slot:footer>
|
||||||
<report-footer
|
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props"> </report-footer>
|
||||||
id="pageFooter"
|
</template>
|
||||||
v-bind:left-text="dated"
|
</report-body>
|
||||||
v-bind="$props">
|
|
||||||
</report-footer>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const Component = require(`vn-print/core/component`);
|
const Component = require(`vn-print/core/component`);
|
||||||
const reportHeader = new Component('report-header');
|
const reportBody = new Component('report-body')
|
||||||
const reportFooter = new Component('report-footer');
|
const reportFooter = new Component('report-footer');
|
||||||
|
|
||||||
const rptCreditRequest = {
|
const rptCreditRequest = {
|
||||||
|
@ -12,7 +12,7 @@ const rptCreditRequest = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
'report-header': reportHeader.build(),
|
'report-body': reportBody.build(),
|
||||||
'report-footer': reportFooter.build()
|
'report-footer': reportFooter.build()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<report-body v-bind="$props">
|
||||||
<html v-bind:lang="$i18n.locale">
|
<template v-slot:header>
|
||||||
|
<report-header v-bind="$props" v-bind:company-code="ticket.companyCode"> </report-header>
|
||||||
<body>
|
</template>
|
||||||
<table class="grid">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<!-- Header block -->
|
|
||||||
<report-header v-bind="$props" v-bind:company-code="ticket.companyCode">
|
|
||||||
</report-header>
|
|
||||||
<!-- Block -->
|
|
||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="grid-block">
|
<div class="grid-block">
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
|
@ -43,33 +35,22 @@
|
||||||
<div class="header">{{$t('deliveryAddress')}}</div>
|
<div class="header">{{$t('deliveryAddress')}}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<h3 class="uppercase">{{address.nickname}}</h3>
|
<h3 class="uppercase">{{address.nickname}}</h3>
|
||||||
<div>
|
<div>{{address.street}}</div>
|
||||||
{{address.street}}
|
<div>{{address.postalCode}}, {{address.city}} ({{address.province}})</div>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{address.postalCode}}, {{address.city}} ({{address.province}})
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="header">{{$t('fiscalData')}}</div>
|
<div class="header">{{$t('fiscalData')}}</div>
|
||||||
<div class="body">
|
<div class="body">
|
||||||
<div>
|
<div>{{client.socialName}}</div>
|
||||||
{{client.socialName}}
|
<div>{{client.street}}</div>
|
||||||
</div>
|
<div>{{client.fi}}</div>
|
||||||
<div>
|
|
||||||
{{client.street}}
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
{{client.fi}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Sales block -->
|
|
||||||
<h2>{{$t('saleLines')}}</h2>
|
<h2>{{$t('saleLines')}}</h2>
|
||||||
<table class="column-oriented">
|
<table class="column-oriented">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -88,25 +69,18 @@
|
||||||
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
|
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
|
||||||
<td class="number">{{sale.quantity}}</td>
|
<td class="number">{{sale.quantity}}</td>
|
||||||
<td width="50%">{{sale.concept}}</td>
|
<td width="50%">{{sale.concept}}</td>
|
||||||
<td class="number" v-if="showPrices">{{sale.price | currency('EUR',
|
<td class="number" v-if="showPrices">{{sale.price | currency('EUR', $i18n.locale)}}</td>
|
||||||
$i18n.locale)}}</td>
|
<td class="centered" width="5%" v-if="showPrices">{{(sale.discount / 100) | percentage}}</td>
|
||||||
<td class="centered" width="5%" v-if="showPrices">{{(sale.discount / 100) |
|
|
||||||
percentage}}</td>
|
|
||||||
<td class="centered" v-if="showPrices">{{sale.vatType}}</td>
|
<td class="centered" v-if="showPrices">{{sale.vatType}}</td>
|
||||||
<td class="number" v-if="showPrices">{{sale.price * sale.quantity * (1 -
|
<td class="number" v-if="showPrices">
|
||||||
sale.discount / 100) | currency('EUR', $i18n.locale)}}</td>
|
{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="description font light-gray">
|
<tr class="description font light-gray">
|
||||||
<td colspan="7">
|
<td colspan="7">
|
||||||
<span v-if="sale.value5">
|
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </span>
|
||||||
<strong>{{sale.tag5}}</strong> {{sale.value5}}
|
<span v-if="sale.value6"> <strong>{{sale.tag6}}</strong> {{sale.value6}} </span>
|
||||||
</span>
|
<span v-if="sale.value7"> <strong>{{sale.tag7}}</strong> {{sale.value7}} </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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -119,10 +93,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
<!-- End of sales block -->
|
|
||||||
|
|
||||||
<div class="columns vn-mb-ml">
|
<div class="columns vn-mb-ml">
|
||||||
<!-- Services block-->
|
|
||||||
<div class="size100 no-page-break" v-if="services.length > 0">
|
<div class="size100 no-page-break" v-if="services.length > 0">
|
||||||
<h2>{{$t('services.title')}}</h2>
|
<h2>{{$t('services.title')}}</h2>
|
||||||
<table class="column-oriented">
|
<table class="column-oriented">
|
||||||
|
@ -142,12 +114,10 @@
|
||||||
<td width="5%"></td>
|
<td width="5%"></td>
|
||||||
<td class="number">{{service.quantity}}</td>
|
<td class="number">{{service.quantity}}</td>
|
||||||
<td width="50%">{{service.description}}</td>
|
<td width="50%">{{service.description}}</td>
|
||||||
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
|
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
|
||||||
</td>
|
|
||||||
<td class="centered" width="5%"></td>
|
<td class="centered" width="5%"></td>
|
||||||
<td class="centered">{{service.taxDescription}}</td>
|
<td class="centered">{{service.taxDescription}}</td>
|
||||||
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
|
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
|
@ -161,10 +131,8 @@
|
||||||
</table>
|
</table>
|
||||||
<span class="font gray">* {{ $t('services.warning') }}</span>
|
<span class="font gray">* {{ $t('services.warning') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of services block -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<!-- Packages block -->
|
|
||||||
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
|
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
|
||||||
<h2>{{$t('packagings.title')}}</h2>
|
<h2>{{$t('packagings.title')}}</h2>
|
||||||
<table class="column-oriented">
|
<table class="column-oriented">
|
||||||
|
@ -184,10 +152,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of packages block -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="columns vn-mt-xl" v-if="showPrices">
|
<div class="columns vn-mt-xl" v-if="showPrices">
|
||||||
<!-- Taxes block -->
|
|
||||||
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
|
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
|
||||||
<table class="column-oriented">
|
<table class="column-oriented">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -206,9 +172,7 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="tax in taxes">
|
<tr v-for="tax in taxes">
|
||||||
<td width="45%">{{tax.name}}</td>
|
<td width="45%">{{tax.name}}</td>
|
||||||
<td width="25%" class="number">
|
<td width="25%" class="number">{{tax.Base | currency('EUR', $i18n.locale)}}</td>
|
||||||
{{tax.Base | currency('EUR', $i18n.locale)}}
|
|
||||||
</td>
|
|
||||||
<td>{{tax.vatPercent | percentage}}</td>
|
<td>{{tax.vatPercent | percentage}}</td>
|
||||||
<td class="number">{{tax.tax | currency('EUR', $i18n.locale)}}</td>
|
<td class="number">{{tax.tax | currency('EUR', $i18n.locale)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -216,23 +180,18 @@
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr class="font bold">
|
<tr class="font bold">
|
||||||
<td width="45%">{{$t('subtotal')}}</td>
|
<td width="45%">{{$t('subtotal')}}</td>
|
||||||
<td width="20%" class="number">
|
<td width="20%" class="number">{{getTotalBase() | currency('EUR', $i18n.locale)}}</td>
|
||||||
{{getTotalBase() | currency('EUR', $i18n.locale)}}
|
|
||||||
</td>
|
|
||||||
<td></td>
|
<td></td>
|
||||||
<td class="number">{{getTotalTax()| currency('EUR', $i18n.locale)}}</td>
|
<td class="number">{{getTotalTax()| currency('EUR', $i18n.locale)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="font bold">
|
<tr class="font bold">
|
||||||
<td colspan="2">{{$t('total')}}</td>
|
<td colspan="2">{{$t('total')}}</td>
|
||||||
<td colspan="2" class="number">{{getTotal() | currency('EUR',
|
<td colspan="2" class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
|
||||||
$i18n.locale)}}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of taxes block -->
|
|
||||||
|
|
||||||
<!-- Phytosanitary block -->
|
|
||||||
<div id="phytosanitary" class="size50 pull-left no-page-break">
|
<div id="phytosanitary" class="size50 pull-left no-page-break">
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="body">
|
<div class="body">
|
||||||
|
@ -241,9 +200,7 @@
|
||||||
<div class="size25">
|
<div class="size25">
|
||||||
<img v-bind:src="getReportSrc('europe.png')" />
|
<img v-bind:src="getReportSrc('europe.png')" />
|
||||||
</div>
|
</div>
|
||||||
<div class="size75 flag-text">
|
<div class="size75 flag-text"><strong>{{$t('plantPassport')}}</strong><br /></div>
|
||||||
<strong>{{$t('plantPassport')}}</strong><br />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="phytosanitary-info">
|
<div class="phytosanitary-info">
|
||||||
|
@ -267,10 +224,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of phytosanitary block -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<!-- Signature block -->
|
|
||||||
<div class="size50 pull-left no-page-break">
|
<div class="size50 pull-left no-page-break">
|
||||||
<div id="signature" class="panel" v-if="signature && signature.id">
|
<div id="signature" class="panel" v-if="signature && signature.id">
|
||||||
<div class="header">{{$t('digitalSignature')}}</div>
|
<div class="header">{{$t('digitalSignature')}}</div>
|
||||||
|
@ -280,10 +235,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- End of signature block -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="columns vn-mb-ml" v-if="hasObservations">
|
<div class="columns vn-mb-ml" v-if="hasObservations">
|
||||||
<!-- Observations block-->
|
|
||||||
<div class="size100 no-page-break">
|
<div class="size100 no-page-break">
|
||||||
<h2>{{$t('observations')}}</h2>
|
<h2>{{$t('observations')}}</h2>
|
||||||
<p class="observations">{{ticket.description}}</p>
|
<p class="observations">{{ticket.description}}</p>
|
||||||
|
@ -291,14 +244,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Footer block -->
|
<template v-slot:footer>
|
||||||
<report-footer id="pageFooter" v-bind:company-code="ticket.companyCode"
|
<report-footer
|
||||||
v-bind:left-text="footerType" v-bind:center-text="client.socialName" v-bind="$props">
|
id="pageFooter"
|
||||||
|
v-bind:company-code="ticket.companyCode"
|
||||||
|
v-bind:left-text="footerType"
|
||||||
|
v-bind:center-text="client.socialName"
|
||||||
|
v-bind="$props"
|
||||||
|
>
|
||||||
</report-footer>
|
</report-footer>
|
||||||
</td>
|
</template>
|
||||||
</tr>
|
</report-body>
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue