diff --git a/db/changes/10220-back2school/00-entryLog.sql b/db/changes/10220-back2school/00-entryLog.sql index 0e2551501..9af6ad5f2 100644 --- a/db/changes/10220-back2school/00-entryLog.sql +++ b/db/changes/10220-back2school/00-entryLog.sql @@ -4,3 +4,4 @@ ADD COLUMN `oldInstance` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, ADD COLUMN `newInstance` text CHARACTER SET utf8 COLLATE utf8_unicode_ci, ADD COLUMN `changedModelId` int(11) DEFAULT NULL, ADD COLUMN `changedModelValue` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; + diff --git a/db/changes/10220-back2school/01-ticketService.sql b/db/changes/10220-back2school/01-ticketService.sql new file mode 100644 index 000000000..ea2d588bb --- /dev/null +++ b/db/changes/10220-back2school/01-ticketService.sql @@ -0,0 +1,9 @@ +ALTER TABLE `vn`.`ticketService` +DROP FOREIGN KEY `ticketServiceIvaGroup`; +ALTER TABLE `vn`.`ticketService` +CHANGE COLUMN `taxClassFk` `taxClassFk` TINYINT(3) UNSIGNED NOT NULL DEFAULT 2 ; +ALTER TABLE `vn`.`ticketService` +ADD CONSTRAINT `ticketServiceIvaGroup` + FOREIGN KEY (`taxClassFk`) + REFERENCES `vn`.`taxClass` (`id`) + ON UPDATE CASCADE; diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 7ff5792e6..62a5b7ca2 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -479,7 +479,9 @@ INSERT INTO `vn`.`expence`(`id`, `taxTypeFk`, `name`, `isWithheld`) (4751000000, 1, 'Retenciones', 1), (4751000000, 6, 'Retencion', 0), (6210000567, 0, 'Alquiler VNH', 0), - (7001000000, 1, 'Mercaderia', 0); + (7001000000, 1, 'Mercaderia', 0), + (7050000000, 1, 'Prestacion de servicios', 1); + INSERT INTO `vn`.`invoiceOutExpence`(`id`, `invoiceOutFk`, `amount`, `expenceFk`, `created`) VALUES diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c04d8791c..0f9618b95 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -510,10 +510,8 @@ export default { firstServiceType: 'vn-ticket-service vn-autocomplete[ng-model="service.ticketServiceTypeFk"]', firstQuantity: 'vn-ticket-service vn-input-number[ng-model="service.quantity"]', firstPrice: 'vn-ticket-service vn-horizontal:nth-child(1) vn-input-number[ng-model="service.price"]', - firstVatType: 'vn-ticket-service vn-autocomplete[label="Tax class"]', fistDeleteServiceButton: 'vn-ticket-service form vn-horizontal:nth-child(1) vn-icon-button[icon="delete"]', newServiceTypeName: '.vn-dialog.shown vn-textfield[ng-model="newServiceType.name"]', - newServiceTypeExpense: '.vn-dialog.shown vn-autocomplete[ng-model="newServiceType.expenseFk"]', serviceLine: 'vn-ticket-service > form > vn-card > vn-one:nth-child(2) > vn-horizontal', saveServiceButton: 'button[type=submit]', saveServiceTypeButton: '.vn-dialog.shown tpl-buttons > button' diff --git a/e2e/paths/05-ticket/13_services.spec.js b/e2e/paths/05-ticket/13_services.spec.js index 08b9219a5..8102d9479 100644 --- a/e2e/paths/05-ticket/13_services.spec.js +++ b/e2e/paths/05-ticket/13_services.spec.js @@ -78,7 +78,6 @@ describe('Ticket services path', () => { it('should create a new service type then add price then create the service', async() => { await page.write(selectors.ticketService.newServiceTypeName, 'Documentos'); - await page.autocompleteSearch(selectors.ticketService.newServiceTypeExpense, 'Retencion'); await page.waitToClick(selectors.ticketService.saveServiceTypeButton); await page.write(selectors.ticketService.firstPrice, '999'); await page.waitToClick(selectors.ticketService.saveServiceButton); @@ -109,13 +108,6 @@ describe('Ticket services path', () => { expect(result).toEqual('999'); }); - it('should confirm the service VAT was created correctly', async() => { - const result = await page - .waitToGetProperty(selectors.ticketService.firstVatType, 'value'); - - expect(result).toEqual('General VAT'); - }); - it('should delete the service', async() => { await page.waitToClick(selectors.ticketService.fistDeleteServiceButton); await page.waitForNumberOfElements(selectors.ticketService.serviceLine, 0); diff --git a/e2e/paths/05-ticket/14_create_ticket.spec.js b/e2e/paths/05-ticket/14_create_ticket.spec.js index 26c22ad3d..496cac161 100644 --- a/e2e/paths/05-ticket/14_create_ticket.spec.js +++ b/e2e/paths/05-ticket/14_create_ticket.spec.js @@ -42,6 +42,7 @@ describe('Ticket create path', () => { it('should again open the new ticket form', async() => { await page.waitToClick(selectors.globalItems.returnToModuleIndexButton); + await page.waitFor(500); await page.waitToClick(selectors.ticketsIndex.newTicketButton); await page.waitForState('ticket.create'); }); diff --git a/e2e/paths/12-entry/04_create.spec.js b/e2e/paths/12-entry/04_create.spec.js index 90dac618a..8cf23813b 100644 --- a/e2e/paths/12-entry/04_create.spec.js +++ b/e2e/paths/12-entry/04_create.spec.js @@ -20,14 +20,13 @@ describe('Entry create path', () => { await page.waitForState('entry.create'); }); - it('should fill the form to create a valid entry', async() => { + it('should fill the form to create a valid entry then redirect to basic Data', async() => { await page.autocompleteSearch(selectors.entryIndex.newEntrySupplier, '2'); await page.autocompleteSearch(selectors.entryIndex.newEntryTravel, 'Warehouse Three'); await page.autocompleteSearch(selectors.entryIndex.newEntryCompany, 'ORN'); - await page.waitToClick(selectors.entryIndex.saveNewEntry); - }); - it('should be redirected to entry basic data', async() => { + await page.waitToClick(selectors.entryIndex.saveNewEntry); + await page.waitFor(500); await page.waitForState('entry.card.basicData'); }); }); diff --git a/modules/entry/front/basic-data/index.html b/modules/entry/front/basic-data/index.html index 67ac18df5..f3adc6b02 100644 --- a/modules/entry/front/basic-data/index.html +++ b/modules/entry/front/basic-data/index.html @@ -9,30 +9,6 @@