Details
-
Type: Epic
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 5.8.0
-
Fix Version/s: 5.12.0-b1
-
Component/s: Staff Interface
-
Labels:None
-
Epic Name:Billable Items
Description
Blesta supports: Invoices with future bill dates, they are held until that date and delivered. Recurring Invoices, create a recurring invoice and edit it and edits will be reflected in resulting invoices.
However, Blesta doesn't have a method by which items can be placed in a queue and added to a future invoice. The use-case for this is simple: overages.
Let's say a client pays for a monthly VOIP service that includes 1000 minutes. They use 1100 minutes so they need to be billed for the 100 minute overage. Ideally the 100 minute overage should be included on the next invoice, but once the invoice is created it would have to be edited to add it, and it's already off to the customer. An invoice specifically for overages means double the invoices.
Instead, the overage should be able to be placed into a billing queue, where it will be added to the next invoice.
Client Profile UI
- On a client profile page, within the Invoices widget between the filter icon and the new invoice icon add an "fas fa-tasks" icon/button.
- Clicking this button will show the "Invoice Queue" page that looks similar to "Create Invoice".
- The Invoice Queue page looks similar to an invoice creation page but does not contain date billed, date due, invoice delivery, auto-debit, or recurring invoice, or notes. Only line items (Description, Quantity, Unit Cost, Tax, Currency, Action (As well as Add, Delete options to add/remove queue items) The currency is set per line-item as they may come off the queue at different times and we only have 1 queue.
- The Action will be a drop down of "Next Invoice", and all active services. The idea is that the queued item can either be applied to the next invoice created, or the next invoice created that contains the selected service.
Items can be added or removed from the Invoice Queue here, and should be able to be added or removed via the API. An example of doing this via the API should be included in the docs.
Notes
We may want to have a single place that all queued items for all clients can be viewed.
In the future we may tie into this system for handling our own overage billing for modules that support this.
Some gateways have a minimum processing amount, like $1 or $0.50 or something. An idea for another task, which would be dependent on this one, is when generating an invoice for an upgrade, if the upgrade amount falls below a specified amount (set on each currency perhaps) then the line item would instead be rolled over to the billable items queue and included on the next invoice, and we would provision the upgrade as if it were paid.