Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4077-login_recover-password
gitea/salix/pipeline/head This commit is unstable Details

This commit is contained in:
Alex Moreno 2022-11-10 14:40:55 +01:00
commit 4c216c4556
117 changed files with 48345 additions and 4128 deletions

View File

@ -1,4 +1,4 @@
extends: [eslint:recommended, google, plugin:jasmine/recommended]
extends: [eslint:recommended, google, plugin:jasmine/recommended, 'prettier',]
parserOptions:
ecmaVersion: 2018
sourceType: "module"

7
.prettierrc.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 4,
semi: true,
endOfLine: 'auto',
};

13
.vscode/settings.json vendored
View File

@ -2,7 +2,16 @@
{
// Carácter predeterminado de final de línea.
"files.eol": "\n",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"editor.bracketPairColorization.enabled": 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"
}
}

View File

@ -47,20 +47,22 @@ module.exports = Self => {
for (let dms of dmsToDelete) {
const pathHash = DmsContainer.getHash(dms.id);
const dmsContainer = await DmsContainer.container(pathHash);
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
try {
const dstFile = path.join(dmsContainer.client.root, pathHash, dms.file);
await fs.unlink(dstFile);
} catch (err) {
continue;
if (err.code != 'ENOENT')
throw err;
}
await dms.destroy(myOptions);
const dstFolder = path.join(dmsContainer.client.root, pathHash);
try {
await fs.rmdir(dstFolder);
} catch (err) {
continue;
}
await dms.destroy(myOptions);
}
};
};

View File

