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 : /proc/thread-self/root/home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/exports/ |
Upload File : |
<table style="table-layout: auto;widtd: 100%;"> <thead> @if($companyInfo) <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;"> {{$companyInfo->company_name ? $companyInfo->company_name: "MAKTEL LIMITED"}}</td></tr> <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;"> {{$companyInfo->company_address ? $companyInfo->company_address : "House-277(Level-4),Lane-4,Baridhara DOHS,Dhaka-1206."}}</td></tr> <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;"> Hotline: +{{$companyInfo->company_phone ? $companyInfo->company_phone: "88 01844241530"}}</td></tr> <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;"> Email: {{$companyInfo->company_email ? $companyInfo->company_email : "info@maktel.com.bd"}}</td></tr> <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;"> Web: {{$companyInfo->company_website ? $companyInfo->company_website : "www.maktel.com.bd"}}</td></tr> <tr><td colspan="{{$colors->count()+13}}" style="text-align: center;">Facebook: {{$companyInfo->company_facebook ? $companyInfo->company_facebook : "www.facebook.com/maktel"}}</td></tr> @else <tr><td colspan="{{$colors->count()+13}}">MAKTEL LIMITED</td></tr> <tr><td colspan="{{$colors->count()+13}}">House-277(Level-4),Lane-4,Baridhara DOHS,Dhaka-1206.</td></tr> <tr><td colspan="{{$colors->count()+13}}">Hotline:+88 01844241530</td></tr> <tr><td colspan="{{$colors->count()+13}}">Email:info@maktel.com.bd</td></tr> <tr><td colspan="{{$colors->count()+13}}">Web:www.maktel.com.bd</td></tr> <tr><td colspan="{{$colors->count()+13}}">Facebook:www.facebook.com/maktel</td></tr> @endif <tr> <td>SL</td> <td>Invoice Id</td> <td>Sales Date</td> <td>Customer Type</td> <td>Customer Name</td> <td>Employee Name</td> <td>Designation</td> <td>District</td> <td>Division</td> <td>Brand</td> <td>Product Name</td> <td>Model</td> @foreach($colors as $color) <td>{{$color->color_name}}</td> @endforeach <th style="color:white;">Total</th> <th style="color:white;">Amount</th> <th style="color:white;">Paid Amount</th> <th style="color:white;">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> <td>{{$d[0]->chalan->invoice_number}}</td> <td>{{$d[0]->chalan->chalan_date->format('d-m-Y')}}</td> <td>{{$d[0]->chalan->customer->type->customer_type_name}}</td> <td>{{$d[0]->chalan->customer->customer_name}}</td> <td>{{$d[0]->chalan->salesman->employee_name}}</td> <td>{{$d[0]->chalan->salesman->designation->designation_name}}</td> <td>{{$d[0]->chalan->customer->district->district_name}}</td> <td>{{$d[0]->chalan->customer->division->division_name}}</td> <td>{{$d[0]->product->brand->brand_name}}</td> <td>{{$d[0]->product->product_name}}</td> <td>{{$d[0]->product->model->model_name}}</td> @php $subq=0; @endphp @foreach($colors as $color) <td> @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; $subq += $q; @endphp {{$q}} </td> @endforeach <td>{{$subq}}</td> <td> @php $p=$d->where('product_id',$d[0]->product_id)->sum('product_price'); $totalp += $p; @endphp {{$p}} </td> @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> @php $tp += $d[0]->chalan->paid_amount; $tinc += $d[0]->chalan->incentive_amount ; @endphp @endif </tr> @php $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>