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


{{--@extends('layouts.admin-main')--}}
{{--@section('content')--}}
<?php
    $product= $sale->product??null;
?>
    <!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="stylesheet" href="{{asset('assets/style.css')}}" />
    <link rel="stylesheet" href="{{asset('assets/bootstrap.min.css')}}" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.min.js">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <title>{{__('message.invoice')}} - {{$settings_->shop_name}}</title>
    <style>
        @media print {
            .noPrint{
                display:none;
            }
        }
        .middle-table p{
            margin-bottom: 0.5rem !important;
        }
    </style>
</head>
<body class="" style="background-color: #eee">
<div class="row">
    <div class="mt-2 noPrint" style="padding-left: 50px;width: 50%">
        <a class="btn btn-sm btn-primary" id="cancel" href="{{ route('pointToSale.index')}}"
           style="color: black !important;font-weight: bold;font-size: 15px;height: 100%">
            <svg class="pr-1" style="width: 20px" xmlns="http://www.w3.org/2000/svg"
                 viewBox="0 0 512 512">
                <!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
                <path
                    d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160zm352-160l-160 160c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L301.3 256 438.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0z"/>
            </svg>
            {{__('message.back')}}
        </a>
    </div>
    {{--    <div class="col-sm-12 col-xl-8"></div>--}}
    <div class="mt-2 text-end" style="padding-right: 30px;width: 50%;">
        <a onclick="prints();" class="menu-item btn btn-sm btn-primary noPrint" data-action="app-print" data-toggle="tooltip" data-placement="left"
           title="Print page" href=""
           style="color: black !important;font-weight: bold;font-size: 15px">
            <!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->

            {{__('message.print')}}
            <svg style="width: 25px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M128 0C92.7 0 64 28.7 64 64v96h64V64H354.7L384 93.3V160h64V93.3c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0H128zM384 352v32 64H128V384 368 352H384zm64 32h32c17.7 0 32-14.3 32-32V256c0-35.3-28.7-64-64-64H64c-35.3 0-64 28.7-64 64v96c0 17.7 14.3 32 32 32H64v64c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V384zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/>
            </svg>
        </a>
    </div>
</div>
<div class="row" style="margin-top: -10px;">
    <div class="col-sm-12 col-xl-12" style="margin: auto;width: 148.5mm;height: 210mm;">
        <div class="row" style="font-family: 'Khmer OS Siemreap';">

            <div class="col-sm-12 col-xl-12 mt-4" id="invoice">
                <div class="col-sm-12 col-xl-12">
                    <div class="row g-0 p-2 container shadow-3  bg-white">
                        <div class="col logo-gia text-center" style="margin-top: -10px">
                            <img src="{{asset($settings_->logo)}}" alt="" style="width: 110%;">
                        </div>
                        <div class="col" style="font-family: 'Khmer OS Siemreap';font-size: 14px !important;font-weight: bold">
                            <h2 class="text-center fs-1" >ក្រោន</h2>
                            <div class="text-center" style="width: 20rem;">
                                <div class="desc-title fs-7">មានលក់គ្រឿងអលង្ការគ្រប់មុខ</div>
                                <p class="title-name fs-7" style="font-family: 'Khmer OS Battambang';">CROWN JEWELRY</p>
                            </div>
                        </div>
                        <div class="col logo-diamon mt-4 text-center">
                            {{--                            <img src="assets/logo/diamond.png" alt="">--}}
                        </div>
                        <div class="table-address " style="font-size: 12px;margin-left: 20px">
                            <p class="address fs-7">{{$settings_->address}}</p>
                            <p class="phone-number fs-7">លេខទូរស័ព្ទៈ <b>{{$settings_->phone}}</b></p>
                        </div>
                        <div class="col" style="font-size: 12px;padding-left: 20px">
                            <div class="border-head mb-1" style="margin-top: -10px;margin-right: 20px"></div>
                            <div class="row ">
                                <div class="col table-info ml-2">
                                    <p>
                                        Customer ID : ................
                                        <br>
                                        Customer Name : ...............
                                        <br>
                                        Phone : ..............
                                    </p>
                                </div>
                                <div class="col table-info" style="text-align: end;margin-right: 20px">
                                    <p>
                                        Invoice N<label style="font-size: small;">0</label> &nbsp; &nbsp;: &nbsp; &nbsp;{{$sale->invoice_no}}
                                        <br>
                                        Invoice Date&nbsp;: {{date('d-m-y H:i' , strtotime($sale->created_at))}}
                                        <br>
                                        Cashier &nbsp; &nbsp; &nbsp; :  &nbsp; &nbsp; <b>{{$sale->user->name}}</b>
                                    </p>
                                </div>
                            </div>
                            <div class="invoices" style="margin-right: 20px;">
                                <h4 class="text-center fw-bold fs-6">វិក្កយបត្រ INVOICE</h4>
                                <table class="table table-bordered item-table " border="2" style="background-color: black">
                                    <thead>
                                    <tr>
                                        <th scope="col" class="text-center" style="font-family: 'Khmer OS Siemreap'">កូដទំនិញ
                                            <br>
                                            Item Code
                                        </th>
                                        <!-- <th rowspan="2"></th> -->
                                        <th class="text-center" colspan="3" style="font-family: 'Khmer OS Siemreap'">ឈ្មោះទំនិញ
                                            <br>
                                            Description
                                        </th>
                                        <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap'">ចំនួន
                                            <br>
                                            Qty
                                        </th>
                                        <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap'">តម្លៃ
                                            <br>
                                            Price
                                        </th>
                                        <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap'">បញ្ចុះតម្លៃ
                                            <br>
                                            Discount
                                        </th>
                                        <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap'">តម្លៃសរុប
                                            <br>
                                            Amount
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td colspan="8">
                                            <div class="row p-2">
                                                <div class="col mb-1" style="margin-top: -5px;">
                                                    <div class="row main-item " style="border: 1px; border-bottom-style: dotted;">
                                                        <div class="col" id="part_number">{{$sale->part_number}}</div>
                                                        <div class="col text-center" >
                                                            <p style="position: absolute;font-family: 'Khmer OS Siemreap';font-size: 13px;margin-left: 0px">{{$sale->name}} {{$sale->productCategory->name??''}}</p>
                                                        </div>
                                                        {{--                                                        <div class="col text-end">{{$qty??$product->qty}}</div>--}}
                                                        <div class="col text-end">{{$sale->qty}}</div>
                                                        <div class="col text-center">{{number_format($product->price , 2)}}{{$currency_->currency_symbol}}</div>
                                                        {{--                                                        <div class="col text-center fw-bold"><span class="usdAmountLocal"></span>{{$currency_->currency_symbol}}</div>--}}
                                                        <div class="col text-center">{{number_format($discount??$sale->discount , 2)}} {{$currency_->currency_symbol}}</div>
                                                        {{--                                                        <?php--}}
                                                        {{--                                                            $amount = ($product->price * $product->qty) - $product->discount--}}
                                                        {{--                                                        ?>--}}
                                                        {{--                                                        <div class="col text-center"> {{number_format($amount , 2)}}{{$currency_->currency_symbol}}</div>--}}
                                                        <?php
