[Spce-user] Wrong billing profile
Henk
henk at voipdigit.nl
Sun Jan 15 12:56:32 EST 2017
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20170115/84afaba9/attachment-0001.html>
More information about the Spce-user
mailing list