From 6c01ea7ec5cd8a03fb5f985a43e9665159b81ef5 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Sat, 24 Feb 2018 18:25:52 +0530 Subject: [PATCH] cashbook report changes --- application/controllers/report.php | 226 +++++---- application/models/dahsboard_model.php | 81 ++- application/views/cashbookall.php | 323 ------------ application/views/cashbookdepday.php | 116 ----- application/views/cashbookdepmenu.php | 125 ----- application/views/cashbookmonthlyexpenses.php | 203 -------- application/views/cashbookmonthmenu.php | 83 --- ...monthlydep.php => cashbookmthlypaydep.php} | 136 ++--- ...monthlyexp.php => cashbookmthlyrecdep.php} | 131 ++--- application/views/cashbookmthlyreport.php | 245 +++++++++ application/views/cashbookpdf.php | 22 +- application/views/cashbooktoday.php | 272 +++++----- application/views/cashbookyearlyexpenses.php | 213 -------- application/views/cashbookyearlyreport.php | 209 ++++++++ application/views/cashbookyearmonthwise.php | 191 +++---- application/views/reportcashbook.php | 471 +++++++++--------- application/views/reportslink.php | 4 +- 17 files changed, 1205 insertions(+), 1846 deletions(-) delete mode 100755 application/views/cashbookall.php delete mode 100755 application/views/cashbookdepday.php delete mode 100755 application/views/cashbookdepmenu.php delete mode 100755 application/views/cashbookmonthlyexpenses.php delete mode 100755 application/views/cashbookmonthmenu.php rename application/views/{cashbookmonthlydep.php => cashbookmthlypaydep.php} (58%) rename application/views/{cashbookmonthlyexp.php => cashbookmthlyrecdep.php} (59%) create mode 100755 application/views/cashbookmthlyreport.php delete mode 100755 application/views/cashbookyearlyexpenses.php create mode 100755 application/views/cashbookyearlyreport.php diff --git a/application/controllers/report.php b/application/controllers/report.php index c915d0fb..c10ce962 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -985,7 +985,7 @@ class report extends BaseController public function per() { - $this->global['pageTitle'] = 'Siddharth : Reports'; + $this->global['pageTitle'] = 'Resico : Reports'; $ab=$this->input->post('financialyear'); @@ -1007,150 +1007,172 @@ class report extends BaseController public function cashbook() { - $this->global['pageTitle'] = 'Cashbook - Cashbook Reports - '; - - $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); - $data['getTotalServicePoCount'] = $this->dahsboard_Model->getTotalServicePoCount(); - $data['getTotalimportPoCount'] = $this->dahsboard_Model->getTotalimportPoCount(); - $data['getTotalcapitalPoCount'] = $this->dahsboard_Model->getTotalcapitalPoCount(); - $data['getTotalrevenuePoCount'] = $this->dahsboard_Model->getTotalrevenuePoCount(); - $data['cashbook']=$this->dahsboard_Model->cashbook(); + $this->global['pageTitle'] = 'Resico : Cashbook Reports'; $income="RECEIPT"; $expense="PAYMENT"; - $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); - $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); - $data['todayincome']=$this->dahsboard_Model->today_data($income); - $data['todayexpense']=$this->dahsboard_Model->today_data($expense); - $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); - $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); + + $data['cashbook']=$this->dahsboard_Model->cashbook(); $data['gettoptotal1'] = $this->dahsboard_Model->gettoptotal(); $data['tdy']=$this->dahsboard_Model->today(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + //This Array used to get and display today data (for today tile option) + $data['todayincome']=$this->dahsboard_Model->today_data($income); + $data['todayexpense']=$this->dahsboard_Model->today_data($expense); + //This Array used to get and display current month data (for monthly tile option) + $data['monthlywiseincome']=$this->dahsboard_Model->monthwise_data($income); + $data['monthlywiseexpense']=$this->dahsboard_Model->monthwise_data($expense); + //This Array used to get and display current fin year data (for yearly tile option) + $data['yearincome']=$this->dahsboard_Model->yearwise_data($income); + $data['yearexpense']=$this->dahsboard_Model->yearwise_data($expense); + $now = new DateTime(); + $currentdate = $now->format('Y-m-d'); // MySQL datetime format + $yesterday = date('Y-m-d', strtotime("-1 day")); + + $data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday); + + $this->loadviews("reportcashbook",$this->global,$data, NULL); } - public function monthexpenses() - { - - $this->global['pageTitle'] = 'Cashbook - monthly expenses Reports - '; + + + //This Function used to get and display today data (link = form today tile option)// + // public function Viewtoday() + public function daily_incexp() + { + + $this->global['pageTitle'] = 'Resico : Cashbook Daily Reports'; + $data['tdy']=$this->dahsboard_Model->today(); + //$data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + + $now = new DateTime(); + $currentdate = $now->format('Y-m-d'); // MySQL datetime format + $yesterday = date('Y-m-d', strtotime("-1 day")); + + $data['yesterdaytotal'] = $this->dahsboard_Model->daybeforetotal($yesterday); + + $this->loadviews("cashbooktoday",$this->global,$data, NULL); + } + + //This Function used to get and display current monthly data (link = form monthly tile option)// + //public function monthexpenses() + public function load_monthly_incexp() + { + $this->global['pageTitle'] = 'Resico : Cashbook Monthly Reports'; + $this->loadviews("cashbookmthlyreport",$this->global,NULL, NULL); + } + + public function monthly_incexp() + { + + $this->global['pageTitle'] = 'Resico : Cashbook Monthly Reports'; + $monthyearvalue = $this->input->post('monthyear'); - + $data['monthyearvalue'] = $monthyearvalue; + $monthyear = explode("-",$monthyearvalue); + + $month = $monthyear[0]; + $year = $monthyear[1]; + + + $premonth = $monthyear[0]-1; + $premonth = $premonth < 10 ? '0'.$premonth : ''.$premonth; + $premonth = $premonth == '00' ? '12' : $premonth; + + $yearvalue = $premonth == '12' ? $year-1 : $year; + + $data['prevmonthtotal']=$this->dahsboard_Model->monthbeforetotal($premonth,$yearvalue); + + $data['monthlyreport']=$this->dahsboard_Model->month_incexp_report($month,$year); + + + + $this->loadviews("cashbookmthlyreport",$this->global,$data, NULL); + //cashbookmonthlyexpenses=>cashbookmthlyreport + - $data['monthlyreport']=$this->dahsboard_Model->monthexpensereport(); - // $data['monthlyincreport']=$this->dahsboard_Model->monthincomereport(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - - - $this->loadviews("cashbookmonthlyexpenses",$this->global,$data, NULL); - - - - } - public function yearexpenses() + + + } + + + + //This Function used to get and display current fin year data (link = form yearly tile option)// + //public function yearexpenses() + public function load_yearly_incexp() { - - $this->global['pageTitle'] = 'Cashbook - yearly expenses Reports - '; + $this->global['pageTitle'] = 'Resico : Cashbook Yearly Reports'; + + $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); + + $this->loadviews("cashbookyearlyreport",$this->global,$data, NULL); + //cashbookyearlyexpenses=>cashbookyearlyreport + + } + + public function yearly_incexp() + { + $this->global['pageTitle'] = 'Resico : Cashbook Yearly Reports'; $fyear = $this->input->post('financialyear'); - + $fa=substr( $fyear,0,-5); $aa=substr( $fyear,5,5); - //echo $fyear; - //$data['yearlyincreport']=$this->dahsboard_Model->yearincomereport(); - $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa); - $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); - //print_r($data['finyear']); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $finyear = explode("-",$fyear); + + + + $b4oneyear = $finyear[0] -1; + $b4twoyear = $finyear[1] -1; - - $this->loadviews("cashbookyearlyexpenses",$this->global,$data, NULL); - + $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa); + $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); + $data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($b4oneyear,$b4twoyear); + $date['fyears'] = array('fina' => $fyear); + $this->loadviews("cashbookyearlyreport",$this->global,$data, NULL); + + + } + - } public function cashbookdepartment() { - $this->global['pageTitle'] = 'Cashbook - department - '; + //$this->global['pageTitle'] = 'Cashbook - department - '; $sid=$_GET['sid']; $d=$_GET['d']; $c=$_GET['c']; if ($c=='PAYMENT') { + $this->global['pageTitle'] = 'Resico : PaymentWise Reports'; - $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); + $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); + $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbookmonthlydep",$this->global,$data, NULL); + $this->loadviews("cashbookmthlypaydep",$this->global,$data, NULL); + //cashbookmonthlydep=>cashbookmthlypaydep } else{ + $this->global['pageTitle'] = 'Resico : ReceiptWise Reports'; $data['departmentwise']=$this->dahsboard_Model->departmentwise($sid,$d,$c); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbookmonthlyexp",$this->global,$data, NULL); + $this->loadviews("cashbookmthlyrecdep",$this->global,$data, NULL); + //cashbookmonthlyexp=>cashbookmthlyrecdep } } - 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(); - // //print_r($data['departmentwise']); - // $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); - // } + public function yearmonthwise() { $sid=$_GET['sid']; - $this->global['pageTitle'] = 'Cashbook - yearmonthwise - '; + //$this->global['pageTitle'] = 'Cashbook - yearmonthwise - '; + $this->global['pageTitle'] = 'Resico : Cashbook Yearly Reports'; $data['yearmonthwise']=$this->dahsboard_Model->yearmonthwise($sid); $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); $this->loadviews("cashbookyearmonthwise",$this->global,$data, NULL); } - //this function used to today menu option// - public function Viewtoday() - { - $this->global['pageTitle'] = 'Cashbook - viewtoday '; - $data['tdy']=$this->dahsboard_Model->today(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbooktoday",$this->global,$data, NULL); - } - public function depmenu() - { - $this->global['pageTitle'] = 'Cashbook - AllReport '; - $fdate = $this->input->post('from_date'); - $tdate = $this->input->post('to_date'); - $finyear = $this->input->post('financialyear'); - $fa=substr( $finyear,0,-5); - $aa=substr( $finyear,5,5); - $data['depmenu']=$this->dahsboard_Model->departmentmenu($fdate,$tdate,$fa,$aa); - $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbookall",$this->global,$data, NULL); - } - public function cashbookmenudepartment() - { - $sid=$_GET['sid']; - - $this->global['pageTitle'] = 'Cashbook - department - '; - $data['menudepartmentwise']=$this->dahsboard_Model->menudepartmentwise($sid); - $data['Indiancurrency']=$this->dahsboard_Model->INRSymbol(); - $this->loadviews("cashbookdepday",$this->global,$data, NULL); - } } ?> diff --git a/application/models/dahsboard_model.php b/application/models/dahsboard_model.php index fc9225c6..17f24011 100755 --- a/application/models/dahsboard_model.php +++ b/application/models/dahsboard_model.php @@ -2103,6 +2103,30 @@ if ($cname!= ''){ $query = $this->db->query($sql); return $query->result(); + } + function month_incexp_report($month,$year) + { + $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." and year(tinc.date)=".$year." group by tinc.account_code"; + $query = $this->db->query($sql); + return $query->result(); + } //home--this year// function yearexpensereport($fa,$aa) @@ -2342,7 +2366,62 @@ function INRSymbol() //echo $sql; return $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 minmaxdatevalue(){ + $sql="SELECT MAX(date) AS Max_Date, MIN(date) AS Min_Date + FROM t_income_expense"; + $query = $this->db->query($sql); + return $query->result(); + } + + // function monthbeforetotal($mindate,$maxdate){ + + // $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 BETWEEN ? AND ? "; + // $query = $this->db->query($sql,array($mindate,$maxdate)); + // 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($prefy,$fa){ + $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 >= '".$prefy."-04-01' and date <= '".$fa."-03-31'"; + $query = $this->db->query($sql); + return $query->result(); + //print_r($query->result()); + + } + } ?> diff --git a/application/views/cashbookall.php b/application/views/cashbookall.php deleted file mode 100755 index 48186804..00000000 --- a/application/views/cashbookall.php +++ /dev/null @@ -1,323 +0,0 @@ - - -FontCode2000; - }} - foreach($financialyear as $item) - - { - $finyear = $item->financial_year; - - } ?> - - - - - - - - - - - - - - - - -
- -
- - - - - - -
-

Cashbook Report

-
- -
-
- -
- - - - -
-
- - -
- -
- - - - -
-
-
- -
-
- - -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionAction
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); - echo number_format($t->income,2,'.','');?>expense,2,'.',''); - echo number_format($t->expense,2,'.','');?>description?> - document)) - { - ?> - - - -
Total     - - - - - -   
- -
-
- -
- - - - - - - - - - - - - - - - - - - - - diff --git a/application/views/cashbookdepday.php b/application/views/cashbookdepday.php deleted file mode 100755 index 43b2ecc0..00000000 --- a/application/views/cashbookdepday.php +++ /dev/null @@ -1,116 +0,0 @@ -FontCode2000; - }} -?> - - - -
-
-
-
-

Department Based Report

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dateAccount NamePaid Type Amount Description
date?>name?>type?>total,2,'.','');?>description?>
- -
-
-
-
-
-
- - - - - - - - diff --git a/application/views/cashbookdepmenu.php b/application/views/cashbookdepmenu.php deleted file mode 100755 index c89c1061..00000000 --- a/application/views/cashbookdepmenu.php +++ /dev/null @@ -1,125 +0,0 @@ -FontCode2000; - }} -?> - - - -
-
-
-
-

Cashbook Department

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account NamePaid Type Amount
name?>type?>total,2,'.','');?>
- -
-
-
-
-
-
- - - - - - - - diff --git a/application/views/cashbookmonthlyexpenses.php b/application/views/cashbookmonthlyexpenses.php deleted file mode 100755 index 9b7f43f5..00000000 --- a/application/views/cashbookmonthlyexpenses.php +++ /dev/null @@ -1,203 +0,0 @@ -FontCode2000; - }} - - -if(!empty($monthlyreport)) -{ - -} -if(!empty($monthlyincreport)) -{ - -} -?> - - - - - - - -
-
-
-
-
-

Month Report()

-
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Account NameType Receipt Payment
name?>type?>income,2,'.',''); - echo number_format($mr->income,2,'.','');?>expense,2,'.',''); - echo number_format($mr->expense,2,'.','');?>
Total  - - - - - -
-
-
-
-
-
-
- - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/application/views/cashbookmonthmenu.php b/application/views/cashbookmonthmenu.php deleted file mode 100755 index 149789e8..00000000 --- a/application/views/cashbookmonthmenu.php +++ /dev/null @@ -1,83 +0,0 @@ -FontCode2000; - }} -?> - -
-
-
-
-

Caskbook - "Monthly Payments"

-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DatePaid ToPaid Type Amount
date?>name ?>type?>total,2,'.','');?>
- -
-
-
-
-
-
- - diff --git a/application/views/cashbookmonthlydep.php b/application/views/cashbookmthlypaydep.php similarity index 58% rename from application/views/cashbookmonthlydep.php rename to application/views/cashbookmthlypaydep.php index ce80361b..fa53ff24 100755 --- a/application/views/cashbookmonthlydep.php +++ b/application/views/cashbookmthlypaydep.php @@ -14,63 +14,54 @@ if(!empty($departmentwise)) } - - $inrsymbol=''; -if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} - ?> +?> -
- - -
-
-
-
-

Report(DEP:)

-
-
- -
- - + +
+
+
+
+
+

Report (DEP:)

+
+
+
+
+ - - - - + + - - + @@ -79,7 +70,7 @@ if(!empty($Indiancurrency)) - - - - - - - - - - - - - + + + + + + - - - - + - - -
DateAccount NameTypeAccount NameType Paid To Payment Payment (₹) Description Action
date?>name?> type?>paymentname?>expense,2,'.',''); echo number_format($dw->expense,2,'.','');?>description?>
Total    - - -
Total       
-
-
-
-
-
-
- - + + + + + + + + @@ -176,7 +146,7 @@ if(!empty($Indiancurrency)) // Bootstrap datepicker // Set up your table $(document).ready(function() { - table = $('#req').DataTable( { + table = $('#mthly_paydep').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>>", diff --git a/application/views/cashbookmonthlyexp.php b/application/views/cashbookmthlyrecdep.php similarity index 59% rename from application/views/cashbookmonthlyexp.php rename to application/views/cashbookmthlyrecdep.php index efe5df7d..5b4efc84 100755 --- a/application/views/cashbookmonthlyexp.php +++ b/application/views/cashbookmthlyrecdep.php @@ -13,35 +13,31 @@ foreach($departmentwise as $dw) } } - - $inrsymbol=''; -if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} ?> @@ -49,31 +45,24 @@ if(!empty($Indiancurrency)) -
- - -
-
-
-
- -

Report (DEP:)

-
-
- -
- - +
+
+
+
+
+

Report (DEP:)

+
+
+
+
+ - - - - - - - - + + + + + @@ -94,14 +83,11 @@ if(!empty($Indiancurrency)) - - - - - - + + - - - - - - - - - - + + + + - - +
DateAccount NameTypeReceived From Receipt DateAccount NameTypeReceived From Receipt (₹) Description Filename?> type?> receiptname?>income,2,'.',''); echo number_format($dw->income,2,'.','');?>description?> + document)) { @@ -129,39 +115,24 @@ if(!empty($Indiancurrency)) ?>
Total
Total      - - -       
-
-
-
-
-
-
- + + + + + + + @@ -181,7 +152,7 @@ if(!empty($Indiancurrency)) // Bootstrap datepicker // Set up your table $(document).ready(function() { - table = $('#req').DataTable( { + table = $('#mthly_recdep').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>>", diff --git a/application/views/cashbookmthlyreport.php b/application/views/cashbookmthlyreport.php new file mode 100755 index 00000000..ac06a81f --- /dev/null +++ b/application/views/cashbookmthlyreport.php @@ -0,0 +1,245 @@ +payment_amt; + $payamt = $prevttl->payment_amt; + // $recamt = $prevmonthtotal[0]->receipt_amt; + $recamt = $prevttl->receipt_amt; +}} +if(!empty($monthyearvalue)) +{ +$monthyr = explode("-",$monthyearvalue); +$monthNum = $monthyr[0]; +$yearNum = $monthyr[1]; +$dateObj = DateTime::createFromFormat('!m', $monthNum); +$monthName = $dateObj->format('F'); +} +// $inrsymbol=''; +// if(!empty($Indiancurrency)) +// { +// foreach ($Indiancurrency as $inr) +// { +// $inrsymbol = $inr->FontCode2000; +// }} + +?> + + + + +
+
+
+
+
+

Month Report

+
+
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Account NameType Receipt (₹) Payment (₹) Current Balances(₹)
Previous Month Balance(Opening Balances)  
name?>type?>income,2,'.',''); + echo number_format($mr->income,2,'.','');?>expense,2,'.',''); + echo number_format($mr->expense,2,'.','');?>
Total 
Current Month Closing Balances  
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookpdf.php b/application/views/cashbookpdf.php index e95890f0..a3d32ceb 100755 --- a/application/views/cashbookpdf.php +++ b/application/views/cashbookpdf.php @@ -9,12 +9,12 @@ if(($data[0]->type) == 'EXPENSE') $pic = base_url().'uploads/images/'.$company[0]->ProfilePic; ?>



- +
- +
@@ -23,37 +23,37 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic; - +
- + - +
- +
- +code) == '999'){ ?> - + - +
-

CompanyName;?>


Address;?>
Mobile AlternateContactNumber;?>
E-mail EmailAddress;?>
GSTIN : GSTNO;?> +

CompanyName;?>


Address;?>
Mobile : AlternateContactNumber;?>
E-mail : EmailAddress;?>
GSTIN : GSTNO;?>

CASH VOUCHER

 type) == 'PAYMENT'){echo 'Voucher Number';}else{echo 'Invoice Number';} ?>  type) == 'PAYMENT'){echo 'Voucher Number';}else{echo 'Invoice Number';} ?> type) == 'PAYMENT'){echo $data[0]->invoice_no;}else{echo $data[0]->invoice_no;}?>

Rs total;?>

Amount        

total;?>

Amount        
 Date  Date date),'d-m-Y');?>
   towhom;?>
 Amount (In Words) Amount (In Words)
 Tax Tax SGST :sgst;?> CGST :cgst;?> IGST :igst;?>
 Payment Details Payment Details @@ -115,7 +115,7 @@ $pic = base_url().'uploads/images/'.$company[0]->ProfilePic; - +
Note : Above Rs.750/- With Revenue Stamp & Signature      Note : Above ₹.750/- With Revenue Stamp & Signature      
\ No newline at end of file diff --git a/application/views/cashbooktoday.php b/application/views/cashbooktoday.php index 017bf681..986583b2 100755 --- a/application/views/cashbooktoday.php +++ b/application/views/cashbooktoday.php @@ -1,149 +1,145 @@ - -FontCode2000; - }} + 2018-02-21 [payment_amt] => 0 [receipt_amt] => 13 ) ) + if(!empty($yesterdaytotal)) + { + foreach ($yesterdaytotal as $ttl) + { + $strdayttl = $ttl->date; + $payamt = $ttl->payment_amt; + $recamt = $ttl->receipt_amt; + }} ?> + - +
-
+
-
-

Today Report

-
-
- -
+
+
+

Today Report

