finishing to dev
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 3m41s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Successful in 42s
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-14 22:50:44 +07:00
parent 2fabdf8fc9
commit 8307b9e66d
212 changed files with 2451 additions and 4493 deletions

View File

@@ -12,19 +12,7 @@
{{ __('Tax Report List') }}
@endif
</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
{{-- <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
@@ -41,12 +29,11 @@
@else
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Supplier') }}</th>
@endif
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Tax Number') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Payment Type') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Total Amount') }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ __('Discount') }}</th>
@foreach ($vats as $vat)
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ $vat->name . '@' . $vat->rate . '%' }}</th>
<th style="font-size:12px; border:1px solid gainsboro; color: white" class="text-start">{{ $vat->name }}</th>
@endforeach
</tr>
</thead>
@@ -63,9 +50,6 @@
<td style="border:1px solid gainsboro; text-align:center;">
{{ $sale->party?->name }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $sale->party?->tax_no }}
</td>
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none">
@if ($sale->transactions && $sale->transactions->isNotEmpty())
{{ $sale->transactions->map(function($transaction) {
@@ -89,21 +73,8 @@
{{ currency_format($sale->discountAmount, currency: business_currency()) }}
</td>
@foreach ($vats as $vat)
@php
// Product VAT
$productVat = $saleVatRowMap[$sale->id][$vat->id] ?? 0;
// Returned VAT
$returnVat = $saleReturnVatRowMap[$sale->id][$vat->id] ?? 0;
// Invoice VAT
$invoiceVat = ($sale->vat_id == $vat->id) ? $sale->vat_amount : 0;
// Final VAT
$totalVat = $productVat + $invoiceVat - $returnVat;
@endphp
<td style="border:1px solid gainsboro; text-align:center;">
{{ currency_format($totalVat, currency: business_currency()) }}
{{ $sale->vat_id == $vat->id ? currency_format($sale->vat_amount, currency: business_currency()) : '0' }}
</td>
@endforeach
</tr>
@@ -118,7 +89,6 @@
<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;"></td>
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
{{ currency_format($sales->sum('totalAmount'), currency: business_currency()) }}
</td>
@@ -126,13 +96,8 @@
{{ currency_format($sales->sum('discountAmount'), currency: business_currency()) }}
</td>
@foreach ($vats as $vat)
@php
$grandVatTotal = (($salesVatTotals[$vat->id] ?? 0)
- ($salesReturnVatTotals[$vat->id] ?? 0))
+ $sales->where('vat_id', $vat->id)->sum('vat_amount');
@endphp
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
{{ currency_format($grandVatTotal, currency: business_currency()) }}
{{ currency_format($salesVatTotals[$vat->id] ?? 0, currency: business_currency()) }}
</td>
@endforeach
</tr>
@@ -152,9 +117,6 @@
<td style="border:1px solid gainsboro; text-align:center;">
{{ $purchase->party?->name }}
</td>
<td style="border:1px solid gainsboro; text-align:center;">
{{ $purchase->party?->tax_no }}
</td>
<td style="border:1px solid gainsboro; text-align:center;" class="d-print-none">
@if ($purchase->transactions && $purchase->transactions->isNotEmpty())
{{ $purchase->transactions->map(function($transaction) {
@@ -178,21 +140,8 @@
{{ currency_format($purchase->discountAmount, currency: business_currency()) }}
</td>
@foreach ($vats as $vat)
@php
// Product level VAT
$productVat = $purchaseVatRowMap[$purchase->id][$vat->id] ?? 0;
// Returned VAT
$returnVat = $purchaseReturnVatRowMap[$purchase->id][$vat->id] ?? 0;
// Invoice level VAT
$invoiceVat = ($purchase->vat_id == $vat->id) ? $purchase->vat_amount : 0;
// Final VAT
$totalVat = $productVat + $invoiceVat - $returnVat;
@endphp
<td style="border:1px solid gainsboro; text-align:center;">
{{ currency_format($totalVat, currency: business_currency()) }}
{{ $purchase->vat_id == $vat->id ? currency_format($purchase->vat_amount, currency: business_currency()) : '0' }}
</td>
@endforeach
</tr>
@@ -207,7 +156,6 @@
<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;"></td>
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
{{ currency_format($purchases->sum('totalAmount'), currency: business_currency()) }}
</td>
@@ -215,13 +163,8 @@
{{ currency_format($purchases->sum('discountAmount'), currency: business_currency()) }}
</td>
@foreach ($vats as $vat)
@php
$grandVatTotal = (($purchasesVatTotals[$vat->id] ?? 0)
- ($purchaseReturnVatTotals[$vat->id] ?? 0))
+ $purchases->where('vat_id', $vat->id)->sum('vat_amount');
@endphp
<td style="border:1px solid gainsboro; text-align:center; color: white; font-weight: 600;">
{{ currency_format($grandVatTotal, currency: business_currency()) }}
{{ currency_format($purchasesVatTotals[$vat->id] ?? 0, currency: business_currency()) }}
</td>
@endforeach
</tr>