ej2 / python-quickbooks

A Python library for accessing the Quickbooks API.
MIT License
407 stars 195 forks source link

handle Decimal on amount values #364

Open laf-rge opened 3 months ago

laf-rge commented 3 months ago

In the testing on my project the jsonEncoder in newer versions of python calls default for both keys and values. This means that you get an exception if you pass in Decimal as a line amount on newer versions of python with the existing lambda on default.

I think we should also include a test where a bill is created with a decimal line amount and to_json() is called to ensure there is no exception.

bradywhitby commented 3 months ago

I'd just like to express a desire to have this PR merged into master. Our program works fine on 0.9.8, but fails in 0.9.9+ due to this jsonEncoder issue

laf-rge commented 1 month ago

Let me know if there is anything else I can do to get this merged.