selectline-software / selectline-api

Apache License 2.0
24 stars 5 forks source link

[Solved] Error when setting payment block adding document #371

Closed abdullahbaa5 closed 3 months ago

abdullahbaa5 commented 4 months ago

Details

Steps to replicate the behavior:

when creating a document with payment block specified i get the error above but if i set the payment block as null it works?

image

MatthiasGuse commented 4 months ago

Hi,

i think the date "FinancialAccountExportDate" is not necessary. Also the value in your screenshot is invalid. Please only use the values you need.

Regards

abdullahbaa5 commented 4 months ago

Hi,

i think the date "FinancialAccountExportDate" is not necessary. Also the value in your screenshot is invalid. Please only use the values you need.

Regards

it was a few of those values. The issue was that I had a whole class with all DocumentDetailPayment and the json serializer was giving the values default value of null, 0 or "".

for example in above screenshot there is not PaymentTerm but in the json sent to the api, it was set as "", hence one of the properties that was not allowed to be changed/edited/set was send too which i did not define at all, so i completely removed all variables that i do not need.

Before: image

After: image