VaKeR CYBER ARMY
Logo of a company 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/reports/tables/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/vapecompany/demo.vapecompany.com.bd/resources/views/backend/reports/tables/doa_t.blade.php


<!-- Column -->
<div class="card">
    <div class="card-body">
        <h4 class="card-title">Stock (Doa/Missing) Report</h4>
        @if($stocks->count() > 0)
       <div style="padding: 10px;margin-bottom: 10px;" role="group" class="btn-group btn-group-sm filter-pdf-btn">
        
            <form action="{{url('reports/stockIn_export')}}" method="get">
                <input type="hidden" name="action_type" value="download"> 
                 <input type="hidden" name="product" value="{{$product}}"> 
                 <input type="hidden" name="brand" value="{{$brand_id}}">
                 <input type="hidden" name="s_date" value="{{$s_date}}"> 
                 <input type="hidden" name="e_date" value="{{$e_date}}">
                 <input type="hidden" name="supplier" value="{{$supplier_id}}">
                 <input type="hidden" name="cnf" value="{{$cnf}}"> 
                <button style="padding: 10px" type="submit" class="btn btn-secondary rounded-0 btn-sm pl-2 pr-2"><i class="fas fa-file-pdf mr-2"></i> PDF </button>

            </form> 

            <form action="{{url('reports/stockIn_export')}}" method="get" target="_blank">
                <input type="hidden" name="action_type" value="print"> 
                 <input type="hidden" name="product" value="{{$product}}"> 
                 <input type="hidden" name="brand" value="{{$brand_id}}">
                 <input type="hidden" name="s_date" value="{{$s_date}}"> 
                 <input type="hidden" name="e_date" value="{{$e_date}}">
                 <input type="hidden" name="supplier" value="{{$supplier_id}}">
                 <input type="hidden" name="cnf" value="{{$cnf}}">
                <button  style="padding: 10px" type="submit" class="btn btn-warning btn-sm rounded-0 pl-2 pr-2"><i class="fa fa-print mr-2"></i> Print </button>
            </form> 

           

            <form action="{{url('reports/stockIn_export')}}" method="get">
                <input type="hidden" name="action_type" value="excel"> 
                 <input type="hidden" name="product" value="{{$product}}"> 
                 <input type="hidden" name="brand" value="{{$brand_id}}">
                 <input type="hidden" name="s_date" value="{{$s_date}}"> 
                 <input type="hidden" name="e_date" value="{{$e_date}}">
                 <input type="hidden" name="supplier" value="{{$supplier_id}}">
                 <input type="hidden" name="cnf" value="{{$cnf}}">
                <button  style="padding: 10px" type="submit" class="btn btn-secondary btn-sm rounded-0 pl-2 pr-2"><i class="fas fa-file-excel mr-2"></i> Excel </button>
            </form>
        </div>
        <div class="table-responsive">
        <table id="dtables" class="table table-striped table-bordered dt-responsive nowrap" style="width:100%">
            <thead>
                <tr>
                    <th class="min-mobile"></th>
                    <th class="min-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="min-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                    
                    
                    <th class="not-mobile text-center" colspan="{{$colors->count()}}">Color</th>
                   
                 <!--    <th class="not-mobile">Purchase Price</th> -->
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                    <th class="not-mobile"></th>
                   <!--  <th class="not-mobile">Current Stock Value</th> -->
                    
                </tr>
                <tr>
                    <th class="min-mobile">SL</th>
                    <th class="min-mobile">Date</th>
                    <th class="not-mobile">Bill No.</th>
                    <th class="not-mobile">Supplier</th>
                    <th class="not-mobile">C&F Name</th>
                    <th class="min-mobile">Brand</th>
                    <th class="not-mobile">Product Name</th>
                    <th class="not-mobile">Model</th>
                    
                    @foreach($colors as $color)
                    <th class="not-mobile">{{$color->color_name}}</th>
                    @endforeach
                 <!--    <th class="not-mobile">Purchase Price</th> -->
                    <th class="not-mobile">DOA</th>
                    <th class="not-mobile">Missing Qty</th>
                    <th class="not-mobile">Quantity</th>
                    <th class="not-mobile">Total</th>
                   <!--  <th class="not-mobile">Current Stock Value</th> -->
                    
                </tr>
                
               
            </thead>
                
             
            <tbody>
                @php $i=1; @endphp
                @foreach($stocks as $stock)
                    @foreach($stock->groupBy('product_id') as $d)
                        <tr>
                            <td class="min-mobile">{{$i}}</td>

                            <td class="min-mobile">{{$d[0]->stock->stock_date->format('d-m-Y')}}</td>
                            <td class="not-mobile">{{$d[0]->stock->bill_no}}</td>
                            <td class="min-mobile">{{$d[0]->stock->supplier->supplier_name}}</td>
                            <td class="min-mobile">{{$d[0]->stock->cnf->cnf_name}}</td>
                             <td class="min-mobile">{{$d[0]->product->brand->brand_name}}</td>

                            <td class="not-mobile">{{$d[0]->product->product_name}}</td>
                           
                            <td class="not-mobile">{{$d[0]->product->model->model_name}}</td>
                            
                            @php $total=0; @endphp
                            @foreach($colors as $color)
                            <td class="not-mobile">
                                @php
                                //print_r($d);
                                $q= $d->where('color_id',$color->color_id)->sum('product_quantity');
                                $total += $q;
                                @endphp
                                {{$q}}
                            </th>
                            @endforeach
                            <td class="not-mobile">{{$d[0]->stock->doa ? $d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('doa')- $d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('doa_a') : 0}}</td>
                            <td class="not-mobile">{{$d[0]->stock->doa ? $d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('missing')-$d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('missing_a') : 0 }}</td>
                            <td class="not-mobile">{{$total}}</td>
                            <td class="not-mobile">{{$total-($d[0]->stock->doa ? $d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('missing')-$d[0]->stock->doa->details->where('product_id',$d[0]->product_id)->sum('missing_a') : 0)}}</td>
                        </tr>
                        @php $i++; @endphp
                    @endforeach
                @endforeach
            </tbody>
           
        </table>  
       </td>
        @else
             <div style="padding: 20px;color:red;text-align:center;font-size: 25px;" >Data Not Found</div>
        @endif
    </div>
</div>
</div>
                    

VaKeR 2022