purchase slice 1

This commit is contained in:
2026-03-15 09:04:18 -05:00
parent 5a1164f497
commit 18e4044124
11 changed files with 753 additions and 48 deletions

View File

@@ -47,6 +47,7 @@ import type {
PurchaseOrderSummaryDto,
PurchaseVendorOptionDto,
} from "@mrp/shared";
import type { PurchaseReceiptInput } from "@mrp/shared/dist/purchasing/types.js";
import type {
ShipmentDetailDto,
ShipmentInput,
@@ -470,6 +471,13 @@ export const api = {
token
);
},
createPurchaseReceipt(token: string, orderId: string, payload: PurchaseReceiptInput) {
return request<PurchaseOrderDetailDto>(
`/api/v1/purchasing/orders/${orderId}/receipts`,
{ method: "POST", body: JSON.stringify(payload) },
token
);
},
getShipmentOrderOptions(token: string) {
return request<ShipmentOrderOptionDto[]>("/api/v1/shipping/orders/options", undefined, token);
},