Merge branch 'dashboard' into dev

This commit is contained in:
Moritz Utcke
2025-04-21 20:25:20 -03:00
2 changed files with 26 additions and 3 deletions

View File

@@ -281,6 +281,24 @@ export async function createInvoice(
};
}
export async function getLexOfficeVoucherNumber(rechnung: Rechnung) {
const request = await fetch(
`https://api.lexoffice.io/v1/invoices/${rechnung.lex_office_id}`,
{
method: "GET",
headers: {
Accept: `application/json`,
Authorization: `Bearer ${LEX_OFFICE_API_KEY}`,
"Content-Type": "application/json",
},
}
);
const response = await request.json();
return response["voucherNumber"]
}
/**