示例#1
0
 public function searchResults($search)
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $_SESSION['accountID'] = $search['accountID'];
     $this->setAccountSelected($_SESSION['accountID']);
     $account = new Account();
     $account->accountID = $_SESSION['accountID'];
     $account->getAccount();
     $_SESSION['searchDetails'] = $search['searchDetails'];
     $_SESSION['fromAmount'] = $search['fromAmount'];
     $_SESSION['toAmount'] = $search['toAmount'];
     if (strlen($search['toDate']) != 0) {
         $_SESSION['toDate'] = $search['toDate'];
     } else {
         $_SESSION['toDate'] = date('Y-m-d');
     }
     if (strlen($search['fromDate']) != 0) {
         $_SESSION['fromDate'] = $search['fromDate'];
     } else {
         $_SESSION['fromDate'] = date("Y-m-d", strtotime("-1 months"));
     }
     $_SESSION['period'] = date('d/m/Y', strtotime($_SESSION['fromDate'])) . ' to ' . date('d/m/Y', strtotime($_SESSION['toDate']));
     $transactions = new Transactions();
     $transactions->accountID = $_SESSION['accountID'];
     $arr = array('openBalance' => $account->openBalance);
     $_SESSION['history'] = $transactions->getTransactions($arr);
     $_SESSION['found'] = $transactions->countTransactions($arr);
     $_SESSION['historyDebit'] = $transactions->getDebits($arr);
     $_SESSION['historyCredit'] = $transactions->getCredits($arr);
     $_SESSION['historyFee'] = $transactions->getFees($arr);
     $_SESSION['historyNet'] = $transactions->getNet($arr);
 }
示例#2
0
 public function init()
 {
     if (isset($_POST['transferNewFundsTransfer'])) {
         $this->cancelSessions();
         unset($_POST['transferNewFundsTransfer']);
     }
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $accountPayees = new AccountPayees();
     $accountPayees->userID = $_SESSION['userID'];
     $_SESSION['accountPayee'] = $accountPayees->getBoth();
 }
示例#3
0
 public function init()
 {
     if (isset($_POST['payNewBillPayment'])) {
         $payment = new Payment();
         $payment->cancelSessions();
         unset($_POST['payNewBillPayment']);
     }
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $billers = new Billers();
     $billers->userID = $_SESSION['userID'];
     $_SESSION['billers'] = $billers->getBillers();
 }
示例#4
0
 public function init()
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     if (!isset($_SESSION['accounts'])) {
         $_SESSION['accounts'] = $accounts->getAccounts();
     }
     if (isset($_SESSION['payAccountID'])) {
         $this->setAccountSelected($_SESSION['payAccountID']);
     }
     if (isset($_SESSION['payBillerID'])) {
         $biller = new Billers();
         $biller->billerID = $_SESSION['payBillerID'];
         $biller->getBiller();
         $_SESSION['payBillerCode'] = $biller->billerCode;
         $_SESSION['payBillerName'] = $biller->billerName;
         $_SESSION['payBillerNickname'] = $biller->billerNickname;
         $_SESSION['payCustomerRef'] = $biller->customerReference;
     }
 }
示例#5
0
 public function getDetails($accountID)
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $_SESSION['detAccountID'] = $accountID;
     $this->setAccountSelected($_SESSION['detAccountID']);
     $account = new Account();
     $account->accountID = $accountID;
     $account->getAccount();
     $_SESSION['detAccountNickname'] = $account->accountNickname;
     $_SESSION['detAccountNumber'] = $account->accountNumber;
     $_SESSION['detProductName'] = $account->productName;
     $_SESSION['detRecordedLimit'] = $account->recordedLimit;
     if (!isset($_SESSION['detAccruedDebitInterest'])) {
         if (strlen($account->accruedDebitInterest()) == 0) {
             $_SESSION['detAccruedDebitInterest'] = '$0.00';
         } else {
             $_SESSION['detAccruedDebitInterest'] = '$' . number_format($account->accruedDebitInterest(), 2);
         }
     }
     if (!isset($_SESSION['detAccruedCreditInterest'])) {
         if (strlen($account->accruedCreditInterest()) == 0) {
             $_SESSION['detAccruedCreditInterest'] = '$0.00';
         } else {
             $_SESSION['detAccruedCreditInterest'] = '$' . number_format($account->accruedCreditInterest(), 2);
         }
     }
     if (!isset($_SESSION['detInterestEarned'])) {
         if (strlen($account->creditInterestLFY()) == 0) {
             $_SESSION['detInterestEarned'] = '$0.00';
         } else {
             $_SESSION['detInterestEarned'] = '$' . number_format($account->creditInterestLFY(), 2);
         }
     }
 }
示例#6
0
 public function searchResults($search)
 {
     $payment = new Payment();
     $payment->cancelSessions();
     $billerPayees = new BillerPayees();
     $billerPayees->userID = $_SESSION['userID'];
     switch ($search['paymentType']) {
         case 'All Payment Types':
             $_SESSION['allPaymentList'] = 'selected="selected"';
             $_SESSION['payees'] = $billerPayees->getBoth();
             unset($_SESSION['billPaymentList']);
             unset($_SESSION['fundsTransferPaymentList']);
             break;
         case 'Bill Payment':
             unset($_SESSION['allPaymentList']);
             $_SESSION['billPaymentList'] = 'selected="selected"';
             $_SESSION['payees'] = $billerPayees->getBillers();
             unset($_SESSION['fundsTransferPaymentList']);
             break;
         case 'Funds Transfer':
             unset($_SESSION['allPaymentList']);
             unset($_SESSION['billPaymentList']);
             $_SESSION['fundsTransferPaymentList'] = 'selected="selected"';
             $_SESSION['payees'] = $billerPayees->getPayees();
             break;
     }
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     $_SESSION['accounts'] = $accounts->getAccounts();
     $_SESSION['accountID'] = $search['accountID'];
     $this->setAccountSelected($_SESSION['accountID']);
     $_SESSION['payListName'] = $search['payListName'];
     $_SESSION['payListStatus'] = $search['payListStatus'];
     $_SESSION['payListFromAmount'] = $search['payListFromAmount'];
     $_SESSION['payListToAmount'] = $search['payListToAmount'];
     $_SESSION['payListFromDate'] = $search['payListFromDate'];
     $_SESSION['payListToDate'] = $search['payListToDate'];
     $this->getPayments();
 }
示例#7
0
 public function getAccounts()
 {
     $accounts = new Accounts();
     $accounts->userID = $_SESSION['userID'];
     return $accounts->getAccounts();
 }