Hey Guys,
I need some help... I have the following code:
$dueinQ = mysql_query("SELECT * FROM `invoices` WHERE `status` = '10' OR `status` = '11' OR `status` = '9'");
while($dueinR = mysql_fetch_assoc($dueinQ)){
$inv_due = $dueinR['duedate'];
$eofy = $dueinR['eofy'];
$datediff = $inv_due - $eofy;
$days = floor($datediff/(60*60*24));
if($days > 365){
//Do nothing
}else{
$due = $due + ($dueinR['total'] - $dueinR['total_paid']);
}
}
echo $due;
but it doesn't work...
I am trying to work out if the due date of the invoice is in THIS financial year... if it is add it to the total else don't....
but its not working, I can seem to get it to work out if its this financial year (e.g. end of this financial year is 1/4/2012)
Dan