<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Sorry, that format wasn't working. I hope this will be more
readable<br>
</p>
I'm on mr5.0.1.1 and have the wrong billing profile on my (manually)
generated invoices from january.<br>
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.<br>
<br>
From the sql query log:<br>
<br>
select * FROM billing_mappings <br>
where contract_id = '17' <br>
and (billing_mappings.start_date <= '1485903599' OR
billing_mappings.start_date is null)<br>
and (billing_mappings.end_date >= '1483225200' OR
billing_mappings.end_date is null)<br>
order by billing_mappings.start_date desc,
billing_mappings.id desc limit 1<br>
<br>
If I add from_unixtime it's working and I get the right one:<br>
<br>
select * FROM billing_mappings <br>
where contract_id = '17' <br>
and (billing_mappings.start_date <= <code
class="sql">from_unixtime(</code>'1485903599') OR
billing_mappings.start_date is null)<br>
and (billing_mappings.end_date >= <code class="sql">from_unixtime(</code>'1483225200')
OR billing_mappings.end_date is null)<br>
order by billing_mappings.start_date desc,
billing_mappings.id desc limit 1<br>
<br>
Maybe this is related to MariaDB?<br>
<br>
Regards,<br>
<br>
Henk Plessius<br>
</body>
</html>