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

Display service renew dates differently, depending on whether invoices have been paid

    Details

      Description

      When Blesta generates an invoice, it increments the services.date_renews value is incremented. This is used internally to determine when invoices should be generated by a service. As a result, it's very important that any changes per this task do not alter how this field is updated or used internally.

      The Issue

      Clients login and see a service renew date in the future, and think they are good until that date. However, there may be an unpaid invoice, that when generated caused the renew date to bump. They are expecting the renew date not to increment until/unless the invoice is paid.

      For example: Service is created, paid, provisioned Jan 1, and the renew date is set to Feb 1. Prior to Feb 1, an invoice is generated and the renew date is bumped forward to Mar 1. The customer didn't paid the invoice, but they think that they are good until Mar 1. Instead, they should see Feb 1 as the renew date, since the invoice due Feb 1 remains unpaid.

      Per https://www.blesta.com/forums/index.php?/topic/10248-renew_date/

      1. If there are any open invoices for this service, display the oldest invoice's due date as the Renew Date
      2. If there are no open invoices, display the internal renew date (Which should match the most recently closed invoice)

      There may be performance issues with doing this, if we have to look up invoices for every service in a table listing.. so I'm not sure the best way to go about it. Maybe we need a new column to store this on the service, which we update when an invoice is paid?

      Also, we should make this consistent in the admin area, and we should continue to show this "internal" renew date at least to admins.

      More discussion required.

      ALTERNATIVELY

      • Add a new column to services table called services.date_renews_paid
      • Show date_renews_paid in the client area
      • When invoices are closed, we must update services.date_renews_paid for any/all services on the closed invoice to update this value

      There is a problem that needs to be reconciled. Client has 2 invoices, they ignore the old invoice and pay the newer one. In that case, we should not update the services.date_renews_paid based on that invoice, since there is another. How do we reconcile that? Maybe we check to see if there are any older invoices containing any of the services for the invoice being paid, and direct the client to pay the older invoice first.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: