4098-rename_procedures #1015
|
@ -200,6 +200,31 @@ module.exports = Self => {
|
|||
const toTable = table.toTable;
|
||||
const baseName = table.fileName;
|
||||
|
||||
const firstEntry = entries[0];
|
||||
const entryName = firstEntry.entryName;
|
||||
const startIndex = (entryName.length - 10);
|
||||
const endIndex = (entryName.length - 4);
|
||||
const dateString = entryName.substring(startIndex, endIndex);
|
||||
|
||||
const lastUpdated = new Date();
|
||||
|
||||
let updated = null;
|
||||
if (file.updated) {
|
||||
updated = new Date(file.updated);
|
||||
updated.setHours(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
// Format string date to a date object
|
||||
lastUpdated.setFullYear(`20${dateString.substring(4, 6)}`);
|
||||
lastUpdated.setMonth(parseInt(dateString.substring(2, 4)) - 1);
|
||||
lastUpdated.setDate(dateString.substring(0, 2));
|
||||
lastUpdated.setHours(0, 0, 0, 0);
|
||||
|
||||
if (updated && lastUpdated <= updated) {
|
||||
console.debug(`Table ${toTable} already updated, skipping...`);
|
||||
return;
|
||||
}
|
||||
|
||||
const tx = await Self.beginTransaction({});
|
||||
|
||||
try {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM mariadb:10.4.13
|
||||
FROM mariadb:10.7.3
|
||||
|
||||
ENV MYSQL_ROOT_PASSWORD root
|
||||
ENV TZ Europe/Madrid
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
CREATE TABLE `vn`.`mdbBranch` (
|
||||
CREATE TABLE IF NOT EXISTS `vn`.`mdbBranch` (
|
||||
`name` VARCHAR(255),
|
||||
PRIMARY KEY(`name`)
|
||||
);
|
||||
|
||||
CREATE TABLE `vn`.`mdbVersion` (
|
||||
CREATE TABLE IF NOT EXISTS `vn`.`mdbVersion` (
|
||||
`app` VARCHAR(255) NOT NULL,
|
||||
`branchFk` VARCHAR(255) NOT NULL,
|
||||
`version` INT,
|
||||
CONSTRAINT `mdbVersion_branchFk` FOREIGN KEY (`branchFk`) REFERENCES `vn`.`mdbBranch` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
);
|
||||
|
||||
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
||||
VALUES('MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
|
||||
INSERT IGNORE INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
||||
VALUES(318, 'MdbVersion', '*', '*', 'ALLOW', 'ROLE', 'developer');
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
|
||||
VALUES
|
||||
('ClaimObservation','*','WRITE','ALLOW','ROLE','salesPerson'),
|
||||
('ClaimObservation','*','READ','ALLOW','ROLE','salesPerson'),
|
||||
('Client','setPassword','WRITE','ALLOW','ROLE','salesPerson'),
|
||||
('Client','updateUser','WRITE','ALLOW','ROLE','salesPerson');
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
alter table `vn`.`client`
|
||||
add hasIncoterms tinyint(1) default 0 not null comment 'Received incoterms authorization from client';
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO `vn`.`sample` (code, description, isVisible, hasCompany, hasPreview, datepickerEnabled)
|
||||
VALUES ('incoterms-authorization', 'Autorización de incoterms', 1, 1, 1, 0);
|
|
@ -0,0 +1,13 @@
|
|||
CREATE TABLE `vn`.`claimObservation` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`claimFk` int(10) unsigned NOT NULL,
|
||||
`workerFk` int(10) unsigned DEFAULT NULL,
|
||||
`text` text COLLATE utf8_unicode_ci NOT NULL,
|
||||
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `worker_key` (`workerFk`),
|
||||
KEY `claim_key` (`claimFk`),
|
||||
KEY `claimObservation_created_IDX` (`created`) USING BTREE,
|
||||
CONSTRAINT `claimObservation_ibfk_1` FOREIGN KEY (`claimFk`) REFERENCES `vn`.`claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `claimObservation_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
|
||||
) COMMENT='Todas las observaciones referentes a una reclamación'
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO `vn`.`claimObservation` (`claimFk`, `text`, `created`)
|
||||
SELECT `id`, `observation`, `created` FROM `vn`.`claim`
|
File diff suppressed because one or more lines are too long
|
@ -122,22 +122,22 @@ INSERT INTO `vn`.`currency`(`id`, `code`, `name`, `ratio`)
|
|||
(3, 'GBP', 'Libra', 1),
|
||||
(4, 'JPY', 'Yen Japones', 1);
|
||||
|
||||
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`)
|
||||
INSERT INTO `vn`.`country`(`id`, `country`, `isUeeMember`, `code`, `currencyFk`, `politicalCountryFk`, `ibanLength`, `continentFk`, `hasDailyInvoice`, `CEE`)
|
||||
VALUES
|
||||
(1, 'España', 1, 'ES', 1, 24, 4, 0, 1),
|
||||
(2, 'Italia', 1, 'IT', 1, 27, 4, 0, 1),
|
||||
(3, 'Alemania', 1, 'DE', 1, 22, 4, 0, 1),
|
||||
(4, 'Rumania', 1, 'RO', 1, 24, 4, 0, 1),
|
||||
(5, 'Holanda', 1, 'NL', 1, 18, 4, 0, 1),
|
||||
(8, 'Portugal', 1, 'PT', 1, 27, 4, 0, 1),
|
||||
(13,'Ecuador', 0, 'EC', 1, 24, 2, 1, 2),
|
||||
(19,'Francia', 1, 'FR', 1, 27, 4, 0, 1),
|
||||
(30,'Canarias', 1, 'IC', 1, 24, 4, 1, 2);
|
||||
(1, 'España', 1, 'ES', 1, 1, 24, 4, 0, 1),
|
||||
(2, 'Italia', 1, 'IT', 1, 2, 27, 4, 0, 1),
|
||||
(3, 'Alemania', 1, 'DE', 1, 3, 22, 4, 0, 1),
|
||||
(4, 'Rumania', 1, 'RO', 1, 4, 24, 4, 0, 1),
|
||||
(5, 'Holanda', 1, 'NL', 1, 5, 18, 4, 0, 1),
|
||||
(8, 'Portugal', 1, 'PT', 1, 8, 27, 4, 0, 1),
|
||||
(13,'Ecuador', 0, 'EC', 1, 13, 24, 2, 1, 2),
|
||||
(19,'Francia', 1, 'FR', 1, 19, 27, 4, 0, 1),
|
||||
(30,'Canarias', 1, 'IC', 1, 1, 24, 4, 1, 2);
|
||||
|
||||
INSERT INTO `vn`.`warehouseAlias`(`id`, `name`)
|
||||
VALUES
|
||||
(1, 'Main Warehouse'),
|
||||
(2, 'Silla');
|
||||
(2, 'Gotham');
|
||||
|
||||
INSERT INTO `vn`.`warehouse`(`id`, `name`, `code`, `isComparative`, `isInventory`, `hasAvailable`, `isManaged`, `hasStowaway`, `hasDms`, `hasComission`, `aliasFk`, `countryFk`, `hasProduction`)
|
||||
VALUES
|
||||
|
@ -148,10 +148,10 @@ INSERT INTO `vn`.`warehouse`(`id`, `name`, `code`, `isComparative`, `isInventory
|
|||
(5, 'Warehouse Five', NULL, 1, 1, 1, 1, 0, 0, 0, 2, 1, 1),
|
||||
(13, 'Inventory', NULL, 1, 1, 1, 0, 0, 0, 0, 2, 1, 0);
|
||||
|
||||
INSERT INTO `vn`.`sector`(`id`, `description`, `warehouseFk`, `isPreviousPreparedByPacking`, `code`, `pickingPlacement`, `path`)
|
||||
INSERT INTO `vn`.`sector`(`id`, `description`, `warehouseFk`, `isPreviousPreparedByPacking`, `code`)
|
||||
VALUES
|
||||
(1, 'First sector', 1, 1, 'FIRST', 999, 999),
|
||||
(2, 'Second sector', 2, 0, 'SECOND', 100, 150);
|
||||
(1, 'First sector', 1, 1, 'FIRST'),
|
||||
(2, 'Second sector', 2, 0, 'SECOND');
|
||||
|
||||
INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`)
|
||||
VALUES
|
||||
|
@ -174,15 +174,19 @@ INSERT INTO `vn`.`accountingType`(`id`, `description`, `receiptDescription`,`cod
|
|||
(6, 'Loans', NULL, NULL, NULL, 0),
|
||||
(7, 'Leasing', NULL, NULL, NULL, 0),
|
||||
(8, 'Compensations', 'Compensations', 'compensation', NULL, 0);
|
||||
|
||||
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
|
||||
VALUES
|
||||
(1, 'Pay on receipt', '5720000001', 3, 0, 1, 1),
|
||||
(2, 'Cash', '5700000001', 2, 0, 1, 1),
|
||||
(3, 'Compensation', '4000000000', 8, 0, 1, 1),
|
||||
(4, 'Transfers', '4000000001', 1, 0, 1, 1),
|
||||
(3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 3117, 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
||||
VALUES
|
||||
(128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
|
||||
(2100, 1, 'Caixa Bank', 'CAIXESBB');
|
||||
|
||||
INSERT INTO `vn`.`bank`(`id`, `bank`, `account`, `cash`, `entityFk`, `isActive`, `currencyFk`)
|
||||
VALUES
|
||||
(1, 'Pay on receipt', '5720000001', 3, 128, 1, 1),
|
||||
(2, 'Cash', '5700000001', 2, 128, 1, 1),
|
||||
(3, 'Compensation', '4000000000', 8, 128, 1, 1),
|
||||
(4, 'Transfers', '4000000001', 1, 128, 1, 1),
|
||||
(3117, 'Caixa Rural d''Algemesi', '5720000000', 8, 2100, 1, 1);
|
||||
|
||||
INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
|
||||
VALUES
|
||||
|
@ -191,18 +195,18 @@ INSERT INTO `vn`.`deliveryMethod`(`id`, `code`, `description`)
|
|||
(3, 'PICKUP', 'Recogida'),
|
||||
(4, 'OTHER', 'Otros');
|
||||
|
||||
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `isVolumetric`, `bankFk`, `warehouseAliasFk`)
|
||||
INSERT INTO `vn`.`agency`(`id`, `name`, `warehouseFk`, `bankFk__`, `warehouseAliasFk`)
|
||||
VALUES
|
||||
(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, 'Refund' , 1, 0, 1, 1),
|
||||
(10, 'Other agency' , 1, 0, 1, 1);
|
||||
(1, 'inhouse pickup' , 1, 1, 1),
|
||||
(2, 'Super-Man delivery' , 1, 1, 1),
|
||||
(3, 'Teleportation device' , 1, 1, 1),
|
||||
(4, 'Entanglement' , 1, 1, 1),
|
||||
(5, 'Quantum break device' , 1, 1, 1),
|
||||
(6, 'Walking' , 1, 1, 1),
|
||||
(7, 'Gotham247' , 1, 1, 1),
|
||||
(8, 'Gotham247Expensive' , 1, 1, 1),
|
||||
(9, 'Refund' , 1, 1, 1),
|
||||
(10, 'Other agency' , 1, 1, 1);
|
||||
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 1 WHERE `name` = 'inhouse pickup';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 2 WHERE `name` = 'Super-Man delivery';
|
||||
|
@ -210,8 +214,8 @@ UPDATE `vn`.`agencyMode` SET `id` = 3 WHERE `name` = 'Teleportation device';
|
|||
UPDATE `vn`.`agencyMode` SET `id` = 4 WHERE `name` = 'Entanglement';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 5 WHERE `name` = 'Quantum break device';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 6 WHERE `name` = 'Walking';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 7 WHERE `name` = 'Silla247';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 8 WHERE `name` = 'Silla247Expensive';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 7 WHERE `name` = 'Gotham247';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 8 WHERE `name` = 'Gotham247Expensive';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 23 WHERE `name` = 'Refund';
|
||||
UPDATE `vn`.`agencyMode` SET `id` = 10 WHERE `name` = 'Other agency';
|
||||
|
||||
|
@ -263,7 +267,7 @@ INSERT INTO `vn`.`province`(`id`, `name`, `countryFk`, `autonomyFk`, `warehouseF
|
|||
INSERT INTO `vn`.`town`(`id`, `name`, `provinceFk`)
|
||||
VALUES
|
||||
(1, 'Valencia', 1),
|
||||
(2, 'Silla', 1),
|
||||
(2, 'Gotham', 1),
|
||||
(3, 'Algemesi', 1),
|
||||
(4, 'Alzira', 1),
|
||||
(5, 'Quito', 5);
|
||||
|
@ -297,21 +301,21 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`)
|
|||
|
||||
INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`,`mailAddress`,`hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`)
|
||||
VALUES
|
||||
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Silla', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Silla', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Silla', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Silla', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Silla', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Silla', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Silla', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
|
||||
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Silla', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
|
||||
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Silla', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL),
|
||||
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Silla', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL);
|
||||
(1101, 'Bruce Wayne', '84612325V', 'Batman', 'Alfred', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1102, 'Petter Parker', '87945234L', 'Spider man', 'Aunt May', '20 Ingram Street, Queens, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'),
|
||||
(1106, 'DavidCharlesHaller', '53136686Q', 'Legion', 'Charles Xavier', 'City of New York, New York, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1107, 'Hank Pym', '09854837G', 'Ant man', 'Hawk', 'Anthill, San Francisco, California', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'),
|
||||
(1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'),
|
||||
(1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'),
|
||||
(1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL),
|
||||
(1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 1, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, NULL);
|
||||
|
||||
INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `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, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1
|
||||
SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1
|
||||
FROM `account`.`role` `r`
|
||||
WHERE `r`.`hasLogin` = 1;
|
||||
|
||||
|
@ -328,51 +332,51 @@ INSERT INTO `vn`.`clientConfig`(`riskTolerance`, `maxCreditRows`)
|
|||
|
||||
INSERT INTO `vn`.`address`(`id`, `nickname`, `street`, `city`, `postalCode`, `provinceFk`, `phone`, `mobile`, `isActive`, `clientFk`, `agencyModeFk`, `longitude`, `latitude`, `isEqualizated`, `isDefaultAddress`)
|
||||
VALUES
|
||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 1),
|
||||
(2, 'Petter Parker', '20 Ingram Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 1),
|
||||
(3, 'Clark Kent', '344 Clinton Street', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 1),
|
||||
(4, 'Tony Stark', '10880 Malibu Point', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 1),
|
||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1),
|
||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1),
|
||||
(7, 'Hank Pym', 'Anthill', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1),
|
||||
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1),
|
||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1),
|
||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1),
|
||||
(11, 'Missing', 'The space', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1),
|
||||
(12, 'Trash', 'New York city', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1),
|
||||
(101, 'Somewhere in Thailand', 'address 01', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(102, 'Somewhere in Poland', 'address 02', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(103, 'Somewhere in Japan', 'address 03', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(104, 'Somewhere in Spain', 'address 04', 'Silla', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(105, 'Somewhere in Potugal', 'address 05', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(106, 'Somewhere in UK', 'address 06', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(107, 'Somewhere in Valencia', 'address 07', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(108, 'Somewhere in Silla', 'address 08', 'Silla', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(109, 'Somewhere in London', 'address 09', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(110, 'Somewhere in Algemesi', 'address 10', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(111, 'Somewhere in Carlet', 'address 11', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(112, 'Somewhere in Campanar', 'address 12', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(113, 'Somewhere in Malilla', 'address 13', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(114, 'Somewhere in France', 'address 14', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(115, 'Somewhere in Birmingham', 'address 15', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(116, 'Somewhere in Scotland', 'address 16', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(117, 'Somewhere in util.VN_NOWhere', 'address 17', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(118, 'Somewhere over the rainbow', 'address 18', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(119, 'Somewhere in Alberic', 'address 19', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(120, 'Somewhere in Montortal', 'address 20', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(121, 'the bat cave', 'address 21', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0),
|
||||
(122, 'NY roofs', 'address 22', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0),
|
||||
(123, 'The phone box', 'address 23', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 0),
|
||||
(124, 'Stark tower Silla', 'address 24', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0),
|
||||
(125, 'The plastic cell', 'address 25', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0),
|
||||
(126, 'Many places', 'address 26', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0),
|
||||
(127, 'Your pocket', 'address 27', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0),
|
||||
(128, 'Cerebro', 'address 28', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0),
|
||||
(129, 'Luke Cages Bar', 'address 29', 'Silla', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0),
|
||||
(130, 'Non valid address', 'address 30', 'Silla', 46460, 1, 1111111111, 222222222, 0, 1101, 2, NULL, NULL, 0, 0);
|
||||
(1, 'Bruce Wayne', '1007 Mountain Drive, Gotham', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 1),
|
||||
(2, 'Petter Parker', '20 Ingram Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 1),
|
||||
(3, 'Clark Kent', '344 Clinton Street', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 1),
|
||||
(4, 'Tony Stark', '10880 Malibu Point', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 1),
|
||||
(5, 'Max Eisenhardt', 'Unknown Whereabouts', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 1),
|
||||
(6, 'DavidCharlesHaller', 'Evil hideout', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 1),
|
||||
(7, 'Hank Pym', 'Anthill', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 1),
|
||||
(8, 'Charles Xavier', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 1),
|
||||
(9, 'Bruce Banner', 'Somewhere in New York', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 1),
|
||||
(10, 'Jessica Jones', 'NYCC 2015 Poster', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 1),
|
||||
(11, 'Missing', 'The space', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1111, 10, NULL, NULL, 0, 1),
|
||||
(12, 'Trash', 'New York city', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1112, 10, NULL, NULL, 0, 1),
|
||||
(101, 'Somewhere in Thailand', 'address 01', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(102, 'Somewhere in Poland', 'address 02', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(103, 'Somewhere in Japan', 'address 03', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(104, 'Somewhere in Spain', 'address 04', 'Gotham', 46460, 1, 3333333333, 444444444, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(105, 'Somewhere in Potugal', 'address 05', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(106, 'Somewhere in UK', 'address 06', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(107, 'Somewhere in Valencia', 'address 07', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(108, 'Somewhere in Gotham', 'address 08', 'Gotham', 46460, 1, 5555555555, 666666666, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(109, 'Somewhere in London', 'address 09', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(110, 'Somewhere in Algemesi', 'address 10', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(111, 'Somewhere in Carlet', 'address 11', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(112, 'Somewhere in Campanar', 'address 12', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(113, 'Somewhere in Malilla', 'address 13', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(114, 'Somewhere in France', 'address 14', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(115, 'Somewhere in Birmingham', 'address 15', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(116, 'Somewhere in Scotland', 'address 16', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(117, 'Somewhere in nowhere', 'address 17', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(118, 'Somewhere over the rainbow', 'address 18', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(119, 'Somewhere in Alberic', 'address 19', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(120, 'Somewhere in Montortal', 'address 20', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1109, 2, NULL, NULL, 0, 0),
|
||||
(121, 'the bat cave', 'address 21', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1101, 2, NULL, NULL, 0, 0),
|
||||
(122, 'NY roofs', 'address 22', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1102, 2, NULL, NULL, 0, 0),
|
||||
(123, 'The phone box', 'address 23', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1103, 2, NULL, NULL, 0, 0),
|
||||
(124, 'Stark tower Gotham', 'address 24', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1104, 2, NULL, NULL, 0, 0),
|
||||
(125, 'The plastic cell', 'address 25', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1105, 2, NULL, NULL, 0, 0),
|
||||
(126, 'Many places', 'address 26', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1106, 2, NULL, NULL, 0, 0),
|
||||
(127, 'Your pocket', 'address 27', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1107, 2, NULL, NULL, 0, 0),
|
||||
(128, 'Cerebro', 'address 28', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1108, 2, NULL, NULL, 0, 0),
|
||||
(129, 'Luke Cages Bar', 'address 29', 'Gotham', 46460, 1, 1111111111, 222222222, 1, 1110, 2, NULL, NULL, 0, 0),
|
||||
(130, 'Non valid address', 'address 30', 'Gotham', 46460, 1, 1111111111, 222222222, 0, 1101, 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
|
||||
SELECT name, CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, 1, id, 2, 1
|
||||
FROM `account`.`role` `r`
|
||||
WHERE `r`.`hasLogin` = 1;
|
||||
|
||||
|
@ -470,11 +474,19 @@ INSERT INTO `vn`.`companyGroup`(`id`, `code`)
|
|||
VALUES
|
||||
(1, 'wayneIndustries'),
|
||||
(2, 'verdnatura');
|
||||
|
||||
INSERT INTO `vn`.`bankEntity`(`id`, `countryFk`, `name`, `bic`)
|
||||
|
||||
INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
||||
VALUES
|
||||
(128, 1, 'The Best Bank', 'BBKKESMMMMMM'),
|
||||
(2100, 1, 'Caixa Bank', 'CAIXESBB');
|
||||
('animals', 'Food and complements for pets'),
|
||||
('complements', 'Other complements'),
|
||||
('flowerPlants', 'Wholesale of flowers and plants'),
|
||||
('vegetablesFruits', 'Fruit and vegetable trade');
|
||||
|
||||
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
|
||||
VALUES
|
||||
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
||||
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'GOTHAM', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
||||
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'GOTHAM', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
|
||||
|
||||
INSERT INTO `vn`.`supplierAccount`(`id`, `supplierFk`, `iban`, `bankEntityFk`)
|
||||
VALUES
|
||||
|
@ -692,7 +704,7 @@ INSERT INTO `vn`.`stowaway`(`id`, `shipFk`, `created`)
|
|||
|
||||
INSERT INTO `vn`.`deliveryPoint` (`id`, `name`, `ubication`)
|
||||
VALUES
|
||||
(1, 'Silla','46460 Av Espioca 100-Silla');
|
||||
(1, 'Gotham','1007 Mountain Drive, Gotham');
|
||||
|
||||
INSERT INTO `vn`.`vehicle`(`id`, `numberPlate`, `tradeMark`, `model`, `companyFk`, `warehouseFk`, `description`, `m3`, `isActive`, `deliveryPointFk`)
|
||||
VALUES
|
||||
|
@ -875,18 +887,18 @@ INSERT INTO `vn`.`expeditionStateType`(`id`, `description`, `code`)
|
|||
(3, 'Perdida', 'LOST');
|
||||
|
||||
|
||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`)
|
||||
INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `workerFk`, `externalId`, `packagingFk`, `stateTypeFk`)
|
||||
VALUES
|
||||
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 1, 18, 'UR9000006041', 94, 1),
|
||||
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 1, 18, 'UR9000006041', 94, 1),
|
||||
(3, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 3, 1, 18, 'UR9000006041', 94, 2),
|
||||
(4, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 4, 1, 18, 'UR9000006041', 94, 2),
|
||||
(5, 1, 2, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 1, 18, NULL, 94, 3),
|
||||
(6, 7, 3, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 1, 1, 18, NULL, 94, 3),
|
||||
(7, 2, 4, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, 1, 1, 18, NULL, 94, NULL),
|
||||
(8, 3, 5, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, 1, 1, 18, NULL, 94, 1),
|
||||
(9, 3, 6, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 1, 18, NULL, 94, 2),
|
||||
(10, 7, 7, 71, NOW(), NULL, 1, 1, 18, NULL, 94, 3);
|
||||
(1, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 15, 1, 18, 'UR9000006041', 94, 1),
|
||||
(2, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 16, 2, 18, 'UR9000006041', 94, 1),
|
||||
(3, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 3, 18, 'UR9000006041', 94, 2),
|
||||
(4, 1, 1, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 4, 18, 'UR9000006041', 94, 2),
|
||||
(5, 1, 2, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 3),
|
||||
(6, 7, 3, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -2 MONTH), NULL, 1, 18, NULL, 94, 3),
|
||||
(7, 2, 4, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -3 MONTH), NULL, 1, 18, NULL, 94, NULL),
|
||||
(8, 3, 5, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -4 MONTH), NULL, 1, 18, NULL, 94, 1),
|
||||
(9, 3, 6, 71, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), NULL, 1, 18, NULL, 94, 2),
|
||||
(10, 7, 7, 71, NOW(), NULL, 1, 18, NULL, 94, 3);
|
||||
|
||||
|
||||
INSERT INTO `vn`.`expeditionState`(`id`, `created`, `expeditionFk`, `typeFk`, `userFk`)
|
||||
|
@ -1111,13 +1123,6 @@ INSERT INTO `vn`.`itemBarcode`(`id`, `itemFk`, `code`)
|
|||
(2, 1, 2222222222),
|
||||
(3, 1, 3333333333),
|
||||
(4, 2, 4444444444);
|
||||
|
||||
INSERT INTO `vn`.`itemPlacement`(`id`, `itemFk`, `warehouseFk`, `code`)
|
||||
VALUES
|
||||
(1, 1, 1, 'A11'),
|
||||
(2, 1, 2, 'A22'),
|
||||
(3, 1, 3, 'A33'),
|
||||
(4, 2, 1, 'A44');
|
||||
|
||||
INSERT INTO `vn`.`train`(`id`, `name`)
|
||||
VALUES
|
||||
|
@ -1284,9 +1289,9 @@ INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
|||
VALUES
|
||||
(1, 1, 1, 0),
|
||||
(2, 2, 2, 0),
|
||||
(3, 3, 3, 1),
|
||||
(4, 1, 4, 1),
|
||||
(5, 1, 5, 1);
|
||||
(3, 3, 3, 0),
|
||||
(4, 1, 4, 4),
|
||||
(5, 1, 5, 5);
|
||||
|
||||
CALL `vn`.`itemRefreshTags`(NULL);
|
||||
|
||||
|
@ -1309,13 +1314,6 @@ INSERT INTO `vn`.`annualAverageInvoiced`(`clientFk`, `invoiced`)
|
|||
(1104, 500),
|
||||
(1105, 5000);
|
||||
|
||||
INSERT INTO `vn`.`supplierActivity`(`code`, `name`)
|
||||
VALUES
|
||||
('animals', 'Food and complements for pets'),
|
||||
('complements', 'Other complements'),
|
||||
('flowerPlants', 'Wholesale of flowers and plants'),
|
||||
('vegetablesFruits', 'Fruit and vegetable trade');
|
||||
|
||||
INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `provinceFk`, `postalCode`, `city`, `phone`, `mobile`)
|
||||
VALUES
|
||||
(1, 1, 'Ace Chemicals', 'The Midtown', 1, '46000', 'Gotham', '111111111', '222222222'),
|
||||
|
@ -1325,12 +1323,6 @@ INSERT INTO `vn`.`supplierAddress`(`id`, `supplierFk`, `nickname`, `street`, `pr
|
|||
(5, 442, 'GCR building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222'),
|
||||
(6, 442, 'The Gotham Tonight building', 'Bristol district', 1, '46000', 'Gotham', '111111111', '222222222');
|
||||
|
||||
INSERT INTO `vn`.`supplier`(`id`, `name`, `nickname`,`account`,`countryFk`,`nif`, `commission`, `created`, `isActive`, `street`, `city`, `provinceFk`, `postCode`, `payMethodFk`, `payDemFk`, `payDay`, `taxTypeSageFk`, `withholdingSageFk`, `transactionTypeSageFk`, `workerFk`, `supplierActivityFk`, `isPayMethodChecked`, `healthRegister`)
|
||||
VALUES
|
||||
(1, 'Plants SL', 'Plants nick', 4100000001, 1, '06089160W', 0, util.VN_CURDATE(), 1, 'supplier address 1', 'PONTEVEDRA', 1, 15214, 1, 1, 15, 4, 1, 1, 18, 'flowerPlants', 1, '400664487V'),
|
||||
(2, 'Farmer King', 'The farmer', 4000020002, 1, '87945234L', 0, util.VN_CURDATE(), 1, 'supplier address 2', 'SILLA', 2, 43022, 1, 2, 10, 93, 2, 8, 18, 'animals', 1, '400664487V'),
|
||||
(442, 'Verdnatura Levante SL', 'Verdnatura', 5115000442, 1, '06815934E', 0, util.VN_CURDATE(), 1, 'supplier address 3', 'SILLA', 1, 43022, 1, 2, 15, 6, 9, 3, 18, 'complements', 1, '400664487V');
|
||||
|
||||
INSERT INTO `vn`.`supplierContact`(`id`, `supplierFk`, `phone`, `mobile`, `email`, `observation`, `name`)
|
||||
VALUES
|
||||
(1, 1, 123121212, 654789123, 'supplier1@email.es', 'observation1', 'the boss'),
|
||||
|
@ -1737,12 +1729,19 @@ INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`,
|
|||
( 6, 'mana', 'Mana', 1, 4, 0),
|
||||
( 7, 'lack', 'Faltas', 1, 2, 0);
|
||||
|
||||
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `observation`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`)
|
||||
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`)
|
||||
VALUES
|
||||
(1, util.VN_CURDATE(), 1, 'Cu nam labores lobortis definiebas, ei aliquyam salutatus persequeris quo, cum eu nemore fierent dissentiunt. Per vero dolor id, vide democritum scribentur eu vim, pri erroribus temporibus ex.', 1101, 18, 3, 0, util.VN_CURDATE(), 0),
|
||||
(2, util.VN_CURDATE(), 2, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.', 1101, 18, 3, 0, util.VN_CURDATE(), 1),
|
||||
(3, util.VN_CURDATE(), 3, 'An vim commodo dolorem volutpat, cu expetendis voluptatum usu, et mutat consul adversarium his. His natum numquam legimus an, diam fabulas mei ut. Melius fabellas sadipscing vel id. Partem diceret mandamus mea ne, has te tempor nostrud. Aeque nostro eum no.', 1101, 18, 1, 1, util.VN_CURDATE(), 5),
|
||||
(4, util.VN_CURDATE(), 3, 'Wisi forensibus mnesarchum in cum. Per id impetus abhorreant, his no magna definiebas, inani rationibus in quo. Ut vidisse dolores est, ut quis nominavi mel. Ad pri quod apeirian concludaturque.', 1104, 18, 5, 0, util.VN_CURDATE(), 10);
|
||||
(1, util.VN_CURDATE(), 1, 1101, 18, 3, 0, util.VN_CURDATE(), 0),
|
||||
(2, util.VN_CURDATE(), 2, 1101, 18, 3, 0, util.VN_CURDATE(), 1),
|
||||
(3, util.VN_CURDATE(), 3, 1101, 18, 1, 1, util.VN_CURDATE(), 5),
|
||||
(4, util.VN_CURDATE(), 3, 1104, 18, 5, 0, util.VN_CURDATE(), 10);
|
||||
|
||||
INSERT INTO `vn`.`claimObservation` (`claimFk`, `workerFk`, `text`, `created`)
|
||||
VALUES
|
||||
(1, 18, 'Cu nam labores lobortis definiebas, ei aliquyam salutatus persequeris quo, cum eu nemore fierent dissentiunt. Per vero dolor id, vide democritum scribentur eu vim, pri erroribus temporibus ex.', util.VN_CURDATE()),
|
||||
(2, 18, 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.', util.VN_CURDATE()),
|
||||
(3, 18, 'An vim commodo dolorem volutpat, cu expetendis voluptatum usu, et mutat consul adversarium his. His natum numquam legimus an, diam fabulas mei ut. Melius fabellas sadipscing vel id. Partem diceret mandamus mea ne, has te tempor nostrud. Aeque nostro eum no.', util.VN_CURDATE()),
|
||||
(4, 18, 'Wisi forensibus mnesarchum in cum. Per id impetus abhorreant, his no magna definiebas, inani rationibus in quo. Ut vidisse dolores est, ut quis nominavi mel. Ad pri quod apeirian concludaturque.', util.VN_CURDATE());
|
||||
|
||||
INSERT INTO `vn`.`claimBeginning`(`id`, `claimFk`, `saleFk`, `quantity`)
|
||||
VALUES
|
||||
|
@ -1892,6 +1891,10 @@ INSERT INTO `postgresql`.`business` (`client_id`, `provider_id`, `date_start`, `
|
|||
FROM `postgresql`.`profile` `p`
|
||||
WHERE `p`.`profile_id` = 1109;
|
||||
|
||||
UPDATE `postgresql`.`business`
|
||||
SET `payedHolidays`= 8
|
||||
WHERE `business_id`= 1106;
|
||||
|
||||
INSERT INTO `postgresql`.`business_labour` (`business_id`, `notes`, `department_id`, `professional_category_id`, `incentivo`, `calendar_labour_type_id`, `porhoras`, `labour_agreement_id`, `workcenter_id`)
|
||||
VALUES
|
||||
(1111, NULL, 23, 1, 0.0, 1, 1, 1, 1);
|
||||
|
@ -1917,11 +1920,6 @@ INSERT INTO `postgresql`.`profile_media`(`profile_media_id`, `profile_id`, `medi
|
|||
(1, 1106, 1),
|
||||
(2, 1107, 2);
|
||||
|
||||
INSERT INTO `vn`.`workCenter` (`id`, `name`, `warehouseFk`)
|
||||
VALUES
|
||||
('1', 'Silla', '1'),
|
||||
('5', 'Madrid', '5');
|
||||
|
||||
INSERT INTO `vn`.`workCenterHoliday` (`workCenterFk`, `days`, `year`)
|
||||
VALUES
|
||||
('1', '27.5', YEAR(util.VN_CURDATE())),
|
||||
|
@ -1929,7 +1927,7 @@ INSERT INTO `vn`.`workCenterHoliday` (`workCenterFk`, `days`, `year`)
|
|||
('1', '24.5', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR))),
|
||||
('5', '23', YEAR(DATE_ADD(util.VN_CURDATE(), INTERVAL -1 YEAR)));
|
||||
|
||||
INSERT INTO `postgresql`.`calendar_state` (`calendar_state_id`, `type`, `rgb`, `code`, `holidayEntitlementRate`, `discountRate`)
|
||||
INSERT INTO `vn`.`absenceType` (`id`, `name`, `rgb`, `code`, `holidayEntitlementRate`, `discountRate`)
|
||||
VALUES
|
||||
(1, 'Holidays', '#FF4444', 'holiday', 0, 0),
|
||||
(2, 'Leave of absence', '#C71585', 'absence', 0, 1),
|
||||
|
|
29655
db/dump/structure.sql
29655
db/dump/structure.sql
File diff suppressed because it is too large
Load Diff
|
@ -65,6 +65,7 @@ TABLES=(
|
|||
ticketUpdateAction
|
||||
time
|
||||
volumeConfig
|
||||
workCenter
|
||||
)
|
||||
dump_tables ${TABLES[@]}
|
||||
|
||||
|
@ -101,7 +102,6 @@ TABLES=(
|
|||
media_type
|
||||
professional_category
|
||||
profile_type
|
||||
workcenter
|
||||
)
|
||||
dump_tables ${TABLES[@]}
|
||||
|
||||
|
@ -111,4 +111,4 @@ TABLES=(
|
|||
TiposTransacciones
|
||||
TiposRetencion
|
||||
)
|
||||
dump_tables ${TABLES[@]}
|
||||
dump_tables ${TABLES[@]}
|
||||
|
|
|
@ -96,12 +96,12 @@ mysqldump \
|
|||
--databases \
|
||||
${SCHEMAS[@]} \
|
||||
${IGNORETABLES[@]} \
|
||||
| sed 's/\bCURDATE\b/vn.VN_CURDATE/ig'\
|
||||
| sed 's/\bCURTIME\b/vn.VN_CURTIME/ig' \
|
||||
| sed 's/\bNOW\b/vn.VN_NOW/ig' \
|
||||
| sed 's/\bCURRENT_DATE\b/vn.VN_CURDATE/ig' \
|
||||
| sed 's/\bCURRENT_TIME\b/vn.VN_CURTIME/ig' \
|
||||
| sed 's/\bLOCALTIME\b/vn.VN_NOW/ig' \
|
||||
| sed 's/\bLOCALTIMESTAMP\b/vn.VN_NOW/ig' \
|
||||
| sed 's/\bCURDATE\b/util.VN_CURDATE/ig'\
|
||||
| sed 's/\bCURTIME\b/util.VN_CURTIME/ig' \
|
||||
| sed 's/\bNOW\b/util.VN_NOW/ig' \
|
||||
| sed 's/\bCURRENT_DATE\b/util.VN_CURDATE/ig' \
|
||||
| sed 's/\bCURRENT_TIME\b/util.VN_CURTIME/ig' \
|
||||
| sed 's/\bLOCALTIME\b/util.VN_NOW/ig' \
|
||||
| sed 's/\bLOCALTIMESTAMP\b/util.VN_NOW/ig' \
|
||||
| sed 's/ AUTO_INCREMENT=[0-9]* //g' \
|
||||
> dump/structure.sql
|
|
@ -276,6 +276,7 @@ export default {
|
|||
clientWebAccess: {
|
||||
enableWebAccessCheckbox: 'vn-check[label="Enable web access"]',
|
||||
userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
|
||||
email: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.email"]',
|
||||
saveButton: 'button[type=submit]'
|
||||
},
|
||||
clientNotes: {
|
||||
|
@ -543,7 +544,8 @@ export default {
|
|||
searchResultDate: 'vn-ticket-summary [label=Landed] span',
|
||||
topbarSearch: 'vn-searchbar',
|
||||
moreMenu: 'vn-ticket-index vn-icon-button[icon=more_vert]',
|
||||
sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6)',
|
||||
fourthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(4)',
|
||||
fiveWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tbody vn-tr:nth-child(5)',
|
||||
weeklyTicket: 'vn-ticket-weekly-index vn-table > div > vn-tbody > vn-tr',
|
||||
firstWeeklyTicketDeleteIcon: 'vn-ticket-weekly-index vn-tr:nth-child(1) vn-icon-button[icon="delete"]',
|
||||
firstWeeklyTicketAgency: 'vn-ticket-weekly-index vn-tr:nth-child(1) [ng-model="weekly.agencyModeFk"]',
|
||||
|
@ -596,7 +598,7 @@ export default {
|
|||
submitNotesButton: 'button[type=submit]'
|
||||
},
|
||||
ticketExpedition: {
|
||||
secondExpeditionRemoveButton: 'vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]',
|
||||
thirdExpeditionRemoveButton: 'vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]',
|
||||
expeditionRow: 'vn-ticket-expedition vn-table vn-tbody > vn-tr'
|
||||
},
|
||||
ticketPackages: {
|
||||
|
@ -728,7 +730,7 @@ export default {
|
|||
claimSummary: {
|
||||
header: 'vn-claim-summary > vn-card > h5',
|
||||
state: 'vn-claim-summary vn-label-value[label="State"] > section > span',
|
||||
observation: 'vn-claim-summary vn-textarea[ng-model="$ctrl.summary.claim.observation"]',
|
||||
observation: 'vn-claim-summary vn-horizontal.text',
|
||||
firstSaleItemId: 'vn-claim-summary vn-horizontal > vn-auto:nth-child(5) vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(1) > span',
|
||||
firstSaleDescriptorImage: '.vn-popover.shown vn-item-descriptor img',
|
||||
itemDescriptorPopover: '.vn-popover.shown vn-item-descriptor',
|
||||
|
@ -740,7 +742,6 @@ export default {
|
|||
},
|
||||
claimBasicData: {
|
||||
claimState: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]',
|
||||
observation: 'vn-textarea[ng-model="$ctrl.claim.observation"]',
|
||||
packages: 'vn-input-number[ng-model="$ctrl.claim.packages"]',
|
||||
hasToPickUpCheckbox: 'vn-claim-basic-data vn-check[ng-model="$ctrl.claim.hasToPickUp"]',
|
||||
saveButton: `button[type=submit]`
|
||||
|
@ -770,6 +771,12 @@ export default {
|
|||
secondClaimRedelivery: 'vn-claim-development vn-horizontal:nth-child(2) vn-autocomplete[ng-model="claimDevelopment.claimRedeliveryFk"]',
|
||||
saveDevelopmentButton: 'button[type=submit]'
|
||||
},
|
||||
claimNote: {
|
||||
addNoteFloatButton: 'vn-float-button',
|
||||
note: 'vn-textarea[ng-model="$ctrl.note.text"]',
|
||||
saveButton: 'button[type=submit]',
|
||||
firstNoteText: 'vn-claim-note .text'
|
||||
},
|
||||
claimAction: {
|
||||
importClaimButton: 'vn-claim-action vn-button[label="Import claim"]',
|
||||
anyLine: 'vn-claim-action vn-tbody > vn-tr',
|
||||
|
|
|
@ -276,7 +276,7 @@ describe('Client Edit fiscalData path', () => {
|
|||
// confirm invoice by address checkbox gets checked if the EQtax differs between addresses step 2
|
||||
it(`should click on the 1st edit icon to access the address details and uncheck EQtax checkbox`, async() => {
|
||||
await page.waitToClick(selectors.clientAddresses.firstEditAddress);
|
||||
await page.waitForTextInField(selectors.clientAddresses.city, 'Silla');
|
||||
await page.waitForTextInField(selectors.clientAddresses.city, 'Gotham');
|
||||
await page.waitToClick(selectors.clientAddresses.equalizationTaxCheckbox);
|
||||
await page.waitToClick(selectors.clientAddresses.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint max-len: ["error", { "code": 150 }]*/
|
||||
import selectors from '../../helpers/selectors';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
|
@ -8,7 +9,7 @@ describe('Client Edit web access path', () => {
|
|||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'client');
|
||||
await page.accessToSearchResult('1105');
|
||||
await page.accessToSearchResult('max');
|
||||
await page.accessToSection('client.card.webAccess');
|
||||
});
|
||||
|
||||
|
@ -33,6 +34,15 @@ describe('Client Edit web access path', () => {
|
|||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it(`should update the email`, async() => {
|
||||
await page.clearInput(selectors.clientWebAccess.email);
|
||||
await page.write(selectors.clientWebAccess.email, 'legion@marvel.com');
|
||||
await page.waitToClick(selectors.clientWebAccess.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it('should reload the section and confirm web access is now unchecked', async() => {
|
||||
await page.reloadSection('client.card.webAccess');
|
||||
const result = await page.checkboxState(selectors.clientWebAccess.enableWebAccessCheckbox);
|
||||
|
@ -46,6 +56,12 @@ describe('Client Edit web access path', () => {
|
|||
expect(result).toEqual('Legion');
|
||||
});
|
||||
|
||||
it('should confirm web access email have been updated', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.clientWebAccess.email, 'value');
|
||||
|
||||
expect(result).toEqual('legion@marvel.com');
|
||||
});
|
||||
|
||||
it(`should navigate to the log section`, async() => {
|
||||
await page.accessToSection('client.card.log');
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@ describe('Ticket expeditions and log path', () => {
|
|||
});
|
||||
|
||||
it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async() => {
|
||||
await page.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton);
|
||||
await page.waitToClick(selectors.ticketExpedition.thirdExpeditionRemoveButton);
|
||||
await page.waitToClick(selectors.globalItems.acceptButton);
|
||||
await page.reloadSection('ticket.card.expedition');
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ describe('Ticket Edit basic data path', () => {
|
|||
expect(disabled).toBeFalsy();
|
||||
});
|
||||
|
||||
it(`should check the zone is for Silla247`, async() => {
|
||||
it(`should check the zone is for Gotham247`, async() => {
|
||||
let zone = await page
|
||||
.waitToGetProperty(selectors.ticketBasicData.zone, 'value');
|
||||
|
||||
|
@ -63,7 +63,7 @@ describe('Ticket Edit basic data path', () => {
|
|||
let zone = await page
|
||||
.waitToGetProperty(selectors.ticketBasicData.agency, 'value');
|
||||
|
||||
expect(zone).toContain('Silla247Expensive');
|
||||
expect(zone).toContain('Gotham247Expensive');
|
||||
});
|
||||
|
||||
it(`should click next`, async() => {
|
||||
|
@ -92,7 +92,7 @@ describe('Ticket Edit basic data path', () => {
|
|||
});
|
||||
|
||||
it(`should split ticket without negatives`, async() => {
|
||||
const newAgency = 'Silla247';
|
||||
const newAgency = 'Gotham247';
|
||||
const newDate = new Date();
|
||||
newDate.setDate(newDate.getDate() - 1);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should confirm the ticket 11 was added to thursday', async() => {
|
||||
await page.accessToSection('ticket.weekly.index');
|
||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value');
|
||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.fourthWeeklyTicket, 'value');
|
||||
|
||||
expect(result).toEqual('Thursday');
|
||||
});
|
||||
|
@ -80,7 +80,7 @@ describe('Ticket descriptor path', () => {
|
|||
|
||||
it('should confirm the ticket 11 was added on saturday', async() => {
|
||||
await page.accessToSection('ticket.weekly.index');
|
||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.sixthWeeklyTicket, 'value');
|
||||
const result = await page.waitToGetProperty(selectors.ticketsIndex.fiveWeeklyTicket, 'value');
|
||||
|
||||
expect(result).toEqual('Saturday');
|
||||
});
|
||||
|
@ -108,7 +108,7 @@ describe('Ticket descriptor path', () => {
|
|||
});
|
||||
|
||||
it('should update the agency then remove it afterwards', async() => {
|
||||
await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Silla247');
|
||||
await page.autocompleteSearch(selectors.ticketsIndex.firstWeeklyTicketAgency, 'Gotham247');
|
||||
let message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
|
|
|
@ -27,7 +27,7 @@ describe('Ticket create path', () => {
|
|||
await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent');
|
||||
await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth);
|
||||
await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse Two');
|
||||
await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247');
|
||||
await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247');
|
||||
await page.waitToClick(selectors.createTicketView.createButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
@ -50,7 +50,7 @@ describe('Ticket create path', () => {
|
|||
await page.autocompleteSearch(selectors.createTicketView.client, 'Clark Kent');
|
||||
await page.pickDate(selectors.createTicketView.deliveryDate, nextMonth);
|
||||
await page.autocompleteSearch(selectors.createTicketView.warehouse, 'Warehouse One');
|
||||
await page.autocompleteSearch(selectors.createTicketView.agency, 'Silla247');
|
||||
await page.autocompleteSearch(selectors.createTicketView.agency, 'Gotham247');
|
||||
await page.waitToClick(selectors.createTicketView.createButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ describe('Claim edit basic data path', () => {
|
|||
|
||||
it(`should edit claim state and observation fields`, async() => {
|
||||
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Gestionado');
|
||||
await page.clearTextarea(selectors.claimBasicData.observation);
|
||||
await page.write(selectors.claimBasicData.observation, 'edited observation');
|
||||
await page.clearInput(selectors.claimBasicData.packages);
|
||||
await page.write(selectors.claimBasicData.packages, '2');
|
||||
await page.waitToClick(selectors.claimBasicData.saveButton);
|
||||
|
@ -59,13 +57,6 @@ describe('Claim edit basic data path', () => {
|
|||
expect(hasToPickUpCheckbox).toBe('checked');
|
||||
});
|
||||
|
||||
it('should confirm the claim observation was edited', async() => {
|
||||
const result = await page
|
||||
.waitToGetProperty(selectors.claimBasicData.observation, 'value');
|
||||
|
||||
expect(result).toEqual('edited observation');
|
||||
});
|
||||
|
||||
it('should confirm the claim packages was edited', async() => {
|
||||
const result = await page
|
||||
.waitToGetProperty(selectors.claimBasicData.packages, 'value');
|
||||
|
@ -75,8 +66,6 @@ describe('Claim edit basic data path', () => {
|
|||
|
||||
it(`should edit the claim to leave it untainted`, async() => {
|
||||
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Pendiente');
|
||||
await page.clearTextarea(selectors.claimBasicData.observation);
|
||||
await page.write(selectors.claimBasicData.observation, 'Observation one');
|
||||
await page.clearInput(selectors.claimBasicData.packages);
|
||||
await page.write(selectors.claimBasicData.packages, '0');
|
||||
await page.waitToClick(selectors.claimBasicData.saveButton);
|
||||
|
|
|
@ -37,7 +37,7 @@ describe('Claim summary path', () => {
|
|||
});
|
||||
|
||||
it('should display the observation', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.claimSummary.observation, 'value');
|
||||
const result = await page.waitToGetProperty(selectors.claimSummary.observation, 'innerText');
|
||||
|
||||
expect(result).toContain('Wisi forensibus mnesarchum in cum. Per id impetus abhorreant');
|
||||
});
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
import selectors from '../../helpers/selectors';
|
||||
import getBrowser from '../../helpers/puppeteer';
|
||||
|
||||
describe('Claim Add note path', () => {
|
||||
let browser;
|
||||
let page;
|
||||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('salesPerson', 'claim');
|
||||
await page.accessToSearchResult('2');
|
||||
await page.accessToSection('claim.card.note.index');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
it(`should reach the claim note index`, async() => {
|
||||
await page.waitForState('claim.card.note.index');
|
||||
});
|
||||
|
||||
it(`should click on the add new note button`, async() => {
|
||||
await page.waitToClick(selectors.claimNote.addNoteFloatButton);
|
||||
await page.waitForState('claim.card.note.create');
|
||||
});
|
||||
|
||||
it(`should create a new note`, async() => {
|
||||
await page.waitForSelector(selectors.claimNote.note);
|
||||
await page.type(`${selectors.claimNote.note} textarea`, 'The delivery was unsuccessful');
|
||||
await page.waitToClick(selectors.claimNote.saveButton);
|
||||
const message = await page.waitForSnackbar();
|
||||
|
||||
expect(message.text).toContain('Data saved!');
|
||||
});
|
||||
|
||||
it(`should redirect back to the claim notes page`, async() => {
|
||||
await page.waitForState('claim.card.note.index');
|
||||
});
|
||||
|
||||
it('should confirm the note was created', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.claimNote.firstNoteText, 'innerText');
|
||||
|
||||
expect(result).toEqual('The delivery was unsuccessful');
|
||||
});
|
||||
});
|
|
@ -34,7 +34,7 @@ describe('Order summary path', () => {
|
|||
it('should check the summary contains the order consignee', async() => {
|
||||
const result = await page.waitToGetProperty(selectors.orderSummary.consignee, 'innerText');
|
||||
|
||||
expect(result).toEqual('address 26 - Silla (Province one)');
|
||||
expect(result).toEqual('address 26 - Gotham (Province one)');
|
||||
});
|
||||
|
||||
it('should check the summary contains the order subtotal', async() => {
|
||||
|
|
|
@ -9,7 +9,7 @@ describe('Route summary path', () => {
|
|||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('employee', 'route');
|
||||
await page.waitToClick('vn-route-index vn-tbody > a:nth-child(1)');
|
||||
await page.waitToClick('vn-route-index vn-tbody > a:nth-child(7)');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
|
|
|
@ -10,6 +10,7 @@ export default class App {
|
|||
constructor() {
|
||||
this.loaderStatus = 0;
|
||||
this.loading = false;
|
||||
this.versionInterval = setInterval(this.getVersion.bind(this), 300000);
|
||||
}
|
||||
|
||||
showMessage(message) {
|
||||
|
@ -38,6 +39,21 @@ export default class App {
|
|||
if (this.loaderStatus === 0)
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
getVersion() {
|
||||
this.logger.$http.get('Applications/status');
|
||||
}
|
||||
|
||||
setVersion(newVersion) {
|
||||
if (newVersion) {
|
||||
const currentVersion = localStorage.getItem('salix-version');
|
||||
if (newVersion != currentVersion) {
|
||||
this.hasNewVersion = true;
|
||||
clearInterval(this.versionInterval);
|
||||
}
|
||||
localStorage.setItem('salix-version', newVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.service('vnApp', App);
|
||||
|
|
|
@ -30,14 +30,17 @@ function interceptor($q, vnApp, vnToken, $translate) {
|
|||
},
|
||||
response(response) {
|
||||
vnApp.popLoader();
|
||||
const newVersion = response.headers('salix-version');
|
||||
vnApp.setVersion(newVersion);
|
||||
|
||||
return response;
|
||||
},
|
||||
responseError(rejection) {
|
||||
vnApp.popLoader();
|
||||
let err = new HttpError(rejection.statusText);
|
||||
const err = new HttpError(rejection.statusText);
|
||||
Object.assign(err, rejection);
|
||||
return $q.reject(err);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
ngModule.factory('vnInterceptor', interceptor);
|
||||
|
|
|
@ -19,6 +19,14 @@
|
|||
</div>
|
||||
<vn-slot name="topbar"></vn-slot>
|
||||
<div class="side end">
|
||||
<vn-icon-button
|
||||
id="refresh"
|
||||
icon="refresh"
|
||||
ng-if="$ctrl.vnApp.hasNewVersion"
|
||||
ng-click="$ctrl.refresh()"
|
||||
class="refresh"
|
||||
translate-attr="{title: 'There is a new version, click here to reload'}">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
id="apps"
|
||||
icon="apps"
|
||||
|
@ -39,7 +47,6 @@
|
|||
translate-attr="{title: 'Account'}"
|
||||
on-error-src/>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<vn-menu vn-id="apps-menu">
|
||||
<vn-list class="modules-menu">
|
||||
|
|
|
@ -26,6 +26,10 @@ export class Layout extends Component {
|
|||
const token = this.vnToken.token;
|
||||
return `/api/Images/user/160x160/${userId}/download?access_token=${token}`;
|
||||
}
|
||||
|
||||
refresh() {
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
Layout.$inject = ['$element', '$scope', 'vnModules'];
|
||||
|
||||
|
|
|
@ -60,6 +60,9 @@ vn-layout {
|
|||
font-size: 1.05rem;
|
||||
padding: 0;
|
||||
}
|
||||
.vn-icon-button.refresh {
|
||||
color: $color-alert;
|
||||
}
|
||||
}
|
||||
& > vn-side-menu > .menu {
|
||||
display: flex;
|
||||
|
|
|
@ -17,6 +17,7 @@ Go to module summary: Ir a la vista previa del módulo
|
|||
Show summary: Mostrar vista previa
|
||||
What is new: Novedades de la versión
|
||||
Settings: Ajustes
|
||||
There is a new version, click here to reload: Hay una nueva versión, pulse aquí para recargar
|
||||
|
||||
# Actions
|
||||
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
"loopback#token": {}
|
||||
},
|
||||
"auth:after": {
|
||||
"./middleware/current-user": {}
|
||||
"./middleware/current-user": {},
|
||||
"./middleware/salix-version": {}
|
||||
},
|
||||
"parse": {
|
||||
"body-parser#json":{}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
const packageJson = require('../../../package.json');
|
||||
|
||||
module.exports = function(options) {
|
||||
return function(req, res, next) {
|
||||
res.set('Salix-Version', packageJson.version);
|
||||
next();
|
||||
};
|
||||
};
|
|
@ -84,6 +84,20 @@ module.exports = Self => {
|
|||
};
|
||||
promises.push(Self.app.models.ClaimBeginning.find(filter, myOptions));
|
||||
|
||||
// Claim observations
|
||||
filter = {
|
||||
where: {claimFk: id},
|
||||
include: [
|
||||
{
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'firstName', 'lastName']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
promises.push(Self.app.models.ClaimObservation.find(filter, myOptions));
|
||||
|
||||
// Claim developments
|
||||
filter = {
|
||||
where: {claimFk: id},
|
||||
|
@ -138,8 +152,9 @@ module.exports = Self => {
|
|||
summary.isEditable = await Self.isEditable(ctx, id, myOptions);
|
||||
[summary.claim] = res[0];
|
||||
summary.salesClaimed = res[1];
|
||||
summary.developments = res[2];
|
||||
summary.actions = res[3];
|
||||
summary.observations = res[2];
|
||||
summary.developments = res[3];
|
||||
summary.actions = res[4];
|
||||
|
||||
return summary;
|
||||
};
|
||||
|
|
|
@ -19,6 +19,7 @@ describe('claim getSummary()', () => {
|
|||
expect(keys).toContain('claim');
|
||||
expect(keys).toContain('salesClaimed');
|
||||
expect(keys).toContain('developments');
|
||||
expect(keys).toContain('observations');
|
||||
expect(keys).toContain('actions');
|
||||
expect(keys).toContain('isEditable');
|
||||
|
||||
|
|
|
@ -38,6 +38,9 @@
|
|||
"ClaimLog": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ClaimObservation": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ClaimContainer": {
|
||||
"dataSource": "claimStorage"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "ClaimObservation",
|
||||
"base": "Loggable",
|
||||
"log": {
|
||||
"model": "ClaimLog",
|
||||
"relation": "claim"
|
||||
},
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "claimObservation"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"claimFk": {
|
||||
"type": "number",
|
||||
"required": true
|
||||
},
|
||||
"text": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"created": {
|
||||
"type": "date"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"claim": {
|
||||
"type": "belongsTo",
|
||||
"model": "Claim",
|
||||
"foreignKey": "claimFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -51,15 +51,6 @@
|
|||
label="Packages received"
|
||||
ng-model="$ctrl.claim.packages">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textarea
|
||||
label="Observation"
|
||||
ng-model="$ctrl.claim.observation"
|
||||
rule>
|
||||
</vn-textarea>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-check
|
||||
class="vn-mr-md"
|
||||
label="Pick up"
|
||||
|
|
|
@ -12,3 +12,5 @@ import './search-panel';
|
|||
import './summary';
|
||||
import './photos';
|
||||
import './log';
|
||||
import './note/index';
|
||||
import './note/create';
|
||||
|
|
|
@ -6,6 +6,7 @@ Client Id: Id cliente
|
|||
Claimed ticket: Ticket reclamado
|
||||
Delete claim: Eliminar reclamación
|
||||
Observation: Observación
|
||||
Observations: Observaciones
|
||||
Responsible: Responsable
|
||||
Remove sale: Eliminar linea
|
||||
Claim Id: Id reclamación
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
<vn-watcher
|
||||
vn-id="watcher"
|
||||
url="claimObservations"
|
||||
id-field="id"
|
||||
data="$ctrl.note"
|
||||
insert-mode="true"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="watcher.submitGo('claim.card.note.index')" class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
<vn-textarea
|
||||
vn-one
|
||||
label="Note"
|
||||
ng-model="$ctrl.note.text"
|
||||
vn-focus>
|
||||
</vn-textarea>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit
|
||||
ng-if="watcher.dataChanged()"
|
||||
label="Save">
|
||||
</vn-submit>
|
||||
<vn-button
|
||||
ng-click="$ctrl.cancel()"
|
||||
label="Cancel">
|
||||
</vn-button>
|
||||
</vn-button-bar>
|
||||
</form>
|
|
@ -0,0 +1,22 @@
|
|||
import ngModule from '../../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
export default class Controller extends Section {
|
||||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.note = {
|
||||
claimFk: parseInt(this.$params.id),
|
||||
workerFk: window.localStorage.currentUserWorkerId,
|
||||
text: null
|
||||
};
|
||||
}
|
||||
|
||||
cancel() {
|
||||
this.$state.go('claim.card.note.index', {id: this.$params.id});
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnClaimNoteCreate', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -0,0 +1,32 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="ClaimObservations"
|
||||
filter="$ctrl.filter"
|
||||
where="{claimFk: $ctrl.$params.id}"
|
||||
include="$ctrl.include"
|
||||
data="notes"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-data-viewer
|
||||
model="model"
|
||||
class="vn-w-md">
|
||||
<vn-card class="vn-pa-md">
|
||||
<div
|
||||
ng-repeat="note in notes"
|
||||
class="note vn-pa-sm border-solid border-radius vn-mb-md">
|
||||
<vn-horizontal class="vn-mb-sm" style="color: #666">
|
||||
<vn-one>{{::note.worker.firstName}} {{::note.worker.lastName}}</vn-one>
|
||||
<vn-auto>{{::note.created | date:'dd/MM/yyyy HH:mm'}}</vn-auto>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal class="text">
|
||||
{{::note.text}}
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
<a vn-tooltip="New note"
|
||||
ui-sref="claim.card.note.create({id: $ctrl.$params.id})"
|
||||
vn-bind="+"
|
||||
fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
|
@ -0,0 +1,25 @@
|
|||
import ngModule from '../../module';
|
||||
import Section from 'salix/components/section';
|
||||
import './style.scss';
|
||||
|
||||
export default class Controller extends Section {
|
||||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.filter = {
|
||||
order: 'created DESC',
|
||||
};
|
||||
this.include = {
|
||||
relation: 'worker',
|
||||
scope: {
|
||||
fields: ['id', 'firstName', 'lastName']
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope'];
|
||||
|
||||
ngModule.vnComponent('vnClaimNote', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
});
|
|
@ -0,0 +1,5 @@
|
|||
vn-client-note {
|
||||
.note:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
{"state": "claim.card.basicData", "icon": "settings"},
|
||||
{"state": "claim.card.detail", "icon": "icon-details"},
|
||||
{"state": "claim.card.photos", "icon": "image"},
|
||||
{"state": "claim.card.note.index", "icon": "insert_drive_file"},
|
||||
{"state": "claim.card.development", "icon": "icon-traceability"},
|
||||
{"state": "claim.card.action", "icon": "icon-actions"},
|
||||
{"state": "claim.card.log", "icon": "history"}
|
||||
|
@ -27,17 +28,20 @@
|
|||
"abstract": true,
|
||||
"component": "vn-claim",
|
||||
"description": "Claims"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "claim.index",
|
||||
"component": "vn-claim-index",
|
||||
"description": "Claims"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/:id",
|
||||
"state": "claim.card",
|
||||
"abstract": true,
|
||||
"component": "vn-claim-card"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/summary",
|
||||
"state": "claim.card.summary",
|
||||
"component": "vn-claim-summary",
|
||||
|
@ -45,7 +49,8 @@
|
|||
"params": {
|
||||
"claim": "$ctrl.claim"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/basic-data",
|
||||
"state": "claim.card.basicData",
|
||||
"component": "vn-claim-basic-data",
|
||||
|
@ -54,7 +59,8 @@
|
|||
"claim": "$ctrl.claim"
|
||||
},
|
||||
"acl": ["salesPerson"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/detail",
|
||||
"state": "claim.card.detail",
|
||||
"component": "vn-claim-detail",
|
||||
|
@ -63,7 +69,32 @@
|
|||
"claim": "$ctrl.claim"
|
||||
},
|
||||
"acl": ["salesPerson"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/note",
|
||||
"state": "claim.card.note",
|
||||
"component": "ui-view",
|
||||
"abstract": true,
|
||||
"acl": ["salesPerson"]
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "claim.card.note.index",
|
||||
"component": "vn-claim-note",
|
||||
"description": "Notes",
|
||||
"params": {
|
||||
"claim": "$ctrl.claim"
|
||||
},
|
||||
"acl": ["salesPerson"]
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "claim.card.note.create",
|
||||
"component": "vn-claim-note-create",
|
||||
"description": "New note",
|
||||
"acl": ["salesPerson"]
|
||||
},
|
||||
{
|
||||
"url": "/development",
|
||||
"state": "claim.card.development",
|
||||
"component": "vn-claim-development",
|
||||
|
@ -72,7 +103,8 @@
|
|||
"claim": "$ctrl.claim"
|
||||
},
|
||||
"acl": ["claimManager"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/action",
|
||||
"state": "claim.card.action",
|
||||
"component": "vn-claim-action",
|
||||
|
@ -81,7 +113,8 @@
|
|||
"claim": "$ctrl.claim"
|
||||
},
|
||||
"acl": ["claimManager"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/photos",
|
||||
"state": "claim.card.photos",
|
||||
"component": "vn-claim-photos",
|
||||
|
@ -89,7 +122,8 @@
|
|||
"params": {
|
||||
"claim": "$ctrl.claim"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url" : "/log",
|
||||
"state": "claim.card.log",
|
||||
"component": "vn-claim-log",
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<vn-crud-model vn-id="model"
|
||||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="ClaimDms"
|
||||
filter="::$ctrl.filter"
|
||||
data="photos">
|
||||
</vn-crud-model>
|
||||
<vn-card class="summary">
|
||||
<h5>
|
||||
<a
|
||||
<a
|
||||
ng-if="::$ctrl.summary.claim.id"
|
||||
vn-tooltip="Go to the claim"
|
||||
ui-sref="claim.card.summary({id: {{::$ctrl.summary.claim.id}}})"
|
||||
|
@ -13,7 +14,7 @@
|
|||
<vn-icon-button icon="launch"></vn-icon-button>
|
||||
</a>
|
||||
<span>{{::$ctrl.summary.claim.id}} - {{::$ctrl.summary.claim.client.name}}</span>
|
||||
<vn-button-menu
|
||||
<vn-button-menu
|
||||
disabled="!$ctrl.summary.isEditable"
|
||||
class="message"
|
||||
label="Change state"
|
||||
|
@ -26,30 +27,47 @@
|
|||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<vn-label-value
|
||||
label="Created"
|
||||
label="Created"
|
||||
value="{{$ctrl.summary.claim.created | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="State"
|
||||
label="State"
|
||||
value="{{$ctrl.summary.claim.claimState.description}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Salesperson"
|
||||
label="Salesperson"
|
||||
value="{{$ctrl.summary.claim.client.salesPersonUser.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Attended by"
|
||||
label="Attended by"
|
||||
value="{{$ctrl.summary.claim.worker.user.nickname}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
<vn-two>
|
||||
<vn-textarea
|
||||
vn-three
|
||||
disabled="true"
|
||||
label="Observation"
|
||||
ng-model="$ctrl.summary.claim.observation">
|
||||
</vn-textarea>
|
||||
</vn-two>
|
||||
<vn-auto>
|
||||
<h4 ng-show="$ctrl.isSalesPerson && $ctrl.summary.observations.length">
|
||||
<a
|
||||
ui-sref="claim.card.note.index({id:$ctrl.claim.id})"
|
||||
target="_self">
|
||||
<span translate vn-tooltip="Go to">Observations</span>
|
||||
</a>
|
||||
</h4>
|
||||
<h4
|
||||
ng-show="!$ctrl.isSalesPerson && $ctrl.summary.observations.length"
|
||||
translate>
|
||||
Observations
|
||||
</h4>
|
||||
<div
|
||||
ng-repeat="note in $ctrl.summary.observations"
|
||||
class="note vn-pa-sm border-solid border-radius vn-mb-md">
|
||||
<vn-horizontal class="vn-mb-sm" style="color: #666">
|
||||
<vn-one>{{::note.worker.firstName}} {{::note.worker.lastName}}</vn-one>
|
||||
<vn-auto>{{::note.created | date:'dd/MM/yyyy HH:mm'}}</vn-auto>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal class="text">
|
||||
{{::note.text}}
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
</vn-auto>
|
||||
<vn-auto>
|
||||
<h4 ng-show="$ctrl.isSalesPerson">
|
||||
<a
|
||||
|
|
|
@ -62,7 +62,7 @@ module.exports = function(Self) {
|
|||
{
|
||||
relation: 'account',
|
||||
scope: {
|
||||
fields: ['id', 'name', 'active']
|
||||
fields: ['id', 'name', 'email', 'active']
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { models } = require('vn-loopback/server/server');
|
||||
const {models} = require('vn-loopback/server/server');
|
||||
|
||||
describe('client extendedListFilter()', () => {
|
||||
it('should return the clients matching the filter with a limit of 20 rows', async() => {
|
||||
|
@ -99,7 +99,7 @@ describe('client extendedListFilter()', () => {
|
|||
|
||||
const randomIndex = Math.floor(Math.random() * result.length);
|
||||
const randomResultClient = result[randomIndex];
|
||||
|
||||
|
||||
expect(result.length).toBeGreaterThanOrEqual(5);
|
||||
expect(randomResultClient.salesPersonFk).toEqual(salesPersonId);
|
||||
|
||||
|
@ -121,7 +121,7 @@ describe('client extendedListFilter()', () => {
|
|||
const result = await models.Client.extendedListFilter(ctx, filter, options);
|
||||
|
||||
const firstClient = result[0];
|
||||
|
||||
|
||||
expect(result.length).toEqual(1);
|
||||
expect(firstClient.name).toEqual('Max Eisenhardt');
|
||||
|
||||
|
@ -138,15 +138,15 @@ describe('client extendedListFilter()', () => {
|
|||
try {
|
||||
const options = {transaction: tx};
|
||||
|
||||
const ctx = {req: {accessToken: {userId: 1}}, args: {city: 'Silla'}};
|
||||
const ctx = {req: {accessToken: {userId: 1}}, args: {city: 'Gotham'}};
|
||||
const filter = {};
|
||||
const result = await models.Client.extendedListFilter(ctx, filter, options);
|
||||
|
||||
const randomIndex = Math.floor(Math.random() * result.length);
|
||||
const randomResultClient = result[randomIndex];
|
||||
|
||||
|
||||
expect(result.length).toBeGreaterThanOrEqual(20);
|
||||
expect(randomResultClient.city.toLowerCase()).toEqual('silla');
|
||||
expect(randomResultClient.city.toLowerCase()).toEqual('gotham');
|
||||
|
||||
await tx.rollback();
|
||||
} catch (e) {
|
||||
|
@ -167,7 +167,7 @@ describe('client extendedListFilter()', () => {
|
|||
|
||||
const randomIndex = Math.floor(Math.random() * result.length);
|
||||
const randomResultClient = result[randomIndex];
|
||||
|
||||
|
||||
expect(result.length).toBeGreaterThanOrEqual(20);
|
||||
expect(randomResultClient.postcode).toEqual('46460');
|
||||
|
||||
|
|
|
@ -95,6 +95,10 @@ module.exports = Self => {
|
|||
{
|
||||
arg: 'despiteOfClient',
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
arg: 'hasIncoterms',
|
||||
type: 'boolean'
|
||||
}
|
||||
],
|
||||
returns: {
|
||||
|
|
|
@ -13,6 +13,11 @@ module.exports = Self => {
|
|||
type: 'string',
|
||||
description: 'the user name'
|
||||
},
|
||||
{
|
||||
arg: 'email',
|
||||
type: 'string',
|
||||
description: 'the user email'
|
||||
},
|
||||
{
|
||||
arg: 'active',
|
||||
type: 'boolean',
|
||||
|
|
|
@ -32,10 +32,10 @@
|
|||
"model": "Sample",
|
||||
"foreignKey": "typeFk"
|
||||
},
|
||||
"worker": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"account": {
|
||||
"type": "belongsTo",
|
||||
|
|
|
@ -98,6 +98,9 @@
|
|||
"hasCoreVnh": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hasIncoterms": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isTaxDataChecked":{
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
@ -185,6 +185,14 @@
|
|||
vn-acl="salesAssistant">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-check
|
||||
vn-one
|
||||
label="Incoterms authorization"
|
||||
ng-model="$ctrl.client.hasIncoterms"
|
||||
vn-acl="administrative">
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit
|
||||
|
|
|
@ -9,4 +9,5 @@ Found a client with this phone or email: El cliente con id <a href="#!/client/{{
|
|||
Sage tax type: Tipo de impuesto Sage
|
||||
Sage transaction type: Tipo de transacción Sage
|
||||
Previous client: Cliente anterior
|
||||
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
|
||||
In case of a company succession, specify the grantor company: En el caso de que haya habido una sucesión de empresa, indicar la empresa cedente
|
||||
Incoterms authorization: Autorización incoterms
|
|
@ -50,22 +50,26 @@
|
|||
"component": "vn-client",
|
||||
"description": "Clients",
|
||||
"acl": ["employee"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "client.index",
|
||||
"component": "vn-client-index",
|
||||
"description": "Clients"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.create",
|
||||
"component": "vn-client-create",
|
||||
"description": "New client"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/:id?sendSMS&phone&message",
|
||||
"state": "client.card",
|
||||
"abstract": true,
|
||||
"component": "vn-client-card"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/summary",
|
||||
"state": "client.card.summary",
|
||||
"component": "vn-client-summary",
|
||||
|
@ -73,7 +77,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/basic-data",
|
||||
"state": "client.card.basicData",
|
||||
"component": "vn-client-basic-data",
|
||||
|
@ -81,7 +86,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/fiscal-data",
|
||||
"state": "client.card.fiscalData",
|
||||
"component": "vn-client-fiscal-data",
|
||||
|
@ -89,7 +95,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/billing-data",
|
||||
"state": "client.card.billingData",
|
||||
"component": "vn-client-billing-data",
|
||||
|
@ -97,12 +104,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/address",
|
||||
"state": "client.card.address",
|
||||
"component": "ui-view",
|
||||
"abstract": true
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index?q",
|
||||
"state": "client.card.address.index",
|
||||
"component": "vn-client-address-index",
|
||||
|
@ -110,7 +119,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.address.create",
|
||||
"component": "vn-client-address-create",
|
||||
|
@ -118,12 +128,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/:addressId/edit",
|
||||
"state": "client.card.address.edit",
|
||||
"component": "vn-client-address-edit",
|
||||
"description": "Edit address"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/web-access",
|
||||
"state": "client.card.webAccess",
|
||||
"component": "vn-client-web-access",
|
||||
|
@ -131,12 +143,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/note",
|
||||
"state": "client.card.note",
|
||||
"component": "ui-view",
|
||||
"abstract": true
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.note.index",
|
||||
"component": "vn-client-note",
|
||||
|
@ -144,17 +158,20 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.note.create",
|
||||
"component": "vn-note-create",
|
||||
"description": "New note"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/credit",
|
||||
"abstract": true,
|
||||
"state": "client.card.credit",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.credit.index",
|
||||
"component": "vn-client-credit-index",
|
||||
|
@ -162,7 +179,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.credit.create",
|
||||
"component": "vn-client-credit-create",
|
||||
|
@ -171,12 +189,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/greuge",
|
||||
"abstract": true,
|
||||
"state": "client.card.greuge",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.greuge.index",
|
||||
"component": "vn-client-greuge-index",
|
||||
|
@ -184,7 +204,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.greuge.create",
|
||||
"component": "vn-client-greuge-create",
|
||||
|
@ -193,17 +214,20 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/mandate",
|
||||
"state": "client.card.mandate",
|
||||
"component": "vn-client-mandate",
|
||||
"description": "Mandates"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/balance",
|
||||
"abstract": true,
|
||||
"state": "client.card.balance",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.balance.index",
|
||||
"component": "vn-client-balance-index",
|
||||
|
@ -211,7 +235,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create?payed&companyFk&bankFk&payedAmount",
|
||||
"state": "client.card.balance.create",
|
||||
"component": "vn-client-balance-create",
|
||||
|
@ -219,12 +244,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/recovery",
|
||||
"abstract": true,
|
||||
"state": "client.card.recovery",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.recovery.index",
|
||||
"component": "vn-client-recovery-index",
|
||||
|
@ -232,7 +259,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.recovery.create",
|
||||
"component": "vn-client-recovery-create",
|
||||
|
@ -240,12 +268,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/credit-insurance",
|
||||
"abstract": true,
|
||||
"state": "client.card.creditInsurance",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.creditInsurance.index",
|
||||
"component": "vn-client-credit-insurance-index",
|
||||
|
@ -253,7 +283,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.creditInsurance.create",
|
||||
"component": "vn-client-credit-insurance-create",
|
||||
|
@ -262,13 +293,15 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/insurance",
|
||||
"abstract": true,
|
||||
"state": "client.card.creditInsurance.insurance",
|
||||
"component": "ui-view",
|
||||
"acl": ["insurance"]
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/:classificationId/index",
|
||||
"state": "client.card.creditInsurance.insurance.index",
|
||||
"component": "vn-client-credit-insurance-insurance-index",
|
||||
|
@ -277,7 +310,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/:classificationId/create",
|
||||
"state": "client.card.creditInsurance.insurance.create",
|
||||
"component": "vn-client-credit-insurance-insurance-create",
|
||||
|
@ -286,7 +320,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/contact",
|
||||
"state": "client.card.contact",
|
||||
"component": "vn-client-contact",
|
||||
|
@ -294,12 +329,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/sample",
|
||||
"abstract": true,
|
||||
"state": "client.card.sample",
|
||||
"component": "ui-view"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/index",
|
||||
"state": "client.card.sample.index",
|
||||
"component": "vn-client-sample-index",
|
||||
|
@ -307,7 +344,8 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
"state": "client.card.sample.create",
|
||||
"component": "vn-client-sample-create",
|
||||
|
@ -315,12 +353,14 @@
|
|||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url": "/web-payment",
|
||||
"state": "client.card.webPayment",
|
||||
"component": "vn-client-web-payment",
|
||||
"description": "Web Payment"
|
||||
}, {
|
||||
},
|
||||
{
|
||||
"url" : "/log",
|
||||
"state": "client.card.log",
|
||||
"component": "vn-client-log",
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
</vn-td>
|
||||
<vn-td>
|
||||
<span
|
||||
ng-click="workerDescriptor.show($event, sample.worker.id)"
|
||||
class="link">
|
||||
{{::sample.worker.user.name}}
|
||||
ng-click="workerDescriptor.show($event, sample.user.id)"
|
||||
ng-class="{'link': sample.user}">
|
||||
{{::sample.user.name || 'System' | translate}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td>{{::sample.company.code}}</vn-td>
|
||||
|
|
|
@ -12,15 +12,9 @@ class Controller extends Section {
|
|||
fields: ['code', 'description']
|
||||
}
|
||||
}, {
|
||||
relation: 'worker',
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['userFk'],
|
||||
include: {
|
||||
relation: 'user',
|
||||
scope: {
|
||||
fields: ['name']
|
||||
}
|
||||
}
|
||||
fields: ['id', 'name']
|
||||
}
|
||||
}, {
|
||||
relation: 'company',
|
||||
|
|
|
@ -5,6 +5,11 @@
|
|||
data="$ctrl.account"
|
||||
form="form">
|
||||
</vn-watcher>
|
||||
<vn-crud-model
|
||||
auto-load="true"
|
||||
url="UserPasswords"
|
||||
data="$ctrl.passRequirements">
|
||||
</vn-crud-model>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
||||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
|
@ -28,6 +33,17 @@
|
|||
rule>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-id="email"
|
||||
disabled="watcher.orgData.active != $ctrl.account.active"
|
||||
vn-one
|
||||
label="Recovery email"
|
||||
ng-model="$ctrl.account.email"
|
||||
info="This email is used for user to regain access their account."
|
||||
rule>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-button-bar>
|
||||
<vn-submit
|
||||
|
@ -55,6 +71,7 @@
|
|||
<vn-textfield
|
||||
type="password"
|
||||
label="New password"
|
||||
info="{{'Password requirements' | translate:$ctrl.passRequirements[0]}}"
|
||||
ng-model="$ctrl.newPassword">
|
||||
</vn-textfield>
|
||||
<vn-textfield
|
||||
|
|
|
@ -63,6 +63,7 @@ export default class Controller extends Section {
|
|||
onSubmit() {
|
||||
const data = {
|
||||
name: this.account.name,
|
||||
email: this.account.email,
|
||||
active: this.account.active
|
||||
};
|
||||
this.$http.patch(`Clients/${this.client.id}/updateUser`, data).then(() => {
|
||||
|
|
|
@ -4,4 +4,6 @@ New password: Nueva contraseña
|
|||
Repeat password: Repetir contraseña
|
||||
Change password: Cambiar contraseña
|
||||
Passwords don't match: Las contraseñas no coinciden
|
||||
You must enter a new password: Debes introducir una nueva contraseña
|
||||
You must enter a new password: Debes introducir una nueva contraseña
|
||||
Recovery email: Correo de recuperación
|
||||
This email is used for user to regain access their account.: Este correo electrónico se usa para que el usuario recupere el acceso a su cuenta.
|
|
@ -2,7 +2,7 @@
|
|||
vn-id="model"
|
||||
url="InvoiceOuts/filter"
|
||||
limit="20"
|
||||
order="issued DESC">
|
||||
order="issued DESC, id DESC">
|
||||
</vn-crud-model>
|
||||
<vn-portal slot="topbar">
|
||||
<vn-searchbar
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
"ItemPackingType": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ItemPlacement": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"ItemTag": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
"name": "ItemPlacement",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "itemPlacement"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"id": true
|
||||
},
|
||||
"code": {
|
||||
"type": "string"
|
||||
},
|
||||
"itemFk": {
|
||||
"type": "number"
|
||||
},
|
||||
"warehouseFk": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"item": {
|
||||
"type": "belongsTo",
|
||||
"model": "Item",
|
||||
"foreignKey": "itemFk"
|
||||
},
|
||||
"warehouse": {
|
||||
"type": "belongsTo",
|
||||
"model": "Warehouse",
|
||||
"foreignKey": "warehouseFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ const app = require('vn-loopback/server/server');
|
|||
|
||||
describe('route getDeliveryPoint()', () => {
|
||||
const routeId = 1;
|
||||
const deliveryPointAddress = '46460 Av Espioca 100-Silla';
|
||||
const deliveryPointAddress = '1007 Mountain Drive, Gotham';
|
||||
|
||||
it('should get the delivery point addres of a route with assigned vehicle', async() => {
|
||||
let route = await app.models.Route.findById(routeId);
|
||||
|
|
|
@ -56,7 +56,7 @@ module.exports = Self => {
|
|||
salesIds.push(null);
|
||||
|
||||
const servicesIds = [];
|
||||
if (services) {
|
||||
if (services && services.length) {
|
||||
for (let service of services)
|
||||
servicesIds.push(service.id);
|
||||
} else
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
disabled="!$ctrl.clientId"
|
||||
url="{{ $ctrl.clientId ? 'Clients/'+ $ctrl.clientId +'/addresses' : null }}"
|
||||
fields="['nickname', 'street', 'city']"
|
||||
where="{isActive: true}"
|
||||
ng-model="$ctrl.addressId"
|
||||
show-field="nickname"
|
||||
value-field="id"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="weeklies"
|
||||
order="ticketFk"
|
||||
order="weekDay, ticketFk"
|
||||
primary-key="ticketFk"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('department removeChild()', () => {
|
|||
});
|
||||
|
||||
it('should remove a child department', async() => {
|
||||
const childId = 1;
|
||||
const childId = 130;
|
||||
|
||||
removedChild = await app.models.Department.findById(childId);
|
||||
const result = await app.models.Department.removeChild(childId);
|
||||
|
|
|
@ -57,25 +57,9 @@ module.exports = Self => {
|
|||
ended.setDate(0);
|
||||
ended.setHours(23, 59, 59, 59);
|
||||
|
||||
const filter = {
|
||||
where: {
|
||||
and: [
|
||||
{workerFk: id},
|
||||
{
|
||||
or: [
|
||||
{started: {between: [started, ended]}},
|
||||
{ended: {between: [started, ended]}},
|
||||
{and: [{started: {lt: started}}, {ended: {gt: ended}}]},
|
||||
{and: [{started: {lt: started}}, {ended: null}]}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
}
|
||||
};
|
||||
const contracts = await models.WorkerLabour.find(filter, myOptions);
|
||||
let [firstContract] = contracts;
|
||||
const payedHolidays = firstContract.payedHolidays;
|
||||
const filter = {where: {businessFk: args.businessFk}};
|
||||
const contract = await models.WorkerLabour.findOne(filter, myOptions);
|
||||
const payedHolidays = contract.payedHolidays;
|
||||
|
||||
let queryIndex;
|
||||
const year = started.getFullYear();
|
||||
|
|
|
@ -27,4 +27,15 @@ describe('Worker holidays()', () => {
|
|||
expect(result.totalHolidays).toEqual(27.5);
|
||||
expect(result.holidaysEnjoyed).toEqual(5);
|
||||
});
|
||||
|
||||
it('should now get the payed holidays calendar for a worker', async() => {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
|
||||
ctx.args = {businessFk: businessId, year: year};
|
||||
|
||||
const result = await app.models.Worker.holidays(ctx, workerId);
|
||||
|
||||
expect(result.payedHolidays).toEqual(8);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "salix-back",
|
||||
"version": "1.0.0",
|
||||
"version": "6.8.0",
|
||||
"author": "Verdnatura Levante SL",
|
||||
"description": "Salix backend",
|
||||
"license": "GPL-3.0",
|
||||
|
|
|
@ -15,6 +15,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -23,6 +23,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -17,6 +17,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -16,6 +16,7 @@ module.exports = async function(request, response, next) {
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
t.companyFk,
|
||||
c.name clientName,
|
||||
c.email recipient,
|
||||
c.salesPersonFk,
|
||||
|
|
|
@ -89,6 +89,37 @@ module.exports = {
|
|||
const email = new Email('delivery-note-link', args);
|
||||
await email.send();
|
||||
}
|
||||
|
||||
// Incoterms authorization
|
||||
const {firstOrder} = await db.findOne(`
|
||||
SELECT COUNT(*) as firstOrder
|
||||
FROM ticket t
|
||||
JOIN client c ON c.id = t.clientFk
|
||||
WHERE t.clientFk = ?
|
||||
AND NOT t.isDeleted
|
||||
AND c.isVies
|
||||
`, [ticket.clientFk]);
|
||||
|
||||
if (firstOrder == 1) {
|
||||
const args = Object.assign({
|
||||
ticketId: ticket.id,
|
||||
recipientId: ticket.clientFk,
|
||||
recipient: ticket.recipient,
|
||||
replyTo: ticket.salesPersonEmail
|
||||
}, reqArgs);
|
||||
|
||||
const email = new Email('incoterms-authorization', args);
|
||||
await email.send();
|
||||
|
||||
const sample = await db.findOne(
|
||||
`SELECT id
|
||||
FROM sample
|
||||
WHERE code = 'incoterms-authorization'`);
|
||||
|
||||
await db.rawSql(`
|
||||
INSERT INTO clientSample (clientFk, typeFk, companyFk) VALUES(?, ?, ?)
|
||||
`, [ticket.clientFk, sample.id, ticket.companyFk])
|
||||
}
|
||||
} catch (error) {
|
||||
// Domain not found
|
||||
if (error.responseCode == 450)
|
||||
|
@ -136,7 +167,8 @@ module.exports = {
|
|||
|
||||
const body = `No se ha podido enviar el albarán <strong>${ticket.id}</strong>
|
||||
al cliente <strong>${ticket.clientFk} - ${ticket.clientName}</strong>
|
||||
porque la dirección de email <strong>"${ticket.recipient}"</strong> no es correcta o no está disponible.<br/><br/>
|
||||
porque la dirección de email <strong>"${ticket.recipient}"</strong> no es correcta
|
||||
o no está disponible.<br/><br/>
|
||||
Para evitar que se repita este error, se ha eliminado la dirección de email de la ficha del cliente.
|
||||
Actualiza la dirección de email con una correcta.`;
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
const Stylesheet = require(`${appPath}/core/stylesheet`);
|
||||
|
||||
module.exports = new Stylesheet([
|
||||
`${appPath}/common/css/spacing.css`,
|
||||
`${appPath}/common/css/misc.css`,
|
||||
`${appPath}/common/css/layout.css`,
|
||||
`${appPath}/common/css/email.css`])
|
||||
.mergeStyles();
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
{
|
||||
"filename": "incoterms-authorization.pdf",
|
||||
"component": "incoterms-authorization"
|
||||
}
|
||||
]
|
|
@ -0,0 +1,57 @@
|
|||
<!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>
|
|
@ -0,0 +1,27 @@
|
|||
const Component = require(`${appPath}/core/component`);
|
||||
const emailHeader = new Component('email-header');
|
||||
const emailFooter = new Component('email-footer');
|
||||
const attachment = new Component('attachment');
|
||||
const attachments = require('./attachments.json');
|
||||
|
||||
module.exports = {
|
||||
name: 'incoterms-authorization',
|
||||
data() {
|
||||
return {attachments};
|
||||
},
|
||||
components: {
|
||||
'email-header': emailHeader.build(),
|
||||
'email-footer': emailFooter.build(),
|
||||
'attachment': attachment.build()
|
||||
},
|
||||
props: {
|
||||
recipientId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
companyId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
||||
}
|
||||
};
|
|
@ -0,0 +1,6 @@
|
|||
subject: Autorización incoterms
|
||||
title: Autorización incoterms
|
||||
description:
|
||||
dear: Estimado cliente
|
||||
instructions: A continuación le adjuntamos la autorización incoterms que deberá entregar rellenada y firmada.
|
||||
conclusion: ¡Gracias por su atención!
|
|
@ -0,0 +1,6 @@
|
|||
subject: Autorisation Incoterm
|
||||
title: Autorisation Incoterm
|
||||
description:
|
||||
dear: Chers clients
|
||||
instructions: Veuillez trouver ci-joint l'autorisation des INCOTERMS, une fois le document rempli doit être signé et renvoyé par e-mail.
|
||||
conclusion: Dans l'attente de votre réponse, nous vous prions d'agréer, Madame, Monsieur, nos salutations distinguées.
|
|
@ -0,0 +1,6 @@
|
|||
subject: Autorização do Incoterm
|
||||
title: Autorização do Incoterm
|
||||
description:
|
||||
dear: Estimado cliente
|
||||
instructions: Abaixo anexamos a autorização dos incoterms que deves preencher e reenviar-nos.
|
||||
conclusion: Obrigado pela atenção.
|
|
@ -23,7 +23,7 @@
|
|||
<!-- Block -->
|
||||
<div class="grid-row">
|
||||
<div class="grid-block vn-pa-ml">
|
||||
<h1>{{ $t('title') }} {{$i18n.locale}}</h1>
|
||||
<h1>{{ $t('title') }}</h1>
|
||||
<p>{{ $t('sections.introduction.title') }},</p>
|
||||
<p>{{ $t('sections.introduction.description') }}</p>
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
subject: Aviso inicial por saldo devedor
|
||||
title: Aviso inicial por saldo devedor
|
||||
sections:
|
||||
introduction:
|
||||
title: Estimado cliente
|
||||
description: Através do presente escrito comunicamos-lhe que, segundo os nossos dados contáveis,
|
||||
a sua conta tem um saldo pendente de liquidar.
|
||||
checkExtract: Solicitamos-lhe que comprove que o extrato anexado corresponde com os dados que dispõe.
|
||||
O nosso departamento de administração aclarará qualquer dúvida que possa ter,
|
||||
e igualmente lhe facilitará qualquer documento que solicite.
|
||||
checkValidData: Se ao comprovar os dados aportados, resultam corretos, rogamos que proceda com a regularizar a situação
|
||||
payMethod: Se não deseja acudir pessoalmente às nossas oficinas, pode realizar o pagamento mediante
|
||||
transferência bancaria à conta que figura ao pé do comunicado, a indicar o seu número de cliente,
|
||||
ou bem pode realizar o pagamento através do nosso sítio web.
|
||||
conclusion: De antemão agradecemos-lhe a sua amável colaboração.
|
||||
transferAccount: Dados para transferência bancária
|
|
@ -1,12 +0,0 @@
|
|||
SELECT
|
||||
t.id,
|
||||
t.clientFk,
|
||||
cty.country,
|
||||
w.name AS warehouse
|
||||
FROM ticket t
|
||||
JOIN warehouse w ON w.id = t.warehouseFk
|
||||
JOIN address a ON a.id = t.addressFk
|
||||
JOIN province p ON p.id = a.provinceFk
|
||||
JOIN autonomy au ON au.id = p.autonomyFk
|
||||
JOIN country cty ON cty.id = au.countryFk
|
||||
WHERE t.id = ?
|
|
@ -2,13 +2,8 @@
|
|||
font-size: 1.2em
|
||||
}
|
||||
|
||||
.signature .dummy-signature {
|
||||
width: 400px;
|
||||
height: 190px;
|
||||
display: block;
|
||||
content: '';
|
||||
overflow: hidden;
|
||||
clear:both
|
||||
.signature {
|
||||
margin-top: 100px
|
||||
}
|
||||
|
||||
.signature img {
|
After Width: | Height: | Size: 101 KiB |
|
@ -23,9 +23,10 @@
|
|||
<p
|
||||
v-for="(declaration, $index) in $t('declarations')"
|
||||
v-html="$t('declarations[' + $index + ']', {
|
||||
companyName: company.name,
|
||||
companyCity: company.city,
|
||||
socialName: client.socialName,
|
||||
destinationCountry: ticket.country,
|
||||
destinationWarehouse: ticket.warehouse
|
||||
destinationCountry: client.country
|
||||
})">
|
||||
</p>
|
||||
|
||||
|
@ -53,13 +54,13 @@
|
|||
</p>
|
||||
</div>
|
||||
<div class="size50 signature centered">
|
||||
<p>{{$t('signature')}}</p>
|
||||
<p>{{ company.name }}</p>
|
||||
<img v-bind:src="getReportSrc('signature.png')">
|
||||
<p>
|
||||
<div>Juan Vicente Ferrer Roig</div>
|
||||
<div>Director</div>
|
||||
<div>{{company.manager}}</div>
|
||||
<div>{{$t('manager')}}</div>
|
||||
<p>{{$t('issued', [
|
||||
'Algemesí',
|
||||
company.city,
|
||||
issued.getDate(),
|
||||
$t('months')[issued.getMonth()],
|
||||
issued.getFullYear()])
|
||||
|
@ -68,22 +69,6 @@
|
|||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <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')}}: JUAN VICENTE FERRER ROIG</div>
|
||||
<div>{{$t('signer.ID')}}: 73943586N</div>
|
||||
<div>{{$t('signer.position')}}: ADMINISTRADOR</div>
|
||||
</p>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Footer block -->
|
|
@ -3,13 +3,12 @@ const reportHeader = new Component('report-header');
|
|||
const reportFooter = new Component('report-footer');
|
||||
|
||||
module.exports = {
|
||||
name: 'cmr-authorization',
|
||||
name: 'incoterms-authorization',
|
||||
async serverPrefetch() {
|
||||
this.ticket = await this.findOneFromDef('ticket', [this.ticketId]);
|
||||
if (!this.ticket)
|
||||
this.client = await this.findOneFromDef('client', [this.recipientId]);
|
||||
this.company = await this.findOneFromDef('company', [this.companyId]);
|
||||
if (!this.client)
|
||||
throw new Error('Something went wrong');
|
||||
|
||||
this.client = await this.findOneFromDef('client', [this.ticket.clientFk]);
|
||||
},
|
||||
computed: {
|
||||
issued: function() {
|
||||
|
@ -21,7 +20,11 @@ module.exports = {
|
|||
'report-footer': reportFooter.build()
|
||||
},
|
||||
props: {
|
||||
ticketId: {
|
||||
recipientId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
companyId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
}
|
|
@ -1,32 +1,32 @@
|
|||
reportName: autorizacion-cmr
|
||||
reportName: autorizacion-incoterms
|
||||
description: '<em>{socialName}</em> una sociedad debidamente constituida con responsabilidad <em>limitada</em>
|
||||
y registrada conforme al derecho de sociedades de {country} y aquí representada por
|
||||
<span>___________________</span>. {socialName}, con domicilio en {address},
|
||||
CIF <em>{fiscalID}</em>. En adelante denominada {name}.'
|
||||
issued: 'En {0}, a {1} de {2} de {3}'
|
||||
client: 'Client {0}'
|
||||
client: 'Cliente {0}'
|
||||
declaration: '<em>{socialName}</em> declara por la presente que:'
|
||||
declarations:
|
||||
- 'Todas las compras realizadas por {socialName} con Verdnatura Levante, S.L. se
|
||||
entregan, Ex Works (Incoterms), en el almacén de Verdnatura Levante, S.L. situado en
|
||||
{destinationWarehouse}.'
|
||||
- '{socialName} reconoce que es importante para Verdnatura Levante, S.L. tener
|
||||
- 'Todas las compras realizadas por {socialName} con {companyName} se
|
||||
entregan, Ex Works (Incoterms), en el almacén de {companyName} situado en
|
||||
{companyCity}.'
|
||||
- '{socialName} reconoce que es importante para {companyName} tener
|
||||
comprobante de la entrega intracomunitaria de la mercancía a {destinationCountry} para
|
||||
poder facturar con 0% de IVA.'
|
||||
- 'Por tanto, al firmar este acuerdo, {socialName} declara que todos los bienes que
|
||||
se compren a Verdnatura Levante, S.L. serán entregados a {destinationCountry}.'
|
||||
- 'Además, {socialName} deberá, a primera solicitud de Verdnatura Levante, S.L.,
|
||||
proporcionar una prueba de que todos los productos comprados a Verdnatura Levante, S.L. han
|
||||
se compren a {companyName} serán entregados a {destinationCountry}.'
|
||||
- 'Además, {socialName} deberá, a primera solicitud de {companyName},
|
||||
proporcionar una prueba de que todos los productos comprados a {companyName} han
|
||||
sido entregados en {destinationCountry}.'
|
||||
- 'Además de lo anterior, Verdnatura Levante, S.L. proporcionará a {socialName}
|
||||
- 'Además de lo anterior, {companyName} proporcionará a {socialName}
|
||||
un resumen mensual en el que se incluyen todas las facturas (y las entregas correspondientes).
|
||||
{socialName} firmará y devolverá el resumen mensual a Verdnatura Levante,
|
||||
{socialName} firmará y devolverá el resumen mensual a {companyName},
|
||||
S.L. dentro de los 5 días posteriores a la recepción del resumen.'
|
||||
signature: Verdnatura Levante, S.L.
|
||||
signer:
|
||||
representative: Representante
|
||||
representativeRole: Cargo del representante
|
||||
signed: Fecha de firma
|
||||
manager: Gerente
|
||||
months:
|
||||
- 'Enero'
|
||||
- 'Febrero'
|
|
@ -0,0 +1,38 @@
|
|||
reportName: autorizacion-incoterms
|
||||
description: '<em>{socialName}</em> une société dûment constituée à responsabilité <em>limitée</em>
|
||||
et enregistrée en vertu du droit des sociétés de {country} et représentée aux présentes par
|
||||
<span>___________________</span>. {socialName}, ayant son siège social {address},
|
||||
CIF <em>{fiscalID}</em>. Ci-après dénommé {name}.'
|
||||
issued: 'A {0}, le {1} {2} {3}'
|
||||
client: 'Client {0}'
|
||||
declaration: '<em>{socialName}</em> déclare par la présente que:'
|
||||
declarations:
|
||||
- "Tous les achats réalisés par {socialName} avec {companyName}
|
||||
sont livrés, Ex Works (Incoterms), sur l'entrepôt de {companyName} situé à {companyCity}."
|
||||
- "{socialName} reconnaît qu'il est important pou {companyName} d'avoir
|
||||
la preuve de la livraison intracommunautaire des biens à {destinationCountry} afin de pouvoir facturer à 0% de TVA."
|
||||
- 'Par conséquent, en signant cet accord, {socialName} déclare que tous les biens achetés à {companyName} seront livrés à {destinationCountry}.'
|
||||
- 'En outre, {socialName} doit, à la première demande de {companyName},
|
||||
fournir la preuve que tous les biens achetés à {companyName} ont été livrés à {destinationCountry}.'
|
||||
- 'En plus de ce qui précède, {companyName} fournira à {socialName}
|
||||
un résumé mensuel comprenant toutes les factures (et les livraisons correspondantes).
|
||||
{socialName} signera et retournera le résumé mensuel à {companyName},
|
||||
dans les 5 jours suivant la réception du résumé.'
|
||||
signer:
|
||||
representative: Représentant
|
||||
representativeRole: Position du représentant
|
||||
signed: Date de la signature
|
||||
manager: Gérente
|
||||
months:
|
||||
- 'Janvier'
|
||||
- 'Fevrier'
|
||||
- 'Mars'
|
||||
- 'Avril'
|
||||
- 'Mai'
|
||||
- 'Juin'
|
||||
- 'Juillet'
|
||||
- 'Août'
|
||||
- 'Septembre'
|
||||
- 'Octobre'
|
||||
- 'Novembre'
|
||||
- 'Decembre'
|
|
@ -0,0 +1,42 @@
|
|||
reportName: autorizacion-incoterms
|
||||
description: '<em>{socialName}</em> uma sociedade devidamente constituída com responsabilidade <em>limitada e registada</em>
|
||||
conforme ao direito de sociedades da {country} e aqui representada por
|
||||
<span>___________________</span>. {socialName}, com domicílio em {address},
|
||||
CIF <em>{fiscalID}</em>. Em adiante denominada {name}.'
|
||||
issued: 'Em {0}, em {1} de {2} de {3}'
|
||||
client: 'Cliente {0}'
|
||||
declaration: '<em>{socialName}</em> declara através da presente que:'
|
||||
declarations:
|
||||
- 'Todas as compras realizadas por {socialName} a {companyName} se entregam,
|
||||
Ex Works (Incoterms), no armazém da {companyName} situado em
|
||||
{companyCity}.'
|
||||
- '{socialName} reconhece ser importante para {companyName}
|
||||
ter o comprovante da entrega intracomunitária da mercadoria a {destinationCountry}
|
||||
para poder faturar com 0% de IVA.'
|
||||
- 'Portanto, ao assinar este acordo, {socialName} declara que todos os bens
|
||||
que se comprem na {companyName} serão entregues na {destinationCountry}.'
|
||||
- 'Além disto, {socialName} deverá, na primeira solicitude da {companyName},
|
||||
proporcionar uma prova de que todos os produtos comprados na {companyName}
|
||||
foram entregues na {destinationCountry}.'
|
||||
- 'Além do anterio, {companyName} proporcionará a {socialName}
|
||||
um resumo mensal onde se incluem todas as faturas (e as entregas correspondentes).
|
||||
{socialName} assinará e devolverá o resumo mensal à {companyName},
|
||||
dentro dos 5 dias posteriores à receção do resumo.'
|
||||
signer:
|
||||
representative: Representante
|
||||
representativeRole: Cargo de representante
|
||||
signed: Data da assinatura
|
||||
manager: Gerente
|
||||
months:
|
||||
- 'Janeiro'
|
||||
- 'Fevereiro'
|
||||
- 'Marchar'
|
||||
- 'abril'
|
||||
- 'Poderia'
|
||||
- 'Junho'
|
||||
- 'Julho'
|
||||
- 'Agosto'
|
||||
- 'Setembro'
|
||||
- 'Outubro'
|
||||
- 'Novembro'
|
||||
- 'Dezembro'
|
|
@ -0,0 +1,8 @@
|
|||
SELECT
|
||||
s.name,
|
||||
s.city,
|
||||
cl.name AS manager
|
||||
FROM company c
|
||||
JOIN supplier s ON s.id = c.id
|
||||
JOIN client cl ON cl.id = c.workerManagerFk
|
||||
WHERE c.id = ?
|
Loading…
Reference in New Issue