macxred / cashctrl_ledger

Implementation of the abstract pyledger.LegderEngine interface with CashCtrl accounting service.
MIT License
0 stars 0 forks source link

feat: add FX_revaluation method and corresponding tests #72

Open AlexTheWizardL opened 1 month ago

AlexTheWizardL commented 1 month ago

This PR covers creating the FX_revaluation() method that triggers CashCtrl to automatically allocate foreign exchange gains or losses based on the provided exchange rates. This logic is covered with a test suit.

@lasuk Please review the changes and provide feedback or approval for merging.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Flag Coverage Δ
unittests 94.43% <100.00%> (+0.40%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cashctrl_ledger/constants.py 100.00% <100.00%> (ø)
cashctrl_ledger/ledger.py 93.77% <100.00%> (+0.47%) :arrow_up:
lasuk commented 1 month ago

Thanks, @AlexTheWizardL, for this PR, and for your flexibility in making it a priority!

I've added two commits. Please yell if you disagree:

The provided functionality already covers my use case. I have three suggestions for further improvement:

What do you think?

AlexTheWizardL commented 1 month ago

I`ve added 3 commits to covers your proposed improvements:

Please yell if you disagree.