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


@extends('layouts.admin-main')
@section('content')
    <style>
        .hidden {
            display: none;
        }

        @media print {

            .colspan-5 {
                display: table-cell;
            }
        }
    </style>
    <div class="col-lg-12">
        <div class="card-body shadow-1">
            <div class="row" style="display: flex;justify-content: center;align-items: center;color: rebeccapurple;">
                <div class="col-sm-6 col-xl-6 p-2" style="border: 1px solid rebeccapurple;display: flex;justify-content: center;align-items: center;">
                    <h1 style="font-weight: bold;font-size: 24px">{{$settings_->shop_name}}</h1>
                </div>
            </div>
            <div class="mt-4 ml-2 mr-2" style="display: flex;justify-content: center;align-items: center;color: rebeccapurple">
                <div class="row" style="width: 98%;">
                    <div class="col-sm-6 col-xl-8 text-left" style="font-size: 14px;">
                        {{__('message.cashier')}} : <b>{{Auth::user()->name}}</b>
                    </div>
                    <div class="col-sm-6 col-xl-4 text-right" style="font-size: 14px">
                        {{__('message.invoice date')}} : <b>{{now()->toDateTimeString()}}</b>
                    </div>
                </div>
            </div>
            <div class="mt-4 ml-2 mr-2" style="display: flex;justify-content: center;align-items: center;">
                <div class="row" style="width: 98%;">
                    <div class="col-sm-8 col-xl-8 text-left" style="font-size: 14px">
                        {{__('message.location')}} : <b>{{$settings_->address}}</b>
                    </div>
                    <div class="col-sm-4 col-xl-4 text-right" style="font-size: 14px">
                        {{__('message.phone number')}} : <b>{{$settings_->phone}}</b>
                    </div>
                </div>
            </div>
            <div class="mt-4 ml-2 mr-2" style="display: flex;justify-content: center;align-items: center;">
                <div class="row" style="width: 98%;">
                    <div class="col-sm-8 col-xl-8 text-left" style="font-size: 14px">
                        <span class="mr-4"> {{__('message.start date')}}  {{date('d/m/y' , strtotime($start_date))}} </span>
                        <span class="ml-4"> {{__('message.to date')}}  {{date('d/m/y' , strtotime($end_date))}} </span>
                    </div>
                </div>
            </div>
            <div class="row mt-4" style="display: flex;justify-content: center;align-items: center;color: rebeccapurple;">
                <div class="col-sm-6 col-xl-12 p-2 text-center" style="display: flex;justify-content: center;align-items: center;">
                    <h1 style="font-weight: bold;border-bottom: 2px solid rebeccapurple;font-size: 18px" class="">{{__('message.sales invoice')}}</h1>
                </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" style="font-size: 14px !important;">
                            <thead class="bg-fusion-50 text-center">
                            <tr class="">
                                <th>N0.</th>
                                <th class="text-center">{{ __('message.part number') }}</th>
                                <th>{{ __('message.product name') }}</th>
                                <th>{{ __('message.qty') }}</th>
                                <th>{{ __('message.cost of sale') }}</th>
                                <th>{{ __('message.selling cost') }}</th>
                                <th>{{ __('message.original wages') }}</th>
                                <th>{{ __('message.sale wages') }}</th>
                                <th>{{ __('message.selling rate') }}</th>
                                <th>{{ __('message.sales price') }}</th>
                                <th>{{ __('message.discount') }}</th>
                                <th>{{ __('message.net sale') }}</th>
                                <th>{{ __('message.weight') }}</th>
{{--                                <th>{{ __('message.gold weight') }}</th>--}}
                                <th>{{ __('message.diamond size') }}</th>
{{--                                <th>{{ __('message.description') }}</th>--}}
                                <th>{{ __('message.image') }}</th>
                                <th>{{ __('message.product category') }}</th>
                                <th>{{ __('message.user') }}</th>
                                <th>{{ __('message.created date') }}</th>
                            </tr>
                            </thead>
                            <tbody>

                            @foreach ($sales as $index => $sale)
                                <tr class="text-center">
                                    <td>{{ $index+1 }}</td>
                                    <td class="text-center">{{$sale->part_number}}</td>
                                    <td>
                                        {{ $sale->name??'' }}
                                    </td>
                                    <td class="">
                                        {{ $sale->qty??0}}
                                    </td>
                                    <td class="credit">
                                        {{ number_format($sale->cost(), 2) }} {{$currency_->currency_symbol}}
                                    </td>
                                    <td class="credit">
                                        {{ number_format($sale->selling_cost, 2) }} {{$currency_->currency_symbol}}
                                    </td>
                                    <td>
                                        {{number_format($sale->original_wages , 2)}} {{$currency_->currency_symbol}}
                                    </td>
                                    <td>
                                        {{number_format($sale->wages , 2)}} {{$currency_->currency_symbol}}
                                    </td>
                                    <td class="credit">
                                        {{ number_format($sale->selling_rate, 4) }} {{$currency_->currency_symbol}}
                                    </td>
                                    <td class="credit">
                                        {{ number_format($sale->sales_price+$sale->discount , 2) }} {{$currency_->currency_symbol}}
                                    </td>
                                    <td>
                                        {{number_format($sale->discount , 2)}} {{$currency_->currency_symbol}}
                                    </td>
                                    <td>
                                        {{number_format($sale->sales_price , 2)}} {{$currency_->currency_symbol}}
                                    </td>
                                    <td>
                                        {{ number_format($sale->product->weight , 2) }}
                                    </td>
{{--                                    <td>--}}
{{--                                        {{ number_format($sale->goldWeight() , 2) }}--}}
{{--                                    </td>--}}
                                    <td>
                                        {!! $sale->diamond_size !!}
                                    </td>
{{--                                    <td>--}}
{{--                                        {!! $sale->description !!}--}}
{{--                                    </td>--}}
                                    <td>
                                        <div class="col-xs-12 col-sm-10">
                                            <div class="d-flex justify-content-centers">
                                                @if($sale->image)
                                                    <img src="{{asset($sale->image)}}" style="width:55px;">
                                                @endif
                                            </div>
                                        </div>
                                    </td>
                                    <td>
                                        {{$sale->productCategory->name ?? ''}}
                                    </td>

                                    <td>
                                        <a href="{{route('users.show' , $sale->user_id)}}" class="text-dark" title="{{__('message.show user')}}">
                                            {{$sale->user->name??''}}
                                        </a>
                                    </td>
                                    <td>
                                        {{ $sale->created_at->format('d/m/Y H:i') }}
                                    </td>
                                </tr>
                                @endforeach
                                    <?php
                                    $help = Clone ($sales);
                                    $wages = $help->sum('wages');
                                    $cost = $help->sum('cost');
                                    $usd_amount = $help->sum('usd_amount');
                                    $khr_amount = $help->sum('khr_amount');
                                    $thb_amount = $help->sum('thb_amount');
                                    ?>

