Anons79 Mini Shell

Directory : /home/aplikasiposinfo/www/derfacell.fixmate.id/resources/views/item/
Upload File :
Current File : /home/aplikasiposinfo/www/derfacell.fixmate.id/resources/views/item/index.blade.php

    @extends('layouts.app')
    @push('styles')
        <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />

        <!-- JQuery DataTable Css -->
        <link href="{{ url('material') }}/plugins/jquery-datatable/skin/bootstrap/css/dataTables.bootstrap.css"
            rel="stylesheet">
        <!-- JQuery DataTable Css -->

        {{-- datapicker-CSS --}}
        <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css" />
        {{-- datapicker-CSs --}}
    @endpush

    @push('scripts')
        {{-- data Table --}}
        <script src="{{ url('material') }}/js/pages/tables/jquery-datatable.js"></script>
        <script src="{{ url('material') }}/plugins/jquery-datatable/jquery.dataTables.js"></script>
        <script src="{{ url('material') }}/plugins/jquery-datatable/skin/bootstrap/js/dataTables.bootstrap.js"></script>
        {{-- data Table --}}



        <script type="text/javascript" src="https://cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
        <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js"></script>
        <script>
            $(function() {
                $('#daterange').daterangepicker({
                    opens: 'right',
                    locale: {
                        format: 'DD/MM/YYYY'
                    },
                    showCustomRangeLabel: true,
                    alwaysShowCalendars: true,
                    ranges: {
                        'Hari Ini': [moment(), moment()],
                        'Kemarin': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
                        '7 Hari Terakhir': [moment().subtract(6, 'days'), moment()],
                        '1 Bulan Terakhir': [moment().subtract(29, 'days'), moment()],
                        'Bulan Ini': [moment().startOf('month'), moment().endOf('month')],
                        'Bulan Terakhir': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1,
                            'month').endOf('month')]
                    }
                }, function(start, end, label) {

                    console.log("A new date selection was made: " + start.format('YYYY-MM-DD') + ' to ' + end
                        .format('YYYY-MM-DD'));
                    var delayInMilliseconds = 500; //1 second

                    setTimeout(function() {
                        $("#filter-form").submit();
                    }, delayInMilliseconds);

                });
            });
        </script>
    @endpush

    @section('content')
        <div class="container-fluid">
            <div class="block-header">
                <h2>Data Barang</h2>
            </div>

            <div class="row clearfix">
                <!-- Task Info -->
                <div class="col-xs-12 col-sm-12 col-md-12">
                    <div class="card">
                        <div class="header">
                            @if (\Helper::hakAkses('master_data', 'create'))
                                <a href="{{ route('item.create') }}" class="btn btn-primary">Tambah Barang</a>
                            @endif
                        </div>
                        <div class="body">
                            <form action="" id="filter-form">
                                <div class="row">

                                    <div class="col-lg-3 col-md-3">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                <i class="material-icons">assignment</i>
                                            </span>
                                            <div class="form-line">
                                                <select class="form-control" name="kategori">
                                                    <option selected disabled>Pilih Kategori</option>
                                                    @foreach ($kategori as $item)
                                                        <option value="{{ $item->id }}">{{ $item->nama_kategori }}
                                                        </option>
                                                    @endforeach

                                                </select>
                                            </div>
                                        </div>
                                    </div>

                                    {{-- <div class="col-lg-3 col-md-3">
                                        <div class="input-group">
                                            <span class="input-group-addon">
                                                <i class="material-icons">memory</i>
                                            </span>
                                            <div class="form-line">
                                                <input class="form-control" placeholder="Nama Barang" name="nama_item"
                                                    value="">
                                            </div>
                                        </div>
                                    </div> --}}
                                    <div class="col-lg-2 col-md-3">
                                        <div class="input-group">
                                            <button class="btn btn-primary">Cari</button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                            <div class="row">
                                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                                    <div class="card">
                                        <div class="header text-center">
                                            <div>
                                                <h2><i class="material-icons col-cyan ">shopping_cart</i>Stok Toko</h2>
                                            </div>
                                        </div>
                                        <div class="body  text-center" style="padding-top:0">
                                            <div style="margin-bottom:0px;margin-top:0">
                                                <h2>{{ $stok_toko }}</h2>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                                    <div class="card">
                                        <div class="header text-center">
                                            <div>
                                                <h2><i class="material-icons col-lime ">store_mall_directory</i>Stok Gudang
                                                </h2>
                                            </div>
                                        </div>
                                        <div class="body  text-center" style="padding-top:0">
                                            <div style="margin-bottom:0px;margin-top:0">
                                                <h2>{{ $stok_gudang }}</h2>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                                    <div class="card">
                                        <div class="header text-center">
                                            <div>
                                                <h2><i class="material-icons col-orange ">money_off</i>Barang Retur</h2>
                                            </div>
                                        </div>
                                        <div class="body  text-center" style="padding-top:0">
                                            <div style="margin-bottom:0px;margin-top:0">
                                                <h2>{{ $retur_barang }}</h2>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                @if (\Helper::hakAkses('dashboard_admin', 'view'))
                                    <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                                        <div class="card">
                                            <div class="header text-center">
                                                <div>
                                                    <h2><i class="material-icons col-green ">monetization_on</i>Modal</h2>
                                                </div>
                                            </div>
                                            <div class="body  text-center" style="padding-top:0">
                                                <div style="margin-bottom:0px;margin-top:0">
                                                    <h2>Rp. {{ number_format($modal) }}</h2>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                @endif
                            </div>



                            <div class="table-responsive">
                                <table class="table table-bordered table-striped table-hover js-basic-example dataTable">
                                    <thead>
                                        <tr>
                                            <th>No.</th>
                                            <th>Nama Barang</th>
                                            <th>Kategori</th>
                                            <th>Harga Jual</th>
                                            <th>Harga Beli</th>
                                            <th>Total Harga Beli</th>
                                            <th>Stok Toko</th>
                                            <th>Stok Gudang</th>
                                            <th>Retur Penjualan</th>
                                            <th>Tools</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        @foreach ($datas as $key => $data)
                                            <tr>
                                                <td>
                                                    {{ $loop->iteration }}
                                                </td>
                                                <td>
                                                    {{ $data->nama_item }}
                                                </td>
                                                <td>
                                                    {{ $data->kategoriItem->nama_kategori }}
                                                </td>
                                                <td>
                                                    {{ number_format($data->harga_item) }}
                                                </td>
                                                <td>
                                                    {{ number_format($data->biaya_item) }}
                                                </td>
                                                <td>
                                                    {{ number_format($data->biaya_item * ($data->stok + $data->stok_gudang + $data->total_retur_penjualan)) }}
                                                </td>
                                                <td>
                                                    {{ $data->stok }}
                                                </td>
                                                <td>
                                                    {{ $data->stok_gudang }}
                                                </td>
                                                <td>
                                                    {{ $data->total_retur_penjualan }}
                                                </td>
                                                <td>
                                                    @if (\Helper::hakAkses('master_data', 'edit'))
                                                        <a href="{{ route('item.edit', $data->id) }}"
                                                            class="btn btn-primary">Edit</a>
                                                    @endif
                                                    @if (\Helper::hakAkses('master_data', 'delete'))
                                                        <form action="{{ route('item.destroy', $data->id) }}"
                                                            method="POST" style="display:inline">
                                                            @csrf
                                                            @method('DELETE')
                                                            <button type="submit" class="btn btn-danger"
                                                                id="hapus-button">Delete</button>
                                                        </form>
                                                    @endif
                                                </td>
                                            </tr>
                                        @endforeach

                                    </tbody>

                                    <tfoot>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- #END# Task Info -->
            </div>
        </div>
    @endsection

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]