u
This commit is contained in:
@@ -289,6 +289,10 @@ export default function create(provider) {
|
||||
ensureTax,
|
||||
});
|
||||
|
||||
// 8b. Create the shipping (carrier) atomically with the shipment. Must run before the
|
||||
// summary state ('delivered'/'returned') is written, as that would block shipping creation.
|
||||
await createShipping(googleAuthId, { ...input.shipping, manifestId }, innerTx);
|
||||
|
||||
// 9. Synchronize order summary row and shipment summary row
|
||||
await syncOrderSummary(runner, { companyId, manifestId: orderId });
|
||||
const validState = input.state && ['new', 'delivered', 'returned'].includes(String(input.state).trim().toLowerCase())
|
||||
@@ -303,9 +307,6 @@ export default function create(provider) {
|
||||
state: validState,
|
||||
});
|
||||
|
||||
// 10. Create the shipping (carrier) atomically with the shipment
|
||||
await createShipping(googleAuthId, { ...input.shipping, manifestId }, innerTx);
|
||||
|
||||
return loadShipment(runner, q, companyId, manifestId);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user