Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a new voucher #1

Open
jkaessens opened this issue Nov 20, 2021 · 2 comments
Open

Creating a new voucher #1

jkaessens opened this issue Nov 20, 2021 · 2 comments

Comments

@jkaessens
Copy link

To circumvent lexoffice's inability to create invoices for custom templates, I'm pulling invoice drafts from the API, use the invoice data to create a PDF and upload the PDF back to lexoffice as a file. With the crate, I created a new Voucher but I cannot POST it to the API. The very last step would be the removal of the invoice draft.

It looks like Voucher would need a Storable impl and Invoice would need a Deletable impl for this workflow.

I'll try to implement it on my own and make a PR but maybe you can give a few hints.

Also, thanks for all the work!

@Gottox
Copy link
Owner

Gottox commented Nov 20, 2021

You're right, Voucher is missing both the Storable and the Updatable trait. But at least according to the API docs, there's no way to delete an invoice.

@Gottox
Copy link
Owner

Gottox commented Nov 20, 2021

Adding the such traits is pretty simple if the implementation is the default one. The generic example is the "Contacts" implementation. For most cases, adding an empty impl for the trait is enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants