
PK 
<?php
session_start();
require_once '../common/common.php';
require_once '../common/secure.php';
include("connection.php");
if($_GET['action']=='tax')
{
include ("../head.php");
}
else
{
include ("../head_account.php");
}
?>
<div align="left" style="float:left;"><!-- <a href="tax_report.php">Back</a> --></div>
<div align='center'>
<table width="100%" border="0px;">
<tr>
<td align="right" >
<img src='bank_report.gif' width="100%" height="150px"/>
</td>
</tr>
<tr>
<td><div style='width:100%;font-size:large' align='center'>Bank Amount</div></td>
</tr>
<tr>
<th>Banks</th>
</tr>
<?php
//start for certificate debit
//$sql_
//end for certificate debit
if($_GET['act']=='amrt')//normal Amritsar
{
echo '<tr>
<td><strong>Ludhiana Punjab National Bank(PNB)</a></strong></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%" align="center" border="1px">
<tr>
<td colspan="2"><strong>Debit</strong></td>
<td colspan="2"><strong>Credit</strong></td>
</tr>
<tr>
<td colspan="2">Certificate Debit<span style="padding-left:150px;">2000</span></td>
<td colspan="2">Expenditure<span style="padding-left:190px;">2000</span></td>
</tr>
<tr>
<td colspan="2">Other Debit<span style="padding-left:180px;">2000</span></td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><strong>Total<span style="padding-left:223px;">2000</span></strong></td>
<td colspan="2"><strong>Total<span style="padding-left:236px;">2000</span></strong></td>
</tr>
<tr>
<td align="left" colspan="4">Grand Total
<span style="padding-left:700px;">200</span>
</td>
</tr>
<tr>
<td colspan="4"> <br /> <br /><span style="padding-left:400px;"><a href="banks.php?act=normal" style="text-decoration:none;"><input type="button" value=" Back "></a></span></td>
</tr>
</table>
</td>
</tr>';
}
elseif($_GET['act']=='ldh')//normal Ludhiana
{
echo '<tr>
<td><strong>Amritsar</strong> HDFC</strong></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" width="100%" align="center" border="1px">
<tr>
<td colspan="2"><strong>Debit</strong></td>
<td colspan="2"><strong>Credit</strong></td>
</tr>
<tr>
<td colspan="2">Certificate Debit<span style="padding-left:150px;">';
$sql_inc_total="SELECT sum(grandtotal) FROM invoices WHERE invstatus='paid'";
$result_inc_total=mysql_query($sql_inc_total);
$row_inc_total=mysql_fetch_array($result_inc_total);
echo $inc_total=$row_inc_total['sum(grandtotal)'];
echo '</span></td>
<td colspan="2">Expenditure<span style="padding-left:190px;">';
$sql_exp="SELECT sum(grandtotal) FROM expenditure_criteria";//expenditure total
$result_exp=mysql_query($sql_exp);
$row_exp=mysql_fetch_array($result_exp);
echo $exp_total=$row_exp['sum(grandtotal)'];
echo ' (<a href="addregularexpenditure.php?type=debit">Add</a>)';
echo '</span></td>
</tr>
<tr>
<td colspan="2">Other Debit<span style="padding-left:180px;">';
$sql_criteria="SELECT sum(amount) FROM income_criteria";
$result_criteria=mysql_query($sql_criteria);
$row_criteria=mysql_fetch_array($result_criteria);
echo $crt_total=$row_criteria['sum(amount)'];
$t_debit=$inc_total+$crt_total; //total amount.
$grnd_total=$exp_total+$t_debit;
echo '</span> (<a href="addregularincome.php?type=debit">Add</a>)</td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><strong>Total<span style="padding-left:223px;">'.$t_debit.'</span></strong></td>
<td colspan="2"><strong>Total<span style="padding-left:236px;">'.$exp_total.'</span></strong></td>
</tr>
<tr>
<td align="left" colspan="4"><strong>Grand Total
<span style="padding-left:650px;">'.$grnd_total.'</span></strong>
</td>
</tr>
<tr>
<td colspan="4"> <br /> <br /><span style="padding-left:400px;"><a href="banks.php?act=normal" style="text-decoration:none;"><input type="button" value=" Back "></a></span></td>
</tr>
</table>
</td>
</tr>';
}
elseif($_GET['act']=='normal')//normal display
{
echo '<tr>
<td><strong>Amritsar</strong> <a href="banks.php?act=ldh">HDFC</a></td>
</tr>
<tr>
<td><strong>Ludhiana</strong> <a href="banks.php?act=amrt">Punjab National Bank(PNB)</a></td>
</tr>';
}
?>
</table>
</div>
<?php
include ("../foot.php");
?>


PK 99