[Spce-user] Wrong billing profile

Irina Peshinskaya ipeshinskaya at sipwise.com
Thu Jan 19 06:30:45 EST 2017


Dear Henk,

I saw that you use version 5.0.1. In this version generate_invoices.pl 
script doesn't work.
It should to warn about billing data damage on the start.
If it didn't behave this way for you, this is a bug.

In the same time invoice generation in the web interface is working 
correctly.
Kindly use it for your needs.

Best regards,
Irina Peshinskaya


On 19.01.2017 10:31, Henk wrote:
>
> Dear Irina,
>
> Thank you for having a look at this. I used the script as specified in 
> the cron job (/usr/share/ngcp-panel/tools/generate_invoices.pl) to try 
> to generate some debugging info, without much success. That's the 
> reason I analyzed this further with the SQL debug log. But I think the 
> web interface produces the same results. I temporary solved the issue 
> by setting the startdate to NULL.
>
> Best regards,
>
> Henk Plessius
>
>
> On 18-1-2017 17:25, Irina Peshinskaya wrote:
>>
>> Dear Henk,
>>
>> Could you please describe what do you mean by "manually" generated 
>> invoices?
>> Did you use WEB interface for this?
>>
>> Thanks in advance.
>>
>> Best regards,
>> Irina Peshinskaya
>>
>>
>> On 15.01.2017 19:56, Henk wrote:
>>>
>>> Sorry, that format wasn't working. I hope this will be more readable
>>>
>>> I'm on mr5.0.1.1 and have the wrong billing profile on my (manually) 
>>> generated invoices from january.
>>> After some research I found the date selection on billing_mappings 
>>> isn't working. The start_date is 10-1-2017. Only the records with 
>>> start_date NULL are selected.
>>>
>>> From the sql query log:
>>>
>>> select * FROM billing_mappings
>>>         where contract_id = '17'
>>>             and (billing_mappings.start_date <= '1485903599' OR 
>>> billing_mappings.start_date is null)
>>>             and (billing_mappings.end_date >= '1483225200' OR 
>>> billing_mappings.end_date is null)
>>>         order by billing_mappings.start_date desc, 
>>> billing_mappings.id desc limit 1
>>>
>>> If I add from_unixtime it's working and I get the right one:
>>>
>>> select * FROM billing_mappings
>>>         where contract_id = '17'
>>>             and (billing_mappings.start_date <= 
>>> |from_unixtime(|'1485903599') OR billing_mappings.start_date is null)
>>>             and (billing_mappings.end_date >= 
>>> |from_unixtime(|'1483225200') OR billing_mappings.end_date is null)
>>>         order by billing_mappings.start_date desc, 
>>> billing_mappings.id desc limit 1
>>>
>>> Maybe this is related to MariaDB?
>>>
>>> Regards,
>>>
>>> Henk Plessius
>>>
>>>
>>> _______________________________________________
>>> Spce-user mailing list
>>> Spce-user at lists.sipwise.com
>>> https://lists.sipwise.com/listinfo/spce-user
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20170119/8d89c10a/attachment-0001.html>


More information about the Spce-user mailing list