KUJUNTI.ID MINISH3LL
Path : /var/www/html/jewelry-pos/resources/views/warehouses/
(S)h3ll Cr3at0r :
F!le Upl0ad :

B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H

Current File : /var/www/html/jewelry-pos/resources/views/warehouses/accessory.blade.php


@extends('layouts.admin-main')
@section('content')
    <div class="col-lg-12">
        <div class="card-body shadow-1">
            <div class="row mb-2 mt-2">
                <div class="col-sm-10 col-xl-10">
                    <div class="row" style="display: flex;justify-content: space-between;align-items: center">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-xl-5">
                            <form method="GET" action="{{ route('warehouse-product.accessory') }}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}&paginate={{$paginate}}" id="search-form" onsubmit=""  style="display: flex;justify-content: start;align-items: center">
                                <input type="hidden" name="paginate" value="{{$paginate}}">
                                <div class="ml-2" style="width: 100%;">
                                    <select class="form-control" name="platinum_category" onchange="this.form.submit();">
                                        <option value="">{{__('message.selected all')}}</option>
                                        @foreach($productCategories as $productCategory)
                                            <option value="{{$productCategory->id}}" @if($platinum_category_id == $productCategory->id) selected @endif>{{$productCategory->name}}</option>
                                        @endforeach
                                    </select>
                                </div>
                            </form>
                        </div>
                        <div class="col-xs-12 col-md-12 col-sm-12 col-xl-7 d-flex ml-0" style="display: flex;justify-content: center;align-items: center">
                            <a href="{{route('warehouse-product.accessory-print')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}&paginate={{$paginate}}&check_fixed_price={{$check_fixed_price}}&platinum_category={{$platinum_category_id}}" type="submit"
                               class="btn btn-info bg-info-800 float-left rounded-0 mr-2"
                               title="{{ __('message.print') }}" name="" style="width: 18%">
                                <i class="fal fa-print"></i>
                                {{ __('message.print') }}
                            </a>
                            <a href="{{route('warehouse-product.accessory-export')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}&paginate={{$paginate}}&platinum_category={{$platinum_category_id}}&check_fixed_price={{$check_fixed_price}}" style="width: 20%" class="btn rounded-0 btn-info bg-info-800 search-date float-left" id="download-button" onclick="return clickdownload()">
                                <i class="fal fa-download"></i>
                                {{ __('message.export excel') }}
                            </a>
                        </div>
                    </div>
                </div>
                <div class="col-sm-2 col-xl-2">
                    <a class="btn btn-sm  btn-primary float-right" href="{{ route('warehouse-product.category-show') }}">
                        <i class="fal fa-arrow-left  mr-2"></i>
                        {{__('message.back')}}
                    </a>
                </div>
            </div>
            <div class="row mr-1">
                <div class="col-xs-10 col-sm-10 col-md-10 col-xl-10">
                    <div class="panel-container show table-responsive">
                        <table id="example" class="table  table-striped w-100">
                            <thead class="bg-fusion-50 text-center">
                            <tr>
                                <th>#</th>
                                <th>{{__('message.gia number')}}</th>
                                <th class="text-center">{{ __('message.part number') }}</th>
                                <th class="text-center">{{ __('message.product category') }}</th>
                                <th>{{ __('message.name') }}</th>
                                <th>{{ __('message.price') }}</th>
                                <th>{{__('message.fixed price')}}</th>
                                <th>{{ __('message.qty') }}</th>
                                @if($gold->name == 'មាស' || $gold->name == 'Gold' || $gold->name == 'ทอง')
                                @else
                                    <th>{{ __('message.weight') }}</th>
                                @endif

                                @if($gold->fixed_price == true)
                                @else
                                    <th>{{ __('message.gold weight') }}</th>
                                @endif
                            </tr>
                            </thead>
                            <tbody class="text-center" id="accordionExample">
                            <?php
                                $totalCosts = 0;
                            ?>
                            @foreach ($products as $index => $product)
                                <tr class="{{ !$product->is_active||$product->qty==0 ? 'inactive':''}} border-bottom bg-white  {{+$loop->index%2!=$product->count()?'border-top':''}}" data-toggle="collapse" href="#row{{$loop->index}}" role="button" aria-expanded="false" aria-controls="row{{$loop->index}}">
                                    <td class="align-middle">{{ $index + 1 }}</td>
                                    <td class="align-middle">{{ $product->gia_number??'' }}</td>
                                    <td class="">
                                        <div class="row no-gutters">
                                            <div class="col-10 d-flex justify-content-center align-items-center">
                                                {{$product->part_number}}

                                            </div>
                                        </div>
                                    </td>
                                    <td>
                                        {{$product->productCategory->name??''}}
                                    </td>
                                    <td class="align-middle">
                                        {{ $product->name }}
                                    </td>
                                    @if($product->fixed_price)
                                        <td class="credit align-middle">
                                            {{number_format($product->price,2)}} {{$currency_->currency_symbol??''}}
                                        </td>
                                    @else
                                        <td class="credit align-middle">
                                            {{number_format($product->sellingPrice(),2)}} {{$currency_->currency_symbol??''}}
                                        </td>
                                    @endif
                                    <td class="align-middle">
                                        <div class="col-2 d-flex justify-content-center align-items-center m-auto">
                                            @if($product->fixed_price)
                                                <input type="checkbox" checked/>
                                            @endif
                                        </div>
                                    </td>
                                    <td class="align-middle">
                                        {{$product->qty}}
                                    </td>
                                    @if($gold->name == 'មាស' || $gold->name == 'Gold' || $gold->name == 'ทอง')
                                    @else
                                        <td class="">
                                            {{number_format($product->weight , 2)}}
                                        </td>
                                    @endif

                                    @if($gold->fixed_price == true)
                                    @else
                                        <td class="align-middle">
                                            {{number_format($product->goldWeight() , 2)}}
                                        </td>
                                    @endif
                                </tr>
                                <tr class="bg-white">
                                    <td colspan="11">
                                        <div class="collapse multi-collapse" id="row{{$loop->index}}" data-parent="#accordionExample">
                                            <div class="panel-content">
                                                <ul class="nav nav-tabs" role="tablist">
                                                    <li class="nav-item">
                                                        <a class="nav-link active" data-toggle="tab" href="#detail{{$loop->index}}" role="tab">{{__('message.detail')}}</a>
                                                    </li>
                                                    <li class="nav-item">
                                                        <a class="nav-link" data-toggle="tab" href="#supplier{{$loop->index}}" role="tab">{{__('message.supplier')}}</a>
                                                    </li>
                                                    <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#attribute{{$loop->index}}" role="tab">{{__('message.attribute')}}</a></li>
                                                    <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#descriptions{{$loop->index}}" role="tab">{{__('message.description')}}</a></li>
                                                </ul>
                                                <div class="tab-content  border-top-0 p-3" style="border:1px solid #dee2e6!important; border-top:none !important;">
                                                    <div class="tab-pane fade show active" id="detail{{$loop->index}}" role="tabpanel">
                                                        <div class="">
                                                            <div class="card-body">
                                                                <div class="row">
                                                                    <div class="col-xs-3 col-sm-3 col-md-3 col-xl-3">
                                                                        @if($product->image)
                                                                            <img class="rounded" id="myImg{{$index}}" src="{{asset($product->image)}}" style="width:150px;max-width:200px;cursor:pointer;">
                                                                        @else
                                                                            <img class="rounded" id="myImg{{$index}}" src="{{asset('no_image.png')}}" style="width:150px;max-width:200px;cursor:pointer;">
                                                                        @endif
                                                                    </div>
                                                                    <div class="col-xs-6 col-sm-6 col-md-4 col-xl-4">
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.cost')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">: {{ number_format($product->cost(), 2) }} {{$currency_->currency_symbol??''}}</div>
                                                                        </div>
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.selling cost')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">: {{ number_format($product->sellingCost(), 2) }} {{$currency_->currency_symbol??''}}</div>
                                                                        </div>
                                                                        @if($product->selling_wagesInWeight()??0)
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.wages')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">:
                                                                                {{number_format($product->selling_wagesInWeight()??0 , 2)}} {{$currency_->currency_symbol}}
                                                                            </div>
                                                                        </div>
                                                                        @endif
                                                                        @if($product->wages_in_weight)
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.wages')}} (គិតជាលី)
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">:
                                                                                {{number_format($product->wages_in_weight??0 , 2)}}
                                                                            </div>
                                                                        </div>
                                                                        @endif

                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.original wages')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">:
                                                                                {{number_format($product->cost_wagesInWeight()??0 , 2)}} {{$currency_->currency_symbol}}
                                                                            </div>
                                                                        </div>
                                                                        @if($product->purity_upgrade_to)
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.purity upgrade to')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{$product->purity_upgrade_to??''}}
                                                                                </div>
                                                                            </div>
                                                                        @endif
                                                                        @if($product->selling_purity)
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.selling purity')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{$product->selling_purity??''}}
                                                                                </div>
                                                                            </div>
                                                                        @endif
                                                                    </div>
                                                                    <div class="col-xs-4 col-sm-6 col-md-4 col-xl-4">
                                                                        @if($product->original_invoice)
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.original invoice')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{$product->original_invoice??''}}
                                                                                </div>
                                                                            </div>
                                                                        @endif
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.user')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left credit">:
                                                                                <a href="{{route('users.show' , $product->user_id)}}" class="text-dark" title="{{__('message.show user')}}">
                                                                                    {{$product->user->name??''}}
                                                                                </a>
                                                                            </div>
                                                                        </div>
                                                                        <div class="row mb-3">
                                                                            <div class="col-6">
                                                                                <p class="fw-bolder credit text-left">
                                                                                    {{__('message.is_active')}}
                                                                                </p>
                                                                            </div>
                                                                            <div class="col-6 text-left">:
                                                                                @if ($product->is_active)
                                                                                    <label class="badge badge-info" style="background-color:#196eec">
                                                                                        {{ __('message.is_active') }}
                                                                                    </label>
                                                                                @else
                                                                                    <label class="badge badge-danger" style="background-color: red">
                                                                                        {{ __('message.no active') }}
                                                                                    </label>
                                                                                @endif
                                                                            </div>
                                                                        </div>
                                                                        @if($product->old_code)
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.old code')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{$product->old_code??''}}
                                                                                </div>
                                                                            </div>
                                                                        @endif
                                                                        @if($product->diamond_size)
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.diamond size')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:{!!$product->diamond_size??0!!}</div>
                                                                            </div>
                                                                        @endif
                                                                    </div>

                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                    <div class="tab-pane fade text-left" id="supplier{{$loop->index}}" role="tabpanel">
                                                        <div class="row mb-3">
                                                            <div class="col-1">
                                                                <p class="fw-bolder credit text-left">
                                                                    {{__('message.supplier')}}
                                                                </p>
                                                            </div>
                                                            <div class="col-6 text-left">:{{$product->supplier->name??''}}</div>
                                                        </div>
                                                        <div class="row mb-3">
                                                            <div class="col-1">
                                                                <p class="fw-bolder credit text-left">
                                                                    {{__('message.supplier rate')}}
                                                                </p>
                                                            </div>
                                                            <div class="col-6 text-left credit">:{{number_format($product->supplier_rate??0 , 2)}} {{$currency_->currency_symbol}}</div>
                                                        </div>
                                                        <div class="row mb-3">
                                                            <div class="col-1">
                                                                <p class="fw-bolder credit text-left">
                                                                    {{__('message.phone')}}
                                                                </p>
                                                            </div>
                                                            <div class="col-6 text-left">:{{$product->supplier->phone??''}}</div>
                                                        </div>
                                                        <div class="row mb-3">
                                                            <div class="col-1">
                                                                <p class="fw-bolder credit text-left">
                                                                    {{__('message.note')}}
                                                                </p>
                                                            </div>
                                                            <div class="col-6 text-left">:{{$product->supplier->note??''}}</div>
                                                        </div>
                                                    </div>
                                                    <div class="tab-pane fade text-left" id="attribute{{$loop->index}}" role="tabpanel">
                                                        @if($product->productAttributes->count() > 0)
                                                            <div class="panel-container show table-responsive">
                                                                <h3>{{__('message.product attribute')}}</h3>
                                                                <table id="" class="table  table-striped w-100">
                                                                    <thead class="bg-fusion-50 text-center" style="background-color: lightslategray !important;">
                                                                    <tr>
                                                                        <th>#</th>
                                                                        <th>{{ __('message.name') }}</th>
                                                                        <th>{{ __('message.price') }}</th>
                                                                        <th>{{ __('message.qty') }}</th>
                                                                        <th>{{ __('message.cost') }}</th>
                                                                        <th>{{ __('message.action') }}</th>
                                                                    </tr>
                                                                    </thead>
                                                                    <tbody class="text-center" id="">
                                                                    @foreach ($product->productAttributes as $i => $productAttribute)
                                                                        <tr class="{{ $productAttribute->qty==0 ? 'inactive':''}} bg-white  {{++$loop->index%2!=$productAttribute->count()?'border-top':''}}">
                                                                            <td class="align-middle">{{ $i + 1 }}</td>
                                                                            <td class="">
                                                                                {{$productAttribute->name}}
                                                                            </td>
                                                                            <td class="credit"> {{number_format($productAttribute->price , 2)}} {{$currency_->currency_symbol}}</td>
                                                                            <td> {{$productAttribute->qty}}</td>
                                                                            <td class="credit"> {{number_format($productAttribute->cost , 2)}} {{$currency_->currency_symbol}}</td>
                                                                            <td>

                                                                                <form method="POST" action="{{route('productAttribute.destroy' , $productAttribute->id)}}" style="display:inline">
                                                                                    <input name="_method" type="hidden" value="DELETE">
                                                                                    {{ csrf_field() }}
                                                                                    <button type="submit" class="btn btn-xs btn-danger"
                                                                                            onclick="return confirm('{{ __('message.do you want to delete') }}?')">
                                                                                        <i class="fal fa-trash" style="color: #FFF;"></i>
                                                                                    </button>
                                                                                </form>
                                                                            </td>
                                                                        </tr>
                                                                    @endforeach
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                        @else
                                                            <div class="text-center">
                                                                <h3>{{__('message.product attribute is empty')}}</h3>
                                                            </div>
                                                        @endif
                                                    </div>

                                                    <div class="tab-pane fade" id="descriptions{{$loop->index}}" role="tabpanel">
                                                        @if($product->description)
                                                            <div>
                                                                {!!$product->description!!}
                                                            </div>
                                                        @else
                                                            <div class="text-center">
                                                                <h3>{{__('message.description is empty')}}</h3>
                                                            </div>
                                                        @endif
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                                <?php
                                    $totalCosts += $product->cost($product->weight);
                                ?>
                            @endforeach
                            <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="4" style="text-align: right;">
                                        {{__('message.total sale price')}} :
                                    </th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalPrice,2)}} {{$currency_->currency_symbol??''}}
                                    </th>

                                    <th></th>
                                    <th></th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalQty,0)}}
                                    </th>
                                    @if($gold->fixed_price == true || $gold->name == 'មាស')
                                    @else
                                        <th class="credit">{{number_format($totalWeight , 2)}}</th>
                                    @endif
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalGoldWeight,2)}}
                                    </th>
                                </tr>
                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="4" style="text-align: right;">
                                        {{__('message.total wages sale')}} :
                                    </th>
                                    <th style="text-align: left;" class="credit text-center">
                                        {{number_format($totalWage,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="4"></th>
                                </tr>

                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;margin-top:2px solid #ccc;">
                                    <th colspan="4" style="text-align: right;">
                                        {{__('message.total product cost')}} :
                                    </th>
                                    <th style="text-align: left;" class="credit text-center">
                                        {{number_format($totalCosts,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="4"></th>
                                </tr>
                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="4" style="text-align: right;">
                                        {{__('message.total original wages')}} :
                                    </th>
                                    <th style="text-align: left;" class="credit text-center">
                                        {{number_format($totalOriginalWage,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="4"></th>
                                </tr>


                                <!-- <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="5" style="text-align: right;">
                                        {{__('message.total sale price')}} :
                                    </th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalPrice,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th></th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalQty,0)}}
                                    </th>
                                    <th colspan="2" class="credit">{{number_format($totalWeight ,2)}}</th>
                                </tr>
                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="5" style="text-align: right;">
                                        {{__('message.total wages sale')}} :
                                    </th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalWage,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="3"></th>
                                </tr>
                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;margin-top:2px solid #ccc;">
                                    <th colspan="5" style="text-align: right;">
                                        {{__('message.total cost of sale')}} :
                                    </th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalCosts,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="3"></th>
                                </tr>
                                <tr style="font-weight:400;font-size:16px;background-color: #99b288;">
                                    <th colspan="5" style="text-align: right;">
                                        {{__('message.total original wages')}} :
                                    </th>
                                    <th colspan="" style="text-align: center;" class="credit">
                                        {{number_format($totalOriginalWage,2)}} {{$currency_->currency_symbol??''}}
                                    </th>
                                    <th colspan="3"></th>
                                </tr> -->
                            </tbody>
                        </table>
                        <!-- Pagination bootstrap-->
                        @if($products->hasPages())
                            <div class="d-flex m-2 p-2" style="justify-content: space-between;align-items: start;width: 20%">


                                    <select id="paginate" name="paginate" class="form-select text-center rounded mr-2 mt-1"  aria-label="Default select example" style="width: 90px;font-size: 14px;border: 1px solid rebeccapurple">
                                        <option selected hidden="hidden">{{$paginate}}</option>
                                        <option value="25">25</option>
                                        <option value="50">50</option>
                                        <option value="100">100</option>
                                        <option value="250">250</option>
                                        <option value="500">500</option>
                                        <option value="1000">1000</option>
                                    </select>

                                <div class="">
                                    {{ $products->appends($_GET)->links() }}
                                </div>
                            </div>
                        @endif
                    </div>
                </div>
                <div class="col-xs-2 col-sm-2 col-md-2 col-xl-2 mt-4">
                    <div class="card card-body shadow-lg p-1 rounded overflow-hidden position-relative mb-g text-center">
                        <label class="pt-3">
                            <img src="{{asset('all_weight.png')}}" style="width: 60px;padding-bottom: 20px;">
                            <div class="text-light" style="font-size: 15px;">
                                <p class="text-dark" style="font-size: 16px">{{__('message.not for sale')}}</p>
                            </div>
                        </label>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('scripts')
    @include('app.datepicker-js-config')
    <script>
        // date earchform  strt_date to EndDate
        // $('#btnBrow').click(function () {
        //     $('#browFile').click();
        // });
        $(document).ready(function() {
            $(".ranges > ul > li").click(function() {
                setTimeout(function() {
                    $('#search-form').submit();
                }, 100);
            });
            $("#datepicker").on("change.dp" , function (){
                $("#search-form").submit();
            });
        });
        // date
        var runDatePicker = function() {
            // enable clear button
            $('#datepicker').datepicker({
                todayBtn: "linked",
                clearBtn: true,
                todayHighlight: true,
                templates: controls
            });
        }
        // end date
    </script>
    <script>
        $('#btnBrow').click(function () {
            $('#browFile').click();
        });
        $('#modifyBrow').click(function (){
            $('#browModify').click();
        })
        $(document).ready(function() {
            $("#js-nav-menu").removeClass('active');
            $("#js-nav-menu li ul li").removeClass('active');
            $("#menu_stock_list").addClass('active open');
            $("#collapse_stock").addClass('collapse in')
            $("#menu_expense_options").addClass('active')
        })
    </script>
@endsection
@section('meta')
    <title>{{ __('message.warehouse') }} - {{$settings_->shop_name}}</title>
@endsection


© KUJUNTI.ID