mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 21:08:12 +00:00
api
This commit is contained in:
@@ -749,12 +749,12 @@ export const api = {
|
||||
() => ["warehouse-fee-rules"],
|
||||
),
|
||||
|
||||
feePreview: endpoint<{ inventoryId: string }, FeePreview[]>(
|
||||
feePreview: endpoint<{ inventoryId: string; billingCurrency?: 'ETB' | 'USD' }, FeePreview[]>(
|
||||
"warehouse-inventory",
|
||||
"fee-preview",
|
||||
({ inventoryId }) =>
|
||||
warehouseService.feePreview(inventoryId).then((r) => r.data),
|
||||
({ inventoryId }) => ["warehouse-inventory", inventoryId, "fee-preview"],
|
||||
({ inventoryId, billingCurrency }) =>
|
||||
warehouseService.feePreview(inventoryId, billingCurrency).then((r) => r.data),
|
||||
({ inventoryId, billingCurrency }) => ["warehouse-inventory", inventoryId, "fee-preview", billingCurrency ?? 'USD'],
|
||||
),
|
||||
|
||||
invoices: endpoint<{ filter?: WarehouseInvoiceFilter }, WarehouseFeeInvoice[]>(
|
||||
@@ -1045,14 +1045,14 @@ export const api = {
|
||||
|
||||
// ── Invoices ───────────────────────────────────────────────────────────
|
||||
generateInvoice: endpoint<
|
||||
{ inventoryId: string; confirmZero?: boolean },
|
||||
{ inventoryId: string; confirmZero?: boolean; billingCurrency?: 'ETB' | 'USD' },
|
||||
WarehouseFeeInvoice
|
||||
>(
|
||||
"warehouse-fee-invoices",
|
||||
"generate",
|
||||
({ inventoryId, confirmZero }) =>
|
||||
({ inventoryId, confirmZero, billingCurrency }) =>
|
||||
warehouseService
|
||||
.generateInvoice(inventoryId, confirmZero)
|
||||
.generateInvoice(inventoryId, confirmZero, billingCurrency)
|
||||
.then((r) => r.data),
|
||||
undefined,
|
||||
() => [["warehouse-fee-invoices"], ["warehouse-inventory"]],
|
||||
@@ -1980,4 +1980,4 @@ export const api = {
|
||||
({ range }) => overviewService.getDashboard(range),
|
||||
),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user