cashbook report and cashbook edit page
This commit is contained in:
parent
332f6027c3
commit
921572b7b9
@ -206,8 +206,10 @@ $route['ViewMRIR'] = "MRIRcontroller/viewmaterialinspectionreport";
|
||||
$route['Viewigr'] = "MRIRcontroller/viewinwardgateregister";
|
||||
$route['Distribution'] = "MRIRcontroller/viewmMaterialDistributionList";
|
||||
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
||||
$route['EditIncomeExpense'] = "cashbook/editcashbook";
|
||||
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||
$route['updateExpense'] = "cashbook/updateExpense";
|
||||
$route['qualityreportlist'] = "quality/reportList";
|
||||
$route['qualityreportlistinward'] = "quality/reportListInward";
|
||||
//<-------------Store page----------------->
|
||||
|
||||
@ -266,19 +266,99 @@ class cashbook extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function editcashbook()
|
||||
public function editcashbook($sid)
|
||||
{
|
||||
|
||||
if($sid == '')
|
||||
{
|
||||
$cash = $_GET['sid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$cash = $sid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->load->model('cashbook_model');
|
||||
|
||||
// $data['cashbook'] = $this->cashbook_model->Selectcash();
|
||||
|
||||
// $this->global['pageTitle'] = 'Siddharth : Cashbook Listing';
|
||||
|
||||
$this->loadViews("editincomeexpenses", $this->global, NULL);
|
||||
|
||||
$data['DepDetails'] = $this->cashbook_model->viewdepartment($cash);
|
||||
//$data['deletefile'] = $this->cashbook-model->deletefile($cash);
|
||||
$data['dropdownvalues'] = $this->cashbook_model->getAccounTypes();
|
||||
//print_r( $data['DepDetails']);die();
|
||||
$this->global['pageTitle'] = 'Siddharth : Edit Cashbook';
|
||||
$this->loadViews("editincomeexpenses", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
public function deletefile()
|
||||
{
|
||||
$cashfile = $this->input->post('id');
|
||||
$cashid = $this->input->post('ide');
|
||||
//echo 'dsmkjsn';
|
||||
//echo $cashid;
|
||||
|
||||
//echo $cashfile;
|
||||
//die();
|
||||
//$this->load->model('cashbook_model');
|
||||
$this->cashbook_model->deletefile($cashid);
|
||||
|
||||
//print_r( $data['DepDetails']);die();
|
||||
//$this->global['pageTitle'] = 'Siddharth : Edit Cashbook';
|
||||
//$this->loadViews("income_expense_list", $this->global,$data, NULL);
|
||||
|
||||
}
|
||||
function updateExpense()
|
||||
{
|
||||
$id1=$this->input->post('id1');
|
||||
$myradio1= $this->input->post('myradio');
|
||||
$option='';
|
||||
if($myradio1==1)
|
||||
{
|
||||
$option=RECEIPT;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option=PAYMENT;
|
||||
}
|
||||
//echo $option;die();
|
||||
$ans1 = $this->input->post('ans');
|
||||
$Date1 = $this->input->post('Date');
|
||||
$accountcode1 = $this->input->post('accode');
|
||||
//echo $accountcode1;die();
|
||||
$towhome1 = $this->input->post('towhome');
|
||||
$Invoiceno1 = $this->input->post('Invoiceno');
|
||||
$merchant1 = $this->input->post('merchant');
|
||||
$Merchantgst1 = $this->input->post('Merchantgst');
|
||||
$hsn1 = $this->input->post('hsn');
|
||||
$valuebeforegST1 = $this->input->post('valuebeforegST');
|
||||
$SGST1 = $this->input->post('SGST');
|
||||
$CGST1 = $this->input->post('CGST');
|
||||
$IGST1 = $this->input->post('IGST');
|
||||
$totalamount1 = $this->input->post('totalamount');
|
||||
$description1 = $this->input->post('description');
|
||||
//$document1=$this->input->post('myfile');
|
||||
$fs = 0;
|
||||
if(!empty($_FILES['myfile']['name']))
|
||||
{
|
||||
//echo "FILE AVAILABLE";
|
||||
$config['file_name'] = $_FILES['myfile']['name'];
|
||||
$config['upload_path'] = 'uploads/cashbook/';
|
||||
$path = $config['upload_path'];
|
||||
//$filename = $config['file_name'];
|
||||
$document = $path.$filename;
|
||||
//echo $document;
|
||||
$fs = $this->uploadFile();
|
||||
$document = $path.$fs;
|
||||
|
||||
}
|
||||
$updateaccount = array('type'=>$option,'account_code'=>$accountcode1,'date'=>$Date1,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'description'=>$description1,'document'=>$document);
|
||||
//print_r($updateaccount);die();
|
||||
$res = $this->cashbook_model->updatedepartment($updateaccount,$id1);
|
||||
|
||||
//if( $res == 1 ){
|
||||
echo "<script>alert('Saved Successfully!');window.location.href='ViewIncomeExpense';</script>";
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function convertNumber($amt){
|
||||
|
||||
@ -1040,6 +1040,7 @@ class report extends BaseController
|
||||
$data['yearincome']=$this->dahsboard_Model->yearwise_data($income);
|
||||
$data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense);
|
||||
$data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal();
|
||||
$data['tdy']=$this->dahsboard_Model->today();
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
//print_r($data['gettoptotal1']);
|
||||
// $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data_income();
|
||||
@ -1105,18 +1106,39 @@ class report extends BaseController
|
||||
}
|
||||
public function cashbookdepartment()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
$sid=$_GET['sid'];
|
||||
$d=$_GET['d'];
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d);
|
||||
$c=$_GET['c'];
|
||||
if ($c=='PAYMENT')
|
||||
{
|
||||
|
||||
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
//print_r($data['departmentwise']);
|
||||
$this->loadviews("cashbookmonthlydep",$this->global,$data, NULL);
|
||||
}
|
||||
else{
|
||||
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbookmonthlyexp",$this->global,$data, NULL);
|
||||
}
|
||||
}
|
||||
public function cashbookdepartmentexp()
|
||||
{
|
||||
$sid=$_GET['sid'];
|
||||
$d=$_GET['d'];
|
||||
$c=$_GET['c'];
|
||||
$this->global['pageTitle'] = 'Cashbook - department - ';
|
||||
$data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
//print_r($data['departmentwise']);
|
||||
$this->loadviews("cashbookmonthlyexp",$this->global,$data, NULL);
|
||||
}
|
||||
//for cashbook menu link//
|
||||
public function cashbookmonthmenu()
|
||||
{
|
||||
|
||||
|
||||
$this->global['pageTitle'] = 'Cashbook monthly ';
|
||||
$data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise();
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
@ -1136,15 +1158,20 @@ class report extends BaseController
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
||||
$data['tdy']=$this->dahsboard_Model->today();
|
||||
//print_r($data['tdy']);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbooktoday",$this->global,$data, NULL);
|
||||
}
|
||||
public function depmenu()
|
||||
{
|
||||
$this->global['pageTitle'] = 'Cashbook - viewtoday ';
|
||||
$data['depmenu']=$this->dahsboard_Model->departmentmenu();
|
||||
$this->global['pageTitle'] = 'Cashbook - AllReport ';
|
||||
$fdate = $this->input->post('from_date');
|
||||
$tdate = $this->input->post('to_date');
|
||||
//echo $fdate;
|
||||
//echo $tdate;
|
||||
$data['depmenu']=$this->dahsboard_Model->departmentmenu($fdate,$tdate);
|
||||
$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol();
|
||||
$this->loadviews("cashbookdepmenu",$this->global,$data, NULL);
|
||||
$this->loadviews("cashbookall",$this->global,$data, NULL);
|
||||
}
|
||||
public function cashbookmenudepartment()
|
||||
{
|
||||
|
||||
@ -62,6 +62,38 @@ class cashbook_model extends CI_Model
|
||||
return $result;
|
||||
|
||||
}
|
||||
function viewdepartment($sid='')
|
||||
{
|
||||
$sql="SELECT ie.*,ac.name FROM t_income_expense ie
|
||||
join t_accountcode ac on ac.code=ie.account_code
|
||||
WHERE ie.id = ?";
|
||||
$query = $this->db->query($sql,array($sid));
|
||||
//print_r($this->db->last_query());
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
function deletefile($cashid)
|
||||
{
|
||||
|
||||
//echo $cashid;
|
||||
$sql="UPDATE t_income_expense SET document = NULL
|
||||
WHERE id = ?";
|
||||
$query = $this->db->query($sql,array($cashid));
|
||||
//print_r($this->db->last_query());
|
||||
//echo $sql;
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
|
||||
function updatedepartment($updateaccount,$id1)
|
||||
{
|
||||
$this->db->where('id', $id1);
|
||||
$this->db->update('t_income_expense',$updateaccount);
|
||||
$r = $this->db->affected_rows();
|
||||
return $r;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function Cashbook($cashbookdatas)
|
||||
{
|
||||
|
||||
@ -1935,15 +1935,49 @@ if ($fa and $aa != ''){
|
||||
|
||||
function monthexpensereport()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month,ac.name FROM t_income_expense as tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.type='PAYMENT' and month(tinc.date)= month(current_date()) group by account_code order by total desc limit 10 ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then sum(tinc.total)
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then sum(tinc.total)
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
tinc.total,tinc.towhom,tinc.description,monthname(tinc.date)as month,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where month(tinc.date)= month(current_date())group by tinc.account_code";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
|
||||
function yearexpensereport()
|
||||
{
|
||||
$sql="SELECT date_format(date,'%d-%m-%Y')as date,type,sum(total)as total,towhom,description,account_code,monthname(date)as month FROM t_income_expense where type='PAYMENT' and year(date)= year(current_date()) group by month order by total desc limit 10 ";
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.total
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.total
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
date_format(date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,tinc.towhom,tinc.description,tinc.account_code,monthname(tinc.date)as month FROM t_income_expense tinc where year(date)= year(current_date()) group by month order by total desc limit 10 ";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
|
||||
@ -1973,11 +2007,28 @@ if ($fa and $aa != ''){
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function departmentwise($sid='',$d='')
|
||||
function departmentwise($sid='',$d='',$c='')
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.total
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.total
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,.tinc.description, ac.name FROM
|
||||
t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code
|
||||
WHERE tinc.type='PAYMENT' and account_code = '$sid' and monthname(date)='$d'";
|
||||
WHERE account_code = '$sid' and monthname(date)='$d' and tinc.type='$c'";
|
||||
$query = $this->db->query($sql);
|
||||
//print_r($this->db->last_query());
|
||||
//echo $sql;
|
||||
@ -1986,9 +2037,26 @@ if ($fa and $aa != ''){
|
||||
}
|
||||
function yearmonthwise($sid='')
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,sum(tinc.total)as total,monthname(tinc.date)as month,tinc.description,tinc.towhom,tinc.account_code,ac.name FROM t_income_expense tinc
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then sum(tinc.total)
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then sum(tinc.total)
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.account_code,sum(tinc.total)as total,monthname(tinc.date)as month,tinc.description,tinc.towhom,tinc.account_code,ac.name FROM t_income_expense tinc
|
||||
join t_accountcode ac on ac.code=tinc.account_code
|
||||
WHERE tinc.type='PAYMENT' and monthname(date) = ? group by account_code";
|
||||
WHERE monthname(date) = ? group by tinc.account_code";
|
||||
$query = $this->db->query($sql,array($sid));
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
@ -2022,12 +2090,33 @@ function INRSymbol()
|
||||
}
|
||||
function today()
|
||||
{
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,tac.name FROM t_income_expense tinc
|
||||
LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code
|
||||
WHERE DATE(date) = CURRENT_DATE";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.total
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.total
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code WHERE DATE(date) = CURRENT_DATE";
|
||||
$query = $this->db->query($sql);
|
||||
return $query->result();
|
||||
}
|
||||
// $sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,tinc.type,tinc.total,tinc.towhom,tinc.description,tinc.account_code,tac.name FROM t_income_expense tinc
|
||||
// LEFT JOIN t_accountcode tac ON tac.code = tinc.account_code
|
||||
// WHERE DATE(date) = CURRENT_DATE";
|
||||
// $query = $this->db->query($sql);
|
||||
// return $query->result();
|
||||
//}
|
||||
//for menu link in monthly payments//
|
||||
function monthlypayments()
|
||||
{
|
||||
@ -2037,12 +2126,30 @@ function INRSymbol()
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
function departmentmenu()
|
||||
function departmentmenu($fdate,$tdate)
|
||||
{
|
||||
$sql="SELECT tinc.type,sum(tinc.total)as total,tinc.account_code,ac.name FROM t_income_expense tinc
|
||||
join t_accountcode ac on ac.code=tinc.account_code
|
||||
group by account_code";
|
||||
$fdate= date("Y-m-d",strtotime($fdate));
|
||||
$tdate=date("Y-m-d",strtotime($tdate));
|
||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.total
|
||||
end,'0') as expense,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.total
|
||||
end, '0') as income,
|
||||
ifnull(case
|
||||
when tinc.type = 'PAYMENT'
|
||||
then tinc.towhom
|
||||
end,'-') as paymentname,
|
||||
ifnull(case
|
||||
when tinc.type = 'RECEIPT'
|
||||
then tinc.towhom
|
||||
end, '-') as receiptname,
|
||||
tinc.total,tinc.towhom,tinc.description,tinc.type,tinc.account_code,ac.name FROM t_income_expense tinc join t_accountcode ac on ac.code=tinc.account_code where tinc.date >= '".$fdate."' and tinc.date <= '".$tdate."'";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $fdate;
|
||||
//print_r($this->db->last_query());
|
||||
return $query->result();
|
||||
|
||||
|
||||
285
application/views/cashbookall.php
Normal file
285
application/views/cashbookall.php
Normal file
@ -0,0 +1,285 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
if(!empty($cashbook))
|
||||
{
|
||||
|
||||
}
|
||||
if(!empty($depmenu))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
|
||||
|
||||
?>
|
||||
<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>Cashbook Report</b></p></h3></center>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<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-4">
|
||||
<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"><br>
|
||||
<input type="submit" class="btn btn-success" name="btn_submit"
|
||||
value="View Report">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<!--<th>Account Code</th>-->
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th>Received From</th>
|
||||
<th>Paid To</th>
|
||||
<!--<th>Paid Type(RECEIPT)</th>-->
|
||||
<!--<th>Paid Type(PAYMENTS)</th>-->
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($depmenu)){
|
||||
foreach($depmenu as $t)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $t->date?></span></td>
|
||||
<td align="left"><span><?php echo $t->name?></span></td>
|
||||
<td align="left"><span><?php echo $t->type?></span></td>
|
||||
<td align="left"><span><?php echo $t->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $t->paymentname?></span></td>
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($t->income,2,'.','');
|
||||
echo number_format($t->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($t->expense,2,'.','');
|
||||
echo number_format($t->expense,2,'.','');?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $t->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </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> </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'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
$( 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>
|
||||
|
||||
|
||||
|
||||
@ -1,9 +1,16 @@
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
$department='';
|
||||
if(!empty($departmentwise))
|
||||
{
|
||||
foreach($departmentwise as $dw)
|
||||
{
|
||||
$department=$dw->name;
|
||||
//echo $department;
|
||||
break;//echo $department;
|
||||
// echo $department;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -17,7 +24,8 @@ if(!empty($Indiancurrency))
|
||||
}}
|
||||
?>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<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 {
|
||||
@ -46,7 +54,7 @@ if(!empty($Indiancurrency))
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b> Monthly(Department Wise) Payments</b></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b><?php $month=date('F');echo $month;?> Report (DEP:<?php echo $department; ?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
@ -56,28 +64,38 @@ if(!empty($Indiancurrency))
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
<!--<th>Account Code</th>-->
|
||||
|
||||
<th>Account Name</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Type</th>
|
||||
|
||||
<th>Paid To</th>
|
||||
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($departmentwise)){
|
||||
<?php
|
||||
|
||||
$tvt=0.00;
|
||||
if(!empty($departmentwise)){
|
||||
foreach($departmentwise as $dw)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $dw->date?></span></td>
|
||||
<!--<td align="left"><span><?php echo $dw->account_code?></span></td>-->
|
||||
|
||||
<td align="left"><span><?php echo $dw->name?></span></td>
|
||||
<td align="left"><span><?php echo $dw->type?></span></td>
|
||||
<td align="right"><span><?php echo number_format($dw->total,2,'.','');?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $dw->paymentname?></span></td>
|
||||
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($dw->expense,2,'.','');
|
||||
echo number_format($dw->expense,2,'.','');?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $dw->description?></span></td>
|
||||
|
||||
@ -90,6 +108,32 @@ if(!empty($Indiancurrency))
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($tvt,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
<td> </td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -102,11 +146,13 @@ if(!empty($Indiancurrency))
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<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>
|
||||
|
||||
@ -118,14 +164,20 @@ $(document).ready(function() {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'PARTICULAR DEPARTMENT CASHBOOK REPORT',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
187
application/views/cashbookmonthlyexp.php
Normal file
187
application/views/cashbookmonthlyexp.php
Normal file
@ -0,0 +1,187 @@
|
||||
|
||||
|
||||
<?php
|
||||
$department='';
|
||||
if(!empty($departmentwise))
|
||||
{
|
||||
foreach($departmentwise as $dw)
|
||||
{
|
||||
$department=$dw->name;
|
||||
//echo $department;
|
||||
break;//echo $department;
|
||||
// echo $department;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$inrsymbol='';
|
||||
if(!empty($Indiancurrency))
|
||||
{
|
||||
foreach ($Indiancurrency as $inr)
|
||||
{
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
|
||||
<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" style="min-height: 600px;">
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="col-md-12 ">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b><?php $month=date('F');echo $month;?> Report (DEP:<?php echo $department; ?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Date</th>
|
||||
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th>Received From</th>
|
||||
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<th>Description</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$ti=0.00;
|
||||
|
||||
if(!empty($departmentwise)){
|
||||
foreach($departmentwise as $dw)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $dw->date?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $dw->name?></span></td>
|
||||
<td align="left"><span><?php echo $dw->type?></span></td>
|
||||
<td align="left"><span><?php echo $dw->receiptname?></span></td>
|
||||
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($dw->income,2,'.','');
|
||||
echo number_format($dw->income,2,'.','');?></span></td>
|
||||
|
||||
|
||||
<td align="left"><span><?php echo $dw->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
|
||||
<td style="text-align:right"><strong>
|
||||
<?php
|
||||
{
|
||||
echo number_format($ti,2,'.','');
|
||||
|
||||
}
|
||||
?>
|
||||
</strong>
|
||||
</td>
|
||||
|
||||
|
||||
<td> </td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
// Set up your table
|
||||
$(document).ready(function() {
|
||||
table = $('#req').DataTable( {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'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: 'PARTICULAR DEPARTMENT CASHBOOK REPORT',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@ -18,14 +18,17 @@ if(!empty($monthlyincreport))
|
||||
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<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;
|
||||
@ -36,6 +39,10 @@ if(!empty($monthlyincreport))
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -44,10 +51,10 @@ if(!empty($monthlyincreport))
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Monthly Payments </b></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
@ -56,31 +63,47 @@ if(!empty($monthlyincreport))
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<!--<th>Date</th>-->
|
||||
<!--<th>Account Code</th>-->
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<!--<th>Description</th>-->
|
||||
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<!--<th>Received From</th>
|
||||
<th>Paid To</th>-->
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($monthlyreport)){
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($monthlyreport)){
|
||||
foreach($monthlyreport as $mr)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<!--<td><span><?php echo $mr->date?></span></td>-->
|
||||
<!--<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>"><span><?php echo $mr->account_code?></span></a></td>-->
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>"><span><?php echo $mr->name?></span></a></td>
|
||||
<td align="left"><span><?php echo $mr->type?></span></td>
|
||||
<td align="right"><span><?php echo number_format($mr->total,2,'.','');?></span></td>
|
||||
<!--<td align="left"><span><?php echo $mr->account_code?></span></td>-->
|
||||
<!--<td align="left"><span><?php echo $mr->description?></span></td>-->
|
||||
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $mr->account_code;?>&d=<?php echo $mr->month?>&c=<?php echo $mr->type?>"><span><?php echo $mr->name?></span></a></td>
|
||||
<td align="left"><span><?php echo $mr->type?></span></td>
|
||||
<!--<td align="left"><span><?php echo $mr->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $mr->paymentname?></span></td>-->
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($mr->income,2,'.','');
|
||||
echo number_format($mr->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($mr->expense,2,'.','');
|
||||
echo number_format($mr->expense,2,'.','');?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -91,6 +114,39 @@ if(!empty($monthlyincreport))
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -103,11 +159,13 @@ if(!empty($monthlyincreport))
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<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>
|
||||
|
||||
@ -120,13 +178,19 @@ $(document).ready(function() {
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: ' DEPARTMENT WISE CASHBOOK REPORT',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
@ -8,53 +8,124 @@ if(!empty($Indiancurrency))
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
<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="content-wrapper">
|
||||
<section class="content">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<CENTER><h3 class="box-title">Today's Payment</h3></CENTER>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Today Report</b></p></h3></center>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div class="col-md-12">
|
||||
|
||||
<table class="table table-bordered table-hover" id="datatable" style="background-color:#fff;font-size:11px;" >
|
||||
<table class="table table-bordered table-hover" id="req" style="background-color:#fff;font-size:11px;" >
|
||||
<thead style="background-color:#ddf">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<!-- <th>Account Code</th>-->
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th>Received From</th>
|
||||
<th>Paid To</th>
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th>Description</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($tdy)){
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($tdy)){
|
||||
foreach($tdy as $t)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $t->date?></span></td>
|
||||
<!--<td align="left"><span><?php echo $t->account_code?></span></td>-->
|
||||
<td align="left"><span><?php echo $t->name ?></span></td>
|
||||
<!--<td align="left"><span><?php echo $t->towhom?></span></td>-->
|
||||
<td align="left"><span><?php echo $t->type?></span></td>
|
||||
<td align="left"><span><?php echo number_format($t->total,2,'.','');?></span></td>
|
||||
<td align="left"><span><?php echo $t->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $t->date?></span></td>
|
||||
<td align="left"><span><?php echo $t->name?></span></td>
|
||||
<td align="left"><span><?php echo $t->type?></span></td>
|
||||
<td align="left"><span><?php echo $t->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $t->paymentname?></span></td>
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($t->income,2,'.','');
|
||||
echo number_format($t->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($t->expense,2,'.','');
|
||||
echo number_format($t->expense,2,'.','');?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $t->description?></span></td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td> </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> </td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
@ -63,20 +134,39 @@ if(!empty($Indiancurrency))
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script type="text/javascript" src="<?php echo base_url(); ?>assets/js/common.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
$('#datatable').DataTable({
|
||||
"paging": true,
|
||||
"lengthChange": true,
|
||||
"searching": true,
|
||||
"ordering": true,
|
||||
"info": true,
|
||||
"autoWidth": true
|
||||
|
||||
});
|
||||
});
|
||||
<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-3'l><'col-md-9'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: 'DEPARTMENT WISE CASHBOOK REPORT',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</script>
|
||||
|
||||
@ -7,14 +7,16 @@ if(!empty($Indiancurrency))
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<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;
|
||||
@ -25,6 +27,10 @@ if(!empty($Indiancurrency))
|
||||
float: right;
|
||||
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
@ -35,26 +41,28 @@ if(!empty($Indiancurrency))
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Yearly Payments</b></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>YEAR REPORTS(2017-2018)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
<table class="table table-bordered table-hover" id="req"style="font-size:13px;">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<!--<th>Date</th>-->
|
||||
|
||||
<th>Month</th>
|
||||
<!-- <th>Paid To</th>-->
|
||||
<th>Paid Type</th>
|
||||
|
||||
<!--<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>-->
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<!--<th>Account Code</th>-->
|
||||
<!--<th>Description</th>-->
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($yearlyreport)){
|
||||
<?php
|
||||
|
||||
if(!empty($yearlyreport)){
|
||||
foreach($yearlyreport as $yr)
|
||||
{
|
||||
?>
|
||||
@ -62,11 +70,15 @@ if(!empty($Indiancurrency))
|
||||
|
||||
<!--<td><span><?php echo $yr->date?></span></td>-->
|
||||
<td align="left"><a href="<?= base_url() ?>report/yearmonthwise?sid=<?php echo $yr->month;?>"><span><?php echo $yr->month?></span></a></td>
|
||||
<!--<td align="right"><span><?php echo $yr->towhom?></span></td>-->
|
||||
<td align="left"><span><?php echo $yr->type?></span></td>
|
||||
<!--<td align="left"><span><?php echo $yr->type?></span></td>-->
|
||||
<!--<td align="right"><span><?php
|
||||
$ti= $ti + number_format($yr->income,2,'.','');
|
||||
echo number_format($yr->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($yr->expense,2,'.','');
|
||||
echo number_format($yr->expense,2,'.','');?></span></td>-->
|
||||
<td align="right"><span><?php echo number_format($yr->total,2,'.','');?></span></td>
|
||||
<!--<td align="right"><span><?php echo $yr->account_code?></span></td>
|
||||
<td align="right"><span><?php echo $yr->description?></span></td>-->
|
||||
|
||||
|
||||
|
||||
|
||||
@ -87,12 +99,14 @@ if(!empty($Indiancurrency))
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
@ -103,14 +117,20 @@ $(document).ready(function() {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'CASHBOOK REPORT- YEAR(2017-2018)',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
@ -9,8 +9,10 @@ if(!empty($Indiancurrency))
|
||||
$inrsymbol = $inr->FontCode2000;
|
||||
}}
|
||||
?>
|
||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.3.1/css/buttons.dataTables.min.css">
|
||||
<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%;
|
||||
@ -36,7 +38,7 @@ if(!empty($Indiancurrency))
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div id="panel-quick-actions" class="panel panel-default quick-actions">
|
||||
<div class="panel-heading">
|
||||
<center><b>Monthly Payments</b></center>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Month Report(<?php $month=date('F');echo $month;?>)</b></p></h3></center>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified no-margin">
|
||||
|
||||
@ -50,7 +52,10 @@ if(!empty($Indiancurrency))
|
||||
<!--<th>month</th>-->
|
||||
<!--<th>Paid To</th>-->
|
||||
<th>Paid Type</th>
|
||||
<th style="text-align:right;"> Amount <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<!--<th>Received From</th>
|
||||
<th>Paid To</th>-->
|
||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
||||
|
||||
<!--<th>Description</th>-->
|
||||
|
||||
@ -58,19 +63,31 @@ if(!empty($Indiancurrency))
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(!empty($yearmonthwise)){
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($yearmonthwise)){
|
||||
foreach($yearmonthwise as $ym)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<!--<td><span><?php echo $ym->date?></span></td>-->
|
||||
|
||||
<!--<td align="right"><span><a href="<?= base_url() ?>report/yearmonthwise"><?php echo $ym->month?></a></span></td>-->
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>"><span><?php echo $ym->name?></span></a></td>
|
||||
<td align="left"><a href="<?php echo base_url(); ?>report/cashbookdepartment?sid=<?php echo $ym->account_code;?>&d=<?php echo $ym->month?>&c=<?php echo $ym->type?>"><span><?php echo $ym->name?></span></a></td>
|
||||
<!--<td align="right"><span><?php echo $ym->towhom?></span></td>-->
|
||||
<td align="left"><span><?php echo $ym->type?></span></td>
|
||||
<td align="right"><span><?php echo number_format($ym->total,2,'.','');?></span></td>
|
||||
<!--<td align="right"><span><?php echo $ym->description?></span></td>-->
|
||||
<!--<td align="left"><span><?php echo $ym->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $ym->paymentname?></span></td>-->
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($ym->income,2,'.','');
|
||||
echo number_format($ym->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($ym->expense,2,'.','');
|
||||
echo number_format($ym->expense,2,'.','');?></span></td>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -81,6 +98,39 @@ if(!empty($Indiancurrency))
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot width="100%">
|
||||
<tr>
|
||||
<td style="text-align:left;"><strong>Total</strong></td>
|
||||
<td> </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>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -91,11 +141,13 @@ if(!empty($Indiancurrency))
|
||||
</div>
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<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>
|
||||
|
||||
@ -107,14 +159,20 @@ $(document).ready(function() {
|
||||
"dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" +
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
buttons: [
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'DEPARTMENT WISE CASHBOOK REPORT',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
621
application/views/editincomeexpenses.php
Normal file
621
application/views/editincomeexpenses.php
Normal file
@ -0,0 +1,621 @@
|
||||
|
||||
<?php //print_r($dropdownvalues);
|
||||
$accountcode1='';
|
||||
$type1='';
|
||||
$viewdep='';
|
||||
$dropdown='';
|
||||
$date1='';
|
||||
$gst1='';
|
||||
$invoiceno1='';
|
||||
$Merchant1='';
|
||||
$MerchantGST1='';
|
||||
$HSNSAC1='';
|
||||
$valuebeforegst1='';
|
||||
$SGST1='';
|
||||
$CGST1='';
|
||||
$IGST1='';
|
||||
$Description1='';
|
||||
$towhom1='';
|
||||
$id='';
|
||||
$file1='';
|
||||
$document = '';
|
||||
//print_r( $DepDetails);
|
||||
//print_r($dropdownvalues);die();
|
||||
if(!empty($DepDetails))
|
||||
{
|
||||
foreach ($DepDetails as $ded)
|
||||
{
|
||||
$document =$ded->document;
|
||||
//echo $document;
|
||||
$final = base_url().$document;
|
||||
//echo $final;
|
||||
// print_r( $DepDetails);die();
|
||||
$accountcode1=$ded->account_code;
|
||||
$id=$ded->id;
|
||||
$type1=$ded->type;
|
||||
$viewdep=$ded->total;
|
||||
$dropdown=$ded->name;
|
||||
$date1=$ded->date;
|
||||
$invoiceno1=$ded->invoice_no;
|
||||
$Merchant1=$ded->merchant;
|
||||
$MerchantGST1=$ded->merchant_gst;
|
||||
$HSNSAC1=$ded->HSN;
|
||||
$valuebeforegst1=$ded->value_before_gst;
|
||||
$SGST1=$ded->sgst;
|
||||
$CGST1=$ded->cgst;
|
||||
$IGST1=$ded->igst;
|
||||
$Description1=$ded->description;
|
||||
$towhom1=$ded->towhom;
|
||||
$file1=$ded->document;
|
||||
//echo $file1;
|
||||
}}
|
||||
?>
|
||||
|
||||
<script>
|
||||
//var drop=$("input[type=radio][name='range']:checked").val()
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
var type = "<?php echo $type1;?>";
|
||||
//alert(type);
|
||||
if(type == "RECEIPT")
|
||||
{
|
||||
|
||||
$('#myradio1').attr('checked','true');
|
||||
$('#towhom').text('Received From:');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#myradio2').attr('checked','true');
|
||||
$('#towhom').text('Paid To:');
|
||||
}
|
||||
// var isChecked = $('#RECEIPT').prop('checked');
|
||||
// //alert(isChecked);
|
||||
// if(isChecked)
|
||||
// {
|
||||
// $('#towhom').text('Received From:');
|
||||
// }
|
||||
|
||||
// //var isChecked2 = $('#PAYMENT').prop('checked');
|
||||
// //if(isChecked2)
|
||||
// else
|
||||
// {
|
||||
// $('#towhom').text('Paid To:');
|
||||
// }
|
||||
});
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
var t = [];
|
||||
var ex = [];
|
||||
var inc = [];
|
||||
t= <?php echo json_encode($dropdownvalues)?>;
|
||||
//$("#accode").prepend( $('<option></option>').val('<?php echo $accountcode1?>').html('<?php echo $dropdown?>'));
|
||||
|
||||
$.each(t,function(i,item){
|
||||
if(item.type == '<?php echo $type1?>')
|
||||
{
|
||||
$("#accode").append( $('<option></option>').val(item.code).html(item.name));
|
||||
}
|
||||
});
|
||||
|
||||
$('#accode option[value="<?php echo $accountcode1?>"]').prop('selected', true);
|
||||
|
||||
|
||||
|
||||
$('#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) {
|
||||
$('#receipt')
|
||||
.attr('src', e.target.result)
|
||||
.width(100)
|
||||
.height(100);
|
||||
//alert(e.target.result);
|
||||
};
|
||||
|
||||
reader.readAsDataURL(input.files[0]);
|
||||
$('#receipt').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>
|
||||
|
||||
<div class="content-wrapper" style="min-height: 537px;">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
<center>Siddharth Industries - Edit Income and Expense</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() ?>updateExpense" 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 Accounut type:</span> </b> </br></br>
|
||||
<tr>
|
||||
|
||||
|
||||
<!-- <td>
|
||||
<?php echo form_label('RECEIPT', 'RECEIPT') ." ". form_radio(array("name"=>"Range","id"=>"RECEIPT","value"=>"RECEIPT", 'checked'=>('RECEIPT' == $type1) ? TRUE : FALSE,'onchange'=>'SetVatorCST();')); ?> </td>
|
||||
|
||||
<td><?php echo form_label('PAYMENT', 'PAYMENT') ." ". form_radio(array("name"=>"Range","id"=>"PAYMENT","value"=>"PAYMENT", 'checked'=>('PAYMENT' == $type1) ? TRUE : FALSE,'onchange'=>'SetVatorCST();')); ?>
|
||||
</td> -->
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
|
||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio1" name="myradio" value="1" >RECEIPT
|
||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio2" name="myradio" value="2" >PAYMENT
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tr>
|
||||
|
||||
|
||||
</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 $date1; ?>">
|
||||
|
||||
</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" value="<?php echo $towhom1; ?>">
|
||||
<input type="hidden" class="form-control read_only" id="id1" name="id1" value="<?php echo $id; ?>">
|
||||
<input type="hidden" class="form-control read_only" id="accode1" name="accode1" value="<?php echo $accountcode1; ?>">
|
||||
|
||||
</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" value="<?php echo $invoiceno1; ?>">
|
||||
|
||||
</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" value="<?php echo $Merchant1; ?>">
|
||||
|
||||
</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" value="<?php echo $MerchantGST1 ; ?>">
|
||||
</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" value="<?php echo $HSNSAC1; ?>">
|
||||
</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)" value="<?php echo $valuebeforegst1; ?>">
|
||||
</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)" value="<?php echo $SGST1; ?>">
|
||||
|
||||
</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)" value="<?php echo $CGST1; ?>">
|
||||
|
||||
</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" value="<?php echo $IGST1; ?>">
|
||||
</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 $viewdep; ?>">
|
||||
</div>
|
||||
</div>
|
||||
</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">
|
||||
<?php echo $Description1;?>
|
||||
</textarea>
|
||||
</div>
|
||||
<div class="col-md-4" style="border:0px solid;">
|
||||
|
||||
<img id="receipt" src="<?php echo $final ?>" alt="No Receipt Available" style="width: 139px;height:139px;"/><br/>
|
||||
|
||||
<input type="button" onclick="DeleteRow();"class="btn btn-primary" value="Delete" />
|
||||
<b><span for="Description">File Upload:</span></b>
|
||||
|
||||
<input type='file' input accept=".JPG,.PNG" onchange="readURL(this);" id="file" name="myfile" accept="image/*"/ value="<?php echo $file1; ?>">
|
||||
|
||||
</div>
|
||||
<!--<div class="col-md-2">
|
||||
<b><span for="Description">File Upload:</span></b>
|
||||
<img id="slip" alt="your image" style="width: 139px;"/><br/>
|
||||
<input type='file' input accept=".JPG,.PNG" onchange="readURL(this);" id="file" name="myfile" accept="image/*"/ value="<?php echo $file1; ?>">
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- /.box-body -->
|
||||
|
||||
<div class="box-footer" style="text-align:right">
|
||||
<input type="button" onclick="validate();"class="btn btn-primary" value="update" />
|
||||
<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 SetVatorCST()
|
||||
// {
|
||||
// $('#RECEIPT').click(function(){
|
||||
|
||||
// $('#towhom').text('Received From:');
|
||||
// }
|
||||
|
||||
// $('#PAYMENT').click(function(){
|
||||
|
||||
// $('#towhom').text('Paid To:');
|
||||
|
||||
// });
|
||||
function DeleteRow()
|
||||
{
|
||||
var file = "<?php echo $file1;?>";
|
||||
//var id2='';
|
||||
var id2= $('#id1').val();
|
||||
//alert(file);
|
||||
//alert(id2);
|
||||
$.ajax({
|
||||
data:{id:file,ide:id2},
|
||||
type:"POST",
|
||||
url:"<?php echo base_url() ?>cashbook/deletefile",
|
||||
success:function(data) {
|
||||
if(data)
|
||||
{
|
||||
$('#content').loader('hide');
|
||||
alert(data);
|
||||
window.location ="cashbook/incomeExpenseList";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('delete successfully');
|
||||
window.location ="incomeExpenseList";
|
||||
}
|
||||
|
||||
}});
|
||||
}
|
||||
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>
|
||||
@ -1,4 +1,6 @@
|
||||
|
||||
<?php
|
||||
// print_r($list);
|
||||
// ?>
|
||||
<CENTER><strong><h3 class="box-title">Siddharth Industries - Income & Expense List</h3></strong></CENTER>
|
||||
<div class="content-wrapper">
|
||||
|
||||
@ -29,7 +31,7 @@
|
||||
<th>Account Name</th>
|
||||
<th>Amount</th>
|
||||
<th>Details</th>
|
||||
<!--<th>Action</th>-->
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="inexlistbody">
|
||||
@ -47,11 +49,11 @@
|
||||
<td><?php echo $l->name;?></td>
|
||||
<td style="text-align:right;"><?php echo $l->total;?></td>
|
||||
<td><?php echo $l->description;?></td>
|
||||
<!--<td>
|
||||
<a href="<?php echo base_url(); ?>cashbook/editcashbook"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the "></i> </a>
|
||||
<td>
|
||||
<a href="<?php echo base_url(); ?>cashbook/editcashbook?sid=<?php echo $l->id;?>"><i class="fa fa-pencil" data-toggle="tooltip" title="Click here to view/Edit the "></i> </a>
|
||||
|
||||
|
||||
</td>-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
|
||||
@ -85,12 +85,17 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
</script>
|
||||
<style>
|
||||
<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;
|
||||
@ -101,39 +106,11 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
float: right;
|
||||
|
||||
}
|
||||
table{
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
clear: both;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
word-wrap:break-word;
|
||||
|
||||
}
|
||||
|
||||
th, td { white-space: nowrap; }
|
||||
div.dataTables_wrapper {
|
||||
margin: 0 auto;
|
||||
|
||||
}
|
||||
|
||||
div.container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dataTables_paginate {
|
||||
margin-top: -25px;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
left: -20%;
|
||||
}
|
||||
|
||||
#container {
|
||||
min-width: 310px;
|
||||
max-width: 800px;
|
||||
height: 400px;
|
||||
margin: 0 auto
|
||||
}
|
||||
.btn-success {
|
||||
background-color: #3c8dbc;
|
||||
border-color: #3c8dbc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
@ -153,7 +130,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number" ><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's payments" ><?php echo "Today's Payments" ?></a></span>
|
||||
<span class="info-box-number" ><a href="<?php echo base_url().'report/Viewtoday' ?>" data-toggle="tooltip" title="Click here to View Today's payments" ><?php echo "Today" ?></a></span>
|
||||
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($today_in,2,'.',''); ?> </span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($today_ex,2,'.',''); ?> </span>
|
||||
@ -168,7 +145,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "Monthly Payments" ?></a></span>
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/monthexpenses' ?>" data-toggle="tooltip" title="Click here to View Monthly payments"><?php echo "This Month" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol.number_format($month_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
|
||||
</div>
|
||||
@ -181,7 +158,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly payments"><?php echo "Year Payments" ?></a></span>
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/yearexpenses' ?>" data-toggle="tooltip" title="Click here to View Yearly payments"><?php echo "This Year" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
|
||||
</div>
|
||||
@ -192,7 +169,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green" style="height: 90px;padding:25;"><i class="fa fa-hourglass-1 " style="padding: 5px; background-color:orange;"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/depmenu' ?>" data-toggle="tooltip" title="Click here to View Department payments"><?php echo "Dep Payments" ?></a></span>
|
||||
<span class="info-box-number"><a href="<?php echo base_url().'report/depmenu' ?>" data-toggle="tooltip" title="Click here to View Department payments"><?php echo "Reports" ?></a></span>
|
||||
<span class="info-box-text text-center"><strong>Receipt :</strong><?php echo $inrsymbol. number_format($year_in,2,'.',''); ?></span>
|
||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
|
||||
</div>
|
||||
@ -226,7 +203,7 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
|
||||
|
||||
<CENTER><h3 class="box-title"><strong>Day Wise Payment</strong></h3></CENTER>
|
||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Day Wise Report</b></p></h3></center>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<table class="table table-bordered table-hover" id="req" style="table-layout:auto;">
|
||||
@ -253,28 +230,27 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
<?php
|
||||
$ti=0.00;
|
||||
$tvt=0.00;
|
||||
if(!empty($cashbook)){
|
||||
|
||||
foreach($cashbook as $cash)
|
||||
{
|
||||
if(!empty($tdy)){
|
||||
foreach($tdy as $t)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
|
||||
<td><span><?php echo $cash->date?></span></td>
|
||||
<td align="left"><span><?php echo $cash->name?></span></td>
|
||||
<td align="left"><span><?php echo $cash->type?></span></td>
|
||||
<td align="left"><span><?php echo $cash->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $cash->paymentname?></span></td>
|
||||
<td><span><?php echo $t->date?></span></td>
|
||||
<td align="left"><span><?php echo $t->name?></span></td>
|
||||
<td align="left"><span><?php echo $t->type?></span></td>
|
||||
<td align="left"><span><?php echo $t->receiptname?></span></td>
|
||||
<td align="left"><span><?php echo $t->paymentname?></span></td>
|
||||
|
||||
<!--<td align="left"><span><?php echo $cash->expense?></span></td>-->
|
||||
<td align="right"><span><?php
|
||||
$ti= $ti + number_format($cash->income,2,'.','');
|
||||
echo number_format($cash->income,2,'.','');?></span></td>
|
||||
$ti= $ti + number_format($t->income,2,'.','');
|
||||
echo number_format($t->income,2,'.','');?></span></td>
|
||||
<td align="right"><span><?php
|
||||
$tvt= $tvt + number_format($cash->expense,2,'.','');
|
||||
echo number_format($cash->expense,2,'.','');?></span></td>
|
||||
$tvt= $tvt + number_format($t->expense,2,'.','');
|
||||
echo number_format($t->expense,2,'.','');?></span></td>
|
||||
|
||||
<td align="left"><span><?php echo $cash->description?></span></td>
|
||||
<td align="left"><span><?php echo $t->description?></span></td>
|
||||
|
||||
|
||||
|
||||
@ -333,14 +309,13 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
|
||||
|
||||
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/dataTables.buttons.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.flash.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.html5.min.js"></script>
|
||||
<script src="https://cdn.datatables.net/buttons/1.3.1/js/buttons.print.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
|
||||
<script src="https://code.highcharts.com/highcharts.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/series-label.js"></script>
|
||||
<script src="https://code.highcharts.com/modules/exporting.js"></script>
|
||||
<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() {
|
||||
@ -349,13 +324,19 @@ collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:
|
||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||
buttons: [
|
||||
{
|
||||
extend: 'collection',
|
||||
text: 'Export Cashbook Reports',
|
||||
buttons: [
|
||||
'excel'
|
||||
]
|
||||
}
|
||||
|
||||
{
|
||||
extend: 'excelHtml5',
|
||||
footer: 'true',
|
||||
messageTop: $('h3').text(),
|
||||
title: 'REPORT-Consolidate(Value)',
|
||||
exportOptions: {
|
||||
columns: ':visible'
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
'colvis'
|
||||
]
|
||||
} );
|
||||
} );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user