Merge branch 'dev' into 6276-createNewWarehouse
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
4f3678d7df
|
@ -71,7 +71,6 @@ pipeline {
|
||||||
stage('Back') {
|
stage('Back') {
|
||||||
steps {
|
steps {
|
||||||
sh 'pnpm install --prefer-offline'
|
sh 'pnpm install --prefer-offline'
|
||||||
sh 'pnpx puppeteer browsers install chrome'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Print') {
|
stage('Print') {
|
||||||
|
|
|
@ -1820,19 +1820,16 @@ INSERT INTO `vn`.`clientSample`(`id`, `clientFk`, `typeFk`, `created`, `workerFk
|
||||||
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`, `hasToNotify`)
|
INSERT INTO `vn`.`claimState`(`id`, `code`, `description`, `roleFk`, `priority`, `hasToNotify`)
|
||||||
VALUES
|
VALUES
|
||||||
( 1, 'pending', 'Pendiente', 1, 1, 0),
|
( 1, 'pending', 'Pendiente', 1, 1, 0),
|
||||||
( 2, 'managed', 'Gestionado', 72, 5, 0),
|
|
||||||
( 3, 'resolved', 'Resuelto', 72, 7, 0),
|
( 3, 'resolved', 'Resuelto', 72, 7, 0),
|
||||||
( 4, 'canceled', 'Anulado', 72, 6, 1),
|
( 4, 'canceled', 'Anulado', 72, 6, 1),
|
||||||
( 5, 'incomplete', 'Incompleta', 1, 3, 1),
|
( 5, 'incomplete', 'Incompleta', 1, 3, 1);
|
||||||
( 6, 'mana', 'Mana', 72, 4, 0),
|
|
||||||
( 7, 'lack', 'Faltas', 72, 2, 0);
|
|
||||||
|
|
||||||
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`, `ticketFk`)
|
INSERT INTO `vn`.`claim`(`id`, `ticketCreated`, `claimStateFk`, `clientFk`, `workerFk`, `responsibility`, `isChargedToMana`, `created`, `packages`, `ticketFk`)
|
||||||
VALUES
|
VALUES
|
||||||
(1, util.VN_CURDATE(), 1, 1101, 18, 3, 0, util.VN_CURDATE(), 0, 11),
|
(1, util.VN_CURDATE(), 1, 1101, 18, 3, 0, util.VN_CURDATE(), 0, 11),
|
||||||
(2, util.VN_CURDATE(), 2, 1101, 18, 3, 0, util.VN_CURDATE(), 1, 16),
|
(2, util.VN_CURDATE(), 4, 1101, 18, 3, 0, util.VN_CURDATE(), 1, 16),
|
||||||
(3, util.VN_CURDATE(), 3, 1101, 18, 1, 1, util.VN_CURDATE(), 5, 7),
|
(3, util.VN_CURDATE(), 3, 1101, 18, 1, 1, util.VN_CURDATE(), 5, 7),
|
||||||
(4, util.VN_CURDATE(), 3, 1104, 18, 5, 0, util.VN_CURDATE(), 10, 8);
|
(4, util.VN_CURDATE(), 3, 1104, 18, 5, 0, util.VN_CURDATE(), 10, 8);
|
||||||
|
|
||||||
INSERT INTO `vn`.`claimObservation` (`claimFk`, `workerFk`, `text`, `created`)
|
INSERT INTO `vn`.`claimObservation` (`claimFk`, `workerFk`, `text`, `created`)
|
||||||
VALUES
|
VALUES
|
||||||
|
|
|
@ -13,15 +13,15 @@ BEGIN
|
||||||
DECLARE vWarehouseIn INT;
|
DECLARE vWarehouseIn INT;
|
||||||
DECLARE vWarehouseOut INT;
|
DECLARE vWarehouseOut INT;
|
||||||
DECLARE vCalcVisible INT;
|
DECLARE vCalcVisible INT;
|
||||||
DECLARE vInventoryDate DATE DEFAULT vn.getInventoryDate();
|
DECLARE vInventoryDate DATE DEFAULT getInventoryDate();
|
||||||
|
|
||||||
SELECT shipped, landed, warehouseInFk, warehouseOutFk
|
SELECT shipped, landed, warehouseInFk, warehouseOutFk
|
||||||
INTO vDateShipped, vDateLanded, vWarehouseIn, vWarehouseOut
|
INTO vDateShipped, vDateLanded, vWarehouseIn, vWarehouseOut
|
||||||
FROM vn.travel t
|
FROM travel t
|
||||||
JOIN vn.entry e ON e.travelFk = t.id
|
JOIN entry e ON e.travelFk = t.id
|
||||||
WHERE e.id = vSelf;
|
WHERE e.id = vSelf;
|
||||||
|
|
||||||
CALL vn.rate_getPrices(vDateShipped, vWarehouseIn);
|
CALL rate_getPrices(vDateShipped, vWarehouseIn);
|
||||||
|
|
||||||
-- Traslado en almacen origen
|
-- Traslado en almacen origen
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tBuy
|
CREATE OR REPLACE TEMPORARY TABLE tBuy
|
||||||
|
@ -84,7 +84,7 @@ BEGIN
|
||||||
WHERE a.available
|
WHERE a.available
|
||||||
ON DUPLICATE KEY UPDATE availableLanding = a.available;
|
ON DUPLICATE KEY UPDATE availableLanding = a.available;
|
||||||
ELSE
|
ELSE
|
||||||
CALL vn.item_getStock(vWarehouseOut, vDateShipped, NULL);
|
CALL item_getStock(vWarehouseOut, vDateShipped, NULL);
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tItem
|
CREATE OR REPLACE TEMPORARY TABLE tItem
|
||||||
(UNIQUE INDEX i USING HASH (itemFk))
|
(UNIQUE INDEX i USING HASH (itemFk))
|
||||||
|
@ -97,7 +97,7 @@ BEGIN
|
||||||
FROM tmp.itemList;
|
FROM tmp.itemList;
|
||||||
END IF;
|
END IF;
|
||||||
|
|
||||||
CALL vn.buyUltimateFromInterval(vWarehouseIn,vInventoryDate, vDateLanded);
|
CALL buyUltimateFromInterval(vWarehouseIn,vInventoryDate, vDateLanded);
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tTransfer
|
CREATE OR REPLACE TEMPORARY TABLE tTransfer
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
|
@ -145,26 +145,26 @@ BEGIN
|
||||||
b.id buyFkOrigin,
|
b.id buyFkOrigin,
|
||||||
pa.returnCost,
|
pa.returnCost,
|
||||||
b.weight
|
b.weight
|
||||||
FROM vn.item i
|
FROM item i
|
||||||
JOIN tItem ti ON ti.itemFk = i.id
|
JOIN tItem ti ON ti.itemFk = i.id
|
||||||
LEFT JOIN vn.producer p ON p.id = i.producerFk
|
LEFT JOIN producer p ON p.id = i.producerFk
|
||||||
LEFT JOIN vn.itemType it ON it.id = i.typeFk
|
LEFT JOIN itemType it ON it.id = i.typeFk
|
||||||
JOIN vn.itemCategory ic ON ic.id = it.categoryFk
|
JOIN itemCategory ic ON ic.id = it.categoryFk
|
||||||
LEFT JOIN vn.origin o ON o.id = i.originFk
|
LEFT JOIN origin o ON o.id = i.originFk
|
||||||
LEFT JOIN tBuy lb ON lb.itemFk = i.id
|
LEFT JOIN tBuy lb ON lb.itemFk = i.id
|
||||||
LEFT JOIN vn.buy b ON b.id = lb.buyFk
|
LEFT JOIN buy b ON b.id = lb.buyFk
|
||||||
LEFT JOIN vn.packaging pa ON pa.id = b.packagingFk
|
LEFT JOIN packaging pa ON pa.id = b.packagingFk
|
||||||
LEFT JOIN vn.entry e2 ON e2.id = b.entryFk
|
LEFT JOIN entry e2 ON e2.id = b.entryFk
|
||||||
LEFT JOIN vn.supplier s ON s.id = e2.supplierFk
|
LEFT JOIN supplier s ON s.id = e2.supplierFk
|
||||||
LEFT JOIN vn.entry e ON e.id = vSelf
|
LEFT JOIN entry e ON e.id = vSelf
|
||||||
LEFT JOIN vn.travel tr ON tr.id = e.travelFk
|
LEFT JOIN travel tr ON tr.id = e.travelFk
|
||||||
LEFT JOIN vn.agencyMode am ON am.id = tr.agencyModeFk
|
LEFT JOIN agencyMode am ON am.id = tr.agencyModeFk
|
||||||
LEFT JOIN vn.buy b2 ON b2.itemFk = i.id
|
LEFT JOIN buy b2 ON b2.itemFk = i.id
|
||||||
AND b2.entryFk = vSelf
|
AND b2.entryFk = vSelf
|
||||||
LEFT JOIN vn.packaging pa2 ON pa2.id = b.packagingFk
|
LEFT JOIN packaging pa2 ON pa2.id = b.packagingFk
|
||||||
LEFT JOIN tmp.rate r ON TRUE
|
LEFT JOIN tmp.rate r ON TRUE
|
||||||
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
LEFT JOIN tmp.buyUltimateFromInterval bufi ON bufi.itemFk = i.id
|
||||||
LEFT JOIN vn.buy b3 ON b3.id = bufi.buyFk
|
LEFT JOIN buy b3 ON b3.id = bufi.buyFk
|
||||||
WHERE ic.display
|
WHERE ic.display
|
||||||
AND NOT e.isRaid
|
AND NOT e.isRaid
|
||||||
AND (ti.visible OR ti.available)
|
AND (ti.visible OR ti.available)
|
||||||
|
@ -172,11 +172,6 @@ BEGIN
|
||||||
|
|
||||||
CREATE INDEX tIndex USING HASH ON tTransfer (itemFk);
|
CREATE INDEX tIndex USING HASH ON tTransfer (itemFk);
|
||||||
|
|
||||||
SET @carriage := 0;
|
|
||||||
SET @comission := 0;
|
|
||||||
SET @packaging := 0;
|
|
||||||
SET @rate3 := 0;
|
|
||||||
SET @cost := 0;
|
|
||||||
SELECT *,
|
SELECT *,
|
||||||
quantity - MOD(quantity , `grouping`) subQuantity,
|
quantity - MOD(quantity , `grouping`) subQuantity,
|
||||||
MOD(quantity, `grouping`) soll,
|
MOD(quantity, `grouping`) soll,
|
||||||
|
|
|
@ -27,7 +27,7 @@ BEGIN
|
||||||
s.quantity,
|
s.quantity,
|
||||||
MAKETIME(pb.HH,pb.mm,0) etd,
|
MAKETIME(pb.HH,pb.mm,0) etd,
|
||||||
pb.routeFk,
|
pb.routeFk,
|
||||||
FLOOR(s.quantity / ish.packing) stickers,
|
FLOOR(s.quantity / IF(i.isBoxPickingMode, ish.packing, i.packingOut)) stickers,
|
||||||
IF(i.isBoxPickingMode, ish.packing, i.packingOut) packing,
|
IF(i.isBoxPickingMode, ish.packing, i.packingOut) packing,
|
||||||
b.packagingFk
|
b.packagingFk
|
||||||
FROM sale s
|
FROM sale s
|
||||||
|
@ -71,5 +71,3 @@ BEGIN
|
||||||
DROP TEMPORARY TABLE tmp.sale;
|
DROP TEMPORARY TABLE tmp.sale;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
CALL `vn`.`sale_getBoxPickingList`(1, curdate());
|
|
|
@ -15,7 +15,7 @@ BEGIN
|
||||||
JOIN agencyMode am ON am.id = t.agencyModeFk
|
JOIN agencyMode am ON am.id = t.agencyModeFk
|
||||||
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
|
LEFT JOIN ticketState ts ON ts.ticketFk = t.id
|
||||||
JOIN alertLevel al ON al.id = ts.alertLevel
|
JOIN alertLevel al ON al.id = ts.alertLevel
|
||||||
WHERE al.code = 'PACKED' OR (am.code = 'refund' AND al.code != 'delivered')
|
WHERE (al.code = 'PACKED' OR (am.code = 'refund' AND al.code != 'delivered'))
|
||||||
AND t.id = vTicketFk
|
AND t.id = vTicketFk
|
||||||
AND t.refFk IS NULL
|
AND t.refFk IS NULL
|
||||||
GROUP BY t.id);
|
GROUP BY t.id);
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE IF EXISTS vn2008.dock__ RENAME vn2008.dock;
|
||||||
|
ALTER TABLE IF EXISTS vn2008.dock COMMENT='';
|
||||||
|
|
||||||
|
ALTER TABLE IF EXISTS vn2008.Tramos__ RENAME vn2008.Tramos;
|
||||||
|
ALTER TABLE IF EXISTS vn2008.Tramos COMMENT='';
|
|
@ -0,0 +1 @@
|
||||||
|
ALTER TABLE vn.warehouse AUTO_INCREMENT=92;
|
|
@ -0,0 +1,8 @@
|
||||||
|
UPDATE vn.claim c
|
||||||
|
JOIN vn.claimState cs ON cs.id = c.claimStateFk
|
||||||
|
JOIN vn.claimState ns ON ns.code = 'resolved'
|
||||||
|
SET c.claimStateFk = ns.id
|
||||||
|
WHERE cs.code IN ('managed', 'mana', 'lack', 'relocation');
|
||||||
|
|
||||||
|
DELETE FROM vn.claimState
|
||||||
|
WHERE code IN ('managed', 'mana', 'lack', 'relocation');
|
|
@ -0,0 +1,2 @@
|
||||||
|
-- Place your SQL code here
|
||||||
|
ALTER TABLE dipole.expedition_PrintOut MODIFY COLUMN street varchar(42) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci DEFAULT ' ' NOT NULL;
|
|
@ -21,7 +21,7 @@ describe('Claim edit basic data path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should edit claim state and observation fields`, async() => {
|
it(`should edit claim state and observation fields`, async() => {
|
||||||
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Gestionado');
|
await page.autocompleteSearch(selectors.claimBasicData.claimState, 'Resuelto');
|
||||||
await page.clearInput(selectors.claimBasicData.packages);
|
await page.clearInput(selectors.claimBasicData.packages);
|
||||||
await page.write(selectors.claimBasicData.packages, '2');
|
await page.write(selectors.claimBasicData.packages, '2');
|
||||||
await page.waitToClick(selectors.claimBasicData.saveButton);
|
await page.waitToClick(selectors.claimBasicData.saveButton);
|
||||||
|
@ -48,7 +48,7 @@ describe('Claim edit basic data path', () => {
|
||||||
await page.waitForSelector(selectors.claimBasicData.claimState);
|
await page.waitForSelector(selectors.claimBasicData.claimState);
|
||||||
const result = await page.waitToGetProperty(selectors.claimBasicData.claimState, 'value');
|
const result = await page.waitToGetProperty(selectors.claimBasicData.claimState, 'value');
|
||||||
|
|
||||||
expect(result).toEqual('Gestionado');
|
expect(result).toEqual('Resuelto');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should confirm the "is paid with mana" and "Pick up" checkbox are checked', async() => {
|
it('should confirm the "is paid with mana" and "Pick up" checkbox are checked', async() => {
|
||||||
|
|
|
@ -346,5 +346,6 @@
|
||||||
"You cannot update these fields": "No puedes actualizar estos campos",
|
"You cannot update these fields": "No puedes actualizar estos campos",
|
||||||
"CountryFK cannot be empty": "El país no puede estar vacío",
|
"CountryFK cannot be empty": "El país no puede estar vacío",
|
||||||
"Cmr file does not exist": "El archivo del cmr no existe",
|
"Cmr file does not exist": "El archivo del cmr no existe",
|
||||||
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias"
|
"You are not allowed to modify the alias": "No estás autorizado a modificar el alias",
|
||||||
|
"The address of the customer must have information about Incoterms and Customs Agent": "El consignatario del cliente debe tener informado Incoterms y Agente de aduanas"
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ describe('claimstate isEditable()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const ctx = {req: {accessToken: {userId: claimManagerId}}};
|
const ctx = {req: {accessToken: {userId: claimManagerId}}};
|
||||||
const result = await app.models.ClaimState.isEditable(ctx, 7, options);
|
const result = await app.models.ClaimState.isEditable(ctx, 5, options);
|
||||||
|
|
||||||
expect(result).toEqual(true);
|
expect(result).toEqual(true);
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,13 @@ describe('Update Claim', () => {
|
||||||
claimStatesMap = claimStates.reduce((acc, state) => ({...acc, [state.code]: state.id}), {});
|
claimStatesMap = claimStates.reduce((acc, state) => ({...acc, [state.code]: state.id}), {});
|
||||||
});
|
});
|
||||||
const newDate = Date.vnNew();
|
const newDate = Date.vnNew();
|
||||||
|
const claimManagerId = 72;
|
||||||
const originalData = {
|
const originalData = {
|
||||||
ticketFk: 3,
|
ticketFk: 3,
|
||||||
clientFk: 1101,
|
clientFk: 1101,
|
||||||
ticketCreated: newDate,
|
ticketCreated: newDate,
|
||||||
workerFk: 18,
|
workerFk: 18,
|
||||||
claimStateFk: 2,
|
claimStateFk: 5,
|
||||||
isChargedToMana: true,
|
isChargedToMana: true,
|
||||||
responsibility: 4,
|
responsibility: 4,
|
||||||
observation: 'observation'
|
observation: 'observation'
|
||||||
|
@ -77,7 +78,6 @@ describe('Update Claim', () => {
|
||||||
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
||||||
|
|
||||||
const pendingState = claimStatesMap.pending;
|
const pendingState = claimStatesMap.pending;
|
||||||
const claimManagerId = 72;
|
|
||||||
const ctx = {
|
const ctx = {
|
||||||
req: {
|
req: {
|
||||||
accessToken: {userId: claimManagerId},
|
accessToken: {userId: claimManagerId},
|
||||||
|
@ -104,85 +104,7 @@ describe('Update Claim', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should success to update the claimState to 'managed' and send a rocket message`, async() => {
|
it(`should success to update the claimState to 'canceled' and send two rocket message`, async() => {
|
||||||
const tx = await app.models.Claim.beginTransaction({});
|
|
||||||
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
|
|
||||||
const newClaim = await app.models.Claim.create(originalData, options);
|
|
||||||
|
|
||||||
const chatModel = app.models.Chat;
|
|
||||||
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
|
||||||
|
|
||||||
const managedState = claimStatesMap.managed;
|
|
||||||
const claimManagerId = 72;
|
|
||||||
const ctx = {
|
|
||||||
req: {
|
|
||||||
accessToken: {userId: claimManagerId},
|
|
||||||
headers: {origin: url}
|
|
||||||
},
|
|
||||||
args: {
|
|
||||||
observation: 'valid observation',
|
|
||||||
claimStateFk: managedState,
|
|
||||||
hasToPickUp: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ctx.req.__ = i18n.__;
|
|
||||||
await app.models.Claim.updateClaim(ctx, newClaim.id, options);
|
|
||||||
|
|
||||||
let updatedClaim = await app.models.Claim.findById(newClaim.id, null, options);
|
|
||||||
|
|
||||||
expect(updatedClaim.observation).toEqual(ctx.args.observation);
|
|
||||||
expect(chatModel.sendCheckingPresence).toHaveBeenCalled();
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should success to update the claimState to 'resolved' and send a rocket message`, async() => {
|
|
||||||
const tx = await app.models.Claim.beginTransaction({});
|
|
||||||
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
|
|
||||||
const newClaim = await app.models.Claim.create(originalData, options);
|
|
||||||
|
|
||||||
const chatModel = app.models.Chat;
|
|
||||||
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
|
||||||
|
|
||||||
const resolvedState = claimStatesMap.resolved;
|
|
||||||
const claimManagerId = 72;
|
|
||||||
const ctx = {
|
|
||||||
req: {
|
|
||||||
accessToken: {userId: claimManagerId},
|
|
||||||
headers: {origin: url}
|
|
||||||
},
|
|
||||||
args: {
|
|
||||||
observation: 'valid observation',
|
|
||||||
claimStateFk: resolvedState,
|
|
||||||
hasToPickUp: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ctx.req.__ = i18n.__;
|
|
||||||
await app.models.Claim.updateClaim(ctx, newClaim.id, options);
|
|
||||||
|
|
||||||
let updatedClaim = await app.models.Claim.findById(newClaim.id, null, options);
|
|
||||||
|
|
||||||
expect(updatedClaim.observation).toEqual(ctx.args.observation);
|
|
||||||
expect(chatModel.sendCheckingPresence).toHaveBeenCalled();
|
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should success to update the claimState to 'canceled' and send a rocket message`, async() => {
|
|
||||||
const tx = await app.models.Claim.beginTransaction({});
|
const tx = await app.models.Claim.beginTransaction({});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -194,7 +116,6 @@ describe('Update Claim', () => {
|
||||||
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
||||||
|
|
||||||
const canceledState = claimStatesMap.canceled;
|
const canceledState = claimStatesMap.canceled;
|
||||||
const claimManagerId = 72;
|
|
||||||
const ctx = {
|
const ctx = {
|
||||||
req: {
|
req: {
|
||||||
accessToken: {userId: claimManagerId},
|
accessToken: {userId: claimManagerId},
|
||||||
|
@ -212,46 +133,7 @@ describe('Update Claim', () => {
|
||||||
let updatedClaim = await app.models.Claim.findById(newClaim.id, null, options);
|
let updatedClaim = await app.models.Claim.findById(newClaim.id, null, options);
|
||||||
|
|
||||||
expect(updatedClaim.observation).toEqual(ctx.args.observation);
|
expect(updatedClaim.observation).toEqual(ctx.args.observation);
|
||||||
expect(chatModel.sendCheckingPresence).toHaveBeenCalled();
|
expect(chatModel.sendCheckingPresence).toHaveBeenCalledTimes(2);
|
||||||
|
|
||||||
await tx.rollback();
|
|
||||||
} catch (e) {
|
|
||||||
await tx.rollback();
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it(`should success to update the claimState to 'incomplete' and send a rocket message`, async() => {
|
|
||||||
const tx = await app.models.Claim.beginTransaction({});
|
|
||||||
|
|
||||||
try {
|
|
||||||
const options = {transaction: tx};
|
|
||||||
|
|
||||||
const newClaim = await app.models.Claim.create(originalData, options);
|
|
||||||
|
|
||||||
const chatModel = app.models.Chat;
|
|
||||||
spyOn(chatModel, 'sendCheckingPresence').and.callThrough();
|
|
||||||
|
|
||||||
const incompleteState = 5;
|
|
||||||
const claimManagerId = 72;
|
|
||||||
const ctx = {
|
|
||||||
req: {
|
|
||||||
accessToken: {userId: claimManagerId},
|
|
||||||
headers: {origin: url}
|
|
||||||
},
|
|
||||||
args: {
|
|
||||||
observation: 'valid observation',
|
|
||||||
claimStateFk: incompleteState,
|
|
||||||
hasToPickUp: false
|
|
||||||
}
|
|
||||||
};
|
|
||||||
ctx.req.__ = i18n.__;
|
|
||||||
await app.models.Claim.updateClaim(ctx, newClaim.id, options);
|
|
||||||
|
|
||||||
let updatedClaim = await app.models.Claim.findById(newClaim.id, null, options);
|
|
||||||
|
|
||||||
expect(updatedClaim.observation).toEqual(ctx.args.observation);
|
|
||||||
expect(chatModel.sendCheckingPresence).toHaveBeenCalled();
|
|
||||||
|
|
||||||
await tx.rollback();
|
await tx.rollback();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe('Update Claim', () => {
|
||||||
clientFk: 1101,
|
clientFk: 1101,
|
||||||
ticketCreated: newDate,
|
ticketCreated: newDate,
|
||||||
workerFk: 18,
|
workerFk: 18,
|
||||||
claimStateFk: 2,
|
claimStateFk: 1,
|
||||||
isChargedToMana: true,
|
isChargedToMana: true,
|
||||||
responsibility: 4,
|
responsibility: 4,
|
||||||
observation: 'observation'
|
observation: 'observation'
|
||||||
|
|
|
@ -80,6 +80,6 @@ module.exports = Self => {
|
||||||
|
|
||||||
const content = toCSV(sales);
|
const content = toCSV(sales);
|
||||||
|
|
||||||
return [content, 'text/csv', `inline; filename="doc-${reference}.pdf"`];
|
return [content, 'text/csv', `inline; filename="doc-${reference}.csv"`];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -79,6 +79,6 @@ module.exports = Self => {
|
||||||
ORDER BY s.ticketFk, s.created`, [id]);
|
ORDER BY s.ticketFk, s.created`, [id]);
|
||||||
const content = toCSV(sales);
|
const content = toCSV(sales);
|
||||||
|
|
||||||
return [content, 'text/csv', `inline; filename="doc-${id}.pdf"`];
|
return [content, 'text/csv', `inline; filename="doc-${id}.csv"`];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
"log4js": "^6.7.0",
|
"log4js": "^6.7.0",
|
||||||
"mysql2": "^1.7.0",
|
"mysql2": "^1.7.0",
|
||||||
"nodemailer": "^4.7.0",
|
"nodemailer": "^4.7.0",
|
||||||
|
"puppeteer": "^22.4.0",
|
||||||
"puppeteer-cluster": "^0.23.0",
|
"puppeteer-cluster": "^0.23.0",
|
||||||
"qrcode": "^1.4.2",
|
"qrcode": "^1.4.2",
|
||||||
"strftime": "^0.10.0",
|
"strftime": "^0.10.0",
|
||||||
|
|
|
@ -32,9 +32,12 @@ dependencies:
|
||||||
nodemailer:
|
nodemailer:
|
||||||
specifier: ^4.7.0
|
specifier: ^4.7.0
|
||||||
version: 4.7.0
|
version: 4.7.0
|
||||||
|
puppeteer:
|
||||||
|
specifier: ^22.4.0
|
||||||
|
version: 22.4.0
|
||||||
puppeteer-cluster:
|
puppeteer-cluster:
|
||||||
specifier: ^0.23.0
|
specifier: ^0.23.0
|
||||||
version: 0.23.0(puppeteer@21.10.0)
|
version: 0.23.0(puppeteer@22.4.0)
|
||||||
qrcode:
|
qrcode:
|
||||||
specifier: ^1.4.2
|
specifier: ^1.4.2
|
||||||
version: 1.5.3
|
version: 1.5.3
|
||||||
|
@ -100,16 +103,17 @@ packages:
|
||||||
to-fast-properties: 2.0.0
|
to-fast-properties: 2.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@puppeteer/browsers@1.9.1:
|
/@puppeteer/browsers@2.1.0:
|
||||||
resolution: {integrity: sha512-PuvK6xZzGhKPvlx3fpfdM2kYY3P/hB1URtK8wA7XUJ6prn6pp22zvJHu48th0SGcHL9SutbPHrFuQgfXTFobWA==}
|
resolution: {integrity: sha512-xloWvocjvryHdUjDam/ZuGMh7zn4Sn3ZAaV4Ah2e2EwEt90N3XphZlSsU3n0VDc1F7kggCjMuH0UuxfPQ5mD9w==}
|
||||||
engines: {node: '>=16.3.0'}
|
engines: {node: '>=18'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
extract-zip: 2.0.1
|
extract-zip: 2.0.1
|
||||||
progress: 2.0.3
|
progress: 2.0.3
|
||||||
proxy-agent: 6.3.1
|
proxy-agent: 6.4.0
|
||||||
tar-fs: 3.0.4
|
semver: 7.6.0
|
||||||
|
tar-fs: 3.0.5
|
||||||
unbzip2-stream: 1.4.3
|
unbzip2-stream: 1.4.3
|
||||||
yargs: 17.7.2
|
yargs: 17.7.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -243,6 +247,37 @@ packages:
|
||||||
resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==}
|
resolution: {integrity: sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/bare-events@2.2.1:
|
||||||
|
resolution: {integrity: sha512-9GYPpsPFvrWBkelIhOhTWtkeZxVxZOdb3VnFTCzlOo3OjvmTvzLoZFUT8kNFACx0vJej6QPney1Cf9BvzCNE/A==}
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/bare-fs@2.2.1:
|
||||||
|
resolution: {integrity: sha512-+CjmZANQDFZWy4PGbVdmALIwmt33aJg8qTkVjClU6X4WmZkTPBDxRHiBn7fpqEWEfF3AC2io++erpViAIQbSjg==}
|
||||||
|
requiresBuild: true
|
||||||
|
dependencies:
|
||||||
|
bare-events: 2.2.1
|
||||||
|
bare-os: 2.2.0
|
||||||
|
bare-path: 2.1.0
|
||||||
|
streamx: 2.15.6
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/bare-os@2.2.0:
|
||||||
|
resolution: {integrity: sha512-hD0rOPfYWOMpVirTACt4/nK8mC55La12K5fY1ij8HAdfQakD62M+H4o4tpfKzVGLgRDTuk3vjA4GqGXXCeFbag==}
|
||||||
|
requiresBuild: true
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
|
/bare-path@2.1.0:
|
||||||
|
resolution: {integrity: sha512-DIIg7ts8bdRKwJRJrUMy/PICEaQZaPGZ26lsSx9MJSwIhSrcdHn7/C8W+XmnG/rKi6BaRcz+JO00CjZteybDtw==}
|
||||||
|
requiresBuild: true
|
||||||
|
dependencies:
|
||||||
|
bare-os: 2.2.0
|
||||||
|
dev: false
|
||||||
|
optional: true
|
||||||
|
|
||||||
/base64-js@1.5.1:
|
/base64-js@1.5.1:
|
||||||
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -326,12 +361,12 @@ packages:
|
||||||
lodash.some: 4.6.0
|
lodash.some: 4.6.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/chromium-bidi@0.5.6(devtools-protocol@0.0.1232444):
|
/chromium-bidi@0.5.12(devtools-protocol@0.0.1249869):
|
||||||
resolution: {integrity: sha512-ber8smgoAs4EqSUHRb0I8fpx371ZmvsdQav8HRM9oO4fk5Ox16vQiNYXlsZkRj4FfvVL2dCef+zBFQixp+79CA==}
|
resolution: {integrity: sha512-sZMgEBWKbupD0Q7lyFu8AWkrE+rs5ycE12jFkGwIgD/VS8lDPtelPlXM7LYaq4zrkZ/O2L3f4afHUHL0ICdKog==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
devtools-protocol: '*'
|
devtools-protocol: '*'
|
||||||
dependencies:
|
dependencies:
|
||||||
devtools-protocol: 0.0.1232444
|
devtools-protocol: 0.0.1249869
|
||||||
mitt: 3.0.1
|
mitt: 3.0.1
|
||||||
urlpattern-polyfill: 10.0.0
|
urlpattern-polyfill: 10.0.0
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -545,8 +580,8 @@ packages:
|
||||||
resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==}
|
resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/devtools-protocol@0.0.1232444:
|
/devtools-protocol@0.0.1249869:
|
||||||
resolution: {integrity: sha512-pM27vqEfxSxRkTMnF+XCmxSEb6duO5R+t8A9DEEJgy4Wz2RVanje2mmj99B6A3zv2r/qGfYlOvYznUhuokizmg==}
|
resolution: {integrity: sha512-Ctp4hInA0BEavlUoRy9mhGq0i+JSo/AwVyX2EFgZmV1kYB+Zq+EMBAn52QWu6FbRr10hRb6pBl420upbp4++vg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/dijkstrajs@1.0.3:
|
/dijkstrajs@1.0.3:
|
||||||
|
@ -968,8 +1003,8 @@ packages:
|
||||||
statuses: 1.3.1
|
statuses: 1.3.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/http-proxy-agent@7.0.0:
|
/http-proxy-agent@7.0.2:
|
||||||
resolution: {integrity: sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==}
|
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.0
|
agent-base: 7.1.0
|
||||||
|
@ -987,8 +1022,8 @@ packages:
|
||||||
sshpk: 1.18.0
|
sshpk: 1.18.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/https-proxy-agent@7.0.2:
|
/https-proxy-agent@7.0.4:
|
||||||
resolution: {integrity: sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==}
|
resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.0
|
agent-base: 7.1.0
|
||||||
|
@ -1258,6 +1293,13 @@ packages:
|
||||||
yallist: 3.1.1
|
yallist: 3.1.1
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/lru-cache@6.0.0:
|
||||||
|
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
dependencies:
|
||||||
|
yallist: 4.0.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
/lru-cache@7.18.3:
|
/lru-cache@7.18.3:
|
||||||
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
|
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
|
||||||
engines: {node: '>=12'}
|
engines: {node: '>=12'}
|
||||||
|
@ -1308,10 +1350,6 @@ packages:
|
||||||
resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
|
resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/mkdirp-classic@0.5.3:
|
|
||||||
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/ms@0.7.1:
|
/ms@0.7.1:
|
||||||
resolution: {integrity: sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg==}
|
resolution: {integrity: sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
@ -1432,8 +1470,8 @@ packages:
|
||||||
agent-base: 7.1.0
|
agent-base: 7.1.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
get-uri: 6.0.2
|
get-uri: 6.0.2
|
||||||
http-proxy-agent: 7.0.0
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.2
|
https-proxy-agent: 7.0.4
|
||||||
pac-resolver: 7.0.0
|
pac-resolver: 7.0.0
|
||||||
socks-proxy-agent: 8.0.2
|
socks-proxy-agent: 8.0.2
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
|
@ -1536,14 +1574,14 @@ packages:
|
||||||
ipaddr.js: 1.4.0
|
ipaddr.js: 1.4.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/proxy-agent@6.3.1:
|
/proxy-agent@6.4.0:
|
||||||
resolution: {integrity: sha512-Rb5RVBy1iyqOtNl15Cw/llpeLH8bsb37gM1FUfKQ+Wck6xHlbAhWGUFiTRHtkjqGTA5pSHz6+0hrPW/oECihPQ==}
|
resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==}
|
||||||
engines: {node: '>= 14'}
|
engines: {node: '>= 14'}
|
||||||
dependencies:
|
dependencies:
|
||||||
agent-base: 7.1.0
|
agent-base: 7.1.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
http-proxy-agent: 7.0.0
|
http-proxy-agent: 7.0.2
|
||||||
https-proxy-agent: 7.0.2
|
https-proxy-agent: 7.0.4
|
||||||
lru-cache: 7.18.3
|
lru-cache: 7.18.3
|
||||||
pac-proxy-agent: 7.0.1
|
pac-proxy-agent: 7.0.1
|
||||||
proxy-from-env: 1.1.0
|
proxy-from-env: 1.1.0
|
||||||
|
@ -1572,26 +1610,26 @@ packages:
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/puppeteer-cluster@0.23.0(puppeteer@21.10.0):
|
/puppeteer-cluster@0.23.0(puppeteer@22.4.0):
|
||||||
resolution: {integrity: sha512-108terIWDzPrQopmoYSPd5yDoy3FGJ2dNnoGMkGYPs6xtkdhgaECwpfZkzaRToMQPZibUOz0/dSSGgPEdXEhkQ==}
|
resolution: {integrity: sha512-108terIWDzPrQopmoYSPd5yDoy3FGJ2dNnoGMkGYPs6xtkdhgaECwpfZkzaRToMQPZibUOz0/dSSGgPEdXEhkQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
puppeteer: '>=1.5.0'
|
puppeteer: '>=1.5.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
puppeteer: 21.10.0
|
puppeteer: 22.4.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- supports-color
|
- supports-color
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/puppeteer-core@21.10.0:
|
/puppeteer-core@22.4.0:
|
||||||
resolution: {integrity: sha512-NVaqO3K462qwMuLO4Gurs/Mau1Wss+08QgNYzF0dIqZWMvpskrt/TbxbmHU+7zMTUOvPEq/lR4BLJmjMBgBGfQ==}
|
resolution: {integrity: sha512-MZttAbttrxi6O/B//rY6zQihjFe/vXeCLb5YvKH2xG6yrcVESo0Hc5/Cv49omwZyZzAJ1BK8BnDeatDsj+3hMw==}
|
||||||
engines: {node: '>=16.13.2'}
|
engines: {node: '>=18'}
|
||||||
dependencies:
|
dependencies:
|
||||||
'@puppeteer/browsers': 1.9.1
|
'@puppeteer/browsers': 2.1.0
|
||||||
chromium-bidi: 0.5.6(devtools-protocol@0.0.1232444)
|
chromium-bidi: 0.5.12(devtools-protocol@0.0.1249869)
|
||||||
cross-fetch: 4.0.0
|
cross-fetch: 4.0.0
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
devtools-protocol: 0.0.1232444
|
devtools-protocol: 0.0.1249869
|
||||||
ws: 8.16.0
|
ws: 8.16.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- bufferutil
|
- bufferutil
|
||||||
|
@ -1600,15 +1638,15 @@ packages:
|
||||||
- utf-8-validate
|
- utf-8-validate
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/puppeteer@21.10.0:
|
/puppeteer@22.4.0:
|
||||||
resolution: {integrity: sha512-Y1yQjcLE00hHTDAmv3M3A6hhW0Ytjdp6xr6nyjl7FZ7E7hzp/6Rsw80FbaTJzJHFCplBNi082wrgynbmD7RlYw==}
|
resolution: {integrity: sha512-tR+JsDbA2qD1DqRX4F9k9SxQhk6UzcaCN+Qux7+WrDceS7wcR7tlFmMNB8+g8zE4Fmr/iRTOtf5wNnTW9cGUFQ==}
|
||||||
engines: {node: '>=16.13.2'}
|
engines: {node: '>=18'}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
requiresBuild: true
|
requiresBuild: true
|
||||||
dependencies:
|
dependencies:
|
||||||
'@puppeteer/browsers': 1.9.1
|
'@puppeteer/browsers': 2.1.0
|
||||||
cosmiconfig: 9.0.0
|
cosmiconfig: 9.0.0
|
||||||
puppeteer-core: 21.10.0
|
puppeteer-core: 22.4.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- bufferutil
|
- bufferutil
|
||||||
- encoding
|
- encoding
|
||||||
|
@ -1640,6 +1678,7 @@ packages:
|
||||||
|
|
||||||
/queue-tick@1.0.1:
|
/queue-tick@1.0.1:
|
||||||
resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==}
|
resolution: {integrity: sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==}
|
||||||
|
requiresBuild: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/randombytes@2.1.0:
|
/randombytes@2.1.0:
|
||||||
|
@ -1729,6 +1768,14 @@ packages:
|
||||||
hasBin: true
|
hasBin: true
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/semver@7.6.0:
|
||||||
|
resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
|
||||||
|
engines: {node: '>=10'}
|
||||||
|
hasBin: true
|
||||||
|
dependencies:
|
||||||
|
lru-cache: 6.0.0
|
||||||
|
dev: false
|
||||||
|
|
||||||
/send@0.14.1:
|
/send@0.14.1:
|
||||||
resolution: {integrity: sha512-1Ru269QpUVUgD32Y9jdyBXiX+pHYuYnTzR17w+DhyOWvGMPjJILrnLhl9c4LQjtIy2BSAa6Ykq0ZdGcAjaXlwQ==}
|
resolution: {integrity: sha512-1Ru269QpUVUgD32Y9jdyBXiX+pHYuYnTzR17w+DhyOWvGMPjJILrnLhl9c4LQjtIy2BSAa6Ykq0ZdGcAjaXlwQ==}
|
||||||
engines: {node: '>= 0.8.0'}
|
engines: {node: '>= 0.8.0'}
|
||||||
|
@ -1950,12 +1997,14 @@ packages:
|
||||||
engines: {node: '>= 0.4'}
|
engines: {node: '>= 0.4'}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/tar-fs@3.0.4:
|
/tar-fs@3.0.5:
|
||||||
resolution: {integrity: sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==}
|
resolution: {integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==}
|
||||||
dependencies:
|
dependencies:
|
||||||
mkdirp-classic: 0.5.3
|
|
||||||
pump: 3.0.0
|
pump: 3.0.0
|
||||||
tar-stream: 3.1.7
|
tar-stream: 3.1.7
|
||||||
|
optionalDependencies:
|
||||||
|
bare-fs: 2.2.1
|
||||||
|
bare-path: 2.1.0
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/tar-stream@3.1.7:
|
/tar-stream@3.1.7:
|
||||||
|
@ -2200,6 +2249,10 @@ packages:
|
||||||
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
|
/yallist@4.0.0:
|
||||||
|
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
/yargs-parser@18.1.3:
|
/yargs-parser@18.1.3:
|
||||||
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
|
resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==}
|
||||||
engines: {node: '>=6'}
|
engines: {node: '>=6'}
|
||||||
|
|
|
@ -40,17 +40,6 @@ table.repeatable > tbody > tr > td {
|
||||||
padding-top: 0.5em;
|
padding-top: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
section.text-area {
|
|
||||||
margin-top: 1em;
|
|
||||||
padding: 0.19em;
|
|
||||||
padding-left: 1em;
|
|
||||||
padding-right: 1em;
|
|
||||||
background-color: #e5e5e5;
|
|
||||||
& > p {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.route-block {
|
.route-block {
|
||||||
margin-bottom: 100px;
|
margin-bottom: 100px;
|
||||||
page-break-after: always;
|
page-break-after: always;
|
||||||
|
|
|
@ -128,8 +128,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div v-if="ticket.description" class="text-area">
|
<div v-if="ticket.description">
|
||||||
<p>{{ticket.description}}</p>
|
<p style="word-break: break-all">{{ticket.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
const vnReport = require('../../../core/mixins/vn-report.js');
|
const vnReport = require('../../../core/mixins/vn-report.js');
|
||||||
|
const UserError = require('vn-loopback/util/user-error');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: 'invoice-incoterms',
|
name: 'invoice-incoterms',
|
||||||
|
@ -7,7 +8,10 @@ module.exports = {
|
||||||
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
|
this.invoice = await this.findOneFromDef('invoice', [this.reference]);
|
||||||
this.checkMainEntity(this.invoice);
|
this.checkMainEntity(this.invoice);
|
||||||
this.client = await this.findOneFromDef('client', [this.reference]);
|
this.client = await this.findOneFromDef('client', [this.reference]);
|
||||||
this.incoterms = await this.findOneFromDef('incoterms', [this.reference, this.reference, this.reference, this.reference]);
|
this.incoterms =
|
||||||
|
await this.findOneFromDef('incoterms', [this.reference, this.reference, this.reference, this.reference]);
|
||||||
|
if (!this.incoterms)
|
||||||
|
throw new UserError(`The address of the customer must have information about Incoterms and Customs Agent`);
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
reference: {
|
reference: {
|
||||||
|
|
Loading…
Reference in New Issue