Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1572

Prorated dates are calculated incorrectly on Jan 30, 31

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.2, 3.5.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      Prorated dates in the future are calculated using "+1 month", but that can cause January 30 and 31 to forward to March rather than February. This incorrect date is then used for renew dates and invoice line items for prorated services.

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        cody Cody Phillips (Inactive) added a comment -

        I think the current fix fails to take into consideration the case where today is < pro rata day. In that case, the value returned by Packages::getProrateDate(), I believe, is invalid since that is now based off the first of the month.

        Show
        cody Cody Phillips (Inactive) added a comment - I think the current fix fails to take into consideration the case where today is < pro rata day. In that case, the value returned by Packages::getProrateDate(), I believe, is invalid since that is now based off the first of the month.
        cody Cody Phillips (Inactive) made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        tyson Tyson Phillips (Inactive) added a comment -

        I don't see an issue with the current fix. Can you provide a case that would be invalid?

        In the case that today is < pro rata day, the prorate date will remain in the current month. This fix sets the date to the first of the current month, but still continues to format the date to the pro rata day anyway.

        e.g.
        start day: January 31
        pro rata day: 1
        return value: February 1 (instead of March 3 due to the fix)

        start day: February 2
        pro rata day: 10
        return value: February 10 (only prorated 7-8 days in the future)

        Show
        tyson Tyson Phillips (Inactive) added a comment - I don't see an issue with the current fix. Can you provide a case that would be invalid? In the case that today is < pro rata day, the prorate date will remain in the current month. This fix sets the date to the first of the current month, but still continues to format the date to the pro rata day anyway. e.g. start day: January 31 pro rata day: 1 return value: February 1 (instead of March 3 due to the fix) start day: February 2 pro rata day: 10 return value: February 10 (only prorated 7-8 days in the future)
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        Hide
        cody Cody Phillips (Inactive) added a comment -

        Scanning through it again, it looks ok.

        Show
        cody Cody Phillips (Inactive) added a comment - Scanning through it again, it looks ok.
        cody Cody Phillips (Inactive) made changes -
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              25/Feb/15