2022
...
Instead of sending the Zero value to the Total Amount send the non -zero values while inserting and once it is inserted you can do the upsert with Zero(0.0) for the Total Amount.
Solution:
Instead of sending the zero value to the Total Amount, send a non-zero value while inserting. Once the values are inserted, you can do the upsert with Zero(0.0) for the Total Amount.