We have implemented a Voice service using Blesta, and in our plugin we have created a cron trigger which, when an invoice is due, will pull in the CDRs from our voice platform, and include these charges on the invoice it generates.
This works, but there are some issues and we are wondering if there is or could be a better way to handle this type of data. While we are dealing with Voice, it really would apply to any service where usage data or charges need to be retrieved from an external system.
The main issue is that we have to ensure that the main "Create Invoice" cron task does not get run before ours, otherwise the invoices will get created to include the Blesta services, but none of the CDR (the most important bit!) get included.
This means basically we have to turn off the running of the "Create Invoice" cron task, and create our own. This is what we have done. However, if an end user re-enables "Create Invoice" and it then runs before our own, the invoices are incomplete.
It would be useful if it were possible - perhaps in the Package definition, to have an option like "Custom Invoice Creation" which, when selected, would cause any service created from this package to be skipped when Blesta runs "Create Invoice" task, so that it can then be processed by our own task.
Question
barryf
Hi,
We have implemented a Voice service using Blesta, and in our plugin we have created a cron trigger which, when an invoice is due, will pull in the CDRs from our voice platform, and include these charges on the invoice it generates.
This works, but there are some issues and we are wondering if there is or could be a better way to handle this type of data. While we are dealing with Voice, it really would apply to any service where usage data or charges need to be retrieved from an external system.
The main issue is that we have to ensure that the main "Create Invoice" cron task does not get run before ours, otherwise the invoices will get created to include the Blesta services, but none of the CDR (the most important bit!) get included.
This means basically we have to turn off the running of the "Create Invoice" cron task, and create our own. This is what we have done. However, if an end user re-enables "Create Invoice" and it then runs before our own, the invoices are incomplete.
It would be useful if it were possible - perhaps in the Package definition, to have an option like "Custom Invoice Creation" which, when selected, would cause any service created from this package to be skipped when Blesta runs "Create Invoice" task, so that it can then be processed by our own task.
Thanks
-Barry
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.