FormerMember

Getting exception 'Non-zero amount must be rounded to whole currency' Sage 50 C# WPF?

Posted By FormerMember

When I try to add an amount in AmountPaid field & if the amount = 55.23 then it throws an exception with stated text "Non-zero amount must be rounded to whole currency"

I tried AmountPaid = Match.Ceiling(amount) which changes the 55.23 to 56 which works great, but I want to make it as it is i.e 55.23 The thing which I understood is that the DB of Sage50 2020 is not allowing amount with decimal places.

invoiceLine.AmountPaid = item.amount

I think this error is only with .Net SDK which Sage 50 2020 provided to us. The suggestion will also be appreciated. Thanks in advance