Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: use shipping method from shipment

Brad Barbinc1d30a7b3820
diff --git a/apps/erp/app/routes/file+/shipment+/$id[.]pdf.tsx b/apps/erp/app/routes/file+/shipment+/$id[.]pdf.tsx
index fc91cdcbe3..351dcdeedc 100644
--- a/apps/erp/app/routes/file+/shipment+/$id[.]pdf.tsx
+++ b/apps/erp/app/routes/file+/shipment+/$id[.]pdf.tsx
@@ -93,7 +93,9 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
getPaymentTerm(client, salesOrder.data?.paymentTermId ?? ""),
getShippingMethod(
client,
- salesOrderShipment.data?.shippingMethodId ?? ""
+ shipment.data.shippingMethodId ??
+ salesOrderShipment.data?.shippingMethodId ??
+ ""
),
getShipmentTracking(client, shipment.data.id, companyId),
]);