u
This commit is contained in:
@@ -6,6 +6,7 @@ import makeRunner from '../runner.js';
|
||||
import shippingCreate from '../shipping/create.js';
|
||||
import { loadShipment, queriesFor } from './helpers.js';
|
||||
import { syncOrderSummary } from '../order/syncSummary.js';
|
||||
import { syncRetoureSummary } from '../retoure/syncSummary.js';
|
||||
import { syncShipmentSummary } from './syncSummary.js';
|
||||
|
||||
function requireId(val, name) {
|
||||
@@ -293,8 +294,12 @@ export default function create(provider) {
|
||||
// summary state ('delivered') 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 });
|
||||
// 9. Synchronize order/retoure summary row and shipment summary row
|
||||
if (order.type === 'retoure') {
|
||||
await syncRetoureSummary(runner, { companyId, manifestId: orderId });
|
||||
} else {
|
||||
await syncOrderSummary(runner, { companyId, manifestId: orderId });
|
||||
}
|
||||
const validState = input.state && ['new', 'delivered'].includes(String(input.state).trim().toLowerCase())
|
||||
? String(input.state).trim().toLowerCase()
|
||||
: 'new';
|
||||
|
||||
Reference in New Issue
Block a user