update marketing
All checks were successful
All checks were successful
This commit is contained in:
@@ -69,11 +69,10 @@
|
||||
@endphp
|
||||
<td class="text-start">{{ currency_format($total_amount, currency: business_currency()) }}</td>
|
||||
<td class="text-start {{ $day_book->type === 'credit' ? 'text-success' : '' }}">
|
||||
{{ $day_book->type === 'credit' ? currency_format($total_amount, currency: business_currency()) : currency_format(0, currency: business_currency()) }}
|
||||
{{ $day_book->type === 'credit' ? currency_format($day_book->amount, currency: business_currency()) : currency_format(0) }}
|
||||
</td>
|
||||
|
||||
<td class="text-start {{ $day_book->type === 'debit' ? 'text-danger' : '' }}">
|
||||
{{ $day_book->type === 'debit' ? currency_format($day_book->amount, currency: business_currency()) : currency_format(0, currency: business_currency()) }}
|
||||
{{ $day_book->type === 'debit' ? currency_format($day_book->amount, currency: business_currency()) : currency_format(0) }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ $day_book->payment_type_id ? $day_book->paymentType?->name : ucfirst(explode('_', $day_book->transaction_type)[0]) }}
|
||||
@@ -116,17 +115,6 @@
|
||||
};
|
||||
});
|
||||
|
||||
$page_money_in_new = $day_books->getCollection()->where('type', 'credit')->sum(function ($day_book) {
|
||||
return match($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
'purchase_return' => $day_book->purchaseReturn?->purchase?->totalAmount ?? 0,
|
||||
'due_collect', 'due_pay' => $day_book->dueCollect?->totalDue ?? 0,
|
||||
default => 0
|
||||
};
|
||||
});
|
||||
|
||||
$page_money_in = $day_books->getCollection()->where('type', 'credit')->sum('amount');
|
||||
$page_money_out = $day_books->getCollection()->where('type', 'debit')->sum('amount');
|
||||
@endphp
|
||||
@@ -139,7 +127,6 @@
|
||||
<td class="d-print-none"></td>
|
||||
<td class="d-print-none text-end"></td>
|
||||
<td class="text-start">{{ currency_format($page_total_amount, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($page_money_in_new, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($page_money_in, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format($page_money_out, currency: business_currency()) }}</td>
|
||||
<td></td>
|
||||
|
||||
@@ -37,52 +37,29 @@
|
||||
<td class="text-start">{{ ucwords(str_replace('_', ' ', $day_book->platform)) }}</td>
|
||||
|
||||
@if ($day_book->platform == 'sale')
|
||||
<td class="text-start">
|
||||
{{ currency_format($day_book->sale?->totalAmount ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">{{ currency_format($day_book->sale?->totalAmount ?? 0, currency: business_currency()) }}</td>
|
||||
@elseif ($day_book->platform == 'sale_return')
|
||||
<td class="text-start">
|
||||
{{ currency_format($day_book->saleReturn?->sale?->totalAmount ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">{{ currency_format($day_book->saleReturn?->sale?->totalAmount ?? 0, currency: business_currency()) }}</td>
|
||||
@elseif ($day_book->platform == 'purchase')
|
||||
<td class="text-start">
|
||||
{{ currency_format($day_book->purchase?->totalAmount ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">{{ currency_format($day_book->purchase?->totalAmount ?? 0, currency: business_currency()) }}</td>
|
||||
@elseif ($day_book->platform == 'purchase_return')
|
||||
<td class="text-start">
|
||||
{{ currency_format($day_book->purchaseReturn?->purchase?->totalAmount ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">{{ currency_format($day_book->purchaseReturn?->purchase?->totalAmount ?? 0, currency: business_currency()) }}</td>
|
||||
@elseif ($day_book->platform == 'due_collect' || $day_book->platform == 'due_pay')
|
||||
<td class="text-start">
|
||||
{{ currency_format($day_book->dueCollect?->totalDue ?? 0, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start">{{ currency_format($day_book->dueCollect?->totalDue ?? 0, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td class="text-start">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$total_amount = match ($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
'purchase_return' => $day_book->purchaseReturn?->purchase?->totalAmount ?? 0,
|
||||
'due_collect', 'due_pay' => $day_book->dueCollect?->totalDue ?? 0,
|
||||
default => 0
|
||||
};
|
||||
@endphp
|
||||
|
||||
@if ($day_book->type === 'credit')
|
||||
<td class="text-start text-success">{{ currency_format($total_amount, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start text-success">{{ currency_format($day_book->amount, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td class="text-start">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
@if ($day_book->type === 'debit')
|
||||
<td class="text-start text-danger">{{ currency_format($day_book->amount, currency: business_currency()) }}
|
||||
</td>
|
||||
<td class="text-start text-danger">{{ currency_format($day_book->amount, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td class="text-start">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td class="text-start">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
@if ($day_book->payment_type_id)
|
||||
@@ -110,18 +87,7 @@
|
||||
|
||||
@php
|
||||
$page_total_amount = $day_books->sum(function ($day_book) {
|
||||
return match ($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
'purchase_return' => $day_book->purchaseReturn?->purchase?->totalAmount ?? 0,
|
||||
'due_collect', 'due_pay' => $day_book->dueCollect?->totalDue ?? 0,
|
||||
default => 0
|
||||
};
|
||||
});
|
||||
|
||||
$page_money_in_new = $day_books->where('type', 'credit')->sum(function ($day_book) {
|
||||
return match ($day_book->platform) {
|
||||
return match($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
@@ -149,4 +115,4 @@
|
||||
<td class="d-print-none"></td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
</table>
|
||||
|
||||
@@ -23,19 +23,19 @@
|
||||
<div class="col-lg-2 col-md-12 ">
|
||||
<div class="loss-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Total Transaction') }}</p>
|
||||
<p class="stat-value">{{ currency_format($total_amount, 'icon', 2, business_currency()) }}</p>
|
||||
<p class="stat-value" id="total_money_in_out_amount">{{ currency_format($total_money_in_out_amount, 'icon', 2, 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">{{ __('Money In') }}</p>
|
||||
<p class="stat-value">{{ currency_format($total_money_in, 'icon', 2, business_currency()) }}</p>
|
||||
<p class="stat-value" id="total_money_in">{{ currency_format($total_money_in, 'icon', 2, business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-2 col-md-6 ">
|
||||
<div class="sales-card p-3 m-2 text-white">
|
||||
<p class="stat-title">{{ __('Money Out') }}</p>
|
||||
<p class="stat-value">{{ currency_format($total_money_out, 'icon', 2, business_currency()) }}</p>
|
||||
<p class="stat-value" id="total_money_out">{{ currency_format($total_money_out, 'icon', 2, business_currency()) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -114,17 +114,17 @@
|
||||
<div class="table-top-btn-group d-print-none p-2">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ route('business.day-book-reports.csv') }}">
|
||||
<a class="export-btn" href="{{ route('business.day-book-reports.csv') }}">
|
||||
<img src="{{ asset('assets/images/logo/csv.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('business.day-book-reports.excel') }}">
|
||||
<a class="export-btn" href="{{ route('business.day-book-reports.excel') }}">
|
||||
<img src="{{ asset('assets/images/logo/excel.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a target="blank" href="{{ route('business.day-book-reports.pdf') }}">
|
||||
<a class="export-btn" target="_blank" href="{{ route('business.day-book-reports.pdf') }}">
|
||||
<img src="{{ asset('assets/images/logo/pdf.svg') }}" alt="">
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,19 @@
|
||||
<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="">{{ __('Day Book 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> --}}
|
||||
@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
|
||||
|
||||
@@ -54,31 +66,19 @@
|
||||
@elseif ($day_book->platform == 'due_collect' || $day_book->platform == 'due_pay')
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format($day_book->dueCollect?->totalDue ?? 0, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$total_amount = match($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
'purchase_return' => $day_book->purchaseReturn?->purchase?->totalAmount ?? 0,
|
||||
'due_collect', 'due_pay' => $day_book->dueCollect?->totalDue ?? 0,
|
||||
default => 0
|
||||
};
|
||||
@endphp
|
||||
|
||||
@if ($day_book->type === 'credit')
|
||||
<td style="border:1px solid gainsboro; text-align:center; color:green;">{{ currency_format($total_amount, currency: business_currency()) }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center; color:green;">{{ currency_format($day_book->amount, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
|
||||
@if ($day_book->type === 'debit')
|
||||
<td style="border:1px solid gainsboro; text-align:center; color:red;">{{ currency_format($day_book->amount, currency: business_currency()) }}</td>
|
||||
@else
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0, currency: business_currency()) }}</td>
|
||||
<td style="border:1px solid gainsboro; text-align:center;">{{ currency_format(0) }}</td>
|
||||
@endif
|
||||
|
||||
@if ($day_book->payment_type_id)
|
||||
@@ -102,17 +102,6 @@
|
||||
};
|
||||
});
|
||||
|
||||
$page_money_in_new = $day_books->where('type', 'credit')->sum(function ($day_book) {
|
||||
return match($day_book->platform) {
|
||||
'sale' => $day_book->sale?->totalAmount ?? 0,
|
||||
'sale_return' => $day_book->saleReturn?->sale?->totalAmount ?? 0,
|
||||
'purchase' => $day_book->purchase?->totalAmount ?? 0,
|
||||
'purchase_return' => $day_book->purchaseReturn?->purchase?->totalAmount ?? 0,
|
||||
'due_collect', 'due_pay' => $day_book->dueCollect?->totalDue ?? 0,
|
||||
default => 0
|
||||
};
|
||||
});
|
||||
|
||||
$page_money_in = $day_books->where('type', 'credit')->sum('amount');
|
||||
$page_money_out = $day_books->where('type', 'debit')->sum('amount');
|
||||
@endphp
|
||||
|
||||
Reference in New Issue
Block a user