7152-devToTest_2414 #2228

Merged
alexm merged 636 commits from 7152-devToTest_2414 into test 2024-03-28 08:26:34 +00:00
2 changed files with 15 additions and 4 deletions
Showing only changes of commit b33594e0da - Show all commits

View File

@ -30,14 +30,13 @@ module.exports = Self => {
const [result] = await Self.rawSql('CALL vn.item_getInfo(?, ?)', [itemFk, warehouseFk]);
const barcodeItems = await Self.rawSql('SELECT vn.barcodeToItem(?) as realIdItem', [itemFk]);
const realIdItems = barcodeItems.map(barcodeItem => barcodeItem.realIdItem);
const [realIdItem] = barcodeItems.map(barcodeItem => barcodeItem.realIdItem);
const barcodes = await models.ItemBarcode.find({
fields: ['code'],
where: {
realIdItem: {
inq: realIdItems
}
itemFk: realIdItem
}
});

View File

@ -0,0 +1,12 @@
const {models} = require('vn-loopback/server/server');
fdescribe('item card()', () => {
const itemFk = 1;
const warehouseFk = 1;
it('WIP: should get something', async() => {
const card = await models.Item.card(itemFk, warehouseFk);
expect(card).toBeDefined();
expect(card.barcodes);
});
});