Path : /var/www/html/jewelry-pos/resources/views/transactions/ |
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/transactions/transaction.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-8 margin-tb"> <div class="row"> <div class="col-xs-8 col-sm-8 col-md-8 col-xl-8"> <form method="GET" action="{{ route('product-category.transaction' , $id) }}" id="search-form" onsubmit="" style="display:flex;width: 100%;"> <div class="input-group" style="width: 70%;"> <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> <select onchange="this.form.submit()" name="in_out" id="in_out" class="form-control mr-2 ml-4" style="width: 28%;"> <option value="0" @if($in_out == 0) selected @endif>{{__('message.all')}}</option> <option value="1" @if($in_out == 1) selected @endif>{{__('message.in')}}</option> <option value="-1" @if($in_out == -1) selected @endif>{{__('message.out')}}</option> </select> </form> </div> </div> </div> <div class="col-md-4 col-xs-4 col-sm-4 col-xl-4 margin-tb mb-4"> <div class="row"> <div class="col-lg-12 margin-tb" style="display: flex;justify-content: space-between;align-items: center"> <a href="{{route('transaction.print' , $id)}}?start_date={{$start_date}}&end_date={{$end_date}}&paginate={{$paginate}}&in_out={{$in_out}}" class="btn btn-info bg-info-800 float-left rounded-0" title="{{ __('message.print') }}" name="" {{-- onclick="return print()"--}} {{-- @if (count($members) <= 0) disabled @endif>--}} > <i class="fal fa-print"></i> {{ __('message.print') }} </a> <a href="{{route('transaction.export' , $id)}}?start_date={{$start_date}}&end_date={{$end_date}}&paginate={{$paginate}}&in_out={{$in_out}}" 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 class="pull-right" style="text-align:right;"> <a class="btn btn-sm btn-primary" href="{{ route('product-category.index') }}"> <i class="fal fa-arrow-left" aria-hidden="true"></i> {{ __('message.go back') }} </a> </div> </div> </div> </div> </div> <div class="panel-container show"> <div class="d-flex flex-column h-100"> <div class="h-auto"> <table id="example" class="table table-bordered table-hover table-striped w-100"> <thead class="bg-fusion-50 text-center"> <tr> <th>#</th> <th class="text-center">{{ __('message.product category') }}</th> <th>{{__('message.weight')}}</th> <th class="text-center">{{ __('message.weight before transaction') }}</th> <th class="text-center">{{ __('message.weight after transaction') }}</th> <th class="text-center">{{ __('message.note') }}</th> <th class="text-center">{{ __('message.user') }}</th> <th class="text-center">{{ __('message.updated at') }}</th> <th class="text-center">{{ __('message.action') }}</th> </tr> </thead> <tbody> @foreach($productCategoryWeightHistory as $index => $categoryHistory) <tr class="text-center @if($categoryHistory->weight<0) inactive @endif"> <td> {{$index+1}} </td> <td> {{$categoryHistory->productCategory->name??''}} </td> <td class="credit"> {{number_format(abs($categoryHistory->weight) , 2)}} </td> <td class="credit transparent"> {{$categoryHistory->weight_before_transaction}} </td> <td class="credit transparent"> {{$categoryHistory->weight_after_transaction}} </td> <td> {{$categoryHistory->note??''}} </td> <td> <a href="{{route('users.show' , $categoryHistory->user_id)}}" class="text-dark"> {{$categoryHistory->user->name??''}} </a> </td> <td> {{date('d-m-Y H-i-s' , strtotime($categoryHistory->created_at))}} </td> <td> <?php $ago = \Carbon\Carbon::parse($categoryHistory->created_at)->diffForHumans(); $currentDate = \Carbon\Carbon::now(); $created_at = \Carbon\Carbon::parse($categoryHistory->created_at)->addDays(1); ?> @if($created_at->gt($currentDate)) @can('product-delete') <form method="POST" action="{{route('transaction.destroy' , $categoryHistory->id)}}?category_id={{$id}}" style="display:inline"> <input name="_method" type="hidden" value="DELETE"> {{ csrf_field() }} <button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('{{ __('message.do you want to delete') }}?')"> <i class="fal fa-trash" style="color: #FFF;"></i> </button> </form> <br> <span class="badge badge-pill badge-seconded" style="font-size: 10px"> {{Carbon\Carbon::parse($categoryHistory->created_at)->diffForHumans()}} </span> @endcan @else <span class="badge badge-pill badge-danger" style="font-size: 12px"> {{Carbon\Carbon::parse($categoryHistory->created_at)->diffForHumans()}} </span> @endif </td> </tr> @endforeach </tbody> </table> <!-- datatable end --> </div> </div> </div> <!-- Pagination bootstrap--> @if($productCategoryWeightHistory->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" 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=""> {{ $productCategoryWeightHistory->appends($_GET)->links() }} </div> </div> @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_setup_list").addClass('active open'); $("#collapse_setup").addClass('collapse in') $("#menu_product_category").addClass('active') }) </script> @endsection @section('meta') <title>{{ __('message.product') }} - {{$settings_->shop_name}}</title> @endsection