Merge branch 'dev' into 6682-notHolidays
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
bc5f78827c
|
@ -23,16 +23,6 @@ BEGIN
|
||||||
SET vPacking = COALESCE(vPacking, GREATEST(vn.itemPacking(vBarcode,vWarehouseFk), 1));
|
SET vPacking = COALESCE(vPacking, GREATEST(vn.itemPacking(vBarcode,vWarehouseFk), 1));
|
||||||
SET vQuantity = vQuantity * vPacking;
|
SET vQuantity = vQuantity * vPacking;
|
||||||
|
|
||||||
IF (SELECT COUNT(*) FROM shelving WHERE code = vShelvingFk COLLATE utf8_unicode_ci) = 0 THEN
|
|
||||||
|
|
||||||
INSERT IGNORE INTO parking(code) VALUES(vShelvingFk);
|
|
||||||
INSERT INTO shelving(code, parkingFk)
|
|
||||||
SELECT vShelvingFk, id
|
|
||||||
FROM parking
|
|
||||||
WHERE `code` = vShelvingFk COLLATE utf8_unicode_ci;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF (SELECT COUNT(*) FROM itemShelving
|
IF (SELECT COUNT(*) FROM itemShelving
|
||||||
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
WHERE shelvingFk COLLATE utf8_unicode_ci = vShelvingFk
|
||||||
AND itemFk = vItemFk
|
AND itemFk = vItemFk
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
ALTER TABLE vn.parking
|
||||||
|
ADD CONSTRAINT chkParkingCodeFormat CHECK (CHAR_LENGTH(code) > 4 AND code LIKE '%-%');
|
||||||
|
|
||||||
|
ALTER TABLE vn.parking MODIFY COLUMN sectorFk int(11) NOT NULL;
|
||||||
|
|
||||||
|
ALTER TABLE vn.shelving
|
||||||
|
ADD CONSTRAINT chkShelvingCodeFormat CHECK (CHAR_LENGTH(code) <= 4 AND code NOT LIKE '%-%');
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.entryType ADD isInformal TINYINT DEFAULT 0 NOT NULL;
|
|
@ -0,0 +1,3 @@
|
||||||
|
UPDATE vn.entryType
|
||||||
|
SET description='Interna', code='internal'
|
||||||
|
WHERE code='supplies'
|
|
@ -0,0 +1,3 @@
|
||||||
|
UPDATE vn.entryType
|
||||||
|
SET isInformal = TRUE
|
||||||
|
WHERE code IN ('inventory', 'life', 'regularization', 'internal')
|
|
@ -1,7 +1,6 @@
|
||||||
const {models} = require('vn-loopback/server/server');
|
const {models} = require('vn-loopback/server/server');
|
||||||
const LoopBackContext = require('loopback-context');
|
const LoopBackContext = require('loopback-context');
|
||||||
|
|
||||||
// #6276
|
|
||||||
describe('ItemShelving upsertItem()', () => {
|
describe('ItemShelving upsertItem()', () => {
|
||||||
const warehouseFk = 1;
|
const warehouseFk = 1;
|
||||||
let ctx;
|
let ctx;
|
||||||
|
@ -31,7 +30,7 @@ describe('ItemShelving upsertItem()', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should add two new records', async() => {
|
it('should add two new records', async() => {
|
||||||
const shelvingFk = 'ZPP';
|
const shelvingFk = 'GVC';
|
||||||
const items = [1, 1, 1, 2];
|
const items = [1, 1, 1, 2];
|
||||||
|
|
||||||
await models.ItemShelving.upsertItem(ctx, shelvingFk, items, warehouseFk, options);
|
await models.ItemShelving.upsertItem(ctx, shelvingFk, items, warehouseFk, options);
|
||||||
|
|
Loading…
Reference in New Issue