'bankstatementreport'

This commit is contained in:
gayathri1990 2018-03-20 11:27:25 +05:30
parent e3137a1275
commit 099e75dbe9
20 changed files with 7264 additions and 103 deletions

View File

@ -211,6 +211,18 @@ $route['EditIncomeExpense'] = "cashbook/editcashbook";
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
$route['updateExpense'] = "cashbook/updateExpense";
$route['Bankingview']= "cashbook/bankfileview";
$route['Bankingstatement']= "cashbook/bankdata";
$route['Debitstatement']= "cashbook/bankdebitdata";
$route['Cashstatement']= "cashbook/cashreceipt";
$route['BankingFile']= "cashbook/bankfileupload";
//$route['Bankingrecord']= "cashbook/bankdata";
$route['Bankamountpaid']= "cashbook/amountpaid";
$route['Bankamountreceived']= "cashbook/amountreceived";
$route['Receipt']= "cashbook/cashreceipt";
$route['Payment']= "cashbook/cashpayment";
$route['Invoice']= "cashbook/bankinvoice";
$route['Bankcash']= "cashbook/cashbanking";
$route['qualityreportlist'] = "quality/reportList";
$route['qualityreportlistinward'] = "quality/reportListInward";
//<-------------Store page----------------->

View File

@ -18,6 +18,7 @@ class cashbook extends BaseController
{
parent::__construct();
$this->load->model('cashbook_model');
$this->load->model('employeedetails_model');
$this->isLoggedIn();
$this->load->helper(array('form','url'));
$this->load->library('upload');
@ -76,6 +77,54 @@ class cashbook extends BaseController
}
function bankreceipt()
{
$aid = $this->uri->segment(3);
$str = $this->uri->segment(4);
if(!empty($aid)){
if(!empty($str))
{
$data['company'] = $this->cashbook_model->getCompany();
$data['data'] = $this->cashbook_model->getIncomeExpenseList($aid);
$totalamt = $data['data'][0]->total;
$data['amtinwords'] = $this->convertNumber($totalamt);
$mpdf=new mPDF('utf-8','A4-P',7, 10,10, 10, 3, 0, 0, 0);
$mpdf->SetHTMLHeader($HtmlHeading);
$html = $this->load->view('cashbookpdf',$data,true);
$mpdf->SetDisplayMode('fullpage');
$mpdf->setFooter($HTMLFooter . "Page {PAGENO} of {nb}");
$mpdf->list_indent_first_level = 1;
$mpdf->setAutoTopMargin = 'stretch';
$mpdf->setAutoBottomMargin = 'stretch';
$mpdf->WriteHTML($html);
$filename = "bankreceipt.pdf";
$mpdf->Output($filename,I);
}
else
{
$data['data'] = $this->cashbook_model->getIncomeExpenseList($aid);
//print_r($data['dropdownvalues']);die();
$this->global['pageTitle'] = 'Siddharth : Cash Book: View Income Expense ';
$this->loadViews("viewIndIncomeExpense", $this->global, $data , NULL);
}
}else{
$data['list'] = $this->cashbook_model->getIncomeExpenseList();
$this->global['pageTitle'] = 'Siddharth : Cash Book: Listing';
$this->loadViews("income_expense_list", $this->global, $data , NULL);
}
}
function addNewIncomeExpenseLoad()
{
@ -84,12 +133,109 @@ class cashbook extends BaseController
$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense ';
$this->loadViews("addnewIncomeExpense", $this->global, $data , NULL);
}
function bankfileview()
{
//$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes();
//print_r($data['dropdownvalues']);die();
$data['bankdetails']=$this->employeedetails_model->getBankDetails();
$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense ';
$this->loadViews("bankingfile", $this->global, $data , NULL);
}
function bankfileupload()
{
$document = null;
$fs = 0;
if(!empty($_FILES['userfile']['name']))
{
//echo "FILE AVAILABLE";
$config['file_name'] = $_FILES['userfile']['name'];
$config['upload_path'] = 'uploads/banking/';
$path = $config['upload_path'];
//$filename = $config['file_name'];
$document = $path.$filename;
//echo $document;
$fs = $this->uploadFile1();
$document = $path.$fs;
$inputFileName = $_FILES['userfile']['tmp_name'];
require_once APPPATH .'third_party/PHPExcel/IOFactory.php';
$objTpl = PHPExcel_IOFactory::load($inputFileName);
$sheet = $objTpl->getActiveSheet(0) ;//->toArray(null, NULL, True, True);
$highestRow = $sheet->getHighestRow();
$highestColumn = $sheet->getHighestColumn();
$bank = $this->input->post('bankbranchname');
$fileupload= array('Bankname'=>$bank,'document'=>$document);
$res = $this->cashbook_model->bankfile($fileupload);
for($x=2;$x<=$highestRow;$x++){
$date = date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP( $sheet->getCell('A'.$x)->getValue()));
//echo $val; die();
$valuedate = date('Y-m-d', PHPExcel_Shared_Date::ExcelToPHP( $sheet->getCell('B'.$x)->getValue()));
//PHPExcel_Shared_Date::ExcelToPHP($valuedate);
//echo date('Y-m-d',strtotime($valuedate));die;
$chqno = $sheet->getCell('C'.$x)->getValue();
$narration = $sheet->getCell('D'.$x)->getValue();
$cod =$sheet->getCell('E'.$x)->getValue();
$debit =$sheet->getCell('F'.$x)->getValue();
$credit=$sheet->getCell('G'.$x)->getValue();
$balance=$sheet->getCell('H'.$x)->getValue();
$filedataupload= array('reportdate'=>$date,'valuedate'=>$valuedate,'chequeNo'=>$chqno,'Narration'=>$narration,'Cod'=>$cod,'Debit'=>$debit,'Credit'=>$credit,'Balance'=>$balance,'Bankname'=>$bank,);
//print_r($filedataupload);
$res = $this->cashbook_model->bankfiledata($filedataupload);
}
if( $res == 1 ){
echo "<script>alert('Saved Successfully!');window.location.href='bankdata';</script>";
}
else
{
echo "<script>alert('Saved unsuccessfully!');window.location.href='bankdata';</script>";
}
}
}
function addIncomeExpense()
{
//echo "welcome";
//die();
{
$bankdate = $this->input->post('bankdate');
$bankid = $this->input->post('bankid');
$amount = $this->input->post('bankamount');
$amounttype = $this->input->post('type');
//echo $amounttype;
$totalbankamount = $this->input->post('totalbankamount');
//$totalbankcreditamount
//echo $totalbankamount;
$alreadypaid=$this->input->post('alreadypaid');
$directamount = $this->input->post('totalamount');
//echo $alreadypaid;
$debitamount=$this->input->post('debitamount');
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
$bankorcash=$this->input->post('borc');
$total=$directamount+$alreadypaid;
$ctotal=$directamount+$alreadycreditpaid;
echo $totalbankamount;
if($amounttype==0)
{
$type=RECEIPT;
$bankamounttype=CREDIT;
}
else
{
$type=PAYMENT;
$bankamounttype=DEBIT;
}
$alreadypaid=$this->input->post('alreadypaid');
//$total=$debitamount+$alreadypaid;
$accounttype = $this->input->post('myradio');
if($accounttype == 1)
{
@ -124,10 +270,12 @@ class cashbook extends BaseController
$sgst = $this->input->post('SGST');
$cgst = $this->input->post('CGST');
$igst = $this->input->post('IGST');
}
$totalamount = $this->input->post('totalamount');
$cashbookamount=$this->input->post('totalamount1');
$totalamount=$directamount+$cashbookamount;
$description = $this->input->post('description');
if(empty($description)){$description = 'NA';}
$document = null;
@ -146,15 +294,89 @@ class cashbook extends BaseController
$document = $path.$fs;
}
if($bankorcash==Bank)
{
$option=Bank;
}
else
{
$option=Cash;
}
$balance=$totalbankamount-$totalamount;
$created_by = $this->session->userdata('userId');
$addincomexpense = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome,'invoice_no'=>$invoiceno,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by);
$addincomexpense = array('type'=>$accounttype,'account_code'=>$accountcode,'date'=>$date,'towhom'=>$towhome,'invoice_no'=>$invoiceno,'merchant'=>$merchantname,'merchant_gst'=>$mergstno,'HSN'=>$hsn ,'value_before_gst'=>$beforegst,'sgst'=>$sgst,'cgst'=>$cgst,'igst'=>$igst,'total'=>$totalamount,'description'=>$description,'document'=>$document,'Created_By'=>$created_by,'cashtype'=>$option,'bankid'=>$bankid,'totalbankamount'=>$totalbankamount,'balance'=>$balance,'amounttype'=>$amounttype);
//print_r($addincomexpense);
//die();
if($balance=='0')
{
$stat='CLOSE';
}
else
{
$stat='OPEN';
}
$creditbalance=$totalbankamount-$totalamount;
//echo $creditbalance;
if($creditbalance=='0')
{
$statu='CLOSE';
}
else
{
$statu='OPEN';
}
//$clearbalance=$totalbankamount-
if($amounttype=='CREDIT')
{
$cashbookstatus1= array('cclearbalance'=>$ctotal,'cstatus'=>$statu);
//print_r($cashbookstatus1);
//die();
$res1 = $this->cashbook_model->cashcreditupdate($cashbookstatus1,$bankid);
}
else
{
$cashbookstatus = array('Clearbalance'=>$total,'Status'=>$stat);
//print_r($cashbookstatus);
$res = $this->cashbook_model->cashbankupdate($cashbookstatus,$bankid);
}
$res = $this->cashbook_model->saveIncomeExpense($addincomexpense);
if( $res == 1 ){
echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
}
}
public function cashpayment()
{
$bankdate = $this->input->post('bankdate');
$bankid = $this->input->post('bankid');
$amount = $this->input->post('bankamount');
$amounttype = $this->input->post('type');
$forstatus = $this->input->post('forstatus');
$alreadypaid=$this->input->post('alreadypaid');
$alreadycreditpaid=$this->input->post('alreadycreditpaid');
$debitamount=$this->input->post('debitamount');
$creditamount=$this->input->post('creditamount');
$total=$amount+$alreadypaid;
$option=Bank;
if($amounttype==0)
{
$type=RECEIPT;
$bankamounttype=CREDIT;
}
else
{
$type=PAYMENT;
$bankamounttype=DEBIT;
}
$bankcash1 = array('cdate'=>$bankdate,'mid'=>$bankid,'btype'=>$type,'amount'=>$alreadypaid,'boption'=>$option,'mappingamount'=>$forstatus,'totalamount'=>$amount,'amounttype'=>$bankamounttype,'alreadycreditpaid'=>$alreadycreditpaid);
$res1 = $this->cashbook_model->addcashbook($bankcash1);
}
function uploadFile()
{
@ -164,7 +386,7 @@ class cashbook extends BaseController
//$this->load->library('upload')
$pathinfo = pathinfo($_FILES['myfile']['name']);
$config['upload_path'] = 'uploads/cashbook/';
$config['allowed_types'] = 'png|jpg|jpeg';
$config['allowed_types'] ='png|jpg|jpeg|pdf';
$config['file_name'] = $_FILES['myfile']['name'];
// $config['overwrite'] = true;
@ -188,6 +410,39 @@ class cashbook extends BaseController
return 0;
}
}
function uploadFile1()
{
//echo "INSIDE UPLOAFD";
//$this->load->library('upload')
$pathinfo = pathinfo($_FILES['userfile']['name']);
$config['upload_path'] = 'uploads/banking/';
$config['allowed_types'] = 'png|jpg|jpeg|xlsx';
$config['file_name'] = $_FILES['userfile']['name'];
// $config['overwrite'] = true;
//Load upload library and initialize configuration
$this->load->library('upload',$config);
$this->upload->initialize($config);
if($this->upload->do_upload('userfile'))
{
$uploadData = $this->upload->data();
$uploadfilename = $uploadData['file_name'];
return $uploadfilename;
}
else
{
$error = array('error' => $this->upload->display_errors());
$uploadfilename = '';
print_r($error);
return 0;
}
}
function viewIE()
@ -204,6 +459,8 @@ class cashbook extends BaseController
public function index()
{
//$data['dropdownvalues1'] = $this->cashbook_model->getAccounTypes1();
$this->global['pageTitle'] = 'Siddharth : Cashbook Details';
$this->loadViews("cashbooklisting", $this->global, NULL , NULL);
@ -214,7 +471,8 @@ class cashbook extends BaseController
$this->load->model('cashbook_model');
$data['dropdownvalues1'] = $this->cashbook_model->getAccounTypes1();
//print_r($data['dropdownvalues1']);
$data['cashbook'] = $this->cashbook_model->Selectcash();
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
@ -236,6 +494,8 @@ class cashbook extends BaseController
$acc_type = $tv['AccountCodeType'];
$acc_code = $tv['AccountCode'];
$acc_name = $tv['AccountName'];
$acc_pname = $tv['ParentAccountName'];
$acc_categories = $tv['Categories'];
$acc_desc = $tv['Description'];
$acc_state = $tv['Status'];
if(strtoupper($acc_state) == 'YES')
@ -250,8 +510,8 @@ class cashbook extends BaseController
$dt = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$acc_createddt = $dt->format('Y-m-d H:i:s');
$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
//print_r($cashbookdatas);
$cashbookdatas = array('type'=>$acc_type,'code'=>$acc_code,'name'=>$acc_name,'accountname'=>$acc_pname,'categories'=>$acc_categories,'description'=>$acc_desc,'status'=>$acc_status,'created_on'=>$acc_createddt);
// print_r($cashbookdatas);
$result = $this->cashbook_model->Cashbook($cashbookdatas);
}
}
@ -379,6 +639,369 @@ class cashbook extends BaseController
//}
}
public function bankdata()
{
$this->global['pageTitle'] = 'Siddharth : bankstatement';
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$data['bankreport'] = $this->cashbook_model->bankstatement($fdate,$tdate);
$this->loadViews("bankstatement", $this->global, $data,NULL);
}
public function bankdebitdata()
{
if ($this->input->post('btn_submit'))
{
$SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
//$data['cash'] = $_GET['sid'];
//$data['bankid'] = $_GET['d'];
$data['bankdepit'] = $this->cashbook_model->debitbankstatemet($SupplierName,$fdate,$tdate);
}
$data['getsupplier'] = $this->cashbook_model->getsupplier();
$this->loadViews("bankdebit",$this->global,$data,NULL);
//die();
}
public function bankinvoice()
{
if ($this->input->post('btn_submit'))
{
$Customer = $this->input->post('Customer');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$data['bankinvoicedata'] = $this->cashbook_model->bankinvoice($Customer,$fdate,$tdate);
$data['supplier'] = $this->cashbook_model->getsupplier();
}
$data['getcustomer'] = $this->cashbook_model->getcustomer();
$this->loadViews("bankinvoice", $this->global,$data,NULL);
}
public function mappingpo()
{
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
$SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$bankid= $_GET['d'];
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
$data['mapping'] = $this->cashbook_model->debitpolist($bankid);
$data['supplier'] = $this->cashbook_model->getsupplier();
$this->loadViews("banksettlement", $this->global,$data,NULL);
}
public function mappinginvoice()
{
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
$SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$bankid= $_GET['d'];
$data['mappingcashbook']=$this->cashbook_model->mappingcash($SupplierName,$fdate,$tdate,$bankid);
$data['mappingiv'] = $this->cashbook_model->creditinvoicelist($SupplierName,$fdate,$tdate,$bankid);
$data['supplier'] = $this->cashbook_model->getsupplier();
$this->loadViews("bankinvoicesettlement", $this->global,$data,NULL);
}
public function mappingdebit()
{
$this->global['pageTitle'] = 'Siddharth : mappingdebit';
$SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$pono= $_GET['sid'];
$data['debitmapping'] = $this->cashbook_model->debitlistpo($SupplierName,$fdate,$tdate,$pono);
$this->loadViews("bankposettlement", $this->global,$data,NULL);
}
public function mappingcredit()
{
$this->global['pageTitle'] = 'Siddharth : mappingcredit';
$SupplierName = $this->input->post('SupplierName');
$fdate = $this->input->post('from_date');
$tdate = $this->input->post('to_date');
$invno= $_GET['sid'];
$data['creditmapping'] = $this->cashbook_model->creditlistinv($invno);
$this->loadViews("bankinvoisettle", $this->global,$data,NULL);
}
public function receipt()
{
// die();
$check = $this->input->post('check');
$rw = $this->input->post('rw');
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
$date = $this->input->post('date');
$pono = $this->input->post('pono');
$sname = $this->input->post('sname');
$tot = $this->input->post('tot');
$rowcount = $this->input->post('rc');
$totalpaidamount= $this->input->post('tpv');
$bankdebitamountamount= $this->input->post('bda');
$bankid =$this->input->post('bi');
$alreadypaid = 0;
//echo $earlypaid;
$alreadypaid = $this->cashbook_model->getalreadypaid($bankid);
if(empty($alreadypaid))
{
$aPay=0;
}
else
{
foreach($alreadypaid as $ap)
{
$aPay = $ap->Clearbalance;
}
}
if($check == 1)
{
$clearedblnce=($totalpaidamount+$aPay);
$balancetocleared=($bankdebitamountamount-$totalpaidamount);
$check =1;
}
//echo $balancetocleared;
//die();
if($balancetocleared>0)
{
$status='OPEN';
}
else
{
$status='CLOSE';
}
$bankdata = array('Clearbalance'=>$clearedblnce,'Balancetocleared'=>$balancetocleared,'Status'=>$status);
if($check == 1)
{
$res = $this->cashbook_model->bankupdate($bankdata,$bankid);
}
$earlypaid = 0;
//echo $earlypaid;
$earlypaid = $this->cashbook_model->getearlyamount($pono);
if(empty($earlypaid))
{
$ePay=0;
}
else
{
foreach($earlypaid as $ep)
{
$ePay = $ep->Amountpaid;
}
}
$ip=$this->input->post('aa');
$balancetopay=($tot-($ip+$ePay));
$amtpaid= ($ip+$ePay);
$podata1 = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$ip,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
$podata = array('Podate'=>$date,'PONO'=>$pono,'Suppliername'=>$sname,'Totalpoamount'=>$tot,'Amountpaid'=>$amtpaid,'Balancetopay'=>$balancetopay,'mid'=>$bankid);
//print_r($podata);
$result3 = $this->cashbook_model->poupdate($pono);
//echo count($result3);
$resultn = $this->cashbook_model->mappingpo($podata1);
if(count($result3)<=0)
{
//echo "insert";
$result = $this->cashbook_model->podata($podata);
}
else
{
//echo "update";
$result3 = $this->cashbook_model->poupdate1($podata,$pono);
}
if($rw == $rowcount)
{
echo "Saved Successfully!";
}
if($balancetopay==0)
{
$status=AMOUNT_PAID;
}
else
{
$status=PARTIALLY_PAID;
}
$pomaster= array('Paymentstatus'=>$status);
$result1 = $this->cashbook_model->poamountstatus($pomaster,$pono);
//$this->loadViews("bankstatement", $this->global,$data, NULL);
}
public function invoiceamount1()
{
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
$check = $this->input->post('check');
$rw = $this->input->post('rw');
$date = $this->input->post('date');
$invid = $this->input->post('invid');
$cname = $this->input->post('cname');
$invamount = $this->input->post('invamount');
$invoicereceived = $this->input->post('ir');
$rowcount = $this->input->post('rc');
$totalpaidamount= $this->input->post('tpv');
$bankcreditamount= $this->input->post('bda');
$invoicetext=$this->input->post('invrec');
$bankid =$this->input->post('bi');
$alreadyreceived = 0;
//echo $earlypaid;
$alreadyreceived = $this->cashbook_model->getalreadyreceived($bankid);
if(empty($alreadyreceived))
{
$arec=0;
}
else
{
foreach($alreadyreceived as $ar)
{
$arec = $ar->cclearbalance;
}
}
if($check == 1)
{
//echo $arec;
$clearedblnce=($totalpaidamount+$arec);
$balancetoreceived =($bankcreditamount-$totalpaidamount);
$check =1;
}
//echo $balancetocleared;
//die();
if($balancetoreceived>0)
{
$status='OPEN';
}
else
{
$status='CLOSE';
}
$bankdata = array('cclearbalance'=>$clearedblnce,'cbalancetocleared'=>$balancetoreceived,'cstatus'=>$status);
if($check == 1)
{
$res = $this->cashbook_model->bankcreditupdate($bankdata,$bankid);
}
$earlyreceived = 0;
//echo $earlypaid;
$earlyreceived = $this->cashbook_model->getearlyamountcredit($invid);
if(empty($earlyreceived))
{
$eRec=0;
}
else
{
foreach($earlyreceived as $ec)
{
$eRec = $ec->amountreceived;
}
}
//echo $eRec;
$ip=$this->input->post('ar');
$balancetoreceived1=($invamount-($ip+$eRec));
$amtpaid= ($ip+$eRec);
$updateamount=($totalpaidamount+$eRec);
$invoicedata1 = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$totalpaidamount,'bankid'=>$bankid);
$invoicedata = array('indate'=>$date,'invoiceno'=>$invid,'customername'=>$cname,'totinvoiceamount'=>$invamount,'balancetoreceived'=>$balancetoreceived1,'amountreceived'=>$amtpaid,'bankid'=>$bankid);
// //print_r ($invoicedata);
// //die();
$result3 = $this->cashbook_model->invoiceupdate($invid);
$resultn = $this->cashbook_model->mappinginvoice($invoicedata);
if(count($result3)<=0)
{
//echo "insert";
$result = $this->cashbook_model->invoicedata($invoicedata);
}
else
{
//echo "update";
$result3 = $this->cashbook_model->invoiceupdate1($invoicedata,$invid);
}
echo "<script>alert('Saved Successfully!');window.location.href='Bankingstatement';</script>";
}
public function amountpaid()
{
$this->global['pageTitle'] = 'Siddharth : amountpaid';
$data['amountpaid'] = $this->cashbook_model->paided();
$this->loadViews("bankamountpaid", $this->global,$data, NULL);
}
public function amountreceived()
{
// $this->load->model('cashbook_model');
$this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
$data['amountreceived'] = $this->cashbook_model->received();
//print_r( $data['amountpaid']);
//die();
$this->loadViews("bankamountreceived", $this->global,$data, NULL);
}
public function cashbanking()
{
$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes();
$data['cashbanking'] = $this->cashbook_model->newcashbook();
$this->global['pageTitle'] ='Siddharth :bankcashbook';
$this->loadViews("bankcashnew", $this->global,$data,NULL);
}
public function convertNumber($amt){

View File

@ -53,3 +53,118 @@ ERROR - 2018-03-19 07:26:07 --> Severity: Notice --> Undefined variable: Date C
ERROR - 2018-03-19 07:26:57 --> Severity: Notice --> Undefined variable: MaxPoDate C:\xampp\htdocs\SIA_bitbucket\SIT.19.3\siddharth_application\application\views\editaction_report.php 52
ERROR - 2018-03-19 07:26:57 --> Severity: Notice --> Undefined variable: CurrentDate C:\xampp\htdocs\SIA_bitbucket\SIT.19.3\siddharth_application\application\views\editaction_report.php 54
ERROR - 2018-03-19 07:26:57 --> Severity: Notice --> Undefined variable: Date C:\xampp\htdocs\SIA_bitbucket\SIT.19.3\siddharth_application\application\views\editaction_report.php 123
ERROR - 2018-03-19 15:24:46 --> Severity: Notice --> Undefined variable: filename C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 157
ERROR - 2018-03-19 15:24:46 --> The upload path does not appear to be valid.
ERROR - 2018-03-19 15:24:53 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:24:53 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:24:53 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:24:53 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:24:53 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:24:53 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:25:05 --> Severity: Notice --> Undefined variable: cashbook C:\xampp\htdocs\siddharth_application\application\views\cashbooklisting.php 243
ERROR - 2018-03-19 15:25:19 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:25:19 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:25:19 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:25:19 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:25:19 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:25:19 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:25:19 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:25:27 --> Severity: Notice --> Use of undefined constant ST044 - assumed 'ST044' C:\xampp\htdocs\siddharth_application\application\models\cashbook_model.php 169
ERROR - 2018-03-19 15:25:27 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:25:27 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:25:27 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:25:27 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:25:27 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:25:27 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:25:27 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:26:17 --> Severity: Notice --> Use of undefined constant ST044 - assumed 'ST044' C:\xampp\htdocs\siddharth_application\application\models\cashbook_model.php 169
ERROR - 2018-03-19 15:26:18 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:26:18 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:26:18 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:26:18 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:26:18 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:26:18 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:26:18 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:28:11 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:28:11 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:28:11 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:28:11 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:28:11 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:28:11 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:28:11 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:28:16 --> Severity: Notice --> Use of undefined constant ST044 - assumed 'ST044' C:\xampp\htdocs\siddharth_application\application\models\cashbook_model.php 169
ERROR - 2018-03-19 15:28:17 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:28:17 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:28:17 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:28:17 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:28:17 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:28:17 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:28:17 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:28:30 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 784
ERROR - 2018-03-19 15:28:30 --> Severity: Notice --> Undefined variable: clearedblnce C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:28:30 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:28:31 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-19 15:28:31 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-19 15:28:32 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:28:32 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:28:32 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:28:32 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:28:32 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:28:32 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:28:34 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 784
ERROR - 2018-03-19 15:28:34 --> Severity: Notice --> Undefined variable: clearedblnce C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:28:34 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:28:35 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-19 15:28:35 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-19 15:28:40 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:28:40 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:29:44 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:29:44 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:29:44 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:29:44 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:29:44 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:29:44 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:29:54 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:29:54 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:29:54 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:29:54 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:29:54 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:29:54 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:29:54 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:29:59 --> Severity: Notice --> Use of undefined constant ST044 - assumed 'ST044' C:\xampp\htdocs\siddharth_application\application\models\cashbook_model.php 169
ERROR - 2018-03-19 15:30:00 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-19 15:30:00 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:30:00 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-19 15:30:00 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:30:00 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-19 15:30:00 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:30:00 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-19 15:30:14 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 784
ERROR - 2018-03-19 15:30:14 --> Severity: Notice --> Undefined variable: clearedblnce C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:30:14 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-19 15:30:15 --> Severity: Notice --> Use of undefined constant AMOUNT_PAID - assumed 'AMOUNT_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 846
ERROR - 2018-03-19 15:30:15 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-19 15:30:16 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:30:16 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-19 15:30:16 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:30:16 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-19 15:30:16 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:30:16 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-19 15:30:24 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-19 15:30:24 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161

View File

@ -0,0 +1,60 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
ERROR - 2018-03-20 06:16:12 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:16:12 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:16:12 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:16:12 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:16:12 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:16:12 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:52:37 --> Severity: Notice --> Undefined variable: filename C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 157
ERROR - 2018-03-20 06:52:37 --> The upload path does not appear to be valid.
ERROR - 2018-03-20 06:52:44 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:52:44 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:52:44 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:52:44 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:52:44 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:52:44 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:52:54 --> Severity: Notice --> Undefined variable: cashbook C:\xampp\htdocs\siddharth_application\application\views\cashbooklisting.php 243
ERROR - 2018-03-20 06:53:05 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:53:05 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:53:05 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:53:05 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:53:05 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:53:05 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:53:12 --> Severity: Notice --> Undefined variable: cashbook C:\xampp\htdocs\siddharth_application\application\views\cashbooklisting.php 243
ERROR - 2018-03-20 06:53:41 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-20 06:53:41 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-20 06:53:41 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-20 06:53:41 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-20 06:53:41 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-20 06:53:41 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-20 06:53:41 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-20 06:53:48 --> Severity: Notice --> Use of undefined constant ST044 - assumed 'ST044' C:\xampp\htdocs\siddharth_application\application\models\cashbook_model.php 169
ERROR - 2018-03-20 06:53:48 --> Severity: Notice --> Undefined variable: pageTitle C:\xampp\htdocs\siddharth_application\application\views\includes\header.php 5
ERROR - 2018-03-20 06:53:48 --> Severity: Notice --> Undefined variable: cash C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-20 06:53:48 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 7
ERROR - 2018-03-20 06:53:48 --> Severity: Notice --> Undefined variable: bankid C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-20 06:53:48 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 13
ERROR - 2018-03-20 06:53:48 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-20 06:53:48 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankdebit.php 28
ERROR - 2018-03-20 06:54:04 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 784
ERROR - 2018-03-20 06:54:04 --> Severity: Notice --> Undefined variable: clearedblnce C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-20 06:54:04 --> Severity: Notice --> Undefined variable: balancetocleared C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 793
ERROR - 2018-03-20 06:54:05 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-20 06:54:05 --> Severity: Notice --> Use of undefined constant PARTIALLY_PAID - assumed 'PARTIALLY_PAID' C:\xampp\htdocs\siddharth_application\application\controllers\cashbook.php 851
ERROR - 2018-03-20 06:54:07 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:54:07 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 15
ERROR - 2018-03-20 06:54:07 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:54:07 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 109
ERROR - 2018-03-20 06:54:07 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:54:07 --> Severity: Notice --> Undefined variable: i C:\xampp\htdocs\siddharth_application\application\views\bankstatement.php 149
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Undefined variable: financialyear C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-20 06:54:12 --> Severity: Warning --> Invalid argument supplied for foreach() C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 19
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Undefined variable: t C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161
ERROR - 2018-03-20 06:54:12 --> Severity: Notice --> Trying to get property of non-object C:\xampp\htdocs\siddharth_application\application\views\banksettlement.php 161

View File

@ -9,6 +9,20 @@ class cashbook_model extends CI_Model
$r = $this->db->get('t_accountcode');
return $r->result();
}
function getAccountpay()
{
$this->db->where('type',PAYMENT);
$r = $this->db->get('t_accountcode');
return $r->result();
}
function getAccounTypes1()
{
$this->db->select('name');
$r = $this->db->get('t_accountcode');
return $r->result();
}
function saveIncomeExpense($data)
@ -17,18 +31,26 @@ class cashbook_model extends CI_Model
$r = $this->db->affected_rows();
return $r;
}
function addcashbook($bankcash1)
{
$this->db->insert('T_Bankmappingcashbook',$bankcash1);
$r = $this->db->affected_rows();
return $r;
}
function getIncomeExpenseList($i="")
{
// echo $i;
$this->db->select('t_accountcode.name,T_Employee_Details.FirstName,T_Employee_Details.LastName,t_income_expense.*');
$this->db->from('t_income_expense');
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId');
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID');
if(!empty($i))
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code','left');
$this->db->join('tbl_users','t_income_expense.Created_By=tbl_users.userId','left');
$this->db->join('T_Employee_Details','tbl_users.EmpID=T_Employee_Details.EmpID','left');
$this->db->order_by("date","desc");
if(!empty($i))
{
$this->db->where('t_income_expense.id',$i);
$this->db->where('t_income_expense.id',$i);
}
$r = $this->db->get();
return $r->result();
@ -47,6 +69,7 @@ class cashbook_model extends CI_Model
$this->db->select('t_accountcode.name,t_income_expense.*');
$this->db->from('t_income_expense');
$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
$this->db->order_by("date", "desc");
//$this->db->where('t_income_expense.id')
$r = $this->db->get();
return $r->result();
@ -94,6 +117,396 @@ class cashbook_model extends CI_Model
return $r;
}
function bankfile($FileDetails)
{
$this->db->insert('T_bankingfile',$FileDetails);
$r = $this->db->affected_rows();
return $r;
}
function bankfiledata($filedataupload)
{
$this->db->insert('T_bankreport', $filedataupload);
$r = $this->db->affected_rows();
//print_r($this->db->last_query());
return $r;
}
function bankstatement($fdate,$tdate){
$sql="SELECT *,date_format(reportdate,'%d-%m-%Y')as date,tie.total,date_format(valuedate,'%d-%m-%Y')as valuedate from T_bankreport as br left join t_income_expense as tie on tie.bankid=br.ID where reportdate !=0";
if ($fdate and $tdate != ''){
$fdate= date("Y-m-d",strtotime($fdate));
$tdate=date("Y-m-d",strtotime($tdate));
$sql.="and date(reportdate) >= '".$fdate."'
and date(reportdate) <= '".$tdate."'";
}
$query = $this->db->query($sql);
return $query->result();
}
function debitbankstatemet($SupplierName,$fdate,$tdate)
{
$status='ST057';
//echo $tdate;
//die();
$this->db->distinct();
$this->db->select('POM.PONO,POM.Paymentstatus,supp.SupplierName,
POM.TotalOrderValue,POM.ServiceDescription,BR.Balancetopay,BR.Amountpaid,
POM.PODate,POM.POType,POM.ReleasedBy,POM.IsQualityChkReqired,POM.POType,POM.CapitalRange,POM.Status,
PUADV.AdvanceAmount');
$this->db->from ('T_PurchaseOrder_Master POM');
$this->db->join('T_SupplierDetailsN supp','supp.SupplierID = POM.SupplierID');
$this->db->join('T_PurchaseOrder_AdvanceRequest PUADV','POM.PONO=PUADV.PONO','left');
$this->db->join ('T_Bankporeport BR','BR.PONO = POM.PONO','left');
$this->db->where('POM.Status',ST044);
$this->db->where('supp.SupplierName',$SupplierName);
$this->db->or_where('POM.PODate BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
$this->db->group_by('POM.PONO');
$query = $this->db->get();
return $query->result();
}
function bankinvoice($Customer,$fdate,$tdate)
{
$this->db->distinct();
$this->db->select('iva.invoice_id,iva.invoice_total,iv.invoice_date_created,iva.invoice_paid,ic.client_name,BI.balancetoreceived,BI.amountreceived');
$this->db->from ('ip_invoice_amounts iva');
$this->db->join ('ip_invoices iv','iv.invoice_id = iva.invoice_id','left');
$this->db->join ('ip_clients ic','ic.client_id = iv.client_id','left');
$this->db->join ('T_Bankinvoicereport BI','BI.invoiceno = iva.invoice_id','left');
$this->db->where('ic.client_name',$Customer);
$this->db->or_where('iv.invoice_date_created BETWEEN "'. date('Y-m-d', strtotime($fdate)). '" and "'. date('Y-m-d', strtotime($tdate)).'"');
$this->db->group_by('iva.invoice_id');
//$this->db->where('inc.type','PAYMENT');
$query = $this->db->get();
return $query->result();
}
function receiptdata()
{
$this->db->distinct();
$this->db->select('inc.type,inc.date,inc.account_code,inc.towhom,inc.total');
$this->db->from ('t_income_expense inc');
$this->db->where('inc.type','RECEIPT');
$query = $this->db->get();
return $query->result();
}
function paymentdata()
{
$this->db->distinct();
$this->db->select('inc.type,inc.date,inc.account_code,inc.towhom,inc.total');
$this->db->from ('t_income_expense inc');
//$this->db->group_by('inc.account_code');
//$this->db->where('inc.type','PAYMENT');
$query = $this->db->get();
return $query->result();
}
function debitpolist($bankid)
{
$this->db->select('mid,Podate,PONO,Suppliername,Totalpoamount,
Balancetopay,Amountpaid');
$this->db->from ('T_Bankporeport');
$this->db->where('mid',$bankid);
//$this->db->group_by('PONO');
$query = $this->db->get();
return $query->result();
}
function creditinvoicelist($SupplierName,$fdate,$tdate,$bankid)
{
$this->db->select('indate,invoiceno,customername,totinvoiceamount,
balancetoreceived,amountreceived');
$this->db->from ('T_Bankinvoicereport');
$this->db->where('bankid',$bankid);
$this->db->group_by('invoiceno');
$query = $this->db->get();
return $query->result();
}
function mappingcash($SupplierName,$fdate,$tdate,$bankid)
{
$this->db->select('cdate,mid,btype,amount,boption,ie.total,ie.account_code');
$this->db->from ('T_Bankmappingcashbook bmc');
$this->db->join ('t_income_expense ie','ie.bankid = bmc.mid','left');
$this->db->where('mid',$bankid);
$this->db->group_by('mid');
$query = $this->db->get();
return $query->result();
}
function newcashbook()
{
$this->db->select('cdate,mid,btype,amount,boption,mappingamount,totalamount,amounttype,alreadycreditpaid');
$this->db->from ('T_Bankmappingcashbook');
//$this->db->where('mid',$bankid);
//$this->db->group_by('mid');
$query = $this->db->get();
return $query->result();
}
function debitlistpo($SupplierName,$fdate,$tdate,$pono)
{
$this->db->select('bmp.mid,bmp.PONO,bmp.Amountpaid,br.Narration');
$this->db->from ('T_Bankmappingpo as bmp');
$this->db->join('T_bankreport br','br.ID = bmp.mid');
$this->db->where('PONO',$pono);
// $this->db->group_by('PONO');
$query = $this->db->get();
return $query->result();
}
function creditlistinv($invno)
{
$this->db->select('bmp.bankid,bmp.invoiceno,bmp.amountreceived,br.Narration');
$this->db->from ('T_Bankmappingiv as bmp');
$this->db->join('T_bankreport br','br.ID = bmp.bankid');
$this->db->where('invoiceno',$invno);
// $this->db->group_by('PONO');
$query = $this->db->get();
return $query->result();
}
function getsupplier()
{
$this->db->select('SupplierName');
$this->db->from('T_SupplierDetailsN');
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
//$this->db->where('t_income_expense.id')
$r = $this->db->get();
return $r->result();
}
function getcustomer()
{
$this->db->select('client_name');
$this->db->from('ip_clients');
//$this->db->join('t_accountcode','t_income_expense.account_code=t_accountcode.code');
//$this->db->where('t_income_expense.id')
$r = $this->db->get();
return $r->result();
}
function invoicedata($invoicedata)
{
$this->db->insert('T_Bankinvoicereport',$invoicedata);
// $this->db->where('PONO',$pono);
$r = $this->db->affected_rows();
return $r;
}
function podata($podata)
{
$this->db->insert('T_Bankporeport',$podata);
// $this->db->where('PONO',$pono);
$r = $this->db->affected_rows();
return $r;
}
function invicedata($invoicedata)
{
$this->db->insert('T_Bankinvoicereport',$invoicedata);
$r = $this->db->affected_rows();
return $r;
}
function mappingpo($podata)
{
$this->db->insert('T_Bankmappingpo',$podata);
// $this->db->where('PONO',$pono);
$r = $this->db->affected_rows();
return $r;
}
function mappinginvoice($invoicedata)
{
$this->db->insert('T_Bankmappingiv',$invoicedata);
// $this->db->where('PONO',$pono);
$r = $this->db->affected_rows();
return $r;
}
function mappingcashbook($podata)
{
$this->db->insert('T_Bankmappingpo',$podata);
// $this->db->where('PONO',$pono);
$r = $this->db->affected_rows();
return $r;
}
public function poupdate($pono)
{
$this->db->select('PONO');
$this->db->from('T_Bankporeport');
$this->db->where('PONO ',$pono);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function invoiceupdate($invid)
{
$this->db->select('invoiceno');
$this->db->from('T_Bankinvoicereport');
$this->db->where('invoiceno',$invid);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function bankid($pono)
{
$this->db->select('PONO');
$this->db->from('T_Bankporeport');
$this->db->where('PONO ',$pono);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function cashbankupdate($cashbookstatus,$bankid)
{
$this->db->where('ID',$bankid);
$this->db->update('T_bankreport',$cashbookstatus);
return TRUE;
}
function cashcreditupdate($cashbookstatus1,$bankid)
{
$this->db->where('ID',$bankid);
$this->db->update('T_bankreport',$cashbookstatus1);
return TRUE;
}
public function bankupdate($bankdata,$bankid)
{
$this->db->where('ID ',$bankid);
$this->db->update('T_bankreport',$bankdata);
return TRUE;
}
public function bankcreditupdate($bankcreditdata,$bankid)
{
$this->db->where('ID ',$bankid);
$this->db->update('T_bankreport',$bankcreditdata);
// print_r( $this->db->last_query());
return TRUE;
}
public function getearlyamount($pono)
{
$this->db->select('Amountpaid');
$this->db->from('T_Bankporeport');
$this->db->where('PONO ',$pono);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function getearlyamountcredit($invid)
{
$this->db->select('amountreceived');
$this->db->from('T_Bankinvoicereport');
$this->db->where('invoiceno ',$invid);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function getalreadypaid($bankid)
{
$this->db->select('Clearbalance');
$this->db->from('T_bankreport');
$this->db->where('ID ',$bankid);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function getalreadyreceived($bankid)
{
$this->db->select('cclearbalance');
$this->db->from('T_bankreport');
$this->db->where('ID ',$bankid);
$query = $this->db->get();
// print_r( $this->db->last_query());
return $query->result();
}
public function poupdate1($podata,$pono)
{
$this->db->where('PONO', $pono);
$this->db->update('T_Bankporeport',$podata);
return TRUE;
}
public function invoiceupdate1($invoicedata,$invid)
{
//print_r($invoicedata);
//print_r($invid);
$this->db->where('invoiceno',$invid);
$this->db->update('T_Bankinvoicereport',$invoicedata);
return TRUE;
}
function paided()
{
$this->db->select('*');
$this->db->from('T_Bankporeport');
$query = $this->db->get();
$result = $query->result();
return $result;
}
function received()
{
$this->db->select('*');
$this->db->from('T_Bankinvoicereport');
$query = $this->db->get();
$result = $query->result();
return $result;
}
function poamountstatus($pomaster,$pono)
{
$this->db->where('PONO', $pono);
$this->db->update('T_PurchaseOrder_Master',$pomaster);
$r = $this->db->affected_rows();
return $r;
}
function poamountstatus1($pomaster1,$pono)
{
$this->db->where('PONO', $pono);
$this->db->update('T_PurchaseOrder_Master',$pomaster1);
$r = $this->db->affected_rows();
return $r;
}
function Cashbook($cashbookdatas)
{

View File

@ -0,0 +1,268 @@
<?php
if(!empty($amountpaid))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>PONO</th>
<th>Supplier Name</th>
<th>Total PO Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Balance To Pay<?php echo '('.$inrsymbol.')' ?></th>
<th>Amount Paid<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($amountpaid)){
foreach($amountpaid as $ap)
{
?>
<tr>
<td align="left" id="date"><span><?php echo $ap->Podate?></span></td>
<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn"><span><?php echo $ap->Suppliername?></span></td>
<td align="left" id="tov"><span><?php echo $ap->Totalpoamount?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Balancetopay?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Amountpaid?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,268 @@
<?php
if(!empty($amountpaid))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Credit Amount Received Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="Customer" name="Customer">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>INVOICENO</th>
<th>Supplier Name</th>
<th>Total Invoice Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Balance To Received<?php echo '('.$inrsymbol.')' ?></th>
<th>Amount Received<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($amountreceived)){
foreach($amountreceived as $ap)
{
?>
<tr>
<td align="left" id="date"><span><?php echo $ap->indate?></span></td>
<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $ap->invoiceno;?>"><span><?php echo $ap->invoiceno?></span></a></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn"><span><?php echo $ap->customername?></span></td>
<td align="left" id="tov"><span><?php echo $ap->totinvoiceamount?></span></td>
<td align="left" id="aa"><span><?php echo $ap->balancetoreceived?></span></td>
<td align="left" id="aa"><span><?php echo $ap->amountreceived?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,711 @@
<?php
foreach($cash as $c)
{
}
foreach($bankid as $i)
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info" id="content">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cahbook Payment Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="customer">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-1" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
<div class="col-md-2" style="margin-top:24px;">
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a>
</div>
</div>
<div>
<div class="col-md-3">
<label for="from_date">
<?php echo 'Bank Debit Amount'; ?>
</label>
<div class="input-group">
<input type="text" id="debitamount" value="<?php echo $cash; ?>" readonly>
</div>
<div class="input-group">
<input type="text" id="bankid" value="<?php echo $bankid; ?>" readonly>
</div>
</div>
</div>
</form>
<br>
<br>
<input type="text" name="Rowid" id="Rowid">
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Select</th>
<th>Type</th>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Code</th>
<th>To Whom</th>
<th>Total<?php echo '('.$inrsymbol.')' ?></th>
<th>Balance</th>
<th>Amountpaid</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($receiptdata)){
//print_r($bankdepit);
//die();
foreach($receiptdata as $t)
{
$status=$t->Paymentstatus;
$balancetopay=$t->Balancetopay;
//print_r($$status);
if($status !='ST057')
{
?>
<tr>
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->type?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->date?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->account_code?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->towhom?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->total?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->total?></span></td>
<td data-name="sel"><input type="text" onkeypress="return isNumberKey(event)" onchange="GetAmount(<?php echo $i ?>)" id="invoicepaymet<?php echo $i ?>"></td>
</tr>
<?php
$i++;
}
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="amount"><strong>
<!-- 4545 -->
<input type="text" id="addvalue" name="addvalue">
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<div class="row">
<div class="col-md-12" id="date1"></div>
<div class="col-md-12" id="pono1"></div>
<div class="col-md-12" id="sn1"></div>
<div class="col-md-12" id="aa1"></div>
<!--<div class="col-md-12" id="aa2"></div>-->
<div class="col-md-12" id="tov1"></div>
<div class="col-md-12" id="qw1"></div>
<input type="hidden" name="Recid" id="Recid" value="">
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
//alert($data['cash']);
// $('#debitamount').val('10');
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
var tot=0;
var tot1=0;
var intex=1;
var row=0;
var j=1;
var tott=0;
function GetPayment(i)
{
var x = document.getElementById('checkboxcheckbox'+i).checked;
//alert(x);
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
temp=intex;
if(x==true)
{
//alert(x);
row= parseInt(row)+1;
//alert(row);
$('#Rowid').val(row);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
$('#invoicepaymet'+i).val(invoicepayment);
var RowCount= $('#Rowid').val();
//alert(RowCount);
//alert('advance' + advanceamount);
$('<input>').attr({
type:'hidden',
name:'date1'+j,
id:'date1'+j,
value:date
}).appendTo('#date1');
$('<input>').attr({
type:'hidden',
name:'pono1'+j,
id:'pono1'+j,
value:pono
}).appendTo('#pono1');
$('<input>').attr({
type:'hidden',
name:'sn1'+j,
id:'sn1'+j,
value:supname
}).appendTo('#sn1');
$('<input>').attr({
type:'text',
name:'qw1'+j,
id:'qw1'+j,
value:invoicepayment
}).appendTo('#qw1');
// $('<input>').attr({
// type:'hidden',
// name:'aa2'+j,
// id:'aa2'+j,
// value:advanceamount
// }).appendTo('#aa2');
$('<input>').attr({
type:'hidden',
name:'tov1'+j,
id:'tov1'+j,
value:totalordervalue
}).appendTo('#tov1');
//j= parseInt(j)+1;
if(negative==1)
{
// alert()
for(o=1;o<j;o++)
{
$('#qw1'+o).val('')
}
}
intex = parseInt(intex)+1;
j=parseInt(j)+1;
var to=0;
for(t=1;t<j;t++)
{
//var tt= $('#inv_amount'+t).val();
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
//alert(tt)
to = parseFloat(to) + parseFloat (tt);
//alert(to);
$('#addvalue').val(parseFloat(to).toFixed(2));
}
}
else
{
//alert(i)
var rr= $('#Rowid').val();
var ro= parseInt(rr)-1;
var Payment= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
// alert(Payment)
//var Inid= parseFloat( $('#pono'+i).text() == '' ? '0.00' : $('#pono'+i).text());
var Inid = document.getElementById ('pono'+i ).innerText
//alert(Inid)
for(s=1;s<=j;s++)
{
var ch= $('#pono1'+s).val();
//alert(ch);
if(Inid==ch)
{
var w=s;
delamount= $('#qw1'+w).val();
//alert(delamount)
break;
}
}
// //alert(w);
var tote= $('#addvalue').val();
//alert(tote)
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
//alert(afterdeltot)
tot=parseFloat(tot)-parseFloat(Payment);
$('#invoicepaymet'+i).val('');
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
//alert(ro);
$('#Rowid').val(ro);
$('#invoicepaymet'+i).val('');
$('#date1'+i).val('');
$('#pono1'+i).val('');
$('#sn1'+i).val('');
$('#tov1'+i).val('');
$('#qw1'+i).val('');
//$('#aa'+i).val('');
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
// Added to allow decimal, period, or delete
if (charCode == 110 || charCode == 190 || charCode == 46)
return true;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function GetAmount(i)
{
//alert("hai");
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
//alert(amount);
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
var x = document.getElementById('checkboxcheckbox'+i).checked;
if(x==true && negative == 0)
{
//alert(x);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
//alert(pono);
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var balancetopay=document.getElementById ( "qw"+i ).innerText;
for(k=1;k<=j-1;k++)
{
//alert(k)
var idcheck=$('#pono1'+k).val();
// alert(idcheck)
if(pono==idcheck)
{
var cid=k;
//alert(cid+'if');
//die();
break;
}
}
if(amount<=totalordervalue)
{
$('#date1').val(date);
$('#pono1'+cid).val(pono);
$('#sn1'+cid).val(supname);
$('#tov1'+cid).val(totalordervalue);
$('#qw1'+cid).val(amount);
var totalvalue=$('#addvalue').val();
var bid=$('#bankid').val();
//$('#inv_total'+cid).val(invoicepayment);
}
else
{
alert('You are exceeding the payment get!!');
$('#invoicepaymet'+i).val(amount)
location.reload();
}
var tot11=0
for(l=1;l<j;l++)
{
//var Payingamount= $('#inv_amount'+l).val();
var Payingamount=parseFloat( $('#qw1'+l).val() == '' ? '0.00' : $('#qw1'+l).val());
//alert(Payingamount)
tot11= parseFloat(tot11)+parseFloat(Payingamount)
//alert(tot11)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
}
}
}
function Save()
{
//alert('j'+j);
var totalvalue=$('#addvalue').val();
var rowCount= $('#Rowid').val();
//alert(rowCount);
//die();
var check= 0;
var rw= 0;
for(i=1;i<=rowCount;i++)
{
//alert(i);
rw= parseFloat(rw)+1;
check = parseFloat(check)+1;
var bankdebitamount=$('#debitamount').val();
alert(totalvalue);
alert(bankdebitamount);
var bid=$('#bankid').val();
//alert(bid);
//die();
var date =$('#date1'+i).val();
var pono =$('#pono1'+i).val();
var suppliername=$('#sn1'+i).val();
var totalordervalue=$('#tov1'+i).val();
var amountpaid=$('#qw1'+i).val();
var invoicepaymet=$('#invoicepaymet'+i).text();
var payment = parseFloat(amountpaid);
//alert(rowCount);
if(payment<=totalordervalue)
{
if(totalvalue<=bankdebitamount)
{
$.ajax(
{
data:{date:date,pono:pono,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
type:"POST",
url:"<?php echo base_url() ?>cashbook/receipt",
success:function(data)
{
if(data)
{
alert(data);
location.reload();
}
}
});
}
else{
alert('You are payment exceeding');
location.reload();
}
}
else{
alert('You are payment exceedingsave');
location.reload();
}
}
// alert('i'+i);
// if(rowCount<=i)
// {
// if(data)
// {
// alert(data);
// location.reload();
// }
// else
// {
//alert("Error");
// }
// }
// }
// });
// alert(i);
// }
// else{
// alert('You are payment exceeding');
// location.reload();
// }
// j=j+1;
}
</script>
<script>
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

View File

@ -0,0 +1,483 @@
<?php //print_r($dropdownvalues);?>
<script>
$(function() {
var t = [];
var ex = [];
var inc = [];
t= <?php echo json_encode($dropdownvalues)?>;
$.each(t,function(i,item){
if(item.type == 'RECEIPT')
{
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
}
});
$('#gst').click(function(){
$('#gstarea').toggle();
});
$('#towhom').text('Received From:');
$("#Date").datepicker({
//minDate : new Date(year-SIAStartYear,1,1),
maxDate :'now',
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
});
});
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#slip')
.attr('src', e.target.result)
.width(100)
.height(100);
//alert(e.target.result);
};
reader.readAsDataURL(input.files[0]);
$('#slip').val(input.files[0]['name']);
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
return true;
}
function loadAccountType(id)
{
//alert('called'+id);
var id=id;
var t = [];
var ex = [];
var inc = [];
t= <?php echo json_encode($dropdownvalues)?>;
if(id == 'myradio1')
{
// alert('INCOME clicked');
$('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
$.each(t,function(i,item){
if(item.type == 'RECEIPT')
{
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
}
});
}
if(id == 'myradio2')
{
//alert('expense clicked');
$('#accode').find('option').remove().end().append('<option value="-1">Select Account Name</option>').val('Select Account Code');
$.each(t,function(i,item){
if(item.type == 'PAYMENT')
{
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
}
});
}
//alert('final alert');
}
</script>
<?php
if(!empty($cashbanking))
{
//print_r($cashbanking);
foreach($cashbanking as $cb)
{
}
}
?>
<div class="content-wrapper" style="min-height: 537px;">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Siddharth Industries - Bank Statement(Receipt and Payment)</center>
</h1>
</section>
<section class="content">
<div style="text-align:right;">
<a href="<?php base_url() ?>ViewIncomeExpense" class="btn btn-primary" value="Back"/>Back</a>
</div>
<br>
<div class="row">
<!-- left column -->
<div class="col-md-12">
<!-- general form elements -->
<div class="box box-primary">
<!-- form start -->
<form role="form" id="addIncomeExpense" action="<?php echo base_url() ?>addIncomeExpense" enctype="multipart/form-data" method="post">
<div class="box-body">
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<b><span for="Accountcode">Select Account type:</span> </b> </br></br>
<input type="radio" onclick = loadAccountType(this.id); id="myradio1" name="myradio" value="1" checked>RECEIPT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" onclick = loadAccountType(this.id); id="myradio2" name="myradio" value="2" >PAYMENT
</div>
</div>
<div class="col-md-3">
<div class="form-group"><b>
<span for="PONO">Account Name Select:</span> </b><span style="color:red">*</span> </br></br>
<select class="form-control required " required id="accode" required name="accode">
<option value="-1">Account Name Select</option>
</select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="PODescription">Date:</span></b><span style="color:red">*</span></br></br>
<input type="text" class="form-control required" id="Date" name="Date" ><!--value="<?php echo $cb->cdate?>-->
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="towhome" id="towhom">AAA</span></b><span style="color:red">*</span></br></br>
<input type="text" class="form-control required" id="towhome" name="towhome">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-3">
<input type="checkbox" id="gst" name="gsttoggle"> GST
</div>
</div>
</div>
<div class="row" id="gstarea" style="border:1px dashed; margin-left:0px;margin-right:0px;display:none;">
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<b><span for="Invoiceno">Invoice No:</span></b>
<input type="text" class="form-control required" id="Invoiceno" name="Invoiceno">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b><span for="Merchant">Merchant Name:</span></b>
<input type="text" class="form-control required" id="merchant" name="merchant">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="Merchantgst">Merchant GST No:</span></b>
<input id="merchantgst" name="Merchantgst" class="form-control">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="HSN/SAC Code">HSN/SAC Code:</span></b>
<input id="hsn" name="hsn" class="form-control" >
</div>
</div>
</div>
<div class="col-md-12">
<div class="col-md-3">
<div class="form-group">
<b>
<span for="ValuebeforeGST">Value before GST:</span></b>
<input id="valuebeforegST" name="valuebeforegST" style="text-align:right;" class="form-control" onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="SGST">SGST:</span>
</b>
<input type="text" class="form-control" style="text-align:right;" onchange="GSTvalue(this.id)" id="SGST" name="SGST" onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="CGST">CGST:</span>
</b>
<input type="text" class="form-control" id="CGST" style="text-align:right;" name="CGST" onkeypress="return isNumberKey(event)">
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<b>
<span for="IGST">IGST:</span></b>
<input type="text" class="form-control required" style="text-align:right;" onkeypress="return isNumberKey(event)" onchange = GSTvalue(this.id) id="IGST" name="IGST">
</div>
</div>
</div>
</div> <!-- /End of GST Area -->
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<b><span for="Total">Total Amount:</span></b><span style="color:red">*</span>
<input type="text" class="form-control" id="totalamount" name="totalamount" onkeypress="return isNumberKey(event)" style="text-align:right;" value="<?php echo $cb->mappingamount?>">
</div>
</div>
<input type="hidden" id="type" name="type" value="<?php echo $cb->amounttype?>">
<input type="hidden" id="bankid" name="bankid" value="<?php echo $cb->mid?>">
<input type="hidden" id="alreadypaid" name="alreadypaid" value="<?php echo $cb->amount?>">
<input type="text" id="alreadycreditpaid" name="alreadycreditpaid" value="<?php echo $cb->alreadycreditpaid?>">
<input type="hidden" id="totalbankamount" name="totalbankamount" value="<?php echo $cb->totalamount?>">
<input type="hidden" id="borc" name="borc" value="<?php echo $cb->boption?>">
</div>
<div class="row">
<div class="col-md-12">
<div class="col-md-4">
<b><span for="Description">Description:</span></b>
<textarea class="form-control" id="description" name="description" >
</textarea>
</div>
</div>
</div>
<!-- /.box-body -->
<div class="box-footer" style="text-align:right">
<input type="button" onclick="validate();"class="btn btn-primary" value="Submit" />
<input type="reset" class="btn btn-primary" value="Reset" />
</div>
</div>
</form>
</div>
<div class="col-md-4">
<?php
$this->load->helper('form');
$error = $this->session->flashdata('error');
if($error)
{
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('error'); ?>
</div>
<?php } ?>
<?php
$success = $this->session->flashdata('success');
if($success)
{
?>
<div class="alert alert-success alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo $this->session->flashdata('success'); ?>
</div>
<?php } ?>
<div class="row">
<div class="col-md-12">
<?php echo validation_errors('<div class="alert alert-danger alert-dismissable">', ' <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button></div>'); ?>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
function validate()
{
var accode = $('#accode').val();
var date = $('#Date').val();
var towhome = $('#towhome').val();
var gstcheck = document.getElementById("gst").checked;
var Invoiceno = $('#Invoiceno').val();
var merchant = $('#merchant').val();
var mergst = $('#merchantgst').val();
var beforegst = $('#valuebeforegST').val();
var sgst = $('#SGST').val();
var cgst = $('#CGST').val();
var igst = $('#IGST').val();
var total = $('#totalamount').val();
var errorflag = 0;
if(accode < 0)
{
errorflag++;
}
if(date == '')
{
errorflag++;
}
if(total == '')
{
errorflag++;
}
if(towhome == '')
{
errorflag++;
}
if(gstcheck == true)
{
if((merchant == '') || (mergst == '') || (Invoiceno == '') || (beforegst == '') || (sgst == '') || (cgst == '') || (igst == ''))
{
errorflag++;
}
else
{
// calculation part
}
}
// alert(errorflag);
if(errorflag != 0)
{
alert("Please Provide All Details..!");
return false;
}
$('#addIncomeExpense').submit();
}
function GSTvalue(id)
{
var sgst = $('#SGST').val();
var cgst = $('#CGST').val();
var igst = $('#IGST').val();
var beforegst = $('#valuebeforegST').val();
$('#valuebeforegST').val((parseFloat(beforegst).toFixed(2)));
if(id == 'SGST')
{
$('#CGST').val(parseFloat(sgst).toFixed(2));
$('#SGST').val(parseFloat(sgst).toFixed(2));
$('#IGST').val('0.00');
calculateTotal();
}
if(id == 'IGST')
{
$('#CGST').val('0.00');
$('#SGST').val('0.00');
$('#IGST').val(parseFloat(igst).toFixed(2));
calculateTotal();
}
}
function calculateTotal()
{
var sgst = $('#SGST').val();
var cgst = $('#CGST').val();
var igst = $('#IGST').val();
var beforegst = $('#valuebeforegST').val();
var total = parseFloat(sgst)+parseFloat(cgst)+parseFloat(igst)+parseFloat(beforegst);
$('#totalamount').val((total.toFixed(2)));
}
$('#myradio1').click(function(){
$('#towhom').text('Received From:');
});
$('#myradio2').click(function(){
$('#towhom').text('Paid To:');
});
</script>

View File

@ -0,0 +1,709 @@
<?php
foreach($cash as $c)
{
}
foreach($bankid as $i)
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info" id="content">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Receipt Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="customer">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-1" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
<div class="col-md-2" style="margin-top:24px;">
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a>
</div>
</div>
<div>
<div class="col-md-3">
<label for="from_date">
<?php echo 'Bank Debit Amount'; ?>
</label>
<div class="input-group">
<input type="text" id="debitamount" value="<?php echo $cash; ?>" readonly>
</div>
<div class="input-group">
<input type="text" id="bankid" value="<?php echo $bankid; ?>" readonly>
</div>
</div>
</div>
</form>
<br>
<br>
<input type="text" name="Rowid" id="Rowid">
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Select</th>
<th>Type</th>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Account Code</th>
<th>To Whom</th>
<th>Total<?php echo '('.$inrsymbol.')' ?></th>
<th>Amountpaid</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($receiptdata)){
//print_r($bankdepit);
//die();
foreach($receiptdata as $t)
{
$status=$t->Paymentstatus;
$balancetopay=$t->Balancetopay;
//print_r($$status);
if($status !='ST057')
{
?>
<tr>
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->type?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->date?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->account_code?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->towhom?></span></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->total?></span></td>
<td data-name="sel"><input type="text" onkeypress="return isNumberKey(event)" onchange="GetAmount(<?php echo $i ?>)" id="invoicepaymet<?php echo $i ?>"></td>
</tr>
<?php
$i++;
}
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="amount"><strong>
<!-- 4545 -->
<input type="text" id="addvalue" name="addvalue">
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<div class="row">
<div class="col-md-12" id="date1"></div>
<div class="col-md-12" id="pono1"></div>
<div class="col-md-12" id="sn1"></div>
<div class="col-md-12" id="aa1"></div>
<!--<div class="col-md-12" id="aa2"></div>-->
<div class="col-md-12" id="tov1"></div>
<div class="col-md-12" id="qw1"></div>
<input type="hidden" name="Recid" id="Recid" value="">
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
//alert($data['cash']);
// $('#debitamount').val('10');
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
var tot=0;
var tot1=0;
var intex=1;
var row=0;
var j=1;
var tott=0;
function GetPayment(i)
{
var x = document.getElementById('checkboxcheckbox'+i).checked;
//alert(x);
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
temp=intex;
if(x==true)
{
//alert(x);
row= parseInt(row)+1;
//alert(row);
$('#Rowid').val(row);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
$('#invoicepaymet'+i).val(invoicepayment);
var RowCount= $('#Rowid').val();
//alert(RowCount);
//alert('advance' + advanceamount);
$('<input>').attr({
type:'hidden',
name:'date1'+j,
id:'date1'+j,
value:date
}).appendTo('#date1');
$('<input>').attr({
type:'hidden',
name:'pono1'+j,
id:'pono1'+j,
value:pono
}).appendTo('#pono1');
$('<input>').attr({
type:'hidden',
name:'sn1'+j,
id:'sn1'+j,
value:supname
}).appendTo('#sn1');
$('<input>').attr({
type:'text',
name:'qw1'+j,
id:'qw1'+j,
value:invoicepayment
}).appendTo('#qw1');
// $('<input>').attr({
// type:'hidden',
// name:'aa2'+j,
// id:'aa2'+j,
// value:advanceamount
// }).appendTo('#aa2');
$('<input>').attr({
type:'hidden',
name:'tov1'+j,
id:'tov1'+j,
value:totalordervalue
}).appendTo('#tov1');
//j= parseInt(j)+1;
if(negative==1)
{
// alert()
for(o=1;o<j;o++)
{
$('#qw1'+o).val('')
}
}
intex = parseInt(intex)+1;
j=parseInt(j)+1;
var to=0;
for(t=1;t<j;t++)
{
//var tt= $('#inv_amount'+t).val();
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
//alert(tt)
to = parseFloat(to) + parseFloat (tt);
//alert(to);
$('#addvalue').val(parseFloat(to).toFixed(2));
}
}
else
{
//alert(i)
var rr= $('#Rowid').val();
var ro= parseInt(rr)-1;
var Payment= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
// alert(Payment)
//var Inid= parseFloat( $('#pono'+i).text() == '' ? '0.00' : $('#pono'+i).text());
var Inid = document.getElementById ('pono'+i ).innerText
//alert(Inid)
for(s=1;s<=j;s++)
{
var ch= $('#pono1'+s).val();
//alert(ch);
if(Inid==ch)
{
var w=s;
delamount= $('#qw1'+w).val();
//alert(delamount)
break;
}
}
// //alert(w);
var tote= $('#addvalue').val();
//alert(tote)
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
//alert(afterdeltot)
tot=parseFloat(tot)-parseFloat(Payment);
$('#invoicepaymet'+i).val('');
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
//alert(ro);
$('#Rowid').val(ro);
$('#invoicepaymet'+i).val('');
$('#date1'+i).val('');
$('#pono1'+i).val('');
$('#sn1'+i).val('');
$('#tov1'+i).val('');
$('#qw1'+i).val('');
//$('#aa'+i).val('');
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
// Added to allow decimal, period, or delete
if (charCode == 110 || charCode == 190 || charCode == 46)
return true;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function GetAmount(i)
{
//alert("hai");
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
//alert(amount);
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
var x = document.getElementById('checkboxcheckbox'+i).checked;
if(x==true && negative == 0)
{
//alert(x);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
//alert(pono);
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var balancetopay=document.getElementById ( "qw"+i ).innerText;
for(k=1;k<=j-1;k++)
{
//alert(k)
var idcheck=$('#pono1'+k).val();
// alert(idcheck)
if(pono==idcheck)
{
var cid=k;
//alert(cid+'if');
//die();
break;
}
}
if(amount<=totalordervalue)
{
$('#date1').val(date);
$('#pono1'+cid).val(pono);
$('#sn1'+cid).val(supname);
$('#tov1'+cid).val(totalordervalue);
$('#qw1'+cid).val(amount);
var totalvalue=$('#addvalue').val();
var bid=$('#bankid').val();
//$('#inv_total'+cid).val(invoicepayment);
}
else
{
alert('You are exceeding the payment get!!');
$('#invoicepaymet'+i).val(amount)
location.reload();
}
var tot11=0
for(l=1;l<j;l++)
{
//var Payingamount= $('#inv_amount'+l).val();
var Payingamount=parseFloat( $('#qw1'+l).val() == '' ? '0.00' : $('#qw1'+l).val());
//alert(Payingamount)
tot11= parseFloat(tot11)+parseFloat(Payingamount)
//alert(tot11)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
}
}
}
function Save()
{
//alert('j'+j);
var totalvalue=$('#addvalue').val();
var rowCount= $('#Rowid').val();
//alert(rowCount);
//die();
var check= 0;
var rw= 0;
for(i=1;i<=rowCount;i++)
{
//alert(i);
rw= parseFloat(rw)+1;
check = parseFloat(check)+1;
var bankdebitamount=$('#debitamount').val();
alert(totalvalue);
alert(bankdebitamount);
var bid=$('#bankid').val();
//alert(bid);
//die();
var date =$('#date1'+i).val();
var pono =$('#pono1'+i).val();
var suppliername=$('#sn1'+i).val();
var totalordervalue=$('#tov1'+i).val();
var amountpaid=$('#qw1'+i).val();
var invoicepaymet=$('#invoicepaymet'+i).text();
var payment = parseFloat(amountpaid);
//alert(rowCount);
if(payment<=totalordervalue)
{
if(totalvalue<=bankdebitamount)
{
$.ajax(
{
data:{date:date,pono:pono,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
type:"POST",
url:"<?php echo base_url() ?>cashbook/receipt",
success:function(data)
{
if(data)
{
alert(data);
location.reload();
}
}
});
}
else{
alert('You are payment exceeding');
location.reload();
}
}
else{
alert('You are payment exceedingsave');
location.reload();
}
}
// alert('i'+i);
// if(rowCount<=i)
// {
// if(data)
// {
// alert(data);
// location.reload();
// }
// else
// {
//alert("Error");
// }
// }
// }
// });
// alert(i);
// }
// else{
// alert('You are payment exceeding');
// location.reload();
// }
// j=j+1;
}
</script>
<script>
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

View File

@ -0,0 +1,760 @@
<?php
foreach($cash as $c)
{
}
foreach($bankid as $i)
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info" id="content">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="customer">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($getsupplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-1" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
<div class="col-md-2" style="margin-top:24px;">
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a>
</div>
</div>
<div>
<div class="col-md-3">
<label for="from_date">
<?php echo 'Bank Debit Amount'; ?>
</label>
<div class="input-group">
<input type="text" id="debitamount" readonly>
</div>
<div class="input-group">
<input type="text" id="bankid" value="" readonly>
</div>
</div>
</div>
</form>
<br>
<br>
<input type="text" name="Rowid" id="Rowid">
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Select</th>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>PONO</th>
<th>Supplier Name</th>
<th>Total PO Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Balance To Pay<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Description</th>-->
<th>Amount Paid<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($bankdepit)){
foreach($bankdepit as $t)
{
$status=$t->Paymentstatus;
$balancetopay=$t->Balancetopay;
//print_r($$status);
if($status !='ST057')
{
?>
<tr>
<td data-name="sell"><input type="checkbox" class="checkboxcheckbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->PODate?></span></td>
<td align="left" id="pono<?php echo $i ?>"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn<?php echo $i ?>" ><span><?php echo $t->SupplierName?></span></td>
<td align="left" id="tov<?php echo $i ?>"><span><?php echo $t->TotalOrderValue?></span></td>
<!--<td align="left" id="aa<?php echo $i ?>"><span><?php echo (($t->AdvanceAmount)+($t->Amountpaid))?></span></td>-->
<td id="qw<?php echo $i ?>" align="left"><span><?php echo ($t->TotalOrderValue-$t->Amountpaid)?></span></td>
<!--<td id="<?php echo $i ?>" align="left"><span><?php echo $t->Balancetopay?></span></td>-->
<td data-name="sel"><input type="text" onkeypress="return isNumberKey(event)" onchange="GetAmount(<?php echo $i ?>)" id="invoicepaymet<?php echo $i ?>"></td>
<!--<td align="left"><span><?php echo $t->ServiceDescription?></span></td>-->
</tr>
<?php
$i++;
}
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="amount"><strong>
<!-- 4545 -->
<input type="text" id="addvalue" name="addvalue">
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<div class="row">
<div class="col-md-12" id="date1"></div>
<div class="col-md-12" id="pono1"></div>
<div class="col-md-12" id="sn1"></div>
<div class="col-md-12" id="aa1"></div>
<!--<div class="col-md-12" id="aa2"></div>-->
<div class="col-md-12" id="tov1"></div>
<div class="col-md-12" id="qw1"></div>
<input type="hidden" name="Recid" id="Recid" value="">
<!-- <input type="hidden" name="bankid" id="bankid" value="">-->
<input type="hidden" name="bankamount" id="bankamount" value="">
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
var res=localStorage.getItem('test1');
$('#debitamount').val(localStorage.getItem('test'));
//alert(res.length);
//alert(localStorage.getItem('test1'));
var res1 = res.split(',');
var i;
$.each(res1, function( index, value )
{
var res2 = value.split('-');
var bid=res2[0];
var bam=res2[1];
//alert(bid);
//alert(bam);
$('#bankid').val(bid);
});
//alert(res2);
//alert(res[1]);
//var text = $('#debitamount').text();
//alert($data['cash']);
// $('#debitamount').val('10');
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
var tot=0;
var tot1=0;
var intex=1;
var row=0;
var j=1;
var tott=0;
function GetPayment(i)
{
var bankdebitamount=$('#debitamount').val();
var totalvalue=$('#addvalue').val();
var balanceamount=bankdebitamount-totalvalue;
var x = document.getElementById('checkboxcheckbox'+i).checked;
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
temp=intex;
if(x==true)
{
var bankdebitamount=$('#debitamount').val();
var totalvalue=$('#addvalue').val();
var balanceamount=bankdebitamount-totalvalue;
// if(bankdebitamount<totalvalue)
// {
// alert('your mapping amount is larege '+totalvalue);
// $(".checkboxcheckbox").prop("disabled", true);
// // alert('you have remaining'+balanceamount);
// // alert('your amount is equal to debit amount');
// // $(".checkboxcheckbox").prop("disabled", true);
// }
if(bankdebitamount==totalvalue)
{
alert('you have remaining'+balanceamount);
alert('your amount is equal to debit amount');
$(".checkboxcheckbox").prop("disabled", true);
}
else
{
//document.getElementById('checkboxcheckbox'+i).checked = false;
('your checkbox is disabled beacause already mapped amount')
}
row= parseInt(row)+1;
//alert(row);
$('#Rowid').val(row);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var invoicepayment =document.getElementById ( "qw"+i ).innerText;
$('#invoicepaymet'+i).val(invoicepayment);
var RowCount= $('#Rowid').val();
//alert(RowCount);
//alert('advance' + advanceamount);
$('<input>').attr({
type:'hidden',
name:'date1'+j,
id:'date1'+j,
value:date
}).appendTo('#date1');
$('<input>').attr({
type:'hidden',
name:'pono1'+j,
id:'pono1'+j,
value:pono
}).appendTo('#pono1');
$('<input>').attr({
type:'hidden',
name:'sn1'+j,
id:'sn1'+j,
value:supname
}).appendTo('#sn1');
$('<input>').attr({
type:'text',
name:'qw1'+j,
id:'qw1'+j,
value:invoicepayment
}).appendTo('#qw1');
$('<input>').attr({
type:'hidden',
name:'tov1'+j,
id:'tov1'+j,
value:totalordervalue
}).appendTo('#tov1');
//j= parseInt(j)+1;
if(negative==1)
{
// alert()
for(o=1;o<j;o++)
{
$('#qw1'+o).val('')
}
}
intex = parseInt(intex)+1;
j=parseInt(j)+1;
var to=0;
for(t=1;t<j;t++)
{
//var tt= $('#inv_amount'+t).val();
var tt=parseFloat( $('#qw1'+t).val() == '' ? '0.00' : $('#qw1'+t).val());
//alert(tt)
to = parseFloat(to) + parseFloat (tt);
//alert(to);
$('#addvalue').val(parseFloat(to).toFixed(2));
}
}
else
{
//alert(i)
var rr= $('#Rowid').val();
var ro= parseInt(rr)-1;
var Payment= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val());
// alert(Payment)
//var Inid= parseFloat( $('#pono'+i).text() == '' ? '0.00' : $('#pono'+i).text());
var Inid = document.getElementById ('pono'+i ).innerText
//alert(Inid)
for(s=1;s<=j;s++)
{
var ch= $('#pono1'+s).val();
//alert(ch);
if(Inid==ch)
{
var w=s;
delamount= $('#qw1'+w).val();
//alert(delamount)
break;
}
}
// //alert(w);
var tote= $('#addvalue').val();
//alert(tote)
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
//alert(afterdeltot)
tot=parseFloat(tot)-parseFloat(Payment);
$('#invoicepaymet'+i).val('');
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
//alert(ro);
$('#Rowid').val(ro);
$('#invoicepaymet'+i).val('');
$('#date1'+i).val('');
$('#pono1'+i).val('');
$('#sn1'+i).val('');
$('#tov1'+i).val('');
$('#qw1'+i).val('');
//$('#aa'+i).val('');
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
// Added to allow decimal, period, or delete
if (charCode == 110 || charCode == 190 || charCode == 46)
return true;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function GetAmount(i)
{
var amount= parseFloat( $('#invoicepaymet'+i).val() == '' ? '0.00' : $('#invoicepaymet'+i).val())
//alert(amount);
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicepaymet'+i).val('');
}
var x = document.getElementById('checkboxcheckbox'+i).checked;
if(x==true && negative == 0)
{
//alert(x);
var date= document.getElementById ( "date"+i ).innerText;
var pono =document.getElementById ( "pono"+i ).innerText;
//alert(pono);
var supname =document.getElementById ("sn"+i ).innerText;
var totalordervalue =document.getElementById ("tov"+i ).innerText;
//var advanceamount =document.getElementById ( "aa"+i ).innerText;
var balancetopay=document.getElementById ( "qw"+i ).innerText;
for(k=1;k<=j-1;k++)
{
//alert(k)
var idcheck=$('#pono1'+k).val();
// alert(idcheck)
if(pono==idcheck)
{
var cid=k;
//alert(cid+'if');
//die();
break;
}
}
if(amount<=totalordervalue)
{
//alert(cid+'cid');
$('#date1').val(date);
$('#pono1'+cid).val(pono);
$('#sn1'+cid).val(supname);
$('#tov1'+cid).val(totalordervalue);
$('#qw1'+cid).val(amount);
var totalvalue=$('#addvalue').val();
var bid=$('#bankid').val();
//$('#inv_total'+cid).val(invoicepayment);
}
else
{
alert('You are exceeding the payment get!!');
$('#invoicepaymet'+i).val(amount)
location.reload();
}
var tot11=0
for(l=1;l<j;l++)
{
//var Payingamount= $('#inv_amount'+l).val();
var Payingamount=parseFloat( $('#qw1'+l).val() == '' ? '0.00' : $('#qw1'+l).val());
//alert(Payingamount)
tot11= parseFloat(tot11)+parseFloat(Payingamount)
//alert(tot11)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
}
}
}
function Save()
{
var rowCount= $('#Rowid').val();
var check= 0;
var rw= 0;
for(i=1;i<=rowCount;i++)
{
//alert(i);
rw= parseFloat(rw)+1;
check = parseFloat(check)+1;
var bankdebitamount=$('#debitamount').val();
//alert(bankdebitamount);
var bid=$('#bankid').val();
var date =$('#date1'+i).val();
var pono =$('#pono1'+i).val();
var suppliername=$('#sn1'+i).val();
var totalordervalue=$('#tov1'+i).val();
var amountpaid=$('#qw1'+i).val();
var invoicepaymet=$('#invoicepaymet'+i).text();
// alert(invoicepaymet);
var totalvalue=$('#addvalue').val();
//alert(totalvalue);
var payment = parseFloat(amountpaid);
var balnceamount=bankdebitamount-totalvalue;
if(bankdebitamount>=totalvalue)
{
//alert('you have remainining'+balnceamount);
$.ajax(
{
data:{date:date,pono:pono,sname:suppliername,tot:totalordervalue,aa:amountpaid,ip:invoicepaymet,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw},
type:"POST",
url:"<?php echo base_url() ?>cashbook/receipt",
success:function(data)
{
if(data)
{
window.location.href ="Bankingstatement";
//location.reload();
}
}
});
}
else{
alert('You are payment exceeding ');
location.reload();
}
}
// alert('i'+i);
// if(rowCount<=i)
// {
// if(data)
// {
// alert(data);
// location.reload();
// }
// else
// {
//alert("Error");
// }
// }
// }
// });
// alert(i);
// }
// else{
// alert('You are payment exceeding');
// location.reload();
// }
// j=j+1;
}
</script>
<script>
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

View File

@ -0,0 +1,120 @@
<script>
function readURL(input) {
$('#FileName').val(input.files[0].name);
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css" rel="stylesheet">
<script>
function checkYearMonthAsEmpty()
{
var i=0;
if($("#mon").val() == "") {
i++;
// alert("No Month Selected!");
}
if($("#yr").val() == "") {
i++;
//alert("No Year Selected!");
}
if($("#FileName").val() == "") {
i++;
//alert("No File Uploaded!");
}
// alert(i);
return i;
}
</script>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<center>Siddharth Industries - Banking Report</center>
</h1>
</section>
<section class="content">
<div class="row">
<div class="col-md-8 col-md-offset-2" style="border:2px dotted;padding:2%;">
<form id="upload" method="post" action="<?php echo base_url() ?>cashbook/bankfileupload"; role="form" enctype="multipart/form-data">
<div class="row">
<div class="col-md-4"> <span>Bank Names</span>
<select type="text" id="bankbranchname" name="bankbranchname" class="form-control select2">
<option value="">Select Bank Name</option>
<?php
if(!empty($bankdetails))
{
foreach ($bankdetails as $bank)
{
?>
<option value="<?php echo $bank->Bank_name ?>"><?php echo $bank->Bank_name ?></option>
<?php
}
}
?>
</select>
</div>
<div class="col-md-4">
<div class="box-header">
<input type="file" accept=".xlsx,.png" onchange="readURL(this);" id="userfile" name="userfile" />
<label for="photo">Select Excel File to upload<br/>(only .xls)</label>
</div>
</div>
<div class="col-md-4">
<input type="submit" class="btn btn-info" value="upload" onclick="save();return false;"/>
</div>
</div>
</div>
</div>
</section>
</div>
<script>
function save()
{
var x=checkYearMonthAsEmpty();
//alert(x);
if(x == 0)
{
$('form#upload').submit();
//$('#userfile').val('');
//$('#mon ').val('');
}else
{
alert("Please Provide All Information Correctly!");
return false;
}
}
</script>

View File

@ -0,0 +1,704 @@
<?php
foreach($cash as $c)
{
}
foreach($bankid as $i)
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<div class="row">
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info" id="content">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Invoice Report</b></p></h3></center>
<div class="box-body">
<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="customer">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="Customer" name="Customer">
<option value="">Select Customer</option>
<?php
foreach($getcustomer as $gc):
{?>
<option value="<?php echo $gc->client_name;?>"><?php echo $gc->client_name ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<div class="col-md-1" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
<div class="col-md-2" style="margin-top:24px;">
<a style="float:right;" class="btn btn-success ajax-loader" ID="Save" onclick="Save()" >&nbsp;&nbsp;<span class="bold">Save</span></a>
</div>
</div>
<div>
<div class="col-md-3">
<label for="from_date">
<?php echo 'Bank Debit Amount'; ?>
</label>
<div class="input-group">
<input type="text" id="debitamount" value="<?php echo $cash; ?>" readonly>
</div>
<div class="input-group">
<input type="text" id="bankid" value="<?php echo $bankid; ?>" readonly>
</div>
</div>
</div>
</form>
<br>
<br>
<input type="text" name="Rowid" id="Rowid">
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Select</th>
<th>Date</th>
<th>Invoice ID</th>
<th>Customer Name</th>
<th>Invoice Amount<?php echo '('.$inrsymbol.')' ?></th>
<th>Balance To Received</th>
<th>AmountReceived</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($bankinvoicedata)){
//print_r($bankdepit);
//die();
foreach($bankinvoicedata as $t)
{
$status=$t->Paymentstatus;
$balancetopay=$t->Balancetopay;
//print_r($$status);
if($status !='ST057')
{
?>
<tr>
<td data-name="sell"><input type="checkbox" onchange="GetPayment(<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<td align="left" id="invoicedate<?php echo $i ?>"><span><?php echo $t->invoice_date_created?></span></td>
<td align="left" id="invoice_id<?php echo $i ?>"><span><?php echo $t->invoice_id?></span></td>
<td align="left" id="client_name<?php echo $i ?>"><span><?php echo $t->client_name?></span></td>
<td align="left" id="invoice_paid<?php echo $i ?>"><span><?php echo $t->invoice_total?></span></td>
<td align="left" id="invoice_balance<?php echo $i ?>"><span><?php echo $t->invoice_total-$t->amountreceived?></span></td>
<td data-name="sel"><input type="text" onkeypress="return isNumberKey(event)" onchange="GetAmount(<?php echo $i ?>)" id="invoicereceived<?php echo $i ?>"></td>
</tr>
<?php
$i++;
}
}
}
?>
</tbody>
<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="amount"><strong>
<!-- 4545 -->
<input type="text" id="addvalue" name="addvalue">
</strong>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<div class="row">
<div class="col-md-12" id="invoicedate1"></div>
<div class="col-md-12" id="invoiceid1"></div>
<div class="col-md-12" id="customername1"></div>
<div class="col-md-12" id="invoiceamount1"></div>
<div class="col-md-12" id="invoice_balance1"></div>
<input type="hidden" name="Recid" id="Recid" value="">
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
var res=localStorage.getItem('test2');
$('#debitamount').val(localStorage.getItem('tes'));
//alert(res.length);
//alert(localStorage.getItem('test1'));
var res1 = res.split(',');
var i;
$.each(res1, function(index, value)
{
var res2 = value.split('-');
var bid=res2[0];
var bam=res2[1];
//alert(bid);
//alert(bam);
$('#bankid').val(bid);
});
//alert($data['cash']);
// $('#debitamount').val('10');
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
var tot=0;
var tot1=0;
var intex=1;
var row=0;
var j=1;
var tott=0;
function GetPayment(i)
{
var x = document.getElementById('checkboxcheckbox'+i).checked;
//alert(x);
var amount= parseFloat( $('#invoicereceived'+i).val() == '' ? '0.00' : $('#invoicereceived'+i).val())
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicereceived'+i).val('');
}
temp=intex;
if(x==true)
{
//alert(x);
row= parseInt(row)+1;
//alert(row);
$('#Rowid').val(row);
var date= document.getElementById ( "invoicedate"+i ).innerText;
var invid =document.getElementById ( "invoice_id"+i ).innerText;
var cusname =document.getElementById ("client_name"+i ).innerText;
var invoiceamount =document.getElementById ("invoice_paid"+i ).innerText;
var invoicereceived=document.getElementById ("invoice_balance"+i ).innerText;
$('#invoicereceived'+i).val(invoicereceived);
var RowCount= $('#Rowid').val();
//alert(RowCount);
//alert('advance' + advanceamount);
$('<input>').attr({
type:'hidden',
name:'invoicedate1'+j,
id:'invoicedate1'+j,
value:date
}).appendTo('#invoicedate1');
$('<input>').attr({
type:'hidden',
name:'invoiceid1'+j,
id:'invoiceid1'+j,
value:invid
}).appendTo('#invoiceid1');
$('<input>').attr({
type:'hidden',
name:'customername1'+j,
id:'customername1'+j,
value:cusname
}).appendTo('#customername1');
$('<input>').attr({
type:'text',
name:'invoiceamount1'+j,
id:'invoiceamount1'+j,
value:invoiceamount
}).appendTo('#invoiceamount1');
$('<input>').attr({
type:'text',
name:'invoice_balance1'+j,
id:'invoice_balance1'+j,
value:invoicereceived
}).appendTo('#invoice_balance1');
//j= parseInt(j)+1;
if(negative==1)
{
// alert()
for(o=1;o<j;o++)
{
$('#invoice_balance1'+o).val('')
}
}
intex = parseInt(intex)+1;
j=parseInt(j)+1;
var to=0;
for(t=1;t<j;t++)
{
//var tt= $('#inv_amount'+t).val();
var tt=parseFloat( $('#invoice_balance1'+t).val() == '' ? '0.00' : $('#invoice_balance1'+t).val());
//alert(tt)
to = parseFloat(to) + parseFloat (tt);
//alert(to);
$('#addvalue').val(parseFloat(to).toFixed(2));
}
}
else
{
//alert(i)
var rr= $('#Rowid').val();
var ro= parseInt(rr)-1;
var Payment= parseFloat( $('#invoicereceived'+i).val() == '' ? '0.00' : $('#invoicereceived'+i).val());
var Inid = document.getElementById ('invoice_id'+i ).innerText
for(s=1;s<=j;s++)
{
var ch= $('#invoiceid1'+s).val();
//alert(ch);
if(Inid==ch)
{
var w=s;
delamount= $('#invoice_balance1'+w).val();
//alert(delamount)
break;
}
}
// //alert(w);
var tote= $('#addvalue').val();
//alert(tote)
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
//alert(afterdeltot)
tot=parseFloat(tot)-parseFloat(Payment);
$('#invoicereceived'+i).val('');
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
//alert(ro);
$('#Rowid').val(ro);
$('#invoicereceived'+i).val('');
$('#invoicedate1'+i).val('');
$('#invoiceid1'+i).val('');
$('#customername1'+i).val('');
$('#invoiceamount1'+i).val('');
$('#invoice_balance1'+i).val('');
//$('#aa'+i).val('');
}
}
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : evt.keyCode;
// Added to allow decimal, period, or delete
if (charCode == 110 || charCode == 190 || charCode == 46)
return true;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
function GetAmount(i)
{
//alert("hai");
var amount= parseFloat( $('#invoicereceived'+i).val() == '' ? '0.00' : $('#invoicereceived'+i).val());
var negative=0;
if(amount<0)
{
negative=1;
alert("Invalid Amount")
$('#invoicereceived'+i).val('');
}
var x = document.getElementById('checkboxcheckbox'+i).checked;
if(x==true && negative == 0)
{
//alert(x);
var date= document.getElementById ( "invoicedate"+i ).innerText;
var invid =document.getElementById ( "invoice_id"+i ).innerText;
var cusname =document.getElementById ("client_name"+i ).innerText;
var invoiceamount =document.getElementById ("invoice_paid"+i ).innerText;
var invoicereceived=document.getElementById ("invoice_balance"+i ).innerText;
for(k=1;k<=j-1;k++)
{
var idcheck=$('#invoiceid1'+k).val();
if(invid==idcheck)
{
var cid=k;
break;
}
}
if(amount<=invoiceamount)
{
$('#invoicedate1').val(date);
$('#invoiceid1'+cid).val(invid);
$('#customername1'+cid).val(cusname);
$('#invoiceamount1'+cid).val(invoiceamount);
$('#invoice_balance1'+cid).val(amount);
var totalvalue=$('#addvalue').val();
var bid=$('#bankid').val();
}
else
{
alert('You are exceeding the payment get!!');
$('#invoicereceived'+i).val(amount)
location.reload();
}
var tot11=0
for(l=1;l<j;l++)
{
//var Payingamount= $('#inv_amount'+l).val();
var Payingamount=parseFloat( $('#invoice_balance1'+l).val() == '' ? '0.00' : $('#invoice_balance1'+l).val());
//alert(Payingamount)
tot11= parseFloat(tot11)+parseFloat(Payingamount)
//alert(tot11)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
}
}
}
function Save()
{
var totalvalue=$('#addvalue').val();
var rowCount= $('#Rowid').val();
//alert(rowCount);
//die();
var check= 0;
var rw= 0;
for(i=1;i<=rowCount;i++)
{
//alert(i);
rw= parseFloat(rw)+1;
check = parseFloat(check)+1;
var bankdebitamount=$('#debitamount').val();
var bid=$('#bankid').val();
var date =$('#invoicedate1'+i).val();
var invid =$('#invoiceid1'+i).val();
var customername=$('#customername1'+i).val();
var invoiceamount=$('#invoiceamount1'+i).val();
var amountreceived=$('#invoice_balance1'+i).val();
var invoicereceived=$('#invoicereceived'+i).text();
var payment = parseFloat(invoiceamount);
// if(payment<=invoicereceived)
// {
// alert('1if');
// if(totalvalue<=bankdebitamount)
// {
$.ajax(
{
data:{date:date,invid:invid,cname:customername,invamount:invoiceamount,ar:amountreceived,rc:rowCount,tpv:totalvalue,bda:bankdebitamount,bi:bid,check:check,rw:rw,invrec:invoicereceived},
type:"POST",
url:"<?php echo base_url() ?>cashbook/invoiceamount1",
success:function(data)
{
if(data)
{
//alert('Saved Successfully');
window.location.href ="Bankingstatement";
}
}
});
//}
// else{
// alert('You are payment exceeding');
// location.reload();
// }
//}
// else{
// alert('You are payment exceedingsave');
// location.reload();
// }
}
// alert('i'+i);
// if(rowCount<=i)
// {
// if(data)
// {
// alert(data);
// location.reload();
// }
// else
// {
//alert("Error");
// }
// }
// }
// });
// alert(i);
// }
// else{
// alert('You are payment exceeding');
// location.reload();
// }
// j=j+1;
}
</script>
<script>
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

View File

@ -0,0 +1,359 @@
<?php
if(!empty($debitmapping))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Credit Amount Paid Report</b></p></h3></center>
<div class="box-body">
<!--<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>-->
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>INVOICE NO</th>
<th>Customer Name</th>
<th>Total Amount<?php echo '('.$inrsymbol.')' ?></th>
<th>Balance To Received</th>
<th>Received Amount</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($mappingiv)){
foreach($mappingiv as $ap)
{
?>
<tr>
<td align="left" id="tov"><span><?php echo $ap->indate?></span></td>
<td align="left" id="invno"><a href="<?= base_url() ?>cashbook/mappingcredit?sid=<?php echo $ap->invoiceno;?>"><span><?php echo $ap->invoiceno?></span></a></td>
<td align="left" id="aa"><span><?php echo $ap->customername?></span></td>
<td align="left" id="aa"><span><?php echo $ap->totinvoiceamount?></span></td>
<td align="left" id="aa"><span><?php echo $ap->balancetoreceived?></span></td>
<td align="left" id="aa"><span><?php echo $ap->amountreceived?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>Account Code</th>
<th>Bankid</th>
<th>Amount Type</th>
<th>Total Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Option<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($mappingcashbook)){
foreach($mappingcashbook as $mc)
{
?>
<tr>
<td align="left" id="date"><span><?php echo $mc->cdate?></span></td>
<td align="left" id="date"><span><?php echo $mc->account_code?></span></td>
<!--<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/receipt?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>-->
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn"><span><?php echo $mc->mid?></span></td>
<td align="left" id="tov"><span><?php echo $mc->btype?></span></td>
<td align="left" id="aa"><span><?php echo $mc->total?></span></td>
<td align="left" id="aa"><span><?php echo $mc->boption?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,262 @@
<?php
if(!empty($debitmapping))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Invoice settlement</b></p></h3></center>
<div class="box-body">
<!--<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>-->
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Bank ID</th>
<th>Narration</th>
<th>InvoiceNO</th>
<th>Amount Received<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($creditmapping)){
foreach($creditmapping as $ap)
{
?>
<tr>
<td align="left" id="tov"><span><?php echo $ap->bankid?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Narration?></span></td>
<td align="left" id="aa"><span><?php echo $ap->invoiceno?></span></td>
<td align="left" id="aa"><span><?php echo $ap->amountreceived?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,263 @@
<?php
if(!empty($debitmapping))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank PO settlement</b></p></h3></center>
<div class="box-body">
<!--<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>-->
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Bank ID</th>
<th>Narration</th>
<th>PONO</th>
<th>Amount Paid<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($debitmapping)){
foreach($debitmapping as $ap)
{
?>
<tr>
<td align="left" id="tov"><span><?php echo $ap->mid?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Narration?></span></td>
<td align="left" id="aa"><span><?php echo $ap->PONO?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Amountpaid?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -9,17 +9,11 @@
$(function() {
$(".select2").select2();
$( "#chequedate" ).datepicker({
maxDate :'now',
dateFormat :'dd-mm-yy'
});
$("#bankreport").click(function(){
var bank = $('#bank').val();
var payon = $('#month').val();
var chequeno = $('#chequeno').val();
var chequedate = $('#chequedate').val();
var excel = $('#excel').is(":checked");
// alert(excel);
@ -162,14 +156,6 @@ $("#esireport").click(function(){
</div>
</div>
<div class="row">
<div class="col-md-2">
<span>Cheque No</span><input type="text" class="form-control" id="chequeno" name="chequeno" readonly/>
</div>
<div class="col-md-2">
<span>Cheque Date</span><input type="text" class="form-control" id="chequedate" name="chequedate" readonly/>
</div>
</div>
<br/>
<div class="col-md-4 col-md-offset-6" align = "right">
@ -186,67 +172,4 @@ $("#esireport").click(function(){
</section>
</div>
<script>
$("#bank").change(function(){
chequeajaxcall();
} );
$("#month").change(function(){
chequeajaxcall();
} );
function chequeajaxcall()
{
var bank = $('#bank').val();
var payon = $('#month').val();
var chequeno = $('#chequeno').val();
var chequedate = $('#chequedate').val();
$('#content').loader('show');
if(bank != '-1' && payon !='-1')
{
$.ajax({
data:{id1:bank,id2:payon},
type:"POST",
url:"<?php echo base_url();?>payslip/ValidationCheque",
success:function(data) {
$('#content').loader('hide');
if(data != 0){
alert('Value already exists ! ..');
$("#chequeno").val('');
$("#chequeno").prop("readonly", true);
$("#chequedate").val('');
$("#chequedate").prop("readonly", true);
}else{
$("#chequeno").val('');
$("#chequeno").prop("readonly", false);
$("#chequedate").val('');
$("#chequedate").prop("readonly", false);
}
}//success
})//ajax
}
else
{
$('#content').loader('hide');
}
}
$(window).bind("pageshow", function() {
//$('#bank').val('-1');
//$('#month').val('-1');
$('#chequeno').val('');
$('#chequedate').val('');
});
</script>
</div>

View File

@ -0,0 +1,364 @@
<?php
if(!empty($mapping))
{
}
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<form method="post" action="<?php echo base_url($this->uri->uri_string()); ?>">
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Debit Amount Paid Report</b></p></h3></center>
<div class="box-body">
<!--<div class="row">
<div class="col-md-3">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-3" >
<label for="from_date">
<?php echo 'Customer'; ?>
</label>
<select class="form-control" id="SupplierName" name="SupplierName">
<option value="">Select Supplier</option>
<?php
foreach($supplier as $gs):
{?>
<option value="<?php echo $gs->SupplierName;?>"><?php echo $gs->SupplierName ; ?></option>
<?php } endforeach; ?>
</select>
</div>
</div>-->
</form>
<br>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>PONO</th>
<th>Supplier Name</th>
<th>Total PO Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Balance To Pay<?php echo '('.$inrsymbol.')' ?></th>
<th>Amount Paid<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($mapping)){
foreach($mapping as $ap)
{
?>
<tr>
<td align="left" id="date"><span><?php echo $ap->Podate?></span></td>
<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/mappingdebit?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn"><span><?php echo $ap->Suppliername?></span></td>
<td align="left" id="tov"><span><?php echo $ap->Totalpoamount?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Balancetopay?></span></td>
<td align="left" id="aa"><span><?php echo $ap->Amountpaid?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>
<br>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>Date</th>
<th>Account Code</th>
<th>Bankid</th>
<th>Amount Type</th>
<th>Total Amount<?php echo '('.$inrsymbol.')' ?></th>
<!--<th>Advance PO Amount<?php echo '('.$inrsymbol.')' ?></th>-->
<th>Option<?php echo '('.$inrsymbol.')' ?></th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($mappingcashbook)){
foreach($mappingcashbook as $mc)
{
?>
<tr>
<td align="left" id="date"><span><?php echo $mc->cdate?></span></td>
<td align="left" id="date"><span><?php echo $mc->account_code?></span></td>
<!--<td align="left" id="pono"><a href="<?= base_url() ?>cashbook/receipt?sid=<?php echo $ap->PONO;?>"><span><?php echo $ap->PONO?></span></a></td>-->
<!--<td align="left"><a href="<?= base_url() ?>cashbook/bankreceipt?sid=<?php echo $t->PONO;?>"><span><?php echo $t->PONO?></span></a></td>-->
<td align="left" id="sn"><span><?php echo $mc->mid?></span></td>
<td align="left" id="tov"><span><?php echo $mc->btype?></span></td>
<td align="left" id="aa"><span><?php echo $mc->total?></span></td>
<td align="left" id="aa"><span><?php echo $mc->boption?></span></td>
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
</script>

View File

@ -0,0 +1,634 @@
<?php
$inrsymbol='';
if(!empty($Indiancurrency))
{
foreach ($Indiancurrency as $inr)
{
$inrsymbol = $inr->FontCode2000;
}}
foreach($financialyear as $item)
{
$finyear = $item->financial_year;
} ?>
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
<style>
.dataTables_filter input {padding: 4px;}
.dataTables_filter {
width: 50%;
float: right;
text-align: right;
}
.dataTables_paginate {
width: 50%;
float: right;
text-align: right;
}
div.dt-buttons {
position: relative;
float: right;
}
</style>
<!--<div class="row">
<div class="col-md-12">
<div id="container"></div>
</div>
</div>-->
<section class="content" style="font-size: 12px;">
<div id="content"></div>
<!-- Left col -->
<div class="col-md-12">
<!-- TABLE: LATEST ORDERS -->
<div class="box box-info">
<!--<div class="box-header with-border">-->
<!--<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook Reports</b></p></h3></center>-->
<!--</div>-->
<!-- /.box-header -->
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Bank Report</b></p></h3></center>
<div class="box-body">
<?php
$attributes = array('class' => 'form-label-left bankdata ','name' => 'bankdata','id' => 'bankdata');
echo form_open($this->config->base_url().'/cashbook/bankdebitdata/',$attributes); ?>
<div class="row">
<div class="col-md-2">
<label for="from_date">
<?php echo 'From Date'; ?>
</label>
<div class="input-group">
<input name="from_date" id="max-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2">
<label for="to_date">
<?php echo 'To Date'; ?>
</label>
<div class="input-group">
<input name="to_date" id="min-date" class="form-control datepicker">
<span class="input-group-addon">
<i class="fa fa-calendar fa-fw"></i>
</span>
</div>
</div>
<div class="col-md-2" style="margin-top:24px;">
<select class="form-control" id="financialyear" name="financialyear">
<option value="">Select Year</option>
<?php
foreach($financialyear as $item):
{?>
<option value="<?php echo $item->financial_year;?>"><?php echo $item->financial_year ; ?></option>
<?php } endforeach; ?>
</select>
</div>
<?php
if(!empty($bankreport)){
foreach($bankreport as $t)
{
$status=$t->Status;
$type=0;
if(!empty($t->Debit))
{
$type = 1;
}
}
?>
<div class="col-md-2" style="margin-top:24px;">
<input type="submit" class="btn btn-success" name="btn_submit"
value="View Report">
</div>
</div>
</form>
<?php
}
?>
<div class="row">
<div class="col-md-12" style="padding:0px;">
<div class="col-md-2" style="padding-bottom:10px;">
<select style="height:35px;" name="selectedId" id="selectedId<?php echo $i?>" onchange="checkscreen(<?php echo $type ?>,<?php echo $i ?>);" title="Select Your Option">
<option value="-1" style="color:#FFF;">Select Option</option>
<option value="1">Invoice</option>
<option value="2">Po screen</option>
<option value="3">Cashbook</option>
</select>
</div>
<div class="col-md-2">
<input type="hidden" name="Rowid" id="Rowid">
</div>
<div class="col-md-2">
<input type="hidden" id="addvalue" name="addvalue">
</div>
</div>
</div>
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
<thead>
<tr>
<th>S.NO</th>
<th>Select</th>
<th>Date</th>
<!--<th>Account Code</th>-->
<th>Value Date</th>
<th>Bank Name</th>
<th>Cheque No</th>
<th>Narration</th>
<th>Cod</th>
<!--<th>Paid Type(RECEIPT)</th>-->
<!--<th>Paid Type(PAYMENTS)</th>-->
<th style="text-align:right;"> Debit <?php echo '('.$inrsymbol.')' ?></th>
<!--<th style="text-align:right;">Balance <?php echo '('.$inrsymbol.')' ?></th>-->
<th style="text-align:right;"> Cleard Balance <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Balance to Clear <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Status <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Credit <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Cleard Balance <?php echo '('.$inrsymbol.')' ?></th>
<th style="text-align:right;"> Balance to Clear <?php echo '('.$inrsymbol.')' ?></th>
<th>Status</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$ti=0.00;
$tvt=0.00;
if(!empty($bankreport)){
foreach($bankreport as $t)
{
$status=$t->Status;
$type=0;
if(!empty($t->Debit))
{
$type = 1;
}
//print_r($t);
?>
<tr>
<td align="left" id="bankid<?php echo $i ?>"><span><?php echo $t->ID?></span></td>
<!--<?php
// if($status=='CLOSE')
// {
// ?>
<td data-name="sell"><input type="hidden" onchange="checkamount(<?php echo $type ?>,<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>" readonly;></td>
// <?php
// }
// else
// {
// ?>-->
<td data-name="sell"><input type="checkbox" onchange="checkamount(<?php echo $type ?>,<?php echo $i ?>) "id="checkboxcheckbox<?php echo $i ?>" name="checkbox<?php echo $i ?>";></td>
<!--<?php
// }
// ?> -->
<td align="left" id="date<?php echo $i ?>"><span><?php echo $t->date?></span></td>
<td align="left"><span><?php echo $t->valuedate?></span></td>
<td align="left"><span><?php echo $t->Bankname?></span></td>
<td align="left"><span><?php echo $t->chequeNo?></span></td>
<td align="left"><span><?php echo $t->Narration?></a></span></td>
<td align="left"><span><?php echo $t->Cod?></span></td>
<td align="left" id="debit<?php echo $i ?>"><span><?php echo $t->Debit;?></span></td>
<?php
if($t->Clearbalance==null)
{
$clearbalance=0;
}
else
{
$cashbook=$t->total;
$clearbalance=$t->Clearbalance;
//$totalclearbalance=$cashbook+$clearbalance;
}
?>
<td align="left" id="totalpaid<?php echo $i?>"><a href="<?php echo base_url() ?>cashbook/mappingpo?d=<?php echo $t->ID?>"><span><?php echo $clearbalance?></a></span></td>
<?php
if($status=='CLOSE')
{
?>
<td align="left" id="btc<?php echo $i ?>"><span><?php echo ($t->Debit) - ($t->Clearbalance);?></span></td>
<?php
}
else
{
?>
<td align="left" id="btc<?php echo $i ?>"><?php echo $t->Debit-$clearbalance?></span></td>
<?php
}
?>
<td align="left"><span><?php echo $t->Status?></span></td>
<td align="left" id="credit1<?php echo $i ?>"><span><?php echo $t->Credit;?></span></td>
<?php
if($t->cclearbalance==null)
{
$clearbalance=0;
}
else
{
$clearbalance=$t->cclearbalance;
}
?>
<td align="left" id="credit2<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/mappinginvoice?d=<?php echo $t->ID?>"><span><?php echo $clearbalance;?></span></td>
<td align="left" id="credit<?php echo $i ?>"><span><?php echo ($t->Credit)-($t->cclearbalance);?></span></td>
<td><?php echo $t->cstatus;?></th>
<!--<td align="left" id="credit<?php echo $i ?>"><a href="<?php echo base_url() ?>cashbook/cashreceipt?sid=<?php echo $t->Credit;?>&d=<?php echo $t->ID?>"><span><?php echo $t->Credit?></a></span></td>-->
</tr>
<?php
$i++;
}
}
?>
</tbody>
<!--<tfoot width="100%">
<tr>
<td style="text-align:left;"><strong>Total</strong></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($ti,2,'.','');
}
?>
</strong>
</td>
<td style="text-align:right"><strong>
<?php
{
echo number_format($tvt,2,'.','');
}
?>
</strong>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tfoot>-->
</table>
</div>
</div>
</div>
<!-- /.box -->
</div>
<!-- /.col -->
<form>
<input type="hidden" name="bankid1" id="bankid1">
<input type="hidden" id="addvalue1" name="addvalue1">
</form>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.32/vfs_fonts.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.4.2/js/buttons.colVis.min.js"></script>
<script>
var row=0;
var j=1;
var tot11=0;
var tempidvalue=[];
var tempcredit=[];
var overalltype;
var before='';
var amounttype='';
var bankid='';
var tpaid='';
var debit1='';
var credit1='';
var tcpaid='';
function checkamount(t,i)
{
value=i;
bankid=value;
type= t;
amounttype=type;
var totalpaid= document.getElementById("totalpaid"+value).innerText;
tpaid=totalpaid;
var totalcreditpaid= document.getElementById("credit2"+value).innerText;
tcpaid=totalcreditpaid;
var btp=document.getElementById ("btc"+value).innerText;
var x = document.getElementById('checkboxcheckbox'+value).checked;
if (x==true)
{
if(overalltype == type || overalltype == undefined) {
if(type==1){
overalltype = 1;
row= parseInt(row)+1;
$('#Rowid').val(row);
var id=document.getElementById ("bankid"+value).innerText;
var debit=document.getElementById ("btc"+value ).innerText;
debit1=debit;
//alert('You have selected bankid=' +id+ '\n and your amount is=' +debit+ '\n Please select Poscreen');
var idvalue = id+'-'+debit;
tempidvalue.push(idvalue);
tot11=parseFloat(tot11)
tot11=parseFloat(tot11)+parseFloat(debit)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
if(debit==0)
{
alert('status is closed');
}
}
else{
overalltype = 0;
var id=document.getElementById ("bankid"+value).innerText;
var credit=document.getElementById ("credit"+value ).innerText;
credit1=credit;
//alert('You have selected bankid=' +id+ '\n and your amount is=' +credit+ '\n Please select Invoice screen');
var idvalue1 = id+'-'+credit;
tempcredit.push(idvalue1);
tot11=parseFloat(tot11)
tot11=parseFloat(tot11)+parseFloat(credit)
$('#addvalue').val(parseFloat(tot11).toFixed(2));
}
}
else{
alert("Miss Matchweqwe");
window.location.reload();
document.getElementById('checkboxcheckbox'+value).checked = false;
}
}
else
{
//alert('uncheck');
//$('#addvalue').val('0.00');
delamount= document.getElementById ( "debit"+i ).innerText;
var tote= $('#addvalue').val();
var afterdeltot= parseFloat(tote)- parseFloat(delamount);
$('#addvalue').val(parseFloat(afterdeltot).toFixed(2));
}
}
function checkscreen(t,i)
{
var avalue= $('#addvalue').val();
localStorage.setItem('test',avalue);
var damount =$('#debit'+i).val();
var e = document.getElementById("selectedId");
var value = e.options[e.selectedIndex].value;
var text = e.options[e.selectedIndex].text;
var camount =$('#credit'+i).text();
var RowCount= $('#Rowid').val();
var id=document.getElementById ("bankid"+bankid).innerText;
//var totalpaid=document.getElementById ("#totalpaid"+value).innerText;
//alert(totalpaid+'tp');
var date=document.getElementById ("date"+value).innerText;
var debit=document.getElementById ("debit"+value ).innerText;
var idvalue = id+'-'+debit;
var credit=document.getElementById ("credit"+value ).innerText;
if(avalue=='')
{
alert('you have select debit or credit');
}
else if(value=='2' && amounttype=='1')
{
if(avalue>0)
{
localStorage.setItem('test1',tempidvalue);
localStorage.setItem('test', avalue);
window.location.href="Debitstatement";
}
else
{
alert('your amount is empty');
}
}
else if(value=='1' && amounttype=='0')
{
if(avalue>0)
{
//alert(tempidvalue);
localStorage.setItem('test2',tempcredit);
localStorage.setItem('tes', avalue);
window.location.href="Invoice";
}
else
{
alert('your amount is empty');
}
}
else if(value=='3' && amounttype=='0' ||amounttype=='1')
{
if(avalue>0)
{
$('#content').loader('show');
$.ajax(
{
data:{bankdate:date,bankid:id,type:amounttype,bankamount:avalue,forstatus:avalue,alreadypaid:tpaid,alreadycreditpaid:tcpaid,debitamount:debit1,creditamount:credit1},
type:"POST",
url:"<?php echo base_url() ?>cashbook/cashpayment",
success:function(data)
{
window.location.href="Bankcash";
content.loader.show();
// if(data)
// {
// alert(data);
// //location.reload();
// }
}
});
}
else
{
alert('your amount is empty');
}
}
else
{
alert('you have must select correct option');
window.location.reload();
}
}
$(document).ready(function() {
table = $('#req').DataTable( {
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
"<'row'<'col-md-6'><'col-md-6'>>" +
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
buttons: [
{
extend: 'excelHtml5',
footer: 'true',
messageTop: $('h3').text(),
title: 'cashbook Overall Report',
exportOptions: {
columns: ':visible'
}
},
'colvis'
]
} );
} );
$( function() {
//var dateFormat = "mm/dd/yy",
from = $( "#min-date" )
.datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
to.datepicker("option", "minDate", getDate( this ) );
}),
to = $( "#max-date" ).datepicker({
dateFormat: "dd-mm-yy",
defaultDate: "+0d",
changeMonth: true,
//numberOfMonths: 1
})
.on( "change", function() {
from.datepicker( "option", "maxDate", getDate( this ) );
});
function getDate( element ) {
var date;
try {
date = $.datepicker.parseDate( dateFormat, element.value );
} catch( error ) {
date = null;
}
return date;
}
} );
</script>

View File

@ -1043,10 +1043,65 @@ $(function() {
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>ViewIncomeExpense">
<i class="fa fa-credit-card"></i><span>Receipt and Payment</span>
</a>
</li>
<a href="<?php echo base_url(); ?>ViewIncomeExpense">
<i class="fa fa-credit-card"></i>
<span>Receipt and Payment</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankingview">
<i class="fa fa-credit-card"></i>
<span>Banking</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankingstatement">
<i class="fa fa-credit-card"></i>
<span>Bank Statements</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Debitstatement">
<i class="fa fa-credit-card"></i>
<span>Amount Paid</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankamountpaid">
<i class="fa fa-credit-card"></i>
<span>Depit Reports</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Receipt">
<i class="fa fa-credit-card"></i>
<span>Receipt</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Payment">
<i class="fa fa-credit-card"></i>
<span>Payment</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Invoice">
<i class="fa fa-credit-card"></i>
<span>Invoice</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankamountreceived">
<i class="fa fa-credit-card"></i>
<span>Credit Reports</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankcash">
<i class="fa fa-credit-card"></i>
<span>addincexp</span>
</a>
</li>
</ul>
@ -1088,11 +1143,66 @@ $(function() {
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>ViewIncomeExpense">
<i class="fa fa-credit-card"></i>
<span>Receipt and Payment</span>
</a>
</li>
<a href="<?php echo base_url(); ?>ViewIncomeExpense">
<i class="fa fa-credit-card"></i>
<span>Receipt and Payment</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankingview">
<i class="fa fa-credit-card"></i>
<span>Banking</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankingstatement">
<i class="fa fa-credit-card"></i>
<span>Bank Statements</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Debitstatement">
<i class="fa fa-credit-card"></i>
<span>Amount Paid</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankamountpaid">
<i class="fa fa-credit-card"></i>
<span>Depit Reports</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Receipt">
<i class="fa fa-credit-card"></i>
<span>Receipt</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Payment">
<i class="fa fa-credit-card"></i>
<span>Payment</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Invoice">
<i class="fa fa-credit-card"></i>
<span>Invoice</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankamountreceived">
<i class="fa fa-credit-card"></i>
<span>Credit Reports</span>
</a>
</li>
<li class="treeview">
<a href="<?php echo base_url(); ?>Bankcash">
<i class="fa fa-credit-card"></i>
<span>addincexp</span>
</a>
</li>
</ul>
</li>