Ejemplo n.º 1
0
include '../conf/db_connect.php';
connect();
$start = $_POST['start_date'];
$start = strtotime($start);
$end = $_POST['end_date'];
$end = strtotime($end);
$top1 = '';
$top = "\n<div class=box>\n<div class=box-body no-padding>\n<table class=table id=tableentry>\n<thead>\n  <tr>\n    <th>S/N</th>\n    <th>NAME</th>\n    <th>AMOUNT</th>\n    <th>AMT_MNT</th>\n    <th>DATE</th>\n  </tr>\n</thead>\n<tbody>";
$body = '';
$result = query("SELECT * FROM payment");
$i = 0;
while ($row = mysql_fetch_array($result)) {
    ++$i;
    $amount = $row['amount_pay'];
    $id = $row['emp_no'];
    $name = get_teller_name($id);
    $date1 = $row['date'];
    $date = strtotime($date1);
    $amt = $row['amort_loan'] + $row['amort_interest'];
    if ($date >= $start && $date <= $end) {
        $total_loan_recovered += $row['amount_pay'];
        $total_interest += $row['amort_interest'];
        $top1 = "<div class=box>\n     <div class=box-body no-padding>\n     <table class=table>\n       <thead>\n       <tr>\n         <td>\n           <strong><h4>LOAN RECOVERY MONTHLY REPORT</h4></strong>\n         </td>\n       </tr>\n     </thead>\n       <tr>\n         <th>\n           Total Loan Recovered:\n         </th>\n         <td>\n           {$total_loan_recovered}\n         </td>\n       </tr>\n       <tr>\n         <th>\n           Total Interest Recieved\n         </th>\n         <td>\n           {$total_interest_recieved}\n         </td>\n       </tr>\n     </table>\n     </div>\n     </div>";
        $top1 .= $top;
        $body .= "<tr>\n<td>{$i}</td>\n<td>{$name}</td>\n<td>{$amount}</td>\n<td>{$amt}</td>\n<td>{$date1}</td>\n</tr>";
    }
}
$end = "</tbody></table></div></div>";
$htm = $top1 . $body . $end;
echo $htm;
Ejemplo n.º 2
0
<?php

include 'conf/db_connect.php';
connect();
$start = $_POST['start_date'];
$start = strtotime($start);
$end = $_POST['end_date'];
$end = strtotime($end);
$top = "\n<table class=table id=tableentry>\n<thead>\n  <tr>\n    <th>S/N</th>\n    <th>ACCT NO</th>\n    <th>AMOUNT</th>\n    <th>BALANCE</th>\n    <th>TELLER</th>\n    <th>DATE</th>\n  </tr>\n</thead>\n<tbody>";
$body = ' ';
$type = '';
$result = query("SELECT * FROM deposit");
$i = 0;
while ($row = mysql_fetch_array($result)) {
    $t_id = $row['teller_id'];
    $name = get_teller_name($t_id);
    $date1 = $row['date'];
    ++$i;
    $date = strtotime($date1);
    $acct_no = $row['acct_no'];
    $bal = $row['balance'];
    $amount = $row['amount'];
    if ($date >= $start && $date <= $end) {
        $body .= "<tr>\n<td>{$i}</td>\n<td><a href=index.php?page=../dep_witd&id={$acct_no}> {$acct_no}</a></td>\n<td>{$amount}</td>\n<td>{$bal}</td>\n<td>{$name}</td>\n<td>{$date1}</td>\n</tr>";
    }
}
$end = "</tbody></table>";
$htm = $top . $body . $end;
echo $htm;
Ejemplo n.º 3
0
    return $tm;
}
$body = '';
$start = $_POST['start_date'];
$start = strtotime($start);
$end = $_POST['end_date'];
$end = strtotime($end);
$result = query("SELECT * FROM account LEFT JOIN acct_type ON account.acct_type = acct_type.id");
$i = 0;
while ($row = mysql_fetch_array($result)) {
    $date = $row['d_opened'];
    $time = strtotime($date);
    if ($time >= $start && $time <= $end) {
        ++$i;
        $member_id = $row['emp_id'];
        $name = get_teller_name($member_id);
        $acct_no = $row['acct_no'];
        $acct_type = $row['name'];
        $monthly = $row['save_amt'];
        $amt_todate = $row['amt_todate'];
        $date = $row['d_opened'];
        $balance = $row['balance'];
        $body .= "<tbody>\n     <tr>\n     <td>{$i};</td>\n     <td>{$name};</td>\n     <td><a href=index.php?page=../dep_witd&id={$acct_no}>{$acct_no}</a></td>\n     <td>{$acct_type}</td>\n     <td>{$monthly}</td>\n     <td>{$amt_todate}</td>\n     <td>{$balance}</td>\n     <td>{$date}</td>\n\n     </tr>\n   </tbody>";
    }
}
$thrift = no_accounts($start, $end)[1];
$special = no_accounts($start, $end)[2];
$total = $thrift + $special;
$top = "\n<div class=box>\n<div class=box-body no-padding>\n<table class=table>\n  <thead>\n  <tr>\n\n    <td>\n      <strong><h4>ACCOUNT MONTHLY REPORT</h4></strong>\n    </td>\n  </tr>\n  </thead>\n  <tr>\n    <th>\n      Total Number Thrift\n    </th>\n    <td>{$thrift}</td>\n  </tr>\n  <tr>\n    <th>\n      Total Number Special\n    </th>\n    <td>{$special}</td>\n  </tr>\n  <tr>\n    <th>\n      Total Number of Accounts Opened\n    </th>\n    <td>{$total}</td>\n  </tr>\n</table>\n</div>\n</div>\n</div>\n<div class=box>\n  <div class=box-body>\n    <div class=box-header with-border>\n      <h3 class=box-title>Account Summary</h3>\n    </div>\n<table class=table>\n  <thead>\n    <tr>\n    <th>S/N</th>\n    <th>MEMBER NAME</th>\n    <th>ACCT NO</th>\n    <th>ACCT TYPE</th>\n    <th>MNTLY SAVINGS</th>\n    <th>AMT TODATE</th>\n    <th>BALANCE</th>\n    <th>DATE OPENED</th>\n    </tr>\n    </thead>\n";
$end = "</tbody></table></div>";
$htm = $top . $body . $end;
Ejemplo n.º 4
0
{
    for ($i = 0; $i < 7; $i++) {
        $prefix .= rand(0, 9);
    }
    $result = query("SELECT * FROM account WHERE acct_no='{$prefix}'");
    if (mysql_num_rows($result) > 0) {
        acct($prefix);
    } else {
        return $prefix;
    }
}
$bal = $_POST['bal'];
$share = $_POST['share'];
$value = $_POST['value'];
$emp_id = $_POST['emp_id'];
$acct_name = get_teller_name($emp_id);
$save = $_POST['save_amt'];
$acct_type = $_POST['acct_type'];
$prefix = "TSA";
$duration = '';
$rs = query("SELECT * FROM customer WHERE id = '{$emp_id}'");
$row = mysql_fetch_array($rs);
$dept = $row['dept'];
if ($acct_type == 1) {
    $result = query("SELECT value from percent WHERE p_name='duration'");
    $row = mysql_fetch_array($result);
    $duration = $row['value'];
} else {
    $duration = $_POST['duration'];
    $prefix = "SSA";
}