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

Queue service upgrades until invoice paid

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.0-b2
    • Component/s: None
    • Labels:
      None

      Description

      Add a setting to only process upgrades after paid in full.
      Add a setting to cancel pending upgrades after X days past due (default to 7 days).

      When a client processes an upgrade the system will record the details of the upgrade and create an invoice. The reference to the invoice will be stored with the upgrade details (the invoice line item won't reference the service ID).

      If enabled, only when the invoice is paid in full will the upgrade details be processed to complete the upgrade. Otherwise the upgrade details are processed immediately.

      As soon as the upgrade is processed the original linked invoice should be updated with the service ID of the upgraded service. This ensures that the invoice maintains a link with the service.

      This requires a new database table and model to handle the upgrade data and track the invoice number used for the service being upgraded.

      A cron task will need to be created to process upgrades for pending upgrades with invoices that have been paid. As well as change the status of pending upgrades to canceled if the invoice for the pending upgrade has been removed or voided.

      Upgrades should be flagged with the date/time completed and status

      {pending, canceled, error, completed}

      (indexed).

      ----------
      Settings:

      • Only process pending upgrades after paid in full
      • Cancel pending upgrades X days after invoice is due (default to 7 days)

      Upgrading when the setting for pending upgrades is enabled:

      • Create an invoice for the upgrade cost for the service. Include line items for the package and all config options to be added and removed, as well as any discount
      • When the invoice is paid, the cron will attempt to perform the upgrade

      Expired pending upgrade X days after invoice is due:

      • Update the pending upgrade to status 'canceled' and set the date/time
      • Unapply any partial payments on the invoice, and void the invoice

      Successful upgrade:

      • Update the pending upgrade to status 'completed', and set the date/time
      • Update the paid invoice to associate each line item on the invoice with the service ID

      Failed upgrade:

      • Update the pending upgrade to status 'error' and set the date/time. The cron task should no longer attempt to process this upgrade
      • Leave the invoice and service alone

        Issue Links

          Activity

          cody Cody Phillips (Inactive) created issue -
          cody Cody Phillips (Inactive) made changes -
          Field Original Value New Value
          Rank Ranked higher
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1630 [ CORE-1630 ]
          tyson Tyson Phillips (Inactive) made changes -
          Description Add a setting to only process upgrades after paid in full.
          Add a setting to cancel pending upgrades after X days past due (default to 7 days).

          When a client processes an upgrade the system will record the details of the upgrade and create an invoice. The reference to the invoice will be stored with the upgrade details (the invoice line item won't reference the service ID).

          If enabled, only when the invoice is paid in full will the upgrade details be processed to complete the upgrade. Otherwise the upgrade details are processed immediately.

          *As soon as the upgrade is processed* the original linked invoice should be updated with the service ID of the upgraded service. This ensures that the invoice maintains a link with the service.

          This requires a new database table and model to handle the upgrade data and track the invoice number used for the service being upgraded.

          A cron task will need to be created to process upgrades for pending upgrades with invoices that have been paid. *As well as* change the status of pending upgrades to *canceled* if the invoice for the pending upgrade has been removed or voided.

          Upgrades should be flagged with the date/time completed and status {pending, canceled, completed}(indexed).

          Add a setting to only process upgrades after paid in full.
          Add a setting to cancel pending upgrades after X days past due (default to 7 days).

          When a client processes an upgrade the system will record the details of the upgrade and create an invoice. The reference to the invoice will be stored with the upgrade details (the invoice line item won't reference the service ID).

          If enabled, only when the invoice is paid in full will the upgrade details be processed to complete the upgrade. Otherwise the upgrade details are processed immediately.

          *As soon as the upgrade is processed* the original linked invoice should be updated with the service ID of the upgraded service. This ensures that the invoice maintains a link with the service.

          This requires a new database table and model to handle the upgrade data and track the invoice number used for the service being upgraded.

          A cron task will need to be created to process upgrades for pending upgrades with invoices that have been paid. *As well as* change the status of pending upgrades to *canceled* if the invoice for the pending upgrade has been removed or voided.

          Upgrades should be flagged with the date/time completed and status {pending, canceled, error, completed}(indexed).


          ----------
          Settings:
          - Only process pending upgrades after paid in full
          - Cancel pending upgrades X days after invoice is due (default to 7 days)

          Upgrading when the setting for pending upgrades is enabled:
          - Create an invoice for the upgrade cost for the service. Include line items for the package and all config options to be added and removed, as well as any discount
          - When the invoice is paid, the cron will attempt to perform the upgrade

          Expired pending upgrade X days after invoice is due:
          - Update the pending upgrade to status 'canceled' and set the date/time
          - Unapply any partial payments on the invoice, and void the invoice

          Successful upgrade:
          - Update the pending upgrade to status 'completed', and set the date/time
          - Update the paid invoice to associate each line item on the invoice with the service ID

          Failed upgrade:
          - Update the pending upgrade to status 'error' and set the date/time. The cron task should no longer attempt to process this upgrade
          - Leave the invoice and service alone
          tyson Tyson Phillips (Inactive) made changes -
          Fix Version/s 3.5.0-b2 [ 10701 ]
          tyson Tyson Phillips (Inactive) made changes -
          Assignee Cody Phillips [ cody ] Tyson Phillips [ tyson ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue is blocked by CORE-1638 [ CORE-1638 ]
          cody Cody Phillips (Inactive) made changes -
          Sprint 3.5.0 Sprint 5 [ 13 ]
          cody Cody Phillips (Inactive) made changes -
          Story Points 8
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue is blocked by CORE-1649 [ CORE-1649 ]
          tyson Tyson Phillips (Inactive) made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          tyson Tyson Phillips (Inactive) made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue testing discovered CORE-1670 [ CORE-1670 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1676 [ CORE-1676 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1677 [ CORE-1677 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1680 [ CORE-1680 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1685 [ CORE-1685 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1687 [ CORE-1687 ]
          tyson Tyson Phillips (Inactive) made changes -
          Link This issue relates to CORE-1691 [ CORE-1691 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/15

                Agile