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

Services may renew for paid invoices that are not necessarily for the renewal

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 4.1.1, 4.2.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      A service to renew currently occurs via Services::getAllPaidPending by checking that a service has a non-null last renew date, and an invoice that has been paid associated with the service since the last time the cron ran to renew services.

      This is not enough criteria to distinguish whether the paid invoice for the service is indeed for a renewal. The invoice could be for a service option, a term/package change, or something else.

      The proposed resolution is to specifically associate a renewal invoice with its service. Only when one of these invoices is paid would the service renew.

      When a service renewal date is bumped, an invoice is created for it. This is the invoice that should be saved as the renewal invoice. Once this invoice has been paid, the service should be renewed, and the associated record of the renewal invoice should be removed.

      New table:
      `service_invoices`
      `service_id`, `invoice_id`

      When the cron runs to create a service renewal invoice, add it to `service_invoices`.
      When the invoice is paid in full, the Services::getAllRenewablePaid method (or another method) called from the cron should check the `service_invoices` table to determine any of the invoices has been paid. For every paid invoice, renew the service, and remove the records from `service_invoices` table.

        Issue Links

          Activity

          tyson Tyson Phillips (Inactive) created issue -
          tyson Tyson Phillips (Inactive) made changes -
          Field Original Value New Value
          Link This issue is duplicated by CORE-2161 [ CORE-2161 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 4.1.1 [ 11015 ]
          Fix Version/s 4.2.0-b1 [ 11014 ]
          Fix Version/s Short Term [ 10800 ]
          tyson Tyson Phillips (Inactive) made changes -
          Assignee Jonathan Reissmueller [ jonathan ]
          tyson Tyson Phillips (Inactive) made changes -
          Sprint 4.2.0 Sprint 1 [ 44 ]
          tyson Tyson Phillips (Inactive) made changes -
          Rank Ranked higher
          Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
          Status Open [ 1 ] In Progress [ 3 ]
          jonathan Jonathan Reissmueller made changes -
          Rank Ranked higher
          jonathan Jonathan Reissmueller made changes -
          Remaining Estimate 0 minutes [ 0 ]
          Time Spent 25 minutes [ 1500 ]
          Worklog Id 10219 [ 10219 ]
          Automated transition triggered when Jonathan Reissmueller created pull request #313 in Stash -
          Status In Progress [ 3 ] In Review [ 5 ]
          Resolution Fixed [ 1 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 25 minutes [ 1500 ] 31 minutes [ 1860 ]
          Worklog Id 10219 [ 10219 ]
          jonathan Jonathan Reissmueller made changes -
          Description A service to renew currently occurs via _Services::getAllPaidPending_ by checking that a service has a non-null last renew date, and an invoice that has been paid associated with the service since the last time the cron ran to renew services.

          This is not enough criteria to distinguish whether the paid invoice for the service is indeed for a renewal. The invoice could be for a service option, a term/package change, or something else.

          The proposed resolution is to specifically associate a renewal invoice with its service. Only when one of these invoices is paid would the service renew.

          When a service renewal date is bumped, an invoice is created for it. This is the invoice that should be saved as the renewal invoice. Once this invoice has been paid, the service should be renewed, and the associated record of the renewal invoice should be removed.

          New table:
          `service_invoices`
          _`service_id`, `invoice_id`_

          When the cron runs to create a service renewal invoice, add it to `service_invoices`.
          When the invoice is paid in full, the _Services::getAllRenewablePaid_ method (or another method) called from the cron should check the `service_invoices` table to determine any of the invoices has been paid. For every paid invoice, renew the service, and remove the records from `service_invoices` table.
          A service to renew currently occurs via _Services::getAllPaidPending_ by checking that a service has a non-null last renew date, and an invoice that has been paid associated with the service since the last time the cron ran to renew services.

          This is not enough criteria to distinguish whether the paid invoice for the service is indeed for a renewal. The invoice could be for a service option, a term/package change, or something else.

          The proposed resolution is to specifically associate a renewal invoice with its service. Only when one of these invoices is paid would the service renew.

          When a service renewal date is bumped, an invoice is created for it. This is the invoice that should be saved as the renewal invoice. Once this invoice has been paid, the service should be renewed, and the associated record of the renewal invoice should be removed.

          New table:
          `service_invoices`
          _`service_id`, `invoice_id`_

          When the cron runs to create a service renewal invoice, add it to `service_invoices`.
          When the invoice is paid in full, the _Services::getAllRenewablePaid_ method (or another method) called from the cron should check the `service_invoices` table to determine any of the invoices has been paid. For every paid invoice, renew the service-, and remove the records from `service_invoices` table-.
          jonathan Jonathan Reissmueller made changes -
          Description A service to renew currently occurs via _Services::getAllPaidPending_ by checking that a service has a non-null last renew date, and an invoice that has been paid associated with the service since the last time the cron ran to renew services.

          This is not enough criteria to distinguish whether the paid invoice for the service is indeed for a renewal. The invoice could be for a service option, a term/package change, or something else.

          The proposed resolution is to specifically associate a renewal invoice with its service. Only when one of these invoices is paid would the service renew.

          When a service renewal date is bumped, an invoice is created for it. This is the invoice that should be saved as the renewal invoice. Once this invoice has been paid, the service should be renewed, and the associated record of the renewal invoice should be removed.

          New table:
          `service_invoices`
          _`service_id`, `invoice_id`_

          When the cron runs to create a service renewal invoice, add it to `service_invoices`.
          When the invoice is paid in full, the _Services::getAllRenewablePaid_ method (or another method) called from the cron should check the `service_invoices` table to determine any of the invoices has been paid. For every paid invoice, renew the service-, and remove the records from `service_invoices` table-.
          A service to renew currently occurs via _Services::getAllPaidPending_ by checking that a service has a non-null last renew date, and an invoice that has been paid associated with the service since the last time the cron ran to renew services.

          This is not enough criteria to distinguish whether the paid invoice for the service is indeed for a renewal. The invoice could be for a service option, a term/package change, or something else.

          The proposed resolution is to specifically associate a renewal invoice with its service. Only when one of these invoices is paid would the service renew.

          When a service renewal date is bumped, an invoice is created for it. This is the invoice that should be saved as the renewal invoice. Once this invoice has been paid, the service should be renewed, and the associated record of the renewal invoice should be removed.

          New table:
          `service_invoices`
          _`service_id`, `invoice_id`_

          When the cron runs to create a service renewal invoice, add it to `service_invoices`.
          When the invoice is paid in full, the _Services::getAllRenewablePaid_ method (or another method) called from the cron should check the `service_invoices` table to determine any of the invoices has been paid. For every paid invoice, renew the service, -and remove the records from `service_invoices` table-.
          jonathan Jonathan Reissmueller made changes -
          Time Spent 31 minutes [ 1860 ] 1 hour, 42 minutes [ 6120 ]
          Worklog Id 10251 [ 10251 ]
          jonathan Jonathan Reissmueller made changes -
          Time Spent 1 hour, 42 minutes [ 6120 ] 2 hours, 56 minutes [ 10560 ]
          Worklog Id 10254 [ 10254 ]
          Automated transition triggered when Tyson Phillips (Inactive) merged pull request #313 in Stash -
          Status In Review [ 5 ] Closed [ 6 ]
          jonathan Jonathan Reissmueller made changes -
          Link This issue relates to CORE-2480 [ CORE-2480 ]

            People

            • Assignee:
              jonathan Jonathan Reissmueller
              Reporter:
              tyson Tyson Phillips (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                27/Sep/17

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 56 minutes
                2h 56m

                  Agile