@ -47,12 +47,8 @@ module.exports = class Docker {
if (ci) network = `--network="${networkName}"`;
log('Starting container...');
const container = await this.execP(`
docker run \
${network} \
--env RUN_CHOWN=${runChown} \
-d ${dockerArgs} salix-db
`);
const container = await this.execP(
`docker run ${network} --env RUN_CHOWN=${runChown} -d ${dockerArgs} salix-db`);
this.id = container.stdout.trim();
try {

View File

@ -918,7 +918,7 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
(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
(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),

View File

@ -27518,7 +27518,7 @@ CREATE TABLE `expedition` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`agencyModeFk` int(11) 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(),
`isRefund__` 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',
PRIMARY KEY (`id`),
KEY `index1` (`agencyModeFk`),
KEY `index2` (`isBox`),
KEY `index2` (`freightItemFk`),
KEY `index3` (`created`),
KEY `index4` (`ticketFk`),
KEY `expedition_fk3_idx` (`packagingFk`),
@ -27567,7 +27567,7 @@ BEGIN
DECLARE vShipFk INT;
IF NEW.isBox > 0 THEN
IF NEW.freightItemFk > 0 THEN
UPDATE ticket SET packages = nz(packages) + 1 WHERE id = NEW.ticketFk;
@ -27638,7 +27638,7 @@ DELIMITER ;;
BEGIN
UPDATE ticket t
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;
END */;;
@ -36287,7 +36287,7 @@ CREATE TABLE `sorter` (
`created` datetime NOT NULL,
`routeFk` int(10) unsigned NOT NULL,
`ticketFk` int(10) NOT NULL,
`isBox` int(11) DEFAULT 1,
`freightItemFk` int(11) DEFAULT 1,
`itemFk` int(11) DEFAULT NULL,
`width` 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
FROM vn.ticket t
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;
END IF;
@ -46492,7 +46492,7 @@ BEGIN
LEFT JOIN item i ON i.id = b.itemFk
LEFT JOIN itemType it ON it.id = i.typeFk
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
WHERE b.id = vSelf;
@ -53229,7 +53229,7 @@ BEGIN
INNER JOIN vn.ticketState ts ON ts.ticketFk = exp.ticketFk
LEFT JOIN vn.address a ON t.addressFk = a.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 ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@ -53760,7 +53760,7 @@ BEGIN
GROUP BY sub.ticketFk
) sub2 ON sub2.ticketFk = t.id
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;
END ;;
DELIMITER ;

View File

@ -3,7 +3,7 @@
ng-transclude="prepend"
class="prepend">
</div>
<div class="infix">
<div class="infix" >
<div class="fix prefix"></div>
<div class="control">
<section
@ -13,8 +13,7 @@
</section>
<input
type="file"
accept="{{$ctrl.accept}}"
style="display: none;">
accept="{{$ctrl.accept}}">
</input>
</div>
<div class="fix suffix"></div>

View File

@ -4,4 +4,13 @@
.value {
cursor: pointer;
}
.control {
& > input[type=file] {
opacity: 0;
}
& > section {
position: absolute;
bottom: 0;
}
}
}

View File

@ -1,248 +1,249 @@
{
"Phone format is invalid": "El formato del teléfono no es correcto",
"You are not allowed to change the credit": "No tienes privilegios para modificar el crédito",
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
"Unable to default a disabled consignee": "No se puede poner predeterminado un consignatario desactivado",
"Can't be blank": "No puede estar en blanco",
"Invalid TIN": "NIF/CIF invalido",
"TIN must be unique": "El NIF/CIF debe ser único",
"A client with that Web User name already exists": "Ya existe un cliente con ese Usuario Web",
"Is invalid": "Is invalid",
"Quantity cannot be zero": "La cantidad no puede ser cero",
"Enter an integer different to zero": "Introduce un entero distinto de cero",
"Package cannot be blank": "El embalaje no puede estar en blanco",
"The company name must be unique": "La razón social debe ser única",
"Invalid email": "Correo electrónico inválido",
"The IBAN does not have the correct format": "El IBAN no tiene el formato correcto",
"That payment method requires an IBAN": "El método de pago seleccionado requiere un IBAN",
"That payment method requires a BIC": "El método de pago seleccionado requiere un BIC",
"State cannot be blank": "El estado no puede estar en blanco",
"Worker cannot be blank": "El trabajador no puede estar en blanco",
"Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado",
"can't be blank": "El campo no puede estar vacío",
"Observation type must be unique": "El tipo de observación no puede repetirse",
"The credit must be an integer greater than or equal to zero": "The credit must be an integer greater than or equal to zero",
"The grade must be similar to the last one": "El grade debe ser similar al último",
"Only manager can change the credit": "Solo el gerente puede cambiar el credito de este cliente",
"Name cannot be blank": "El nombre no puede estar en blanco",
"Phone cannot be blank": "El teléfono no puede estar en blanco",
"Period cannot be blank": "El periodo no puede estar en blanco",
"Choose a company": "Selecciona una empresa",
"Se debe rellenar el campo de texto": "Se debe rellenar el campo de texto",
"Description should have maximum of 45 characters": "La descripción debe tener maximo 45 caracteres",
"Cannot be blank": "El campo no puede estar en blanco",
"The grade must be an integer greater than or equal to zero": "El grade debe ser un entero mayor o igual a cero",
"Sample type cannot be blank": "El tipo de plantilla no puede quedar en blanco",
"Description cannot be blank": "Se debe rellenar el campo de texto",
"The new quantity should be smaller than the old one": "La nueva cantidad debe de ser menor que la anterior",
"The value should not be greater than 100%": "El valor no debe de ser mayor de 100%",
"The value should be a number": "El valor debe ser un numero",
"This order is not editable": "Esta orden no se puede modificar",
"You can't create an order for a frozen client": "No puedes crear una orden para un cliente congelado",
"You can't create an order for a client that has a debt": "No puedes crear una orden para un cliente con deuda",
"is not a valid date": "No es una fecha valida",
"Barcode must be unique": "El código de barras debe ser único",
"The warehouse can't be repeated": "El almacén no puede repetirse",
"The tag or priority can't be repeated for an item": "El tag o prioridad no puede repetirse para un item",
"The observation type can't be repeated": "El tipo de observación no puede repetirse",
"A claim with that sale already exists": "Ya existe una reclamación para esta línea",
"You don't have enough privileges to change that field": "No tienes permisos para cambiar ese campo",
"Warehouse cannot be blank": "El almacén no puede quedar en blanco",
"Agency cannot be blank": "La agencia no puede quedar en blanco",
"Not enough privileges to edit a client with verified data": "No tienes permisos para hacer cambios en un cliente con datos comprobados",
"This address doesn't exist": "Este consignatario no existe",
"You must delete the claim id %d first": "Antes debes borrar la reclamación %d",
"You don't have enough privileges": "No tienes suficientes permisos",
"Cannot check Equalization Tax in this NIF/CIF": "No se puede marcar RE en este NIF/CIF",
"You can't make changes on the basic data of an confirmed order or with rows": "No puedes cambiar los datos basicos de una orden con artículos",
"INVALID_USER_NAME": "El nombre de usuario solo debe contener letras minúsculas o, a partir del segundo carácter, números o subguiones, no esta permitido el uso de la letra ñ",
"You can't create a ticket for a frozen client": "No puedes crear un ticket para un cliente congelado",
"You can't create a ticket for a inactive client": "No puedes crear un ticket para un cliente inactivo",
"Tag value cannot be blank": "El valor del tag no puede quedar en blanco",
"ORDER_EMPTY": "Cesta vacía",
"You don't have enough privileges to do that": "No tienes permisos para cambiar esto",
"NO SE PUEDE DESACTIVAR EL CONSIGNAT": "NO SE PUEDE DESACTIVAR EL CONSIGNAT",
"Error. El NIF/CIF está repetido": "Error. El NIF/CIF está repetido",
"Street cannot be empty": "Dirección no puede estar en blanco",
"City cannot be empty": "Cuidad no puede estar en blanco",
"Code cannot be blank": "Código no puede estar en blanco",
"You cannot remove this department": "No puedes eliminar este departamento",
"The extension must be unique": "La extensión debe ser unica",
"The secret can't be blank": "La contraseña no puede estar en blanco",
"We weren't able to send this SMS": "No hemos podido enviar el SMS",
"This client can't be invoiced": "Este cliente no puede ser facturado",
"This ticket can't be invoiced": "Este ticket no puede ser facturado",
"You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado",
"This ticket can not be modified": "Este ticket no puede ser modificado",
"The introduced hour already exists": "Esta hora ya ha sido introducida",
"INFINITE_LOOP": "Existe una dependencia entre dos Jefes",
"The sales of the current ticket can't be modified": "Las lineas de este ticket no pueden ser modificadas",
"The sales of the receiver ticket can't be modified": "Las lineas del ticket al que envias no pueden ser modificadas",
"NO_AGENCY_AVAILABLE": "No hay una zona de reparto disponible con estos parámetros",
"ERROR_PAST_SHIPMENT": "No puedes seleccionar una fecha de envío en pasado",
"The current ticket can't be modified": "El ticket actual no puede ser modificado",
"The current claim can't be modified": "La reclamación actual no puede ser modificada",
"The sales of this ticket can't be modified": "Las lineas de este ticket no pueden ser modificadas",
"Sale(s) blocked, contact production": "Linea(s) bloqueada(s), contacte con produccion",
"Please select at least one sale": "Por favor selecciona al menos una linea",
"All sales must belong to the same ticket": "Todas las lineas deben pertenecer al mismo ticket",
"NO_ZONE_FOR_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
"This item doesn't exists": "El artículo no existe",
"NOT_ZONE_WITH_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
"Extension format is invalid": "El formato de la extensión es inválido",
"Invalid parameters to create a new ticket": "Parámetros inválidos para crear un nuevo ticket",
"This item is not available": "Este artículo no está disponible",
"This postcode already exists": "Este código postal ya existe",
"Concept cannot be blank": "El concepto no puede quedar en blanco",
"File doesn't exists": "El archivo no existe",
"You don't have privileges to change the zone": "No tienes permisos para cambiar la zona o para esos parámetros hay más de una opción de envío, hable con las agencias",
"This ticket is already on weekly tickets": "Este ticket ya está en tickets programados",
"Ticket id cannot be blank": "El id de ticket no puede quedar en blanco",
"Weekday cannot be blank": "El día de la semana no puede quedar en blanco",
"You can't delete a confirmed order": "No puedes borrar un pedido confirmado",
"The social name has an invalid format": "El nombre fiscal tiene un formato incorrecto",
"Invalid quantity": "Cantidad invalida",
"This postal code is not valid": "This postal code is not valid",
"is invalid": "is invalid",
"The postcode doesn't exist. Please enter a correct one": "El código postal no existe. Por favor, introduce uno correcto",
"The department name can't be repeated": "El nombre del departamento no puede repetirse",
"This phone already exists": "Este teléfono ya existe",
"You cannot move a parent to its own sons": "No puedes mover un elemento padre a uno de sus hijos",
"You can't create a claim for a removed ticket": "No puedes crear una reclamación para un ticket eliminado",
"You cannot delete a ticket that part of it is being prepared": "No puedes eliminar un ticket en el que una parte que está siendo preparada",
"You must delete all the buy requests first": "Debes eliminar todas las peticiones de compra primero",
"You should specify a date": "Debes especificar una fecha",
"You should specify at least a start or end date": "Debes especificar al menos una fecha de inicio o de fín",
"Start date should be lower than end date": "La fecha de inicio debe ser menor que la fecha de fín",
"You should mark at least one week day": "Debes marcar al menos un día de la semana",
"Swift / BIC can't be empty": "Swift / BIC no puede estar vacío",
"Customs agent is required for a non UEE member": "El agente de aduanas es requerido para los clientes extracomunitarios",
"Incoterms is required for a non UEE member": "El incoterms es requerido para los clientes extracomunitarios",
"Deleted sales from ticket": "He eliminado las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
"Added sale to ticket": "He añadido la siguiente linea al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
"Changed sale discount": "He cambiado el descuento de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Created claim": "He creado la reclamación [{{claimId}}]({{{claimUrl}}}) de las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Changed sale price": "He cambiado el precio de [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) de {{oldPrice}}€ ➔ *{{newPrice}}€* del ticket [{{ticketId}}]({{{ticketUrl}}})",
"Changed sale quantity": "He cambiado la cantidad de [{{itemId}} {{concept}}]({{{itemUrl}}}) de {{oldQuantity}} ➔ *{{newQuantity}}* del ticket [{{ticketId}}]({{{ticketUrl}}})",
"State": "Estado",
"regular": "normal",
"reserved": "reservado",
"Changed sale reserved state": "He cambiado el estado reservado de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Bought units from buy request": "Se ha comprado {{quantity}} unidades de [{{itemId}} {{concept}}]({{{urlItem}}}) para el ticket id [{{ticketId}}]({{{url}}})",
"Deny buy request": "Se ha rechazado la petición de compra para el ticket id [{{ticketId}}]({{{url}}}). Motivo: {{observation}}",
"MESSAGE_INSURANCE_CHANGE": "He cambiado el crédito asegurado del cliente [{{clientName}} ({{clientId}})]({{{url}}}) a *{{credit}} €*",
"Changed client paymethod": "He cambiado la forma de pago del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
"Sent units from ticket": "Envio *{{quantity}}* unidades de [{{concept}} ({{itemId}})]({{{itemUrl}}}) a *\"{{nickname}}\"* provenientes del ticket id [{{ticketId}}]({{{ticketUrl}}})",
"Claim will be picked": "Se recogerá el género de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}*",
"Claim state has changed to incomplete": "Se ha cambiado el estado de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}* a *incompleta*",
"Claim state has changed to canceled": "Se ha cambiado el estado de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}* a *anulado*",
"Client checked as validated despite of duplication": "Cliente comprobado a pesar de que existe el cliente id {{clientId}}",
"ORDER_ROW_UNAVAILABLE": "No hay disponibilidad de este producto",
"Distance must be lesser than 1000": "La distancia debe ser inferior a 1000",
"This ticket is deleted": "Este ticket está eliminado",
"Unable to clone this travel": "No ha sido posible clonar este travel",
"This thermograph id already exists": "La id del termógrafo ya existe",
"Choose a date range or days forward": "Selecciona un rango de fechas o días en adelante",
"ORDER_ALREADY_CONFIRMED": "ORDER_ALREADY_CONFIRMED",
"Invalid password": "Invalid password",
"Password does not meet requirements": "La contraseña no cumple los requisitos",
"Role already assigned": "Role already assigned",
"Invalid role name": "Invalid role name",
"Role name must be written in camelCase": "Role name must be written in camelCase",
"Email already exists": "Email already exists",
"User already exists": "User already exists",
"Absence change notification on the labour calendar": "Notificacion de cambio de ausencia en el calendario laboral",
"Created absence": "El empleado <strong>{{author}}</strong> ha añadido una ausencia de tipo '{{absenceType}}' a <a href='{{{workerUrl}}}'><strong>{{employee}}</strong></a> para el día {{dated}}.",
"Deleted absence": "El empleado <strong>{{author}}</strong> ha eliminado una ausencia de tipo '{{absenceType}}' a <a href='{{{workerUrl}}}'><strong>{{employee}}</strong></a> del día {{dated}}.",
"I have deleted the ticket id": "He eliminado el ticket id [{{id}}]({{{url}}})",
"I have restored the ticket id": "He restaurado el ticket id [{{id}}]({{{url}}})",
"You can only restore a ticket within the first hour after deletion": "Únicamente puedes restaurar el ticket dentro de la primera hora después de su eliminación",
"Changed this data from the ticket": "He cambiado estos datos del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"agencyModeFk": "Agencia",
"clientFk": "Cliente",
"zoneFk": "Zona",
"warehouseFk": "Almacén",
"shipped": "F. envío",
"landed": "F. entrega",
"addressFk": "Consignatario",
"companyFk": "Empresa",
"The social name cannot be empty": "La razón social no puede quedar en blanco",
"The nif cannot be empty": "El NIF no puede quedar en blanco",
"You need to fill sage information before you check verified data": "Debes rellenar la información de sage antes de marcar datos comprobados",
"ASSIGN_ZONE_FIRST": "Asigna una zona primero",
"Amount cannot be zero": "El importe no puede ser cero",
"Company has to be official": "Empresa inválida",
"You can not select this payment method without a registered bankery account": "No se puede utilizar este método de pago si no has registrado una cuenta bancaria",
"Action not allowed on the test environment": "Esta acción no está permitida en el entorno de pruebas",
"The selected ticket is not suitable for this route": "El ticket seleccionado no es apto para esta ruta",
"Sorts whole route": "Reordena ruta entera",
"New ticket request has been created with price": "Se ha creado una nueva petición de compra '{{description}}' para el día *{{shipped}}*, con una cantidad de *{{quantity}}* y un precio de *{{price}} €*",
"New ticket request has been created": "Se ha creado una nueva petición de compra '{{description}}' para el día *{{shipped}}*, con una cantidad de *{{quantity}}*",
"Swift / BIC cannot be empty": "Swift / BIC no puede estar vacío",
"This BIC already exist.": "Este BIC ya existe.",
"That item doesn't exists": "Ese artículo no existe",
"There's a new urgent ticket:": "Hay un nuevo ticket urgente:",
"Invalid account": "Cuenta inválida",
"Compensation account is empty": "La cuenta para compensar está vacia",
"This genus already exist": "Este genus ya existe",
"This specie already exist": "Esta especie ya existe",
"Client assignment has changed": "He cambiado el comercial ~*\"<{{previousWorkerName}}>\"*~ por *\"<{{currentWorkerName}}>\"* del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
"None": "Ninguno",
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada",
"Cannot add more than one '1/2 day vacation'": "No puedes añadir más de un 'Vacaciones 1/2 dia'",
"This document already exists on this ticket": "Este documento ya existe en el ticket",
"Some of the selected tickets are not billable": "Algunos de los tickets seleccionados no son facturables",
"You can't invoice tickets from multiple clients": "No puedes facturar tickets de multiples clientes",
"nickname": "nickname",
"INACTIVE_PROVIDER": "Proveedor inactivo",
"This client is not invoiceable": "Este cliente no es facturable",
"serial non editable": "Esta serie no permite asignar la referencia",
"Max shipped required": "La fecha límite es requerida",
"Can't invoice to future": "No se puede facturar a futuro",
"Can't invoice to past": "No se puede facturar a pasado",
"This ticket is already invoiced": "Este ticket ya está facturado",
"A ticket with an amount of zero can't be invoiced": "No se puede facturar un ticket con importe cero",
"A ticket with a negative base can't be invoiced": "No se puede facturar un ticket con una base negativa",
"Global invoicing failed": "[Facturación global] No se han podido facturar algunos clientes",
"Wasn't able to invoice the following clients": "No se han podido facturar los siguientes clientes",
"Can't verify data unless the client has a business type": "No se puede verificar datos de un cliente que no tiene tipo de negocio",
"You don't have enough privileges to set this credit amount": "No tienes suficientes privilegios para establecer esta cantidad de crédito",
"You can't change the credit set to zero from a financialBoss": "No puedes cambiar el cŕedito establecido a cero por un jefe de finanzas",
"Amounts do not match": "Las cantidades no coinciden",
"The PDF document does not exists": "El documento PDF no existe. Prueba a regenerarlo desde la opción 'Regenerar PDF factura'",
"The type of business must be filled in basic data": "El tipo de negocio debe estar rellenado en datos básicos",
"You can't create a claim from a ticket delivered more than seven days ago": "No puedes crear una reclamación de un ticket entregado hace más de siete días",
"The worker has hours recorded that day": "El trabajador tiene horas fichadas ese día",
"The worker has a marked absence that day": "El trabajador tiene marcada una ausencia ese día",
"You can not modify is pay method checked": "No se puede modificar el campo método de pago validado",
"Can't transfer claimed sales": "No puedes transferir lineas reclamadas",
"You don't have privileges to create refund": "No tienes permisos para crear un abono",
"The item is required": "El artículo es requerido",
"The agency is already assigned to another autonomous": "La agencia ya está asignada a otro autónomo",
"date in the future": "Fecha en el futuro",
"reference duplicated": "Referencia duplicada",
"This ticket is already a refund": "Este ticket ya es un abono",
"isWithoutNegatives": "isWithoutNegatives",
"routeFk": "routeFk",
"Can't change the password of another worker": "No se puede cambiar la contraseña de otro trabajador",
"No hay un contrato en vigor": "No hay un contrato en vigor",
"No se permite fichar a futuro": "No se permite fichar a futuro",
"No está permitido trabajar": "No está permitido trabajar",
"Fichadas impares": "Fichadas impares",
"Descanso diario 12h.": "Descanso diario 12h.",
"Descanso semanal 36h. / 72h.": "Descanso semanal 36h. / 72h.",
"Dirección incorrecta": "Dirección incorrecta",
"Recover password": "Recuperar contraseña",
"Verify email": "Verificar correo",
"Click on the following link to verify this email. If you haven't requested this email, just ignore it": "Pulsa en el siguiente link para verificar este correo. Si no has pedido este correo, simplemente ignóralo.",
"Landing cannot be lesser than shipment": "Landing cannot be lesser than shipment",
"Modifiable user details only by an administrator": "Detalles de usuario modificables solo por un administrador",
"Modifiable password only via recovery or by an administrator": "Contraseña modificable solo a través de la recuperación o por un administrador",
"Not enough privileges to edit a client": "No tienes suficientes privilegios para editar un cliente",
"This route does not exists": "Esta ruta no existe",
"Phone format is invalid": "El formato del teléfono no es correcto",
"You are not allowed to change the credit": "No tienes privilegios para modificar el crédito",
"Unable to mark the equivalence surcharge": "No se puede marcar el recargo de equivalencia",
"The default consignee can not be unchecked": "No se puede desmarcar el consignatario predeterminado",
"Unable to default a disabled consignee": "No se puede poner predeterminado un consignatario desactivado",
"Can't be blank": "No puede estar en blanco",
"Invalid TIN": "NIF/CIF invalido",
"TIN must be unique": "El NIF/CIF debe ser único",
"A client with that Web User name already exists": "Ya existe un cliente con ese Usuario Web",
"Is invalid": "Is invalid",
"Quantity cannot be zero": "La cantidad no puede ser cero",
"Enter an integer different to zero": "Introduce un entero distinto de cero",
"Package cannot be blank": "El embalaje no puede estar en blanco",
"The company name must be unique": "La razón social debe ser única",
"Invalid email": "Correo electrónico inválido",
"The IBAN does not have the correct format": "El IBAN no tiene el formato correcto",
"That payment method requires an IBAN": "El método de pago seleccionado requiere un IBAN",
"That payment method requires a BIC": "El método de pago seleccionado requiere un BIC",
"State cannot be blank": "El estado no puede estar en blanco",
"Worker cannot be blank": "El trabajador no puede estar en blanco",
"Cannot change the payment method if no salesperson": "No se puede cambiar la forma de pago si no hay comercial asignado",
"can't be blank": "El campo no puede estar vacío",
"Observation type must be unique": "El tipo de observación no puede repetirse",
"The credit must be an integer greater than or equal to zero": "The credit must be an integer greater than or equal to zero",
"The grade must be similar to the last one": "El grade debe ser similar al último",
"Only manager can change the credit": "Solo el gerente puede cambiar el credito de este cliente",
"Name cannot be blank": "El nombre no puede estar en blanco",
"Phone cannot be blank": "El teléfono no puede estar en blanco",
"Period cannot be blank": "El periodo no puede estar en blanco",
"Choose a company": "Selecciona una empresa",
"Se debe rellenar el campo de texto": "Se debe rellenar el campo de texto",
"Description should have maximum of 45 characters": "La descripción debe tener maximo 45 caracteres",
"Cannot be blank": "El campo no puede estar en blanco",
"The grade must be an integer greater than or equal to zero": "El grade debe ser un entero mayor o igual a cero",
"Sample type cannot be blank": "El tipo de plantilla no puede quedar en blanco",
"Description cannot be blank": "Se debe rellenar el campo de texto",
"The new quantity should be smaller than the old one": "La nueva cantidad debe de ser menor que la anterior",
"The value should not be greater than 100%": "El valor no debe de ser mayor de 100%",
"The value should be a number": "El valor debe ser un numero",
"This order is not editable": "Esta orden no se puede modificar",
"You can't create an order for a frozen client": "No puedes crear una orden para un cliente congelado",
"You can't create an order for a client that has a debt": "No puedes crear una orden para un cliente con deuda",
"is not a valid date": "No es una fecha valida",
"Barcode must be unique": "El código de barras debe ser único",
"The warehouse can't be repeated": "El almacén no puede repetirse",
"The tag or priority can't be repeated for an item": "El tag o prioridad no puede repetirse para un item",
"The observation type can't be repeated": "El tipo de observación no puede repetirse",
"A claim with that sale already exists": "Ya existe una reclamación para esta línea",
"You don't have enough privileges to change that field": "No tienes permisos para cambiar ese campo",
"Warehouse cannot be blank": "El almacén no puede quedar en blanco",
"Agency cannot be blank": "La agencia no puede quedar en blanco",
"Not enough privileges to edit a client with verified data": "No tienes permisos para hacer cambios en un cliente con datos comprobados",
"This address doesn't exist": "Este consignatario no existe",
"You must delete the claim id %d first": "Antes debes borrar la reclamación %d",
"You don't have enough privileges": "No tienes suficientes permisos",
"Cannot check Equalization Tax in this NIF/CIF": "No se puede marcar RE en este NIF/CIF",
"You can't make changes on the basic data of an confirmed order or with rows": "No puedes cambiar los datos basicos de una orden con artículos",
"INVALID_USER_NAME": "El nombre de usuario solo debe contener letras minúsculas o, a partir del segundo carácter, números o subguiones, no esta permitido el uso de la letra ñ",
"You can't create a ticket for a frozen client": "No puedes crear un ticket para un cliente congelado",
"You can't create a ticket for a inactive client": "No puedes crear un ticket para un cliente inactivo",
"Tag value cannot be blank": "El valor del tag no puede quedar en blanco",
"ORDER_EMPTY": "Cesta vacía",
"You don't have enough privileges to do that": "No tienes permisos para cambiar esto",
"NO SE PUEDE DESACTIVAR EL CONSIGNAT": "NO SE PUEDE DESACTIVAR EL CONSIGNAT",
"Error. El NIF/CIF está repetido": "Error. El NIF/CIF está repetido",
"Street cannot be empty": "Dirección no puede estar en blanco",
"City cannot be empty": "Cuidad no puede estar en blanco",
"Code cannot be blank": "Código no puede estar en blanco",
"You cannot remove this department": "No puedes eliminar este departamento",
"The extension must be unique": "La extensión debe ser unica",
"The secret can't be blank": "La contraseña no puede estar en blanco",
"We weren't able to send this SMS": "No hemos podido enviar el SMS",
"This client can't be invoiced": "Este cliente no puede ser facturado",
"This ticket can't be invoiced": "Este ticket no puede ser facturado",
"You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado",
"This ticket can not be modified": "Este ticket no puede ser modificado",
"The introduced hour already exists": "Esta hora ya ha sido introducida",
"INFINITE_LOOP": "Existe una dependencia entre dos Jefes",
"The sales of the current ticket can't be modified": "Las lineas de este ticket no pueden ser modificadas",
"The sales of the receiver ticket can't be modified": "Las lineas del ticket al que envias no pueden ser modificadas",
"NO_AGENCY_AVAILABLE": "No hay una zona de reparto disponible con estos parámetros",
"ERROR_PAST_SHIPMENT": "No puedes seleccionar una fecha de envío en pasado",
"The current ticket can't be modified": "El ticket actual no puede ser modificado",
"The current claim can't be modified": "La reclamación actual no puede ser modificada",
"The sales of this ticket can't be modified": "Las lineas de este ticket no pueden ser modificadas",
"Sale(s) blocked, contact production": "Linea(s) bloqueada(s), contacte con produccion",
"Please select at least one sale": "Por favor selecciona al menos una linea",
"All sales must belong to the same ticket": "Todas las lineas deben pertenecer al mismo ticket",
"NO_ZONE_FOR_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
"This item doesn't exists": "El artículo no existe",
"NOT_ZONE_WITH_THIS_PARAMETERS": "Para este día no hay ninguna zona configurada",
"Extension format is invalid": "El formato de la extensión es inválido",
"Invalid parameters to create a new ticket": "Parámetros inválidos para crear un nuevo ticket",
"This item is not available": "Este artículo no está disponible",
"This postcode already exists": "Este código postal ya existe",
"Concept cannot be blank": "El concepto no puede quedar en blanco",
"File doesn't exists": "El archivo no existe",
"You don't have privileges to change the zone": "No tienes permisos para cambiar la zona o para esos parámetros hay más de una opción de envío, hable con las agencias",
"This ticket is already on weekly tickets": "Este ticket ya está en tickets programados",
"Ticket id cannot be blank": "El id de ticket no puede quedar en blanco",
"Weekday cannot be blank": "El día de la semana no puede quedar en blanco",
"You can't delete a confirmed order": "No puedes borrar un pedido confirmado",
"The social name has an invalid format": "El nombre fiscal tiene un formato incorrecto",
"Invalid quantity": "Cantidad invalida",
"This postal code is not valid": "This postal code is not valid",
"is invalid": "is invalid",
"The postcode doesn't exist. Please enter a correct one": "El código postal no existe. Por favor, introduce uno correcto",
"The department name can't be repeated": "El nombre del departamento no puede repetirse",
"This phone already exists": "Este teléfono ya existe",
"You cannot move a parent to its own sons": "No puedes mover un elemento padre a uno de sus hijos",
"You can't create a claim for a removed ticket": "No puedes crear una reclamación para un ticket eliminado",
"You cannot delete a ticket that part of it is being prepared": "No puedes eliminar un ticket en el que una parte que está siendo preparada",
"You must delete all the buy requests first": "Debes eliminar todas las peticiones de compra primero",
"You should specify a date": "Debes especificar una fecha",
"You should specify at least a start or end date": "Debes especificar al menos una fecha de inicio o de fín",
"Start date should be lower than end date": "La fecha de inicio debe ser menor que la fecha de fín",
"You should mark at least one week day": "Debes marcar al menos un día de la semana",
"Swift / BIC can't be empty": "Swift / BIC no puede estar vacío",
"Customs agent is required for a non UEE member": "El agente de aduanas es requerido para los clientes extracomunitarios",
"Incoterms is required for a non UEE member": "El incoterms es requerido para los clientes extracomunitarios",
"Deleted sales from ticket": "He eliminado las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{deletions}}}",
"Added sale to ticket": "He añadido la siguiente linea al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{addition}}}",
"Changed sale discount": "He cambiado el descuento de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Created claim": "He creado la reclamación [{{claimId}}]({{{claimUrl}}}) de las siguientes lineas del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Changed sale price": "He cambiado el precio de [{{itemId}} {{concept}}]({{{itemUrl}}}) ({{quantity}}) de {{oldPrice}}€ ➔ *{{newPrice}}€* del ticket [{{ticketId}}]({{{ticketUrl}}})",
"Changed sale quantity": "He cambiado la cantidad de [{{itemId}} {{concept}}]({{{itemUrl}}}) de {{oldQuantity}} ➔ *{{newQuantity}}* del ticket [{{ticketId}}]({{{ticketUrl}}})",
"State": "Estado",
"regular": "normal",
"reserved": "reservado",
"Changed sale reserved state": "He cambiado el estado reservado de las siguientes lineas al ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"Bought units from buy request": "Se ha comprado {{quantity}} unidades de [{{itemId}} {{concept}}]({{{urlItem}}}) para el ticket id [{{ticketId}}]({{{url}}})",
"Deny buy request": "Se ha rechazado la petición de compra para el ticket id [{{ticketId}}]({{{url}}}). Motivo: {{observation}}",
"MESSAGE_INSURANCE_CHANGE": "He cambiado el crédito asegurado del cliente [{{clientName}} ({{clientId}})]({{{url}}}) a *{{credit}} €*",
"Changed client paymethod": "He cambiado la forma de pago del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
"Sent units from ticket": "Envio *{{quantity}}* unidades de [{{concept}} ({{itemId}})]({{{itemUrl}}}) a *\"{{nickname}}\"* provenientes del ticket id [{{ticketId}}]({{{ticketUrl}}})",
"Claim will be picked": "Se recogerá el género de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}*",
"Claim state has changed to incomplete": "Se ha cambiado el estado de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}* a *incompleta*",
"Claim state has changed to canceled": "Se ha cambiado el estado de la reclamación [({{claimId}})]({{{claimUrl}}}) del cliente *{{clientName}}* a *anulado*",
"Client checked as validated despite of duplication": "Cliente comprobado a pesar de que existe el cliente id {{clientId}}",
"ORDER_ROW_UNAVAILABLE": "No hay disponibilidad de este producto",
"Distance must be lesser than 1000": "La distancia debe ser inferior a 1000",
"This ticket is deleted": "Este ticket está eliminado",
"Unable to clone this travel": "No ha sido posible clonar este travel",
"This thermograph id already exists": "La id del termógrafo ya existe",
"Choose a date range or days forward": "Selecciona un rango de fechas o días en adelante",
"ORDER_ALREADY_CONFIRMED": "ORDER_ALREADY_CONFIRMED",
"Invalid password": "Invalid password",
"Password does not meet requirements": "La contraseña no cumple los requisitos",
"Role already assigned": "Role already assigned",
"Invalid role name": "Invalid role name",
"Role name must be written in camelCase": "Role name must be written in camelCase",
"Email already exists": "Email already exists",
"User already exists": "User already exists",
"Absence change notification on the labour calendar": "Notificacion de cambio de ausencia en el calendario laboral",
"Created absence": "El empleado <strong>{{author}}</strong> ha añadido una ausencia de tipo '{{absenceType}}' a <a href='{{{workerUrl}}}'><strong>{{employee}}</strong></a> para el día {{dated}}.",
"Deleted absence": "El empleado <strong>{{author}}</strong> ha eliminado una ausencia de tipo '{{absenceType}}' a <a href='{{{workerUrl}}}'><strong>{{employee}}</strong></a> del día {{dated}}.",
"I have deleted the ticket id": "He eliminado el ticket id [{{id}}]({{{url}}})",
"I have restored the ticket id": "He restaurado el ticket id [{{id}}]({{{url}}})",
"You can only restore a ticket within the first hour after deletion": "Únicamente puedes restaurar el ticket dentro de la primera hora después de su eliminación",
"Changed this data from the ticket": "He cambiado estos datos del ticket [{{ticketId}}]({{{ticketUrl}}}): {{{changes}}}",
"agencyModeFk": "Agencia",
"clientFk": "Cliente",
"zoneFk": "Zona",
"warehouseFk": "Almacén",
"shipped": "F. envío",
"landed": "F. entrega",
"addressFk": "Consignatario",
"companyFk": "Empresa",
"The social name cannot be empty": "La razón social no puede quedar en blanco",
"The nif cannot be empty": "El NIF no puede quedar en blanco",
"You need to fill sage information before you check verified data": "Debes rellenar la información de sage antes de marcar datos comprobados",
"ASSIGN_ZONE_FIRST": "Asigna una zona primero",
"Amount cannot be zero": "El importe no puede ser cero",
"Company has to be official": "Empresa inválida",
"You can not select this payment method without a registered bankery account": "No se puede utilizar este método de pago si no has registrado una cuenta bancaria",
"Action not allowed on the test environment": "Esta acción no está permitida en el entorno de pruebas",
"The selected ticket is not suitable for this route": "El ticket seleccionado no es apto para esta ruta",
"Sorts whole route": "Reordena ruta entera",
"New ticket request has been created with price": "Se ha creado una nueva petición de compra '{{description}}' para el día *{{shipped}}*, con una cantidad de *{{quantity}}* y un precio de *{{price}} €*",
"New ticket request has been created": "Se ha creado una nueva petición de compra '{{description}}' para el día *{{shipped}}*, con una cantidad de *{{quantity}}*",
"Swift / BIC cannot be empty": "Swift / BIC no puede estar vacío",
"This BIC already exist.": "Este BIC ya existe.",
"That item doesn't exists": "Ese artículo no existe",
"There's a new urgent ticket:": "Hay un nuevo ticket urgente:",
"Invalid account": "Cuenta inválida",
"Compensation account is empty": "La cuenta para compensar está vacia",
"This genus already exist": "Este genus ya existe",
"This specie already exist": "Esta especie ya existe",
"Client assignment has changed": "He cambiado el comercial ~*\"<{{previousWorkerName}}>\"*~ por *\"<{{currentWorkerName}}>\"* del cliente [{{clientName}} ({{clientId}})]({{{url}}})",
"None": "Ninguno",
"The contract was not active during the selected date": "El contrato no estaba activo durante la fecha seleccionada",
"Cannot add more than one '1/2 day vacation'": "No puedes añadir más de un 'Vacaciones 1/2 dia'",
"This document already exists on this ticket": "Este documento ya existe en el ticket",
"Some of the selected tickets are not billable": "Algunos de los tickets seleccionados no son facturables",
"You can't invoice tickets from multiple clients": "No puedes facturar tickets de multiples clientes",
"nickname": "nickname",
"INACTIVE_PROVIDER": "Proveedor inactivo",
"This client is not invoiceable": "Este cliente no es facturable",
"serial non editable": "Esta serie no permite asignar la referencia",
"Max shipped required": "La fecha límite es requerida",
"Can't invoice to future": "No se puede facturar a futuro",
"Can't invoice to past": "No se puede facturar a pasado",
"This ticket is already invoiced": "Este ticket ya está facturado",
"A ticket with an amount of zero can't be invoiced": "No se puede facturar un ticket con importe cero",
"A ticket with a negative base can't be invoiced": "No se puede facturar un ticket con una base negativa",
"Global invoicing failed": "[Facturación global] No se han podido facturar algunos clientes",
"Wasn't able to invoice the following clients": "No se han podido facturar los siguientes clientes",
"Can't verify data unless the client has a business type": "No se puede verificar datos de un cliente que no tiene tipo de negocio",
"You don't have enough privileges to set this credit amount": "No tienes suficientes privilegios para establecer esta cantidad de crédito",
"You can't change the credit set to zero from a financialBoss": "No puedes cambiar el cŕedito establecido a cero por un jefe de finanzas",
"Amounts do not match": "Las cantidades no coinciden",
"The PDF document does not exists": "El documento PDF no existe. Prueba a regenerarlo desde la opción 'Regenerar PDF factura'",
"The type of business must be filled in basic data": "El tipo de negocio debe estar rellenado en datos básicos",
"You can't create a claim from a ticket delivered more than seven days ago": "No puedes crear una reclamación de un ticket entregado hace más de siete días",
"The worker has hours recorded that day": "El trabajador tiene horas fichadas ese día",
"The worker has a marked absence that day": "El trabajador tiene marcada una ausencia ese día",
"You can not modify is pay method checked": "No se puede modificar el campo método de pago validado",
"Can't transfer claimed sales": "No puedes transferir lineas reclamadas",
"You don't have privileges to create refund": "No tienes permisos para crear un abono",
"The item is required": "El artículo es requerido",
"The agency is already assigned to another autonomous": "La agencia ya está asignada a otro autónomo",
"date in the future": "Fecha en el futuro",
"reference duplicated": "Referencia duplicada",
"This ticket is already a refund": "Este ticket ya es un abono",
"isWithoutNegatives": "isWithoutNegatives",
"routeFk": "routeFk",
"Can't change the password of another worker": "No se puede cambiar la contraseña de otro trabajador",
"No hay un contrato en vigor": "No hay un contrato en vigor",
"No se permite fichar a futuro": "No se permite fichar a futuro",
"No está permitido trabajar": "No está permitido trabajar",
"Fichadas impares": "Fichadas impares",
"Descanso diario 12h.": "Descanso diario 12h.",
"Descanso semanal 36h. / 72h.": "Descanso semanal 36h. / 72h.",
"Dirección incorrecta": "Dirección incorrecta",
"Recover password": "Recuperar contraseña",
"Verify email": "Verificar correo",
"Click on the following link to verify this email. If you haven't requested this email, just ignore it": "Pulsa en el siguiente link para verificar este correo. Si no has pedido este correo, simplemente ignóralo.",
"Landing cannot be lesser than shipment": "Landing cannot be lesser than shipment",
"Modifiable user details only by an administrator": "Detalles de usuario modificables solo por un administrador",
"Modifiable password only via recovery or by an administrator": "Contraseña modificable solo a través de la recuperación o por un administrador",
"Not enough privileges to edit a client": "No tienes suficientes privilegios para editar un cliente",
"This route does not exists": "Esta ruta no existe",
"Claim pickup order sent": "Reclamación Orden de recogida enviada [({{claimId}})]({{{claimUrl}}}) al cliente *{{clientName}}*",
"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",
"Empty data source": "Origen de datos vacio",
"Email verify": "Correo de verificación"
}

View File

@ -91,7 +91,7 @@
url="Packagings"
show-field="id"
value-field="id"
where="{isBox: true}"
where="{freightItemFk: true}"
ng-model="buy.packageFk"
on-change="$ctrl.saveBuy(buy)">
</vn-autocomplete>

View File

@ -32,7 +32,7 @@ module.exports = Self => {
`SELECT
e.id,
e.ticketFk,
e.isBox,
e.freightItemFk,
e.workerFk,
i1.name packageItemName,
e.counter,
@ -51,7 +51,7 @@ module.exports = Self => {
FROM vn.expedition e
LEFT JOIN vn.expeditionStateType est ON est.id = e.stateTypeFk
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.item i3 ON i3.id = p.itemFk
LEFT JOIN account.user u ON u.id = e.workerFk

View File

@ -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"`];
};
};

