} if($leave_type=="PL") { ?> <tr> <td><?=$s?></td> <td><?=$row_emp['ticket_no']?></td> <td> <?=$row_emp['first_name']?> <?=$row_emp['last_name']?> </td> <td> <?=$leave_type?> </td> <td> <?=dateDiffDB("-", $end_date,$start_date)?> </td> <td> <?=getDatetime($start_date)?> </td> <td> <?=getDatetime($end_date)?> </td> </tr> <? } $s++; } } } }
$k++; if ($temp == "") { $from_date = $check; $temp = $check; } else { if ($temp2 != "") { $to_date = $check; } } } else { if ($temp != "" and $temp2 != "") { if ($k == 1) { $to_date = $from_date; } echo getDatetime($from_date) . " to " . getDatetime($to_date); $total_cl = $total_cl + dateDiffDB("-", $to_date, $from_date) + 1; echo "<br/>"; $temp = ""; $temp2 = ""; $k = 0; } else { $temp2 = "0"; } } } } ?> </td> <td><?php echo $total_cl; ?>
</td> </tr> <? $Date = $row_stock["Date"]; } ?> </table> <? } else { $InsertDate = explode(" ",getCount("InsertDate", "rec_id", $_GET["id"])); $Date = $InsertDate[0]; } $days = dateDiffDB("-",date('Y-m-d'), $Date); if($days>0) { ?> <form name="form" id="form" action="count_stock_detail.php" method="post"> <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class="border"> <tr> <td align="left" class="text_1" style="padding-left:15px;"><b>Stock</b><span class="text_1">kg</span></td> <td align="left" class="text_1" style="padding-left:15px;"><b>Stock</b><span class="text_1">bale</span></td> <td align="left" class="text_1" style="padding-left:15px;"><b>Date</b></td> </tr> <? for($i=0; $i< $days; $i++)