Page MenuHomePhorge

Add possibility to change system currency
ClosedPublic

Authored by machniak on Aug 12 2021, 11:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 29, 4:55 PM
Unknown Object (File)
Feb 23 2024, 3:28 PM
Unknown Object (File)
Feb 21 2024, 5:52 PM
Unknown Object (File)
Feb 10 2024, 3:01 AM
Unknown Object (File)
Feb 8 2024, 3:20 PM
Unknown Object (File)
Feb 8 2024, 5:26 AM
Unknown Object (File)
Jan 24 2024, 6:45 AM
Unknown Object (File)
Jan 24 2024, 4:55 AM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK9c0964980d2f: Add possibility to change system currency
Summary

And use tenant-specific app.name also in PaymentsController

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Branch
dev/currency
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 36028
Build 14125: arc lint + arc unit

Event Timeline

machniak created this revision.
  • Add tests, fix small bugs
  • Use wallet currency in bonus/penalty dialog
machniak edited the summary of this revision. (Show Details)
  • More tests

Looks good except for the array_merge question

src/app/Providers/Payment/Mollie.php
586

Can array_merge handle a non-existing $eurMethods in the $currency == 'EUR' case? Otherwise set to []

I'm planning on updating this diff with a fix for stats (where the income chart should sum up eur and chf payments using conversion rates and present the results in chf).

src/app/Providers/Payment/Mollie.php
586

I don't get the question. If $currency == 'EUR' array_merge is not executed, because the first request to mollie will return them.

  • Support multi-currency in income calculation for stats
This revision is now accepted and ready to land.Aug 16 2021, 12:23 PM
src/app/Http/Controllers/API/V4/Admin/StatsController.php
369 ↗(On Diff #7732)

This needs an implementation otherwise $addTenantScope above is never used, no?

388 ↗(On Diff #7732)

Are the resellers users not in the resellers currency?

src/app/Http/Controllers/API/V4/Admin/StatsController.php
369 ↗(On Diff #7732)

applyTenantScope() is implemented in API/V4/Reseller/StatsController. Here it can be empty (until we implement tenant selector for admin stats). For now admins work without the tenant scope, resellers work in their tenant scope.

388 ↗(On Diff #7732)

I'm not sure I get the question. Admin work in system currency. Resellers work in their tenant currency, which is their wallet currency. Note that right now it does not really matter, as we do not have Income chart implementation for resellers (yet).

This revision was automatically updated to reflect the committed changes.