Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $report = DB::table('acc_cash')
- ->whereBetween('acc_date', [$from_date, $till_date])
- ->where('acc_head', 'LIKE', "%". $head_name)
- ->orderBy('acc_date', 'ASC')
- ->get();
- $reportSum = DB::table('acc_cash')
- ->whereBetween('acc_date', [$from_date, $till_date])
- ->where('acc_head', 'LIKE', "%". $head_name)
- ->orderBy('acc_date', 'ASC')
- ->sum('cash_amount');
- #dd($report);
- return view('pages.accounts.reports.reportExpenses')->with('report', $report)->with('accHead', $accHead)->with('reportSum', $reportSum);
- <tbody>
- @if(isset($report))
- <?php $count =0; $sum=0; ?>
- @foreach($report as $rep)
- <?php ++$count; ?>
- <tr class="odd gradeX">
- <td class="center">{{$count}}</td>
- <td class="center">{{$rep->acc_date}}</td>
- <td class="center">{{$rep->pay_id}}</td>
- <td class="center">{{number_format($rep->cash_amount, 0)}}</td>
- <td class="center">{{ucwords($rep->acc_head)}}</td>
- <td class="center">{{ucwords($rep->acc_note)}}</td>
- </tr>
- @endforeach
- @endif
- <tr>
- <td class="center"></td>
- <td class="center"></td>
- <td class="center">Total: </td>
- <td class="center" > {{ $reportSum }}</td>
- <td class="center"></td>
- <td class="center"></td>
- </tr>
- </tbody>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement