diff --git a/db/changes/231601/00-kkearEntryNotes.sql b/db/changes/231601/00-kkearEntryNotes.sql new file mode 100644 index 000000000..ff5c7ce29 --- /dev/null +++ b/db/changes/231601/00-kkearEntryNotes.sql @@ -0,0 +1 @@ +ALTER TABLE `vn`.`entry` DROP COLUMN `notes`; \ No newline at end of file diff --git a/db/changes/231601/00-updateIsVies.sql b/db/changes/231601/00-updateIsVies.sql new file mode 100644 index 000000000..83fde7352 --- /dev/null +++ b/db/changes/231601/00-updateIsVies.sql @@ -0,0 +1,5 @@ + UPDATE vn.supplier s + JOIN vn.country c ON c.id = s.countryFk + SET s.nif = MID(REPLACE(s.nif, ' ', ''), 3, LENGTH(REPLACE(s.nif, ' ', '')) - 1) + WHERE s.isVies = TRUE + AND c.code = LEFT(REPLACE(s.nif, ' ', ''), 2); \ No newline at end of file diff --git a/db/changes/231601/00-updateisViesClient.sql b/db/changes/231601/00-updateisViesClient.sql new file mode 100644 index 000000000..bdf62d7a8 --- /dev/null +++ b/db/changes/231601/00-updateisViesClient.sql @@ -0,0 +1,5 @@ +UPDATE IGNORE vn.client c + JOIN vn.country co ON co.id = c.countryFk + SET c.fi = MID(REPLACE(c.fi, ' ', ''), 3, LENGTH(REPLACE(c.fi, ' ', '')) - 1) + WHERE c.isVies = TRUE + AND co.code = LEFT(REPLACE(c.fi, ' ', ''), 2); \ No newline at end of file diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 15ccece35..e69974d08 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1409,16 +1409,16 @@ INSERT INTO `vn`.`travel`(`id`,`shipped`, `landed`, `warehouseInFk`, `warehouseO (7, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 4, 1, 50.00, 500, 'seventh travel', 2, 1), (8, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 1, 1, 50.00, 500, 'eight travel', 1, 2); -INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `notes`, `evaNotes`) +INSERT INTO `vn`.`entry`(`id`, `supplierFk`, `created`, `travelFk`, `isConfirmed`, `companyFk`, `invoiceNumber`, `reference`, `isExcludedFromAvailable`, `isRaid`, `evaNotes`) VALUES - (1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, '', ''), - (2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'this is the note two', 'observation two'), - (3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'this is the note three', 'observation three'), - (4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'this is the note four', 'observation four'), - (5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'this is the note five', 'observation five'), - (6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'this is the note six', 'observation six'), - (7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'this is the note seven', 'observation seven'), - (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, '', ''); + (1, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 1, 1, 442, 'IN2001', 'Movement 1', 0, 0, ''), + (2, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 442, 'IN2002', 'Movement 2', 0, 0, 'observation two'), + (3, 1, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 3, 0, 442, 'IN2003', 'Movement 3', 0, 0, 'observation three'), + (4, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 2, 0, 69, 'IN2004', 'Movement 4', 0, 0, 'observation four'), + (5, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 5, 0, 442, 'IN2005', 'Movement 5', 0, 0, 'observation five'), + (6, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 6, 0, 442, 'IN2006', 'Movement 6', 0, 0, 'observation six'), + (7, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2007', 'Movement 7', 0, 0, 'observation seven'), + (8, 2, DATE_ADD(util.VN_CURDATE(), INTERVAL -1 MONTH), 7, 0, 442, 'IN2008', 'Movement 8', 1, 1, ''); INSERT INTO `bs`.`waste`(`buyer`, `year`, `week`, `family`, `itemFk`, `itemTypeFk`, `saleTotal`, `saleWaste`, `rate`) VALUES diff --git a/e2e/paths/12-entry/05_basicData.spec.js b/e2e/paths/12-entry/05_basicData.spec.js index 3b5f40c35..0272446d9 100644 --- a/e2e/paths/12-entry/05_basicData.spec.js +++ b/e2e/paths/12-entry/05_basicData.spec.js @@ -20,7 +20,6 @@ describe('Entry basic data path', () => { it('should edit the basic data', async() => { await page.write(selectors.entryBasicData.reference, 'new movement 8'); await page.write(selectors.entryBasicData.invoiceNumber, 'new movement 8'); - await page.write(selectors.entryBasicData.notes, 'new notes'); await page.write(selectors.entryBasicData.observations, ' edited'); await page.autocompleteSearch(selectors.entryBasicData.supplier, 'Plants nick'); await page.autocompleteSearch(selectors.entryBasicData.currency, 'eur'); @@ -53,12 +52,6 @@ describe('Entry basic data path', () => { expect(result).toEqual('new movement 8'); }); - it('should confirm the note was edited', async() => { - const result = await page.waitToGetProperty(selectors.entryBasicData.notes, 'value'); - - expect(result).toEqual('new notes'); - }); - it('should confirm the observation was edited', async() => { const result = await page.waitToGetProperty(selectors.entryBasicData.observations, 'value'); diff --git a/e2e/paths/13-supplier/03_fiscal_data.spec.js b/e2e/paths/13-supplier/03_fiscal_data.spec.js index 31b3fafd2..170a8d05a 100644 --- a/e2e/paths/13-supplier/03_fiscal_data.spec.js +++ b/e2e/paths/13-supplier/03_fiscal_data.spec.js @@ -15,7 +15,7 @@ const $inputs = { sageTaxType: 'vn-supplier-fiscal-data [ng-model="$ctrl.supplier.sageTaxTypeFk"]' }; -fdescribe('Supplier fiscal data path', () => { +describe('Supplier fiscal data path', () => { let browser; let page; diff --git a/front/salix/components/log/index.html b/front/salix/components/log/index.html index b1e5ace12..00ab23cc9 100644 --- a/front/salix/components/log/index.html +++ b/front/salix/components/log/index.html @@ -19,19 +19,17 @@