Merge branch 'dev' of http://git.verdnatura.es/salix into dev
|
@ -188,7 +188,7 @@ export default {
|
|||
originSelect: `vn-autocomplete[field="$ctrl.item.originFk"] input`,
|
||||
originSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.originFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||
expenceSelect: `vn-autocomplete[field="$ctrl.item.expenceFk"] input`,
|
||||
expenceSelectOptionTwo: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||
expenceSelectOptionThree: `vn-autocomplete[field="$ctrl.item.expenceFk"] vn-drop-down ul > li:nth-child(3)`,
|
||||
longNameInput: `vn-horizontal:nth-child(5) > ${components.vnTextfield}`,
|
||||
submitBasicDataButton: `${components.vnSubmit}`
|
||||
},
|
||||
|
|
|
@ -57,7 +57,7 @@ describe('Item', () => {
|
|||
.waitToClick(selectors.itemBasicData.originSelect)
|
||||
.waitToClick(selectors.itemBasicData.originSelectOptionTwo)
|
||||
.waitToClick(selectors.itemBasicData.expenceSelect)
|
||||
.waitToClick(selectors.itemBasicData.expenceSelectOptionTwo)
|
||||
.waitToClick(selectors.itemBasicData.expenceSelectOptionThree)
|
||||
.clearInput(selectors.itemBasicData.longNameInput)
|
||||
.type(selectors.itemBasicData.longNameInput, 'RS Rose of Purity')
|
||||
.click(selectors.itemBasicData.submitBasicDataButton)
|
||||
|
|
|
@ -12,7 +12,7 @@ mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tar
|
|||
echo USE `cache`; >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql
|
||||
echo USE `hedera`; >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse tpvConfig >> install/dump/03-dumpedFixtures.sql
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -13,4 +13,4 @@ mysqldump --defaults-file=connect.ini --no-create-info bi tarifa_componentes tar
|
|||
echo "USE \`cache\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info cache cache >> install/dump/03-dumpedFixtures.sql
|
||||
echo "USE \`hedera\`;" >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse >> install/dump/03-dumpedFixtures.sql
|
||||
mysqldump --defaults-file=connect.ini --no-create-info hedera tpvError tpvResponse tpvConfig >> install/dump/03-dumpedFixtures.sql
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
ALTER TABLE `vn2008`.`cl_det`
|
||||
DROP FOREIGN KEY `cl_det_ibfk_6`;
|
||||
ALTER TABLE `vn2008`.`cl_det`
|
||||
DROP INDEX `cl_pet_id` ;
|
||||
|
||||
|
||||
|
||||
ALTER TABLE `vn2008`.`cl_det`
|
||||
DROP FOREIGN KEY `cl_det_ibfk_5`;
|
||||
ALTER TABLE `vn2008`.`cl_det`
|
||||
DROP INDEX `cl_que_id` ;
|
|
@ -1,7 +0,0 @@
|
|||
UPDATE `salix`.`ACL` SET `model`='ClaimEnd' WHERE `id`='96';
|
||||
UPDATE `salix`.`ACL` SET `model`='ClaimEnd' WHERE `id`='97';
|
||||
UPDATE `salix`.`ACL` SET `model`='ClaimBeginning', `accessType`='*' WHERE `id`='98';
|
||||
UPDATE `salix`.`ACL` SET `model`='ClaimDevelopment' WHERE `id`='99';
|
||||
UPDATE `salix`.`ACL` SET `model`='ClaimDevelopment' WHERE `id`='100';
|
||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (101, 'Claim', '*', '*', 'ALLOW', 'ROLE', 'employee');
|
||||
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES (102, 'Claim', 'createFromSales', '*', 'ALLOW', 'ROLE', 'employee');
|
|
@ -1,107 +0,0 @@
|
|||
USE `hedera`;
|
||||
DROP procedure IF EXISTS `orderAddItem`;
|
||||
|
||||
DELIMITER $$
|
||||
USE `hedera`$$
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `orderAddItem`(
|
||||
vOrder INT,
|
||||
vWarehouse INT,
|
||||
vItem INT,
|
||||
vAmount INT)
|
||||
BEGIN
|
||||
DECLARE vRow INT;
|
||||
DECLARE vAdd INT;
|
||||
DECLARE vAvailable INT;
|
||||
DECLARE vDone BOOL;
|
||||
DECLARE vGrouping INT;
|
||||
DECLARE vRate INT;
|
||||
DECLARE vShipment DATE;
|
||||
DECLARE vPrice DECIMAL(10,2);
|
||||
DECLARE vDate DATE;
|
||||
DECLARE vAddress INT;
|
||||
DECLARE vAgencyMode INT;
|
||||
DECLARE cur CURSOR FOR
|
||||
SELECT grouping, price, rate
|
||||
FROM tmp.bionic_price
|
||||
WHERE warehouse_id = vWarehouse
|
||||
AND item_id = vItem
|
||||
ORDER BY grouping DESC;
|
||||
|
||||
DECLARE CONTINUE HANDLER FOR NOT FOUND
|
||||
SET vDone = TRUE;
|
||||
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
BEGIN
|
||||
ROLLBACK;
|
||||
RESIGNAL;
|
||||
END;
|
||||
|
||||
SELECT date_send, address_id, agency_id
|
||||
INTO vDate, vAddress, vAgencyMode
|
||||
FROM `order`
|
||||
WHERE id = vOrder;
|
||||
|
||||
CALL vn2008.bionic_from_item(vDate, vAddress, vAgencyMode, vItem);
|
||||
|
||||
START TRANSACTION;
|
||||
|
||||
SELECT shipped INTO vShipment
|
||||
FROM tmp.travel_tree
|
||||
WHERE warehouseFk = vWarehouse;
|
||||
|
||||
SELECT available INTO vAvailable
|
||||
FROM tmp.bionic_lot
|
||||
WHERE warehouse_id = vWarehouse
|
||||
AND item_id = vItem;
|
||||
|
||||
IF vAmount > vAvailable
|
||||
THEN
|
||||
CALL util.throw ('ORDER_ROW_UNAVAILABLE');
|
||||
END IF;
|
||||
|
||||
OPEN cur;
|
||||
|
||||
l: LOOP
|
||||
SET vDone = FALSE;
|
||||
FETCH cur INTO vGrouping, vPrice, vRate;
|
||||
|
||||
IF vDone THEN
|
||||
LEAVE l;
|
||||
END IF;
|
||||
|
||||
SET vAdd = vAmount - MOD(vAmount, vGrouping);
|
||||
SET vAmount = vAmount - vAdd;
|
||||
|
||||
IF vAdd = 0 THEN
|
||||
ITERATE l;
|
||||
END IF;
|
||||
|
||||
INSERT INTO order_row SET
|
||||
order_id = vOrder,
|
||||
item_id = vItem,
|
||||
warehouse_id = vWarehouse,
|
||||
shipment = vShipment,
|
||||
rate = vRate,
|
||||
amount = vAdd,
|
||||
price = vPrice;
|
||||
|
||||
SET vRow = LAST_INSERT_ID();
|
||||
|
||||
INSERT INTO order_component (order_row_id, component_id, price)
|
||||
SELECT vRow, c.component_id, c.cost
|
||||
FROM tmp.bionic_component c
|
||||
JOIN bi.tarifa_componentes t
|
||||
ON t.Id_Componente = c.component_id
|
||||
AND (t.tarifa_class IS NULL OR t.tarifa_class = vRate)
|
||||
WHERE c.warehouse_id = vWarehouse
|
||||
AND c.item_id = vItem;
|
||||
END LOOP;
|
||||
|
||||
CLOSE cur;
|
||||
COMMIT;
|
||||
|
||||
CALL vn2008.bionic_free ();
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
USE `hedera`;
|
||||
DROP procedure IF EXISTS `basketAddItem`;
|
||||
|
||||
DELIMITER $$
|
||||
USE `hedera`$$
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `basketAddItem`(
|
||||
vWarehouse INT,
|
||||
vItem INT,
|
||||
vAmount INT)
|
||||
BEGIN
|
||||
DECLARE vOrder INT;
|
||||
|
||||
SET vOrder = myBasketGetId();
|
||||
|
||||
CALL orderAddItem(vOrder,vWarehouse, vItem, vAmount);
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
ALTER TABLE `vn2008`.`Agencias`
|
||||
ADD COLUMN `code` VARCHAR(45) NULL DEFAULT NULL AFTER `flag`;
|
|
@ -1,23 +0,0 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `agencyMode` AS
|
||||
SELECT
|
||||
`a`.`Id_Agencia` AS `id`,
|
||||
`a`.`Agencia` AS `name`,
|
||||
`a`.`description` AS `description`,
|
||||
`a`.`Vista` AS `deliveryMethodFk`,
|
||||
`a`.`m3` AS `m3`,
|
||||
`a`.`cod71` AS `cod71`,
|
||||
`a`.`web` AS `web`,
|
||||
`a`.`agency_id` AS `agencyFk`,
|
||||
`a`.`agency_service_id` AS `agencyServiceFk`,
|
||||
`a`.`inflacion` AS `inflation`,
|
||||
`a`.`is_volumetric` AS `isVolumetric`,
|
||||
`a`.`send_mail` AS `reportMail`,
|
||||
`a`.`tpv` AS `isActive`,
|
||||
`a`.`code` AS `code`
|
||||
FROM
|
||||
`vn2008`.`Agencias` `a`;
|
|
@ -1,81 +0,0 @@
|
|||
USE `vn`;
|
||||
DROP procedure IF EXISTS `ticketCalculateClon`;
|
||||
|
||||
DELIMITER $$
|
||||
USE `vn`$$
|
||||
CREATE DEFINER=`root`@`%` PROCEDURE `ticketCalculateClon`(IN vTicket BIGINT)
|
||||
BEGIN
|
||||
|
||||
/*
|
||||
*
|
||||
* Este procedimiento "rebioniza" una linea, eliminando los componentes existentes e insertandolos de nuevo
|
||||
*/
|
||||
DECLARE vShipped DATE;
|
||||
DECLARE vClient INT;
|
||||
DECLARE vWarehouse SMALLINT;
|
||||
DECLARE vAgencyMode INT;
|
||||
DECLARE vAddress INT;
|
||||
DECLARE vLanded DATE;
|
||||
DECLARE vAgency INT;
|
||||
|
||||
REPLACE orderTicket(orderFk,ticketFk) VALUES(48, vTicket);
|
||||
|
||||
SELECT t.clientFk , t.warehouseFk, date(t.shipped), t.addressFk, t.agencyModeFk, t.landed, a.agencyFk
|
||||
INTO vClient, vWarehouse, vShipped, vAddress, vAgencyMode, vLanded, vAgency
|
||||
FROM vn.agencyMode a
|
||||
JOIN vn.ticket t ON t.agencyModeFk = a.id
|
||||
WHERE t.id = vTicket;
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.agencyHourGetShipped;
|
||||
CREATE TEMPORARY TABLE tmp.agencyHourGetShipped ENGINE = MEMORY
|
||||
SELECT vWarehouse warehouseFk, vShipped shipped, vLanded landed;
|
||||
|
||||
CALL buyUltimate(vWarehouse, vShipped); -- rellena la tabla tmp.buyUltimate con la ultima compra
|
||||
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.ticketLot;
|
||||
CREATE TEMPORARY TABLE tmp.ticketLot
|
||||
SELECT vWarehouse warehouseFk,NULL available,s.itemFk, bu.buyFk
|
||||
FROM sale s
|
||||
LEFT JOIN tmp.buyUltimate bu ON bu.itemFk = s.itemFk
|
||||
WHERE s.ticketFk = vTicket GROUP BY s.itemFk;
|
||||
|
||||
CALL ticketComponentCalculate(vAddress,vAgencyMode);
|
||||
|
||||
-- Bionizamos lineas con Preu = 0
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
||||
CREATE TEMPORARY TABLE tmp.sale
|
||||
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
||||
SELECT s.id saleFk, vWarehouse warehouseFk
|
||||
FROM sale s
|
||||
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicket AND s.price = 0;
|
||||
|
||||
CALL ticketComponentUpdateSale(1);
|
||||
|
||||
-- Bionizamos lineas con Preu > 0
|
||||
DROP TEMPORARY TABLE IF EXISTS tmp.sale;
|
||||
CREATE TEMPORARY TABLE tmp.sale
|
||||
(PRIMARY KEY (saleFk)) ENGINE = MEMORY
|
||||
SELECT s.id saleFk, vWarehouse warehouseFk
|
||||
FROM sale s
|
||||
JOIN ticket t on t.id = s.ticketFk WHERE s.ticketFk = vTicket AND s.price > 0;
|
||||
|
||||
CALL ticketComponentUpdateSale(6);
|
||||
|
||||
IF vLanded IS NULL THEN
|
||||
CALL agencyHourGetLanded(vShipped, vAddress, vAgency,vWarehouse);
|
||||
|
||||
UPDATE ticket t
|
||||
JOIN tmp.agencyHourGetLanded ah ON t.warehouseFk = ah.warehouseFk
|
||||
SET t.landed = ah.landed
|
||||
WHERE t.id = vTicket;
|
||||
END IF;
|
||||
|
||||
-- Log
|
||||
CALL `logAdd`(vTicket, 'update', ' ticket' , 'Bioniza Ticket');
|
||||
|
||||
-- Limpieza
|
||||
DROP TEMPORARY TABLE tmp.buyUltimate;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `vn`.`orderTicket` AS
|
||||
SELECT
|
||||
`b`.`order_id` AS `orderFk`, `b`.`Id_Ticket` AS `ticketFk`
|
||||
FROM
|
||||
`vn2008`.`order_Tickets` `b`;
|
|
@ -1,25 +0,0 @@
|
|||
ALTER TABLE `vn`.`zoneGeo`
|
||||
RENAME TO `vn`.`zoneIncluded` ;
|
||||
|
||||
ALTER TABLE `vn`.`zoneNest`
|
||||
RENAME TO `vn`.`zoneGeo` ;
|
||||
|
||||
ALTER TABLE `vn`.`zone`
|
||||
CHANGE COLUMN `agencyFk` `agencyModeFk` INT(11) NOT NULL,
|
||||
CHANGE COLUMN `hour` `hour` DATETIME NOT NULL,
|
||||
CHANGE COLUMN `warehouseFk` `warehouseFk` SMALLINT(6) UNSIGNED NOT NULL ;
|
||||
|
||||
ALTER TABLE `vn`.`zone`
|
||||
ADD INDEX `fk_zone_1_idx` (`warehouseFk` ASC),
|
||||
ADD INDEX `fk_zone_2_idx` (`agencyModeFk` ASC);
|
||||
ALTER TABLE `vn`.`zone`
|
||||
ADD CONSTRAINT `fk_zone_1`
|
||||
FOREIGN KEY (`warehouseFk`)
|
||||
REFERENCES `vn2008`.`warehouse` (`id`)
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE CASCADE,
|
||||
ADD CONSTRAINT `fk_zone_2`
|
||||
FOREIGN KEY (`agencyModeFk`)
|
||||
REFERENCES `vn2008`.`Agencias` (`Id_Agencia`)
|
||||
ON DELETE NO ACTION
|
||||
ON UPDATE NO ACTION;
|
|
@ -0,0 +1,40 @@
|
|||
DROP TRIGGER IF EXISTS `vn2008`.`CompresAfterInsert`;
|
||||
|
||||
DELIMITER $$
|
||||
USE `vn2008`$$
|
||||
CREATE DEFINER=`root`@`%` TRIGGER `CompresAfterInsert` AFTER INSERT ON `Compres` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE vWarehouse INT;
|
||||
DECLARE vWarehouseOut INT;
|
||||
DECLARE isMerchandise BOOLEAN;
|
||||
|
||||
CALL stock.queueAdd ('buy', NEW.Id_Compra, NULL);
|
||||
|
||||
SELECT warehouse_id, warehouse_id_out INTO vWarehouse, vWarehouseOut
|
||||
FROM Entradas E
|
||||
JOIN travel T ON T.id = E.travel_id
|
||||
WHERE E.Id_Entrada = NEW.Id_Entrada;
|
||||
|
||||
-- Actualiza el volumen unitario
|
||||
SELECT k.merchandise INTO isMerchandise
|
||||
FROM vn.itemCategory k
|
||||
JOIN vn.itemType it ON it.categoryFk = k.id
|
||||
JOIN vn.item i ON i.typeFk = it.id
|
||||
WHERE i.id = NEW.Id_Article;
|
||||
|
||||
If isMerchandise THEN
|
||||
|
||||
REPLACE bi.rotacion(Id_Article, warehouse_id, cm3)
|
||||
VALUES (NEW.Id_ARticle, vWarehouse, vn2008.cm3_unidad(NEW.Id_Compra));
|
||||
|
||||
END IF;
|
||||
|
||||
IF (SELECT fuente FROM warehouse where id = vWarehouseOut AND id <> 13) AND
|
||||
(SELECT has_notify_passport(NEW.Id_Article,NEW.Id_Compra))
|
||||
THEN
|
||||
CALL notify_passport(NEW.Id_Article, NEW.Etiquetas, NEW.Packing,NEW.Id_Compra);
|
||||
CALL insert_producer_plantpassport(NEW.Id_Compra);
|
||||
END IF;
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,38 @@
|
|||
DROP TRIGGER IF EXISTS `vn2008`.`CompresAfterUpdate`;
|
||||
|
||||
DELIMITER $$
|
||||
USE `vn2008`$$
|
||||
CREATE DEFINER=`root`@`%` TRIGGER `CompresAfterUpdate`
|
||||
AFTER UPDATE ON `Compres` FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE vWarehouse INT;
|
||||
DECLARE vWarehouseOut INT;
|
||||
DECLARE isMerchandise BOOLEAN;
|
||||
|
||||
CALL stock.queueAdd ('buy', NEW.Id_Compra, OLD.Id_Compra);
|
||||
|
||||
SELECT warehouse_id, warehouse_id_out INTO vWarehouse, vWarehouseOut
|
||||
FROM Entradas E
|
||||
JOIN travel T ON T.id = E.travel_id
|
||||
WHERE E.Id_Entrada = NEW.Id_Entrada;
|
||||
|
||||
SELECT k.merchandise INTO isMerchandise
|
||||
FROM vn.itemCategory k
|
||||
JOIN vn.itemType it ON it.categoryFk = k.id
|
||||
JOIN vn.item i ON i.typeFk = it.id
|
||||
WHERE i.id = NEW.Id_Article;
|
||||
|
||||
IF isMerchandise AND NOT(NEW.Id_Cubo <=> OLD.Id_Cubo AND NEW.Id_Entrada <=> OLD.Id_Entrada)
|
||||
THEN
|
||||
REPLACE bi.rotacion(Id_Article, warehouse_id, cm3)
|
||||
VALUES (NEW.Id_ARticle, vWarehouse, vn2008.cm3_unidad(NEW.Id_Compra));
|
||||
END IF;
|
||||
|
||||
IF (SELECT fuente FROM warehouse where id = vWarehouseOut AND id <> 13) AND
|
||||
(SELECT has_notify_passport(NEW.Id_Article,NEW.Id_Compra)) > 0
|
||||
THEN
|
||||
CALL notify_passport(NEW.Id_Article, NEW.Etiquetas, NEW.Packing,NEW.Id_Compra);
|
||||
CALL insert_producer_plantpassport(NEW.Id_Compra);
|
||||
END IF;
|
||||
END$$
|
||||
DELIMITER ;
|
|
@ -0,0 +1,15 @@
|
|||
USE `vn`;
|
||||
CREATE
|
||||
OR REPLACE ALGORITHM = UNDEFINED
|
||||
DEFINER = `root`@`%`
|
||||
SQL SECURITY DEFINER
|
||||
VIEW `itemCategory` AS
|
||||
SELECT
|
||||
`r`.`id` AS `id`,
|
||||
`r`.`reino` AS `name`,
|
||||
`r`.`display` AS `display`,
|
||||
`r`.`color` AS `color`,
|
||||
`r`.`icon` AS `icon`,
|
||||
`r`.`mercancia` AS `merchandise`
|
||||
FROM
|
||||
`vn2008`.`reinos` `r`;
|
|
@ -68,19 +68,19 @@ INSERT INTO `vn`.`accountingType`(`id`, `description`)
|
|||
|
||||
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`)
|
||||
VALUES
|
||||
(8, 'Pay on receipt', '0000000000', 4, 0, 1);
|
||||
(1, 'Pay on receipt', '0000000000', 4, 0, 1);
|
||||
|
||||
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `isVolumetric`, `bankFk`, `warehouseAliasFk`)
|
||||
VALUES
|
||||
(1, 'inhouse pickup' , 1, 0, 8, 1),
|
||||
(2, 'Super-Man delivery' , 1, 0, 8, 1),
|
||||
(3, 'Teleportation device' , 1, 0, 8, 1),
|
||||
(4, 'Entanglement' , 1, 0, 8, 1),
|
||||
(5, 'Quantum break device' , 1, 0, 8, 1),
|
||||
(6, 'Walking' , 1, 0, 8, 1),
|
||||
(7, 'Silla247' , 1, 0, 8, 1),
|
||||
(8, 'Silla247Expensive' , 1, 0, 8, 1),
|
||||
(9, 'Abono' , 1, 0, 8, 1);
|
||||
(1, 'inhouse pickup' , 1, 0, 1, 1),
|
||||
(2, 'Super-Man delivery' , 1, 0, 1, 1),
|
||||
(3, 'Teleportation device' , 1, 0, 1, 1),
|
||||
(4, 'Entanglement' , 1, 0, 1, 1),
|
||||
(5, 'Quantum break device' , 1, 0, 1, 1),
|
||||
(6, 'Walking' , 1, 0, 1, 1),
|
||||
(7, 'Silla247' , 1, 0, 1, 1),
|
||||
(8, 'Silla247Expensive' , 1, 0, 1, 1),
|
||||
(9, 'Abono' , 1, 0, 1, 1);
|
||||
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 1 WHERE `name` = 'inhouse pickup';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 2 WHERE `name` = 'Super-Man delivery';
|
||||
|
@ -333,11 +333,11 @@ INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
|||
|
||||
INSERT INTO `vn`.`invoiceOut`(`id`, `ref`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `pdf`)
|
||||
VALUES
|
||||
( 1, 'T1111111' , 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 8, 1),
|
||||
( 2, 'V2222222' , 'V', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 8, 1),
|
||||
( 3, 'E3333333' , 'E', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 8, 1),
|
||||
( 4, 'E4444444' , 'E', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 8, 1),
|
||||
( 5, 'E5555555' , 'E', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 8, 1);
|
||||
( 1, 'T1111111' , 'T', 500 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 2, 'V2222222' , 'V', 350.50 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 3, 'E3333333' , 'E', 90.30 , CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 4, 'E4444444' , 'E', 290.30 , DATE_ADD(CURDATE(), INTERVAL +1 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1),
|
||||
( 5, 'E5555555' , 'E', 190.30 , DATE_ADD(CURDATE(), INTERVAL +2 MONTH), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`ticket`(`id`, `agencyModeFk`,`warehouseFk`,`routeFk`, `shipped`, `landed`, `clientFk`,`nickname`, `addressFk`, `refFk`, `isDeleted`, `created`)
|
||||
VALUES
|
||||
|
@ -871,4 +871,13 @@ INSERT INTO `vn`.`claimDevelopment`(`id`, `claimFk`, `claimResponsibleFk`, `work
|
|||
INSERT INTO `hedera`.`tpvMerchant`(`id`, `description`, `companyFk`, `bankFk`, `secretKey`)
|
||||
VALUES
|
||||
( 1, 'Arkham Bank', 442, 1, 'h12387193H10238'),
|
||||
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');
|
||||
( 2, 'NewYork Bank', 442, 1, '7981ugsgd1hsdad');
|
||||
|
||||
|
||||
|
||||
INSERT INTO `hedera`.`tpvTransaction`(`id`,`merchantFk`, `clientFk`,`receiptFk`, `amount`, `response`, `errorCode`, `status`, `created`)
|
||||
VALUES
|
||||
(1, 1, 101, NULL, 2000, NULL, 'SIS0042', 'ok', CURDATE()),
|
||||
(2, 1, 101, NULL, 1000, NULL, 'SIS0051', 'started', CURDATE()),
|
||||
(3, 2, 101, NULL, 7268, 0, NULL, 'ok', CURDATE()),
|
||||
(4, 2, 101, NULL, 4698, 100, NULL, 'started', CURDATE());
|
|
@ -7,6 +7,6 @@ describe('Client card', () => {
|
|||
|
||||
expect(result.id).toEqual(101);
|
||||
expect(result.name).toEqual('Bruce Wayne');
|
||||
expect(result.debt).toEqual(972.78);
|
||||
expect(result.debt).toEqual(880.1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -4,7 +4,7 @@ describe('client getDebt()', () => {
|
|||
it('should return the client debt', async() => {
|
||||
let result = await app.models.Client.getDebt(101);
|
||||
|
||||
expect(result.debt).toEqual(972.78);
|
||||
expect(result.debt).toEqual(880.1);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('client summary()', () => {
|
|||
it('should return a summary object containing debt', async() => {
|
||||
let result = await app.models.Client.summary(101);
|
||||
|
||||
expect(result.debt.debt).toEqual(972.78);
|
||||
expect(result.debt.debt).toEqual(880.1);
|
||||
});
|
||||
|
||||
it('should return a summary object containing averageInvoiced', async() => {
|
||||
|
|
|
@ -14,13 +14,13 @@ var requestToken = function(request, response, next) {
|
|||
// Sepa core
|
||||
router.get('/sepa-core/:companyId/:clientId', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
clientId: request.params.clientId,
|
||||
clientId: request.params.clientId,
|
||||
companyId: request.params.companyId
|
||||
};
|
||||
|
||||
template.get('sepa-core', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
|
@ -30,62 +30,62 @@ router.get('/sepa-core/:companyId/:clientId', requestToken, function(request, re
|
|||
response.setHeader('Content-type', 'application/pdf');
|
||||
stream.pipe(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Sepa core html preview
|
||||
router.get('/sepa-core/:companyId/:clientId/preview', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
clientId: request.params.clientId,
|
||||
clientId: request.params.clientId,
|
||||
companyId: request.params.companyId,
|
||||
isPreview: true
|
||||
};
|
||||
|
||||
template.get('sepa-core', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
response.send(result.body);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Debtor letter
|
||||
router.get('/letter-debtor/:companyId/:clientId', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
clientId: request.params.clientId,
|
||||
clientId: request.params.clientId,
|
||||
companyId: request.params.companyId
|
||||
};
|
||||
|
||||
template.get('letter-debtor', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
|
||||
response.setHeader('Content-Disposition', 'attachment; filename="extracto.pdf"');
|
||||
response.setHeader('Content-type', 'application/pdf');
|
||||
stream.pipe(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Debtor letter html preview
|
||||
router.get('/letter-debtor/:companyId/:clientId/preview', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
clientId: request.params.clientId,
|
||||
clientId: request.params.clientId,
|
||||
companyId: request.params.companyId,
|
||||
isPreview: true
|
||||
};
|
||||
|
||||
template.get('letter-debtor', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
response.send(result.body);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// Delivery note
|
||||
router.get('/delivery-note/:ticketId/preview', requestToken, function(request, response) {
|
||||
|
@ -93,37 +93,65 @@ router.get('/delivery-note/:ticketId/preview', requestToken, function(request, r
|
|||
ticketId: request.params.ticketId,
|
||||
isPreview: true
|
||||
};
|
||||
|
||||
|
||||
template.get('delivery-note', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json(error);
|
||||
if (error)
|
||||
return response.status(400).json(error);
|
||||
|
||||
response.send(result.body);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/delivery-note/:ticketId', requestToken, function(request, response, next) {
|
||||
router.get('/delivery-note/:ticketId', requestToken, function(request, response, next) {
|
||||
let params = {
|
||||
ticketId: request.params.ticketId
|
||||
};
|
||||
|
||||
template.get('delivery-note', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
|
||||
//response.setHeader('Content-Disposition', 'attachment; filename="deliveryNote.pdf"');
|
||||
//response.setHeader('Content-type', 'application/pdf');
|
||||
stream.pipe(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
});
|
||||
|
||||
router.get('/claim-pickup/:claimId/preview', requestToken, function(request, response) {
|
||||
let params = {
|
||||
claimId: request.params.claimId,
|
||||
isPreview: true
|
||||
};
|
||||
|
||||
template.get('claim-pickup', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json(error);
|
||||
|
||||
response.send(result.body);
|
||||
});
|
||||
});
|
||||
|
||||
router.get('/claim-pickup/:claimId', requestToken, function(request, response) {
|
||||
let params = {
|
||||
claimId: request.params.claimId
|
||||
};
|
||||
|
||||
template.get('claim-pickup', params, (error, result) => {
|
||||
if (error)
|
||||
return response.status(400).json({message: error.message});
|
||||
|
||||
pdf.create(result.body, config.pdf).toStream(function(error, stream) {
|
||||
if (error)
|
||||
throw Error(error);
|
||||
stream.pipe(response);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
// store pdf
|
||||
/* router.post('/sepa-core/:clientId', function(request, response, next) {
|
||||
|
@ -140,4 +168,4 @@ module.exports = router;
|
|||
});
|
||||
});
|
||||
});
|
||||
*/
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
var path = require('path');
|
||||
var database = require(path.join(__dirname, '../../database.js'));
|
||||
let strftime = require('strftime');
|
||||
|
||||
module.exports = class ClaimPickup {
|
||||
async getData(params, cb) {
|
||||
let qryData = `
|
||||
SELECT
|
||||
c.id clientId,
|
||||
cl.id claimId,
|
||||
LOWER(ct.code) AS countryCode,
|
||||
c.email AS recipient,
|
||||
c.socialName,
|
||||
c.name AS clientName,
|
||||
c.street,
|
||||
c.postcode,
|
||||
c.city,
|
||||
c.fi,
|
||||
p.name AS province,
|
||||
ct.country
|
||||
FROM claim cl
|
||||
JOIN client c ON c.id = cl.clientFk
|
||||
JOIN country ct ON ct.id = c.countryFk
|
||||
LEFT JOIN province p ON p.id = c.provinceFk
|
||||
WHERE cl.id = ?`;
|
||||
|
||||
let qryLines = `
|
||||
SELECT
|
||||
s.id,
|
||||
s.quantity,
|
||||
s.concept,
|
||||
cb.quantity claimQuantity
|
||||
FROM claimBeginning cb
|
||||
JOIN sale s ON s.id = cb.saleFk
|
||||
WHERE cb.claimFk = ?`;
|
||||
|
||||
try {
|
||||
let [data] = await database.pool.query(qryData, [params.claimId]);
|
||||
|
||||
if (!data)
|
||||
throw new Error('No body data found');
|
||||
|
||||
let [lines] = await database.pool.query(qryLines, [params.claimId]);
|
||||
|
||||
Object.assign(this, data[0]);
|
||||
this.lines = lines;
|
||||
cb();
|
||||
} catch (e) {
|
||||
cb(e);
|
||||
}
|
||||
}
|
||||
|
||||
get currentDate() {
|
||||
return strftime('%d-%m-%Y', new Date());
|
||||
}
|
||||
};
|
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 8.4 KiB |
|
@ -0,0 +1,48 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
|
||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" x="0px" y="0px" width="226.229px" height="31.038px" viewBox="0 0 226.229 31.038" enable-background="new 0 0 226.229 31.038" xml:space="preserve" id="svg2" inkscape:version="0.48.1 r9760" sodipodi:docname="logo.svg"><metadata id="metadata61"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs59"/><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="710" id="namedview57" showgrid="false" inkscape:zoom="4.0755163" inkscape:cx="138.56745" inkscape:cy="16.509992" inkscape:window-x="0" inkscape:window-y="26" inkscape:window-maximized="1" inkscape:current-layer="svg2"/>
|
||||
<g id="Background">
|
||||
</g>
|
||||
<g id="Guides">
|
||||
</g>
|
||||
<g id="Foreground">
|
||||
<g id="g7">
|
||||
<g id="g9">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.417,30.321L0,0h8.233l4.26,15.582l0.349,1.276 c0.521,1.866,0.918,3.431,1.191,4.693c0.15-0.618,0.335-1.345,0.555-2.182c0.219-0.837,0.528-1.935,0.925-3.293L19.981,0h8.19 L17.671,30.321H10.417z" id="path11"/>
|
||||
</g>
|
||||
<g id="g13">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M139.809,19.787c-0.665,0.357-1.748,0.686-3.25,0.988 c-0.727,0.137-1.283,0.254-1.667,0.35c-0.95,0.247-1.661,0.563-2.134,0.947c-0.472,0.384-0.799,0.899-0.979,1.544 c-0.223,0.796-0.155,1.438,0.204,1.925c0.359,0.488,0.945,0.731,1.757,0.731c1.252,0,2.375-0.36,3.369-1.081 c0.994-0.721,1.653-1.665,1.98-2.831L139.809,19.787z M144.915,30.321h-7.458c0.017-0.356,0.048-0.726,0.094-1.11l0.159-1.192 c-1.318,1.026-2.627,1.786-3.927,2.279c-1.299,0.493-2.643,0.739-4.031,0.739c-2.158,0-3.7-0.593-4.625-1.779 c-0.925-1.187-1.106-2.788-0.542-4.804c0.519-1.851,1.431-3.356,2.737-4.515c1.307-1.159,3.021-1.972,5.142-2.438 c1.169-0.247,2.641-0.515,4.413-0.803c2.646-0.412,4.082-1.016,4.304-1.812l0.151-0.539c0.182-0.65,0.076-1.145-0.317-1.483 c-0.393-0.339-1.071-0.508-2.033-0.508c-1.045,0-1.934,0.214-2.666,0.643c-0.731,0.428-1.289,1.058-1.673,1.887h-6.748 c1.065-2.53,2.64-4.413,4.723-5.65s4.724-1.856,7.923-1.856c1.991,0,3.602,0.241,4.833,0.722s2.095,1.209,2.59,2.185 c0.339,0.701,0.483,1.536,0.432,2.504c-0.052,0.969-0.377,2.525-0.978,4.669l-2.375,8.483c-0.284,1.014-0.416,1.812-0.396,2.395 s0.188,0.962,0.503,1.141L144.915,30.321z" id="path15" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g17">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M185.7,30.321l6.27-22.393h7.049l-1.097,3.918 c1.213-1.537,2.502-2.659,3.867-3.366c1.365-0.707,2.951-1.074,4.758-1.101l-2.03,7.25c-0.304-0.042-0.608-0.072-0.912-0.093 c-0.303-0.02-0.592-0.03-0.867-0.03c-1.126,0-2.104,0.168-2.932,0.504c-0.829,0.336-1.561,0.854-2.197,1.555 c-0.406,0.467-0.789,1.136-1.149,2.007c-0.361,0.872-0.814,2.282-1.359,4.232l-2.104,7.516H185.7z" id="path19" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g21">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M217.631,19.787c-0.664,0.357-1.748,0.686-3.25,0.988 c-0.727,0.137-1.282,0.254-1.667,0.35c-0.95,0.247-1.661,0.563-2.134,0.947c-0.472,0.384-0.799,0.899-0.979,1.544 c-0.223,0.796-0.155,1.438,0.205,1.925c0.359,0.488,0.945,0.731,1.757,0.731c1.252,0,2.375-0.36,3.369-1.081 c0.994-0.721,1.654-1.665,1.98-2.831L217.631,19.787z M222.737,30.321h-7.458c0.017-0.356,0.048-0.726,0.094-1.11l0.159-1.192 c-1.318,1.026-2.627,1.786-3.927,2.279c-1.299,0.493-2.643,0.739-4.031,0.739c-2.158,0-3.7-0.593-4.625-1.779 c-0.926-1.187-1.106-2.788-0.542-4.804c0.519-1.851,1.431-3.356,2.737-4.515c1.306-1.159,3.02-1.972,5.142-2.438 c1.169-0.247,2.641-0.515,4.413-0.803c2.647-0.412,4.082-1.016,4.304-1.812l0.151-0.539c0.182-0.65,0.077-1.145-0.317-1.483 c-0.393-0.339-1.071-0.508-2.033-0.508c-1.045,0-1.934,0.214-2.666,0.643c-0.731,0.428-1.289,1.058-1.672,1.887h-6.748 c1.065-2.53,2.64-4.413,4.723-5.65s4.724-1.856,7.923-1.856c1.99,0,3.601,0.241,4.833,0.722s2.095,1.209,2.591,2.185 c0.339,0.701,0.483,1.536,0.431,2.504c-0.051,0.969-0.377,2.525-0.978,4.669l-2.375,8.483c-0.284,1.014-0.416,1.812-0.396,2.395 c0.02,0.583,0.188,0.962,0.503,1.141L222.737,30.321z" id="path23" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g25">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M188.386,7.928l-6.269,22.393h-7.174l0.864-3.085 c-1.227,1.246-2.476,2.163-3.746,2.751s-2.625,0.882-4.067,0.882c-2.471,0-4.154-0.634-5.048-1.901 c-0.895-1.268-0.993-3.149-0.294-5.644l4.31-15.396h7.338l-3.508,12.53c-0.516,1.842-0.641,3.109-0.375,3.803 s0.967,1.041,2.105,1.041c1.275,0,2.323-0.422,3.142-1.267c0.819-0.845,1.497-2.223,2.031-4.133l3.353-11.974H188.386z" id="path27" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g29">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A0CE67" d="M149.937,12.356l1.239-4.428h2.995l1.771-6.326h7.338 l-1.771,6.326h3.753l-1.24,4.428h-3.753l-2.716,9.702c-0.416,1.483-0.498,2.465-0.247,2.946c0.25,0.48,0.905,0.721,1.964,0.721 l0.549-0.011l0.39-0.031l-1.31,4.678c-0.811,0.148-1.596,0.263-2.354,0.344c-0.758,0.081-1.48,0.122-2.167,0.122 c-2.543,0-4.108-0.621-4.695-1.863c-0.587-1.242-0.313-3.887,0.82-7.936l2.428-8.672H149.937z" id="path31" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
<g id="g33">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M73.875,18.896c-0.561,2.004-0.616,3.537-0.167,4.601 s1.375,1.595,2.774,1.595c1.399,0,2.605-0.524,3.62-1.574s1.806-2.59,2.375-4.622c0.526-1.879,0.556-3.334,0.09-4.363 c-0.466-1.029-1.393-1.543-2.778-1.543c-1.304,0-2.487,0.528-3.551,1.585S74.386,17.071,73.875,18.896z M96.513,0l-8.489,30.321 h-7.337l0.824-2.944c-1.166,1.22-2.369,2.121-3.61,2.703s-2.583,0.874-4.025,0.874c-2.802,0-4.772-1.081-5.912-3.243 c-1.139-2.162-1.218-4.993-0.238-8.493c0.988-3.528,2.668-6.404,5.042-8.627c2.374-2.224,4.927-3.336,7.661-3.336 c1.47,0,2.695,0.296,3.676,0.887c0.981,0.591,1.681,1.465,2.099,2.62L89.217,0H96.513z" id="path35"/>
|
||||
<g id="g37">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M73.875,18.896c-0.561,2.004-0.616,3.537-0.167,4.601s1.375,1.595,2.774,1.595 c1.399,0,2.605-0.524,3.62-1.574s1.806-2.59,2.375-4.622c0.526-1.879,0.556-3.334,0.09-4.363 c-0.466-1.029-1.393-1.543-2.778-1.543c-1.304,0-2.487,0.528-3.551,1.585S74.386,17.071,73.875,18.896z M96.513,0l-8.489,30.321 h-7.337l0.824-2.944c-1.166,1.22-2.369,2.121-3.61,2.703s-2.583,0.874-4.025,0.874c-2.802,0-4.772-1.081-5.912-3.243 c-1.139-2.162-1.218-4.993-0.238-8.493c0.988-3.528,2.668-6.404,5.042-8.627c2.374-2.224,4.927-3.336,7.661-3.336 c1.47,0,2.695,0.296,3.676,0.887c0.981,0.591,1.681,1.465,2.099,2.62L89.217,0H96.513z" id="path39"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g41">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M46.488,30.321l6.269-22.393h7.049l-1.098,3.918 c1.213-1.537,2.502-2.659,3.868-3.366s6.015-1.074,7.822-1.101l-2.03,7.25c-0.304-0.042-0.608-0.072-0.911-0.093 c-0.304-0.02-0.592-0.03-0.867-0.03c-1.126,0-5.167,0.168-5.997,0.504c-0.829,0.336-1.561,0.854-2.196,1.555 c-0.406,0.467-0.789,1.136-1.149,2.007c-0.361,0.872-0.814,2.282-1.36,4.232l-2.104,7.516H46.488z" id="path43"/>
|
||||
</g>
|
||||
<g id="g45">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFFF" d="M32.673,16.742l8.351-0.021 c0.375-1.436,0.308-2.558-0.201-3.365s-1.402-1.211-2.68-1.211c-1.209,0-2.285,0.397-3.229,1.19S33.224,15.265,32.673,16.742z M38.817,23.278h7.043c-1.347,2.456-3.172,4.356-5.477,5.7c-2.305,1.345-4.885,2.017-7.74,2.017 c-3.473,0-5.923-1.054-7.351-3.161c-1.427-2.107-1.632-4.98-0.613-8.618c1.038-3.707,2.875-6.641,5.512-8.803 c2.637-2.163,5.678-3.244,9.123-3.244c3.555,0,6.04,1.099,7.456,3.298c1.417,2.198,1.582,5.234,0.498,9.109l-0.239,0.814 l-0.167,0.484H31.721c-0.441,1.575-0.438,2.777,0.01,3.606c0.448,0.829,1.332,1.244,2.65,1.244c0.975,0,1.836-0.206,2.583-0.617 S38.33,24.086,38.817,23.278z" id="path47"/>
|
||||
<g id="g49">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.673,16.742l8.351-0.021c0.375-1.436,0.308-2.558-0.201-3.365 s-1.402-1.211-2.68-1.211c-1.209,0-2.285,0.397-3.229,1.19S33.224,15.265,32.673,16.742z M38.817,23.278h7.043 c-1.347,2.456-3.172,4.356-5.477,5.7c-2.305,1.345-4.885,2.017-7.74,2.017c-3.473,0-5.923-1.054-7.351-3.161 c-1.427-2.107-1.632-4.98-0.613-8.618c1.038-3.707,2.875-6.641,5.512-8.803c2.637-2.163,5.678-3.244,9.123-3.244 c3.555,0,6.04,1.099,7.456,3.298c1.417,2.198,1.582,5.234,0.498,9.109l-0.239,0.814l-0.167,0.484H31.721 c-0.441,1.575-0.438,2.777,0.01,3.606c0.448,0.829,1.332,1.244,2.65,1.244c0.975,0,1.836-0.206,2.583-0.617 S38.33,24.086,38.817,23.278z" id="path51"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g53">
|
||||
<path fill="#A0CE67" d="M112.881,30.643l-6.404-18.639l-6.455,18.639h-7.254l9.565-30.321h8.19l4.434,15.582l0.35,1.276 c0.521,1.866,0.917,3.431,1.191,4.693l0.555-2.182c0.219-0.837,0.528-1.935,0.925-3.293l4.468-16.076h8.19l-10.501,30.321 H112.881z" id="path55" style="fill:#8ed300;fill-opacity:1"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 3.4 KiB |
|
@ -0,0 +1,91 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
<head>
|
||||
<title>{{_.subject}}</title>
|
||||
<meta charset="utf8"/>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Header block -->
|
||||
{{$.header}}
|
||||
<!-- Header block end -->
|
||||
|
||||
<!-- Body block -->
|
||||
<main>
|
||||
<div class="columns">
|
||||
<div class="size50">
|
||||
<div class="size75">
|
||||
<h1 style="margin-top:0" class="font extraLarge">{{_.title}}</h1>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">{{_.claim}}:</div>
|
||||
<div class="control">{{claimId}}</div>
|
||||
</div>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">{{_.client}}:</div>
|
||||
<div class="control">{{clientId}}</div>
|
||||
</div>
|
||||
<div class="row inline font normal">
|
||||
<div class="text font gray">{{_.date}}:</div>
|
||||
<div class="control">{{currentDate}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size50">
|
||||
<div class="panel">
|
||||
<div class="header">{{_.clientData}}</div>
|
||||
<p>
|
||||
<strong>{{clientName}}</strong>
|
||||
</p>
|
||||
<div>
|
||||
{{street}}
|
||||
</div>
|
||||
<div>
|
||||
{{postcode}}, {{city}} ({{province}})
|
||||
</div>
|
||||
<div>
|
||||
{{country}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid" style="margin-top:20px">
|
||||
<div class="row header inline">
|
||||
<div style="width: 15%">{{_.quantity}}</div>
|
||||
<div style="width: 15%">{{_.claims}}</div>
|
||||
<div style="width: 20%">{{_.reference}}</div>
|
||||
<div style="width: 50%">{{_.concept}}</div>
|
||||
</div>
|
||||
{{#lines}}
|
||||
<div class="row inline">
|
||||
<div class="font bold" style="width: 15%">{{quantity}} </div>
|
||||
<div class="font bold" style="width: 15%">{{claimQuantity}} </div>
|
||||
<div class="font bold" style="width: 20%">{{id}} </div>
|
||||
<div class="font bold" style="width: 50%">{{concept}} </div>
|
||||
</div>
|
||||
{{/lines}}
|
||||
</div>
|
||||
<div class="columns" style="margin-top: 50px">
|
||||
<div class="size25"> </div>
|
||||
<div class="size50">
|
||||
<div class="panel" style="height: 150px">
|
||||
<div style="text-align: center">
|
||||
<h3>{{clientName}}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="size25"> </div>
|
||||
</div>
|
||||
<p style="text-align: center">
|
||||
{{_.agencyContact}}
|
||||
</p>
|
||||
<p style="text-align: center">
|
||||
{{{_.agencyContactData}}}
|
||||
</p>
|
||||
</main>
|
||||
<!-- Body block end -->
|
||||
|
||||
<!-- Footer block -->
|
||||
{{$.footer}}
|
||||
<!-- Footer block end -->
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"title": "ORD. RECOGIDA",
|
||||
"claim": "RECLAMACIÓN",
|
||||
"client": "CLIENTE",
|
||||
"date": "DATE",
|
||||
"clientData": "Datos del cliente",
|
||||
"quantity": "Cantidad",
|
||||
"claims": "Reclama",
|
||||
"reference": "Referencia",
|
||||
"concept": "Concepto",
|
||||
"agencyContact": "Para agilizar su recogida, por favor, póngase en contacto con la oficina de integrados.",
|
||||
"agencyContactData": "Tlf: 96 166 77 88 - Ana Gómez <em>(agomezf@integra2.es)</em>",
|
||||
"fiscalAddress": "VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla · www.verdnatura.es · clientes@verdnatura.es",
|
||||
"privacy": "- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado exclusivamente por la persona destinataria del mismo. Si usted ha recibido este mensaje por error, le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.",
|
||||
"privacyLaw": "En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación."
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
img {
|
||||
margin: 0
|
||||
}
|
||||
|
||||
.body {
|
||||
font-family: arial, sans-serif;
|
||||
max-width: 90%;
|
||||
margin: 0 auto;
|
||||
font-size: 14px;
|
||||
color: #000
|
||||
}
|
||||
|
||||
body .title {
|
||||
text-align: center;
|
||||
padding-bottom: 20px
|
||||
}
|
||||
|
||||
body .title h1 {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin: 0
|
||||
}
|