Merge branch 'dashboard' into dev
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user