Tripletex / Tripletex/tripletex-api2
Post /invoice api won't accept negative payment for credit note
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 49
- Forks
- 47
- Avg merge
- 1h 1m
- Merged PRs (30d)
- 1
Description
Hi.
I created an invoice through an API with negative quantity on each order items to make the invoice becomes credit note.
However, there will be a balance with negative amount. To make it zero balance, I have to send a negative payment.
But If I add negative amount to paidAmount with paymentTypeId 3218504 or 3218505, I got this error validation
"Både paidAmount og paymentTypeId må oppgis ved registrering av en forhåndsbetalt faktura."
Is there a way to make the Post /invoice can accept negative paidAmount?
PUT /invoice/{id}/:payment can accept negative paidAmount, can we make Post /invoice accept negative paidAmount also?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the POST /invoice endpoint and compare its negative-payment handling with PUT /invoice/{id}/:payment, as described in the issue. The work is done when POST /invoice accepts a negative paidAmount for credit-note invoices without the reported validation error, while existing payment behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100