codigo actual del servidor, con avances de joan

This commit is contained in:
Jose Sanchez
2023-08-07 15:52:04 -04:00
commit 3cd9b8bbe8
3070 changed files with 532255 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Commission History report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-10 mx-auto">
<div class="card">
@include('backend.reports.partials.commission_history_section')
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,58 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Inhouse Product sale report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<div class="card-body">
<form action="{{ route('in_house_sale_report.index') }}" method="GET">
<div class="form-group row">
<label class="col-md-3 col-form-label">{{translate('Sort by Category')}} :</label>
<div class="col-md-5">
<select id="demo-ease" class="aiz-selectpicker" name="category_id" required>
<option value="">{{ translate('Choose Category') }}</option>
@foreach (\App\Models\Category::all() as $key => $category)
<option value="{{ $category->id }}" @if($category->id == $sort_by) selected @endif >{{ $category->getTranslation('name') }}</option>
@endforeach
</select>
</div>
<div class="col-md-2">
<button class="btn btn-primary" type="submit">{{ translate('Filter') }}</button>
</div>
</div>
</form>
<table class="table table-bordered aiz-table mb-0">
<thead>
<tr>
<th>#</th>
<th>{{ translate('Product Name') }}</th>
<th>{{ translate('Num of Sale') }}</th>
</tr>
</thead>
<tbody>
@foreach ($products as $key => $product)
<tr>
<td>{{ ($key+1) + ($products->currentPage() - 1)*$products->perPage() }}</td>
<td>{{ $product->getTranslation('name') }}</td>
<td>{{ $product->num_of_sale }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $products->appends(request()->input())->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,65 @@
<form action="{{ route('commission-log.index') }}" method="GET">
<div class="card-header row gutters-5">
<div class="col text-center text-md-left">
<h5 class="mb-md-0 h6">{{ translate('Commission History') }}</h5>
</div>
@if(Auth::user()->user_type != 'seller')
<div class="col-md-3 ml-auto">
<select id="demo-ease" class="form-control form-control-sm aiz-selectpicker mb-2 mb-md-0" name="seller_id">
<option value="">{{ translate('Choose Seller') }}</option>
@foreach (App\Models\User::where('user_type', '=', 'seller')->get() as $key => $seller)
<option value="{{ $seller->id }}" @if($seller->id == $seller_id) selected @endif >
{{ $seller->name }}
</option>
@endforeach
</select>
</div>
@endif
<div class="col-md-3">
<div class="form-group mb-0">
<input type="text" class="form-control form-control-sm aiz-date-range" id="search" name="date_range"@isset($date_range) value="{{ $date_range }}" @endisset placeholder="{{ translate('Daterange') }}">
</div>
</div>
<div class="col-md-2">
<button class="btn btn-md btn-primary" type="submit">
{{ translate('Filter') }}
</button>
</div>
</div>
</form>
<div class="card-body">
<table class="table aiz-table mb-0">
<thead>
<tr>
<th>#</th>
<th data-breakpoints="lg">{{ translate('Order Code') }}</th>
<th>{{ translate('Admin Commission') }}</th>
<th>{{ translate('Seller Earning') }}</th>
<th data-breakpoints="lg">{{ translate('Created At') }}</th>
</tr>
</thead>
<tbody>
@foreach ($commission_history as $key => $history)
<tr>
<td>{{ ($key+1) }}</td>
<td>
@if(isset($history->order))
{{ $history->order->code }}
@else
<span class="badge badge-inline badge-danger">
{{ translate('Order Deleted') }}
</span>
@endif
</td>
<td>{{ $history->admin_commission }}</td>
<td>{{ $history->seller_earning }}</td>
<td>{{ $history->created_at }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $commission_history->appends(request()->input())->links() }}
</div>
</div>

View File

