update marketing
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 11:55:22 +07:00
parent f80fcc4c1b
commit 05fd3230b8
448 changed files with 17545 additions and 5128 deletions

View File

@@ -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