
PK 
<?php
ob_start();
//error_reporting(E_ALL ^ E_NOTICE);
@session_start();
ini_set('allow_url_include',1);
date_default_timezone_set("Asia/Kolkata");
set_time_limit(600);
ini_set('max_execution_time',600);
include '../includes/settings/constant.php';
//include '../includes/settings/db.php';
require_once '../includes/settings/PDODB.php';
include '../includes/modules/functions.php';
$function = new FUNCTIONS();
if (!empty($_SESSION['adminId']) && !empty($_SESSION['admin_role_id'])) {
if($_SESSION['admin_role_id']==1){
//header("Location: index.php");
}elseif($_SESSION['admin_role_id']==2){
header("Location: ../dashboard/index.php");
}
}else{
header("Location: ../index.php");
exit();
}
if(!empty($_GET['id'])){
$id = $_GET['id'];
}else{ ?>
<script type="text/javascript">location.replace("index.php");</script>
<?php }
//start member details $id=$_GET['id'],NULL,NULL,1
$user = $function->getUsers($_GET['id'],NULL,NULL,1);
//print_r($user); exit;
$name = $user[0]['owner_name'];
//$mobile = $user[0]['mobile'];
$user_details = $function->getUserDetails($_GET['id'],NULL,1);
$house_no = $user_details[0]['house_no'];
//print_r($user_details);
if(isset($_POST['btnAddMember'])){
//print_r($user[0]['id']); //exit;
$insert_id = $user[0]['id'];
echo "<script>window.location.href='edit-member-details.php?id=$insert_id';</script>";
}
//End member details
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>INSPINIA | Basic Form</title>
<?php include_once '../layout/style.php'; ?>
</head>
<body>
<div id="wrapper">
<?php $currentPage = 'member-index'; include_once '../layout/side-bar.php'; ?>
<div id="page-wrapper" class="gray-bg">
<?php include_once '../layout/header.php'; ?>
<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-lg-10">
<h2><?=$name;?></h2>
<h3>House No : <?=$house_no;?></h3>
</div>
<div class="col-lg-2">
<button class="btn-lg btn-primary pull-right" style="margin-top: 15px;" onclick="history.back()">Back</button>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5><?=$name;?>'s Accounts Details</h5>
</div>
<div class="ibox-content">
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover dataTables-example" id="editable">
<thead>
<tr>
<th>S.No</th>
<th>Reciept/<br>Demand Id</th>
<th>Particular</th>
<th>Amt. Due</th>
<th>Amt. Paid</th>
<th>Bal. Amt.</th>
<th>Demand/<br>Clearing<br>Date</th>
<th>Pay Mode</th>
<th>Invoice</th>
</tr>
</thead>
<tbody>
<?php
$transaction = $function->getTransactionDetails($_GET['id'],NULL);
$account = $function->getAccountDetails($_GET['id'],NULL,1);
$bal = 0;
$i=0;
foreach ($account as $key => $value) {
$i++;
// Convert values to float before calculation
$debit = floatval($value['debit']);
$credit = floatval($value['credit']);
$bal += $debit - $credit;
foreach ($transaction as $isKey => $isValue) {
if($value['orderid']==$isValue['orderid']) {
$issuePdf = $isValue['invoicepdf'];
}
}
?>
<tr>
<td><?=$i;?></td>
<td class="center"><?=$value['orderid'];?></td>
<td class="center"><?=$value['particular'];?></td>
<td class="center"><?=number_format($debit, 2);?></td>
<td class="center"><?=number_format($credit, 2);?></td>
<td class="center"><?=number_format($bal, 2);?></td>
<?php if(!empty($value['date'])) { ?>
<td class="center"><?=date('jS M, Y h:i A', strtotime($value['date']));?></td>
<?php } else { ?>
<td class="center"><?=date('jS M, Y h:i A', strtotime($value['txndate']));?></td>
<?php } ?>
<td>
<?php
if($value['paymentmode']=='PPI' || $value['paymentmode']=='CC' || $value['paymentmode']=='DC' || $value['paymentmode']=='UPI' || $value['paymentmode']=='NB') {
echo "Online Payment";
} else {
echo $value['paymentmode'];
}
?>
</td>
<td class="center">
<?php if(!empty($value['orderid'])) { ?>
<a href="print.php?uid=<?=$value['uid'];?>&orderid=<?=$value['orderid'];?>" target="_blank">
<i class="fa fa-print" aria-hidden="true"></i>
</a>
<?php } ?>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include_once '../layout/script.php'; ?>
<script>
$(document).ready(function () {
$('.i-checks').iCheck({
checkboxClass: 'icheckbox_square-green',
radioClass: 'iradio_square-green',
});
});
</script>
<script>
function tossterMsgAlert(msg='Welcome',title='') {
toastr.options = {
closeButton: true,
//debug: false,
newestOnTop: false,
//progressBar: false,
positionClass: 'toast-top-center',
preventDuplicates: true,
//onclick: null,
//showDuration: 300,
//hideDuration: 1000,
timeOut: 2000,
//extendedTimeOut: 1000,
//showEasing: 'swing',
//hideEasing: 'linear',
//showMethod: 'fadeIn',
hideMethod: 'fadeOut'
};
toastr.warning(title,msg);
}
</script>
</body>
</html>


PK 99