Jump to content

Line items on sales invoices are appended and not replaced.


Recommended Posts

When we do a put request on sales_invoices the sales invoice line items are apended instead of replaced.



Payload from put request

{\"description\":\"1 June: Winit updated 2\",\"ledger_account_id\":\"70b1a238cd1b11eb8fb306aa8a4632ce\",\"unit_price\":71.4,\"quantity\":3.5,\"tax_amount\":14.28,\"tax_rate_id\":\"FR_STANDARD\"},
{\"description\":\"1 June: WinIt - Seb and Eugenie updated 2\",\"ledger_account_id\":\"70b1a238cd1b11eb8fb306aa8a4632ce\",\"unit_price\":71.4,\"quantity\":3.5,\"tax_amount\":14.28,\"tax_rate_id\":\"FR_STANDARD\"},



As you can see, while our descriptions are all '1 June: Winit updated 2' In the invoicce we have:

1 June: Winit and 1 June: Winit updated 1 and 1 June: Winit updated 2

From the documentation:

Once you have an invoice or estimate posted and need to alter or correct something on a line item, it is possible to make a PUT request, and specify the desired result. This means that you cannot simply make a PUT request using just the lines you wish to change but need to specify everything that is correct also. It can be thought of as making a POST request for the first time correctly but using PUT.


This feels awfully like a bug, please let us know how to procead. 


Screen Shot 2021-06-21 at 3.30.06 PM.png

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...