HomePhorge
Diffusion kolab d7f6cebed76f

Improve cost calculation on entitlement delete and test

Description

Improve cost calculation on entitlement delete and test

Summary:
While adding test for T375530 I found that cost calculation
could be improved. Especially existence of unsused variable $dayOfThisMonth suggested that.

So, I changed the code to calculate price per day using current month
if diff in days does not overlap with the previous month.

I still think it should be simplified to use number 30 instead of the number of days in a month.

Test Plan: ./phpunit

Reviewers: #hkccp_developers, vanmeeuwen

Reviewed By: #hkccp_developers, vanmeeuwen

Subscribers: #hkccp_developers

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

Details

Provenance
machniakAuthored on Sep 23 2020, 12:14 PM
vanmeeuwenCommitted on Sep 23 2020, 12:14 PM
vanmeeuwenPushed on Sep 23 2020, 12:14 PM
Reviewer
Restricted Project
Differential Revision
D1630: Improve cost calculation on entitlement delete and test
Parents
rKe3f4cd520c8c: Support: List all users including the wallet owner
Branches
Unknown
Tags
Unknown
Build Status
Buildable 30922