[Spce-user] Change of billing fees - create new invoices with new fees

Henk henk at voipdigit.nl
Tue Aug 20 12:51:49 EDT 2019

Hi Thomas,

I know how to do it for MYSQL, if you are using REDIS it will be a 
little bit different.

Also if you rerate your CDR, also customer balance will be updated again 
and will not be useful anymore, unless you reset it to zero before. You 
can find the customer balance in table billing.contract_balances, column 
cash_balance_interval. This balance is also used for the build-in 
invoice function to display the totals! You can also update this balance 
manually afterwards.

To rerate on date e.g. July you can use this SQL (first stop rate-o-mat 
and it's advised to make a backup of the database)

update accounting.cdr set rating_status = 'unrated' where start_time > 
UNIX_TIMESTAMP('2019-07-01') and start_time < UNIX_TIMESTAMP('2019-08-01');

Finally restart rate-o-mat and check the customer balances after some time.



On 20-8-2019 17:19, Thomas Georg wrote:
> Hi list,
> we had an error in one of our billing profiles an uploaded new fees today.
> Is there any way to create a new invoice with the new blling fees for 
> the calls in the past?
> Regards
> Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20190820/845f5cac/attachment-0002.html>

More information about the Spce-user mailing list