u
This commit is contained in:
@@ -118,13 +118,9 @@ async function run() {
|
||||
{ sku: trackedArt.sku, amount: 3 },
|
||||
{ sku: untrackedArt.sku, amount: 2 },
|
||||
],
|
||||
shipping: { carrierId: carrier.id, type: 'parcel', state: 'open' },
|
||||
});
|
||||
const shippingOpen = await store.shipping.create(googleAuthId, {
|
||||
manifestId: shipment.id,
|
||||
carrierId: carrier.id,
|
||||
type: 'parcel',
|
||||
state: 'open',
|
||||
});
|
||||
const shippingOpen = shipment.shippings[0];
|
||||
assert.equal(shippingOpen.state, 'open');
|
||||
|
||||
// Assert stock is still 10
|
||||
@@ -191,6 +187,7 @@ async function run() {
|
||||
number: 'O-HIST-001',
|
||||
date: historicalDate,
|
||||
createdAt: historicalDate,
|
||||
entityId: customer.id,
|
||||
lines: [{ sku: trackedArt.sku, amount: 1, net: 10, taxrate: 19 }],
|
||||
});
|
||||
const histWithOld = await store.article.getHistoryBySku(googleAuthId, trackedArt.sku);
|
||||
@@ -253,14 +250,9 @@ async function run() {
|
||||
const shipment2 = await store.shipment.create(googleAuthId, {
|
||||
orderId: order2.id,
|
||||
lines: [{ sku: trackedArt.sku, amount: 2 }],
|
||||
shipping: { carrierId: carrier.id, type: 'parcel', state: 'shipped' },
|
||||
});
|
||||
|
||||
const directShipped = await store.shipping.create(googleAuthId, {
|
||||
manifestId: shipment2.id,
|
||||
carrierId: carrier.id,
|
||||
type: 'parcel',
|
||||
state: 'shipped',
|
||||
});
|
||||
const directShipped = shipment2.shippings[0];
|
||||
assert.equal(directShipped.state, 'shipped');
|
||||
|
||||
const artFinal = await store.article.getBySku(googleAuthId, trackedArt.sku);
|
||||
|
||||
Reference in New Issue
Block a user