C# SDK convert Order to Invoice

SUGGESTED

Hi,

I can convert Order to Invoice, but  I'm not able to set quantity of the last line. If I set quantity of all the lines but not the last one, the POST will work. If I set quantity on all lines, it will failed on the POST, and an error will appear : An unknown error has occurred. To protect your corporate data, Sage 50 will shut down immediately. Unsaved data will be lost.

This is my code : 

I'm using SDK version 2020.2