Skip to content

Commit

Permalink
Merge pull request #461 from renderbox/master
Browse files Browse the repository at this point in the history
merge latest to develop
  • Loading branch information
mgcamisa authored Oct 24, 2024
2 parents 3f93cc1 + e6dfbdb commit c447bee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ universal = true

[project]
name = "django-vendor"
version = "0.4.17"
version = "0.4.18"

authors = [
{ name="Grant Viklund", email="[email protected]" },
Expand Down
4 changes: 3 additions & 1 deletion src/vendor/processors/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ def convert_decimal_to_integer(self, decimal):
fraction_part, whole_part = modf(decimal)

whole_str = str(whole_part).split('.')[0]
fraction_str = str(fraction_part).split('.')[1][:2]
# need to use Decimal since floats will not always round as expected
rounded_fraction = Decimal(fraction_part).quantize(Decimal('.00'), rounding=ROUND_UP)
fraction_str = str(rounded_fraction).split('.')[1]

if len(fraction_str) < 2:
fraction_str = "0" + fraction_str
Expand Down

0 comments on commit c447bee

Please sign in to comment.