Merge branch 'dev' into 2921-notification_url
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
fbc11b7a39
|
@ -774,25 +774,25 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`)
|
||||||
(05080000, 'Coral y materiales similares', 2, 2),
|
(05080000, 'Coral y materiales similares', 2, 2),
|
||||||
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
|
(06021010, 'Plantas vivas: Esqueje/injerto, Vid', 1, 1);
|
||||||
|
|
||||||
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`, `stars`)
|
INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`, `stars`, `family`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', 1, NULL, 0, 1),
|
(1, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '1', 1, NULL, 0, 1, 'VT'),
|
||||||
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '2', 1, NULL, 0, 2),
|
(2, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '2', 1, NULL, 0, 2, 'VT'),
|
||||||
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', 1, NULL, 0, 5),
|
(3, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '3', 1, NULL, 0, 5, 'VT'),
|
||||||
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, '4', 2, NULL, 0, 3),
|
(4, 1, 60, 'YEL', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, '4', 2, NULL, 0, 3, 'VT'),
|
||||||
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', 2, NULL, 0, 3),
|
(5, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '5', 2, NULL, 0, 3, 'VT'),
|
||||||
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', 2, NULL, 0, 4),
|
(6, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '6', 2, NULL, 0, 4, 'VT'),
|
||||||
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', 2, NULL, 0, 4),
|
(7, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '7', 2, NULL, 0, 4, 'VT'),
|
||||||
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', 1, NULL, 0, 5),
|
(8, 2, 70, 'YEL', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '8', 1, NULL, 0, 5, 'VT'),
|
||||||
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', 1, NULL, 0, 4),
|
(9, 2, 70, 'BLU', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, '9', 1, NULL, 0, 4, 'VT'),
|
||||||
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', 1, NULL, 0, 4),
|
(10, 1, 60, 'YEL', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, '10', 1, NULL, 0, 4, 'VT'),
|
||||||
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', 2, NULL, 0, 4),
|
(11, 1, 60, 'YEL', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, '11', 2, NULL, 0, 4, 'VT'),
|
||||||
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', 2, NULL, 0, 3),
|
(12, 3, 30, 'RED', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, '12', 2, NULL, 0, 3, 'VT'),
|
||||||
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', 2, NULL, 0, 2),
|
(13, 5, 30, 'RED', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '13', 2, NULL, 0, 2, 'VT'),
|
||||||
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 4),
|
(14, 5, 90, 'BLU', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 4, 'VT'),
|
||||||
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0),
|
(15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'EMB'),
|
||||||
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0),
|
(16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'EMB'),
|
||||||
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0);
|
(71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, '', 2, NULL, 0, 0, 'VT');
|
||||||
|
|
||||||
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
|
INSERT INTO `vn`.`priceFixed`(`id`, `itemFk`, `rate0`, `rate1`, `rate2`, `rate3`, `started`, `ended`, `bonus`, `warehouseFk`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
@ -1205,8 +1205,8 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`)
|
||||||
(96, 14, 1, 'White', 5),
|
(96, 14, 1, 'White', 5),
|
||||||
(97, 14, 67, 'supply', 6),
|
(97, 14, 67, 'supply', 6),
|
||||||
(98, 14, 23, '1', 7),
|
(98, 14, 23, '1', 7),
|
||||||
(99, 15, 92, 'Shipping cost', 2),
|
(99, 15, 92, 'Trolley', 2),
|
||||||
(100, 16, 92, 'Shipping cost', 2),
|
(100, 16, 92, 'Pallet', 2),
|
||||||
(101, 71, 92, 'Shipping cost', 2);
|
(101, 71, 92, 'Shipping cost', 2);
|
||||||
|
|
||||||
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
INSERT INTO `vn`.`itemTypeTag`(`id`, `itemTypeFk`, `tagFk`, `priority`)
|
||||||
|
|
|
@ -448,7 +448,7 @@ export default {
|
||||||
},
|
},
|
||||||
itemLog: {
|
itemLog: {
|
||||||
anyLineCreated: 'vn-item-log > vn-log vn-tbody > vn-tr',
|
anyLineCreated: 'vn-item-log > vn-log vn-tbody > vn-tr',
|
||||||
fifthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(5) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)',
|
fifthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(5) > vn-td > vn-one:nth-child(3) > div span:nth-child(2)',
|
||||||
},
|
},
|
||||||
ticketSummary: {
|
ticketSummary: {
|
||||||
header: 'vn-ticket-summary > vn-card > h5',
|
header: 'vn-ticket-summary > vn-card > h5',
|
||||||
|
@ -630,10 +630,9 @@ export default {
|
||||||
ticketLog: {
|
ticketLog: {
|
||||||
firstTD: 'vn-ticket-log vn-table vn-td:nth-child(1)',
|
firstTD: 'vn-ticket-log vn-table vn-td:nth-child(1)',
|
||||||
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
|
logButton: 'vn-left-menu a[ui-sref="ticket.card.log"]',
|
||||||
changedBy: 'vn-ticket-log > vn-log vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
|
firstLogEntry: 'vn-ticket-log vn-data-viewer vn-tbody vn-tr',
|
||||||
actionTaken: 'vn-ticket-log > vn-log vn-td:nth-child(1) > div > div:nth-child(3) > span.value',
|
|
||||||
changes: 'vn-ticket-log vn-data-viewer vn-tbody > vn-tr > vn-td:nth-child(7)',
|
changes: 'vn-ticket-log vn-data-viewer vn-tbody > vn-tr > vn-td:nth-child(7)',
|
||||||
id: 'vn-ticket-log > vn-log vn-td.before > vn-one:nth-child(1) > div > span.value'
|
id: 'vn-ticket-log vn-tr:nth-child(1) vn-one:nth-child(1) span'
|
||||||
},
|
},
|
||||||
ticketService: {
|
ticketService: {
|
||||||
addServiceButton: 'vn-ticket-service vn-icon-button[vn-tooltip="Add service"] > button',
|
addServiceButton: 'vn-ticket-service vn-icon-button[vn-tooltip="Add service"] > button',
|
||||||
|
|
|
@ -50,7 +50,7 @@ describe('Client Edit web access path', () => {
|
||||||
let lastModificationCurrentValue = await page
|
let lastModificationCurrentValue = await page
|
||||||
.waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
|
.waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
|
||||||
|
|
||||||
expect(lastModificationPreviousValue).toEqual('name: BruceBanner active: true');
|
expect(lastModificationPreviousValue).toEqual('name BruceBanner active true');
|
||||||
expect(lastModificationCurrentValue).toEqual('name: Hulk active: false');
|
expect(lastModificationCurrentValue).toEqual('name Hulk active false');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -43,7 +43,7 @@ describe('Client log path', () => {
|
||||||
let lastModificationCurrentValue = await page.
|
let lastModificationCurrentValue = await page.
|
||||||
waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
|
waitToGetProperty(selectors.clientLog.lastModificationCurrentValue, 'innerText');
|
||||||
|
|
||||||
expect(lastModificationPreviousValue).toEqual('name: DavidCharlesHaller');
|
expect(lastModificationPreviousValue).toEqual('name DavidCharlesHaller');
|
||||||
expect(lastModificationCurrentValue).toEqual('name: this is a test');
|
expect(lastModificationCurrentValue).toEqual('name this is a test');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -31,17 +31,14 @@ describe('Ticket expeditions and log path', () => {
|
||||||
|
|
||||||
it(`should confirm the expedition deleted is shown now in the ticket log`, async() => {
|
it(`should confirm the expedition deleted is shown now in the ticket log`, async() => {
|
||||||
await page.accessToSection('ticket.card.log');
|
await page.accessToSection('ticket.card.log');
|
||||||
const changedBy = await page
|
const firstLogEntry = await page
|
||||||
.waitToGetProperty(selectors.ticketLog.changedBy, 'innerText');
|
.waitToGetProperty(selectors.ticketLog.firstLogEntry, 'innerText');
|
||||||
|
|
||||||
const actionTaken = await page
|
|
||||||
.waitToGetProperty(selectors.ticketLog.actionTaken, 'innerText');
|
|
||||||
|
|
||||||
const id = await page
|
const id = await page
|
||||||
.waitToGetProperty(selectors.ticketLog.id, 'innerText');
|
.waitToGetProperty(selectors.ticketLog.id, 'innerText');
|
||||||
|
|
||||||
expect(changedBy).toEqual('production');
|
expect(firstLogEntry).toContain('production');
|
||||||
expect(actionTaken).toEqual('Deletes');
|
expect(firstLogEntry).toContain('Deletes');
|
||||||
expect(id).toEqual('2');
|
expect(id).toEqual('2');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -35,6 +35,8 @@ describe('Travel create path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should check the user was redirected to the travel basic data upon creation', async() => {
|
it('should check the user was redirected to the travel basic data upon creation', async() => {
|
||||||
|
// backup code for further intermitences still on track.
|
||||||
|
// await page.screenshot({path: 'e2e/paths/10-travel/error.jpeg', type: 'jpeg'});
|
||||||
await page.waitForState('travel.card.basicData');
|
await page.waitForState('travel.card.basicData');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,6 @@ describe('Supplier basic data path', () => {
|
||||||
it('should check the changes have been recorded', async() => {
|
it('should check the changes have been recorded', async() => {
|
||||||
const result = await page.waitToGetProperty('#newInstance:nth-child(3)', 'innerText');
|
const result = await page.waitToGetProperty('#newInstance:nth-child(3)', 'innerText');
|
||||||
|
|
||||||
expect(result).toEqual('note: Some notes');
|
expect(result).toEqual('note Some notes');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -124,6 +124,10 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Price per Kg"
|
"description": "Price per Kg"
|
||||||
},
|
},
|
||||||
|
"family": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The item family"
|
||||||
|
},
|
||||||
"expenseFk": {
|
"expenseFk": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"mysql": {
|
"mysql": {
|
||||||
|
@ -190,6 +194,11 @@
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
"model": "ItemNiche",
|
"model": "ItemNiche",
|
||||||
"foreignKey": "itemFk"
|
"foreignKey": "itemFk"
|
||||||
|
},
|
||||||
|
"packaging": {
|
||||||
|
"type": "hasOne",
|
||||||
|
"model": "Packaging",
|
||||||
|
"foreignKey": "itemFk"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scope": {
|
"scope": {
|
||||||
|
|
|
@ -44,7 +44,8 @@ module.exports = Self => {
|
||||||
|
|
||||||
const res = await models.Item.getVisibleAvailable(itemId, ticket.warehouseFk, ticket.shipped);
|
const res = await models.Item.getVisibleAvailable(itemId, ticket.warehouseFk, ticket.shipped);
|
||||||
|
|
||||||
if (res.available < quantity)
|
const isPackaging = item.family == 'EMB';
|
||||||
|
if (!isPackaging && res.available < quantity)
|
||||||
throw new UserError(`This item is not available`);
|
throw new UserError(`This item is not available`);
|
||||||
|
|
||||||
const newSale = await models.Sale.create({
|
const newSale = await models.Sale.create({
|
||||||
|
@ -56,10 +57,12 @@ module.exports = Self => {
|
||||||
|
|
||||||
await Self.rawSql('CALL vn.sale_calculateComponent(?, NULL)', [newSale.id]);
|
await Self.rawSql('CALL vn.sale_calculateComponent(?, NULL)', [newSale.id]);
|
||||||
|
|
||||||
return models.Sale.findById(newSale.id, {
|
const sale = await models.Sale.findById(newSale.id, {
|
||||||
include: {
|
include: {
|
||||||
relation: 'item'
|
relation: 'item'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return sale;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,21 @@ module.exports = Self => {
|
||||||
}
|
}
|
||||||
|
|
||||||
let filter = {
|
let filter = {
|
||||||
fields: ['id', 'name', 'tag5', 'value5', 'tag6', 'value6', 'tag7', 'value7', 'tag8', 'value8', 'tag9', 'value9', 'tag10', 'value10'],
|
fields: [
|
||||||
|
'id',
|
||||||
|
'name',
|
||||||
|
'tag5',
|
||||||
|
'value5',
|
||||||
|
'tag6',
|
||||||
|
'value6',
|
||||||
|
'tag7',
|
||||||
|
'value7',
|
||||||
|
'tag8',
|
||||||
|
'value8',
|
||||||
|
'tag9',
|
||||||
|
'value9',
|
||||||
|
'tag10',
|
||||||
|
'value10'],
|
||||||
where: {id: {inq: ids}}
|
where: {id: {inq: ids}}
|
||||||
};
|
};
|
||||||
let items = await Self.app.models.Item.find(filter);
|
let items = await Self.app.models.Item.find(filter);
|
||||||
|
|
Loading…
Reference in New Issue