| Path : /var/www/html/jewelry-pos/resources/views/sales/ |
|
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/sales/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;
font-size: 12px !important;
}
.description p{
line-height:7px;
}
.bottom-bar {
height: 70px !important;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
z-index: 1030;
}
</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('sales.index')}}?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" id="txt" style="font-size: 12px !important;"></p>
<p class="phone-number fs-7" style="font-size: 12px;margin-bottom: 10px">លេខទូរស័ព្ទៈ <b>{{$settings_->phone}}</b></p>
</div>
<script>
var txt = '{{ $settings_->address }}';
var val = txt.replace(',' , '<br>');
document.getElementById('txt').innerHTML = val;
</script>
<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;">បង្កាន់ដៃទទួលប្រាក់ / RECEIPT</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 0 !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 10px !important;font-size: 11px !important;">ឈ្មោះទំនិញ
<br>
Description
</th>
<th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 0 0 !important;font-size: 11px !important;">ចំនួន
<br>
Qty
</th>
<th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 5px !important;font-size: 11px !important;">តម្លៃ
<br>
Price
</th>
<th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 0 !important;font-size: 11px !important;">បញ្ចុះតម្លៃ
<br>
Discount
</th>
<th class="text-center" scope="col" style="font-family: 'Khmer OS Siemreap';padding: 2px 2px !important;font-size: 11px !important;">តម្លៃសរុប
<br>
Amount
</th>
</tr>
</thead>
<tbody>
<tr>
<td colspan="8">
<div class="row" style="padding: 0 !important;margin: 0 !important;margin-top: 5px !important;">
<div class="col" style="margin-top: -5px;">
<div class="row main-item border-bottom" style="border: 1px; border-bottom-style: dotted;font-size: 12px;display: flex;justify-content: center;align-items: center">
<div class="col-2 p-0" id="part_number" style="line-height: 20px;">{{$sale->part_number}}</div>
<div class="col-3 text-center p-0">
<span class="p-0" style="font-family: 'Khmer OS Siemreap';font-size: 13px;">{{$sale->name}} @if($sale->productCategory->name == $sale->name??'' || $productCategory->name == $sale->name??'')@else {{$productCategory->name??''}}@endif </span>
</div>
{{-- <div class="col text-end">{{$qty??$product->qty}}</div>--}}
<div class="col-1 text-end p-0">{{$sale->qty}}</div>
<div class="col-2 text-center p-0">{{number_format(($sale->sales_price + $sale->discount) / $sale->qty , 2)}} {{$currency_->currency_symbol}}</div>
{{-- <div class="col text-center fw-bold"><span class="usdAmountLocal"></span>{{$currency_->currency_symbol}}</div>--}}
<div class="col-2 text-center p-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'">ទម្ងន់/Weight (L)</span>
</div>
<div class="col">
<span class="desc-child-text m-2">
{{number_format($sale->weight , 2)}}
@if($sale->weight_description)
({{$sale->weight_description}})
@endif
</span>
</div>
</div>
@if($sale->not_use_rate == false)
<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'">អត្រា/Rate</span>
</div>
<div class="col">
<span class="desc-child-text m-2">
{{number_format($sale->selling_rate , 4)}} {{$currency_->currency_symbol}}
</span>
</div>
</div>
@endif
<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'">ឈ្នួល/Fee</span>
</div>
<div class="col">
<span class="desc-child-text m-2">
{{-- {{number_format($sale->wages_in_weight , 2)}} {{$currency_->currency_symbol}}</span>--}}
@if($sale->productCategory->fixed_price)
{{number_format($sale->wages??0 , 2)}} {{$currency_->currency_symbol}}
@else
@if($sale->fixed_price)
{{number_format($sale->wages??0 , 2)}} {{$currency_->currency_symbol}}
@else
{{number_format($sale->wages_in_weight??0 , 2)}}
@endif
@endif
</div>
</div>
{{-- <div class="row g-0 mt-2" 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>--}}
{{-- <span class="desc-child-text desc-text" style="font-family: 'Khmer OS Siemreap'">Diamond Size</span>--}}
{{-- </div>--}}
{{-- <div class="col" style="line-height: 10px">--}}
{{-- <span>{!!$sale->diamond_size!!}</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">
{{-- <div class="col" id="txtstr">--}}
{{-- <span id="str"></span>--}}
{{-- </div>--}}
{{-- <div class="col">--}}
{{-- <span id="number"></span>--}}
{{-- </div>--}}
<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;
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 border-bottom" style="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>
{{-- <div class="row g-0 pb-1" style="margin-top: 0px; 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>--}}
@if(count($sale->SellProductAttributes) != 0)
<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
$price = 0;
?>
@foreach($sale->SellProductAttributes as $index => $SellProductAttribute)
<?php
$arr_name = preg_split('/\r\n|\r|\n/', $SellProductAttribute->name);
$arr_qty = preg_split('/\r\n|\r|\n/', $SellProductAttribute->qty);
$price = $price + $SellProductAttribute->price;
?>
@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
@endforeach
<div class="col" style="display: flex;justify-content: end;align-items: center">
<span class="text-center" style="width: 100%">តម្លៃត្បូងសរុប = {{number_format($price , 2)}} {{$currency_->currency_symbol}}</span>
</div>
@endif
@if($sale->description && $sale->description != '<p>0</p>')
<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'">បរិយាយ/Description</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: 8px;margin: 0;padding: 0;margin-left: 8px">
<h7>
<b style="font-size: 9px">* លក្ខខណ្ឌក្នុងការលក់ និង ដូរម៉ូត</b>
</h7>
<li>គ្រឿងមាសលក់វិញតាមហាងឆេងជាក់ស្តែងទឹក១០និងខាតឈ្នួល</li>
<li>គ្រឿងផ្លាកទីនលក់វិញតាមហាងឆេងជាក់ស្តែងតាមទឹក និងខាតឈ្នួល</li>
<li>ផ្លាកទីនអ៊ីតាលីលក់វិញតាមហាងឆេងជាក់ស្តែងទឹក៧</li>
<li>គ្រឿងដាំពេជ្រលក់វិញខាត៥%និងឈ្នួល បើប្តូរម៉ូតខាត៣%និងឈ្នួល<br>(ទំហំពេជ្រក្រោម៥លី)</li>
<li>គ្រឿងដាំពេជ្រលក់វិញខាត១០%និងឈ្នួល បើប្តូរម៉ូតខាត៥%និងឈ្នួល<br>(ទំហំពេជ្រលើ៥លី)</li>
<li>ស្នាយ ពែក្ស គុជ និង ត្បូងផ្សេងៗ អត់ទិញចូលវិញ</li>
<li>សម្រាប់គ្រឿងខូចទ្រង់ទ្រាយដើមទិញចូលតាមភាពជាក់ស្តែង</li>
</ol>
<ol style="font-size: 8px;margin:4px 0;padding:0;margin-left: 8px">
<h7>
<b style="font-size: 9px">* លក្ខខណ្ឌក្នុងការលក់និងដូរម៉ូតរយៈពេលក្រោម១អាទិត្យ</b>
</h7>
<li>គ្រឿងដាំពេជ្រលក់វិញខាត៣%និងឈ្នួល បើប្តូរម៉ូតខាត១%និងឈ្នួល<br>(ទំហំពេជ្រក្រោម៥លី)</li>
<li>គ្រឿងដាំពេជ្រលក់វិញខាត៥%និងឈ្នួល បើប្តូរម៉ូតខាត៣%និងឈ្នួល<br>(ទំហំពេជ្រលើ៥លី)។</li>
<h7>
<b style="font-size: 9px">* យើងសុំរក្សាសិទ្ធិក្នុងការកែប្រែទៅតាមទីផ្សារជាក់ស្តែង</b>
</h7>
</ol>
<p class="text-end col-12">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;">Amount :</span></td>
<td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($amount , 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;">Grand Total :</span></td>
<td class="fw-bold"><span style="font-size: 12px !important;">{{number_format($amount - $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>
<nav class="bottom-bar navbar navbar-expand justify-content-around noPrint" style="padding: 0 0 !important;">
<a class="col-4 d-flex justify-content-center align-items-center btn btn-primary rounded-0" href="{{ route('sales.index')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}"
style="color: whitesmoke !important;height: 100%;">
<i class="fa-solid fa-backspace"></i>
<span style="margin-left: 10px;font-size: 18px !important;">{{__('message.back')}}</span>
</a>
@if($sale->already_buy_back == 0)
<button class="col-4 text-center btn btn-primary rounded-0" data-bs-toggle="modal" data-bs-target="#exampleModal" style="height: 100%">
<i class="fa-solid fa-store"></i>
{{__('message.buy back')}}
</button>
@endif
<a onclick="prints();" class="col-4 menu-item d-flex justify-content-center align-items-center btn btn-primary rounded-0" data-action="app-print" data-toggle="tooltip" data-placement="left"
title="Print page" href=""
style="color: whitesmoke !important;height: 100%;">
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<span style="margin-right: 10px;font-size: 18px !important;">{{__('message.print')}}</span>
<i class="fa-solid fa-print"></i>
</a>
</nav>
<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.90,
height:40,
fontSize:15,
});
</script>
<script>
let GetLocalPay = localStorage.getItem('pay');
if(GetLocalPay){
window.print();
setTimeout(function closePrintView(){
window.location.href = "{{route('pointToSale.index')}}";
window.close();
}, 1000);
localStorage.clear();
}
function prints(){
window.print();
{{--setTimeout(function closePrintView(){--}}
{{-- window.location.href = "{{route('sales.index')}}?start_date={{$start_date}}&end_date={{$end_date}}&paginate={{$paginate??0}}";--}}
{{--}, 100);--}}
}
</script>
<script src=
"https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js">
</script>
</body>
</html>