Server : Apache System : Linux host44.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64 User : vapecompany ( 2719) PHP Version : 7.4.33 Disable Function : NONE Directory : /home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/pdf/list/ |
Upload File : |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Sales Report</title> @include('backend.pdf.layouts.css') </head> <body > @include('backend.pdf.layouts.report-header') <main> <div id="details" class="clearfix"> <div id="client"class="mt-10"> <h2 class="name">Sales Report</h2> <div class="address"> Date: {{Carbon\Carbon::parse($s_date)->format('d-m-Y')}} to {{Carbon\Carbon::parse($e_date)->format('d-m-Y')}} </div> </div> </div> <table class="table" width="100%" cellspacing="0"> <thead> <tr class="bg-secondary" style="color:white;"> <th style="color:white;">SL</th> <th style="color:white;">Invoice Id</th> <th style="color:white;">Sales Date</th> <th style="color:white;">Customer Type</th> <th style="color:white;">Customer</th> <th style="color:white;">Employee</th> <th style="color:white;">Designation</th> <th style="color:white;">District</th> <th style="color:white;">Division</th> <th style="color:white;">Brand</th> <th style="color:white;">Product Name</th> <th style="color:white;">Model</th> @foreach($colors as $color) <th style="color:white;">{{$color->color_name}}</th> @endforeach <th style="color:white;">Amount</th> <th class="not-mobile">Paid Amount</th> <th class="not-mobile">Incentive Amount</th> </tr> </thead> <tbody> @php $Ttotal=0; $tp=0; $tinc=0; $pre_id=0; @endphp @php $i=1;$totalq=array();$totalp=0; foreach($colors as $color){ $totalq[$color->color_id] = 0; } @endphp @foreach($chalans as $chalan) @foreach($chalan->groupBy('product_id') as $d) <tr> <td>{{$i}}</td> <th>{{$d[0]->chalan->invoice_number}}</th> <th>{{$d[0]->chalan->chalan_date->format('d-m-Y')}}</th> <th>{{$d[0]->chalan->customer->type->customer_type_name}}</th> <th>{{$d[0]->chalan->customer->customer_name}}</th> <th>{{$d[0]->chalan->salesman->employee_name}}</th> <th>{{$d[0]->chalan->salesman->designation->designation_name}}</th> <th>{{$d[0]->chalan->customer->district->district_name}}</th> <th>{{$d[0]->chalan->customer->division->division_name}}</th> <th>{{$d[0]->product->brand->brand_name}}</th> <th>{{$d[0]->product->product_name}}</th> <th>{{$d[0]->product->model->model_name}}</th> @foreach($colors as $color) <th> @php $q=$d->where('product_id',$d[0]->product_id)->where('color_id',$color->color_id)->sum('product_quantity'); $totalq[$color->color_id] += $q; $Ttotal += $q; @endphp {{$q}} </th> @endforeach <th> @php $p=$d->where('product_id',$d[0]->product_id)->sum('product_price'); $totalp += $p; @endphp {{number_format($p,2)}} </th> @if($pre_id != $d[0]->chalan->chalan_id) <th rowspan ="{{count($chalan->groupBy('product_id'))}}" class="not-mobile">{{number_format($d[0]->chalan->paid_amount, 2)}}</th> <th rowspan="{{count($chalan->groupBy('product_id'))}}" class="not-mobile">{{number_format($d[0]->chalan->incentive_amount, 2)}}</th> @endif </tr> @php $tp += $d[0]->chalan->paid_amount; $tinc += $d[0]->chalan->incentive_amount ; $pre_id= $d[0]->chalan->chalan_id; @endphp @php $i++; @endphp @endforeach @endforeach <tr> <td colspan="12" style="text-align: right;"><strong>Total</strong></td> @foreach($colors as $color) <td> <strong>{{$totalq[$color->color_id]}}</strong> </td> @endforeach <td> <strong>{{$Ttotal}}</strong> </td> <th class="not-mobile"><strong>{{number_format($totalp, 2)}}</strong></th> <th class="not-mobile"><strong>{{number_format($tp,2)}}</strong></th> <th class="not-mobile"><strong>{{number_format($tinc, 2)}}</strong></th> </tr> </tbody> </table> </main> @include('backend.pdf.layouts.footer') </body> </html>