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

Unable to update voucher number using PUT /ledger/voucher/{} #88

Closed
kidisy opened this issue Nov 7, 2023 · 2 comments
Closed

Unable to update voucher number using PUT /ledger/voucher/{} #88

kidisy opened this issue Nov 7, 2023 · 2 comments

Comments

@kidisy
Copy link

kidisy commented Nov 7, 2023

I want to update the voucher by sending new file or resend the previous data by using PUT
"/ledger/voucher/{}".format(self.api, id)
payload = {"number": id}
then i get this error message
"status" : 422,
"code" : 18000,
"message" : "Validering feilet.",
"link" : "https://www.tripletex.no/tripletex-api-2-0/",
"developerMessage" : "VALIDATION_ERROR",
"validationMessages" : [ {
"field" : "null",
"message" : "Errors:\r\nBilagsnummer -2023 er allerede registrert."
"path" : "null",
"rootId" : "null"
} ],
"requestId" : "
---****-***********"
Any suggestion how i use the previous voucher number with the new sent data?

@tlxVidar
Copy link
Contributor

tlxVidar commented Nov 7, 2023

The voucher number is a system generated number that cannot be changed.
In general the voucher number is generated by the system when the voucher is sent to the ledger, this can be done both on POST and on PUT, this is controlled with the parameter "sendToLedger"

@kidisy
Copy link
Author

kidisy commented Nov 7, 2023

ok, thank you

@kidisy kidisy closed this as completed Nov 7, 2023
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