diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 38516b8f3..ab3bdf7af 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -404,11 +404,11 @@ INSERT INTO `vn`.`company`(`id`, `code`, `supplierAccountFk`, `workerManagerFk`, INSERT INTO `vn`.`invoiceOut`(`id`, `serial`, `amount`, `issued`,`clientFk`, `created`, `companyFk`, `dued`, `booked`, `bankFk`, `hasPdf`) VALUES - (1, 'T', 1014.24, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 101, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1), + (1, 'T', 1014.24, CURDATE(), 101, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1), (2, 'T', 121.36, CURDATE(), 102, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1), (3, 'T', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1), (4, 'T', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1), - (5, 'A', 8.88, CURDATE(), 103, CURDATE(), 442, CURDATE(), CURDATE(), 1, 1); + (5, 'A', 8.88, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 103, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 442, DATE_ADD(CURDATE(), INTERVAL -1 MONTH), DATE_ADD(CURDATE(), INTERVAL -1 MONTH), 1, 1); UPDATE `vn`.`invoiceOut` SET ref = 'T1111111' WHERE id = 1; UPDATE `vn`.`invoiceOut` SET ref = 'T2222222' WHERE id = 2; @@ -1549,7 +1549,7 @@ INSERT INTO `postgresql`.`profile`(`profile_id`, `person_id`, `profile_type_id`) FROM `postgresql`.`person` `p`; INSERT INTO `postgresql`.`business`(`business_id`, `client_id`, `provider_id`, `date_start`, `date_end`, `workerBusiness`, `reasonEndFk`) - SELECT p.profile_id, p.profile_id, 1000, CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-12-31'), CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL +1 YEAR)), '-01-25'), CONCAT('E-46-',RPAD(CONCAT(p.profile_id,9),8,p.profile_id)), NULL + SELECT p.profile_id, p.profile_id, 1000, CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL -1 YEAR)), '-12-25'), CONCAT(YEAR(DATE_ADD(CURDATE(), INTERVAL +1 YEAR)), '-01-25'), CONCAT('E-46-',RPAD(CONCAT(p.profile_id,9),8,p.profile_id)), NULL FROM `postgresql`.`profile` `p`; INSERT INTO `postgresql`.`business_labour`(`business_id`, `notes`, `department_id`, `professional_category_id`, `incentivo`, `calendar_labour_type_id`, `porhoras`, `labour_agreement_id`, `workcenter_id`) diff --git a/modules/invoiceOut/back/methods/invoiceOut/specs/book.spec.js b/modules/invoiceOut/back/methods/invoiceOut/specs/book.spec.js index fece307de..85821773c 100644 --- a/modules/invoiceOut/back/methods/invoiceOut/specs/book.spec.js +++ b/modules/invoiceOut/back/methods/invoiceOut/specs/book.spec.js @@ -1,7 +1,7 @@ const app = require('vn-loopback/server/server'); describe('invoiceOut book()', () => { - const invoiceOutId = 1; + const invoiceOutId = 5; let bookedDate; let OriginalInvoiceOut; let updatedInvoiceOut;