تاريخ التقرير: {{ now()->format('Y-m-d') }} |
@if($from_date)
من: {{ $from_date }} |
@endif
إلى: {{ $to_date }} |
رصيد افتتاحي: {{ number_format($data['opening_balance'], 2) }}
| التاريخ |
النوع |
المرجع |
الوصف |
وارد |
صادر |
الرصيد |
@php $running_balance = $data['opening_balance']; @endphp
@foreach($data['movements'] as $movement)
@php $new_balance = $running_balance + $movement['quantity_change']; @endphp
| {{ $movement['date'] }} |
{{ $movement['type'] }} |
{{ $movement['reference_number'] }} |
{{ $movement['description'] }} |
{{ $movement['quantity_change'] > 0 ? number_format($movement['quantity_change'], 2) : '0' }}
|
{{ $movement['quantity_change'] < 0 ? number_format(abs($movement['quantity_change']), 2) : '0' }}
|
{{ number_format($new_balance, 2) }} |
@php $running_balance = $new_balance; @endphp
@endforeach
إجمالي الوارد: {{ number_format($data['summary']['total_in'] ?? 0, 2) }} |
إجمالي الصادر: {{ number_format($data['summary']['total_out'] ?? 0, 2) }} |
صافي التغيير: {{ number_format($data['summary']['net_change'] ?? 0, 2) }} |
رصيد ختامي: {{ number_format($data['closing_balance'], 2) }}
@if(!empty($data['compare']))
@php
$compare = $data['compare'];
$deltaIn = ($data['summary']['total_in'] ?? 0) - ($compare['total_in'] ?? 0);
$deltaOut = ($data['summary']['total_out'] ?? 0) - ($compare['total_out'] ?? 0);
$deltaNet = ($data['summary']['net_change'] ?? 0) - ($compare['net_change'] ?? 0);
@endphp
مقارنة الفترة:
الوارد: {{ number_format($compare['total_in'] ?? 0, 2) }} (فرق {{ number_format($deltaIn, 2) }}) |
الصادر: {{ number_format($compare['total_out'] ?? 0, 2) }} (فرق {{ number_format($deltaOut, 2) }}) |
صافي التغيير: {{ number_format($compare['net_change'] ?? 0, 2) }} (فرق {{ number_format($deltaNet, 2) }}) |
رصيد ختامي: {{ number_format($compare['closing_balance'] ?? 0, 2) }}
@endif