Path : /var/www/html/jewelry-pos/resources/views/warehouses/ |
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/index.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.index' , $category->id) }}?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="input-group" style="width: 100%;"> <input type="text" class="form-control rounded-0" placeholder="{{ __('message.search') }} ..." value="{{$search}}" name="search" id="search"> <div class="input-group-append"> <button type="submit" id="searches" class="input-group-text fs-xl "> <i class="fal fa-search text-success"></i> </button> </div> </div> @if($category->children->count('id') >= 1) <div class="ml-2" style="width: 60%;"> <select class="form-control" name="platinum_category" onchange="this.form.submit();"> <option value="">{{__('message.selected all')}}</option> @if($category->name == 'មាស' || $category->name == 'Gold' || $category->name == 'ทอง') <option value="{{$category->id}}" @if($category->id == $platinum_category_id) selected @endif>{{$category->name}}</option> @endif @foreach($platinumCategories as $platinumCategory) <option value="{{$platinumCategory->id}}" @if($platinumCategory->id==$platinum_category_id) selected @endif>{{$platinumCategory->name}}</option> @endforeach </select> </div> @if($category->name == 'ផ្លាកទីន' || $category->name == 'Platinum' || $category->name == 'แพลตตินัม') <div class="ml-2" style="width: 60%;"> <select class="form-control" name="check_fixed_price" onchange="this.form.submit();"> <option value="-1">{{__('message.selected all')}}</option> <option value="1" @if($check_fixed_price==1) selected @endif>{{__('message.fixed price')}}</option> <option value="2" @if($check_fixed_price==2) selected @endif>{{__('message.not fixed price')}}</option> </select> </div> @endif @endif </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: space-between;align-items: center"> <a href="{{route('warehouse-product.print' , $category->id)}}?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: 15%"> <i class="fal fa-print"></i> {{ __('message.print') }} </a> <a class="btn btn-info bg-info-800 ml-2" id="btnBrow" style="color: whitesmoke;width: 15%"> <i class="fal fa-upload"></i> {{__('message.import')}} </a> {{-- <a class="btn btn-info bg-info-800 ml-2" id="modifyBrow" style="color: whitesmoke;width: 15%">--}} {{-- <i class="fal fa-upload"></i>--}} {{-- {{__('message.upgrade')}}--}} {{-- </a>--}} <a href="{{route('warehouse-product.export' , $category->id)}}?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> <a href="{{route('warehouse-product.sample' , $category->id)}}" style="width: 20%" class="btn btn-info rounded-0 search-date float-left" id="download-button" onclick="return clickdownload()"> <i class="fal fa-download"></i> {{ __('message.excel sample') }} </a> <form action="{{route('warehouse-product.import' , $category->id)}}" method="POST" enctype="multipart/form-data" id="myForm" name="form" style=""> @csrf <input type="file" onchange="this.form.submit();" hidden="hidden" name="browFile" id="browFile" multiple accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"> </form> {{-- <form action="{{route('warehouse-product.modify' , $category->id)}}" method="POST" enctype="multipart/form-data" id="modifyForm" name="modifyForm" style="">--}} {{-- @csrf--}} {{-- <input type="file" onchange="this.form.submit();" hidden="hidden" name="browModify" id="browModify" multiple accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">--}} {{-- </form>--}} {{-- <a href="{{route('product.build_stock', $category->id)}}?search={{$search}}" class="btn btn-success bg-success-800 search-date m-2" id="building-stock" onclick="return confirm('{{ __('message.do you want to build stock right now') }}?')">--}} {{-- <i class="fal fa-database"></i>--}} {{-- {{ __('message.building stock') }}--}} {{-- </a>--}} {{-- <script>--}} {{-- const uploadField = document.getElementById("browFile");--}} {{-- uploadField.onchange = function() {--}} {{-- if(this.files[0].size > 2097152) {--}} {{-- // alert("File is too big!");--}} {{-- this.value = "";--}} {{-- this.form.submit();--}} {{-- }--}} {{-- };--}} {{-- </script>--}} </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> @if($category->fixed_price) <th>{{__('message.gia number')}}</th> @endif <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($category->name == 'មាស' || $category->name == 'Gold' || $category->name == 'ทอง') @else <th>{{ __('message.weight') }}</th> @endif @if($category->fixed_price == true) @else <th>{{ __('message.gold weight') }}</th> @endif </tr> </thead> <tbody class="text-center" id="accordionExample"> @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> @if($category->fixed_price) <td class="align-middle">{{ $product->gia_number??'' }}</td> @endif <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($category->name == 'មាស' || $category->name == 'Gold' || $category->name == 'ทอง') @else <td class=""> {{number_format($product->weight , 2)}} </td> @endif @if($category->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 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($product->weight , 2)}}</div>--}} {{-- </div>--}} </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> {{-- @include('products.card-footer')--}} </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> @endforeach @if(!$category->fixed_price) <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 colspan="" style="text-align: center;" class="credit"> {{number_format($totalQty,0)}} </th> {{-- @if($category->name=='Platinum'|| $category->name=='ផ្លាកទីន'||$category->name=='แพลตตินัม' || $category->name == 'ផលិតផលបន្ថែម')--}} @if($category->fixed_price == true || $category->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 cost of sale')}} : </th> <th style="text-align: left;" class="credit text-center"> {{number_format($totalCost,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> @else <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($totalCost,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> @endif </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"> <?php $iconCategory = \App\Models\ProductCategory::find($category->id); ?> <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($iconCategory->icon)}}" style="width: 60px;padding-bottom: 20px;"> <div class="text-light" style="font-size: 15px;"> <p class="text-dark" style="font-size: 16px">{{$iconCategory->name}}</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