cashbook changes
This commit is contained in:
parent
8cde4aac39
commit
d6ee9e4ef1
@ -217,11 +217,15 @@ $route['EditMRIR'] = "MRIRcontroller/editmaterialinspectionreport";
|
|||||||
$route['ViewMRIR'] = "MRIRcontroller/viewmaterialinspectionreport";
|
$route['ViewMRIR'] = "MRIRcontroller/viewmaterialinspectionreport";
|
||||||
$route['Viewigr'] = "MRIRcontroller/viewinwardgateregister";
|
$route['Viewigr'] = "MRIRcontroller/viewinwardgateregister";
|
||||||
$route['Distribution'] = "MRIRcontroller/viewmMaterialDistributionList";
|
$route['Distribution'] = "MRIRcontroller/viewmMaterialDistributionList";
|
||||||
|
|
||||||
|
//<-------------Cashbook page----------------->
|
||||||
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
$route['ViewIncomeExpense'] = "cashbook/incomeExpenseList";
|
||||||
$route['EditIncomeExpense'] = "cashbook/editcashbook";
|
$route['EditIncomeExpense'] = "cashbook/editcashbook";
|
||||||
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
$route['addNewIncomeExpense'] = "cashbook/addNewIncomeExpenseLoad";
|
||||||
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
$route['addIncomeExpense'] = "cashbook/addIncomeExpense";
|
||||||
$route['updateExpense'] = "cashbook/updateExpense";
|
$route['updateExpense'] = "cashbook/updateExpense";
|
||||||
|
|
||||||
|
//<----------Cashbook page - Bank statement-------------->
|
||||||
$route['Bankingview']= "cashbook/bankfileview";
|
$route['Bankingview']= "cashbook/bankfileview";
|
||||||
$route['Bankfiletostatement']= "cashbook/bankfileupload";
|
$route['Bankfiletostatement']= "cashbook/bankfileupload";
|
||||||
$route['Bankingstatement']= "cashbook/bankdata";
|
$route['Bankingstatement']= "cashbook/bankdata";
|
||||||
@ -270,6 +274,8 @@ $route['cashbookreport']="report/cashbook";
|
|||||||
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
$route['cashbookmonthlyexpenses']="report/monthexpenses";
|
||||||
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
$route['cashbookyearlyexpenses']="report/yearexpenses";
|
||||||
$route['Empperform']="report/per";
|
$route['Empperform']="report/per";
|
||||||
|
$route['cashbookcumulativereport']="report/cashbook_cumulative_report";
|
||||||
|
$route['cashbookcumulativemonthreport']="report/cashbook_month_cumulative_report";
|
||||||
|
|
||||||
// Company Information
|
// Company Information
|
||||||
$route['companyview'] = 'companycontroller/companyview';
|
$route['companyview'] = 'companycontroller/companyview';
|
||||||
|
|||||||
@ -133,6 +133,23 @@ class cashbook extends BaseController
|
|||||||
$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense ';
|
$this->global['pageTitle'] = 'Siddharth : Cash Book: Add New Income Expense ';
|
||||||
$this->loadViews("addnewIncomeExpense", $this->global, $data , NULL);
|
$this->loadViews("addnewIncomeExpense", $this->global, $data , NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function autocomplete()
|
||||||
|
{
|
||||||
|
//$this->load->model('model','cashbook_model');
|
||||||
|
$mer = $this->input->get('query');
|
||||||
|
$query= $this->cashbook_model->checkMerchant($mer);
|
||||||
|
echo json_encode($query);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getSupplierDtls()
|
||||||
|
{
|
||||||
|
$s = $this->input->post('id');
|
||||||
|
$supp = $this->cashbook_model->getsupp_dtls($s);
|
||||||
|
echo json_encode($supp);
|
||||||
|
}
|
||||||
|
|
||||||
function bankfileview()
|
function bankfileview()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -342,7 +359,7 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
$balance=$totalbankamount-$totalamount;
|
$balance=$totalbankamount-$totalamount;
|
||||||
$created_by = $this->session->userdata('userId');
|
$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,'cashtype'=>$option,'bankid'=>$bankid,'totalbankamount'=>$totalbankamount,'balance'=>$balance,'amounttype'=>$amounttype);
|
$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,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'amounttype'=>$amounttype);
|
||||||
//print_r($addincomexpense);
|
//print_r($addincomexpense);
|
||||||
//die();
|
//die();
|
||||||
if($balance=='0')
|
if($balance=='0')
|
||||||
@ -648,6 +665,7 @@ class cashbook extends BaseController
|
|||||||
$bankid=$this->input->post('bankid');
|
$bankid=$this->input->post('bankid');
|
||||||
$normalid=$this->input->post('normalid');
|
$normalid=$this->input->post('normalid');
|
||||||
$bankamount=$this->input->post('bankamount');
|
$bankamount=$this->input->post('bankamount');
|
||||||
|
$gsttoggle = $this->input->post('gsttoggle');
|
||||||
$document =null;
|
$document =null;
|
||||||
|
|
||||||
//$document1=$this->input->post('myfile');
|
//$document1=$this->input->post('myfile');
|
||||||
@ -679,7 +697,7 @@ class cashbook extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$updateaccount = array('type'=>$option,'account_code'=>$accountcode1,'date'=>$date,'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);
|
$updateaccount = array('type'=>$option,'account_code'=>$accountcode1,'date'=>$date,'towhom'=>$towhome1,'invoice_no'=>$Invoiceno1,'merchant'=>$merchant1,'merchant_gst'=>$Merchantgst1,'HSN'=>$hsn1,'value_before_gst'=>$valuebeforegST1,'sgst'=>$SGST1,'cgst'=>$CGST1,'igst'=>$IGST1,'total'=>$totalamount1,'gststatus'=>(!empty($gsttoggle)?'1':'0'),'description'=>$description1,'document'=>$document);
|
||||||
$res = $this->cashbook_model->updatedepartment($updateaccount,$id1);
|
$res = $this->cashbook_model->updatedepartment($updateaccount,$id1);
|
||||||
//print_r($updateaccount);die();
|
//print_r($updateaccount);die();
|
||||||
$cashbookamount=$this->cashbook_model->cashbookamount($bankid);
|
$cashbookamount=$this->cashbook_model->cashbookamount($bankid);
|
||||||
|
|||||||
@ -523,7 +523,8 @@ class report extends BaseController
|
|||||||
$data['material']=$this->dahsboard_Model->material_name();
|
$data['material']=$this->dahsboard_Model->material_name();
|
||||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||||
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
$data['finyear']=$this->dahsboard_Model->report_finyear();
|
||||||
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat);
|
$data['purchase']=$this->dahsboard_Model->ireport_purchase($cname,$prod,$fa,$aa,$m,$frm,$t,$cat);
|
||||||
|
$data['cashbookdatas']=$this->dahsboard_Model->report_inwardcashbook($cname,$fa,$aa,$m,$frm,$t,$cat);
|
||||||
}
|
}
|
||||||
$data['material']=$this->dahsboard_Model->material_name();
|
$data['material']=$this->dahsboard_Model->material_name();
|
||||||
$data['cust']=$this->dahsboard_Model->customer_name();
|
$data['cust']=$this->dahsboard_Model->customer_name();
|
||||||
@ -1039,7 +1040,23 @@ class report extends BaseController
|
|||||||
// $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data_expense();
|
// $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data_expense();
|
||||||
// $data['todayincome']=$this->dahsboard_Model->today_data_income();
|
// $data['todayincome']=$this->dahsboard_Model->today_data_income();
|
||||||
// $data['todayexpense']=$this->dahsboard_Model->today_data_expense();
|
// $data['todayexpense']=$this->dahsboard_Model->today_data_expense();
|
||||||
|
$now = new DateTime();
|
||||||
|
|
||||||
|
$currentdate = $now->format('Y-m-d'); // MySQL datetime format
|
||||||
|
$yesterday = date('Y-m-d', strtotime("-1 day"));
|
||||||
|
|
||||||
|
$month = $now->format('m') ;
|
||||||
|
$year = $now->format('y');
|
||||||
|
|
||||||
|
$premonth = $month-1;
|
||||||
|
$premonth = $premonth < 10 ? '0'.$premonth : ''.$premonth;
|
||||||
|
$premonth = $premonth == '00' ? '12' : $premonth;
|
||||||
|
$yearvalue = $premonth == '12' ? $year-1 : $year;
|
||||||
|
$preyear = $yearvalue-1;
|
||||||
|
|
||||||
|
$data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($preyear,$yearvalue);
|
||||||
|
$data['prevmonthtotal']=$this->dahsboard_Model->monthbeforetotal($premonth,$yearvalue);
|
||||||
|
$data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday);
|
||||||
|
|
||||||
$this->loadviews("reportcashbook",$this->global,$data, NULL);
|
$this->loadviews("reportcashbook",$this->global,$data, NULL);
|
||||||
|
|
||||||
|
|||||||
@ -407,6 +407,33 @@ function debitlistpo($SupplierName,$fdate,$tdate,$pono)
|
|||||||
return $r->result();
|
return $r->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function checkMerchant($mer){
|
||||||
|
|
||||||
|
$temp[] = '' ;
|
||||||
|
$this->db->distinct();
|
||||||
|
$this->db->select('SupplierID,SupplierName');
|
||||||
|
$this->db->from('T_SupplierDetailsN');
|
||||||
|
$this->db->like('SupplierName',$mer);
|
||||||
|
$query = $this->db->get();
|
||||||
|
|
||||||
|
$temparr[] = '' ;
|
||||||
|
foreach($query->result() as $arr){
|
||||||
|
$temparr[] = $arr->SupplierName;
|
||||||
|
}
|
||||||
|
$temp['suggestions'] = $temparr;
|
||||||
|
|
||||||
|
return $temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getsupp_dtls($s){
|
||||||
|
$this->db->select('GSTNO');
|
||||||
|
$this->db->from('T_SupplierDetailsN');
|
||||||
|
$this->db->where('SupplierName',$s);
|
||||||
|
$r = $this->db->get();
|
||||||
|
return $r->result();
|
||||||
|
}
|
||||||
|
|
||||||
function getcustomer()
|
function getcustomer()
|
||||||
{
|
{
|
||||||
$this->db->select('client_name,client_id');
|
$this->db->select('client_name,client_id');
|
||||||
|
|||||||
@ -2160,6 +2160,41 @@ if ($cname!= ''){
|
|||||||
//echo $sql;
|
//echo $sql;
|
||||||
return $query->result();
|
return $query->result();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function report_inwardcashbook($cname,$fa,$aa,$m,$frm,$t,$cat){
|
||||||
|
|
||||||
|
$sql="select tinex.account_code as AccountCode,date_format(tinex.date,'%d-%m-%Y') as Date,ac.name as AccountName,
|
||||||
|
tinex.type as type,tinex.cashtype as category ,tinex.merchant as Suppliername, tinex.sgst as sgst,
|
||||||
|
tinex.value_before_gst as Value,tinex.cgst as cgst,tinex.igst as igst,
|
||||||
|
tinex.total as Total
|
||||||
|
FROM t_income_expense tinex
|
||||||
|
join t_accountcode ac on ac.code = tinex.account_code
|
||||||
|
where tinex.gststatus = '1' ";
|
||||||
|
|
||||||
|
if ($cname!= ''){
|
||||||
|
$sql.="and tinex.merchant = '".$cname."'";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($fa and $aa != ''){
|
||||||
|
$sql.=" and (tinex.created_on >= '".$fa."-04-01' and tinex.created_on <= '".$aa."-03-31')";
|
||||||
|
}
|
||||||
|
if ($m!= ''){
|
||||||
|
$sql.="and monthname(tinex.created_on) = '".$m."'";
|
||||||
|
}
|
||||||
|
if ($frm and $t != ''){
|
||||||
|
$fromd= date("Y-m-d",strtotime($frm));
|
||||||
|
$tod=date("Y-m-d",strtotime($t));
|
||||||
|
|
||||||
|
$sql.="and date(tinex.created_on) >= '".$fromd."'
|
||||||
|
and date(tinex.created_on) <= '".$tod."'";
|
||||||
|
}
|
||||||
|
if ($cat!= ''){
|
||||||
|
$sql.=" and tinex.type = '".$cat."' ";
|
||||||
|
}
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
function cashbook()
|
function cashbook()
|
||||||
{
|
{
|
||||||
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
$sql="SELECT date_format(tinc.date,'%d-%m-%Y')as date,
|
||||||
@ -2447,6 +2482,155 @@ function INRSymbol()
|
|||||||
return $query->result();
|
return $query->result();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function report_cumulative_cashbook(){
|
||||||
|
|
||||||
|
if (date('m') >= 4) {
|
||||||
|
$yearl = date('Y').'-'.(date('Y')+1);
|
||||||
|
} else {
|
||||||
|
$yearl = (date('Y')-1).'-'.date('Y');
|
||||||
|
}
|
||||||
|
$ab=$yearl;
|
||||||
|
$fa=substr($ab,0,-5);
|
||||||
|
$aa=substr($ab,5,5);
|
||||||
|
|
||||||
|
|
||||||
|
$sql = "SELECT year.name as name,year.yearexpense as yexp,year.yearincome as yinc,month.monthexpense as mexp,month.monthincome as minc,today.todayexpense as texp,today.todayincome as tinc
|
||||||
|
FROM (select ac1.name, ifnull(case
|
||||||
|
when tinc1.type = 'PAYMENT'
|
||||||
|
then sum(tinc1.total)
|
||||||
|
end,'0') as yearexpense,
|
||||||
|
ifnull(case
|
||||||
|
when tinc1.type = 'RECEIPT'
|
||||||
|
then sum(tinc1.total)
|
||||||
|
end, '0') as yearincome
|
||||||
|
FROM t_income_expense tinc1
|
||||||
|
join t_accountcode ac1 on ac1.code = tinc1.account_code
|
||||||
|
WHERE (tinc1.date >= '".$fa."-04-01' and tinc1.date <= '".$aa."-03-31')
|
||||||
|
group by ac1.name ) as year
|
||||||
|
left join
|
||||||
|
(select ac2.name ,ifnull(case
|
||||||
|
when tinc2.type = 'PAYMENT'
|
||||||
|
then sum(tinc2.total)
|
||||||
|
end,'0') as monthexpense,
|
||||||
|
ifnull(case
|
||||||
|
when tinc2.type = 'RECEIPT'
|
||||||
|
then sum(tinc2.total)
|
||||||
|
end, '0') as monthincome
|
||||||
|
FROM t_income_expense tinc2
|
||||||
|
join t_accountcode ac2 on ac2.code = tinc2.account_code
|
||||||
|
where month(tinc2.date) = month(current_date())
|
||||||
|
group by ac2.name) as month on month.name = year.name
|
||||||
|
left join
|
||||||
|
(select ac3.name ,ifnull(case
|
||||||
|
when tinc3.type = 'PAYMENT'
|
||||||
|
then sum(tinc3.total)
|
||||||
|
end,'0') as todayexpense,
|
||||||
|
ifnull(case
|
||||||
|
when tinc3.type = 'RECEIPT'
|
||||||
|
then sum(tinc3.total)
|
||||||
|
end, '0') as todayincome
|
||||||
|
FROM t_income_expense tinc3
|
||||||
|
join t_accountcode ac3 on ac3.code = tinc3.account_code
|
||||||
|
where date(tinc3.date) = current_date()
|
||||||
|
group by ac3.name ) as today on today.name=month.name
|
||||||
|
group by name ";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
function monthbeforetotal($month,$year){
|
||||||
|
|
||||||
|
$sql="SELECT month(date) as monthnum ,year(date) as yearnum,
|
||||||
|
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||||
|
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||||
|
FROM t_income_expense
|
||||||
|
WHERE
|
||||||
|
month(date) = '".$month."'and year(date) = '".$year."'";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function yearbeforetotal($pre,$curr){
|
||||||
|
$sql="SELECT
|
||||||
|
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||||
|
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||||
|
FROM t_income_expense
|
||||||
|
where date >= '".$pre."-04-01' and date <= '".$curr."-03-31'";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
//print_r($query->result());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function daybeforetotal($yesterday){
|
||||||
|
$sql="select date,
|
||||||
|
sum(if(type = 'PAYMENT',total,0)) as payment_amt,
|
||||||
|
sum(if(type = 'RECEIPT',total,0)) as receipt_amt
|
||||||
|
from t_income_expense
|
||||||
|
where date = ? ";
|
||||||
|
$query = $this->db->query($sql,array($yesterday));
|
||||||
|
return $query->result();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function report_cumulative_month_cashbook(){
|
||||||
|
|
||||||
|
if (date('m') >= 4) {
|
||||||
|
$yearl = date('Y').'-'.(date('Y')+1);
|
||||||
|
} else {
|
||||||
|
$yearl = (date('Y')-1).'-'.date('Y');
|
||||||
|
}
|
||||||
|
$ab=$yearl;
|
||||||
|
$fa=substr($ab,0,-5);
|
||||||
|
$aa=substr($ab,5,5);
|
||||||
|
|
||||||
|
$sql = "SELECT sub.name as name,
|
||||||
|
sub.expensetotal as Finyeartotalexpense,
|
||||||
|
sub.incometotal as Finyeartotalincome,
|
||||||
|
IF(month = 'Jan', sub.expensetotal, 0) AS 'Janexp',
|
||||||
|
IF(month = 'Feb', sub.expensetotal, 0) AS 'Febexp',
|
||||||
|
IF(month = 'Mar', sub.expensetotal, 0) AS 'Marexp',
|
||||||
|
IF(month = 'Apr', sub.expensetotal, 0) AS 'Aprexp',
|
||||||
|
IF(month = 'May', sub.expensetotal, 0) AS 'Mayexp',
|
||||||
|
IF(month = 'Jun', sub.expensetotal, 0) AS 'Junexp',
|
||||||
|
IF(month = 'Jul', sub.expensetotal, 0) AS 'Julexp',
|
||||||
|
IF(month = 'Aug', sub.expensetotal, 0) AS 'Augexp',
|
||||||
|
IF(month = 'Sep', sub.expensetotal, 0) AS 'Sepexp',
|
||||||
|
IF(month = 'Oct', sub.expensetotal, 0) AS 'Octexp',
|
||||||
|
IF(month = 'Nov', sub.expensetotal, 0) AS 'Novexp',
|
||||||
|
IF(month = 'Dec', sub.expensetotal, 0) AS 'Decexp',
|
||||||
|
IF(month = 'Jan', sub.incometotal, 0) AS 'Janinc',
|
||||||
|
IF(month = 'Feb', sub.incometotal, 0) AS 'Febinc',
|
||||||
|
IF(month = 'Mar', sub.incometotal, 0) AS 'Marinc',
|
||||||
|
IF(month = 'Apr', sub.incometotal, 0) AS 'Aprinc',
|
||||||
|
IF(month = 'May', sub.incometotal, 0) AS 'Mayinc',
|
||||||
|
IF(month = 'Jun', sub.incometotal, 0) AS 'Juninc',
|
||||||
|
IF(month = 'Jul', sub.incometotal, 0) AS 'Julinc',
|
||||||
|
IF(month = 'Aug', sub.incometotal, 0) AS 'Auginc',
|
||||||
|
IF(month = 'Sep', sub.incometotal, 0) AS 'Sepinc',
|
||||||
|
IF(month = 'Oct', sub.incometotal, 0) AS 'Octinc',
|
||||||
|
IF(month = 'Nov', sub.incometotal, 0) AS 'Novinc',
|
||||||
|
IF(month = 'Dec', sub.incometotal, 0) AS 'Decinc'
|
||||||
|
FROM (
|
||||||
|
select DATE_FORMAT(tinc1.date, '%b') AS month,ac1.name,
|
||||||
|
ifnull(case
|
||||||
|
when tinc1.type = 'PAYMENT'
|
||||||
|
then sum(tinc1.total)
|
||||||
|
end,'0') as expensetotal,
|
||||||
|
ifnull(case
|
||||||
|
when tinc1.type = 'RECEIPT'
|
||||||
|
then sum(tinc1.total)
|
||||||
|
end, '0') as incometotal
|
||||||
|
FROM t_income_expense tinc1
|
||||||
|
join t_accountcode ac1 on ac1.code = tinc1.account_code
|
||||||
|
WHERE (tinc1.date >='".$fa."-04-01' and tinc1.date <= '".$aa."-03-31')
|
||||||
|
GROUP BY ac1.name ) as sub
|
||||||
|
GROUP BY name ";
|
||||||
|
$query = $this->db->query($sql);
|
||||||
|
return $query->result();
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
|||||||
|
<script type="text/javascript" src="<?php echo base_url();?>assets/Autocomplete/jquery.autocomplete.js"></script>
|
||||||
<?php
|
<?php
|
||||||
foreach($dropdownvalues as $type)
|
foreach($dropdownvalues as $type)
|
||||||
{
|
{
|
||||||
@ -27,7 +27,6 @@ $(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('#gst').click(function(){
|
$('#gst').click(function(){
|
||||||
$('#gstarea').toggle();
|
$('#gstarea').toggle();
|
||||||
});
|
});
|
||||||
@ -38,9 +37,6 @@ $('#towhom').text('Received From:');
|
|||||||
//minDate : new Date(year-SIAStartYear,1,1),
|
//minDate : new Date(year-SIAStartYear,1,1),
|
||||||
maxDate :'now',
|
maxDate :'now',
|
||||||
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
|
dateFormat: 'dd-mm-yy',changeMonth: true, changeYear: true,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -75,11 +71,45 @@ function isNumberKey(evt)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function()
|
$(document).ready(function()
|
||||||
{
|
{
|
||||||
|
/**** autocomplete ****/
|
||||||
|
$('#merchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#merchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=merchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#merchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/**** autocomplete ends here ********/
|
||||||
|
|
||||||
var amounttype=localStorage.getItem('typeamount');
|
var amounttype=localStorage.getItem('typeamount');
|
||||||
//alert(amounttype+'atp');
|
//alert(amounttype+'atp');
|
||||||
if(amounttype==0)
|
if(amounttype==0)
|
||||||
@ -213,16 +243,20 @@ else
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.autocomplete-suggestion{
|
||||||
|
cursor:pointer;
|
||||||
|
background-color:skyblue;
|
||||||
|
/* background-color: darkgrey; */
|
||||||
|
outline: 1px solid slategrey;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<div class="content-wrapper" style="min-height: 537px;">
|
<div class="content-wrapper" style="min-height: 537px;">
|
||||||
<!-- Content Header (Page header) -->
|
<!-- Content Header (Page header) -->
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
<h1>
|
<h1>
|
||||||
<center>Siddharth Industries - Bank Statement(Receipt and Payment)</center>
|
<center>Siddharth Industries - Bank Statement(Receipt and Payment)</center>
|
||||||
|
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@ -234,89 +268,70 @@ else
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- left column -->
|
<!-- left column -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- general form elements -->
|
<!-- general form elements -->
|
||||||
|
|
||||||
<div class="box box-primary">
|
<div class="box box-primary">
|
||||||
|
|
||||||
<!-- form start -->
|
<!-- form start -->
|
||||||
|
|
||||||
<form role="form" id="addIncomeExpense" action="<?php echo base_url() ?>addIncomeExpense" enctype="multipart/form-data" method="post">
|
<form role="form" id="addIncomeExpense" action="<?php echo base_url() ?>addIncomeExpense" enctype="multipart/form-data" method="post">
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3 col-md-offset-9">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -5px;font-size:14px;background-color:#ccc;">
|
||||||
<div id="payment">
|
<center><b><p id="bankid">Payment ID: <b></p></b></center>
|
||||||
<div class="col-md-12">
|
<!-- <p style="margin-left:62px;padding-top:6px;" id="bankid" value="">Payment ID: <b></p> -->
|
||||||
<div class="col-md-3" >
|
|
||||||
<div class="form-group">
|
|
||||||
<b><span for="Accountcode">Select Account type:</span></b> </br></br>
|
|
||||||
|
|
||||||
<input type="radio" id="myradio2" name="myradio" value="2" checked>PAYMENT
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="receipt">
|
|
||||||
<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" id="myradio1" name="myradio" value="1" checked>RECEIPT
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</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 class="col-md-3">
|
|
||||||
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
|
||||||
<p style="margin-left:62px;padding-top:25px;" id="bankid" value="">Payment ID: <b></p>
|
|
||||||
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
||||||
<p style="margin-left:41px;" id="bamount" value="">Payment Amount: <b></b></p>
|
<p style="margin-left:41px;" id="bamount" value="">Payment Amount: <b></b></p>
|
||||||
<p style="margin-left:41px;" id="type" value="">Payment Amount Type: <b></b></p>
|
<p style="margin-left:41px;" id="type" value="">Payment Amount Type: <b></b></p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<div id="payment">
|
||||||
|
<input type="radio" id="myradio2" name="myradio" value="2" checked>PAYMENT
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="receipt">
|
||||||
|
<input type="radio" id="myradio1" name="myradio" value="1" checked>RECEIPT
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
|
<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>
|
||||||
<div class="row">
|
|
||||||
|
<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-12">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<input type="checkbox" id="gst" name="gsttoggle"> GST
|
<input type="checkbox" id="gst" name="gsttoggle"> GST
|
||||||
@ -343,8 +358,8 @@ else
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
||||||
<b><span for="Merchant">Merchant Name:</span></b>
|
<b><span for="Merchant">Merchant Name:</span></b>
|
||||||
<input type="text" class="form-control required" id="merchant" name="merchant">
|
<input type="text" class="form-control required" id="merchant" name="merchant" maxlength="255">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -453,43 +468,15 @@ else
|
|||||||
<input type="reset" class="btn btn-primary" value="Reset" />
|
<input type="reset" class="btn btn-primary" value="Reset" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div><!-- row close-->
|
||||||
</section>
|
</section><!-- content section closed -->
|
||||||
|
|
||||||
</div>
|
</div><!-- content wrapper div closed -->
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
function amountcheck()
|
function amountcheck()
|
||||||
|
|||||||
212
application/views/cashbook_cumulative_month_report.php
Executable file
212
application/views/cashbook_cumulative_month_report.php
Executable file
@ -0,0 +1,212 @@
|
|||||||
|
<?php
|
||||||
|
$tiapr=0.00;$timay=0.00;$tijun=0.00;$tijul=0.00;$tiaug=0.00;$tisep=0.00;$tioct=0.00;$tinov=0.00;$tidec=0.00;$tijan=0.00;$tifeb=0.00;$timar=0.00;
|
||||||
|
$teapr=0.00;$temay=0.00;$tejun=0.00;$tejul=0.00;$teaug=0.00;$tesep=0.00;$teoct=0.00;$tenov=0.00;$tedec=0.00;$tejan=0.00;$tefeb=0.00;$temar=0.00;
|
||||||
|
if (date('m') >= 4) {
|
||||||
|
$yearl = date('Y').'-'.(date('Y')+1);
|
||||||
|
} else {
|
||||||
|
$yearl = (date('Y')-1).'-'.date('Y');
|
||||||
|
}
|
||||||
|
$ab=$yearl;
|
||||||
|
$fa=substr($ab,0,-5);
|
||||||
|
$aa=substr($ab,5,5);
|
||||||
|
|
||||||
|
?>
|
||||||
|
<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;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #3c8dbc;
|
||||||
|
border-color: #3c8dbc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<section class="content">
|
||||||
|
<div class="row" style="min-height: 600px;">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="box box-info">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Cashbook - Cumulative Monthwise Report ( <?php echo $fa.'-'.$aa; ?> )</b></p></h3></center>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<div class = "table-responsive">
|
||||||
|
<table class="table table-bordered table-hover table-responsive" id="ccmonthwise" style="font-size:14px;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:center" rowspan="2">Account Name</th>
|
||||||
|
<th style="text-align:center" colspan="2">April</th>
|
||||||
|
<th style="text-align:center" colspan="2">May</th>
|
||||||
|
<th style="text-align:center" colspan="2">June</th>
|
||||||
|
<th style="text-align:center" colspan="2">July</th>
|
||||||
|
<th style="text-align:center" colspan="2">August</th>
|
||||||
|
<th style="text-align:center" colspan="2">September</th>
|
||||||
|
<th style="text-align:center" colspan="2">October</th>
|
||||||
|
<th style="text-align:center" colspan="2">November</th>
|
||||||
|
<th style="text-align:center" colspan="2">December</th>
|
||||||
|
<th style="text-align:center" colspan="2">January</th>
|
||||||
|
<th style="text-align:center" colspan="2">February </th>
|
||||||
|
<th style="text-align:center" colspan="2">March</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
|
||||||
|
if(!empty($datas)){
|
||||||
|
foreach($datas as $d)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $d->name; ?></td>
|
||||||
|
<td><?php $tiapr= $tiapr + number_format($d->Aprinc,2,'.',''); echo number_format($d->Aprinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $teapr= $teapr + number_format($d->Aprexp,2,'.',''); echo number_format($d->Aprexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $timay= $timay + number_format($d->Mayinc,2,'.',''); echo number_format($d->Mayinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $temay= $temay + number_format($d->Mayexp,2,'.',''); echo number_format($d->Mayexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tijun= $tijun + number_format($d->Juninc,2,'.',''); echo number_format($d->Juninc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tejun= $tejun + number_format($d->Junexp,2,'.',''); echo number_format($d->Junexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tijul= $tijul + number_format($d->Julinc,2,'.',''); echo number_format($d->Julinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tejul= $tejul + number_format($d->Julexp,2,'.',''); echo number_format($d->Julexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tiaug= $tiaug + number_format($d->Auginc,2,'.',''); echo number_format($d->Auginc,2,'.',''); ?></td>
|
||||||
|
<td><?php $teaug= $teaug + number_format($d->Augexp,2,'.',''); echo number_format($d->Augexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tisep= $tisep + number_format($d->Sepinc,2,'.',''); echo number_format($d->Sepinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tesep= $tesep + number_format($d->Sepexp,2,'.',''); echo number_format($d->Sepexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tioct= $tioct + number_format($d->Octinc,2,'.',''); echo number_format($d->Octinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $teoct= $teoct + number_format($d->Octexp,2,'.',''); echo number_format($d->Octexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tinov= $tinov + number_format($d->Novinc,2,'.',''); echo number_format($d->Novinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tenov= $tenov + number_format($d->Novexp,2,'.',''); echo number_format($d->Novexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tidec= $tidec + number_format($d->Decinc,2,'.',''); echo number_format($d->Decinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tedec= $tedec + number_format($d->Decexp,2,'.',''); echo number_format($d->Decexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tijan= $tijan + number_format($d->Janinc,2,'.',''); echo number_format($d->Janinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tejan= $tejan + number_format($d->Janexp,2,'.',''); echo number_format($d->Janexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $tifeb= $tifeb + number_format($d->Febinc,2,'.',''); echo number_format($d->Febinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $tefeb= $tefeb + number_format($d->Febexp,2,'.',''); echo number_format($d->Febexp,2,'.',''); ?></td>
|
||||||
|
<td><?php $timar= $timar + number_format($d->Marinc,2,'.',''); echo number_format($d->Marinc,2,'.',''); ?></td>
|
||||||
|
<td><?php $timar= $temar + number_format($d->Marexp,2,'.',''); echo number_format($d->Marexp,2,'.',''); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
|
</tbody>
|
||||||
|
<tfoot width="100%">
|
||||||
|
<tr>
|
||||||
|
<td><?php echo "TOTAL" ?></td>
|
||||||
|
<td><?php echo number_format($tiapr,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($teapr,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($timay,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($temay,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tijun,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tejun,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tijul,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tejul,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tiaug,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($teaug,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tisep,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tesep,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tioct,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($teoct,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tinov,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tenov,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tidec,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tedec,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tijan,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tejan,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tifeb,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($tifeb,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($timar,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($timar,2,'.',''); ?></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div><!-- /.box -->
|
||||||
|
</div><!-- /.col -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<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 = $('#ccmonthwise').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: $('h3').text(),
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
'colvis'
|
||||||
|
]
|
||||||
|
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
141
application/views/cashbook_cumulative_report.php
Executable file
141
application/views/cashbook_cumulative_report.php
Executable file
@ -0,0 +1,141 @@
|
|||||||
|
<?php //print_r($datas);
|
||||||
|
if (date('m') >= 4) {
|
||||||
|
$yearl = date('Y').'-'.(date('Y')+1);
|
||||||
|
} else {
|
||||||
|
$yearl = (date('Y')-1).'-'.date('Y');
|
||||||
|
}
|
||||||
|
$ab=$yearl;
|
||||||
|
$fa=substr($ab,0,-5);
|
||||||
|
$aa=substr($ab,5,5);
|
||||||
|
?>
|
||||||
|
<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;
|
||||||
|
|
||||||
|
}
|
||||||
|
.btn-success {
|
||||||
|
background-color: #3c8dbc;
|
||||||
|
border-color: #3c8dbc;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<div class="content-wrapper">
|
||||||
|
<section class="content">
|
||||||
|
<div class="row" style="min-height: 600px;">
|
||||||
|
<!-- 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 - Cumulative Report ( <?php echo $fa.'-'.$aa; ?> )</b></p></h3></center>
|
||||||
|
</div>
|
||||||
|
<!-- /.box-header -->
|
||||||
|
|
||||||
|
<div class="box-body">
|
||||||
|
<table class="table table-bordered table-hover" id="ccr" style="font-size:14px;">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<th style="text-align:center" rowspan="2">Account Name</th>
|
||||||
|
<th style="text-align:center" colspan="2"><?php echo date('d-m-Y'); ?></th>
|
||||||
|
<th style="text-align:center" colspan="2"><?php echo date('M-Y'); ?></th>
|
||||||
|
<th style="text-align:center" colspan="2"><?php echo $ab; ?></th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Receipt (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Recepit (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
<th style="text-align:center">Payment (<i class="fa fa-rupee "></i>)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php if(!empty($datas)){
|
||||||
|
foreach($datas as $d)
|
||||||
|
{
|
||||||
|
?>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td><?php echo $d->name; ?></td>
|
||||||
|
<td><?php if(empty($d->tinc)){ echo '0';}else{echo number_format($d->tinc,2,'.','');} ?></td>
|
||||||
|
<td><?php if(empty($d->texp)){ echo '0';}else{echo number_format($d->texp,2,'.','');} ?></td>
|
||||||
|
<td><?php echo number_format($d->minc,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($d->mexp,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($d->yinc,2,'.',''); ?></td>
|
||||||
|
<td><?php echo number_format($d->yexp,2,'.',''); ?></td>
|
||||||
|
</tr>
|
||||||
|
<?php }
|
||||||
|
} ?>
|
||||||
|
</tbody>
|
||||||
|
<tfoot width="100%">
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /.box -->
|
||||||
|
</div>
|
||||||
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<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 = $('#ccr').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: $('h3').text(),
|
||||||
|
exportOptions: {
|
||||||
|
columns: ':visible'
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
'colvis'
|
||||||
|
]
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
$('#mySelect').on('change',function(){
|
||||||
|
|
||||||
|
table
|
||||||
|
.column(4)
|
||||||
|
.search(this.value)
|
||||||
|
.draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
|
<script type="text/javascript" src="<?php echo base_url();?>assets/Autocomplete/jquery.autocomplete.js"></script>
|
||||||
<?php //print_r($dropdownvalues);
|
<?php //print_r($dropdownvalues);
|
||||||
$accountcode1='';
|
$accountcode1='';
|
||||||
$type1='';
|
$type1='';
|
||||||
@ -25,7 +25,7 @@ if(!empty($DepDetails))
|
|||||||
{
|
{
|
||||||
foreach ($DepDetails as $ded)
|
foreach ($DepDetails as $ded)
|
||||||
{
|
{
|
||||||
$document =$ded->document;
|
$document =$ded->document;
|
||||||
//echo $document;
|
//echo $document;
|
||||||
$final = base_url().$document;
|
$final = base_url().$document;
|
||||||
//echo $final;
|
//echo $final;
|
||||||
@ -50,6 +50,7 @@ if(!empty($DepDetails))
|
|||||||
$MerchantGST1=$ded->merchant_gst;
|
$MerchantGST1=$ded->merchant_gst;
|
||||||
$HSNSAC1=$ded->HSN;
|
$HSNSAC1=$ded->HSN;
|
||||||
$valuebeforegst1=$ded->value_before_gst;
|
$valuebeforegst1=$ded->value_before_gst;
|
||||||
|
$gst1=$ded->gststatus;
|
||||||
$SGST1=$ded->sgst;
|
$SGST1=$ded->sgst;
|
||||||
$CGST1=$ded->cgst;
|
$CGST1=$ded->cgst;
|
||||||
$IGST1=$ded->igst;
|
$IGST1=$ded->igst;
|
||||||
@ -58,9 +59,18 @@ if(!empty($DepDetails))
|
|||||||
$balancetoupdate=($bankamount)-($alreadypaid+$alreadyreceived);
|
$balancetoupdate=($bankamount)-($alreadypaid+$alreadyreceived);
|
||||||
//$file1=$ded->document;
|
//$file1=$ded->document;
|
||||||
//echo $file1;
|
//echo $file1;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.autocomplete-suggestion{
|
||||||
|
cursor:pointer;
|
||||||
|
background-color:skyblue;
|
||||||
|
/* background-color: darkgrey; */
|
||||||
|
outline: 1px solid slategrey;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
//var drop=$("input[type=radio][name='range']:checked").val()
|
//var drop=$("input[type=radio][name='range']:checked").val()
|
||||||
@ -92,6 +102,42 @@ $(document).ready(function(){
|
|||||||
$('#myradio2').attr('checked','true');
|
$('#myradio2').attr('checked','true');
|
||||||
$('#towhom').text('Paid To:');
|
$('#towhom').text('Paid To:');
|
||||||
}
|
}
|
||||||
|
/**** autocomplete ****/
|
||||||
|
$('#merchant').autocomplete({
|
||||||
|
|
||||||
|
onSearchStart: function (query) {
|
||||||
|
$('#merchant').autocomplete("option", "minLength", 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
serviceUrl: "<?php echo base_url();?>cashbook/autocomplete",
|
||||||
|
onSelect: function (suggestion) {
|
||||||
|
|
||||||
|
var data = suggestion.SupplierName;
|
||||||
|
var selectedvalue = $('input[name=merchant]').val();
|
||||||
|
if(selectedvalue != ' ' )
|
||||||
|
{
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
data:{id:selectedvalue},
|
||||||
|
type:"POST",
|
||||||
|
url:"<?php echo base_url();?>cashbook/getSupplierDtls",
|
||||||
|
success:function(data) {
|
||||||
|
var supplier_gstno = '';
|
||||||
|
if(data != '')
|
||||||
|
{
|
||||||
|
|
||||||
|
data = JSON.parse(data);
|
||||||
|
$.each(data,function(i,arr){
|
||||||
|
supplier_gstno = arr.GSTNO;
|
||||||
|
});
|
||||||
|
$("#merchantgst").val(supplier_gstno);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/**** autocomplete ends here ********/
|
||||||
// var isChecked = $('#RECEIPT').prop('checked');
|
// var isChecked = $('#RECEIPT').prop('checked');
|
||||||
// //alert(isChecked);
|
// //alert(isChecked);
|
||||||
// if(isChecked)
|
// if(isChecked)
|
||||||
@ -126,10 +172,22 @@ $(function() {
|
|||||||
$('#accode option[value="<?php echo $accountcode1?>"]').prop('selected', true);
|
$('#accode option[value="<?php echo $accountcode1?>"]').prop('selected', true);
|
||||||
|
|
||||||
|
|
||||||
|
var gst = '<?php echo $gst1 ?>';
|
||||||
$('#gst').click(function(){
|
//alert(gst);
|
||||||
$('#gstarea').toggle();
|
if(gst == '1'){
|
||||||
});
|
// alert('1');
|
||||||
|
$('#gst').attr('checked','true');
|
||||||
|
$('#gstarea').toggle();
|
||||||
|
}
|
||||||
|
// else
|
||||||
|
// if(gst == '0'){
|
||||||
|
// alert('0');
|
||||||
|
// //$('#gst').attr('checked','false');
|
||||||
|
// }
|
||||||
|
|
||||||
|
$('#gst').click(function(){
|
||||||
|
$('#gstarea').toggle();
|
||||||
|
});
|
||||||
|
|
||||||
// $('#towhom').text('Received From:');
|
// $('#towhom').text('Received From:');
|
||||||
|
|
||||||
@ -223,21 +281,7 @@ function loadAccountType(id)
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Siddharth Industries - Edit Receipt and Payment</b></p></h3></center>
|
<center><h3 class="box-title"><p style="color:#3c8dbc"><b>Siddharth Industries - Edit Receipt and Payment</b></p></h3></center>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<div id="detail">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-3 col-md-offset-9">
|
|
||||||
<div style=" border: 2px solid black;margin-left:0%;margin-top: -55px;font-size:14px;background-color:#ccc;">
|
|
||||||
<p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p>
|
|
||||||
<p style="margin-left:41px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
|
||||||
<p style="margin-left:41px;">Payment Mode: <b>Bank</b></p>
|
|
||||||
<p style="margin-left:41px;" id="rembalance">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div style="text-align:right;">
|
<div style="text-align:right;">
|
||||||
<a href="<?php base_url() ?>incomeExpenseList" class="btn btn-primary" value="Back"/>Back</a>
|
<a href="<?php base_url() ?>incomeExpenseList" class="btn btn-primary" value="Back"/>Back</a>
|
||||||
@ -255,64 +299,69 @@ function loadAccountType(id)
|
|||||||
<form role="form" id="addIncomeExpense" action="<?php echo base_url() ?>updateExpense" enctype="multipart/form-data" method="post">
|
<form role="form" id="addIncomeExpense" action="<?php echo base_url() ?>updateExpense" enctype="multipart/form-data" method="post">
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="row">
|
|
||||||
|
<div id="detail">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4 col-md-offset-8" style="padding-left: 109px;">
|
||||||
|
<div style=" border: 2px solid black;margin-left:0%;margin-top: -5px;font-size:14px;background-color:#ccc;">
|
||||||
|
<!-- <p style="margin-left:62px;padding-top:30px;">Payment ID: <b><?php echo $bankid;?></b></p> -->
|
||||||
|
<center><b><p id="bankid">Payment ID: <b><?php echo $bankid;?><b></p></b></center>
|
||||||
|
<p style="margin-left:20px;">Total Amount: <b><?php echo $bankamount; ?></b>Rs</p>
|
||||||
|
<p style="margin-left:20px;">Payment Mode: <b>Bank</b></p>
|
||||||
|
<p style="margin-left:20px;" id="rembalance">Remaining Balance: <b><?php echo $balancetoupdate; ?></b>Rs</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<!-- <?php echo $gst1 ?> -->
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<b><span for="Accountcode">Select Accounut type:</span> </b> </br></br>
|
<b><span for="Accountcode">Select Accounut type:</span> </b> </br></br>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
|
<!-- <td>
|
||||||
<!-- <td>
|
<?php echo form_label('RECEIPT', 'RECEIPT') ." ". form_radio(array("name"=>"Range","id"=>"RECEIPT","value"=>"RECEIPT", 'checked'=>('RECEIPT' == $type1) ? TRUE : FALSE,'onchange'=>'SetVatorCST();')); ?> </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> -->
|
||||||
<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="row">
|
<div class="row" style="padding-left: 14px;">
|
||||||
<?php
|
<?php
|
||||||
if($type1=='RECEIPT')
|
if($type1=='RECEIPT')
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio1" name="myradio" value="1" >RECEIPT
|
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio1" name="myradio" value="1" >RECEIPT
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
?>
|
?>
|
||||||
|
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio2" name="myradio" value="2" >PAYMENT
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<input type="radio" onclick = "loadAccountType(this.id);" id="myradio2" name="myradio" value="2" >PAYMENT
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group"><b>
|
<div class="form-group"><b>
|
||||||
<span for="PONO">Account Name Select:</span> </b><span style="color:red">*</span> </br></br>
|
<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" >
|
<select class="form-control required " required id="accode" required name="accode" >
|
||||||
<option value="-1">Account Name Select</option>
|
<option value="-1">Account Name Select</option>
|
||||||
|
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<b>
|
<b><span for="PODescription">Date:</span></b><span style="color:red">*</span></br></br>
|
||||||
<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; ?>">
|
<input type="text" class="form-control required" id="Date" name="Date" value="<?php echo $date1; ?>">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -355,23 +404,17 @@ function loadAccountType(id)
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
<b><span for="Merchant">Merchant Name:</span></b>
|
<b><span for="Merchant">Merchant Name:</span></b>
|
||||||
<input type="text" class="form-control required" id="merchant" name="merchant" value="<?php echo $Merchant1; ?>">
|
<input type="text" class="form-control required" id="merchant" name="merchant" value="<?php echo $Merchant1; ?>" maxlength="255">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<b>
|
<b>
|
||||||
<span for="Merchantgst">Merchant GST No:</span></b>
|
<span for="Merchantgst">Merchant GST No:</span></b>
|
||||||
|
|
||||||
<input id="merchantgst" name="Merchantgst" class="form-control" value="<?php echo $MerchantGST1 ; ?>">
|
<input id="merchantgst" name="Merchantgst" class="form-control" value="<?php echo $MerchantGST1 ; ?>">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -445,7 +488,7 @@ function loadAccountType(id)
|
|||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4" style="padding-left: 22.5px;">
|
||||||
<b><span for="Description">Description:</span></b>
|
<b><span for="Description">Description:</span></b>
|
||||||
|
|
||||||
<textarea class="form-control" id="description" name="description">
|
<textarea class="form-control" id="description" name="description">
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
// print_r($list);
|
// print_r($list);
|
||||||
// ?>
|
// ?>
|
||||||
<CENTER><strong><h3 class="box-title">Siddharth Industries - Receipt and Payment List</h3></strong></CENTER>
|
<!-- <CENTER><strong><h3 class="box-title">Siddharth Industries - Receipt and Payment List</h3></strong></CENTER> -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
|
||||||
|
|
||||||
@ -10,7 +10,8 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
|
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
|
<CENTER><strong><h3 class="box-title">Siddharth Industries - Receipt and Payment List</h3></strong></CENTER>
|
||||||
|
|
||||||
<div align="right" style="padding-right:10px">
|
<div align="right" style="padding-right:10px">
|
||||||
<a href="addNewIncomeExpense" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
|
<a href="addNewIncomeExpense" class="btn btn-primary" align="right"style="padding-right:10px" >Add New</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,20 +1,15 @@
|
|||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
$strday_balances = '';
|
||||||
|
$premonth_balances = '' ;
|
||||||
|
$preyear_balances = '' ;
|
||||||
$today_in='';
|
$today_in='';
|
||||||
$today_ex='';
|
$today_ex='';
|
||||||
$month_in='';
|
$month_in='';
|
||||||
$month_ex='';
|
$month_ex='';
|
||||||
$year_in='';
|
$year_in='';
|
||||||
$year_ex='';
|
$year_ex='';
|
||||||
if(!empty($cashbook))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
if(!empty($monthlyreport))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!empty($todayincome))
|
if(!empty($todayincome))
|
||||||
{
|
{
|
||||||
@ -57,19 +52,31 @@ if(!empty($todayincome))
|
|||||||
$year_in = $yi->yearlydata;
|
$year_in = $yi->yearlydata;
|
||||||
}}
|
}}
|
||||||
|
|
||||||
$inrsymbol='';
|
if(!empty($yesterdaytotal))
|
||||||
if(!empty($Indiancurrency))
|
{
|
||||||
{
|
foreach ($yesterdaytotal as $ttl)
|
||||||
foreach ($Indiancurrency as $inr)
|
{
|
||||||
{
|
$strdaydate = $ttl->date;
|
||||||
$inrsymbol = $inr->FontCode2000;
|
$strday_balances = ($ttl->payment_amt)-($ttl->receipt_amt);
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
if(!empty($prevmonthtotal))
|
||||||
|
{
|
||||||
|
foreach ($prevmonthtotal as $prevttl){
|
||||||
|
$premonth_balances = ($prevttl->payment_amt) - ($prevttl->receipt_amt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!empty($b4finyeartotal)){
|
||||||
|
foreach ($b4finyeartotal as $preyearttl)
|
||||||
|
{
|
||||||
|
$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.4.2/css/buttons.dataTables.min.css">
|
||||||
<style>
|
<style>
|
||||||
@ -95,13 +102,9 @@ if(!empty($todayincome))
|
|||||||
background-color: #3c8dbc;
|
background-color: #3c8dbc;
|
||||||
border-color: #3c8dbc;
|
border-color: #3c8dbc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</style>
|
<div class="content-wrapper">
|
||||||
<div class="content-wrapper">
|
<div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<section class="content-header">
|
<section class="content-header">
|
||||||
|
|
||||||
|
|
||||||
@ -115,13 +118,13 @@ if(!empty($todayincome))
|
|||||||
<div class="clearfix visible-sm-block"></div>
|
<div class="clearfix visible-sm-block"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<span class="info-box-icon bg-red" style="height: 90px;padding:25px;"><i class="fa fa-hourglass-end"></i></span>
|
<span class="info-box-icon bg-red" style="height: 117px;padding: 35px;width: 120px;"><i class="fa fa-hourglass-end"></i></span>
|
||||||
<div class="info-box-content">
|
<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" ?></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>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($strday_balances,2,'.',''); ?> </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>Receipt :</strong><i class="fa fa-rupee "></i><?php echo 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>
|
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($today_ex,2,'.',''); ?> </span>
|
||||||
|
<span class="info-box-text text-center"><strong>Closing Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format(($strday_balances+$today_in-$today_ex),2,'.',''); ?> </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -130,11 +133,13 @@ if(!empty($todayincome))
|
|||||||
<div class="clearfix visible-sm-block"></div>
|
<div class="clearfix visible-sm-block"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
<span class="info-box-icon bg-aqua" style="height: 90px;padding:25px;"><i<i class="fa fa-spinner"></span>
|
<span class="info-box-icon bg-aqua" style="height: 117px;padding: 35px;width: 120px;"><i<i class="fa fa-spinner"></span>
|
||||||
<div class="info-box-content">
|
<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 "This Month" ?></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>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($premonth_balances,2,'.',''); ?> </span>
|
||||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($month_ex,2,'.',''); ?></span>
|
<span class="info-box-text text-center"><strong>Receipt :</strong><i class="fa fa-rupee "></i><?php echo number_format($month_in,2,'.',''); ?></span>
|
||||||
|
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($month_ex,2,'.',''); ?></span>
|
||||||
|
<span class="info-box-text text-center"><strong>Closing Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format(($premonth_balances+$month_in-$month_ex),2,'.',''); ?> </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -143,11 +148,13 @@ if(!empty($todayincome))
|
|||||||
<div class="clearfix visible-sm-block"></div>
|
<div class="clearfix visible-sm-block"></div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="info-box">
|
<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>
|
<span class="info-box-icon bg-green" style="height: 117px;padding: 35px;width: 120px;"><i class="fa fa-industry" style="padding: 5px;"></i></span>
|
||||||
<div class="info-box-content">
|
<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 "This Year" ?></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>Opening Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($preyear_balances,2,'.',''); ?></span>
|
||||||
<span class="info-box-text text-center"><strong>Payment :</strong><?php echo $inrsymbol.number_format($year_ex,2,'.',''); ?></span>
|
<span class="info-box-text text-center"><strong>Receipt :</strong><i class="fa fa-rupee "></i><?php echo number_format($year_in,2,'.',''); ?></span>
|
||||||
|
<span class="info-box-text text-center"><strong>Payment :</strong><i class="fa fa-rupee "></i><?php echo number_format($year_ex,2,'.',''); ?></span>
|
||||||
|
<span class="info-box-text text-center"><strong>Closing Balances :</strong><i class="fa fa-rupee "></i><?php echo number_format($preyear_balances+$year_in-$year_ex,2,'.',''); ?> </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -169,9 +176,7 @@ if(!empty($todayincome))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Left col -->
|
<!-- Left col -->
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<!-- TABLE: LATEST ORDERS -->
|
<!-- TABLE: LATEST ORDERS -->
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
@ -190,19 +195,15 @@ if(!empty($todayincome))
|
|||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<!--<th>Account Code</th>-->
|
<th>Account Name</th>
|
||||||
<th>Account Name</th>
|
<th>Type</th>
|
||||||
<th>Type</th>
|
<th>Received From</th>
|
||||||
<th>Received From</th>
|
<th>Paid To</th>
|
||||||
<th>Paid To</th>
|
<th style="text-align:right;"> Receipt (<i class="fa fa-rupee ">)</th>
|
||||||
<!--<th>Paid Type(RECEIPT)</th>-->
|
<th style="text-align:right;"> Payment (<i class="fa fa-rupee ">)</th>
|
||||||
<!--<th>Paid Type(PAYMENTS)</th>-->
|
<th>Description</th>
|
||||||
<th style="text-align:right;"> Receipt <?php echo '('.$inrsymbol.')' ?></th>
|
<th>File</th>
|
||||||
<th style="text-align:right;"> Payment <?php echo '('.$inrsymbol.')' ?></th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th>File</th>
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -215,20 +216,17 @@ if(!empty($todayincome))
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td><span><?php echo $t->date?></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->name?></span></td>
|
||||||
<td align="left"><span><?php echo $t->type?></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->receiptname?></span></td>
|
||||||
<td align="left"><span><?php echo $t->paymentname?></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
|
<td align="right"><span><?php
|
||||||
$ti= $ti + number_format($t->income,2,'.','');
|
$ti= $ti + number_format($t->income,2,'.','');
|
||||||
echo number_format($t->income,2,'.','');?></span></td>
|
echo number_format($t->income,2,'.','');?></span></td>
|
||||||
<td align="right"><span><?php
|
<td align="right"><span><?php
|
||||||
$tvt= $tvt + number_format($t->expense,2,'.','');
|
$tvt= $tvt + number_format($t->expense,2,'.','');
|
||||||
echo number_format($t->expense,2,'.','');?></span></td>
|
echo number_format($t->expense,2,'.','');?></span></td>
|
||||||
|
|
||||||
<td align="left"><span><?php echo $t->description?></span></td>
|
<td align="left"><span><?php echo $t->description?></span></td>
|
||||||
<td>
|
<td>
|
||||||
<?php
|
<?php
|
||||||
@ -247,12 +245,7 @@ if(!empty($todayincome))
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -287,10 +280,7 @@ if(!empty($todayincome))
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</tfoot>
|
</tfoot>
|
||||||
@ -302,8 +292,7 @@ if(!empty($todayincome))
|
|||||||
<!-- /.box -->
|
<!-- /.box -->
|
||||||
</div>
|
</div>
|
||||||
<!-- /.col -->
|
<!-- /.col -->
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -324,7 +313,6 @@ if(!empty($todayincome))
|
|||||||
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
"dom": "<'row'<'col-md-6'l><'col-md-6'Bf>>" +
|
||||||
"<'row'<'col-md-6'><'col-md-6'>>" +
|
"<'row'<'col-md-6'><'col-md-6'>>" +
|
||||||
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
"<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>",
|
||||||
// "bSort": false,
|
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,6 +62,8 @@
|
|||||||
<div class="col-xs-3">
|
<div class="col-xs-3">
|
||||||
<h4><span class="fa fa-inr"> Cashbook </span></h4>
|
<h4><span class="fa fa-inr"> Cashbook </span></h4>
|
||||||
<a href="<?php echo base_url(); ?>cashbookreport" target="_blank" >Cashbook Reports<p class="uk-text uk-margin-remove"></p></a>
|
<a href="<?php echo base_url(); ?>cashbookreport" target="_blank" >Cashbook Reports<p class="uk-text uk-margin-remove"></p></a>
|
||||||
|
<a href="<?php echo base_url(); ?>cashbookcumulativereport" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Cumulative Reports</p></a>
|
||||||
|
<a href="<?php echo base_url(); ?>cashbookcumulativemonthreport" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Cumulative Month Reports</p></a>
|
||||||
<!--<a href="<?php echo base_url(); ?>cashbookmonthlyexpenses" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Monthly Expenses</p></a>
|
<!--<a href="<?php echo base_url(); ?>cashbookmonthlyexpenses" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Monthly Expenses</p></a>
|
||||||
<a href="<?php echo base_url(); ?>cashbookyearlyexpenses" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Yearly Expenses</p></a>-->
|
<a href="<?php echo base_url(); ?>cashbookyearlyexpenses" target="_blank" ><p class="uk-text uk-margin-remove">Cashbook Yearly Expenses</p></a>-->
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user