mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-15 17:24:10 +00:00
Add Convert to Estimate feature for invoices
New backend endpoint POST /invoices/{id}/convert-to-estimate that
creates a draft estimate from an invoice, copying items, taxes,
custom fields, and financial data. Frontend wired with dropdown
action, store method, and API service call.
This commit is contained in:
@@ -103,6 +103,11 @@ export const invoiceService = {
|
||||
return data
|
||||
},
|
||||
|
||||
async convertToEstimate(id: number): Promise<ApiResponse<Record<string, unknown>>> {
|
||||
const { data } = await client.post(`${API.INVOICES}/${id}/convert-to-estimate`)
|
||||
return data
|
||||
},
|
||||
|
||||
async changeStatus(payload: InvoiceStatusPayload): Promise<ApiResponse<Invoice>> {
|
||||
const { data } = await client.post(`${API.INVOICES}/${payload.id}/status`, payload)
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user