@php $ministry = ""; $direction = ""; $soeBrutIn = 0; $soeDepreIn = 0; $soeNetIn = 0; $soePuIn = 0; $soeQteIn = 1; $soeBrutOut = 0; $soeDepreOut = 0; $soeNetOut = 0; $soePuOut = 0; $soeQteOut = 0; @endphp @extends('templates.base.base_financial') @section('doc-name', "Livre journal des matières suivies au Bilan de l'Etat") @section('content')
@php if (count($data) > 1 ){ @endphp @foreach($data as $item) @php $addInfo = json_decode($data['additional_info']); $year = date('y', strtotime($data['period'])); $sumBrut = $data['FirstYearElapsedDepreciation']; $brut = $addInfo->unit_price;// - $data['FirstYearElapsedDepreciation']; $i = 1; $ministry = ucwords($addInfo->ministry); $direction = ucwords($addInfo->ministry); $soePuIn += $brut; $soeBrutIn += $brut; if($addInfo->type == "Sortie définitive"){ $soeBrutOut += $addInfo->unit_price; $soeDepreOut += $addInfo->depreciation; $soeNetOut += $addInfo->netCurrentValue; } $ministry = ucwords($addInfo->ministry); $direction = ucwords($addInfo->direction); $soePuIn += $addInfo->unit_price; $soeBrutIn += $addInfo->unit_price; $soeDepreIn += $addInfo->FirstYearElapsedDepreciation; $net = $addInfo->unit_price - $addInfo->FirstYearElapsedDepreciation; $soeNetIn += $net; @endphp @if($addInfo->type == "Sortie définitive") {{-- set value out property --}} @else @endif @endforeach @php }else if(count($data) == 1){ $ministry = ucwords($data["data"]["ministry"]); $direction = ucwords($data["data"]["direction"]); $soePuIn += $data["data"]["unit_price"]; $soeBrutIn += $data["data"]["unit_price"]; $soeDepreIn += $data["data"]["FirstYearElapsedDepreciation"]; $net = $data["data"]["unit_price"] - $data["data"]["FirstYearElapsedDepreciation"]; $soeNetIn += $net; @endphp @if($data["data"]["type"] == "Sortie définitive") {{-- set value out property --}} @php $soeBrutOut += $data["data"]["unit_price"]; $soePuOut += $data["data"]["unit_price"]; $soeDepreOut += $data["data"]["depreciation"]; $soeNetOut += $data["data"]["netCurrentValue"]; $soeQteOut += 1; @endphp @else @endif @php } @endphp @php $soeQteIn += 1; $soeQteOut += 1; @endphp
N° enregistrement Date Compte PCE Désignation bien Pour les entrées et dépréciations Sorties définitives
Codification Nature 1. P.U (TTC) Entrée Dépréciation Montant net (3-4) 5. P.U. 6. Qté. 7.Montant brut (5x6) 8.Dépréciation Montant net (7-8)
2. Qté. 3.Montant brut total (1x2) 4.Montant
{{$item->num_save}} {{date('d.m.y', strtotime($item->periodicity))}} {{$item->chart}} {{$item->code}} $item->label {{number_format($item->unit_price, 0, ',', ' ')}} 1 {{number_format($data["data"]["unit_price"]*1, 0, ',', ' ')}} {{number_format($data["data"]["FirstYearElapsedDepreciation"], 0, ',', ' ')}} {{number_format($net, 0, ',', ' ')}}{{number_format($addInfo->unit_price, 0, ',', ' ')}} 1 {{number_format($addInfo->unit_price, 0, ',', ' ')}} {{number_format($addInfo->depreciation, 0, ',', ' ')}} {{number_format($addInfo->netCurrentValue, 0, ',', ' ')}}
{{$data["data"]["num_save"]}} {{date('d.m.y', strtotime($data["data"]["periodicity"]))}} {{$data["data"]["chart"]}} {{$data["data"]["code"]}} {{$data["data"]["label"]}} {{number_format($data["data"]["unit_price"], 0, ',', ' ')}} 1 {{number_format($data["data"]["unit_price"]*1, 0, ',', ' ')}} {{number_format($data["data"]["FirstYearElapsedDepreciation"], 0, ',', ' ')}} {{number_format($net, 0, ',', ' ')}}{{number_format($data["data"]["unit_price"], 0, ',', ' ')}} 1 {{number_format($data["data"]["unit_price"], 0, ',', ' ')}} {{number_format($data["data"]["depreciation"], 0, ',', ' ')}} {{number_format($data["data"]["netCurrentValue"], 0, ',', ' ')}}
Total {{$soePuIn > 0 ? number_format($soePuIn, 0, ',', ' ') : ""}} {{$soeQteIn > 0 ? number_format($soeQteIn, 0, ',', ' ') : ""}} {{$soeBrutIn > 0 ? number_format($soeBrutIn, 0, ',', ' ') : ""}} {{$soeDepreIn > 0 ? number_format($soeDepreIn, 0, ',', ' ') : ""}} {{$soeNetIn > 0 ? number_format($soeNetIn, 0, ',', ' ') : ""}} {{$soePuOut > 0 ? number_format($soePuOut, 0, ',', ' ') : ""}} {{$soeQteOut > 0 ? number_format($soeQteOut, 0, ',', ' ') : ""}} {{$soeBrutOut > 0 ? number_format($soeBrutOut, 0, ',', ' ') : ""}} {{$soeDepreOut > 0 ? number_format($soeDepreOut, 0, ',', ' ') : ""}} {{$soeNetOut > 0 ? number_format($soeNetOut, 0, ',', ' ') : ""}}
@endsection @section('ministry', $ministry) @section('direction', $direction) {{--@section('actualUser', $header['actual_user'])--}} {{--@section('creator', $header['creator'])--}}