Path : /var/www/html/jewelry-pos/resources/views/buy-backs/ |
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/buy-backs/show.blade.php |
{{--@extends('layouts.admin-main')--}} {{--@section('content')--}} <!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">--}} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css"> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet"> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.min.js"></script> <link href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> <title>{{__('message.invoice')}} - {{$settings_->shop_name}}</title> <style> @media print { .noPrint{ display:none; } } .middle-table p{ margin-bottom: 0.5rem !important; font-size: 12px !important; } span{ font-family: "Khmer OS Siemreap" !important; } </style> </head> <body class="" style="background-color: #eee;overflow: hidden"> <div class="row"> <div class="mt-2 noPrint" style="padding-left: 50px;width: 40%"> <a class="btn btn-sm btn-primary shadow-lg" href="{{ route('reports.buy_back')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}" style="color: whitesmoke !important;"> <i class="fa-solid fa-backspace"></i> {{__('message.back')}} </a> </div> <div class="mt-2 noPrint text-center" style="width: 20%;"> @if($sale->already_buy_back == 0) <button class="btn btn-sm btn-success shadow-lg" data-bs-toggle="modal" data-bs-target="#exampleModal"> {{__('message.buy back')}} <i class="fa-solid fa-store"></i> </button> @endif <!-- Modal --> <div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <form action="{{route('sale.buy_back' , $sale->id)}}" method="GET"> <div class="modal-header"> <h5 class="modal-title" id="exampleModalLabel">{{__('message.repurchase form')}}</h5> <button type="button" class="btn-close bg-danger" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="row m-2"> <input type="text" placeholder="{{__('message.price')}}" value="" required oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*?)\..*/g, '$1').replace(/^0[^.]/, '0')" name="buy_back_price" class="form-control"> </div> <div class="row m-2"> <textarea placeholder="{{__('message.note')}}" name="note" class="form-control" rows="3" style="resize: none !important;"></textarea> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">{{__('message.close')}}</button> <button type="submit" class="btn btn-sm btn-primary" onclick="return confirm('{{__('message.are you sure? you want to buy back')}}')">{{__('message.save')}}</button> </div> </form> </div> </div> </div> </div> <div class="mt-2 text-end" style="padding-right: 30px;width: 40%;"> <a onclick="prints();" class="menu-item btn btn-sm btn-primary noPrint shadow-lg" data-action="app-print" data-toggle="tooltip" data-placement="left" title="Print page" href="" style="color: whitesmoke !important;"> <!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--> {{__('message.print')}} <i class="fa-solid fa-print"></i> </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;margin: 10px;"> <h2 class="text-center fs-6" style="margin-bottom: 3px;font-size: 19px !important;">ហាងមាសពេជ្រ ក្រោន</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';margin-bottom: 0;font-size: 13px !important;">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="margin-left: 20px;padding: 0;margin-top: -8px"> <p class="address fs-7" style="font-size: 12px !important;">{{$settings_->address}}</p> <p class="phone-number fs-7" style="font-size: 12px;margin-bottom: 10px">លេខទូរស័ព្ទៈ <b>{{$settings_->phone}}</b></p> </div> <div class="col" style="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 style="font-size: 11px !important;"> Customer ID : {{$sale->member->id??0}} <br> Customer Name : {{$sale->member->name??'................'}} <br> Phone : {{$sale->member->phone??'................'}} </p> </div> <div class="col table-info" style="text-align: end;margin-right: 20px"> <p style="font-size: 11px !important;"> Invoice N<label style="font-size: small;font-size: 10px !important;">0</label> : {{$sale->invoice_no}} <br> Invoice Date : {{date('d-m-Y H:i', strtotime($sale->created_at))}} <br> Cashier : <b>{{$cashie->name??''}}</b> </p> </div> </div> <div class="invoices" style="margin-right: 20px;"> <h4 class="text-center fw-bold fs-6" style="margin-bottom: 4px;font-size: 13px !important;">វិក្កយបត្រ INVOICE</h4> <table class="table table-bordered item-table " border="2"> <thead> <tr> <th scope="col" class="text-center" style="font-family: 'Khmer OS Siemreap';padding: 3px 4px !important;font-size: 11px !important;">កូដទំនិញ <br> Item Code </th> <!-- <th rowspan="2"></th> --> <th class="text-center" colspan="3" style="font-family: 'Khmer OS Siemreap';padding: 2px 4px !important;font-size: 11px !important;">ឈ្មោះទំនិញ <br> Description </th> <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 4px !important;font-size: 11px !important;">ចំនួន <br> Qty </th> <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 4px !important;font-size: 11px !important;">តម្លៃ <br> Price </th> <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 4px !important;font-size: 11px !important;">បញ្ចុះតម្លៃ <br> Discount </th> <th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 4px !important;font-size: 11px !important;">តម្លៃសរុប <br> Amount </th> </tr> </thead> <tr> <td colspan="8"> <div class="row p-2" style="padding: 0 !important;margin: 0 !important;margin-top: 5px !important;"> <div class="col mb-1" style="margin-top: -5px;"> <div class="row main-item border-bottom" style="border: 1px; border-bottom-style: dotted;font-size: 12px"> <?php // $products = \App\Models\Product::where('part_number' , $sale->part_number)->firstOrfail(); ?> <div class="col-2" id="part_number" style="padding: 0">{{$sale->part_number}}</div> <div class="col-3 text-center" style="padding: 0;display: flex;justify-content: center;align-items: center"> <p style="position: absolute;font-family: 'Khmer OS Siemreap';font-size: 13px;margin-left: 0;margin-bottom: 0">{{$sale->name}} {{$sale->productCategory->name??''}}</p> </div> <div class="col-1 text-end" style="padding: 0;">{{$sale->qty}}</div> {{-- <div class="col text-center" style="padding: 0">{{number_format($sale->product->price , 2)}} {{$currency_->currency_symbol}}</div>--}} <div class="col-2 text-end" style="padding: 0">{{number_format(($sale->sales_price + $sale->discount) / $sale->qty , 2)}} {{$currency_->currency_symbol}}</div> <div class="col-2 text-end" style="padding: 0">{{number_format($sale->discount??0 , 2)}} {{$currency_->currency_symbol}}</div> <?php // $amount = ($sale->product->price * $sale->qty) - $sale->discount // $amount = $sale->sales_price - $sale->discount $amount = $sale->sales_price + $sale->discount; ?> <div class="col-2 text-end fw-bold" style="padding: 0">{{number_format($amount??0 , 2)}} {{$currency_->currency_symbol}}</div> </div> </div> </div> <div class="col "> <div class="row middle-table"> <div class="col" style="margin-top: 10px !important;"> <img src="{{ !empty($sale->image) ? asset($sale->image) : '' }}" alt="" width="25%" 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';font-size: 13px !important;">បរិយាយ</span> </div> <div class="col"> <span class="desc-text" style="font-family: 'Khmer OS Siemreap';font-size: 13px !important;">ចំនួន / ទម្ងន់</span> </div> {{-- <div class="border-bottom border-success border-opacity-25"></div>--}} </div> <div class="row g-0 pb-1 border-bottom" style="margin-top: 0px; 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 border-bottom" style="margin-top: 0px; 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> @if($sale->diamond_size) <div class="row g-0 mt-1" id="html_diamond_size" style="font-size: 11px;"> <div class="col"> <div class="row border-bottom text-left" style="width: 100% !important;margin-left: 0;"> <div class="col p-0"> <span class="desc-child-text desc-text">ប្រភេទពេជ្រ</span> </div> <div class="col p-0"> <span class="desc-child-text desc-text">ទំហំពេជ្រ</span> </div> </div> <div class="row text-left" style="width: 100% !important;margin-left: 0"> <span id="diamondSize" style="padding: 0"> </span> </div> </div> </div> @endif <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; } var str = diamond_size; // alert(str) str = str.replaceAll(/(?:\r\n|\r|\n)/g, '</p>').replaceAll('<br/>','</p>').replaceAll('<br>','</p>').replaceAll(' ','').replaceAll(' ','</p>') // str=str.replace(' ',''); var row = str.split('</p>') ; var column=''; for(var i=0; i<row.length; i++){ if(row[i]){ row[i]= row[i].replace('<p>','') column = row[i].split(':'); if(!column[1]){ column[1] = ''; } console.log(column) $('#diamondSize').append('<div class="row g-0 pb-1 border-bottom" style="margin-top: 3px; border: 1px; border-bottom-style: dotted;font-size: 11px"> <div class="col"> <span class="desc-child-text desc-text" style="font-family: \'Khmer OS Siemreap\'">'+column[0]+'</span> </div> <div class="col"> <span class="desc-child-text m-2">'+column[1]+'</span> </div> </div>'); } // data += "Index : "+i+" value : "+row[i]+"<br/>"; // $('#str').html(row[i]); // $('#number').html(row[i]); // $('#str').html(row[0]); // $('#number').html(row[1]); // console.log(row[i]); } $('p').filter(function(){ return this.innerHTML == ' '; }).remove(); // $('#html_diamond_size').html(diamond_size); }); </script> @foreach($sale->SellProductAttributes as $index => $SellProductAttribute) <div class="row border-bottom text-left" style="width: 100% !important;margin-left: 0;"> <div class="col p-0"> <span class="desc-child-text desc-text">ទំហំត្បូង</span> </div> <div class="col p-0"> <span class="desc-child-text desc-text">បរិមាណត្បូង</span> </div> </div> <?php $arr_name = preg_split('/\r\n|\r|\n/', $SellProductAttribute->name); $arr_qty = preg_split('/\r\n|\r|\n/', $SellProductAttribute->qty); ?> @foreach($arr_name as $i => $name) @if(isset($arr_qty[$i]) && $name) <div class="row g-0 pb-1 border-bottom" id="border" style="margin-top: 0px; border: 1px; border-bottom-style: dotted;"> <div class="col"> <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">{!! $name!!}</span> </div> <div class="col"> <span class="desc-child-text m-2">{{$arr_qty[$i]}}</span> </div> </div> @endif @endforeach <div class="col" style="display: flex;justify-content: end;align-items: center"> <span class="text-center" style="width: 100%">តម្លៃត្បូងសរុប = {{$SellProductAttribute->price}} {{$currency_->currency_symbol}}</span> </div> @endforeach @if($sale->description) <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> {{-- <span class="desc-child-text">Description</span>--}} </div> <div class="col" style="line-height: 10px"> <span>{!!$sale->description!!}</span> </div> </div> @endif </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" style="padding-right: 0"> <ol style="font-size: 9px;margin: 0;padding: 0;margin-left: 12px"> <h7> <b style="font-size: 10px">* លក្ខណ៍ក្នុងការលក់ និង ដូរម៉ូត</b> </h7> <li>គ្រឿងអលង្ការមាសលក់វិញខាតឈ្នួល</li> <li>គ្រឿងអលង្ការផ្លាក់ទីនលក់វិញខាត 0.5 ទឹកនិងឈ្នួល</li> <li>គ្រឿងដាំពេជ្រលក់វិញខាត ៥% និងឈ្នួល ប្ដូរម៉ូតខាត ៣% និងឈ្នួល</li> <li>ផ្លាកទីនអ៊ីតាលី 18k លក់វិញទឹក 7.5 បើបែកបាក់លក់វិញទឹក5</li> <li>ទំហំពេជ្រធំជាង 5 លីឡើង លក់វិញខាត 10%និងឈ្នួល ប្ដូរម៉ូតខាត 5% និងឈ្នួល</li> <li>ស្នាយ ពែក្ស គុជ និង ត្បូងផ្សេងៗ អត់ទិញចូលវិញ</li> </ol> <ol style="font-size: 9px;margin:0;padding:0;margin-left: 12px"> <h7> <b style="font-size: 10px">* លក្ខណ៍ក្នុងការលក់ និង ដូរម៉ូតរយះពេល ១ ទៅ ៧ ថ្ងៃ</b> </h7> <li>គ្រឿងអលង្ការដែលមានទំហំត្បូងពេជ្រ៥លីចុះក្រោម លក់វិញខាត៣%និងឈ្នួល ប្ដូរម៉ូតខាត១%និងឈ្នួល</li> <li>គ្រឿងអលង្ការដែលមានទំហំត្បូងពេជ្រ៥លីឡើង លក់វិញខាត៥%និងឈ្នួល ប្ដូរម៉ូតខាត៣%និងឈ្នួល</li> </ol> <p class="text-center" style="margin-top: -2px !important;">Thank you!!</p> </div> <div class="col sub-footer col-sm-5" style="text-align: end;"> <?php // $grandTotal = $sale->sales_price - $sale->discount??0; $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(); ?> <table class="" style="width: 100%;font-size: 10px"> <tbody> <tr> <td class="fw-bold"><span style="font-size: 12px !important;">Grand Total :</span></td> <td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($grandTotal , 2)}} {{$currency_->currency_symbol}}</span></td> </tr> <tr> <td class="fw-bold"><span style="font-size: 12px !important;">Discount :</span></td> <td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($sale->discount , 2)}} {{$currency_->currency_symbol}}</span></td> </tr> <tr> <td class="fw-bold"><span style="font-size: 12px !important;">USD :</span></td> <td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($sale->usd_amount , 2)}} {{$currency_->currency_symbol}}</span></td> </tr> <tr> <td class="fw-bold"><span style="font-size: 12px !important;">KHR :</span></td> <td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($sale->khr_amount , 2)}} ៛</span></td> </tr> <tr> <td class="fw-bold"><span style="font-size: 12px !important;">THB :</span></td> <td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($sale->thb_amount , 2)}} B</span></td> </tr> </tbody> </table> <div class="sale-name text-center mt-2" > <span style="font-family: 'Khmer OS Siemreap';font-weight: bold;font-size: 13px !important;">អ្នកលក់</span> </div> </div> </div> </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> let GetLocalPay = localStorage.getItem('pay'); if(GetLocalPay){ window.print(); setTimeout(function closePrintView(){ window.location.href = "{{route('reports.buy_back')}}"; window.close(); }, 1000); localStorage.clear(); } function prints(){ window.print(); } </script> <script src= "https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"> </script> {{--<script type="text/javascript">--}} {{-- var x = document.getElementById('part_number').innerHTML;--}} {{-- // var qrdata= document.getElementById('qr-data');--}} {{-- var qrcode = new QRCode(document.getElementById('qrcode') , {--}} {{-- width: 80,--}} {{-- height: 80,--}} {{-- colorDark : "#000000",--}} {{-- colorLight : "#ffffff",--}} {{-- correctLevel : QRCode.CorrectLevel.H--}} {{-- });--}} {{-- qrcode.makeCode(x); // make another code.--}} {{--</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> <style> .description p{ line-height:7px; } </style> </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--}}