migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
@if ($filter_from_date && $filter_to_date)
|
||||
<div class="mb-2 text-center fw-bold duration-display">
|
||||
<strong>{{ __('Duration:') }}</strong>
|
||||
@if ($duration === 'today')
|
||||
{{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }}
|
||||
@elseif ($duration === 'yesterday')
|
||||
{{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }}
|
||||
@else
|
||||
{{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }}
|
||||
{{ __('to') }}
|
||||
{{ Carbon\Carbon::parse($filter_to_date)->format('d-m-Y') }}
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<th class="text-start">{{ __('Branch') }}</th>
|
||||
@endif
|
||||
<th class="text-start">{{ __('Invoice No') }}</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Total') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Discount Amount') }}</th>
|
||||
<th class="text-start">{{ __('Paid') }}</th>
|
||||
<th class="text-start">{{ __('Due') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Vat') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Payment Type') }}</th>
|
||||
<th class="text-start">{{ __('Sale Date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($sales as $sale)
|
||||
<tr>
|
||||
<td>{{ ($sales->currentPage() - 1) * $sales->perPage() + $loop->iteration }}</td>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td class="text-start">{{ $sale->branch->name ?? '' }}</td>
|
||||
@endif
|
||||
<td class="text-start">{{ $sale->invoiceNumber }}</td>
|
||||
<td class="text-start">{{ $sale->party?->name }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">{{ currency_format($sale->discountAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->paidAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->dueAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">{{ currency_format($sale->vat_amount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">
|
||||
@if ($sale->transactions && $sale->transactions->isNotEmpty())
|
||||
{{ $sale->transactions->map(function($transaction) {
|
||||
if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) {
|
||||
return $transaction->paymentType->name;
|
||||
}
|
||||
return $transaction->transaction_type ? ucfirst(explode('_', $transaction->transaction_type)[0]) : '';
|
||||
})->unique()->implode(', ') }}
|
||||
@elseif ($sale->payment_type_id)
|
||||
{{ $sale->payment_type?->name }}
|
||||
@else
|
||||
{{ $sale->paymentType }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-start">{{ formatted_date($sale->saleDate) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($sales->count() > 0)
|
||||
<tfoot>
|
||||
<tr class="table-footer">
|
||||
<td class="text-start">{{ __('Total') }} </td>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td></td>
|
||||
@endif
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start d-print-none">
|
||||
{{ currency_format($sales->sum('discountAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('paidAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('dueAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start d-print-none">
|
||||
{{ currency_format($sales->sum('vat_amount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $sales->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,79 @@
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<th class="text-start">{{ __('Branch') }}</th>
|
||||
@endif
|
||||
<th class="text-start">{{ __('Invoice No') }}</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Total') }}</th>
|
||||
<th class="text-start">{{ __('Discount Amount') }}</th>
|
||||
<th class="text-start">{{ __('Paid') }}</th>
|
||||
<th class="text-start">{{ __('Due') }}</th>
|
||||
<th class="text-start">{{ __('Vat') }}</th>
|
||||
<th class="text-start">{{ __('Payment Type') }}</th>
|
||||
<th class="text-start">{{ __('Sale Date') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($sales as $sale)
|
||||
<tr>
|
||||
<td class="d-print-none">{{ $loop->iteration }}</td>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td class="text-start">{{ $sale->branch->name ?? '' }}</td>
|
||||
@endif
|
||||
<td class="text-start">{{ $sale->invoiceNumber }}</td>
|
||||
<td class="text-start">{{ $sale->party?->name }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">{{ currency_format($sale->discountAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->paidAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($sale->dueAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">{{ currency_format($sale->vat_amount, currency: business_currency()) }}</td>
|
||||
<td class="text-start d-print-none">
|
||||
@if ($sale->transactions && $sale->transactions->isNotEmpty())
|
||||
{{ $sale->transactions->map(function($transaction) {
|
||||
if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) {
|
||||
return $transaction->paymentType->name;
|
||||
}
|
||||
return $transaction->transaction_type ? ucfirst(explode('_', $transaction->transaction_type)[0]) : '';
|
||||
})->unique()->implode(', ') }}
|
||||
@elseif ($sale->payment_type_id)
|
||||
{{ $sale->payment_type?->name }}
|
||||
@else
|
||||
{{ $sale->paymentType }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-start">{{ formatted_date($sale->saleDate) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if ($sales->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="d-print-none text-start">{{ __('Total') }} </td>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td></td>
|
||||
@endif
|
||||
<td class="text-start"></td>
|
||||
<td class="text-start"></td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start d-print-none">
|
||||
{{ currency_format($sales->sum('discountAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('paidAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('dueAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ currency_format($sales->sum('vat_amount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
100
Modules/Business/resources/views/reports/sales/pdf.blade.php
Normal file
100
Modules/Business/resources/views/reports/sales/pdf.blade.php
Normal file
@@ -0,0 +1,100 @@
|
||||
@extends('layouts.business.pdf.pdf_layout')
|
||||
|
||||
@section('pdf_title')
|
||||
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
|
||||
@include('business::print.header')
|
||||
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;" class="">{{ __('Sales Report List') }}</h4>
|
||||
{{-- <p style="text-align: center; margin: 0; padding: 0; font-weight: 400; font-size: 14px;" class="">{{ __('Duration: 14-12-2025 to 24-12-2025') }}</p> --}}
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('pdf_content')
|
||||
<table width="100%" cellpadding="6" cellspacing="0"
|
||||
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;"
|
||||
id="datatable">
|
||||
<thead>
|
||||
<tr style="background-color: #C52127; color: white;">
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Branch') }}</th>
|
||||
@endif
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Invoice No') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Date') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Party Name') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Payment Type') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Paid') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($sales as $sale)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $sale->branch->name ?? '' }}
|
||||
</td>
|
||||
@endif
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $sale->invoiceNumber }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ formatted_date($sale->saleDate) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $sale->party?->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none">
|
||||
@if ($sale->transactions && $sale->transactions->isNotEmpty())
|
||||
{{ $sale->transactions->map(function($transaction) {
|
||||
if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) {
|
||||
return $transaction->paymentType->name;
|
||||
}
|
||||
return $transaction->transaction_type
|
||||
? ucfirst(explode('_', $transaction->transaction_type)[0])
|
||||
: '';
|
||||
})->unique()->implode(', ') }}
|
||||
@elseif ($sale->payment_type_id)
|
||||
{{ $sale->payment_type?->name }}
|
||||
@else
|
||||
{{ $sale->paymentType }}
|
||||
@endif
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($sale->totalAmount, currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($sale->paidAmount, currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($sale->dueAmount, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($sales->count() > 0)
|
||||
<tfoot>
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white">
|
||||
{{ __('Total') }}
|
||||
</td>
|
||||
@if (auth()->user()->accessToMultiBranch())
|
||||
<td style="border:1px solid gainsboro; text-align:center; font-weight: 600;"></td>
|
||||
@endif
|
||||
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($sales->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($sales->sum('paidAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($sales->sum('dueAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Sale Reports') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="mb-4 d-flex loss-flex gap-3 loss-profit-container d-print-none">
|
||||
<div class="d-flex align-items-center justify-content-center gap-3">
|
||||
<div class="profit-card p-3 text-white">
|
||||
<p class="stat-title">{{ __('Total Sale') }}</p>
|
||||
<p class="stat-value" id="total_sale">{{ currency_format($total_sale, currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Sales Report List') }}</h4>
|
||||
</div>
|
||||
<div class="table-header justify-content-center border-0 d-none d-block d-print-block text-center">
|
||||
@include('business::print.header')
|
||||
<h4 class="mt-2">{{ __('Sales Report List') }}</h4>
|
||||
</div>
|
||||
<div class="table-top-form p-16">
|
||||
<div class="d-flex align-items-center gap-3 flex-wrap">
|
||||
<form action="{{ route('business.sale-reports.index') }}" method="GET" class="report-filter-form" table="#sale-report-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 d-print-none flex-wrap">
|
||||
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="per_page" class="form-control">
|
||||
<option @selected(request('per_page') == 20) value="20">{{ __('Show 20') }}</option>
|
||||
<option @selected(request('per_page') == 50) value="50">{{ __('Show 50') }}</option>
|
||||
<option @selected(request('per_page') == 100) value="100">{{ __('Show 100') }}</option>
|
||||
<option @selected(request('per_page') == 500) value="500">{{ __('Show 500') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
|
||||
@if(auth()->user()->accessToMultiBranch())
|
||||
<div class="table-search position-relative">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
<select name="branch_id" class="form-control">
|
||||
<option value="">{{ __('Select Branch') }}</option>
|
||||
@foreach ($branches as $branch)
|
||||
<option value="{{ $branch->id }}" @selected(request('branch_id') == $branch->id) >{{ $branch->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="table-search position-relative">
|
||||
<input type="text" name="search" class="form-control" placeholder="{{ __('Search...') }}" value="{{ request('search') }}">
|
||||
<span class="position-absolute">
|
||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14.582 14.582L18.332 18.332" stroke="#4D4D4D" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M16.668 9.16797C16.668 5.02584 13.3101 1.66797 9.16797 1.66797C5.02584 1.66797 1.66797 5.02584 1.66797 9.16797C1.66797 13.3101 5.02584 16.668 9.16797 16.668C13.3101 16.668 16.668 13.3101 16.668 9.16797Z" stroke="#4D4D4D" stroke-width="1.25" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="custom-from-to align-items-center date-filters d-none">
|
||||
<label class="header-label">{{ __('From Date') }}</label>
|
||||
<input type="date" name="from_date" value="{{ request('from_date') ?? now()->format('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="custom-from-to align-items-center date-filters d-none">
|
||||
<label class="header-label">{{ __('To Date') }}</label>
|
||||
<input type="date" name="to_date" value="{{ request('to_date') ?? now()->format('Y-m-d') }}" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none custom-date-filter">
|
||||
<select name="custom_days" class="form-control custom-days">
|
||||
<option value="today" {{ request()->get('custom_days') == 'today' ? 'selected' : '' }}>{{ __('Today') }}</option>
|
||||
<option value="yesterday" {{ request()->get('custom_days') == 'yesterday' ? 'selected' : '' }}>{{ __('Yesterday') }}</option>
|
||||
<option value="last_seven_days" {{ request()->get('custom_days') == 'last_seven_days' ? 'selected' : '' }}>{{ __('Last 7 Days') }}</option>
|
||||
<option value="last_thirty_days" {{ request()->get('custom_days') == 'last_thirty_days' ? 'selected' : '' }}>{{ __('Last 30 Days') }}</option>
|
||||
<option value="current_month" {{ request()->get('custom_days') == 'current_month' ? 'selected' : '' }}>{{ __('Current Month') }}</option>
|
||||
<option value="last_month" {{ request()->get('custom_days') == 'last_month' ? 'selected' : '' }}>{{ __('Last Month') }}</option>
|
||||
<option value="current_year" {{ request()->get('custom_days') == 'current_year' ? 'selected' : '' }}>{{ __('Current Year') }}</option>
|
||||
<option value="custom_date" {{ request()->get('custom_days') == 'custom_date' ? 'selected' : '' }}>{{ __('Custom Date') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
<div class="calendar-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.6667 2.67188H3.33333C2.59695 2.67188 2 3.26883 2 4.00521V13.3385C2 14.0749 2.59695 14.6719 3.33333 14.6719H12.6667C13.403 14.6719 14 14.0749 14 13.3385V4.00521C14 3.26883 13.403 2.67188 12.6667 2.67188Z" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M10.6641 1.32812V3.99479" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M5.33594 1.32812V3.99479" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M2 6.67188H14" stroke="#4B5563" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.sales.reports.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.sales.reports.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.sales.reports.pdf', ['custom_days' => request('custom_days')]) }}">
|
||||
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="window.print()" class="print-window">
|
||||
<img src="{{ asset('assets/images/logo/printer.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sale-report-data">
|
||||
@include('business::reports.sales.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user