-
Notifications
You must be signed in to change notification settings - Fork 294
Description
Describe the issue
• Go to Subscription Package
o Add the required fields and configure the period calculation from personalization.
o Align the calculation to the next month.
• Create a Non-Inventory Item
o Use the subscription item details.
• Access Customer Subscription Contract
o Create the relevant line for the subscription.
• Navigate to Recurring Billing
o Set the billing start date from 26/02/2025 and billing-to date 28/02/2025. You should have amount 0.96429 instead of 0.87097.
• Examples Observed for
o Example 1: Proposal for 27/02/2020 to 29/02/2020 (3 days).
Price calculated = 0.87097 (System did 3 × 9 ÷ 31). Incorrect Values
o Example 2: Proposal for 02/02/2020 to 29/02/2020 (28 days).
Price calculated = 8.68966 (System did 28 × 9 ÷ 29). Correct Values
o Example 3: Proposal for 25/08/2025 to 28/02/2025 (4 days).
Price calculated = 1.28571 (System did 4 × 9 ÷ 28). Correct Values.
To summarize:
Observation: On non-leap years, starting on or after 26/02, the calculation seems incorrect.
Expected Outcome:
The system should calculate the prorated price accurately based on the actual number of days in the month (28 or 29 for February) and the daily rate, regardless of whether the year is a leap year or not.
Actual Outcome:
The system calculates 0.87097 instead of 0.96429, indicating it used 31 days or incorrect logic for late-February dates in non-leap years.
Troubleshooting Actions Taken:
Verified calculation logic for leap and non-leap years.
Compared system output against manual prorated calculations.
Identified discrepancy occurs only for late-February start dates in non-leap years
Did the partner reproduce the issue in a Sandbox without extensions? Yes
Expected behavior
The system should calculate the prorated price accurately based on the actual number of days in the month (28 or 29 for February) and the daily rate, regardless of whether the year is a leap year or not.
Steps to reproduce
See above
Additional context
.
I will provide a fix for a bug
- I will provide a fix for a bug