migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Customer Name') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Phone') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Type') }}</th>
|
||||
<th class="text-center">{{ __('Total Sales') }}</th>
|
||||
<th class="text-end">{{ __('Amount') }}</th>
|
||||
<th class="text-end">{{ __('Paid') }}</th>
|
||||
<th class="text-end">{{ __('Total Sale Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr>
|
||||
<td class="d-print-none">{{ $customers->firstItem() + $loop->index }}</td>
|
||||
<td class="d-print-none text-start">
|
||||
<a href="{{ route('business.customer-ledger.show', $customer->id) }}" class="stock-view-data text-primary">
|
||||
{{ $customer->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-start">{{ $customer->phone }}</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td class="text-start d-print-none">{{ __('Customer') }}</td>
|
||||
@else
|
||||
<td class="text-start d-print-none">{{ $customer->type }}</td>
|
||||
@endif
|
||||
<td class="text-center">{{ $customer->sales?->count() }}</td>
|
||||
<td class="text-end">{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($customer->sales?->sum('paidAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($customer->sales?->sum('dueAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center fw-bold ">{{ $customers->sum(fn($customer) => $customer->sales?->count()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalPaid, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalDue, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $customers->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,44 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Customer Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Type') }}</th>
|
||||
<th class="text-start">{{ __('Total Sales') }}</th>
|
||||
<th class="text-start">{{ __('Amount') }}</th>
|
||||
<th class="text-start">{{ __('Paid') }}</th>
|
||||
<th class="text-start">{{ __('Total Sale Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $customer->name }}</td>
|
||||
<td class="text-start">{{ $customer->phone }}</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td class="text-start d-print-none">{{ __('Customer') }}</td>
|
||||
@else
|
||||
<td class="text-start d-print-none">{{ $customer->type }}</td>
|
||||
@endif
|
||||
<td class="text-start">{{ $customer->sales?->count() }}</td>
|
||||
<td class="text-start">{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($customer->sales?->sum('paidAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($customer->sales?->sum('dueAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center fw-bold">{{ $customers->sum(fn($customer) => $customer->sales?->count()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalPaid, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalDue, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,91 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Customer Ledger') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Customer Ledger') }}</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">{{ __('Customer Ledger') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.customer-ledger.index') }}" method="GET" class="filter-form" table="#customer-ledger-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 ">
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none">
|
||||
<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>
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<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="gpt-up-down-arrow position-relative d-print-none">
|
||||
<select name="type" class="form-control">
|
||||
<option value="">{{ __('All Party') }}</option>
|
||||
<option value="Retailer">{{ __('Customer') }}</option>
|
||||
<option value="Wholesaler">{{ __('Wholesaler') }}</option>
|
||||
<option value="Dealer">{{ __('Dealer') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.customer-ledger.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.customer-ledger.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<a target="blank" href="{{ route('business.customer-ledger.pdf') }}">
|
||||
<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="customer-ledger-data">
|
||||
@include('business::party-reports.customer-ledger.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
@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="">{{ __('Customer Ledger 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;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Name') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Phone') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Sale') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Amount') }}</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">{{ __('Total Sale Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->phone }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->sales?->count() }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($customer->sales?->sum('paidAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($customer->sales?->sum('dueAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->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>
|
||||
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->count() ) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('totalAmount') ?? 0 ), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->sum('paidAmount') ?? 0 ) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('dueAmount') ?? 0 ), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,56 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Invoice') }}</th>
|
||||
<th class="text-start">{{ __('Description') }}</th>
|
||||
<th class="text-start">{{ __('Credit (In)') }}</th>
|
||||
<th class="text-start">{{ __('Debit (Out)') }}</th>
|
||||
<th class="text-start">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="text-start d-print-none">{{ $index + 1 }}</td>
|
||||
<td class="text-start">{{ formatted_date($row['date']) }}</td>
|
||||
|
||||
<td class="text-start">
|
||||
<a target="_blank" href="{{ $row['platform'] === 'Sales' ? route('business.sales.invoice', $row['id'] ?? '') : route('business.collect.dues.invoice', $row['id'] ?? '') }}" class="stock-view-data text-primary">
|
||||
{{ $row['invoice_no'] ?? '-' }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td class="text-start">{{ $row['platform'] }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['credit_amount'], currency: business_currency() ) }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['debit_amount'], currency: business_currency()) }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['balance'], currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($ledger->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start">{{__('Total')}}</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-start">{{ currency_format($totalCredit, currency: business_currency()) }}</td>
|
||||
<td class="text-start ">{{ currency_format($totalDebit, currency: business_currency()) }}</td>
|
||||
<td class="text-start ">{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,54 @@
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Invoice') }}</th>
|
||||
<th class="text-start">{{ __('Description') }}</th>
|
||||
<th class="text-start">{{ __('Credit (In)') }}</th>
|
||||
<th class="text-start">{{ __('Debit (Out)') }}</th>
|
||||
<th class="text-start">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="text-start">{{ $index + 1 }}</td>
|
||||
<td class="text-start">{{ formatted_date($row['date']) }}</td>
|
||||
|
||||
<td class="text-start">
|
||||
<a target="_blank" href="{{ $row['platform'] === 'Sales' ? route('business.sales.invoice', $row['id'] ?? '') : route('business.collect.dues.invoice', $row['id'] ?? '') }}" class="stock-view-data text-primary">
|
||||
{{ $row['invoice_no'] ?? '-' }}
|
||||
</a>
|
||||
</td>
|
||||
|
||||
<td class="d-print-none text-start">{{ $row['platform'] }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['credit_amount']) }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['debit_amount']) }}</td>
|
||||
|
||||
<td class="text-start">{{ currency_format($row['balance']) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($ledger->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center fw-bold">{{ currency_format($totalCredit, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalDebit, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,98 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ $party->name }} {{ __("(Customer Ledger)") }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ $party->name }} {{ __("(Ledger)") }}</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">{{ $party->name }} {{ __("(Ledger)") }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.customer-ledger.show', $party->id) }}" method="GET" class="filter-form" table="#customer-ledger-data">
|
||||
<div class="table-top-left d-flex gap-3 d-print-none flex-wrap">
|
||||
<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="duration" class="form-control custom-days">
|
||||
<option value="">{{ __('All') }}</option>
|
||||
<option value="today"> {{ __('Today') }}</option>
|
||||
<option value="yesterday"> {{ __('Yesterday') }}</option>
|
||||
<option value="last_seven_days"> {{ __('Last 7 Days') }}</option>
|
||||
<option value="last_thirty_days"> {{ __('Last 30 Days') }}</option>
|
||||
<option value="current_month">{{ __('Current Month') }}</option>
|
||||
<option value="last_month"> {{ __('Last Month') }}</option>
|
||||
<option value="current_year"> {{ __('Current Year') }}</option>
|
||||
<option value="custom_date"> {{ __('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 class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.single-customer-ledger.csv', $party->id) }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.single-customer-ledger.excel', $party->id) }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.single-customer-ledger.pdf', $party->id) }}">
|
||||
<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="customer-ledger-data">
|
||||
@include('business::party-reports.customer-ledger.show-details.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,90 @@
|
||||
@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')
|
||||
<p style="text-align: center; margin: 0; padding: 0; margin-bottom:5px; font-size: 16px;">
|
||||
{{ $party->name }} ({{ __('Ledger')}})
|
||||
</p>
|
||||
@endsection
|
||||
|
||||
@section('pdf_content')
|
||||
|
||||
<table width="100%" cellpadding="6" cellspacing="0"
|
||||
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;">
|
||||
|
||||
<thead>
|
||||
<tr style="background-color: #C52127; color: white;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Date') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Invoice') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Description') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Credit (In)') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Debit (Out)') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ formatted_date($row['date']) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $row['invoice_no'] ?? '-' }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $row['platform'] }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['credit_amount'], currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['debit_amount'], currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['balance'], currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@if ($ledger->count() > 0)
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">{{ __('Total') }}</td>
|
||||
<td style="border:1px solid gainsboro;"></td>
|
||||
<td style="border:1px solid gainsboro;"></td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($totalCredit, currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($totalDebit, currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</table>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,65 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Sale Amount') }}</th>
|
||||
<th class="text-start">{{ __('Profit') }}</th>
|
||||
<th class="text-start">{{ __('Loss') }}</th>
|
||||
<th class="d-print-none">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
@php
|
||||
$profit = $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0;
|
||||
$loss = $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $parties->firstItem() + $loop->index }}</td>
|
||||
<td class="text-start">{{ $party->name }}</td>
|
||||
<td class="text-start">{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start {{ $profit > 0 ? 'text-success' : '' }}">{{ $profit > 0 ? currency_format($profit, currency: business_currency()) : currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="text-start {{ $loss < 0 ? 'text-danger' : '' }}">{{ $loss < 0 ? currency_format(abs($loss), currency: business_currency()) : currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="d-print-none">
|
||||
<div class="dropdown table-action">
|
||||
<button type="button" data-bs-toggle="dropdown">
|
||||
<i class="far fa-ellipsis-v"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="#" class="view-party-loss-profit-btn" data-bs-toggle="modal" data-bs-target="#view-party-loss-profit-modal"
|
||||
data-url="{{ route('business.party-loss-profit.view', $party->id) }}">
|
||||
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16.158 8.28375C16.386 8.60348 16.5 8.76338 16.5 9C16.5 9.23662 16.386 9.39652 16.158 9.71625C15.1334 11.1529 12.5169 14.25 9 14.25C5.48309 14.25 2.86657 11.1529 1.84203 9.71625C1.61401 9.39652 1.5 9.23662 1.5 9C1.5 8.76338 1.61401 8.60348 1.84203 8.28375C2.86657 6.84708 5.48309 3.75 9 3.75C12.5169 3.75 15.1334 6.84708 16.158 8.28375Z" stroke="#4B5563" stroke-width="1.2"/>
|
||||
<path d="M11.25 9C11.25 7.75732 10.2427 6.75 9 6.75C7.75732 6.75 6.75 7.75732 6.75 9C6.75 10.2427 7.75732 11.25 9 11.25C10.2427 11.25 11.25 10.2427 11.25 9Z" stroke="#4B5563" stroke-width="1.2"/>
|
||||
</svg>
|
||||
{{ __('View Details') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td></td>
|
||||
<td class="text-start fw-bold">{{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}</td>
|
||||
<td class="text-start fw-bold">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start fw-bold text-danger">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $parties->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Party Name') }}</th>
|
||||
<th class="text-start">{{ __('Sale Amount') }}</th>
|
||||
<th class="text-start">{{ __('Profit') }}</th>
|
||||
<th class="text-start">{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
@php
|
||||
$profit = $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0;
|
||||
$loss = $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0;
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $party->name }}</td>
|
||||
<td class="text-start">{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start text-success">{{ $profit > 0 ? currency_format($profit, currency: business_currency()) : 0 }}</td>
|
||||
<td class="text-start text-danger">{{ $loss < 0 ? currency_format(abs($loss), currency: business_currency()) : 0 }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->count() > 0)
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td></td>
|
||||
<td class="text-start fw-bold">{{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}</td>
|
||||
<td class="text-start fw-bold">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start fw-bold text-danger">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,108 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Party Wise Loss & Profit') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Party Wise Loss & Profit') }}</h4>
|
||||
</div>
|
||||
<div class="loss-profit-container d-print-none">
|
||||
<div class="row">
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="sales-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Sales Amount') }}</p>
|
||||
<p class="stat-value">{{ currency_format($totalAmount, currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-6">
|
||||
<div class="profit-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Profit') }}</p>
|
||||
<p class="stat-value">{{ currency_format($totalProfit, currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-12 ">
|
||||
<div class="loss-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Loss') }}</p>
|
||||
<p class="stat-value">{{ currency_format(abs($totalLoss), currency: business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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">{{ __('Party Wise Loss & Profit') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<div class="d-flex align-items-center gap-3 flex-wrap">
|
||||
<form action="{{ route('business.party-loss-profit.index') }}" method="GET" class="report-filter-form" table="#party-loss-profit-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 d-print-none">
|
||||
<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>
|
||||
<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>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.party-loss-profit.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.party-loss-profit.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.party-loss-profit.pdf') }}">
|
||||
<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="party-loss-profit-data">
|
||||
@include('business::party-reports.loss-profit.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('modal')
|
||||
@include('business::party-reports.loss-profit.view')
|
||||
@endpush
|
||||
@@ -0,0 +1,60 @@
|
||||
@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="">{{ __('Party Loss Profit Report') }}</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;">
|
||||
<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">{{ __('Sale Amount') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Profit') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($parties as $party)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $party->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($parties->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>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($parties->sum(fn($party) => $party->sales?->where('lossProfit', '>', 0)->sum('lossProfit') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format(abs($parties->sum(fn($party) => $party->sales?->where('lossProfit', '<', 0)->sum('lossProfit') ?? 0)), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,31 @@
|
||||
<div class="modal fade" id="view-party-loss-profit-modal" tabindex="-1" aria-labelledby="viewPaymentModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">{{ __('View Details') }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL.') }}</th>
|
||||
<th class="text-start">{{ __('Product Name') }}</th>
|
||||
<th>{{ __('Quantity') }}</th>
|
||||
<th>{{ __('Purchase Price') }}</th>
|
||||
<th>{{ __('Sale Price') }}</th>
|
||||
<th>{{ __('Profit') }}</th>
|
||||
<th>{{ __('Loss') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="view-party-loss-profit-data">
|
||||
<tr>
|
||||
<td colspan="7" class="text-center text-muted">{{ __('Loading...') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,51 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Supplier Name') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Phone') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Type') }}</th>
|
||||
<th class="text-center">{{ __('Total Purchases') }}</th>
|
||||
<th class="text-end">{{ __('Amount') }}</th>
|
||||
<th class="text-end">{{ __('Paid') }}</th>
|
||||
<th class="text-end">{{ __('Total Purchase Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr>
|
||||
<td class="d-print-none">{{ $suppliers->firstItem() + $loop->index }}</td>
|
||||
<td class="d-print-none text-start">
|
||||
<a href="{{ route('business.supplier-ledger.show', $supplier->id) }}" class="stock-view-data text-primary">
|
||||
{{ $supplier->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="text-start d-print-none">{{ $supplier->phone }}</td>
|
||||
<td class="text-start d-print-none">{{ $supplier->type }}</td>
|
||||
<td class="text-center">{{ $supplier->purchases?->count() }}</td>
|
||||
<td class="text-end">{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($supplier->purchases?->sum('paidAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-end">{{ currency_format($supplier->purchases?->sum('dueAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->count() > 0)
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td class="text-start d-print-none"></td>
|
||||
<td class="text-start d-print-none"></td>
|
||||
<td class="text-start d-print-none"></td>
|
||||
<td class="text-center fw-bold">{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ) }}</td>
|
||||
<td class="text-end fw-bold">{{ currency_format($totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold">{{ currency_format($totalPaid, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold">{{ currency_format($totalDue, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
{{ $suppliers->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
@@ -0,0 +1,42 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Supplier Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Type') }}</th>
|
||||
<th class="text-start">{{ __('Total Purchases') }}</th>
|
||||
<th class="text-start">{{ __('Amount') }}</th>
|
||||
<th class="text-start">{{ __('Paid') }}</th>
|
||||
<th class="text-start">{{ __('Total Purchase Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $supplier->name }}</td>
|
||||
<td class="text-start">{{ $supplier->phone }}</td>
|
||||
<td class="text-start">{{ $supplier->type }}</td>
|
||||
<td class="text-start">{{ $supplier->purchases?->count() }}</td>
|
||||
<td class="text-start">{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($supplier->purchases?->sum('paidAmount'), currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($supplier->purchases?->sum('dueAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->count() > 0)
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td class="text-start">{{__('Total')}}</td>
|
||||
<td class="text-start"></td>
|
||||
<td class="text-start"></td>
|
||||
<td class="text-start"></td>
|
||||
<td class="text-center">{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ) }}</td>
|
||||
<td class="text-start">{{ currency_format($totalAmount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($totalPaid, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($totalDue, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,83 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Supplier Ledger') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Supplier Ledger') }}</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">{{ __('Supplier Ledger') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.supplier-ledger.index') }}" method="GET" class="filter-form" table="#supplier-ledger-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 ">
|
||||
<div class="gpt-up-down-arrow position-relative d-print-none">
|
||||
<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>
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<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>
|
||||
</form>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.supplier-ledger.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.supplier-ledger.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.supplier-ledger.pdf') }}">
|
||||
<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="supplier-ledger-data">
|
||||
@include('business::party-reports.supplier-ledger.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
@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="">{{ __('Supplier Ledger 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;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Name') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Phone') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Purchase') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Amount') }}</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">{{ __('Total Purchase Due') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->phone }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->purchases?->count() }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($supplier->purchases?->sum('paidAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($supplier->purchases?->sum('dueAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->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>
|
||||
<td style="border:1px solid gainsboro; text-align:center;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('totalAmount') ?? 0 ), currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->sum('paidAmount') ?? 0 ) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('dueAmount') ?? 0 ), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,52 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Invoice') }}</th>
|
||||
<th class="text-start">{{ __('Description') }}</th>
|
||||
<th class="text-start">{{ __('Credit (In)') }}</th>
|
||||
<th class="text-start">{{ __('Debit (Out)') }}</th>
|
||||
<th class="text-start">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="text-start">{{ $index + 1 }}</td>
|
||||
<td class="text-start">{{ formatted_date($row['date']) }}</td>
|
||||
|
||||
<td class="text-start">
|
||||
<a target="_blank" href="{{ $row['platform'] === 'Purchase' ? route('business.purchases.invoice', $row['id'] ?? '') : route('business.collect.dues.invoice', $row['id'] ?? '') }}" class="stock-view-data text-primary">
|
||||
{{ $row['invoice_no'] ?? '-' }} - {{ $row['id'] }}
|
||||
</a>
|
||||
</td>
|
||||
<td class="d-print-none text-start">{{ $row['platform'] }}</td>
|
||||
<td class="text-start">{{ currency_format($row['credit_amount'], currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($row['debit_amount'], currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($row['balance'], currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($ledger->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start">{{__('Total')}}</td>
|
||||
<td class="d-print-none"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-start">{{ currency_format($totalCredit, currency: business_currency()) }}</td>
|
||||
<td class="text-start ">{{ currency_format($totalDebit, currency: business_currency()) }}</td>
|
||||
<td class="text-start ">{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,47 @@
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="d-print-none">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Date') }}</th>
|
||||
<th class="text-start">{{ __('Invoice') }}</th>
|
||||
<th class="text-start">{{ __('Description') }}</th>
|
||||
<th class="text-start">{{ __('Credit (In)') }}</th>
|
||||
<th class="text-start">{{ __('Debit (Out)') }}</th>
|
||||
<th class="text-start">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
<tr>
|
||||
<td class="text-start">{{ $index + 1 }}</td>
|
||||
<td class="text-start">{{ formatted_date($row['date']) }}</td>
|
||||
<td class="text-start">
|
||||
{{ $row['invoice_no'] ?? '-' }} - {{ $row['id'] }}
|
||||
</td>
|
||||
<td class="d-print-none text-start">{{ $row['platform'] }}</td>
|
||||
<td class="text-start">{{ currency_format($row['credit_amount']) }}</td>
|
||||
<td class="text-start">{{ currency_format($row['debit_amount']) }}</td>
|
||||
<td class="text-start">{{ currency_format($row['balance']) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($ledger->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="text-start fw-bold">{{__('Total')}}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="text-center fw-bold">{{ currency_format($totalCredit, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($totalDebit, currency: business_currency()) }}</td>
|
||||
<td class="text-end fw-bold ">{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,98 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ $party->name }} {{ __("(Supplier Ledger)") }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ $party->name }} {{ __('(Ledger)') }}</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">{{ __('supplier Ledger') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.supplier-ledger.show', $party->id) }}" method="GET" class="filter-form" table="#supplier-ledger-data">
|
||||
<div class="table-top-left d-flex gap-3 d-print-none flex-wrap">
|
||||
<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="duration" class="form-control custom-days">
|
||||
<option value="">{{ __('All') }}</option>
|
||||
<option value="today"> {{ __('Today') }}</option>
|
||||
<option value="yesterday"> {{ __('Yesterday') }}</option>
|
||||
<option value="last_seven_days"> {{ __('Last 7 Days') }}</option>
|
||||
<option value="last_thirty_days"> {{ __('Last 30 Days') }}</option>
|
||||
<option value="current_month">{{ __('Current Month') }}</option>
|
||||
<option value="last_month"> {{ __('Last Month') }}</option>
|
||||
<option value="current_year"> {{ __('Current Year') }}</option>
|
||||
<option value="custom_date"> {{ __('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 class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.single-supplier-ledger.csv', $party->id) }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.single-supplier-ledger.excel', $party->id) }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.single-supplier-ledger.pdf', $party->id) }}">
|
||||
<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="supplier-ledger-data">
|
||||
@include('business::party-reports.supplier-ledger.show-details.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -0,0 +1,84 @@
|
||||
@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')
|
||||
<p style="text-align: center; margin: 0; padding: 0; margin-bottom:5px; font-size: 16px;">
|
||||
{{ $party->name }} ({{ __('Ledger')}})
|
||||
</p>
|
||||
@endsection
|
||||
|
||||
@section('pdf_content')
|
||||
|
||||
<table width="100%" cellpadding="6" cellspacing="0"
|
||||
style="border-collapse: collapse; border: 1px solid gainsboro; font-size:12px;">
|
||||
|
||||
<thead>
|
||||
<tr style="background-color: #C52127; color: white;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Date') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Invoice') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Description') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Credit (In)') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Debit (Out)') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">{{ __('Balance') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@php
|
||||
$totalCredit = 0;
|
||||
$totalDebit = 0;
|
||||
@endphp
|
||||
|
||||
@foreach ($ledger as $index => $row)
|
||||
@php
|
||||
$totalCredit += $row['credit_amount'];
|
||||
$totalDebit += $row['debit_amount'];
|
||||
@endphp
|
||||
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ formatted_date($row['date']) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $row['invoice_no'] ?? '-' }} - {{ $row['id'] }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $row['platform'] }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['credit_amount'], currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['debit_amount'], currency: business_currency()) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($row['balance'], currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
@if ($ledger->count() > 0)
|
||||
<tr style="background-color:#C52127; color:#FFFFFF; font-weight:bold;">
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">{{ __('Total') }}</td>
|
||||
<td style="border:1px solid gainsboro;"></td>
|
||||
<td style="border:1px solid gainsboro;"></td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($totalCredit, currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($totalDebit, currency: business_currency()) }}
|
||||
</td>
|
||||
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($ledger->last()['balance'] ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
</table>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,47 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Customer Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Email') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Type') }}</th>
|
||||
<th class="text-center">{{ __('Total Sales') }}</th>
|
||||
<th class="text-end">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr>
|
||||
<td class="">{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $customer->name }}</td>
|
||||
<td class="text-start">{{ $customer->phone }}</td>
|
||||
<td class="text-start">{{ $customer->email }}</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td class="text-start d-print-none">{{ __('Customer') }}</td>
|
||||
@else
|
||||
<td class="text-start d-print-none">{{ $customer->type }}</td>
|
||||
@endif
|
||||
<td class="text-center">{{ $customer->sales?->count() }}</td>
|
||||
<td class="text-end">{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td>{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->count() ?? 0) }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,45 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Customer Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Email') }}</th>
|
||||
<th class="text-start">{{ __('Type') }}</th>
|
||||
<th class="text-start">{{ __('Total Sales') }}</th>
|
||||
<th class="text-start">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $customer->name }}</td>
|
||||
<td class="text-start">{{ $customer->phone }}</td>
|
||||
<td class="text-start">{{ $customer->email }}</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td class="text-start">{{ __('Customer') }}</td>
|
||||
@else
|
||||
<td class="text-start">{{ $customer->type }}</td>
|
||||
@endif
|
||||
<td class="text-start">{{ $customer->sales?->count() }}</td>
|
||||
<td class="text-start">{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td>{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->count() ?? 0) }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,83 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Top 5 Customers') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Top 5 Customers') }}</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">{{ __('Top 5 Customers') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.top-customers.index') }}" method="GET" class="filter-form" table="#top-customers-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 ">
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<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="gpt-up-down-arrow position-relative d-print-none">
|
||||
<select name="type" class="form-control">
|
||||
<option value="">{{ __('All Party') }}</option>
|
||||
<option value="Retailer">{{ __('Customer') }}</option>
|
||||
<option value="Wholesaler">{{ __('Wholesaler') }}</option>
|
||||
<option value="Dealer">{{ __('Dealer') }}</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.top-customers.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.top-customers.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.top-customers.pdf') }}">
|
||||
<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="top-customers-data">
|
||||
@include('business::party-reports.top-customers.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
@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="">{{ __('Top 5 Customer 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;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Customer') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Phone') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Email') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Type') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Sales') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->phone }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->email }}
|
||||
</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ __('Customer') }}
|
||||
</td>
|
||||
@else
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->type }}
|
||||
</td>
|
||||
@endif
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $customer->sales?->count() }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->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>
|
||||
<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;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->count() ?? 0) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
@@ -0,0 +1,43 @@
|
||||
<div class="responsive-table m-0">
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="">{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Supplier Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Email') }}</th>
|
||||
<th class="text-start d-print-none">{{ __('Type') }}</th>
|
||||
<th class="text-center">{{ __('Total Purchases') }}</th>
|
||||
<th class="text-end">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr>
|
||||
<td class="">{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $supplier->name }}</td>
|
||||
<td class="text-start">{{ $supplier->phone }}</td>
|
||||
<td class="text-start">{{ $supplier->email }}</td>
|
||||
<td class="text-start d-print-none">{{ $supplier->type }}</td>
|
||||
<td class="text-center">{{ $supplier->purchases?->count() }}</td>
|
||||
<td class="text-end">{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="">{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center">
|
||||
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ?? 0) }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
@@ -0,0 +1,41 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Supplier Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('email') }}</th>
|
||||
<th class="text-start">{{ __('Type') }}</th>
|
||||
<th class="text-start">{{ __('Total Purchases') }}</th>
|
||||
<th class="text-start">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $supplier->name }}</td>
|
||||
<td class="text-start">{{ $supplier->phone }}</td>
|
||||
<td class="text-start">{{ $supplier->email }}</td>
|
||||
<td class="text-start">{{ $supplier->type }}</td>
|
||||
<td class="text-start">{{ $supplier->purchases?->count() }}</td>
|
||||
<td class="text-start">{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td class="">{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center">
|
||||
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ?? 0) }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,74 @@
|
||||
@extends('layouts.business.master')
|
||||
|
||||
@section('title')
|
||||
{{ __('Top 5 Suppliers') }}
|
||||
@endsection
|
||||
|
||||
@section('main_content')
|
||||
<div class="erp-table-section">
|
||||
<div class="container-fluid">
|
||||
<div class="card">
|
||||
<div class="card-bodys">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Top 5 Suppliers') }}</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">{{ __('Top 5 Suppliers') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16">
|
||||
<form action="{{ route('business.top-suppliers.index') }}" method="GET" class="filter-form" table="#top-suppliers-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 ">
|
||||
<div class="table-search position-relative d-print-none">
|
||||
<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>
|
||||
</form>
|
||||
|
||||
<div class="table-top-btn-group d-print-none">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.top-suppliers.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.top-suppliers.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.top-suppliers.pdf') }}">
|
||||
<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="top-suppliers-data">
|
||||
@include('business::party-reports.top-suppliers.datas')
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
@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="">{{ __('Top 5 Supplier 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;">
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Supplier') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Phone') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Email') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Type') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Purchases') }}</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($suppliers as $supplier)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->name }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->phone }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->email }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->type }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $supplier->purchases?->count() }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ currency_format($supplier->purchases?->sum('totalAmount'), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($suppliers->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>
|
||||
<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;"></td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ $suppliers->sum(fn($supplier) => $supplier->purchases?->count() ?? 0) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
|
||||
{{ currency_format($suppliers->sum(fn($supplier) => $supplier->purchases?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@endif
|
||||
</table>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user