Commit 0af643dd authored by Jérome Perrin's avatar Jérome Perrin

HACK: Inventory API group_by_time_sequence_list partial fix

parent 52094dac
...@@ -93,23 +93,23 @@ FROM ...@@ -93,23 +93,23 @@ FROM
( (
( time_interval_from_date is not null AND ( time_interval_from_date is not null AND
( time_interval_at_date is not null AND ( time_interval_at_date is not null AND
GREATEST(`stock`.`date`, `stock`.`mirror_date`) >= time_interval_from_date AND `stock`.`date` >= time_interval_from_date AND
LEAST(`stock`.`date`, `stock`.`mirror_date`) <= time_interval_at_date `stock`.`date` <= time_interval_at_date
) OR ( ) OR (
( (
time_interval_to_date is not null AND time_interval_to_date is not null AND
GREATEST(`stock`.`date`, `stock`.`mirror_date`) >= time_interval_from_date AND `stock`.`date` >= time_interval_from_date AND
LEAST(`stock`.`date`, `stock`.`mirror_date`) < time_interval_to_date `stock`.`date` < time_interval_to_date
) OR ( ) OR (
GREATEST(`stock`.`date`, `stock`.`mirror_date`) >= time_interval_from_date AND `stock`.`date` >= time_interval_from_date AND
time_interval_at_date is null AND time_interval_to_date is null time_interval_at_date is null AND time_interval_to_date is null
) )
) )
) OR ( ) OR (
time_interval_from_date is null AND ( time_interval_from_date is null AND (
( time_interval_at_date is not null AND ( time_interval_at_date is not null AND
( LEAST(`stock`.`date`, `stock`.`mirror_date`) <= time_interval_at_date ) ( `stock`.`date` <= time_interval_at_date )
) OR LEAST(`stock`.`date`, `stock`.`mirror_date`) < time_interval_to_date ) OR `stock`.`date` < time_interval_to_date
) )
) )
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment