diff --git a/application/controllers/report.php b/application/controllers/report.php index c10ce962..1f1dbac3 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -1059,17 +1059,23 @@ class report extends BaseController //This Function used to get and display current monthly data (link = form monthly tile option)// //public function monthexpenses() public function load_monthly_incexp() - { + { $data['monthyearvalue'] = ''; $this->global['pageTitle'] = 'Resico : Cashbook Monthly Reports'; - $this->loadviews("cashbookmthlyreport",$this->global,NULL, NULL); + $this->loadviews("cashbookmthlyreport",$this->global,$data, NULL); } public function monthly_incexp() { - - $this->global['pageTitle'] = 'Resico : Cashbook Monthly Reports'; - $monthyearvalue = $this->input->post('monthyear'); - + $monthyearvalue = $this->input->post('monthyear'); + $this->global['pageTitle'] = 'Resico : Cashbook Monthly Reports'; + + if($monthyearvalue == ''){ + + $data['monthyearvalue'] = ''; + + } + else{ + $data['monthyearvalue'] = $monthyearvalue; $monthyear = explode("-",$monthyearvalue); @@ -1086,54 +1092,48 @@ class report extends BaseController $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 - - - + } + + $this->loadviews("cashbookmthlyreport",$this->global,$data, NULL); } - //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'] = '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'); + $data['financialyear']=$this->dahsboard_Model->cashbookfinyear(); + + $fyear = $this->input->post('financialyear'); + + if($fyear ==''){ + + $data['fyears'] = ''; + + }else{ + + $data['fyears'] = $fyear; + //echo $data['fyears']; $fa=substr( $fyear,0,-5); $aa=substr( $fyear,5,5); $finyear = explode("-",$fyear); - - - $b4oneyear = $finyear[0] -1; - $b4twoyear = $finyear[1] -1; + $b4oneyear = $finyear[0] -1; + $b4twoyear = $finyear[1] -1; - $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); - - + $data['yearlyreport']=$this->dahsboard_Model->yearexpensereport($fa,$aa); + + $data['b4finyeartotal']=$this->dahsboard_Model->yearbeforetotal($b4oneyear,$b4twoyear); + + + //$this->loadviews("cashbookyearlyreport",$this->global,$data, NULL); + + } + $this->loadviews("cashbookyearlyreport",$this->global,$data, NULL); } diff --git a/application/views/cashbookmthlyreport.php b/application/views/cashbookmthlyreport.php index ac06a81f..af18b6b7 100755 --- a/application/views/cashbookmthlyreport.php +++ b/application/views/cashbookmthlyreport.php @@ -10,6 +10,7 @@ $monthyr = ''; $mthyr = '' ; $monthNum = '' ; $yearNum = ''; + if(!empty($prevmonthtotal)) { foreach ($prevmonthtotal as $prevttl){ @@ -109,8 +110,12 @@ $(function() {
- -
+ + + + + +
diff --git a/application/views/cashbookyearlyreport.php b/application/views/cashbookyearlyreport.php index 27b6e727..d3e155da 100755 --- a/application/views/cashbookyearlyreport.php +++ b/application/views/cashbookyearlyreport.php @@ -8,6 +8,9 @@ $payamt=0.00; $recamt = 0.00; $zero=0.00; $curr_balances=0.00; +//print_r($fyears); + + if(!empty($Indiancurrency)) { foreach ($Indiancurrency as $inr) @@ -24,7 +27,8 @@ if(!empty($Indiancurrency)) $payamt = $prevttl->payment_amt; $recamt = $prevttl->receipt_amt; }} - + + ?> @@ -57,13 +61,25 @@ if(!empty($Indiancurrency)) + + + + + + + + +
- -

Year Report

+ +

Year Report

+
@@ -172,6 +188,9 @@ if(!empty($Indiancurrency)) // Bootstrap datepicker // Set up your table $(document).ready(function() { + + + table = $('#yearlypayment').DataTable( { "dom": "<'row'<'col-md-3'l><'col-md-9'Bf>>" + "<'row'<'col-md-6'><'col-md-6'>>" + @@ -192,6 +211,9 @@ $(document).ready(function() { 'colvis' ] } ); + + $('#financialyear option[value=""]').attr("selected", "selected"); + } ); $('#yearly').click(function() { diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php index c4dbb7f6..ee39cfea 100755 --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -135,7 +135,7 @@ div.dt-buttons {
- + Receipt : Payment :
@@ -148,7 +148,7 @@ div.dt-buttons {
- + Receipt : Payment :