//                                                            $amount = ($sale->qty * $product->price) - $sale->discount;
//                                                            $amount = $sale->sales_price - $sale->discount;
//                                                        ?><!---->
                                                        <div class="col text-center fw-bold">{{number_format($sale->sales_price , 2)}}{{$currency_->currency_symbol}}</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col ">
                                                <div class="row middle-table">
                                                    <div class="col">
                                                        <img src="{{ !empty($sale->image) ? asset($sale->image) : '' }}" alt=""
                                                             width="27%" style="margin-left: 10px">
                                                        {{--                                                        <div class="col" style="margin-top: 10px;"  id="qrcode"></div>--}}
                                                        {{--                                                            <div class="col" style="margin-top:10px;padding:0;margin-left: 0;margin-right: 0">--}}
                                                        <div>
                                                            <svg class="col d-flex" id="barcode" style="bottom: 0"></svg>
                                                        </div>
                                                        {{--                                                            </div>--}}
                                                    </div>
                                                    <div class="col" style="margin-left: -50%; padding-right: 10pX;">
                                                        <div class="row g-0" style=" border-bottom: 2px solid #673091 !important;">
                                                            <div class="col ">
                                                                <span class="desc-text" style="font-family: 'Khmer OS Siemreap'">បរិយាយ</span>
                                                            </div>
                                                            <div class="col">
                                                                <span class="desc-text" style="font-family: 'Khmer OS Siemreap'">ចំនួន / ទម្ងន់</span>
                                                            </div>
                                                            <div class="border-bottom border-success border-opacity-25"></div>
                                                        </div>
                                                        <div class="row g-0 pb-1" style="margin-top: 8px; border: 1px; border-bottom-style: dotted;">
                                                            <div class="col">
                                                                <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">ទម្ងន់</span>
                                                            </div>
                                                            <div class="col">
                                                                <span class="desc-child-text m-2"> {{$sale->weight}}
                                                                    @if($sale->weight_description != 1)
                                                                        ({{$sale->weight_description}})
                                                                    @endif
                                                                </span>
                                                            </div>
                                                        </div>
                                                        <div class="row g-0 pb-1" style="margin-top: 8px; border: 1px; border-bottom-style: dotted;">
                                                            <div class="col">
                                                                <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">ឈ្នួល</span>
                                                            </div>
                                                            <div class="col">
                                                                <span class="desc-child-text m-2">{{number_format($sale->wages , 2)}} {{$currency_->currency_symbol}}</span>
                                                            </div>
                                                        </div>
                                                        <div class="row g-0 mt-1" style=" border: 1px; border-bottom-style: dotted;">
                                                            <div class="col">
                                                                <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">ទំហំពេជ្រ</span>
                                                            </div>
                                                            <div class="col" style="line-height: 10px">
                                                                {{--                                                                {!!$product->diamond_size!!}--}}
                                                                <span>{!!$sale->diamond_size!!}</span>
                                                                {{--                                                                {!!$sale->diamond_size!!}--}}
                                                            </div>
                                                        </div>
                                                        {{--                                                    <div class="row g-0 pb-1" style="margin-top: 8px; border: 1px; border-bottom-style: dotted;">--}}
                                                        {{--                                                        <div class="col">--}}
                                                        {{--                                                            <span class="desc-child-text">ពេជ្រស្អាត 3.1 លី</span>--}}
                                                        {{--                                                        </div>--}}
                                                        {{--                                                        <div class="col">--}}
                                                        {{--                                                            <span class="desc-child-text m-2"> 5 </span>--}}
                                                        {{--                                                        </div>--}}
                                                        {{--                                                    </div>--}}
                                                        <div class="row g-0 mt-1" id="html_diamond_size" style=" border: 1px; border-bottom-style: dotted;">
                                                            <div class="col">
                                                                <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">បរិយាយ</span>
                                                            </div>
                                                            <div class="col" style="line-height: 10px">
                                                                {!!$sale->description!!}
                                                                {{--                                                                <span class="desc-child-text">Description</span>--}}
                                                            </div>
                                                            {{--                                                            <div class="col" style="line-height: 10px">--}}
                                                            {{--                                                                {!!$sale->description!!}--}}
                                                            {{--                                                            </div>--}}
                                                        </div>
                                                        <script>
                                                            $(document).ready(function (){
                                                                html = '';
                                                                let diamond_size = '{{$sale->diamond_size}}';
                                                                if(!diamond_size){
                                                                    $('#html_diamond_size').html(html);
                                                                    $('#html_diamond_size').removeAttr('style');
                                                                    return;
                                                                }
                                                                // $('#html_diamond_size').html(diamond_size);
                                                            });
                                                        </script>
                                                    </div>
                                                    <!-- <div class="col middle-text mt-1">
                                                    </div> -->
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>

                                <!-- <table > -->
                                <div class="foot-tage row" style="margin-top: -10px !important;">
                                    <div class="col col-sm-7">
                                        <p>អ្នកទិញបានមើល ថ្លឹង និងយល់ព្រម តាមទំនាក់ទំនងខាងលើ គុណភាពត្រឹមត្រូវ <b> គ្រឿងពេជ្រលក់ខាត 5% និងឈ្មូល ដូរម៉ូតខាត 3% និងឈ្មូល</b>
                                            <br>
                                            <b style="font-size: 12px">*ចំណាំៈ</b> <br>
                                            <b>១.</b> គ្រឿងពេជ្រសំបកបរទេស និងទំហំគ្រាប់ចាប់ពី 6លីឡើង លក់ខាត 10% និងឈ្មូល, ដូរម៉ូតខាត 8% និងឈ្មូល <br>
                                            <b>២.</b> នាឡិការដាំពេជ្រ លក់ខាត 10% និងឈ្មូល + ម៉ាសុីន. ដូរម៉ូតខាត 7% និងឈ្មូល + មាសុីន <br>
                                            <b>៣.</b> គ្រឿងសំបកបាក់ ខូចទ្រង់ទ្រាយកាត់ខូច 20% ទៅ 30% និងឈ្មូល តាមជាក់ស្តែង<br>
                                            <b>៤.</b> សំបកគ្រឿងពេជ្រ លក់ខាត 10% និងឈ្មូល ដូរម៉ូតខាត 7% និងឈ្មូល.
                                        </p>
                                        <p class="text-center" style="margin-top: -10px !important;">Thank you!!</p>
                                    </div>
                                    <div class="col sub-footer col-sm-5" style="text-align: end;">
                                        <?php
