<?php
require_once(__DIR__."/../includes/sysinit.php");
include("finance.php");
$_finance = new Finance; //new class instance
$_finance->hddnFinanceId= $_POST['hddnFinanceId']	?? 0;
$_finance->edtTxnDate	= $_POST['edtTxnDate']		?? '';
$_finance->selClientId	= $_POST['selClientId']		?? 0;
$_finance->selTxnTypeId	= $_POST['selTxnTypeId']	?? 0;
$_finance->selPmId		= $_POST['selPmId']			?? 0;
$_finance->edtTxnAmount	= $_POST['edtTxnAmount']	?? 0;
$_finance->cbTxnPaid	= $_POST['cbTxnPaid']		?? 0;
$_finance->txtTxnNotes	= $_POST['txtTxnNotes']		?? '';
$_finance->selBsId		= $_POST['selBsId']			?? 0;
if ($_POST['action']=='0') $_finance->addFinance();
if ($_POST['action']=='1') $_finance->addFinance();
if ($_POST['action']=='2') $_finance->viewFinance();
if ($_POST['action']=='3') $_finance->editFinance();
if ($_POST['action']=='4') $_finance->deleteFinance();
if ($_POST['action']=='5') $_finance->copyFinance();
unset($_finance);
