0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
ADMIN
/
[
Home
]
File: summary_ctrl.php
<link href="../style.css" rel="stylesheet" type="text/css" /> <?php require_once "../lib/config.php"; require_once BASE_DIR."/lib/db/connection.php"; $error_flag=0; $completeday= @$_POST['checkcompletedays']; $Brief= @$_POST['checkbrief']; if(isset($_POST['show'])) { if($completeday!="fullday") { $fromdate_dd= @$_POST['cmbsumfdd']; $fromdate_mm=@$_POST['cmbsumfmm']; $fromdate_yy=@$_POST['txtsumfyy']; $from_date=$fromdate_yy."-".$fromdate_mm."-".$fromdate_dd; $todate_mm= @$_POST['cmbsumtomm']; $todate_dd=@$_POST['cmbsumtodd']; $todate_yy=@$_POST['txtsumtoyy']; $to_date=$todate_yy."-".$todate_mm."-".$todate_dd; if (!is_numeric(@$_POST['txtsumfyy'])) { $error['fdate_numeric']="Please enter valid year"; $error_flag=1; } if (!is_numeric(@$_POST['txtsumtoyy'])) { $error['todate_numeric']="Please enter valid year"; $error_flag=1; } } /* if ($fromdate_yy!="") { $error['fdate_yy']="Please enter year"; $error_flag=1; } if ($todate_yy!="") { $error['todate_yy']="Please enter year"; $error_flag=1; } */if($error_flag==1) { /*echo "<script>window.location='http://192.168.0.143/CPFMS/USER/summary.php</script>";*/ include "summary.php"; exit(); /*$url="http://".$server_ip."/CPFMS/USER/summary.php?pcode=".$p_code_value; echo "<script>window.location='$url'</script>";*/ } if($error_flag==0) { $p_id=@$_SESSION['project_id_a']; $sql_emp="select user_id from addproject where project_id ='$p_id'"; $sql_emp=mysql_query($sql_emp); while($row_emp=mysql_fetch_array($sql_emp)) { $u_id=$row_emp['user_id']; } if($completeday=="fullday") { if($Brief=="brief") { summaryreport::calculateBriefSummarykDetails($u_id,$p_id,"",""); summaryreport::printbriefsummarykDetails($u_id,$p_id,"",""); } else // not brief { summaryreport::calculateSummarykDetails($u_id,$p_id,"",""); summaryreport::printsummarykDetails($u_id,$p_id,"",""); } } else // between days { if($Brief=="brief") { summaryreport::calculateBriefSummarykDetails($u_id,$p_id,$from_date,$to_date); summaryreport::printbriefsummarykDetails($u_id,$p_id,$from_date,$to_date); } else { summaryreport::calculateSummarykDetails($u_id,$p_id,$from_date,$to_date); summaryreport::printsummarykDetails($u_id,$p_id,$from_date,$to_date); } } } } class summaryreport { //7 public function calculateSummarykDetails($u_id,$proj_id,$from_date,$to_date) {//88 try { //120 $debit_sum=0; $credit_sum=0; //clearing data $sql2="UPDATE `account` SET `debit` = 0,`credit` = 0 WHERE `user_id` ='$u_id' and `project_id` ='$proj_id'"; mysql_query($sql2); //-------------advance settlement table----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $sql_base="select * from advance_taken_entry where user_id='$u_id' and project_id='$proj_id'"; $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $temp_var= $row_base['advance_id']; if($from_date!="") { $sql1="select * from advance_settelment where advance_taken_entry_no='$temp_var' and invoice_date between '$from_date' and '$to_date'"; } else //complete days { $sql1="select * from advance_settelment where advance_taken_entry_no='$temp_var'"; } $sql1=mysql_query($sql1); while($row_inner=mysql_fetch_array($sql1)) { //100 $debit_sum=$debit_sum + $row_inner['bill_amount']; }//100 $account_name_var=$row_base['account_name']; //put the sum into account table $temp_var=$row_base['account_name']; $sql2="UPDATE `account` SET `debit` = '$debit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='Expenses' and `account_name`='$temp_var'"; mysql_query($sql2); }//92 //----------------------------- //-------------custemaccount_cashentry----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum=0;$credit_sum=0; if($from_date!="") { $sql_base="select * from custemaccount_cashentry where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from custemaccount_cashentry where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $account_name_var=$row_base['accountname']; $group_name_var=$row_base['groupname']; $sql_inner="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum= $row_inner['debit']; $credit_sum= $row_inner['credit']; } $debit_sum=$debit_sum + $row_base['debit']; $credit_sum=$credit_sum + $row_base['credit']; //put the sum into account table $sql2="UPDATE `account` SET `debit` = '$debit_sum',`credit` = '$credit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); }//92 //----------------------------- //-------------payment----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum_main=0;$credit_sum_main=0;$debit_sum_sub=0;$credit_sum_sub=0; if($from_date!="") { $sql_base="select * from payment where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from payment where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); if(mysql_affected_rows()>0) { //196 while($row_base=mysql_fetch_array($sql_base)) { //92 $account_name_var=$row_base['account_Name']; // Expenses $group_name_var="Expenses"; $sql_inner="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum_main= $row_inner['debit']; //$credit_sum_main= $row_inner['credit']; } $debit_sum_main=$debit_sum_main + $row_base['amount']; //$credit_sum_main=$credit_sum_main + $row_base['discount']; //put the sum into account table $sql2="UPDATE `account` SET `debit` = '$debit_sum_main' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); // Discount Received $group_name_var="Discount Received"; $sql_inner1="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner1=mysql_query($sql_inner1); while($row_inner1=mysql_fetch_array($sql_inner1)) { //155 //$debit_sum_sub= $row_inner1['debit']; $credit_sum_sub= $row_inner1['credit']; } // $debit_sum_sub=$debit_sum_sub + $row_base['amount']; $credit_sum_sub=$credit_sum_sub + $row_base['discount']; //put the sum into account table $sql2="UPDATE `account` SET `credit` = '$credit_sum_sub' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); }//92 } // 196 //----------------------------- //-------------reciept----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum_main=0;$credit_sum_main=0;$debit_sum_sub=0;$credit_sum_sub=0; if($from_date!="") { $sql_base="select * from reciept where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from reciept where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); if(mysql_affected_rows()>0) { //264 while($row_base=mysql_fetch_array($sql_base)) { //92 $account_name_var=$row_base['account_Name']; // Income $group_name_var="Income"; $sql_inner="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 //$debit_sum_main= $row_inner['debit']; $credit_sum_main= $row_inner['credit']; } //$debit_sum_main=$debit_sum_main + $row_base['discount']; $credit_sum_main=$credit_sum_main + $row_base['amount']; //put the sum into account table $sql2="UPDATE `account` SET `credit` = '$credit_sum_main' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); // Discount Paid $group_name_var="Discount Paid"; $sql_inner1="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner1=mysql_query($sql_inner1); while($row_inner1=mysql_fetch_array($sql_inner1)) { //155 $debit_sum_sub= $row_inner1['debit']; //$credit_sum_sub= $row_inner1['credit']; } $debit_sum_sub=$debit_sum_sub + $row_base['discount']; // $credit_sum_sub=$credit_sum_sub + $row_base['amount']; //put the sum into account table $sql2="UPDATE `account` SET `debit` = '$debit_sum_sub' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); }//92 } //264 //----------------------------- //-------------Salary Voucher----------------- $debit_sum=0;$credit_sum=0; if($from_date!="") { $sql_base="select * from salaryvoucher where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from salaryvoucher where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $emp_id_var=$row_base['emp_id']; $sql_emp="select emp_name from employe where user_id='$u_id' and project_id='$proj_id' and emp_id='$emp_id_var'"; $sql_emp=mysql_query($sql_emp); while($row_emp=mysql_fetch_array($sql_emp)) { $account_name_var=$row_emp['emp_name']; } $group_name_var="Salary"; $sql_inner="select * from account where user_id='$u_id' and project_id='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum= $row_inner['debit']; //$credit_sum= $row_inner['credit']; } $debit_sum=$debit_sum + $row_base['salary_paid']; //$credit_sum=$credit_sum+0; //put the sum into account table $sql2="UPDATE `account` SET `debit` = '$debit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `group_name`='$group_name_var' and `account_name`='$account_name_var'"; mysql_query($sql2); }//92 //----------------------------- } //120 catch(Exception $ex) {//120 echo $ex-> getMessage(); //return null; }//120 }//88 ////////////////////////////////////////////////////////////////////////// ///////////////////////////Brief Summary ///////////////////////////////// ///////////////////////////////////////////////////////////////////////// public function calculateBriefSummarykDetails($u_id,$proj_id,$from_date,$to_date) {//91 try { //120 $debit_sum=0; $credit_sum=0; //clearing data $sql2="UPDATE `accgroup` SET `debit` = 0,`credit` = 0 WHERE `user_id` ='$u_id' and `project_id` ='$proj_id'"; mysql_query($sql2); //-------------advance settlement table----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $sql_base="select * from advance_taken_entry where user_id='$u_id' and project_id='$proj_id'"; $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $temp_var= $row_base['advance_id']; if($from_date!="") { $sql1="select * from advance_settelment where advance_taken_entry_no='$temp_var' and invoice_date between '$from_date' and '$to_date'"; } else //complete days { $sql1="select * from advance_settelment where advance_taken_entry_no='$temp_var'"; } $sql1=mysql_query($sql1); while($row_inner=mysql_fetch_array($sql1)) { //100 $debit_sum=$debit_sum + $row_inner['bill_amount']; }//100 $sql2="UPDATE `accgroup` SET `debit` = '$debit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='Expenses'"; mysql_query($sql2); }//92 //----------------------------- //-------------custemaccount_cashentry----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum=0;$credit_sum=0; if($from_date!="") { $sql_base="select * from custemaccount_cashentry where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from custemaccount_cashentry where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $group_name_var=$row_base['groupname']; $sql_inner="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum= $row_inner['debit']; $credit_sum= $row_inner['credit']; } $debit_sum=$debit_sum + $row_base['debit']; $credit_sum=$credit_sum + $row_base['credit']; //put the sum into account table $sql2="UPDATE `accgroup` SET `debit` = '$debit_sum',`credit` = '$credit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); }//92 //----------------------------- //-------------payment----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum_main=0;$credit_sum_main=0;$debit_sum_sub=0;$credit_sum_sub=0; if($from_date!="") { $sql_base="select * from payment where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from payment where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 // Expenses $group_name_var="Expenses"; $sql_inner="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum_main= $row_inner['debit']; //$credit_sum_main= $row_inner['credit']; } $debit_sum_main=$debit_sum_main + $row_base['amount']; //$credit_sum_main=$credit_sum_main + $row_base['discount']; //put the sum into account table $sql2="UPDATE `accgroup` SET `debit` = '$debit_sum_main' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); // Discount Received $group_name_var="Discount Received"; $sql_inner1="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner1=mysql_query($sql_inner1); while($row_inner1=mysql_fetch_array($sql_inner1)) { //155 //$debit_sum_sub= $row_inner1['debit']; $credit_sum_sub= $row_inner1['credit']; } //$debit_sum_sub=$debit_sum_sub + $row_base['amount']; $credit_sum_sub=$credit_sum_sub + $row_base['discount']; //put the sum into account table $sql2="UPDATE `accgroup` SET `credit` = '$credit_sum_sub' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); }//92 //----------------------------- //-------------reciept----------------- //$sql="select * from advance_settelment where advance_taken_entry_no=(select advance_id from advance_taken_entry where user_id='$u_id')"; $debit_sum_main=0;$credit_sum_main=0;$debit_sum_sub=0;$credit_sum_sub=0; if($from_date!="") { $sql_base="select * from reciept where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from reciept where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 // Income $group_name_var="Income"; $sql_inner="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 //$debit_sum_main= $row_inner['debit']; $credit_sum_main= $row_inner['credit']; } // $debit_sum_main=$debit_sum_main + $row_base['discount']; $credit_sum_main=$credit_sum_main + $row_base['amount']; //put the sum into account table $sql2="UPDATE `accgroup` SET `credit` = '$credit_sum_main' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); // Discount Paid $group_name_var="Discount Paid"; $sql_inner1="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner1=mysql_query($sql_inner1); while($row_inner1=mysql_fetch_array($sql_inner1)) { //155 $debit_sum_sub= $row_inner1['debit']; //$credit_sum_sub= $row_inner1['credit']; } $debit_sum_sub=$debit_sum_sub + $row_base['discount']; //put the sum into account table $sql2="UPDATE `accgroup` SET `debit` = '$debit_sum_sub' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); }//92 //----------------------------- //-------------Salary Voucher----------------- $debit_sum=0;$credit_sum=0; if($from_date!="") { $sql_base="select * from salaryvoucher where user_id='$u_id' and project_id='$proj_id' and date between '$from_date' and '$to_date'"; } else { $sql_base="select * from salaryvoucher where user_id='$u_id' and project_id='$proj_id'"; } $sql_base=mysql_query($sql_base); while($row_base=mysql_fetch_array($sql_base)) { //92 $group_name_var="Salary"; $sql_inner="select * from accgroup where user_id='$u_id' and project_id='$proj_id' and `groupname`='$group_name_var'"; $sql_inner=mysql_query($sql_inner); while($row_inner=mysql_fetch_array($sql_inner)) { //155 $debit_sum= $row_inner['debit']; //$credit_sum= $row_inner['credit']; } $debit_sum=$debit_sum + $row_base['salary_paid']; //$credit_sum=$credit_sum+0; //put the sum into account table $sql2="UPDATE `accgroup` SET `debit` = '$debit_sum' WHERE `user_id` ='$u_id' and `project_id` ='$proj_id' and `groupname`='$group_name_var'"; mysql_query($sql2); }//92 //----------------------------- } //120 catch(Exception $ex) {//120 echo $ex-> getMessage(); //return null; }//120 }//91 public function printsummarykDetails($u_id,$p_id,$from_date,$to_date) {//10 $sql="SELECT project_code FROM `addproject` where user_id='$u_id' and project_id='$p_id'"; $sql=mysql_query($sql); while($row=mysql_fetch_array($sql)) { $p_code = $row['project_code']; } $sql="SELECT * FROM `account` where user_id='$u_id' and project_id='$p_id' ORDER BY `account_name`"; $sql=mysql_query($sql); if(mysql_affected_rows()>0) {//14 ?> <div align="center"><b><?php echo "Summary of project : $p_code"?> <?php echo"From:$from_date"?> <?php echo "To:$to_date";?></b></div> <table width="527" height="53" border="1" align="center"> <tr> <th width="138" height="23">By Account</th> <th width="176">To Account</th> <th width="104">Debit</th> <th width="81">Credit</th> </tr> <?php $i=0;$debit=0;$credit=0; while($row=mysql_fetch_array($sql)) {//32 $group_name_db=$row['group_name']; $account_name_db=$row['account_name']; ?> <tr> <td height="22" ><div align="center"><a href="ledger_expand_ctrl.php?<?php echo "aname=$account_name_db";?>&from=<?php echo "$from_date"; ?>&<?php echo "to=$to_date";?>&<?php echo "gname=$group_name_db";?>" ><?php echo $group_name_db; ?></a></div></td> <td><div align="center"><a href="ledger_expand_ctrl.php?<?php echo "aname=$account_name_db";?>&from=<?php echo "$from_date"; ?>&<?php echo "to=$to_date";?>&<?php echo "gname=$group_name_db";?>" ><?php echo $account_name_db; ?></a></div></td> <td><div align="center"><?php $debit_db=$row['debit']; echo $debit_db; $debit=$debit+$debit_db; ?></div></td> <td><div align="center"><?php $credit_db=$row['credit']; echo $credit_db; $credit=$credit+$credit_db; ?></div></td></tr> <?php }//32 ?> </table> <table width="536" align="center"> <tr> <td width="146"> <div align=""><strong>Grand total</strong></div></td> <td width="177"> </td> <th width="112"><div align="center"><?php echo $debit;?></div></th> <th width="81"><div align="center"><?php echo $credit;?></div></th> </tr> </table> <br /> <strong> Balance : </strong><span class="tableHead"> <?php echo $credit-$debit;?></span> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "No Details to display"; ?></b></font><?php }//14 }//10 public function printbriefsummarykDetails($u_id,$p_id,$from_date,$to_date) {//761 $sql="SELECT project_code FROM `addproject` where user_id='$u_id' and project_id='$p_id'"; $sql=mysql_query($sql); while($row=mysql_fetch_array($sql)) { $p_code = $row['project_code']; } $sql="SELECT * FROM `accgroup` where user_id='$u_id' and project_id='$p_id' ORDER BY `groupname`"; $sql=mysql_query($sql); if(mysql_affected_rows()>0) {//14 ?> <div align="center"><b><?php echo "Summary of project : $p_code"?> <?php echo"From:$from_date"?> <?php echo "To:$to_date";?></b></div> <table width="527" height="53" border="1" align="center"> <tr> <th width="138" height="23">By Account</th> <th width="104"> Debit</th> <th width="81">Credit</th> </tr> <?php $i=0;$debit=0;$credit=0; while($row=mysql_fetch_array($sql)) {//32 $group_name_db=$row['groupname']; ?> <tr> <td height="22" ><div align="center"><a href="ledger_expand_brief_ctrl.php?from=<?php echo "$from_date"; ?>&<?php echo "to=$to_date";?>&<?php echo "gname=$group_name_db";?>" ><?php echo $group_name_db; ?></div></td> <td><div align="center"><?php $debit_db=$row['debit']; echo $debit_db; $debit=$debit+$debit_db; ?></div></td> <td><div align="center"><?php $credit_db=$row['credit']; echo $credit_db; $credit=$credit+$credit_db; ?></div></td></tr> <?php }//32 ?> </table> <table width="530" align="center"> <tr> <td width="146"> <div align=""><strong>Grand total</strong></div></td> <td width="70"> </td> <th width="162"><div align="center"><?php echo $debit;?></div></th> <th width="138"><div align="center"><?php echo $credit;?></div></th> </tr> </table> <br /> <strong> Balance : </strong><span class="tableHead"> <?php echo $credit-$debit;?></span> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "No Details to display"; ?></b></font><?php }//14 }//761 }//7 if(isset($_POST['show'])) { ?> </p> <p><a href="#" class="projectboldtxt style2" onclick="window.print()">Print</a> <a href="project_report.php">Back</a></p> </blockquote> <?php } ?>