View File

@ -16,7 +16,7 @@
"type": "number",
"description": "Identifier"
},
"isBox": {
"freightItemFk": {
"type": "number"
},
"created": {
@ -55,7 +55,7 @@
"freightItem": {
"type": "belongsTo",
"model": "Item",
"foreignKey": "isBox"
"foreignKey": "freightItemFk"
},
"packaging": {
"type": "belongsTo",

View File

@ -33,4 +33,5 @@ module.exports = function(Self) {
require('../methods/ticket/closeByTicket')(Self);
require('../methods/ticket/closeByAgency')(Self);
require('../methods/ticket/closeByRoute')(Self);
require('../methods/ticket/collectionLabel')(Self);
};

45130
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,9 @@
"del": "^2.2.2",
"eslint": "^7.11.0",
"eslint-config-google": "^0.11.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jasmine": "^2.10.1",
"eslint-plugin-prettier": "^4.2.1",
"fancy-log": "^1.3.2",
"file-loader": "^1.1.11",
"gulp": "^4.0.2",
@ -92,6 +94,7 @@
"node-sass": "^4.14.1",
"nodemon": "^2.0.16",
"plugin-error": "^1.0.1",
"prettier": "^2.7.1",
"raw-loader": "^1.0.0",
"regenerator-runtime": "^0.13.7",
"sass-loader": "^7.3.1",

View File

@ -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();

View File

@ -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>

View File

@ -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',
};

View File

@ -1,7 +1,7 @@
<header>
<div class="logo">
<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>
</div>
<div class="topbar"></div>

View File

@ -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();

View File

@ -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>

View File

@ -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()
},
};

