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
- Discovered while testing
-
CORE-1670 Upgrading config option quantity may result in error
- Closed
- relates to
-
CORE-1630 Display expected renewal amounts on service
- Closed
-
CORE-1691 Queued service upgrades are not filtered by company when run via cron
- Closed
-
CORE-1677 Validate service changes before queuing them
- Closed
-
CORE-1680 Invoices from a service upgrade should be in a single currency
- Open
-
CORE-1676 Remove config option line items of zero quantity on upgrade
- Closed
-
CORE-1685 Use item pricing for service upgrades (not queued)
- Closed
-
CORE-1687 Add totals box for service management in admin interface
- Closed