diff --git a/application/views/loanreports.php b/application/views/loanreports.php
index d1201b09..c419dc70 100755
--- a/application/views/loanreports.php
+++ b/application/views/loanreports.php
@@ -4,9 +4,11 @@
'Company');
$historytableflag = 0;
if(!empty($childdata) )
@@ -20,17 +22,43 @@
foreach($loanrecords as $r)
{
-
+ //print_r($r);
if(!empty($r->Loan_Issued_Date))
{
$dateflag=1;
$statusflag=1;
+
}
+ if(!empty($r->Due_Start_Date) && !empty($r->No_of_Dues))
+ {
+ // echo date('Y-m-d h:m:s');
+ // echo $r->Due_Start_Date;
+ $noofdus = $r->No_of_Dues;
+ $time=strtotime($r->Due_Start_Date);
+ $month=date("m",$time);
+ $finalmonth = $month+($noofdus-1);
+ //echo $finalmonth;
+ $curmonth = date('m');
+ //echo $curmonth;
+ if($curmonth > $finalmonth)
+ {
+ // echo 'overdue';
+ //echo ($curmonth - $finalmonth);
+ $overdueflag = 1;
+ }
+
+
+
+ }
+
}
- }
+
+ }
+
+
if(!empty($loanemployees))
{
foreach($loanemployees as $l)
@@ -182,6 +210,7 @@
$totalloangiven = 0;
$totalrecovered = 0;
$totalbalance = 0;
+ //$overdue = 0;
$base=base_url();
if(!empty($loanrecords))
{
@@ -201,8 +230,30 @@
Loan_Issued_Date)){echo $rec->Loan_Issued_Date;}else{echo "-";}?> |
Paid_Amount)){$totalrecovered+=$rec->Paid_Amount ;echo $rec->Paid_Amount;}else{echo "0.00";} ?> |
-
- is_Active == 1){$final = "Pending"; }else{$final = "Completed";} if($rec->Remaining_Due < 0 and $rec->is_Active == 1){$final.=",Over Due";} echo $final;?> |
+ Due_Start_Date) && !empty($rec->No_of_Dues))
+ // {
+
+ // // echo $rec->Due_Start_Date;
+ // $noofdus = $rec->No_of_Dues;
+ // $time=strtotime($rec->Due_Start_Date);
+ // $month=date("m",$time);
+ // $finalmonth = $month+$noofdus;
+ // // echo $finalmonth;
+ // $curmonth = date('m');
+ // if($curmonth > $finalmonth)
+ // {
+ // //echo 'overdue';
+ // //echo ($curmonth > $finalmonth);
+ // $overdueflag = 1;
+ // }
+
+
+
+ // }
+
+ ?>
+ is_Active == 1){$final = "Pending"; }else{$final = "Completed";} if($overdueflag == 1 and $rec->is_Active == 1){$final.=",Over Due";} echo $final;?> |
Loan_Amount) and ($rec->Paid_Amount))){ $totalbalance+= ($rec->Loan_Amount - $rec->Paid_Amount);echo number_format(($rec->Loan_Amount - $rec->Paid_Amount),2,'.','');}else {echo "0.00";}?> |