View File

@ -32,7 +32,7 @@ class Email extends Component {
const rendered = await this.render();
const attachments = [];
const getAttachments = async(componentPath, files) => {
for (file of files) {
for (const file of files) {
const fileCopy = Object.assign({}, file);
const fileName = fileCopy.filename;
@ -54,15 +54,22 @@ class Email extends Component {
}
};
if (instance.components) {
const components = instance.components;
for (let componentName in components) {
const component = components[componentName];
const componentPath = `./components/${componentName}`;
await getAttachments(componentPath, component.attachments);
async function getSubcomponentAttachments(instance) {
if (instance.components) {
const components = instance.components;
for (let componentName in components) {
const component = components[componentName];
const componentPath = `./components/${componentName}`;
await getAttachments(componentPath, component.attachments);
if (component.components)
await getSubcomponentAttachments(component)
}
}
}
await getSubcomponentAttachments(instance)
if (this.attachments)
await getAttachments(this.path, this.attachments);

View File

@ -1,57 +1,17 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<head>
<meta name="viewport" content="width=device-width">
<meta name="format-detection" content="telephone=no">
<title v-html="$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-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>
<!-- Preview block -->
<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>
<!-- 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>
<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>

View File

@ -1,9 +1,7 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'balance-compensation',
async serverPrefetch() {
@ -15,8 +13,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -1,76 +1,37 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [dated])"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('buyer')}}</th>
<th class="number">{{$t('percentage')}}</th>
<th class="number">{{$t('dwindle')}}</th>
<th class="number">{{$t('total')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="waste in wastes" v-bind:key="waste.buyer">
<td class="font gray">{{waste.buyer}}</td>
<td class="number">{{(waste.percentage / 100) | percentage(2, 2, $i18n.locale)}}</td>
<td class="number">{{waste.dwindle | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{waste.total | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
</table>
<p v-html="$t('wasteDetailLink')"></p>
<div class="external-link vn-pa-sm vn-m-md">
<a href="https://salix.verdnatura.es/#!/item/waste/index" target="_blank">
https://salix.verdnatura.es/#!/item/waste/index
</a>
</div>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [dated])"></p>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('buyer')}}</th>
<th class="number">{{$t('percentage')}}</th>
<th class="number">{{$t('dwindle')}}</th>
<th class="number">{{$t('total')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="waste in wastes" v-bind:key="waste.buyer">
<td class="font gray">{{waste.buyer}}</td>
<td class="number">{{(waste.percentage / 100) | percentage(2, 2, $i18n.locale)}}</td>
<td class="number">{{waste.dwindle | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{waste.total | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
</table>
<p v-html="$t('wasteDetailLink')"></p>
<div class="external-link vn-pa-sm vn-m-md">
<a href="https://salix.verdnatura.es/#!/item/waste/index" target="_blank">
https://salix.verdnatura.es/#!/item/waste/index
</a>
</div>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'buyer-week-waste',
@ -23,8 +22,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build()
},
props: {}
};

View File

@ -1,46 +1,9 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'campaign-metrics',
@ -16,8 +15,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,47 +1,10 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title', [id]) }}</h1>
<p>{{ $t('description.dear') }},</p>
<p v-html="instructions"></p>
<p>{{ $t('description.conclusion') }}</p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title', [id]) }}</h1>
<p>{{ $t('description.dear') }},</p>
<p v-html="instructions"></p>
<p>{{ $t('description.conclusion') }}</p>
</div>
</div>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'claim-pickup-order',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
async serverPrefetch() {
this.ticket = await this.fetchTicket(this.id);

View File

@ -0,0 +1,6 @@
[
{
"filename": "client-debt-statement.pdf",
"component": "client-debt-statement"
}
]

View File

@ -1,55 +1,15 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- Preview block -->
<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>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</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>

View File

@ -1,13 +1,11 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'client-debt-statement',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -1,92 +1,56 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dearClient')}},</p>
<p v-html="$t('clientData')"></p>
<p>
<div>{{$t('clientId')}}: <strong>{{client.id}}</strong></div>
<div>{{$t('user')}}: <strong>{{client.userName}}</strong></div>
<div>{{$t('password')}}: <strong>********</strong>
(<a href="https://verdnatura.es">{{$t('passwordResetText')}}</a>)
</div>
</p>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dearClient')}},</p>
<p v-html="$t('clientData')"></p>
<h1>{{$t('sections.howToBuy.title')}}</h1>
<p>{{$t('sections.howToBuy.description')}}</p>
<ol>
<li v-for="requeriment in $t('sections.howToBuy.requeriments')">
<span v-html="requeriment"></span>
</li>
</ol>
<p>{{$t('sections.howToBuy.stock')}}</p>
<p>{{$t('sections.howToBuy.delivery')}}</p>
<h1>{{$t('sections.howToPay.title')}}</h1>
<p>{{$t('sections.howToPay.description')}}</p>
<ul>
<li v-for="option in $t('sections.howToPay.options')">
<span v-html="option"></span>
</li>
</ul>
<p>
<div>{{$t('clientId')}}: <strong>{{client.id}}</strong></div>
<div>{{$t('user')}}: <strong>{{client.userName}}</strong></div>
<div>{{$t('password')}}: <strong>********</strong>
(<a href="https://verdnatura.es">{{$t('passwordResetText')}}</a>)
</div>
</p>
<h1>{{$t('sections.toConsider.title')}}</h1>
<p>{{$t('sections.toConsider.description')}}</p>
<h1>{{$t('sections.howToBuy.title')}}</h1>
<p>{{$t('sections.howToBuy.description')}}</p>
<ol>
<li v-for="requeriment in $t('sections.howToBuy.requeriments')">
<span v-html="requeriment"></span>
</li>
</ol>
<p>{{$t('sections.howToBuy.stock')}}</p>
<p>{{$t('sections.howToBuy.delivery')}}</p>
<h4>{{$t('sections.claimsPolicy.title')}}</h4>
<p>{{$t('sections.claimsPolicy.description')}}</p>
<h1>{{$t('sections.howToPay.title')}}</h1>
<p>{{$t('sections.howToPay.description')}}</p>
<ul>
<li v-for="option in $t('sections.howToPay.options')">
<span v-html="option"></span>
</li>
</ul>
<p v-html="$t('help')"></p>
<p>
<section v-if="client.salesPersonName">
{{$t('salesPersonName')}}: <strong>{{client.salesPersonName}}</strong>
</section>
<section v-if="client.salesPersonPhone">
{{$t('salesPersonPhone')}}: <strong>{{client.salesPersonPhone}}</strong>
</section>
<section v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
</section>
</p>
</div>
</div>
<!-- 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>
<h1>{{$t('sections.toConsider.title')}}</h1>
<p>{{$t('sections.toConsider.description')}}</p>
<h4>{{$t('sections.claimsPolicy.title')}}</h4>
<p>{{$t('sections.claimsPolicy.description')}}</p>
<p v-html="$t('help')"></p>
<p>
<section v-if="client.salesPersonName">
{{$t('salesPersonName')}}: <strong>{{client.salesPersonName}}</strong>
</section>
<section v-if="client.salesPersonPhone">
{{$t('salesPersonPhone')}}: <strong>{{client.salesPersonPhone}}</strong>
</section>
<section v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto: ${client.salesPersonEmail}`"
target="_blank">{{client.salesPersonEmail}}</strong>
</section>
</p>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'client-welcome',
@ -13,8 +12,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,55 +1,15 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- Preview block -->
<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>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</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>

View File

@ -1,13 +1,11 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
name: 'credit-request',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
data() {

View File

@ -2,4 +2,8 @@
border: 2px dashed #8dba25;
border-radius: 3px;
text-align: center
}
a {
color: #8dba25
}

View File

@ -1,69 +1,24 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}}</p>
<p v-html="$t('description', [id])"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-px-ml">
<p>{{$t('copyLink')}}</p>
<div class="external-link vn-pa-sm vn-m-md">
https://www.verdnatura.es/#!form=ecomerce/ticket&ticket={{id}}
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}}</p>
<p v-html="$t('description', [id])"></p>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-px-ml">
<p>{{$t('copyLink')}}</p>
<div class="external-link vn-pa-sm vn-m-md">
https://www.verdnatura.es/#!form=ecomerce/ticket&ticket={{id}}
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'delivery-note-link',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,49 +1,12 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [id])"></p>
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [id])"></p>
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'delivery-note',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,45 +1,8 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.instructions')}}</p>
</div>
</div>
</email-body>

View File

@ -1,12 +1,10 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'driver-route',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,57 +1,17 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<p>{{$t('description.instructions')}}</p>
<p>{{$t('description.conclusion')}}</p>
</div>
</div>
<!-- Attachments block -->
<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>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<p>{{$t('description.instructions')}}</p>
<p>{{$t('description.conclusion')}}</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>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -17,8 +16,7 @@ module.exports = {
};
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,49 +1,12 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [invoice.ref, invoice.ticketFk])"></p>
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [invoice.ref, invoice.ticketFk])"></p>
<p v-html="$t('poll')"></p>
<p v-html="$t('help')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
</email-body>

View File

@ -1,7 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'invoice',
async serverPrefetch() {
@ -13,8 +11,7 @@ module.exports = {
},
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
reference: {

View File

@ -1,47 +1,10 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description')"></p>
<p v-html="$t('conclusion')"></p>
</div>
</div>
</email-body>

View File

@ -1,11 +1,8 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'invoiceIn',
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
}
};

View File

@ -1,88 +1,48 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p>{{ $t('sections.introduction.description') }}</p>
<p>{{ $t('sections.introduction.terms') }}</p>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p>{{ $t('sections.introduction.description') }}</p>
<p>{{ $t('sections.introduction.terms') }}</p>
<p>
{{ $t('sections.payMethod.description') }}:
<ol>
<li v-for="option in $t('sections.payMethod.options')">
{{ option }}
</li>
</ol>
</p>
<p>
{{ $t('sections.payMethod.description') }}:
<ol>
<li v-for="option in $t('sections.payMethod.options')">
{{ option }}
</li>
</ol>
</p>
<p>
{{ $t('sections.legalAction.description') }}:
<ol type="a">
<li v-for="option in $t('sections.legalAction.options')">
{{ option }}
</li>
</ol>
</p>
<p>
{{ $t('sections.legalAction.description') }}:
<ol type="a">
<li v-for="option in $t('sections.legalAction.options')">
{{ option }}
</li>
</ol>
</p>
<p v-html="$t('contactPhone')"></p>
<p v-html="$t('conclusion')"></p>
<p v-html="$t('contactPhone')"></p>
<p v-html="$t('conclusion')"></p>
<p>
<div class="row">
<div class="text">{{debtor.bankName}}</div>
<div class="control">{{debtor.iban}}</div>
<div class="description">
<div class="line"><span>{{$t('transferAccount') }}</span></div>
</div>
</div>
</p>
</div>
</div>
<!-- Block -->
<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>
<!-- 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>
<p>
<div class="row">
<div class="text">{{debtor.bankName}}</div>
<div class="control">{{debtor.iban}}</div>
<div class="description">
<div class="line"><span>{{$t('transferAccount') }}</span></div>
</div>
</div>
</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>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -28,8 +27,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,71 +1,31 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p>{{ $t('sections.introduction.description') }}</p>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p>{{ $t('sections.introduction.description') }}</p>
<p>{{ $t('checkExtract') }}</p>
<p>{{ $t('checkValidData') }}</p>
<p>{{ $t('payMethod') }}</p>
<p>{{ $t('conclusion') }}</p>
<p>{{ $t('checkExtract') }}</p>
<p>{{ $t('checkValidData') }}</p>
<p>{{ $t('payMethod') }}</p>
<p>{{ $t('conclusion') }}</p>
<p>
<div class="row">
<div class="text">{{debtor.bankName}}</div>
<div class="control">{{debtor.iban}}</div>
<div class="description">
<div class="line"><span>{{$t('transferAccount') }}</span></div>
</div>
</div>
</p>
</div>
</div>
<!-- Block -->
<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>
<!-- 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>
<p>
<div class="row">
<div class="text">{{debtor.bankName}}</div>
<div class="control">{{debtor.iban}}</div>
<div class="description">
<div class="line"><span>{{$t('transferAccount') }}</span></div>
</div>
</div>
</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>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
module.exports = {
@ -28,8 +27,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,99 +1,59 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [started, ended])"></p>
<p v-html="$t('totalResolved', [resolvedTickets])"></p>
<p v-html="$t('grafanaLink')"></p>
<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">
https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}}
</a>
</div>
<p v-html="$t('redmineLink')"></p>
<div class="external-link vn-pa-sm vn-m-md">
<a href="https://redmine.verdnatura.es/projects/desarrollo/issues?query_id=112" target="_blank">
https://redmine.verdnatura.es/projects/desarrollo/issues?query_id=112
</a>
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml" v-for="technician in technicians">
<div class="table-title clearfix">
<h2>{{technician.name}} (<strong>{{technician.tickets.length}}</strong>)</h2>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('author')}}</th>
<th width="15%">{{$t('dated')}}</th>
<th width="25%">{{$t('ticketSubject')}}</th>
<th width="30%">{{$t('ticketDescription')}}</th>
<th width="20%">{{$t('resolution')}}</th>
</tr>
</thead>
<tbody v-for="ticket in technician.tickets">
<tr>
<td>{{ticket.author}}</td>
<td class="font light-gray">
<div v-bind:title="$t('opened')">
&#128275; {{ticket.created | date('%d-%m-%Y %H:%M')}}
</div>
<div v-bind:title="$t('closed')">
&#128274; {{ticket.closed | date('%d-%m-%Y %H:%M')}}
</div>
</td>
<td>
<a v-bind:href="'https://cau.verdnatura.es/scp/tickets.php?id=' + ticket.ticket_id">
{{ticket.number}} - {{ticket.subject}}
</a>
</td>
<td class="message" v-html="ticket.description"></td>
<td class="message" v-html="ticket.resolution"></td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [started, ended])"></p>
<p v-html="$t('totalResolved', [resolvedTickets])"></p>
<p v-html="$t('grafanaLink')"></p>
<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"
>
https://grafana.verdnatura.es/d/2kaHDi9Mk/osticket?orgId=1&from={{startedTime}}&to={{endedTime}}
</a>
</div>
<p v-html="$t('redmineLink')"></p>
<div class="external-link vn-pa-sm vn-m-md">
<a href="https://redmine.verdnatura.es/projects/desarrollo/issues?query_id=112" target="_blank">
https://redmine.verdnatura.es/projects/desarrollo/issues?query_id=112
</a>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml" v-for="technician in technicians">
<div class="table-title clearfix">
<h2>{{technician.name}} (<strong>{{technician.tickets.length}}</strong>)</h2>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('author')}}</th>
<th width="15%">{{$t('dated')}}</th>
<th width="25%">{{$t('ticketSubject')}}</th>
<th width="30%">{{$t('ticketDescription')}}</th>
<th width="20%">{{$t('resolution')}}</th>
</tr>
</thead>
<tbody v-for="ticket in technician.tickets">
<tr>
<td>{{ticket.author}}</td>
<td class="font light-gray">
<div v-bind:title="$t('opened')">&#128275; {{ticket.created | date('%d-%m-%Y %H:%M')}}</div>
<div v-bind:title="$t('closed')">&#128274; {{ticket.closed | date('%d-%m-%Y %H:%M')}}</div>
</td>
<td>
<a v-bind:href="'https://cau.verdnatura.es/scp/tickets.php?id=' + ticket.ticket_id">
{{ticket.number}} - {{ticket.subject}}
</a>
</td>
<td class="message" v-html="ticket.description"></td>
<td class="message" v-html="ticket.resolution"></td>
</tr>
</tbody>
</table>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'osticket-report',
@ -61,8 +60,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {}
};

View File

@ -1,66 +1,28 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p v-html="`${$t('sections.introduction.description')}:`"></p>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{ $t('sections.introduction.title') }},</p>
<p v-html="`${$t('sections.introduction.description')}:`"></p>
<p>
<section>
<span>{{ $t('sections.pay.method') }}:</span>
<strong>{{payMethod.name}}</strong>
</section>
<section v-if="payMethod.code != 'card'">
<span>{{ $t('sections.pay.day') }}:</span>
<strong>{{ $t('sections.pay.dueDay', [payMethod.dueDay]) }}</strong>
</section>
</p>
<p>
<section>
<span>{{ $t('sections.pay.method') }}:</span>
<strong>{{payMethod.name}}</strong>
</section>
<section v-if="payMethod.code != 'card'">
<span>{{ $t('sections.pay.day') }}:</span>
<strong>{{ $t('sections.pay.dueDay', [payMethod.dueDay]) }}</strong>
</section>
</p>
<p v-if="payMethod.code == 'bankDraft'"
v-html="$t('sections.pay.accountImplicates', [accountAddress])">
</p>
<p v-else-if="payMethod.code == 'card'">
{{ $t('sections.pay.cardImplicates') }}
</p>
<p v-if="payMethod.code == 'bankDraft'" v-html="$t('sections.pay.accountImplicates', [accountAddress])">
</p>
<p v-else-if="payMethod.code == 'card'">
{{ $t('sections.pay.cardImplicates') }}
</p>
<p>{{ $t('notifyAnError') }}</p>
</div>
</div>
<!-- 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>
<p>{{ $t('notifyAnError') }}</p>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'payment-update',
@ -21,8 +20,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build(),
},
props: {
id: {

View File

@ -1,90 +1,49 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<p>{{$t('description.instructions')}}</p>
<p v-html="$t('description.followGuide')"></p>
<p v-html="$t('description.downloadFrom')"></p>
<p v-html="$t('description.downloadDriver')"></p>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<p>{{$t('description.instructions')}}</p>
<p v-html="$t('description.followGuide')"></p>
<p v-html="$t('description.downloadFrom')"></p>
<p v-html="$t('description.downloadDriver')"></p>
<h1>{{$t('sections.QLabel.title')}}</h1>
<p>{{$t('sections.QLabel.description')}}:</p>
<ol>
<li v-for="step in $t('sections.QLabel.steps')">
<span v-html="step"></span>
</li>
</ol>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{$t('sections.help.title')}}</h1>
<p>{{$t('sections.help.description')}}</p>
<p v-html="$t('sections.help.remoteSupport')"></p>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<div v-if="client.salesPersonName">
{{$t('salesPersonName')}}: <strong>{{client.salesPersonName}}</strong>
</div>
<div v-if="client.salesPersonPhone">
{{$t('salesPersonPhone')}}: <strong>{{client.salesPersonPhone}}</strong>
</div>
<div v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`" target="_blank">{{client.salesPersonEmail}}</strong>
</div>
</div>
</div>
<!-- Block -->
<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>
<!-- 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>
<h1>{{$t('sections.QLabel.title')}}</h1>
<p>{{$t('sections.QLabel.description')}}:</p>
<ol>
<li v-for="step in $t('sections.QLabel.steps')">
<span v-html="step"></span>
</li>
</ol>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{$t('sections.help.title')}}</h1>
<p>{{$t('sections.help.description')}}</p>
<p v-html="$t('sections.help.remoteSupport')"></p>
</div>
</div>
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<div v-if="client.salesPersonName">
{{$t('salesPersonName')}}: <strong>{{client.salesPersonName}}</strong>
</div>
<div v-if="client.salesPersonPhone">
{{$t('salesPersonPhone')}}: <strong>{{client.salesPersonPhone}}</strong>
</div>
<div v-if="client.salesPersonEmail">
{{$t('salesPersonEmail')}}:
<strong><a v-bind:href="`mailto:${client.salesPersonEmail}`"
target="_blank">{{client.salesPersonEmail}}</strong>
</div>
</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>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
const attachment = new Component('attachment');
const attachments = require('./attachments.json');
@ -18,8 +17,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'email-body': emailBody.build(),
'attachment': attachment.build()
},
props: {

View File

@ -1,57 +1,21 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<div v-html="$t('description.instructions')"></div>
<p>{{$t('description.conclusion')}}</p>
</div>
</div>
<!-- Attachments block -->
<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>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('description.dear')}},</p>
<div v-html="$t('description.instructions')"></div>
<p>{{$t('description.conclusion')}}</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>

View File

@ -1,7 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const attachment = new Component('attachment');
const emailBody = new Component('email-body');
const attachments = require('./attachments.json');
module.exports = {
@ -10,9 +8,7 @@ module.exports = {
return {attachments};
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build(),
'attachment': attachment.build()
'email-body': emailBody.build()
},
props: {
id: {

View File

@ -1,46 +1,9 @@
<!DOCTYPE html>
<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-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
<!-- 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>
<email-body v-bind="$props">
<div class="grid-row">
<div class="grid-block vn-pa-ml">
<h1>{{ $t('title') }}</h1>
<p>{{$t('dear')}},</p>
<p v-html="$t('description', [minDate, maxDate])"></p>
</div>
</div>
</email-body>

View File

@ -1,6 +1,5 @@
const Component = require(`vn-print/core/component`);
const emailHeader = new Component('email-header');
const emailFooter = new Component('email-footer');
const emailBody = new Component('email-body');
module.exports = {
name: 'supplier-campaign-metrics',
@ -16,8 +15,7 @@ module.exports = {
}
},
components: {
'email-header': emailHeader.build(),
'email-footer': emailFooter.build()
'email-body': emailBody.build()
},
props: {
id: {

View File

@ -1,41 +1,31 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props">
</report-header>
<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('To client')}} {{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>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<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>

View File

@ -1,13 +1,12 @@
const Component = require(`vn-print/core/component`);
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
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]);
@ -15,16 +14,15 @@ module.exports = {
fetchCompany(id) {
return this.findOneFromDef('company', [id]);
},
currentDate() {
const current = new Date();
const date = `${current.getDate()}/${current.getMonth()+1}/${current.getFullYear()}`;
const date = `${current.getDate()}/${current.getMonth() + 1}/${current.getFullYear()}`;
return date;
}
}
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build()
},
props: {
id: {

View File

@ -1,95 +1,72 @@
<!DOCTYPE html>
<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-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<div class="size75">
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray">{{$t('Client')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray">{{$t('From')}}</td>
<th>{{from | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray">{{$t('To')}}</td>
<th>{{to | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
</div>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('Code')}}</th>
<th class="number">{{$t('Quantity')}}</th>
<th width="50%">{{$t('Concept')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales">
<tr>
<td>{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{Math.trunc(sale.subtotal)}}</td>
<td width="50%">{{sale.concept}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</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>
</tr>
</tbody>
</table>
</div>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<div class="size75">
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray">{{$t('Client')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray">{{$t('From')}}</td>
<th>{{from | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray">{{$t('To')}}</td>
<th>{{to | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>{{client.street}}</div>
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('Code')}}</th>
<th class="number">{{$t('Quantity')}}</th>
<th width="50%">{{$t('Concept')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales">
<tr>
<td>{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{Math.trunc(sale.subtotal)}}</td>
<td width="50%">{{sale.concept}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </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>
</tr>
</tbody>
</table>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props"
>
</report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -20,7 +20,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,94 +1,77 @@
<!DOCTYPE html>
<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-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('claimId')}}</td>
<th>{{id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('phone')}}</td>
<th>{{client.phone}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.nickname}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postalCode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
</div>
</div>
</div>
</div>
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
<th>{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th class="number">{{$t('claims')}}</th>
<th width="50%">{{$t('concept')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" v-bind:key="sale.id">
<tr>
<td class="font gray">{{sale.id}}</td>
<td class="number">{{sale.quantity}}</td>
<td class="number">{{sale.claimQuantity}}</td>
<td width="50%">{{sale.concept}}</td>
</tr>
</tbody>
</table>
<div class="panel sign">
<div class="header">{{$t('clientSignature')}}</div>
<div class="body centered">
<h3>{{client.name}}</h3>
</div>
</div>
</div>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('claimId')}}</td>
<th>{{id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('phone')}}</td>
<th>{{client.phone}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.nickname}}</h3>
<div>{{client.street}}</div>
<div>{{client.postalCode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('claim', [id])"
v-bind:center-text="client.name"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
<th>{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th class="number">{{$t('claims')}}</th>
<th width="50%">{{$t('concept')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" v-bind:key="sale.id">
<tr>
<td class="font gray">{{sale.id}}</td>
<td class="number">{{sale.quantity}}</td>
<td class="number">{{sale.claimQuantity}}</td>
<td width="50%">{{sale.concept}}</td>
</tr>
</tbody>
</table>
<div class="panel sign">
<div class="header">{{$t('clientSignature')}}</div>
<div class="body centered">
<h3>{{client.name}}</h3>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('claim', [id])"
v-bind:center-text="client.name"
v-bind="$props"
>
</report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -27,7 +27,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,95 +1,78 @@
<!DOCTYPE html>
<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-block">
<div class="columns">
<div class="size50">
<div class="size75">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.street}}
</div>
<div>
{{client.postcode}}, {{client.city}} ({{client.province}})
</div>
<div>
{{client.country}}
</div>
</div>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('date')}}</th>
<th>{{$t('concept')}}</th>
<th class="number">{{$t('invoiced')}}</th>
<th class="number">{{$t('payed')}}</th>
<th class="number">{{$t('balance')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" :key="sale.id">
<tr>
<td>{{sale.issued | date('%d-%m-%Y')}}</td>
<td>{{sale.ref}}</td>
<td class="number">{{sale.debtOut}}</td>
<td class="number">{{sale.debtIn}}</td>
<td class="number">{{getBalance(sale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td class="number">
<strong class="pull-left">Total</strong>
{{getTotalDebtOut() | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{getTotalDebtIn() | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{totalBalance | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="size75">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{dated}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('clientData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>{{client.street}}</div>
<div>{{client.postcode}}, {{client.city}} ({{client.province}})</div>
<div>{{client.country}}</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('date')}}</th>
<th>{{$t('concept')}}</th>
<th class="number">{{$t('invoiced')}}</th>
<th class="number">{{$t('payed')}}</th>
<th class="number">{{$t('balance')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" :key="sale.id">
<tr>
<td>{{sale.issued | date('%d-%m-%Y')}}</td>
<td>{{sale.ref}}</td>
<td class="number">{{sale.debtOut}}</td>
<td class="number">{{sale.debtIn}}</td>
<td class="number">{{getBalance(sale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td></td>
<td></td>
<td class="number">
<strong class="pull-left">Total</strong>
{{getTotalDebtOut() | currency('EUR', $i18n.locale)}}
</td>
<td class="number">{{getTotalDebtIn() | currency('EUR', $i18n.locale)}}</td>
<td class="number">{{totalBalance | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind:center-text="client.socialName"
v-bind="$props"
>
</report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -64,7 +64,7 @@ module.exports = {
},
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -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();

View File

@ -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;
}

View File

@ -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>

View File

@ -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);
},
}
};

View File

@ -0,0 +1 @@
reportName: labelCollection

View File

@ -0,0 +1,11 @@
{
"width": "10.4cm",
"height": "4.8cm",
"margin": {
"top": "0cm",
"right": "0.5cm",
"bottom": "0cm",
"left": "0cm"
},
"printBackground": true
}

View File

@ -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)), '') 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`;

View File

@ -0,0 +1,3 @@
SELECT ticketFk
FROM ticketCollection
WHERE collectionFk = ?

View File

@ -1,190 +1,164 @@
<!DOCTYPE html>
<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-block">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
</div>
</div>
<!-- Block -->
<table>
<tbody>
<tr>
<td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="info-panel">
<div class="green-background">
<h3>{{$t('fields.companyInfo')}}</h3>
<report-body v-bind="$props">
<div class="grid-row info-panel">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('fields.title')}}</h1>
</div>
</div>
<table>
<tbody>
<tr>
<td style="width: 70%; text-align: right; padding-right: 2em">{{$t('fields.date')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
<div class="grid-row">
<div class="grid-block">
<div class="info-panel">
<div class="green-background">
<h3>{{$t('fields.companyInfo')}}</h3>
</div>
<div class="body">
<table style="width: 100%">
<tbody>
<tr>
<td>{{$t('fields.companyName')}}:</td>
<th colspan="3">
<div class="field wide-rectangle">
<span></span>
</div>
<div class="body">
<table style="width: 100%">
<tbody>
<tr>
<td>{{$t('fields.companyName')}}:</td>
<th colspan="3">
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.businessType')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.antiquity')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.surface')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.numberOfEmployees')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.owner')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.payer')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</th>
</tr>
<tr>
<td>{{$t('fields.businessType')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.antiquity')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.surface')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.numberOfEmployees')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.owner')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr>
<td>{{$t('fields.payer')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block">
<div class="info-panel" style="width: 98%">
<div class="green-background">
<h3>{{$t('fields.economicInfo')}}</h3>
</div>
<div class="body">
<table>
<tbody>
<tr class="row-oriented">
<td>{{$t('fields.previousSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedPurchases')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="grid-row">
<div class="grid-block">
<div>
<table style="border-top: 1px solid #ddd" class="info-panel">
<tbody>
<tr class="row-oriented" style="width: 100%">
<td>{{$t('fields.personFilling')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="info-panel" style="width: 98%">
<div class="green-background">
<h3>{{$t('fields.economicInfo')}}</h3>
</div>
<div class="body">
<table>
<tbody>
<tr class="row-oriented">
<td>{{$t('fields.previousSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedSalesVolume')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
<tr class="row-oriented">
<td>{{$t('fields.forecastedPurchases')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div>
<table style="border-top: 1px solid #DDD" class="info-panel">
<tbody>
<tr class="row-oriented" style="width: 100%">
<td>{{$t('fields.personFilling')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
<td>{{$t('fields.phone')}}:</td>
<th>
<div class="field wide-rectangle">
<span></span>
</div>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer
id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</th>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props"> </report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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 rptCreditRequest = {
@ -12,7 +12,7 @@ const rptCreditRequest = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
}
};

View File

@ -1,304 +1,257 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="ticket.companyCode"> </report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t(deliverNoteType)}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t(deliverNoteType)}}</td>
<th>{{ticket.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{ticket.shipped | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('packages')}}</td>
<th>{{ticket.packages}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('deliveryAddress')}}</div>
<div class="body">
<h3 class="uppercase">{{address.nickname}}</h3>
<div>{{address.street}}</div>
<div>{{address.postalCode}}, {{address.city}} ({{address.province}})</div>
</div>
</div>
<body>
<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-block">
<div class="columns">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t(deliverNoteType)}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t(deliverNoteType)}}</td>
<th>{{ticket.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{ticket.shipped | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('packages')}}</td>
<th>{{ticket.packages}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('deliveryAddress')}}</div>
<div class="body">
<h3 class="uppercase">{{address.nickname}}</h3>
<div>
{{address.street}}
</div>
<div>
{{address.postalCode}}, {{address.city}} ({{address.province}})
</div>
</div>
</div>
<div class="panel">
<div class="header">{{$t('fiscalData')}}</div>
<div class="body">
<div>{{client.socialName}}</div>
<div>{{client.street}}</div>
<div>{{client.fi}}</div>
</div>
</div>
</div>
</div>
<div class="panel">
<div class="header">{{$t('fiscalData')}}</div>
<div class="body">
<div>
{{client.socialName}}
</div>
<div>
{{client.street}}
</div>
<div>
{{client.fi}}
</div>
</div>
<h2>{{$t('saleLines')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number" v-if="showPrices">{{$t('price')}}</th>
<th class="centered" width="5%" v-if="showPrices">{{$t('discount')}}</th>
<th class="centered" v-if="showPrices">{{$t('vat')}}</th>
<th class="number" v-if="showPrices">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" class="no-page-break">
<tr>
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number" v-if="showPrices">{{sale.price | currency('EUR', $i18n.locale)}}</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="number" v-if="showPrices">
{{sale.price * sale.quantity * (1 - sale.discount / 100) | currency('EUR', $i18n.locale)}}
</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </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>
</tr>
</tbody>
<tfoot v-if="showPrices">
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{getSubTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="columns vn-mb-ml">
<div class="size100 no-page-break" v-if="services.length > 0">
<h2>{{$t('services.title')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th width="5%"></th>
<th class="number">{{$t('services.theader.quantity')}}</th>
<th width="50%">{{$t('services.theader.concept')}}</th>
<th class="number">{{$t('services.theader.price')}}</th>
<th class="centered" width="5%"></th>
<th class="centered">{{$t('services.theader.vat')}}</th>
<th class="number">{{$t('services.theader.amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="service in services">
<td width="5%"></td>
<td class="number">{{service.quantity}}</td>
<td width="50%">{{service.description}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%"></td>
<td class="centered">{{service.taxDescription}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('services.tfoot.subtotal')}}</span>
</td>
<td class="number">{{serviceTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<span class="font gray">* {{ $t('services.warning') }}</span>
</div>
</div>
<div class="columns">
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
<h2>{{$t('packagings.title')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('packagings.theader.reference')}}</th>
<th class="number">{{$t('packagings.theader.quantity')}}</th>
<th wihth="75%">{{$t('packagings.theader.concept')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="packaging in packagings">
<td>{{packaging.itemFk | zerofill('000000')}}</td>
<td class="number">{{packaging.quantity}}</td>
<td width="85%">{{packaging.name}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="columns vn-mt-xl" v-if="showPrices">
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
<tr>
<th colspan="4">{{$t('taxes.title')}}</th>
</tr>
</thead>
<thead class="light">
<tr>
<th width="45%">{{$t('taxes.theader.type')}}</th>
<th width="25%" class="number">{{$t('taxes.theader.taxBase')}}</th>
<th>{{$t('taxes.theader.tax')}}</th>
<th class="number">{{$t('taxes.theader.fee')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">{{tax.Base | currency('EUR', $i18n.locale)}}</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.tax | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">{{getTotalBase() | currency('EUR', $i18n.locale)}}</td>
<td></td>
<td class="number">{{getTotalTax()| currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
<div class="flag">
<div class="columns">
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')" />
</div>
<div class="size75 flag-text"><strong>{{$t('plantPassport')}}</strong><br /></div>
</div>
</div>
<!-- Sales block -->
<h2>{{$t('saleLines')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number" v-if="showPrices">{{$t('price')}}</th>
<th class="centered" width="5%" v-if="showPrices">{{$t('discount')}}</th>
<th class="centered" v-if="showPrices">{{$t('vat')}}</th>
<th class="number" v-if="showPrices">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="sale in sales" class="no-page-break">
<tr>
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number" v-if="showPrices">{{sale.price | currency('EUR',
$i18n.locale)}}</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="number" v-if="showPrices">{{sale.price * sale.quantity * (1 -
sale.discount / 100) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</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>
</tr>
</tbody>
<tfoot v-if="showPrices">
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{getSubTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<!-- End of sales block -->
<div class="columns vn-mb-ml">
<!-- Services block-->
<div class="size100 no-page-break" v-if="services.length > 0">
<h2>{{$t('services.title')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th width="5%"></th>
<th class="number">{{$t('services.theader.quantity')}}</th>
<th width="50%">{{$t('services.theader.concept')}}</th>
<th class="number">{{$t('services.theader.price')}}</th>
<th class="centered" width="5%"></th>
<th class="centered">{{$t('services.theader.vat')}}</th>
<th class="number">{{$t('services.theader.amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="service in services">
<td width="5%"></td>
<td class="number">{{service.quantity}}</td>
<td width="50%">{{service.description}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
</td>
<td class="centered" width="5%"></td>
<td class="centered">{{service.taxDescription}}</td>
<td class="number">{{service.price | currency('EUR', $i18n.locale)}}
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('services.tfoot.subtotal')}}</span>
</td>
<td class="number">{{serviceTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<span class="font gray">* {{ $t('services.warning') }}</span>
<div class="phytosanitary-info">
<div>
<strong>A</strong>
<span>{{getBotanical()}}</span>
</div>
<!-- End of services block -->
</div>
<div class="columns">
<!-- Packages block -->
<div id="packagings" class="size100 no-page-break" v-if="packagings.length > 0">
<h2>{{$t('packagings.title')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('packagings.theader.reference')}}</th>
<th class="number">{{$t('packagings.theader.quantity')}}</th>
<th wihth="75%">{{$t('packagings.theader.concept')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="packaging in packagings">
<td>{{packaging.itemFk | zerofill('000000')}}</td>
<td class="number">{{packaging.quantity}}</td>
<td width="85%">{{packaging.name}}</td>
</tr>
</tbody>
</table>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<!-- End of packages block -->
</div>
<div class="columns vn-mt-xl" v-if="showPrices">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
<tr>
<th colspan="4">{{$t('taxes.title')}}</th>
</tr>
</thead>
<thead class="light">
<tr>
<th width="45%">{{$t('taxes.theader.type')}}</th>
<th width="25%" class="number">{{$t('taxes.theader.taxBase')}}</th>
<th>{{$t('taxes.theader.tax')}}</th>
<th class="number">{{$t('taxes.theader.fee')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">
{{tax.Base | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.tax | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{getTotalBase() | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{getTotalTax()| currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{getTotal() | currency('EUR',
$i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div>
<strong>C</strong>
<span>{{ticket.id}}</span>
</div>
<!-- End of taxes block -->
<!-- Phytosanitary block -->
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
<div class="flag">
<div class="columns">
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')" />
</div>
<div class="size75 flag-text">
<strong>{{$t('plantPassport')}}</strong><br />
</div>
</div>
</div>
<div class="phytosanitary-info">
<div>
<strong>A</strong>
<span>{{getBotanical()}}</span>
</div>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<div>
<strong>C</strong>
<span>{{ticket.id}}</span>
</div>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
</div>
<!-- End of phytosanitary block -->
</div>
<div class="columns">
<!-- Signature block -->
<div class="size50 pull-left no-page-break">
<div id="signature" class="panel" v-if="signature && signature.id">
<div class="header">{{$t('digitalSignature')}}</div>
<div class="body centered">
<img v-bind:src="dmsPath" />
<div>{{signature.created | date('%d-%m-%Y')}}</div>
</div>
</div>
</div>
<!-- End of signature block -->
</div>
<div class="columns vn-mb-ml" v-if="hasObservations">
<!-- Observations block-->
<div class="size100 no-page-break">
<h2>{{$t('observations')}}</h2>
<p class="observations">{{ticket.description}}</p>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter" v-bind:company-code="ticket.companyCode"
v-bind:left-text="footerType" v-bind:center-text="client.socialName" v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
<div class="columns">
<div class="size50 pull-left no-page-break">
<div id="signature" class="panel" v-if="signature && signature.id">
<div class="header">{{$t('digitalSignature')}}</div>
<div class="body centered">
<img v-bind:src="dmsPath" />
<div>{{signature.created | date('%d-%m-%Y')}}</div>
</div>
</div>
</div>
</div>
<div class="columns vn-mb-ml" v-if="hasObservations">
<div class="size100 no-page-break">
<h2>{{$t('observations')}}</h2>
<p class="observations">{{ticket.description}}</p>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:company-code="ticket.companyCode"
v-bind:left-text="footerType"
v-bind:center-text="client.socialName"
v-bind="$props"
>
</report-footer>
</template>
</report-body>

View File

@ -1,5 +1,6 @@
const config = require(`vn-print/core/config`);
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
const md5 = require('md5');
@ -58,7 +59,6 @@ module.exports = {
hasObservations() {
return this.ticket.description !== null;
}
},
methods: {
fetchClient(id) {
@ -126,6 +126,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,161 +1,141 @@
<!DOCTYPE html>
<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 route-block" v-for="route in routes">
<div class="grid-block">
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('route')}}</th>
<td>{{route.id}}</td>
<th class="font gray align-right">{{$t('driver')}}</th>
<td>{{route.userNickName}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('date')}}</th>
<td>{{route.created | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('vehicle')}}</th>
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('time')}}</th>
<td>{{route.time | date('%H:%M')}}</td>
<td></td>
<td>{{route.plateNumber}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('volume')}}</th>
<td>{{route.m3}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{route.agencyName}}</td>
</tr>
</tbody>
</table>
<div class="contained">
<table class="middle centered" width="70%">
<tbody>
<tr>
<td>
<p class="small">Hora inicio</p>
</td>
<td>
<p class="small">Hora fin</p>
</td>
<td class="gap"></td>
<td>
<p class="small">Km inicio</p>
</td>
<td>
<p class="small">Km fin</p>
</td>
</tr>
<tr>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
<td class="gap"></td>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Route ticket list -->
<div v-if="route.tickets" v-for="ticket in route.tickets" class="no-page-break">
<div>
<table class="column-oriented repeatable">
<thead>
<tr>
<th class="number">{{$t('order')}}</th>
<th class="number">{{$t('ticket')}}</th>
<th width="50%">{{$t('client')}}</th>
<th class="number">{{$t('address')}}</th>
<th class="number">{{$t('packages')}}</th>
<th>{{$t('packagingType')}}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="number">{{ticket.priority}}</td>
<td class="number">{{ticket.id}}</td>
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
<td v-if="ticket.addressFk" class="number">
{{ticket.addressFk.toString().substr(0,
ticket.addressFk.toString().length - 3)}}
<span class="black-container">
{{ticket.addressFk.toString().substr(-3, 3)}}
</span>
</td>
<td class="number">{{ticket.packages}}</td>
<td>{{ticket.itemPackingTypes}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('street')}}</th>
<td>{{ticket.street}}</td>
<th class="font gray align-right">{{$t('postcode')}}</th>
<td>{{ticket.postalCode}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('city')}}</th>
<td>{{ticket.city}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{ticket.ticketAgency}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('mobile')}}</th>
<td>{{ticket.mobile}}</td>
<th class="font gray align-right">{{$t('phone')}}</th>
<td>{{ticket.phone}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('warehouse')}}</th>
<td>{{ticket.warehouseName}}</td>
<th class="font gray align-right">{{$t('salesPerson')}}</th>
<td>{{ticket.salesPersonName}}</td>
</tr>
</tbody>
</table>
<div v-if="ticket.description" class="text-area">
<p>{{ticket.description}}</p>
</div>
</div>
</div>
<report-body v-bind="$props">
<div class="grid-row route-block" v-for="route in routes">
<div class="grid-block">
<h1 class="title uppercase">{{$t('route')}} {{route.id}}</h1>
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('route')}}</th>
<td>{{route.id}}</td>
<th class="font gray align-right">{{$t('driver')}}</th>
<td>{{route.userNickName}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('date')}}</th>
<td>{{route.created | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('vehicle')}}</th>
<td>{{route.vehicleTradeMark}} {{route.vehicleModel}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('time')}}</th>
<td>{{route.time | date('%H:%M')}}</td>
<td></td>
<td>{{route.plateNumber}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('volume')}}</th>
<td>{{route.m3}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{route.agencyName}}</td>
</tr>
</tbody>
</table>
<div class="contained">
<table class="middle centered" width="70%">
<tbody>
<tr>
<td>
<p class="small">Hora inicio</p>
</td>
<td>
<p class="small">Hora fin</p>
</td>
<td class="gap"></td>
<td>
<p class="small">Km inicio</p>
</td>
<td>
<p class="small">Km fin</p>
</td>
</tr>
<tr>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
<td class="gap"></td>
<td v-for="i in 2">
<div class="field rectangle">
<span></span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('routeId', [id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
<div v-if="route.tickets" v-for="ticket in route.tickets" class="no-page-break">
<div>
<table class="column-oriented repeatable">
<thead>
<tr>
<th class="number">{{$t('order')}}</th>
<th class="number">{{$t('ticket')}}</th>
<th width="50%">{{$t('client')}}</th>
<th class="number">{{$t('address')}}</th>
<th class="number">{{$t('packages')}}</th>
<th>{{$t('packagingType')}}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="number">{{ticket.priority}}</td>
<td class="number">{{ticket.id}}</td>
<td width="50%">{{ticket.clientFk}} {{ticket.addressName}}</td>
<td v-if="ticket.addressFk" class="number">
{{ticket.addressFk.toString().substr(0, ticket.addressFk.toString().length - 3)}}
<span class="black-container"> {{ticket.addressFk.toString().substr(-3, 3)}} </span>
</td>
<td class="number">{{ticket.packages}}</td>
<td>{{ticket.itemPackingTypes}}</td>
</tr>
</tbody>
</table>
</div>
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('street')}}</th>
<td>{{ticket.street}}</td>
<th class="font gray align-right">{{$t('postcode')}}</th>
<td>{{ticket.postalCode}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('city')}}</th>
<td>{{ticket.city}}</td>
<th class="font gray align-right">{{$t('agency')}}</th>
<td>{{ticket.ticketAgency}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('mobile')}}</th>
<td>{{ticket.mobile}}</td>
<th class="font gray align-right">{{$t('phone')}}</th>
<td>{{ticket.phone}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('warehouse')}}</th>
<td>{{ticket.warehouseName}}</td>
<th class="font gray align-right">{{$t('salesPerson')}}</th>
<td>{{ticket.salesPersonName}}</td>
</tr>
</tbody>
</table>
<div v-if="ticket.description" class="text-area">
<p>{{ticket.description}}</p>
</div>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('routeId', [id])" v-bind="$props"> </report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -39,7 +39,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,127 +1,102 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="entry.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="body">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('entryId')}}</td>
<th>{{entry.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{entry.landed | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('ref')}}</td>
<th>{{entry.ref}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.name}}</h3>
<div>
{{supplier.street}}
</div>
<div>
{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})
</div>
<div>
{{supplier.nif}}
</div>
</div>
</div>
</div>
</div>
<!-- Buy block -->
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
<th class="number">{{$t('boxes')}}</th>
<th class="number">{{$t('packing')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th width="10%" class="number">{{$t('quantity')}}</th>
<th width="15%" class="number">{{$t('price')}}</th>
<th width="15%" class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in buys">
<tr>
<td class="number">{{buy.box}}</td>
<td class="number">{{buy.packing}}</td>
<td width="50%">{{buy.itemName}}</td>
<td width="10%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="buy.value5">
<strong>{{buy.tag5}}</strong> {{buy.value5}}
</span>
<span v-if="buy.value6">
<strong>{{buy.tag6}}</strong> {{buy.value6}}
</span>
<span v-if="buy.value7">
<strong>{{buy.tag7}}</strong> {{buy.value7}}
</span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="font bold">
<span class="pull-right">{{$t('total')}}</span>
</td>
<td class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<!-- End of buy block -->
<div class="columns">
<div class="size50">
<div id="notes" class="panel no-page-break" v-if="entry.notes">
<div class="body">
<h3>{{$t('notes')}}</h3>
<div>
{{entry.notes}}
</div>
</div>
</div>
</div>
</div>
</div>
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="entry.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns">
<div class="size50">
<div class="body">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented report-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('entryId')}}</td>
<th>{{entry.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{entry.landed | date('%d-%m-%Y')}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('ref')}}</td>
<th>{{entry.ref}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('supplierData')}}</div>
<div class="body">
<h3 class="uppercase">{{supplier.name}}</h3>
<div>{{supplier.street}}</div>
<div>{{supplier.postCode}}, {{supplier.city}}, ({{supplier.province}})</div>
<div>{{supplier.nif}}</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('entry', [entry.id])"
v-bind:company-code="entry.companyCode"
v-bind:center-text="supplier.name"
v-bind:="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<table class="column-oriented vn-mt-ml">
<thead>
<tr>
<th class="number">{{$t('boxes')}}</th>
<th class="number">{{$t('packing')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th width="10%" class="number">{{$t('quantity')}}</th>
<th width="15%" class="number">{{$t('price')}}</th>
<th width="15%" class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="buy in buys">
<tr>
<td class="number">{{buy.box}}</td>
<td class="number">{{buy.packing}}</td>
<td width="50%">{{buy.itemName}}</td>
<td width="10%" class="number">{{buy.quantity | number($i18n.locale)}}</td>
<td width="15%" class="number">{{buy.buyingValue | currency('EUR', $i18n.locale)}}</td>
<td width="15%" class="number">
{{buy.buyingValue * buy.quantity | currency('EUR', $i18n.locale)}}
</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="buy.value5"> <strong>{{buy.tag5}}</strong> {{buy.value5}} </span>
<span v-if="buy.value6"> <strong>{{buy.tag6}}</strong> {{buy.value6}} </span>
<span v-if="buy.value7"> <strong>{{buy.tag7}}</strong> {{buy.value7}} </span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5" class="font bold">
<span class="pull-right">{{$t('total')}}</span>
</td>
<td class="number">{{getTotal() | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="columns">
<div class="size50">
<div id="notes" class="panel no-page-break" v-if="entry.notes">
<div class="body">
<h3>{{$t('notes')}}</h3>
<div>{{entry.notes}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:left-text="$t('entry', [entry.id])"
v-bind:company-code="entry.companyCode"
v-bind:center-text="supplier.name"
v-bind:="$props"
>
</report-footer>
</template>
</report-body>

View File

@ -1,4 +1,5 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
@ -35,6 +36,7 @@ module.exports = {
}
},
components: {
'report-body': reportBody.build(),
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
},

View File

@ -1,51 +1,35 @@
<!DOCTYPE html>
<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-block">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
<p>{{$t('toAttention')}}</p>
<p v-html="$t('declaration', [invoice.ref, issued])"></p>
<p>
<ul>
<li v-for="responsibility in $t('responsibilities')">
{{responsibility}}
</li>
</ul>
</p>
<div class="signature">
<p>{{$t('issued', [
'Algemesí',
invoice.issued.getDate(),
$t('months')[invoice.issued.getMonth()],
invoice.issued.getFullYear()])
}}
</p>
<p><em>({{$t('signature')}})</em></p>
<img v-bind:src="getReportSrc('signature.png')">
<p>
<div>{{$t('signer.name')}}: {{company.manager}}</div>
<div>{{$t('signer.ID')}}: {{company.managerFi}}</div>
<div>{{$t('signer.position')}}: {{$t('manager')}}</div>
</p>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('invoice', [invoice.ref])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<h1 class="title centered uppercase">{{$t('title')}}</h1>
<p>{{$t('toAttention')}}</p>
<p v-html="$t('declaration', [invoice.ref, issued])"></p>
<p>
<ul>
<li v-for="responsibility in $t('responsibilities')">
{{responsibility}}
</li>
</ul>
</p>
<div class="signature">
<p>{{$t('issued', [
'Algemesí',
invoice.issued.getDate(),
$t('months')[invoice.issued.getMonth()],
invoice.issued.getFullYear()])
}}
</p>
<p><em>({{$t('signature')}})</em></p>
<img v-bind:src="getReportSrc('signature.png')">
<p>
<div>{{$t('signer.name')}}: {{company.manager}}</div>
<div>{{$t('signer.ID')}}: {{company.managerFi}}</div>
<div>{{$t('signer.position')}}: {{$t('manager')}}</div>
</p>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('invoice', [invoice.ref])" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -25,7 +25,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,84 +1,67 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"></report-header>
<div class="grid-row">
<div class="grid-block">
<h1 class="title uppercase">{{$t('title')}}</h1>
</div>
</div>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<h1 class="title uppercase">{{$t('title')}}</h1>
</div>
</div>
<div class="grid-row vn-mb-lg" v-for="travel in travels">
<div class="grid-block">
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('reference')}}</th>
<td>{{travel.ref}}</td>
<th class="font gray align-right">{{$t('blockedKg')}}</th>
<td>{{travel.kg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('packages')}}</th>
<td>{{travel.stickers}}</td>
<th class="font gray align-right">{{$t('volumeKg')}}</th>
<td>{{travel.volumeKg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('shipped')}}</th>
<td>{{travel.shipped | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('physicalKg')}}</th>
<td>{{travel.loadedKg | number($i18n.locale)}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- Block -->
<div class="grid-row vn-mb-lg" v-for="travel in travels">
<div class="grid-block">
<div class="panel">
<div class="header">{{$t('information')}}</div>
<div class="body">
<div>
<table width="100%">
<tbody>
<tr>
<th class="font gray align-right">{{$t('reference')}}</th>
<td>{{travel.ref}}</td>
<th class="font gray align-right">{{$t('blockedKg')}}</th>
<td>{{travel.kg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('packages')}}</th>
<td>{{travel.stickers}}</td>
<th class="font gray align-right">{{$t('volumeKg')}}</th>
<td>{{travel.volumeKg | number($i18n.locale)}}</td>
</tr>
<tr>
<th class="font gray align-right">{{$t('shipped')}}</th>
<td>{{travel.shipped | date('%d-%m-%Y')}}</td>
<th class="font gray align-right">{{$t('physicalKg')}}</th>
<td>{{travel.loadedKg | number($i18n.locale)}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('supplier')}}</th>
<th>{{$t('reference')}}</th>
<th class="number">{{$t('volKg')}}</th>
<th class="number">{{$t('phyKg')}}</th>
<th class="number">{{$t('packages')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="entry in travel.entries">
<td>{{entry.supplierName}}</td>
<td>{{entry.ref}}</td>
<td class="number">{{entry.volumeKg | number($i18n.locale)}}</td>
<td class="number">{{entry.loadedKg | number($i18n.locale)}}</td>
<td class="number">{{entry.stickers}}</td>
</tr>
<tr v-if="!travel.entries">
<td colspan="5" class="centered">{{$t('noRows')}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="dated"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('supplier')}}</th>
<th>{{$t('reference')}}</th>
<th class="number">{{$t('volKg')}}</th>
<th class="number">{{$t('phyKg')}}</th>
<th class="number">{{$t('packages')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="entry in travel.entries">
<td>{{entry.supplierName}}</td>
<td>{{entry.ref}}</td>
<td class="number">{{entry.volumeKg | number($i18n.locale)}}</td>
<td class="number">{{entry.loadedKg | number($i18n.locale)}}</td>
<td class="number">{{entry.stickers}}</td>
</tr>
<tr v-if="!travel.entries">
<td colspan="5" class="centered">{{$t('noRows')}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="dated" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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 db = require(`vn-print/core/database`);
@ -100,7 +100,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: [

View File

@ -1,84 +1,61 @@
<!DOCTYPE html>
<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-block">
<p v-html="$t('description', {
socialName: client.socialName,
name: client.name,
address: client.street,
country: client.country,
fiscalID: client.fi
})"></p>
<p v-html="$t('declaration', {
socialName: client.socialName
})"></p>
<p
v-for="(declaration, $index) in $t('declarations')"
v-html="$t('declarations[' + $index + ']', {
companyName: company.name,
companyCity: company.city,
socialName: client.socialName,
destinationCountry: client.country
})">
</p>
<report-body v-bind="$props">
<div class="grid-row">
<div class="grid-block">
<p
v-html="$t('description', {
socialName: client.socialName,
name: client.name,
address: client.street,
country: client.country,
fiscalID: client.fi
})"
></p>
<p
v-html="$t('declaration', {
socialName: client.socialName
})"
></p>
<p
v-for="(declaration, $index) in $t('declarations')"
v-html="$t('declarations[' + $index + ']', {
companyName: company.name,
companyCity: company.city,
socialName: client.socialName,
destinationCountry: client.country
})"
></p>
<div class="columns">
<div class="size50 signature">
<p class="centered">{{client.name}}</p>
<div class="dummy-signature centered"></div>
<p>
<table>
<tbody>
<tr>
<td>{{$t('signer.representative')}}:</td>
<td></td>
</tr>
<tr>
<td>{{$t('signer.representativeRole')}}:</td>
<td></td>
</tr>
<tr>
<td>{{$t('signer.signed')}}:</td>
<td></td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="size50 signature centered">
<p>{{ company.name }}</p>
<img v-bind:src="getReportSrc('signature.png')">
<p>
<div>{{company.manager}}</div>
<div>{{$t('manager')}}</div>
<p>{{$t('issued', [
company.city,
issued.getDate(),
$t('months')[issued.getMonth()],
issued.getFullYear()])
}}
</p>
</p>
</div>
</div>
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:left-text="$t('client', [client.id])"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
<div class="columns">
<div class="size50 signature">
<p class="centered">{{client.name}}</p>
<div class="dummy-signature centered"></div>
<table>
<tbody>
<tr>
<td>{{$t('signer.representative')}}:</td>
<td></td>
</tr>
<tr>
<td>{{$t('signer.representativeRole')}}:</td>
<td></td>
</tr>
<tr>
<td>{{$t('signer.signed')}}:</td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class="size50 signature centered">
<p>{{ company.name }}</p>
<img v-bind:src="getReportSrc('signature.png')" />
<div>{{company.manager}}</div>
<div>{{$t('manager')}}</div>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer id="pageFooter" v-bind:left-text="$t('client', [client.id])" v-bind="$props"></report-footer>
</template>
</report-body>

View File

@ -1,5 +1,5 @@
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');
module.exports = {
@ -16,7 +16,7 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-body': reportBody.build(),
'report-footer': reportFooter.build()
},
props: {

View File

@ -1,123 +1,94 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid no-page-break page-break-after">
<tbody>
<tr>
<td>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
</div>
</div>
</div>
</div>
</div>
<div id="incoterms" class="panel">
<div class="header">{{$t('incotermsTitle')}}</div>
<div class="body">
<table class="row-oriented">
<tbody>
<tr>
<th>
{{$t('incoterms')}}
</th>
<td>{{incoterms.incotermsFk}} - {{incoterms.incotermsName}}</td>
</tr>
<tr>
<th>
{{$t('productDescription')}}
</th>
<td>{{incoterms.intrastat}}</td>
</tr>
<tr>
<th>{{$t('expeditionDescription')}}</th>
<td></td>
</tr>
<tr>
<th>{{$t('packageNumber')}}</th>
<td>{{incoterms.packages}}</td>
</tr>
<tr>
<th>{{$t('packageGrossWeight')}}</th>
<td>{{incoterms.weight}} KG</td>
</tr>
<tr>
<th>{{$t('packageCubing')}}</th>
<td>{{incoterms.volume}} m3</td>
</tr>
</tbody>
</table>
<p>
<div class="font bold">
<span>{{$t('customsInfo')}}</span>
<span>{{incoterms.customsAgentName}}</span>
</div>
<div class="font bold">
<span>(</span>
<span>{{incoterms.customsAgentNif}}</span>
<span>{{incoterms.customsAgentStreet}}</span>
<span v-if="incoterms.customsAgentPhone">
&#9742; {{incoterms.customsAgentPhone}}
</span>
<span v-if="incoterms.customsAgentEmail">
&#9993; {{incoterms.customsAgentEmail}}
</span>
<span>)</span>
</div>
</p>
<p>
<strong>{{$t('productDisclaimer')}}</strong>
</p>
</div>
</div>
</div>
<report-body v-bind="$props">
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>{{client.postalAddress}}</div>
<div>{{client.postcodeCity}}</div>
<div>{{$t('fiscalId')}}: {{client.fi}}</div>
</div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<div id="incoterms" class="panel">
<div class="header">{{$t('incotermsTitle')}}</div>
<div class="body">
<table class="row-oriented">
<tbody>
<tr>
<th>{{$t('incoterms')}}</th>
<td>{{incoterms.incotermsFk}} - {{incoterms.incotermsName}}</td>
</tr>
<tr>
<th>{{$t('productDescription')}}</th>
<td>{{incoterms.intrastat}}</td>
</tr>
<tr>
<th>{{$t('expeditionDescription')}}</th>
<td></td>
</tr>
<tr>
<th>{{$t('packageNumber')}}</th>
<td>{{incoterms.packages}}</td>
</tr>
<tr>
<th>{{$t('packageGrossWeight')}}</th>
<td>{{incoterms.weight}} KG</td>
</tr>
<tr>
<th>{{$t('packageCubing')}}</th>
<td>{{incoterms.volume}} m3</td>
</tr>
</tbody>
</table>
<div class="font bold">
<span>{{$t('customsInfo')}}</span>
<span>{{incoterms.customsAgentName}}</span>
</div>
<div class="font bold">
<span>(</span>
<span>{{incoterms.customsAgentNif}}</span>
<span>{{incoterms.customsAgentStreet}}</span>
<span v-if="incoterms.customsAgentPhone"> &#9742; {{incoterms.customsAgentPhone}} </span>
<span v-if="incoterms.customsAgentEmail"> &#9993; {{incoterms.customsAgentEmail}} </span>
<span>)</span>
</div>
<p>
<strong>{{$t('productDisclaimer')}}</strong>
</p>
</div>
</div>
</div>
</div>
<template v-slot:footer>&nbsp;</template>
</report-body>

View File

@ -1,6 +1,6 @@
const Component = require(`vn-print/core/component`);
const reportBody = new Component('report-body');
const reportHeader = new Component('report-header');
const reportFooter = new Component('report-footer');
module.exports = {
name: 'invoice-incoterms',
@ -27,8 +27,8 @@ module.exports = {
}
},
components: {
'report-header': reportHeader.build(),
'report-footer': reportFooter.build()
'report-body': reportBody.build(),
'report-header': reportHeader.build()
},
props: {
reference: {

View File

@ -1,319 +1,266 @@
<!DOCTYPE html>
<html v-bind:lang="$i18n.locale">
<body>
<table class="grid">
<tbody>
<tr>
<td>
<report-body v-bind="$props">
<invoice-incoterms v-if="hasIncoterms" v-bind="$props"> </invoice-incoterms>
<template v-slot:header>
<report-header v-bind="$props" v-bind:company-code="invoice.companyCode"></report-header>
</template>
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>{{client.postalAddress}}</div>
<div>{{client.postcodeCity}}</div>
<div>{{$t('fiscalId')}}: {{client.fi}}</div>
</div>
</div>
</div>
</div>
<div class="size100 no-page-break" v-if="rectified.length > 0">
<h2>{{$t('rectifiedInvoices')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('invoice')}}</th>
<th>{{$t('issued')}}</th>
<th class="number">{{$t('amount')}}</th>
<th width="50%">{{$t('description')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in rectified">
<td>{{row.ref}}</td>
<td>{{row.issued | date}}</td>
<td class="number">{{row.amount | currency('EUR', $i18n.locale)}}</td>
<td width="50%">{{row.description}}</td>
</tr>
</tbody>
</table>
</div>
<div class="vn-mt-lg" v-for="ticket in tickets">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('deliveryNote')}}</h2>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
<span>{{ticket.id}}</span>
</div>
</div>
<div class="pull-left">
<h2>{{$t('shipped')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{ticket.shipped | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<h2>{{ticket.nickname}}</h2>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number">{{$t('price')}}</th>
<th class="centered" width="5%">{{$t('discount')}}</th>
<th class="centered">{{$t('vat')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="sale in ticket.sales" class="no-page-break">
<tr>
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td>
<td class="number">{{saleImport(sale) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5"> <strong>{{sale.tag5}}</strong> {{sale.value5}} </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>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
</div>
<!-- Incoterms block -->
<invoice-incoterms
v-if="hasIncoterms"
v-bind="$props">
</invoice-incoterms>
<div class="columns vn-mt-xl">
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
<tr>
<th colspan="4">{{$t('taxBreakdown')}}</th>
</tr>
</thead>
<thead class="light">
<tr>
<th width="45%">{{$t('type')}}</th>
<th width="25%" class="number">{{$t('taxBase')}}</th>
<th>{{$t('tax')}}</th>
<th class="number">{{$t('fee')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">{{tax.base | currency('EUR', $i18n.locale)}}</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'base') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<!-- Header block -->
<report-header v-bind="$props"
v-bind:company-code="invoice.companyCode">
</report-header>
<!-- Block -->
<div class="grid-row">
<div class="grid-block">
<div class="columns vn-mb-lg">
<div class="size50">
<div class="size75 vn-mt-ml">
<h1 class="title uppercase">{{$t('title')}}</h1>
<table class="row-oriented ticket-info">
<tbody>
<tr>
<td class="font gray uppercase">{{$t('clientId')}}</td>
<th>{{client.id}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('invoice')}}</td>
<th>{{invoice.ref}}</th>
</tr>
<tr>
<td class="font gray uppercase">{{$t('date')}}</td>
<th>{{invoice.issued | date('%d-%m-%Y')}}</th>
</tr>
</tbody>
</table>
</div>
</div>
<div class="size50">
<div class="panel">
<div class="header">{{$t('invoiceData')}}</div>
<div class="body">
<h3 class="uppercase">{{client.socialName}}</h3>
<div>
{{client.postalAddress}}
</div>
<div>
{{client.postcodeCity}}
</div>
<div>
{{$t('fiscalId')}}: {{client.fi}}
</div>
</div>
</div>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
<div class="flag">
<div class="columns">
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')" />
</div>
<div class="size75 flag-text"><strong>{{$t('plantPassport')}}</strong><br /></div>
</div>
<!-- Rectified invoices block -->
<div class="size100 no-page-break" v-if="rectified.length > 0">
<h2>{{$t('rectifiedInvoices')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('invoice')}}</th>
<th>{{$t('issued')}}</th>
<th class="number">{{$t('amount')}}</th>
<th width="50%">{{$t('description')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in rectified">
<td>{{row.ref}}</td>
<td>{{row.issued | date}}</td>
<td class="number">{{row.amount | currency('EUR', $i18n.locale)}}</td>
<td width="50%">{{row.description}}</td>
</tr>
</tbody>
</table>
</div>
<div class="phytosanitary-info">
<div>
<strong>A</strong>
<span>{{botanical}}</span>
</div>
<!-- End of rectified invoices block -->
<!-- Sales block -->
<div class="vn-mt-lg" v-for="ticket in tickets">
<div class="table-title clearfix">
<div class="pull-left">
<h2>{{$t('deliveryNote')}}</strong>
</div>
<div class="pull-left vn-mr-md">
<div class="field rectangle">
<span>{{ticket.id}}</span>
</div>
</div>
<div class="pull-left">
<h2>{{$t('shipped')}}</h2>
</div>
<div class="pull-left">
<div class="field rectangle">
<span>{{ticket.shipped | date}}</span>
</div>
</div>
<span id="nickname" class="pull-right">
<h2>{{ticket.nickname}}</h2>
</span>
</div>
<table class="column-oriented">
<thead>
<tr>
<th width="5%">{{$t('reference')}}</th>
<th class="number">{{$t('quantity')}}</th>
<th width="50%">{{$t('concept')}}</th>
<th class="number">{{$t('price')}}</th>
<th class="centered" width="5%">{{$t('discount')}}</th>
<th class="centered">{{$t('vat')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody v-for="sale in ticket.sales" class="no-page-break">
<tr>
<td width="5%">{{sale.itemFk | zerofill('000000')}}</td>
<td class="number">{{sale.quantity}}</td>
<td width="50%">{{sale.concept}}</td>
<td class="number">{{sale.price | currency('EUR', $i18n.locale)}}</td>
<td class="centered" width="5%">{{(sale.discount / 100) | percentage}}</td>
<td class="centered">{{sale.vatType}}</td>
<td class="number">{{saleImport(sale) | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="description font light-gray">
<td colspan="7">
<span v-if="sale.value5">
<strong>{{sale.tag5}}</strong> {{sale.value5}}
</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>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="font bold">
<span class="pull-right">{{$t('subtotal')}}</span>
</td>
<td class="number">{{ticketSubtotal(ticket) | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<!-- End of sales block -->
<div class="columns vn-mt-xl">
<!-- Taxes block -->
<div id="taxes" class="size50 pull-right no-page-break" v-if="taxes">
<table class="column-oriented">
<thead>
<tr>
<th colspan="4">{{$t('taxBreakdown')}}</th>
</tr>
</thead>
<thead class="light">
<tr>
<th width="45%">{{$t('type')}}</th>
<th width="25%" class="number">
{{$t('taxBase')}}
</th>
<th>{{$t('tax')}}</th>
<th class="number">{{$t('fee')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="tax in taxes">
<td width="45%">{{tax.name}}</td>
<td width="25%" class="number">
{{tax.base | currency('EUR', $i18n.locale)}}
</td>
<td>{{tax.vatPercent | percentage}}</td>
<td class="number">{{tax.vat | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr class="font bold">
<td width="45%">{{$t('subtotal')}}</td>
<td width="20%" class="number">
{{sumTotal(taxes, 'base') | currency('EUR', $i18n.locale)}}
</td>
<td></td>
<td class="number">{{sumTotal(taxes, 'vat') | currency('EUR', $i18n.locale)}}</td>
</tr>
<tr class="font bold">
<td colspan="2">{{$t('total')}}</td>
<td colspan="2" class="number">{{taxTotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tfoot>
</table>
<div class="panel" v-if="invoice.footNotes">
<div class="header">{{$t('notes')}}</div>
<div class="body">
<span>{{invoice.footNotes}}</span>
</div>
</div>
</div>
<!-- End of taxes block -->
<!-- Phytosanitary block -->
<div id="phytosanitary" class="size50 pull-left no-page-break">
<div class="panel">
<div class="body">
<div class="flag">
<div class="columns">
<div class="size25">
<img v-bind:src="getReportSrc('europe.png')"/>
</div>
<div class="size75 flag-text">
<strong>{{$t('plantPassport')}}</strong><br/>
</div>
</div>
</div>
<div class="phytosanitary-info">
<div>
<strong>A</strong>
<span>{{botanical}}</span>
</div>
<div>
<strong>B</strong>
<span>ES17462130</span>
</div>
<div>
<strong>C</strong>
<span>{{ticketsId}}</span>
</div>
<div>
<strong>D</strong>
<span>ES</span>
</div>
</div>
</div>
</div>
</div>
<!-- End of phytosanitary block -->
<div>
<strong>C</strong>
<span>{{ticketsId}}</span>
</div>
<!-- Intrastat block -->
<div class="size100 no-page-break" v-if="intrastat.length > 0">
<h2>{{$t('intrastat')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('code')}}</th>
<th width="50%">{{$t('description')}}</th>
<th class="number">{{$t('stems')}}</th>
<th class="number">{{$t('netKg')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in intrastat">
<td>{{row.code}}</td>
<td width="50%">{{row.description || $t('services') }}</td>
<td class="number">{{row.stems | number($i18n.locale)}}</td>
<td class="number">{{row.netKg | number($i18n.locale)}}</td>
<td class="number">{{row.subtotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td class="number">
<strong>{{sumTotal(intrastat, 'stems') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'netKg') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'subtotal') | currency('EUR', $i18n.locale)}}</strong>
</td>
</tr>
</tfoot>
</table>
<div>
<strong>D</strong>
<span>ES</span>
</div>
<!-- End of intrastat block -->
<!-- Observations block -->
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
<div class="size50 pull-left no-page-break" >
<div class="panel" >
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('wireTransfer')}}</div>
<div>{{$t('accountNumber', [invoice.iban])}}</div>
</div>
</div>
</div>
</div>
<!-- End of observations block -->
</div>
</div>
<!-- Footer block -->
<report-footer id="pageFooter"
v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceRef', [invoice.ref])"
v-bind:center-text="client.socialName"
v-bind="$props">
</report-footer>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</div>
</div>
</div>
<div class="size100 no-page-break" v-if="intrastat.length > 0">
<h2>{{$t('intrastat')}}</h2>
<table class="column-oriented">
<thead>
<tr>
<th>{{$t('code')}}</th>
<th width="50%">{{$t('description')}}</th>
<th class="number">{{$t('stems')}}</th>
<th class="number">{{$t('netKg')}}</th>
<th class="number">{{$t('amount')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in intrastat">
<td>{{row.code}}</td>
<td width="50%">{{row.description || $t('services') }}</td>
<td class="number">{{row.stems | number($i18n.locale)}}</td>
<td class="number">{{row.netKg | number($i18n.locale)}}</td>
<td class="number">{{row.subtotal | currency('EUR', $i18n.locale)}}</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2"></td>
<td class="number">
<strong>{{sumTotal(intrastat, 'stems') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'netKg') | number($i18n.locale)}}</strong>
</td>
<td class="number">
<strong>{{sumTotal(intrastat, 'subtotal') | currency('EUR', $i18n.locale)}}</strong>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer'">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
<div class="body">
<div>{{$t('wireTransfer')}}</div>
<div>{{$t('accountNumber', [invoice.iban])}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<template v-slot:footer>
<report-footer
id="pageFooter"
v-bind:company-code="invoice.companyCode"
v-bind:left-text="$t('invoiceRef', [invoice.ref])"
v-bind:center-text="client.socialName"
v-bind="$props"
>
</report-footer>
</template>
</report-body>

Some files were not shown because too many files have changed in this diff Show More