{{--                            <tr class="">--}}
{{--                                <th colspan="5" rowspan="2"> </th>--}}
{{--                                <th class="bg-secondary-100" style="font-weight: bold;color: black">{{__('message.total cost')}}</th>--}}
{{--                                <th class="bg-primary-100" style="font-weight: bold">{{__('message.total original wage')}}</th>--}}
{{--                                <th class="bg-primary-100" style="font-weight: bold">{{__('message.total wages sale')}}</th>--}}
{{--                                <th rowspan="2"></th>--}}
{{--                                <th class="bg-warning-100" style="font-weight: bold">{{__('message.total sale price')}}</th>--}}
{{--                                <th class="bg-danger-100" style="color: black;font-weight: bold">{{__('message.total discount')}}</th>--}}
{{--                                <th class="bg-danger-100" style="color: black;font-weight: bold">{{__('message.total net price')}}</th>--}}
{{--                                <th class="bg-info-100" style="font-weight: bold">{{__('message.total profit')}}</th>--}}
{{--                            </tr>--}}

                            <tr class="border-bottom text-center" style="background-color: #efe9e9 !important;">
                                <td colspan="5">{{__('message.total')}} : </td>
                                <td class="credit">{{$currency_->currency_symbol}} {{number_format($total_sale_cost,2)}}</td>
                                <td class="credit">{{$currency_->currency_symbol}} {{number_format($total_sale_original_wage,2)}}</td>
                                <td class="credit">{{$currency_->currency_symbol}} {{number_format($total_sale_wage,2)}}</td>
                                <td></td>
                                <td class="credit">
                                    {{$currency_->currency_symbol}} {{number_format($total_sale_price+$total_sale_discount , 2)}}
                                </td>
                                <td class="credit">{{$currency_->currency_symbol}} {{number_format($total_sale_discount, 2)}}</td>
                                <td class="credit">{{$currency_->currency_symbol}} {{number_format($total_sale_price,2)}}</td>
                                <td class="credit" colspan="6">{{__('message.total profit')}}   :   {{$currency_->currency_symbol}} {{number_format($total_sale_profit , 2)}}</td>
                            </tr>

                                    </tbody>
                            </table>
                    </div>
                </div>
            </div>
{{--            <div class="col-lg-12 fixed-bottom" style="position: relative;margin-bottom: 0;padding: 0;z-index: 0">--}}
{{--                <div class="card-body shadow-lg" style="display: flex;justify-content: end;align-items: center">--}}
{{--                    <div class="panel-container show table-responsive" style="width: 100%;">--}}
{{--                        <div class="d-flex flex-column h-100">--}}
{{--                            <div class="h-auto">--}}
{{--                                <table class="table table-striped w-100" style="font-size: 14px !important;">--}}
{{--                                <thead class="bg-fusion-50 text-center" style="background-color: rgba(119,136,153,0.62) !important;">--}}
{{--                                <tr class="">--}}
{{--                                    <th class="colspan-5" colspan="5"> </th>--}}
{{--                                    <th class="bg-secondary-100" style="font-weight: bold;color: black">{{__('message.total cost')}}</th>--}}
{{--                                    <th class="bg-primary-100" style="font-weight: bold">{{__('message.total original wage')}}</th>--}}
{{--                                    <th class="bg-primary-100" style="font-weight: bold">{{__('message.total wages sale')}}</th>--}}
{{--                                    <th class="bg-warning-100" style="font-weight: bold">{{__('message.total sale price')}}</th>--}}
{{--                                    <th class="bg-danger-100" style="color: black;font-weight: bold">{{__('message.total discount')}}</th>--}}
{{--                                    <th class="bg-danger-100" style="color: black;font-weight: bold">{{__('message.total net price')}}</th>--}}
{{--                                    <th colspan="2"></th>--}}
{{--                                    <th class="bg-info-100" style="font-weight: bold">{{__('message.total profit')}}</th>--}}
{{--                                </tr>--}}
{{--                                </thead>--}}
{{--                                <tbody>--}}

