compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

MAE-484: Calculation for fixed membership with past year start date #360

Closed erawat closed 3 years ago

erawat commented 3 years ago

Overview

This PR adds functionality to support pro-rata calculation for fixed period membership type where membership start date is in the part.

For example,

Membership type configuration

Membership start date: 01/01/2020 Membership end date: user not select

Before

  1. Pro-rata was calculated based on start date and default with membership end date
  2. As above configuration,

The membership end date will default to 30/Nov/2021 and the different in days will be 700 days so the pro-rata will be calculated based on 700 days if annual configuration is by days.

After

  1. Pro-rata is calculated based on input dates (start date, end date and join_date).
  2. As above configuration,

The membership end date will default to 30/Nov/2001 and the different in days will be 335 days so the pro-rata will be calculated based on 335 days if annual configuration is by days