0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
USER
/
[
Home
]
File: search_ledger_description_ctrl.php
<?php require_once "../lib/config.php"; //require_once BASE_DIR."/lib/db/DBconnection.php"; require_once BASE_DIR."/lib/db/connection.php"; class userSearch { //7 public function printLedgerDetails($sql1) {//10 $sql=mysql_query($sql1); if(mysql_affected_rows()>0) {//14 ?> <table width="1347" height="112" border="1" align="center" bordercolor="#CC0000"> <tr bgcolor="#853008"> <th width="36" height="30" bgcolor="#853008"><font color="#F4E7BD"> S No </font></th> <th width="94" bgcolor="#853008"><font color="#F4E7BD">Project code</font></th> <th width="77" bgcolor="#853008"><font color="#F4E7BD">Date </font></th> <th width="147" bgcolor="#853008"><font color="#F4E7BD">Ledger id</font></th> <th width="161" bgcolor="#853008"><font color="#F4E7BD">By Account</font></th> <th width="163" bgcolor="#853008"><font color="#F4E7BD">To Account</font></th> <th width="115" bgcolor="#853008"><font color="#F4E7BD">Debit</font></th> <th width="113" bgcolor="#853008"><font color="#F4E7BD">Credit</font></th> <th width="168" bgcolor="#853008"><font color="#F4E7BD"> Description </font></th> <th width="107" bgcolor="#853008"><font color="#F4E7BD">Reference</font></th> <th width="96" bgcolor="#853008"><font color="#F4E7BD">Reference id</font></th> </tr> <?php $i=0;$debit=0;$credit=0; while($row=mysql_fetch_array($sql)) {//32 ?> <tr> <th height="74"><?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?></th> <th><?php $p_iddb=$row['project_id']; $sqlp_code="select * from addproject where project_id='$p_iddb'"; $sql1=mysql_query($sqlp_code); while($row1=mysql_fetch_array($sql1)) { echo $row1['project_code']; } ?> </th> <th><?php $datedb=$row['date']; echo $datedb; ?></th> <th><?php echo $row['ledg_id']; ?></th> <th><?php echo $row['group_name']; ?></th> <th><?php echo $row['account_name']; ?></th> <th><?php $debit_db=$row['debit']; echo $debit_db; $debit=$debit+$debit_db; ?></th> <th><?php $credit_db=$row['credit']; echo $credit_db; $credit=$credit+$credit_db; ?></th> <th><?php echo $row['description']; ?></th> <th><?php echo $row['ledger_type']; ?></th> <th><?php echo $row['type_id']; ?></th> <!-- <th><a href="../USER/edit_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/edit.png" alt="edit" width="25" height="25" /></a></th> <th> <a href="../USER/delete_payment.php?id=</?php echo $row['payment_id']; ?>"><img src="../images/delete.jpg" alt="Delete" width="25" height="25" /></a></th>--> </tr> <?php }//32 ?> </table> <table width="1100" align="center"> <tr> <td width="115"><div align="center"><strong>Grand total</strong></div></td> <td width="661"> </td> <td width="157"><div align="center"><?php echo $debit;?></div></td> <td width="147"><div align="center"><?php echo $credit;?></div></td> </tr> </table> Balance :<?php echo $credit-$debit;?> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "Nothing to display"; ?></b></font><?php }//14 }//10 }//7 ?>