diff --git a/application/controllers/report.php b/application/controllers/report.php index 2829d323..3ac81043 100755 --- a/application/controllers/report.php +++ b/application/controllers/report.php @@ -1022,6 +1022,19 @@ class report extends BaseController $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['yearlybalances']=$this->dahsboard_Model->getYearlyOpeningAmt($yearvalue); + $lastdate =cal_days_in_month(CAL_GREGORIAN,$premonth,$yearvalue); + $dateformat = '20'.$yearvalue.'-'.$premonth.'-'.$lastdate; + $data['monthlybalances']=$this->dahsboard_Model->getMonthlyOpeningAmt($dateformat); + $data['yesterdaybalances'] = $this->dahsboard_Model->getDailyOpeningAmt($yesterday); diff --git a/application/views/reportcashbook.php b/application/views/reportcashbook.php index 4f954284..fcd177d2 100755 --- a/application/views/reportcashbook.php +++ b/application/views/reportcashbook.php @@ -1,5 +1,9 @@ yearly_income_amt; $year_ex = $y->yearly_expenses_amt; }} + +if(!empty($yesterdaybalances)) +{ + foreach ($yesterdaybalances as $ttl) + { + $strdaydate = $ttl->date; + $strday_balances = $ttl->opening_amt; + }} + +if(!empty($monthlybalances)) +{ + foreach ($monthlybalances as $prevttl){ + //$premonth_balances = ($prevttl->payment_amt) - ($prevttl->receipt_amt); + $premonth_balances = $prevttl->opening_amt; + } +} + +if(!empty($yearlybalances)){ + foreach ($yearlybalances as $preyearttl) + { + //$preyear_balances = ($preyearttl->payment_amt) - ($preyearttl->receipt_amt); + $preyear_balances = $preyearttl->opening_amt; + } +} + ?> @@ -65,28 +94,29 @@ div.dt-buttons { background-color: #5d0411; border-color: #5d0411; } - - - +
-
-
-
- -
- +
+ +
+ + +
+ +
+
- +
- - - Receipt : - Payment : - + + Opening Balances : + Receipt : + Payment : + Closing Balances :
@@ -95,11 +125,13 @@ div.dt-buttons {
- +
- - Receipt : - Payment : + + Opening Balances : + Receipt : + Payment : + Closing Balances :
@@ -108,46 +140,45 @@ div.dt-buttons {
- +
- - Receipt : - Payment : + + Opening Balances : + Receipt : + Payment : + Closing Balances :
- +
-
+
+ +
-

-
-
-
-

Day Wise Report

-
-
-
+

Day Wise Report

+ +
- + - - - - - + + + + + @@ -161,19 +192,18 @@ div.dt-buttons { }} ?> - - - - - - - + + + + + + + - - - - - + + + +
DateDate Account Name Type Received From Paid To Receipt (₹) Payment (₹)DescriptionFileCurrent Balances(₹) Receipt (₹) Payment (₹)DescriptionFileCurrent Balances(₹)
Yesterday Balances (opening balances)    Yesterday Balances (opening balances)        
   
-
-
-
-
-
-
-
- -
- +
+
+ + + + + + + + + diff --git a/uploads/cashbook/1.jpg b/uploads/cashbook/1.jpg new file mode 100644 index 00000000..2c58037a Binary files /dev/null and b/uploads/cashbook/1.jpg differ