@extends('layouts.app') @section('content')
Livre de caisse
@php $cumul_debit = 0; $cumul_credit = 0; @endphp @foreach ($livres as $livre) @php $cumul_debit += $livre->debit; $cumul_credit += $livre->credit; // $solde = $livre->solde_before + $livre->debit -$livre->credit @endphp @endforeach @php $sum_in = 0; $sum_out = 0; $solde_final = 0; if(!empty($sumLivre->employe_id)){ $sum_in = $sumLivre->debit; $sum_out = $sumLivre->credit; $solde_final = $report->solde + $sum_in - $sum_out; } @endphp
Date Désignation Mobile N° tél./Code marchant Entrées Sorties Solde
REPORT DU {{(new DateTime($report->date_report))->format(config('myahs')['date_format'])}} {{App\Lib\Format::number($report->solde)}}
{{(new DateTime($livre->date_oper))->format(config('myahs.date_format'))}} {{$livre->designation}} @php $text_mobile = 'text-orange-600'; if($livre->mobile == '34'){ $text_mobile = 'text-green-600'; } if($livre->mobile == '33'){ $text_mobile = 'text-red-700'; } @endphp {{key_exists($livre->mobile, $mobiles)?$mobiles[$livre->mobile]:''}} {{$livre->phone}} {{App\Lib\Format::number($livre->debit)}} {{App\Lib\Format::number($livre->credit)}} {{App\Lib\Format::number($livre->solde)}}
{{App\Lib\Format::number($sum_in)}} {{App\Lib\Format::number($sum_out)}} {{App\Lib\Format::number($solde_final)}}
@if(!empty($livres)) @endif
@endsection @section('script') @endsection