Hello
I want to make a report for due dates records before 30 - 45 days from due date
i want to select all records before 30 - 45 days from due date on first and 15 from each month
which application type best for my report : Grid or Form ?
i am thinking to do it like this :
$date_period = array(30, 45);
$day = (int)date('j');
if ($day < 15) {
$starting_date = date('Y-m-01');
} else {
$starting_date = date('Y-m-15');
}
//then i will find different {due_date} and $starting_date
'((DATEDIFF({due_date},\'' . $starting_date . '\') between ' . $date_period [0] . ' and ' . $date_period [1] . ' OR ' . '(DATEDIFF({due_date},\'' . $starting_date . '\') < ' . $date_period [0] . ' and DATEDIFF({due_date},\'' . $starting_date . '\')>-60)))');
is that correct ? if not can you please help me ? also tell me where to put the code
Thanks in advanced