Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOL-75: Refactoring of line item rounding #91

Merged
merged 1 commit into from Nov 18, 2020

Conversation

boxblinkracer
Copy link
Collaborator

ON HOLD

@boxblinkracer
Copy link
Collaborator Author

ON HOLD, is in preparation status

@boxblinkracer boxblinkracer changed the title u MOL-75: Refactoring of line item rounding MOL-75: Refactoring of line item rounding Nov 17, 2020
@boxblinkracer boxblinkracer force-pushed the feature/mol-75-rounding branch 5 times, most recently from df4df9b to bb7d8af Compare November 18, 2020 07:46
@boxblinkracer
Copy link
Collaborator Author

The rounding was wrong for line items when they are sent to mollie.
these need to be 100% accurate (vat amount within each line, etc.)

Basic Workflow
the basket items along with a shipping lines will be calculated and added as transaction items to the database.
these items will be sent to mollie as line items, so they have to be calculated correctly.
and that was broken

what i did?!
i moved both, the transaction item builder (for database) and request-json-array builder (for mollie request) functions to separate testable classes.

the calculation is now done correctly within the TransactionItemBuilder.

i've added some refactoring to make shipping costs work exactly like basket items too.
and then they will use the transaction item builder with the correct rounding too

i did also add some more tests, code coverage to make sure its tested, and some adjustments for travis ci (remove test analytics due to php 5.6 and :void returns)

@boxblinkracer
Copy link
Collaborator Author

GO for review @barbieswimcrew

@boxblinkracer boxblinkracer merged commit 87fbf24 into mollie:master Nov 18, 2020
@boxblinkracer boxblinkracer deleted the feature/mol-75-rounding branch December 17, 2020 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants