This commit is contained in:
natib21
2026-07-03 20:59:21 +00:00
parent 90ab1bd042
commit 7155ec7e01
3 changed files with 10 additions and 100 deletions

View File

@@ -65,7 +65,7 @@ export interface LastMileRecord {
vehicle?: LastMileVehicle | null;
}>;
/** Present only when an invoice has actually been generated (not on distance). */
invoice?: { number: string; status: string } | null;
invoice?: { id: string; number: string; status: string } | null;
createdAt: string;
updatedAt: string;
}
@@ -97,5 +97,5 @@ export const lastMileService = {
remainingPayment?: number,
) => api.post<LastMileRecord>(`${LM.BASE}/${id}/distances`, { distances, remainingPayment }),
generateInvoice: (id: string) =>
api.post<unknown>(`${LM.BASE}/${id}/invoice`),
api.post<{ id: string; invoiceNumber?: string } | null>(`${LM.BASE}/${id}/invoice`),
};