@if(isset($data) && $data->count() > 0) @php $current_balance = $previous_balance; // الرصيد الابتدائي للصفحة @endphp
@php $total_before = 0; $total = 0; @endphp @foreach ($data as $product) @php $inside = in_array($product->type,[3,7,9]) ? $product->price_filtering : 0; $outside = !in_array($product->type,[3,7,9]) ? $product->price_filtering : 0; // الرصيد الحالي للصف // تحديث الرصيد للصف التالي $current_balance += $inside - $outside; $display_balance = $current_balance; // تحديث المجاميع للإجمالي $total_before += $inside; $total += $outside; @endphp {{-- نوع العملية --}} {{-- الحالة --}} {{-- الداخل --}} {{-- الخارج --}} {{-- الرصيد الحالي --}} {{-- العمليات --}} @endforeach
{{ __('home.no_liquidation') }} {{ __('users.username') }} {{ __('home.date') }} {{ __('home.branch') }} {{ __('home.type_liquition') }} {{ __('home.status_liquidation') }} {{ __('home.Historyـofـproductـsales') }} {{ __('home.amount_liquition') }} {{ __('home.current balance') }} {{ __('home.operations') }}
{{ $product->id }} {{ $product->user->name ?? '-' }} {{ $product->created_at }} {{ $product->branch->name ?? '-' }} @switch($product->type) @case(1){{ __('home.liquidation_shipments') }}@break @case(2){{ __('home.liquidation_purchase') }}@break @case(3){{ __('home.Historyـofـproductـsales') }}@break @case(7)@case(8){{ __('home.Daily_record') }}@break @case(9)@case(10){{ __('home.Opening_entry') }}@break @default - @endswitch @if($product->status == 1) {{ __('home.data_complete') }} @elseif($product->status == 2) {{ __('home.confirm_done') }} @elseif($product->status == 3) {{ __('home.pratiail_of_review') }} @endif {{ number_format($inside,2) }}{{ number_format($outside,2) }}{{ number_format($display_balance,2) }} {{-- Show --}} @if($product->type == 1) {{ __('home.show') }} @elseif($product->type == 2) {{ __('home.show') }} @endif {{-- Update --}} @if($product->type == 1 && $product->status != 2) {{ __('home.update_datials__liquidation') }} @elseif($product->type == 2 && $product->status == 1) {{ __('home.update_data_purchase') }} @endif {{-- Cancel Confirm و Delete --}} @if($product->status == 2 && Auth()->user()->branchs_id == 9) @if($product->type != 7) {{ __('home.cancel_confirm') }} @endif {{ __('home.delete') }} @endif {{-- Print للنوع 3 --}} @if($product->type == 3)
@csrf
@endif
@else
{{ __('home.notfounddata') }}
@endif