Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
75fba75688
|
@ -191,18 +191,23 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
|
||||||
|
|
||||||
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`fax`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`cplusTerIdNifFk`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`)
|
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`fax`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`cplusTerIdNifFk`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`)
|
||||||
VALUES
|
VALUES
|
||||||
(101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceWayne@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1),
|
(101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceWayne@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1),
|
||||||
(102, 'Petter Parker', '87945234L', 'Spider-Man', 'Aunt May', '20 Ingram Street', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'PetterParker@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, 18, 0, 1),
|
(102, 'Petter Parker', '87945234L', 'Spider-Man', 'Aunt May', '20 Ingram Street', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'PetterParker@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, 18, 0, 1),
|
||||||
(103, 'Clark Kent', '06815934E', 'Super-Man', 'lois lane', '344 Clinton Street', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'ClarkKent@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 0, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(103, 'Clark Kent', '06815934E', 'Super-Man', 'lois lane', '344 Clinton Street', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'ClarkKent@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 0, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(104, 'Tony Stark', '06089160W', 'Iron-Man', 'Pepper Potts', '10880 Malibu Point', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'TonyStark@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
(104, 'Tony Stark', '06089160W', 'Iron-Man', 'Pepper Potts', '10880 Malibu Point', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'TonyStark@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1),
|
||||||
(105, 'Max Eisenhardt', '39182496H', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'MaxEisenhardt@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, NULL, 0, 1),
|
(105, 'Max Eisenhardt', '39182496H', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'MaxEisenhardt@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, NULL, 0, 1),
|
||||||
(106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'Evil hideout', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'DavidCharlesHaller@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1),
|
(106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'Evil hideout', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'DavidCharlesHaller@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1),
|
||||||
(107, 'Hank Pym', '09854837G', 'Ant-Man', 'Hawk', 'Anthill', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'HankPym@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1),
|
(107, 'Hank Pym', '09854837G', 'Ant-Man', 'Hawk', 'Anthill', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'HankPym@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1),
|
||||||
(108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'CharlesXavier@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1),
|
(108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'CharlesXavier@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1),
|
||||||
(109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, 19, 0, 1),
|
(109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'BruceBanner@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, 19, 0, 1),
|
||||||
(110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, NULL, 0, 1),
|
(110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, 'JessicaJones@verdnatura.es', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 1, NULL, 1, 1, 0, 1, NULL, 0, 0, NULL, 0, 1),
|
||||||
(200, 'Missing', NULL, 'Missing man', 'Anton', 'The space', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1),
|
(200, 'Missing', NULL, 'Missing man', 'Anton', 'The space', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1),
|
||||||
(400, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1);
|
(400, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city', 'Silla', 46460, 1111111111, 222222222, 333333333, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5,CURDATE(), 1, 5, 1, 1, 1,'0000-00-00', 4, NULL, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `phone`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`)
|
||||||
|
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'SILLA', 46460, 623111111, 1, CONCAT(name,'@verdnatura.es'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, CURDATE(), 1
|
||||||
|
FROM `account`.`role` `r`
|
||||||
|
WHERE `r`.`hasLogin` = 1;
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
|
INSERT INTO `vn`.`clientManaCache`(`clientFk`, `mana`, `dated`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -258,6 +263,11 @@ INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `pr
|
||||||
(131, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 200, 2, NULL, NULL, 0, 0),
|
(131, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 200, 2, NULL, NULL, 0, 0),
|
||||||
(132, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 400, 2, NULL, NULL, 0, 0);
|
(132, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 400, 2, NULL, NULL, 0, 0);
|
||||||
|
|
||||||
|
INSERT INTO `vn`.`address`( `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `isActive`, `clientFk`, `agencyModeFk`, `isDefaultAddress`)
|
||||||
|
SELECT name, CONCAT(name, 'Street'), 'SILLA', 46460, 1, 1, id, 2, 1
|
||||||
|
FROM `account`.`role` `r`
|
||||||
|
WHERE `r`.`hasLogin` = 1;
|
||||||
|
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 101;
|
UPDATE `vn`.`client` SET defaultAddressFk = 1 WHERE id = 101;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 102;
|
UPDATE `vn`.`client` SET defaultAddressFk = 2 WHERE id = 102;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 103;
|
UPDATE `vn`.`client` SET defaultAddressFk = 3 WHERE id = 103;
|
||||||
|
@ -271,6 +281,11 @@ UPDATE `vn`.`client` SET defaultAddressFk = 10 WHERE id = 110;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
|
UPDATE `vn`.`client` SET defaultAddressFk = 11 WHERE id = 200;
|
||||||
UPDATE `vn`.`client` SET defaultAddressFk = 12 WHERE id = 400;
|
UPDATE `vn`.`client` SET defaultAddressFk = 12 WHERE id = 400;
|
||||||
|
|
||||||
|
UPDATE `vn`.`client` `c`
|
||||||
|
JOIN `vn`.`address` `a` ON `a`.`clientFk` = `c`.`id`
|
||||||
|
SET `c`.`defaultAddressFk` = `a`.`id`
|
||||||
|
WHERE `defaultAddressFk` IS NULL;
|
||||||
|
|
||||||
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
|
INSERT INTO `vn`.`clientCredit`(`id`, `clientFk`, `workerFk`, `amount`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
(1 , 101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
(1 , 101, 5, 300, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-pets:before {
|
.icon-unavailable:before {
|
||||||
content: "\e94e";
|
content: "\e94f";
|
||||||
}
|
}
|
||||||
.icon-100:before {
|
.icon-100:before {
|
||||||
content: "\e940";
|
content: "\e940";
|
||||||
|
@ -134,12 +134,12 @@
|
||||||
.icon-info:before {
|
.icon-info:before {
|
||||||
content: "\e949";
|
content: "\e949";
|
||||||
}
|
}
|
||||||
.icon-invoices1:before {
|
|
||||||
content: "\e94a";
|
|
||||||
}
|
|
||||||
.icon-invoices:before {
|
.icon-invoices:before {
|
||||||
content: "\e91c";
|
content: "\e91c";
|
||||||
}
|
}
|
||||||
|
.icon-invoices1:before {
|
||||||
|
content: "\e94a";
|
||||||
|
}
|
||||||
.icon-item:before {
|
.icon-item:before {
|
||||||
content: "\e941";
|
content: "\e941";
|
||||||
}
|
}
|
||||||
|
@ -191,6 +191,9 @@
|
||||||
.icon-person:before {
|
.icon-person:before {
|
||||||
content: "\e929";
|
content: "\e929";
|
||||||
}
|
}
|
||||||
|
.icon-pets:before {
|
||||||
|
content: "\e94e";
|
||||||
|
}
|
||||||
.icon-photo:before {
|
.icon-photo:before {
|
||||||
content: "\e92a";
|
content: "\e92a";
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,4 +86,5 @@
|
||||||
<glyph unicode="" glyph-name="revision" d="M358.4 140.8h-102.4v102.4h81.067c0 0 0 4.267 0 4.267 0 34.133 8.533 68.267 21.333 98.133h-102.4v102.4h170.667c51.2 51.2 123.733 85.333 200.533 102.4h-371.2v102.4h512v-93.867c76.8-8.533 149.333-34.133 204.8-72.533v268.8c0 55.467-46.933 102.4-102.4 102.4h-213.333c-21.333 59.733-76.8 102.4-145.067 102.4s-123.733-42.667-145.067-102.4h-213.333c-55.467 0-102.4-46.933-102.4-102.4v-716.8c0-55.467 46.933-102.4 102.4-102.4h546.133c-157.867 8.533-290.133 89.6-341.333 204.8zM512 857.6c29.867 0 51.2-21.333 51.2-51.2s-21.333-51.2-51.2-51.2-51.2 21.333-51.2 51.2c0 29.867 21.333 51.2 51.2 51.2zM721.067 452.267c-136.533 0-251.733-85.333-302.933-204.8 46.933-119.467 162.133-204.8 302.933-204.8s251.733 85.333 302.933 204.8c-46.933 119.467-162.133 204.8-302.933 204.8zM721.067 110.933c-76.8 0-136.533 59.733-136.533 136.533s64 136.533 136.533 136.533 136.533-64 136.533-136.533-59.733-136.533-136.533-136.533zM721.067 328.533c-46.933 0-81.067-38.4-81.067-81.067s38.4-81.067 81.067-81.067c46.933 0 81.067 38.4 81.067 81.067s-34.133 81.067-81.067 81.067z" />
|
<glyph unicode="" glyph-name="revision" d="M358.4 140.8h-102.4v102.4h81.067c0 0 0 4.267 0 4.267 0 34.133 8.533 68.267 21.333 98.133h-102.4v102.4h170.667c51.2 51.2 123.733 85.333 200.533 102.4h-371.2v102.4h512v-93.867c76.8-8.533 149.333-34.133 204.8-72.533v268.8c0 55.467-46.933 102.4-102.4 102.4h-213.333c-21.333 59.733-76.8 102.4-145.067 102.4s-123.733-42.667-145.067-102.4h-213.333c-55.467 0-102.4-46.933-102.4-102.4v-716.8c0-55.467 46.933-102.4 102.4-102.4h546.133c-157.867 8.533-290.133 89.6-341.333 204.8zM512 857.6c29.867 0 51.2-21.333 51.2-51.2s-21.333-51.2-51.2-51.2-51.2 21.333-51.2 51.2c0 29.867 21.333 51.2 51.2 51.2zM721.067 452.267c-136.533 0-251.733-85.333-302.933-204.8 46.933-119.467 162.133-204.8 302.933-204.8s251.733 85.333 302.933 204.8c-46.933 119.467-162.133 204.8-302.933 204.8zM721.067 110.933c-76.8 0-136.533 59.733-136.533 136.533s64 136.533 136.533 136.533 136.533-64 136.533-136.533-59.733-136.533-136.533-136.533zM721.067 328.533c-46.933 0-81.067-38.4-81.067-81.067s38.4-81.067 81.067-81.067c46.933 0 81.067 38.4 81.067 81.067s-34.133 81.067-81.067 81.067z" />
|
||||||
<glyph unicode="" glyph-name="services" d="M951.467 217.6c0 8.533 0 21.333 0 29.867s0 21.333-4.267 29.867l64 51.2c4.267 4.267 8.533 12.8 4.267 21.333l-64 106.667c-4.267 8.533-12.8 8.533-17.067 8.533l-76.8-29.867c-17.067 12.8-34.133 21.333-51.2 29.867l-12.8 81.067c0 8.533-8.533 12.8-17.067 12.8h-123.733c-8.533 0-12.8-4.267-17.067-12.8l-12.8-81.067c-17.067-8.533-38.4-17.067-51.2-29.867l-76.8 29.867c-8.533 4.267-17.067 0-17.067-8.533l-64-106.667c-4.267-8.533-4.267-17.067 4.267-21.333l64-51.2c0-8.533-4.267-21.333-4.267-29.867s0-21.333 4.267-29.867l-55.467-51.2c-4.267-4.267-8.533-12.8-4.267-21.333l64-106.667c4.267-8.533 12.8-8.533 17.067-8.533l76.8 29.867c17.067-12.8 34.133-21.333 51.2-29.867l12.8-81.067c0-8.533 8.533-12.8 17.067-12.8h123.733c8.533 0 12.8 4.267 17.067 12.8l12.8 81.067c17.067 8.533 38.4 17.067 51.2 29.867l76.8-29.867c8.533-4.267 17.067 0 17.067 8.533l64 106.667c4.267 8.533 4.267 17.067-4.267 21.333 0 0-68.267 51.2-68.267 51.2zM721.067 132.267c-64 0-115.2 51.2-115.2 115.2s51.2 115.2 115.2 115.2 115.2-51.2 115.2-115.2c0-64-51.2-115.2-115.2-115.2zM345.6 174.933h-89.6v102.4h81.067c4.267 34.133 8.533 68.267 21.333 102.4h-102.4v102.4h162.133c34.133 42.667 72.533 76.8 119.467 102.4h-281.6v102.4h520.533v-59.733c51.2-8.533 102.4-25.6 145.067-51.2v281.6c0 55.467-46.933 102.4-102.4 102.4h-622.933c-55.467 0-102.4-46.933-102.4-102.4v-819.2c0-55.467 46.933-102.4 102.4-102.4h302.933c-81.067 55.467-136.533 140.8-153.6 238.933z" />
|
<glyph unicode="" glyph-name="services" d="M951.467 217.6c0 8.533 0 21.333 0 29.867s0 21.333-4.267 29.867l64 51.2c4.267 4.267 8.533 12.8 4.267 21.333l-64 106.667c-4.267 8.533-12.8 8.533-17.067 8.533l-76.8-29.867c-17.067 12.8-34.133 21.333-51.2 29.867l-12.8 81.067c0 8.533-8.533 12.8-17.067 12.8h-123.733c-8.533 0-12.8-4.267-17.067-12.8l-12.8-81.067c-17.067-8.533-38.4-17.067-51.2-29.867l-76.8 29.867c-8.533 4.267-17.067 0-17.067-8.533l-64-106.667c-4.267-8.533-4.267-17.067 4.267-21.333l64-51.2c0-8.533-4.267-21.333-4.267-29.867s0-21.333 4.267-29.867l-55.467-51.2c-4.267-4.267-8.533-12.8-4.267-21.333l64-106.667c4.267-8.533 12.8-8.533 17.067-8.533l76.8 29.867c17.067-12.8 34.133-21.333 51.2-29.867l12.8-81.067c0-8.533 8.533-12.8 17.067-12.8h123.733c8.533 0 12.8 4.267 17.067 12.8l12.8 81.067c17.067 8.533 38.4 17.067 51.2 29.867l76.8-29.867c8.533-4.267 17.067 0 17.067 8.533l64 106.667c4.267 8.533 4.267 17.067-4.267 21.333 0 0-68.267 51.2-68.267 51.2zM721.067 132.267c-64 0-115.2 51.2-115.2 115.2s51.2 115.2 115.2 115.2 115.2-51.2 115.2-115.2c0-64-51.2-115.2-115.2-115.2zM345.6 174.933h-89.6v102.4h81.067c4.267 34.133 8.533 68.267 21.333 102.4h-102.4v102.4h162.133c34.133 42.667 72.533 76.8 119.467 102.4h-281.6v102.4h520.533v-59.733c51.2-8.533 102.4-25.6 145.067-51.2v281.6c0 55.467-46.933 102.4-102.4 102.4h-622.933c-55.467 0-102.4-46.933-102.4-102.4v-819.2c0-55.467 46.933-102.4 102.4-102.4h302.933c-81.067 55.467-136.533 140.8-153.6 238.933z" />
|
||||||
<glyph unicode="" glyph-name="pets" d="M1024 571.733c-4.267 46.933-25.6 81.067-55.467 110.933-34.133 29.867-72.533 42.667-110.933 38.4 0 0-4.267 0-4.267 0 0 8.533 0 17.067-4.267 29.867-8.533 51.2-29.867 98.133-68.267 128-25.6 21.333-51.2 34.133-72.533 38.4-29.867 4.267-59.733 0-76.8-4.267-42.667-8.533-81.067-34.133-110.933-72.533-21.333 25.6-42.667 46.933-68.267 64-64 38.4-140.8 29.867-196.267-21.333-25.6-21.333-42.667-46.933-51.2-81.067-12.8-29.867-17.067-59.733-17.067-93.867-8.533 0-17.067 0-25.6 0-42.667 0-81.067-17.067-110.933-46.933-29.867-34.133-42.667-76.8-46.933-98.133-4.267-12.8-4.267-25.6-4.267-42.667 4.267-55.467 25.6-110.933 59.733-157.867 29.867-38.4 68.267-64 110.933-76.8-4.267-12.8-8.533-21.333-8.533-34.133 0-4.267-4.267-8.533-4.267-17.067-12.8-42.667-25.6-98.133 4.267-162.133 29.867-59.733 89.6-102.4 157.867-106.667 4.267 0 12.8 0 17.067 0 46.933 0 85.333 17.067 119.467 29.867 4.267 0 8.533 4.267 12.8 4.267 17.067 4.267 34.133 12.8 51.2 12.8 8.533 0 17.067-4.267 34.133-12.8s42.667-21.333 68.267-25.6c29.867-4.267 64-4.267 93.867 0 38.4 8.533 68.267 21.333 89.6 38.4 59.733 46.933 68.267 128 51.2 187.733-8.533 25.6-21.333 55.467-34.133 85.333 29.867 4.267 55.467 12.8 76.8 29.867 81.067 51.2 110.933 128 119.467 187.733 4.267 12.8 4.267 51.2 4.267 68.267zM541.867 674.133c4.267 42.667 21.333 81.067 42.667 115.2 34.133 42.667 93.867 68.267 136.533 25.6 0 0 0 0 0 0 21.333-21.333 34.133-51.2 34.133-81.067 4.267-38.4 0-72.533-17.067-106.667-17.067-38.4-38.4-68.267-76.8-89.6-46.933-25.6-102.4-8.533-119.467 42.667-4.267 29.867-4.267 68.267 0 93.867zM277.333 776.533c8.533 17.067 17.067 34.133 34.133 46.933 29.867 29.867 64 34.133 102.4 8.533 51.2-29.867 81.067-85.333 85.333-145.067 4.267-51.2-12.8-115.2-64-145.067-17.067-4.267-34.133-8.533-51.2-4.267-21.333 4.267-38.4 17.067-51.2 29.867-55.467 46.933-76.8 140.8-55.467 209.067zM123.733 413.867c-34.133 46.933-55.467 110.933-34.133 170.667 12.8 25.6 34.133 42.667 64 46.933 25.6 4.267 51.2-8.533 72.533-25.6 8.533-4.267 12.8-12.8 17.067-17.067 17.067-21.333 29.867-46.933 34.133-72.533 8.533-29.867 12.8-59.733 8.533-85.333-4.267-34.133-29.867-64-64-68.267-38.4-4.267-76.8 21.333-98.133 51.2zM755.2 76.8c-29.867-25.6-81.067-29.867-115.2-21.333-42.667 8.533-72.533 38.4-115.2 42.667-29.867 0-55.467-8.533-85.333-17.067-38.4-12.8-76.8-34.133-115.2-29.867-25.6 0-55.467 12.8-72.533 34.133-42.667 42.667-29.867 110.933-8.533 162.133 17.067 55.467 55.467 102.4 98.133 140.8 17.067 17.067 38.4 34.133 64 42.667 25.6 12.8 55.467 17.067 85.333 17.067 34.133 0 68.267 0 98.133-12.8s55.467-29.867 72.533-55.467c21.333-25.6 42.667-51.2 59.733-81.067 17.067-25.6 34.133-55.467 46.933-85.333 17.067-34.133 21.333-76.8 4.267-110.933 0-12.8-8.533-21.333-17.067-25.6zM942.933 516.267c-8.533-55.467-34.133-106.667-81.067-136.533-17.067-12.8-38.4-17.067-64-17.067-42.667 0-72.533 34.133-81.067 72.533-17.067 76.8 59.733 200.533 140.8 204.8 21.333 0 38.4-4.267 51.2-21.333 21.333-17.067 29.867-42.667 34.133-68.267 0 4.267 4.267-8.533 0-34.133z" />
|
<glyph unicode="" glyph-name="pets" d="M1024 571.733c-4.267 46.933-25.6 81.067-55.467 110.933-34.133 29.867-72.533 42.667-110.933 38.4 0 0-4.267 0-4.267 0 0 8.533 0 17.067-4.267 29.867-8.533 51.2-29.867 98.133-68.267 128-25.6 21.333-51.2 34.133-72.533 38.4-29.867 4.267-59.733 0-76.8-4.267-42.667-8.533-81.067-34.133-110.933-72.533-21.333 25.6-42.667 46.933-68.267 64-64 38.4-140.8 29.867-196.267-21.333-25.6-21.333-42.667-46.933-51.2-81.067-12.8-29.867-17.067-59.733-17.067-93.867-8.533 0-17.067 0-25.6 0-42.667 0-81.067-17.067-110.933-46.933-29.867-34.133-42.667-76.8-46.933-98.133-4.267-12.8-4.267-25.6-4.267-42.667 4.267-55.467 25.6-110.933 59.733-157.867 29.867-38.4 68.267-64 110.933-76.8-4.267-12.8-8.533-21.333-8.533-34.133 0-4.267-4.267-8.533-4.267-17.067-12.8-42.667-25.6-98.133 4.267-162.133 29.867-59.733 89.6-102.4 157.867-106.667 4.267 0 12.8 0 17.067 0 46.933 0 85.333 17.067 119.467 29.867 4.267 0 8.533 4.267 12.8 4.267 17.067 4.267 34.133 12.8 51.2 12.8 8.533 0 17.067-4.267 34.133-12.8s42.667-21.333 68.267-25.6c29.867-4.267 64-4.267 93.867 0 38.4 8.533 68.267 21.333 89.6 38.4 59.733 46.933 68.267 128 51.2 187.733-8.533 25.6-21.333 55.467-34.133 85.333 29.867 4.267 55.467 12.8 76.8 29.867 81.067 51.2 110.933 128 119.467 187.733 4.267 12.8 4.267 51.2 4.267 68.267zM541.867 674.133c4.267 42.667 21.333 81.067 42.667 115.2 34.133 42.667 93.867 68.267 136.533 25.6 0 0 0 0 0 0 21.333-21.333 34.133-51.2 34.133-81.067 4.267-38.4 0-72.533-17.067-106.667-17.067-38.4-38.4-68.267-76.8-89.6-46.933-25.6-102.4-8.533-119.467 42.667-4.267 29.867-4.267 68.267 0 93.867zM277.333 776.533c8.533 17.067 17.067 34.133 34.133 46.933 29.867 29.867 64 34.133 102.4 8.533 51.2-29.867 81.067-85.333 85.333-145.067 4.267-51.2-12.8-115.2-64-145.067-17.067-4.267-34.133-8.533-51.2-4.267-21.333 4.267-38.4 17.067-51.2 29.867-55.467 46.933-76.8 140.8-55.467 209.067zM123.733 413.867c-34.133 46.933-55.467 110.933-34.133 170.667 12.8 25.6 34.133 42.667 64 46.933 25.6 4.267 51.2-8.533 72.533-25.6 8.533-4.267 12.8-12.8 17.067-17.067 17.067-21.333 29.867-46.933 34.133-72.533 8.533-29.867 12.8-59.733 8.533-85.333-4.267-34.133-29.867-64-64-68.267-38.4-4.267-76.8 21.333-98.133 51.2zM755.2 76.8c-29.867-25.6-81.067-29.867-115.2-21.333-42.667 8.533-72.533 38.4-115.2 42.667-29.867 0-55.467-8.533-85.333-17.067-38.4-12.8-76.8-34.133-115.2-29.867-25.6 0-55.467 12.8-72.533 34.133-42.667 42.667-29.867 110.933-8.533 162.133 17.067 55.467 55.467 102.4 98.133 140.8 17.067 17.067 38.4 34.133 64 42.667 25.6 12.8 55.467 17.067 85.333 17.067 34.133 0 68.267 0 98.133-12.8s55.467-29.867 72.533-55.467c21.333-25.6 42.667-51.2 59.733-81.067 17.067-25.6 34.133-55.467 46.933-85.333 17.067-34.133 21.333-76.8 4.267-110.933 0-12.8-8.533-21.333-17.067-25.6zM942.933 516.267c-8.533-55.467-34.133-106.667-81.067-136.533-17.067-12.8-38.4-17.067-64-17.067-42.667 0-72.533 34.133-81.067 72.533-17.067 76.8 59.733 200.533 140.8 204.8 21.333 0 38.4-4.267 51.2-21.333 21.333-17.067 29.867-42.667 34.133-68.267 0 4.267 4.267-8.533 0-34.133z" />
|
||||||
|
<glyph unicode="" glyph-name="unavailable" d="M469.333 524.8v366.933h-136.533v-499.2zM290.133 345.6v546.133h-42.667v-588.8zM776.533 832v59.733h-42.667v-102.4zM644.267 699.733v192h-89.6c0 0 0-145.067 0-277.333l89.6 85.333zM866.133 682.667v-42.667c34.133-17.067 64-42.667 89.6-68.267v200.533l-89.6-89.6zM776.533 593.067l-64-64c8.533 0 17.067 4.267 25.6 4.267 85.333 0 149.333-68.267 149.333-149.333 0-85.333-68.267-149.333-149.333-149.333s-149.333 68.267-149.333 149.333c0 8.533 0 17.067 0 25.6l-68.267-68.267c8.533-38.4 21.333-72.533 46.933-102.4l-12.8-12.8h-25.6l-166.4-170.667 51.2-51.2 166.4 170.667v25.6l8.533 12.8c38.4-34.133 89.6-51.2 145.067-51.2 123.733 0 217.6 98.133 217.6 217.6 0 106.667-76.8 192-174.933 213.333zM157.867 213.333v678.4h-89.6v-733.867h29.867zM460.8 273.067l-119.467-115.2h21.333l102.4 102.4c-4.267 4.267-4.267 8.533-4.267 12.8zM964.267 960l59.733-59.733-964.267-964.267-59.733 59.733 964.267 964.267z" />
|
||||||
</font></defs></svg>
|
</font></defs></svg>
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 76 KiB |
Binary file not shown.
Binary file not shown.
|
@ -29,22 +29,23 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Self.isValidClient = async function(id) {
|
Self.isValidClient = async id => {
|
||||||
let query =
|
let query =
|
||||||
`SELECT r.name
|
`SELECT r.name
|
||||||
FROM salix.Account A
|
FROM salix.Account a
|
||||||
JOIN vn.client C ON A.id = C.id
|
JOIN vn.client c ON a.id = c.id
|
||||||
JOIN salix.RoleMapping rm ON rm.principalId = A.id
|
JOIN salix.RoleMapping rm ON rm.principalId = a.id
|
||||||
JOIN salix.Role r ON r.id = rm.roleId
|
JOIN salix.Role r ON r.id = rm.roleId
|
||||||
WHERE A.id = ? AND C.isActive AND C.isTaxDataChecked`;
|
WHERE a.id = ? AND c.isActive AND c.isTaxDataChecked`;
|
||||||
|
|
||||||
let roleNames = await Self.rawSql(query, [id]);
|
let roleNames = await Self.rawSql(query, [id]);
|
||||||
if (!roleNames.length) return false;
|
|
||||||
|
|
||||||
roleNames.forEach(role => {
|
let isEmployee = roleNames.findIndex(role => {
|
||||||
if (role.name === 'employee')
|
return role.name === 'employee';
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!roleNames.length || isEmployee > -1 ) return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,57 +1,45 @@
|
||||||
const app = require('vn-loopback/server/server');
|
const app = require('vn-loopback/server/server');
|
||||||
|
|
||||||
describe('Client isValidClient', () => {
|
describe('Client isValidClient', () => {
|
||||||
it('should call the isValidClient() method with a client id and receive true', done => {
|
it('should call the isValidClient() method with a client id and receive true', async() => {
|
||||||
let id = 101;
|
let id = 101;
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeTruthy();
|
expect(result).toBeTruthy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a employee id and receive false', done => {
|
it('should call the isValidClient() method with an employee id to receive false', async() => {
|
||||||
let id = 1;
|
let id = 1;
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a unexistant id and receive false', done => {
|
it('should call the isValidClient() method with an unexistant id and receive false', async() => {
|
||||||
let id = 999999;
|
let id = 999999;
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a invalid id and receive false', done => {
|
it('should call the isValidClient() method with an invalid id and receive false', async() => {
|
||||||
let id = 'Pepinillos';
|
let id = 'Pepinillos';
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a customer id which isnt active and return false', done => {
|
it('should call the isValidClient() method with a customer id which isnt active and return false', async() => {
|
||||||
let id = '106';
|
let id = '106';
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call the isValidClient() method with a customer id which his data isnt verified and return false', done => {
|
it('should call the isValidClient() method with a customer id which his data isnt verified and return false', async() => {
|
||||||
let id = '110';
|
let id = '110';
|
||||||
app.models.Client.isValidClient(id)
|
let result = await app.models.Client.isValidClient(id);
|
||||||
.then(result => {
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"module": "client",
|
"module": "client",
|
||||||
"name": "Clients",
|
"name": "Clients",
|
||||||
"icon": "person",
|
"icon": "icon-person",
|
||||||
"validations" : true,
|
"validations" : true,
|
||||||
"menu": [
|
"menu": [
|
||||||
{"state": "client.card.basicData", "icon": "settings"},
|
{"state": "client.card.basicData", "icon": "settings"},
|
||||||
|
|
|
@ -36,10 +36,14 @@ module.exports = Self => {
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
{if (!address)
|
if (!address)
|
||||||
throw new UserError(`This address doesn't exist`);}
|
throw new UserError(`This address doesn't exist`);
|
||||||
|
|
||||||
if (address.client().type().code === 'normal') {
|
let agency;
|
||||||
|
if (params && params.agencyModeFk)
|
||||||
|
agency = await Self.app.models.AgencyMode.findById(params.agencyModeFk);
|
||||||
|
|
||||||
|
if (address.client().type().code === 'normal' && (!agency || agency.code != 'refund')) {
|
||||||
if (address.client().isFreezed)
|
if (address.client().isFreezed)
|
||||||
throw new UserError(`You can't create a ticket for a frozen client`);
|
throw new UserError(`You can't create a ticket for a frozen client`);
|
||||||
|
|
||||||
|
@ -54,10 +58,6 @@ module.exports = Self => {
|
||||||
throw new UserError(`You can't create a ticket for a client that has a debt`);
|
throw new UserError(`You can't create a ticket for a client that has a debt`);
|
||||||
}
|
}
|
||||||
|
|
||||||
let agency;
|
|
||||||
if (params.agencyModeFk)
|
|
||||||
agency = await Self.app.models.AgencyMode.findById(params.agencyModeFk);
|
|
||||||
|
|
||||||
if (!params.shipped && params.landed) {
|
if (!params.shipped && params.landed) {
|
||||||
params.shipped = await Self.app.models.Agency.getShipped({
|
params.shipped = await Self.app.models.Agency.getShipped({
|
||||||
landed: params.landed,
|
landed: params.landed,
|
||||||
|
|
Loading…
Reference in New Issue