| Path : /proc/self/root/var/www/html/jewelry-pos/resources/views/reports/ |
|
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
| Current File : //proc/self/root/var/www/html/jewelry-pos/resources/views/reports/deleted-report-print.blade.php |
@php use App\Models\ProductCategory; @endphp
@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.deleted report')}}</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-hover table-striped w-100" style="font-size: 14px !important;">
<tbody class="text-center" style="font-weight: bold">
<tr class=" table-bordered">
<td>N0.</td>
<td class="text-center">{{ __('message.part number') }}</td>
<td>{{ __('message.product name') }}</td>
<td>{{ __('message.qty') }}</td>
<td>{{ __('message.cost of sale') }}</td>
<td>{{ __('message.selling cost') }}</td>
<td>{{ __('message.original wages') }}</td>
<td>{{ __('message.sale wages') }}</td>
<td>{{ __('message.selling rate') }}</td>
<td>{{ __('message.sales price') }}</td>
<td>{{ __('message.discount') }}</td>
<td>{{ __('message.net sale') }}</td>
<td>{{ __('message.sale product') }}</td>
<td>{{ __('message.weight') }}</td>
<td>{{ __('message.purity upgrade to') }}</td>
<td>{{ __('message.selling purity') }}</td>
<td>{{ __('message.diamond size') }}</td>
<td>{{__('message.original invoice')}}</td>
<td>{{ __('message.supplier rate') }}</td>
<td>{{ __('message.image') }}</td>
<td>{{ __('message.user') }}</td>
<td>{{ __('message.created date') }}</td>
</tr>
</tbody>
<input type="hidden" value="{{$search}}">
<input type="hidden" value="{{$product_category_id}}">
<input type="hidden" value="{{$platinume_Category->id}}">
<input type="hidden" value="{{$check_fixed_price}}">
@foreach($productCategories as $i => $productCategorys)
<?php
if($search){
$sales = $productCategorys->sales()->withTrashed()->where('part_number', $search);
}else{
$sales = $productCategorys->sales()->withTrashed()->whereBetween('deleted_at', [$start_date . " 00:00:00", $end_date . " 23:59:59"]);
}
if($product_category_id){
if($product_category_id == $platinume_Category->id){
$sales = $sales->whereIn('product_category_id' , $platinume_Category->IdvsAllSubCategories());
}else{
$sales = $sales->where('product_category_id' , $product_category_id);
}
}
if($check_fixed_price == 1){
$sales = $sales->where('fixed_price' , true);
}elseif($check_fixed_price == 2){
$sales = $sales->where('fixed_price' , false);
}
?>
@if($sales->count('id') > 0)
<tbody>
<tr class=" table-bordered">
<th colspan="18" class="p-3 bg-gray-300" style="color: black !important;">{{$productCategorys->name}}</th>
</tr>
@foreach($sales->get() as $index => $sale)
<tr class="text-center table-bordered">
<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 class="credit">
{{number_format($sale->original_wages , 2)}} {{$currency_->currency_symbol}}
</td>
<td class="credit">
{{number_format($sale->wages , 2)}} {{$currency_->currency_symbol}}
</td>
<td class="credit">
@if($sale->selling_rate)
{{ number_format($sale->selling_rate, 4) }} {{$currency_->currency_symbol}}
@endif
</td>
<td class="credit">
{{ number_format($sale->sales_price+$sale->discount , 2) }} {{$currency_->currency_symbol}}
</td>
<td class="credit">
{{number_format($sale->discount , 2)}} {{$currency_->currency_symbol}}
</td>
<td class="credit">
{{number_format($sale->sales_price , 2)}} {{$currency_->currency_symbol}}
</td>
<td class="credit">
{{number_format(($sale->sales_price+$sale->discount)-$sale->wages , 2)}} {{$currency_->currency_symbol}}
</td>
<td>
{{ number_format($sale->product->weight??0 , 2) }}
</td>
<td>
@if($sale->purity_upgrade_to)
{{$sale->purity_upgrade_to??''}}
@endif
</td>
<td>
@if($sale->selling_purity)
{{$sale->selling_purity??''}}
@endif
</td>
<td>
{!! $sale->diamond_size !!}
</td>
<td>{{$sale->original_invoice??''}}</td>
<td>
{{$sale->supplier_rate}}
</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>
<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
<tr class=" table-bordered">
<td class="credit text-center" colspan="3">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{__('message.total')}} ( {{$productCategorys->name}} ) :
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$sales->sum('qty')}}
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('cost') , 2)}}
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center credit" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('selling_cost') , 2)}}
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center credit" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('original_wages') , 2)}}
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center credit" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('wages') , 2)}}
</div>
</td>
<td></td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center credit" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('sales_price') + $sales->sum('discount') , 2)}}
</div>
</td>
<td class="credit text-center">
<div class="d-flex justify-content-center align-items-center credit" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($sales->sum('discount') , 2)}}
</div>
</td>
<td class="credit">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0; ">
{{$currency_->currency_symbol}} {{number_format($sales->sum('sales_price') , 2)}}
</div>
</td>
<td class="credit">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0; ">
{{$currency_->currency_symbol}} {{number_format(($sales->sum('sales_price')+$sales->sum('discount'))-$sales->sum('wages'), 2)}}
</div>
</td>
</tr>
<tr>
<td colspan="18">
<div style="margin: 5rem !important;">
</div>
</td>
</tr>
</tbody>
@endif
@endforeach
<tr class="table-bordered">
<td colspan="6" rowspan="3">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
</div>
</td>
<td colspan="6" rowspan="2"></td>
<td class="credit text-center" colspan="2">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{__('message.sub total')}} :
</div>
</td>
<td colspan="3" class="credit text-center">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($total_sale_price + $total_sale_discount , 2)}}
</div>
</td>
</tr>
<tr class="table-bordered">
<td class="credit text-end" colspan="2">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{__('message.total discount')}} :
</div>
</td>
<td colspan="3" class="credit text-center">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($total_sale_discount , 2)}}
</div>
</td>
</tr>
<tr class="table-bordered">
<td class="credit text-end" colspan="2" rowspan="2">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{__('message.total profit')}} :
</div>
</td>
<td class="credit text-center" colspan="4" rowspan="2">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{ number_format($total_sale_profit, 2) }}
</div>
</td>
<td class="credit text-end" colspan="2">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{ __('message.total net sale') }}
</div>
</td>
<td colspan="4" class="credit text-center">
<div class="d-flex justify-content-center align-items-center" style="margin: 1rem 0;">
{{$currency_->currency_symbol}} {{number_format($total_sale_price , 2)}}
</div>
</td>
</tr>
</table>
<div class="row mt-10-rem" style="margin-top: 5rem !important;">
<div class="col-1">
</div>
<div class="col-3 mt-10-rem" style="margin-top: 5rem !important;">
<h1 class="border-bottom"></h1>
<span style="font-weight:bold;color: black">{{__('message.prepare by')}} : </span>
</div>
<div class="col-4">
</div>
<div class="col-3 mt-10-rem" style="margin-top: 5rem !important;">
<h1 class="border-bottom"></h1>
<span style="font-weight:bold;color: black">{{__('message.confirm by')}} : </span>
</div>
<div class="col-1">
</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('deleted-report.index')}}" 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('deleted-report.index')}}?start_date={{$start_date}}&end_date={{$end_date}}&search={{$search}}";
}
</script>
<script>
$(document).ready(function() {
$(".ranges > ul > li").click(function() {
setTimeout(function() {
$('#search-form').submit();
}, 100);
});
$("#datepicker").on("change.dp" , function (){
$("#search-form").submit();
});
});
var runDatePicker = function() {
// enable clear button
$('#datepicker').datepicker({
todayBtn: "linked",
clearBtn: true,
todayHighlight: true,
templates: controls
});
}
</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_deleted_report").addClass('active')
})
</script>
@endsection
@section('meta')
<title>{{ __('message.deleted report') }} - {{$settings_->shop_name}}</title>
@endsection