//                                            $grandTotal = $amount + $sale->wages;
                                        $grandTotal = $sale->sales_price;
                                        $paid = $grandTotal;
                                        $balance = $grandTotal - $paid;
                                        $sales = \App\Models\Product::where('part_number' , $sale->part_number)->first();
                                        $currencies = \App\Models\Currency::all();
                                        $usd = $currencies[0];
                                        $khr = $currencies[2];
                                        $thb = $currencies[1];
                                        ?>
                                        {{--                                        <span>Grand Total &nbsp; &nbsp;&nbsp; : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; {{number_format($grandTotal , 2)}}</span><br>--}}
                                        {{--                                        <span>USD &nbsp; &nbsp;  : &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp;  {{number_format($sale->usd_amount , 2)}} {{$currency_->currency_symbol}}</span><br>--}}
                                        {{--                                        <span>KHR &nbsp;&nbsp; :  &nbsp;{{number_format($sale->khr_amount , 2)}} {{$khr->currency_symbol}}</span><br>--}}
                                        {{--                                        <span>THB &nbsp;&nbsp;&nbsp; : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  {{number_format($sale->thb_amount , 2)}} {{$thb->currency_symbol}}</span><br>--}}
                                        {{--                                        <span>Return &nbsp;&nbsp;&nbsp;&nbsp;  : &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  &nbsp;  &nbsp; &nbsp; {{number_format($balance , 2)}} {{$currency_->currency_symbol}}</span><br>--}}
                                        <table class="" style="width: 100%;">
                                            <tbody>
                                            <tr>
                                                <td class="fw-bold">Grand Total :</td>
                                                <td class="fw-bold">{{number_format($grandTotal , 2)}} {{$currency_->currency_symbol}}</td>
                                                {{--                                                    <td class="fw-bold">{{number_format($grandTotal , 2)}}</td>--}}
                                            </tr>
                                            <tr>
                                                <td class="fw-bold">USD :</td>
                                                <td class="fw-bold">{{number_format($sale->usd_amount , 2)}} {{$currency_->currency_symbol}}</td>
                                            </tr>
                                            <tr>
                                                <td class="fw-bold">KHR :</td>
                                                {{--                                                    <td class="fw-bold">{{number_format($sale->khr_amount , 2)}} {{$khr->currency_symbol}}</td>--}}
                                                <td class="fw-bold">{{number_format($sale->khr_amount , 2)}} ៛</td>
                                            </tr>
                                            <tr>
                                                <td class="fw-bold">THB :</td>
                                                {{--                                                    <td class="fw-bold">{{number_format($sale->thb_amount , 2)}} {{$thb->currency_symbol}}</td>--}}
                                                <td class="fw-bold">{{number_format($sale->thb_amount , 2)}} B</td>
                                            </tr>
                                            {{--                                                <tr>--}}
                                            {{--                                                    <td class="fw-bold">Return :</td>--}}
                                            {{--                                                    <td class="fw-bold">{{number_format($balance , 2)}} {{$currency_->currency_symbol}}</td>--}}
                                            {{--                                                </tr>--}}
                                            </tbody>
                                        </table>
                                        <div class="sale-name text-center mt-2" >
                                            <span style="font-family: 'Khmer OS Siemreap';font-weight: bold">អ្នកលក់</span>
                                        </div>
                                    </div>
                                </div>
                                <!-- <button class="btn" onclick="print()">Print</button> -->

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsbarcode/3.11.3/JsBarcode.all.min.js"></script>
<script>
    JsBarcode("#barcode", "{{$sale->invoice_no}}", {
        width:0.92,
        height:40,
        fontSize:15,
    });