{{--                                </tbody>--}}
{{--                            </table>--}}
{{--                            </div>--}}
{{--                        </div>--}}
{{--                    </div>--}}
{{--                </div>--}}
{{--            </div>--}}
            <div style="width: 100%;display: flex;justify-content: space-between;align-items: center">
                <div class="text-center mt-4 ml-4 notPrint" style="width: 5%;; height: 50%;">
                    <a href="{{route('sale-report.index2')}}" id="back" name="back" class="btn-sm btn-danger mt-6 fw-bold notPrint" style="cursor: pointer;color: white;">Back</a>
                </div>
                <div class="text-center mt-4 mr-4 notPrint" style="width: 5%;; height: 50%;">
                    <a id="print" name="print" class="btn-sm btn-info mt-6 fw-bold notPrint" onclick="return print()" style="cursor: pointer;color: white;">Print</a>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('scripts')
    @include('app.datepicker-js-config')
    <script>
        window.print();
        setTimeout("closePrintView()", 1000);
        function closePrintView(){
            window.location.href = "{{route('sale-report.index2')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}";
        }
    </script>
    <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_report_list").addClass('active open');
            $("#collapse_report").addClass('collapse in')
            $("#menu_sale_report").addClass('active')
        })
    </script>
@endsection
@section('meta')
    <title>{{ __('message.sales') }} - {{$settings_->shop_name}}</title>
@endsection

© KUJUNTI.ID