If the rate for extra minutes not included with the flat rate is the
same for all rate-centers you could create one service called something
like "additional minutes" that costs the per-minute rate and put the
amount of minutes used in the Measured Usage field. This will multiply
that by the rate and show the result as the total on the invoice.
You'll have to make a script that adds this new service with the
corresponding usage amounts. You can call the create_service function
by inluding the include/services.inc.php in your script.
include('./include/config.inc.php');
include('./include/database.inc.php');
include('./include/services.inc.php');
create_service($account_number, $master_service_id, $billing_id,
$usage_multiple, $options_table_name,
$attribute_fieldname_string,
$attribute_fieldvalue_string)
The usage_multiple must is your minute usage that you are inserting.
I imagine that minute usage won't have an options/attributes table
associated with it, but if you have an attributes table you'll need to
use the attribute_fieldname_string that names the attribute table fields
you want to fill in such as:
$attribute_fieldname_string = "username, password";
$attributes_fieldvalue_string = "'myname', 'p4ssw0rd'";
If you do not have an options/attributes table you can leave them as NULL.
create_service($account_number, $master_service_id, $billing_id,
$usage_multiple, NULL, NULL, NULL);
If you do have an options/attributes table but are not inserting
attributes right
now you'll still want to include something as a placeholder so it
makes the attributes table for this particular service item.
Paul
Post by Matt RygelskiHow would I configure CitrusDB to allow me to do the following?
I have customers who are on a monthly recurring service that is flat rate for X number of minutes per month. I receive an output from my system as a comma delimited file that shows every unique service number (Service ID) and it's total use for that billing period. I want to be able to upload that file every month and let the CitrusDB not only generate an invoice for the flat "base" rate per month but also charge them if there were any use over the X number of minutes they already paid for. Thoughts?
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Citrusdb-users mailing list
https://lists.sourceforge.net/lists/listinfo/citrusdb-users