ລາຍງານລາງວັນ

@if($branchName)
ໂຮງຫວຍ: {{ $branchName }}
@endif @if($lotteryCorrect)
ເລກອອກ: {{ $lotteryCorrect }}
@endif @if($lotteryNo)
ງວດທີ: {{ $lotteryNo }}
@endif @if($unitName)
ໜ່ວຍ: {{ $unitName }}
@endif
ວັນທີ່ອອກລາຍງານ: {{ now()->format('d/m/Y H:i') }}
@php $totalAward1 = 0; $totalAward2 = 0; $totalAward3 = 0; $totalAward4 = 0; $totalAward5 = 0; $totalAward6 = 0; $grandTotalAwards = 0; $grandTotalTax = 0; @endphp @foreach($awards as $index => $award) @php $totalAwards = \App\Services\AwardCalculationService::calculateTotalAwards($award); $tax = \App\Services\AwardCalculationService::calculateTax($award); $totalAward1 += $award->award_price_1; $totalAward2 += $award->award_price_2; $totalAward3 += $award->award_price_3; $totalAward4 += $award->award_price_4; $totalAward5 += $award->award_price_5; $totalAward6 += $award->award_price_6; $grandTotalAwards += $totalAwards; $grandTotalTax += $tax; @endphp @endforeach
ລຳດັບ ລະຫັດເຄື່ອງ ຖືກ 1 ໂຕ ຖືກ 2 ໂຕ ຖືກ 3 ໂຕ ຖືກ 4 ໂຕ ຖືກ 5 ໂຕ ຖືກ 6 ໂຕ ລວມລາງວັນ ອາກອນ (5%)
{{ $index + 1 }} {{ $award->machine?->machineCode ?? 'N/A' }} {{ number_format($award->award_price_1, 0, ',', ',') }} {{ number_format($award->award_price_2, 0, ',', ',') }} {{ number_format($award->award_price_3, 0, ',', ',') }} {{ number_format($award->award_price_4, 0, ',', ',') }} {{ number_format($award->award_price_5, 0, ',', ',') }} {{ number_format($award->award_price_6, 0, ',', ',') }} {{ number_format($totalAwards, 0, ',', ',') }} {{ number_format($tax, 0, ',', ',') }}
ລວມທັງໝົດ {{ number_format($totalAward1, 0, ',', ',') }} {{ number_format($totalAward2, 0, ',', ',') }} {{ number_format($totalAward3, 0, ',', ',') }} {{ number_format($totalAward4, 0, ',', ',') }} {{ number_format($totalAward5, 0, ',', ',') }} {{ number_format($totalAward6, 0, ',', ',') }} {{ number_format($grandTotalAwards, 0, ',', ',') }} {{ number_format($grandTotalTax, 0, ',', ',') }}
ລວມລາງວັນທັງໝົດ: {{ number_format($grandTotalAwards, 0, ',', ',') }} ກີບ
ລວມອາກອນທັງໝົດ (5%): {{ number_format($grandTotalTax, 0, ',', ',') }} ກີບ
ຈຳນວນບິນລາງວັນ: {{ $awards->count() }} ບິນ
ບິນທີ່ຕ້ອງເສຍອາກອນ (>50M): {{ $awards->filter(fn($a) => \App\Services\AwardCalculationService::calculateTax($a) > 0)->count() }} ບິນ