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

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