+
+
- - +
+ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - + $ti= $ti + number_format($t->income,2,'.',''); + echo number_format($t->income,2,'.','');?> - + $tvt= $tvt + number_format($t->expense,2,'.',''); + echo number_format($t->expense,2,'.','');?> - - - - - + + - - + + - - - - - - - - - + + + + + + - + + + + + + + + + + + + +
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionAction
DateAccount NameTypeReceived FromPaid To Receipt (₹) Payment (₹)DescriptionActionCurrent Balances
Yesterday Balances (opening balances)      
date?> name?> type?> receiptname?> paymentname?>income,2,'.',''); - echo number_format($t->income,2,'.','');?> expense,2,'.',''); - echo number_format($t->expense,2,'.','');?> description?> - document)) - { - ?> - - - + document)) + { + ?> + +
Total
Total        - - - - - -       
Today Closing Balances       
-
@@ -159,30 +155,30 @@ if(!empty($Indiancurrency)) diff --git a/application/views/cashbookyearlyexpenses.php b/application/views/cashbookyearlyexpenses.php deleted file mode 100755 index 65b45460..00000000 --- a/application/views/cashbookyearlyexpenses.php +++ /dev/null @@ -1,213 +0,0 @@ -FontCode2000; - }} - - -foreach($financialyear as $item) - - { - $finyear = $item->financial_year; - - } ?> - - - - - - -
-
-
-
-
-
-

YEAR REPORTS()

-
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Month Receipt Payment
month?>inc,2,'.',''); - echo number_format($yr->inc,2,'.','');?>exp,2,'.',''); - echo number_format($yr->exp,2,'.','');?>
Total - - - - - -  
- -
-
-
-
-
-
- - - - - - - - - - - - - - \ No newline at end of file diff --git a/application/views/cashbookyearlyreport.php b/application/views/cashbookyearlyreport.php new file mode 100755 index 00000000..27b6e727 --- /dev/null +++ b/application/views/cashbookyearlyreport.php @@ -0,0 +1,209 @@ +FontCode2000; + }} + + + if(!empty($b4finyeartotal)){ + foreach ($b4finyeartotal as $prevttl) + { + //$payamt = $b4finyeartotal[0]->payment_amt; + //$recamt = $b4finyeartotal[0]->receipt_amt; + $payamt = $prevttl->payment_amt; + $recamt = $prevttl->receipt_amt; + }} + +?> + + + + + + +
+
+
+
+
+ +

Year Report

+ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Month Receipt (₹) Payment (₹)Current Balances
Previous Year Balance(opening balances)
month?>inc,2,'.',''); + echo number_format($yr->inc,2,'.','');?>exp,2,'.',''); + echo number_format($yr->exp,2,'.','');?>
Total
Current Year Closing Balances 
+
+
+
+
+
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/application/views/cashbookyearmonthwise.php b/application/views/cashbookyearmonthwise.php index ff43f6ee..7bb13d4e 100755 --- a/application/views/cashbookyearmonthwise.php +++ b/application/views/cashbookyearmonthwise.php @@ -1,136 +1,89 @@ - -FontCode2000; - }} - ?> - -
-
-
-
-
-
-

Month Report()

-
- - - - - - - - - - - - - - - - - - - - - +
+
+
+
+
+

Month Report()