</script>
<script>
    {{--function prints(){--}}
    {{--    window.print();--}}
    {{--    --}}{{--setTimeout(function closePrintView(){--}}
    {{--    --}}{{--    window.location.href = "{{route('pointToSale.index')}}";--}}
    {{--    --}}{{--}, 100);--}}
    {{--}--}}
        window.print();

        setTimeout(function closePrintView(){
            window.close();
            {{--window.location.href = "{{route('pointToSale.index')}}";--}}
        }, 1000);
        setTimeout(function (){
            // localStorage.setItem('diamondLocal' , '');
            localStorage.clear();
        }, 1000);

</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>
</body>
</html>
{{--    <div class="row">--}}
{{--        <div class="col-lg-12 margin-tb">--}}
{{--            <div class="pull-left">--}}
{{--                <h2> Show Product</h2>--}}
{{--            </div>--}}
{{--            <div class="pull-right">--}}
{{--                <a class="btn btn-primary" href="{{ route('products.index') }}"> Back</a>--}}
{{--            </div>--}}
{{--        </div>--}}
{{--    </div>--}}


{{--    <div class="row">--}}
{{--        <div class="col-xs-12 col-sm-12 col-md-12">--}}
{{--            <div class="form-group">--}}
{{--                <strong>Name:</strong>--}}
{{--                {{ $product->name }}--}}
{{--            </div>--}}
{{--        </div>--}}
{{--        <div class="col-xs-12 col-sm-12 col-md-12">--}}
{{--            <div class="form-group">--}}
{{--                <strong>Details:</strong>--}}
{{--                {{ $product->detail }}--}}
{{--            </div>--}}
{{--        </div>--}}
{{--    </div>--}}


{{--@endsection--}}

© KUJUNTI.ID