update marketing
All checks were successful
All checks were successful
This commit is contained in:
@@ -1,8 +1,23 @@
|
||||
@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 class="w-60">
|
||||
<th class="w-60 d-print-none">
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<input type="checkbox" class="select-all-delete multi-delete">
|
||||
</div>
|
||||
@@ -13,15 +28,16 @@
|
||||
<th>{{ __('Payment') }}</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Amount') }}</th>
|
||||
<th class="text-center">{{ __('Action') }}</th>
|
||||
<th class="text-center d-print-none">{{ __('Action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($cashes as $cash)
|
||||
<tr>
|
||||
<td class="w-60 checkbox">
|
||||
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
|
||||
value="{{ $cash->id }}">
|
||||
<td class="w-60 checkbox d-print-none">
|
||||
@if($cash->platform === 'cash' && in_array($cash->transaction_type, ['cash_to_bank','adjust_cash']))
|
||||
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete" value="{{ $cash->id }}">
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>{{ ($cashes->currentPage() - 1) * $cashes->perPage() + $loop->iteration }}</td>
|
||||
@@ -39,7 +55,7 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="dropdown table-action">
|
||||
<div class="dropdown table-action d-print-none">
|
||||
<button type="button" data-bs-toggle="dropdown">
|
||||
<i class="far fa-ellipsis-v"></i>
|
||||
</button>
|
||||
@@ -100,10 +116,10 @@
|
||||
$editConfig = ['url' => route('business.sales.index')];
|
||||
} elseif ($cash->platform === 'purchase') {
|
||||
$editConfig = ['url' => route('business.purchases.index')];
|
||||
} elseif ($cash->platform === 'income' && $cash->reference_id) {
|
||||
$editConfig = ['url' => route('business.incomes.edit', $cash->reference_id)];
|
||||
}elseif ($cash->platform === 'expense' && $cash->reference_id) {
|
||||
$editConfig = ['url' => route('business.expenses.edit', $cash->reference_id)];
|
||||
} elseif ($cash->platform === 'income') {
|
||||
$editConfig = ['url' => route('business.incomes.index')];
|
||||
}elseif ($cash->platform === 'expense') {
|
||||
$editConfig = ['url' => route('business.expenses.index')];
|
||||
}elseif ($cash->platform === 'sale_return') {
|
||||
$editConfig = ['url' => route('business.sale-returns.index')];
|
||||
}elseif ($cash->platform === 'purchase_return') {
|
||||
@@ -138,12 +154,14 @@
|
||||
|
||||
{{-- Delete --}}
|
||||
@usercan('cashes.delete')
|
||||
@if($cash->platform === 'cash' && in_array($cash->transaction_type, ['cash_to_bank','adjust_cash']))
|
||||
<li>
|
||||
<a href="{{ route('business.cashes.destroy', $cash->id) }}"
|
||||
class="confirm-action" data-method="DELETE">
|
||||
<i class="fal fa-trash-alt"></i> {{ __('Delete') }}
|
||||
</a>
|
||||
</li>
|
||||
@endif
|
||||
@endusercan
|
||||
|
||||
</ul>
|
||||
@@ -155,6 +173,6 @@ class="confirm-action" data-method="DELETE">
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="d-print-none">
|
||||
{{ $cashes->links('vendor.pagination.bootstrap-5') }}
|
||||
</div>
|
||||
|
||||
30
Modules/Business/resources/views/cashes/excel-csv.blade.php
Normal file
30
Modules/Business/resources/views/cashes/excel-csv.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<table class="table" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th>{{ __('Date') }}</th>
|
||||
<th>{{ __('Type') }}</th>
|
||||
<th>{{ __('Payment') }}</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($cashes as $cash)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ formatted_date($cash->date) }}</td>
|
||||
<td>{{ ucwords(str_replace('_', ' ', $cash->platform)) }}</td>
|
||||
<td>{{ ucwords(str_replace('_', ' ', $cash->transaction_type)) }}</td>
|
||||
<td>{{ $cash->user->name ?? '' }}</td>
|
||||
<td>
|
||||
@if ($cash->type == 'credit' || $cash->transaction_type == 'bank_to_cash')
|
||||
{{ currency_format($cash->amount, currency: business_currency()) }}
|
||||
@elseif ($cash->type == 'debit' || $cash->transaction_type == 'cash_to_bank')
|
||||
{{ currency_format(-$cash->amount, currency: business_currency()) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -14,13 +14,13 @@
|
||||
<div class="col-lg-2 col-md-6 ">
|
||||
<div class="profit-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Balance') }}</p>
|
||||
<p class="stat-value">{{ currency_format(cash_balance(), 'icon', 2, business_currency()) }}</p>
|
||||
<p class="stat-value" id="cash_balance">{{ currency_format($cash_balance, 'icon', 2, business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-header p-16">
|
||||
<div class="table-header p-16 d-print-none">
|
||||
<h4>{{ __('Cash In Hand') }}</h4>
|
||||
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
@@ -35,8 +35,14 @@
|
||||
</a>
|
||||
</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">{{ __('Cash In Hand') }}</h4>
|
||||
</div>
|
||||
|
||||
<div class="table-top-form p-16-0">
|
||||
<form action="{{ route('business.cashes.index') }}" method="GET" class="filter-form" table="#cashes-data">
|
||||
<form action="{{ route('business.cashes.index') }}" method="GET" class="report-filter-form d-print-none" table="#cashes-data">
|
||||
|
||||
<div class="table-top-left d-flex gap-3 margin-l-16">
|
||||
<div class="gpt-up-down-arrow position-relative">
|
||||
@@ -92,6 +98,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="table-top-btn-group d-print-none me-2">
|
||||
<ul>
|
||||
<li>
|
||||
<a class="export-btn" class="export-btn" href="{{ route('business.cashes.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="export-btn" class="export-btn" href="{{ route('business.cashes.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="export-btn" class="export-btn" target="_blank" href="{{ route('business.cashes.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>
|
||||
|
||||
|
||||
76
Modules/Business/resources/views/cashes/pdf.blade.php
Normal file
76
Modules/Business/resources/views/cashes/pdf.blade.php
Normal file
@@ -0,0 +1,76 @@
|
||||
@extends('layouts.business.pdf.pdf_layout')
|
||||
|
||||
@section('pdf_title')
|
||||
<div class="table-header justify-content-center border-0 d-print-block text-center">
|
||||
@include('business::print.header')
|
||||
<h4 style="text-align: center; margin: 0; padding: 0; font-size: 16px;">
|
||||
{{ __('Cash Balance List') }}
|
||||
</h4>
|
||||
@if ($filter_from_date && $filter_to_date)
|
||||
<p style="text-align: center; margin: 0; padding: 0; font-weight: 400; font-size: 14px;" class="">{{ __('Duration:') }}
|
||||
@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
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@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">
|
||||
{{ __('Type') }}
|
||||
</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">
|
||||
{{ __('Payment') }}
|
||||
</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">
|
||||
{{ __('Name') }}
|
||||
</th>
|
||||
<th style="font-size:12px; border:1px solid gainsboro; color: white">
|
||||
{{ __('Amount') }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($cashes as $cash)
|
||||
<tr style="background-color: {{ $loop->even ? '#F5F5F5' : '#FFFFFF' }};">
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ formatted_date($cash->date) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ ucwords(str_replace('_', ' ', $cash->platform)) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ ucwords(str_replace('_', ' ', $cash->transaction_type)) }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
{{ $cash->user->name ?? '' }}
|
||||
</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">
|
||||
@if ($cash->type == 'credit' || $cash->transaction_type == 'bank_to_cash')
|
||||
{{ currency_format($cash->amount, currency: business_currency()) }}
|
||||
@elseif ($cash->type == 'debit' || $cash->transaction_type == 'cash_to_bank')
|
||||
{{ currency_format(-$cash->amount, currency: business_currency()) }}
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user