+
+
+
+
Account NamePaid Type Receipt Payment
+ + + + + + + + + + + - - - - - - - - - - - - - - - - name?> + + + + + - - - - + + + + - - - - + + - -
Account NamePaid Type Receipt (₹) Payment (₹)
name?>type?>income,2,'.',''); - echo number_format($ym->income,2,'.','');?>expense,2,'.',''); - echo number_format($ym->expense,2,'.','');?>
type?>income,2,'.',''); + echo number_format($ym->income,2,'.','');?>expense,2,'.',''); + echo number_format($ym->expense,2,'.','');?>
Total
Total   - - - - - -
-
-
-
-
-
- +
+ + + + + + + @@ -146,7 +99,7 @@ if(!empty($Indiancurrency)) // Bootstrap datepicker // Set up your table $(document).ready(function() { - table = $('#req').DataTable( { + table = $('#yrly_mthwise').DataTable( { "dom": "<'row'<'col-md-5'l><'col-md-7'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + "<'row'<'col-md-12't>><'row'<'col-md-4'i><'col-md-8'p>>", diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php index 12da95dd..c4dbb7f6 100755 --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -7,14 +7,6 @@ $month_in=''; $month_ex=''; $year_in=''; $year_ex=''; -if(!empty($cashbook)) -{ - -} -if(!empty($monthlyreport)) -{ - -} if(!empty($todayincome)) { @@ -23,91 +15,104 @@ if(!empty($todayincome)) $today_in=$ti->todaydata; }} - if(!empty($todayexpense)) - { - foreach ($todayexpense as $te) - { - $today_ex=$te->todaydata; +if(!empty($todayexpense)) +{ + foreach ($todayexpense as $te) + { + $today_ex=$te->todaydata; }} - if(!empty($monthlywiseincome)) +if(!empty($monthlywiseincome)) +{ + foreach ($monthlywiseincome as $mi) { - foreach ($monthlywiseincome as $mi) - { $month_in = $mi->monthlydata; - }} + }} - if(!empty($monthlywiseexpense)) - { - foreach ($monthlywiseexpense as $me) - { +if(!empty($monthlywiseexpense)) +{ + foreach ($monthlywiseexpense as $me) + { $month_ex = $me->monthlydata; - }} - if(!empty($yearexpense)) - { - foreach ($yearexpense as $ye) - { + }} +if(!empty($yearexpense)) +{ + foreach ($yearexpense as $ye) + { $year_ex=$ye->yearlydata; - }} + }} - if(!empty($yearincome)) - { - foreach ($yearincome as $yi) - { +if(!empty($yearincome)) +{ + foreach ($yearincome as $yi) + { $year_in = $yi->yearlydata; - }} + }} - $inrsymbol=''; - if(!empty($Indiancurrency)) - { - foreach ($Indiancurrency as $inr) - { - $inrsymbol = $inr->FontCode2000; - }} + // $inrsymbol=''; + // if(!empty($Indiancurrency)) + // { + // foreach ($Indiancurrency as $inr) + // { + // $inrsymbol = $inr->FontCode2000; + // }} -?> + $in=0.00; + $payamt=0.00; + $recamt = 0.00; + $zero=0.00; + $curr_balances=0.00; + $ti=0.00; + $tvt=0.00; + // [date] => 2018-02-21 [payment_amt] => 0 [receipt_amt] => 13 ) ) + if(!empty($yesterdaytotal)) + { + foreach ($yesterdaytotal as $ttl) + { + $strdayttl = $ttl->date; + $payamt = $ttl->payment_amt; + $recamt = $ttl->receipt_amt; + }} + ?> - - -
-
- - - -
- +
+
+
+
+
-
+
@@ -115,10 +120,10 @@ if(!empty($todayincome))
- + - Receipt : - Payment : + Receipt : + Payment :
@@ -130,9 +135,9 @@ if(!empty($todayincome))
- - Receipt : - Payment : + + Receipt : + Payment :
@@ -143,196 +148,170 @@ if(!empty($todayincome))
- - Receipt : - Payment : + + Receipt : + Payment :
-
+ - +
- - - - - - +
- -
- -
- - - - - - - -

Day Wise Report

-
-
- - - +

+
+
+
+

Day Wise Report

+
+
+
+
+
+ + - - - - - - - - - - - - + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + - + ?> + - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DateAccount NameTypeReceived FromPaid To Receipt Payment DescriptionFileDateAccount NameTypeReceived FromPaid To Receipt (₹) Payment (₹)DescriptionFileCurrent Balances
Yesterday Balances (opening balances)       
date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); - echo number_format($t->income,2,'.','');?>expense,2,'.',''); - echo number_format($t->expense,2,'.','');?>date?>name?>type?>receiptname?>paymentname?>income,2,'.',''); + echo number_format($t->income,2,'.','');?>expense,2,'.',''); + echo number_format($t->expense,2,'.','');?>description?> - document)) - { - ?> - - - -
Total     - - - - - -    
- -
-
-
- -
- - - - - - + description?> + document)) + { + ?> + + + + + + + + + + Total +   +   +   +   + + +   +   + + + + Today Closing Balances +   +   +   +   + + +   +   +   + + + +
+ + + + + + + + - + - - diff --git a/application/views/reportslink.php b/application/views/reportslink.php index a957af26..5d934023 100644 --- a/application/views/reportslink.php +++ b/application/views/reportslink.php @@ -67,9 +67,7 @@

  Cashbook

Cashbook Reports

-

Cashbook Monthly Expenses

-

Cashbook Yearly Expenses

- +