@@ -0,0 +1,74 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Seller Based Selling Report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<div class="card-body">
<form action="{{ route('seller_sale_report.index') }}" method="GET">
<div class="form-group row offset-lg-2">
<label class="col-md-3 col-form-label">{{translate('Sort by verificarion status')}} :</label>
<div class="col-md-5">
<select class="from-control aiz-selectpicker" name="verification_status" required>
<option value="">{{ translate('Choose Status') }}</option>
<option value="1" @if($sort_by == '1') selected @endif>{{ translate('Approved') }}</option>
<option value="0" @if($sort_by == '0') selected @endif>{{ translate('Non Approved') }}</option>
</select>
</div>
<div class="col-md-2">
<button class="btn btn-primary" type="submit">{{ translate('Filter') }}</button>
</div>
</div>
</form>
<table class="table table-bordered aiz-table mb-0">
<thead>
<tr>
<th>{{ translate('Seller Name') }}</th>
<th data-breakpoints="lg">{{ translate('Shop Name') }}</th>
<th data-breakpoints="lg">{{ translate('Number of Product Sale') }}</th>
<th>{{ translate('Order Amount') }}</th>
</tr>
</thead>
<tbody>
@foreach ($sellers as $key => $seller)
@if($seller != null)
<tr>
<td>{{ $seller->user->name }}</td>
@if($seller->shop != null)
<td>{{ $seller->name }}</td>
@else
<td>--</td>
@endif
<td>
@php
$num_of_sale = 0;
foreach ($seller->user->products as $key => $product) {
$num_of_sale += $product->num_of_sale;
}
@endphp
{{ $num_of_sale }}
</td>
<td>
{{ single_price(\App\Models\OrderDetail::where('seller_id', $seller->user->id)->sum('price')) }}
</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $sellers->appends(request()->input())->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,61 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Product wise stock report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<!--card body-->
<div class="card-body">
<form action="{{ route('stock_report.index') }}" method="GET">
<div class="form-group row offset-lg-2">
<label class="col-md-3 col-form-label">{{translate('Sort by Category')}} :</label>
<div class="col-md-5">
<select id="demo-ease" class="from-control aiz-selectpicker" name="category_id" required>
<option value="">{{ translate('Choose Category') }}</option>
@foreach (\App\Models\Category::all() as $key => $category)
<option value="{{ $category->id }}" @if($sort_by == $category->id) selected @endif>{{ $category->getTranslation('name') }}</option>
@endforeach
</select>
</div>
<div class="col-md-2">
<button class="btn btn-primary" type="submit">{{ translate('Filter') }}</button>
</div>
</div>
</form>
<table class="table table-bordered aiz-table mb-0">
<thead>
<tr>
<th>{{ translate('Product Name') }}</th>
<th>{{ translate('Stock') }}</th>
</tr>
</thead>
<tbody>
@foreach ($products as $key => $product)
@php
$qty = 0;
foreach ($product->stocks as $key => $stock) {
$qty += $stock->qty;
}
@endphp
<tr>
<td>{{ $product->getTranslation('name') }}</td>
<td>{{ $qty }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $products->appends(request()->input())->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
@extends('backend.layouts.app')
@section('content')
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<div class="card-header">
<h1 class="h6">{{translate('User Search Report')}}</h1>
</div>
<div class="card-body">
<table class="table table-bordered aiz-table mb-0">
<thead>
<tr>
<th>#</th>
<th>{{ translate('Search By') }}</th>
<th>{{ translate('Number searches') }}</th>
</tr>
</thead>
<tbody>
@foreach ($searches as $key => $searche)
<tr>
<td>{{ ($key+1) + ($searches->currentPage() - 1)*$searches->perPage() }}</td>
<td>{{ $searche->query }}</td>
<td>{{ $searche->count }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $searches->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,91 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Wallet Transaction Report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-10 mx-auto">
<div class="card">
<form action="{{ route('wallet-history.index') }}" method="GET">
<div class="card-header row gutters-5">
<div class="col text-center text-md-left">
<h5 class="mb-md-0 h6">{{ translate('Wallet Transaction') }}</h5>
</div>
@if(Auth::user()->user_type != 'seller')
<div class="col-md-3 ml-auto">
<select id="demo-ease" class="form-control form-control-sm aiz-selectpicker mb-2 mb-md-0" name="user_id">
<option value="">{{ translate('Choose User') }}</option>
@foreach ($users_with_wallet as $key => $user)
<option value="{{ $user->id }}" @if($user->id == $user_id) selected @endif >
{{ $user->name }}
</option>
@endforeach
</select>
</div>
@endif
<div class="col-md-3">
<div class="form-group mb-0">
<input type="text" class="form-control form-control-sm aiz-date-range" id="search" name="date_range"@isset($date_range) value="{{ $date_range }}" @endisset placeholder="{{ translate('Daterange') }}">
</div>
</div>
<div class="col-md-2">
<button class="btn btn-md btn-primary" type="submit">
{{ translate('Filter') }}
</button>
</div>
</div>
</form>
<div class="card-body">
<table class="table aiz-table mb-0">
<thead>
<tr>
<th>#</th>
<th>{{ translate('Customer')}}</th>
<th data-breakpoints="lg">{{ translate('Date') }}</th>
<th>{{ translate('Amount')}}</th>
<th data-breakpoints="lg">{{ translate('Payment Method')}}</th>
<th data-breakpoints="lg" class="text-right">{{ translate('Approval')}}</th>
</tr>
</thead>
<tbody>
@foreach ($wallets as $key => $wallet)
<tr>
<td>{{ $key+1 }}</td>
@if ($wallet->user != null)
<td>{{ $wallet->user->name }}</td>
@else
<td>{{ translate('User Not found') }}</td>
@endif
<td>{{ date('d-m-Y', strtotime($wallet->created_at)) }}</td>
<td>{{ single_price($wallet->amount) }}</td>
<td>{{ ucfirst(str_replace('_', ' ', $wallet ->payment_method)) }}</td>
<td class="text-right">
@if ($wallet->offline_payment)
@if ($wallet->approval)
<span class="badge badge-inline badge-success">{{translate('Approved')}}</span>
@else
<span class="badge badge-inline badge-info">{{translate('Pending')}}</span>
@endif
@else
N/A
@endif
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $wallets->appends(request()->input())->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -0,0 +1,58 @@
@extends('backend.layouts.app')
@section('content')
<div class="aiz-titlebar text-left mt-2 mb-3">
<div class=" align-items-center">
<h1 class="h3">{{translate('Product Wish Report')}}</h1>
</div>
</div>
<div class="row">
<div class="col-md-8 mx-auto">
<div class="card">
<div class="card-body">
<form action="{{ route('wish_report.index') }}" method="GET">
<div class="form-group row offset-lg-2">
<label class="col-md-3 col-form-label">{{ translate('Sort by Category') }}:</label>
<div class="col-md-5">
<select id="demo-ease" class="from-control aiz-selectpicker" name="category_id" required>
<option value="">{{ translate('Choose Category') }}</option>
@foreach (\App\Models\Category::all() as $key => $category)
<option value="{{ $category->id }}" @if($category->id == $sort_by) selected @endif>{{ $category->getTranslation('name') }}</option>
@endforeach
</select>
</div>
<div class="col-md-2">
<button class="btn btn-primary" type="submit">{{ translate('Filter') }}</button>
</div>
</div>
</form>
<table class="table table-bordered aiz-table mb-0">
<thead>
<tr>
<th>{{ translate('Product Name') }}</th>
<th>{{ translate('Number of Wish') }}</th>
</tr>
</thead>
<tbody>
@foreach ($products as $key => $product)
@if($product->wishlists != null)
<tr>
<td>{{ $product->getTranslation('name') }}</td>
<td>{{ $product->wishlists->count() }}</td>
</tr>
@endif
@endforeach
</tbody>
</table>
<div class="aiz-pagination mt-4">
{{ $products->appends(request()->input())->links() }}
</div>
</div>
</div>
</div>
</div>
@endsection