HomePhorge
Diffusion kolab c6fe7764bfc6

Implement a changelog to further the debiting of wallet balances

Description

Implement a changelog to further the debiting of wallet balances

Summary:
This differential maintains a changelog entry for every modification to an entitlement, as it happens.

After a period of time (most notably, 13 days, 14 days, 15 days, 1 month, 2 months, etc.), the expected charges can be calculated from that changelog.

There's a number of TODOs left;

  • Pro rata temporis calculation
  • Actual charging of the wallet.
  • Prediction of the next charge (when, what and how much)
  • Collate the 'creating' and 'charging' queries to ->sum() the values of the columns.
  • Evaluate the number of duplicate 'cost' columns
  • subscription period for the sku (i.e. domain registered with us -> yearly)

Test Plan:

$ vendor/bin/phpunit tests/Feature/BillingTest.php

Reviewers: #hkccp_developers, machniak

Reviewed By: #hkccp_developers, machniak

Subscribers: machniak, #hkccp_developers

Differential Revision: https://git.kolab.org/D964

Details

Provenance
vanmeeuwenAuthored on Mar 7 2020, 10:31 AM
vanmeeuwenPushed on Mar 7 2020, 10:31 AM
Reviewer
Restricted Project
Differential Revision
D964: Implement a changelog to further the debiting of wallet balances
Parents
rKc4550443d049: Upgrade to Laravel 6.x
Branches
Unknown
Tags
Unknown
Build Status
Buildable 28441