Centrale : {{ $peseesGenerale->centrale_code }} {{ $peseesGenerale->centrale_nom }}
@if($peseesGenerale->centrale_pesee_impression_info_bl==1) {{-- si impression information BL--}}
BL No : OF No : Formule : {{ $peseesGenerale->formule_code }} Client : {{ $peseesGenerale->client_code }} Chantier : {{ $peseesGenerale->chantier_code }}
{{ $peseesGenerale->bl_code }} {{ $peseesGenerale->pesee_no_exec }} {{ date('d/m/Y', strtotime($peseesGenerale->pesee_date)) }} {{ $peseesGenerale->formule_app_commerciale }} {{ $peseesGenerale->client_nom }} {{ $peseesGenerale->chantier_nom }}

@endif @php $rs_vol_mlx = \App\Models\Pesee::where('bl_id', $blId) ->where('pesee_no_gachee', 1) ->where('pesee_type_donnee', 4) ->first(); $volume_malaxeur=$rs_vol_mlx ? $rs_vol_mlx->pesee_data_1 : 0; //on récupère le volume malaxeur de la première gachée @endphp @foreach($produits as $produitConsigne) @endforeach @php $total = 0; $index_produit=0; @endphp @foreach($produits as $produitConsigne) @php $peseeConsigneReelle = \App\Models\Pesee::where('bl_id', $blId) ->where('produit_formule_id', $produitConsigne->produit_formule_id) ->whereIn('pesee_type_donnee', [0, 1]) ->first(); //$total += $peseeConsigneReelle ? $peseeConsigneReelle->pesee_consigne_reelle : 0; $total += $peseeConsigneReelle ? $peseeConsigneReelle->pesee_consigne : 0; // on met pesee_consigne car c'est masse volumique pou 1 m3 //$produitsIds[$index_produit]['consigne_reelle']= $peseeConsigneReelle->pesee_consigne_reelle; $index_produit++; $consigne_gachee=$produitConsigne->pesee_consigne*$volume_malaxeur; @endphp {{--Ici c'est la consigne x volume malaxeur de la gachée 1 --}} {{-- --}} @endforeach @foreach($produits as $produitType) @php switch ($produitType->produit_type) { case '0': $type = 'GRA'; break; case '1': $type = 'LIANTS'; break; case '2': $type = 'EAU'; break; case '3': $type = 'ADJUV'; break; case '4': $type = 'COLOR'; break; } if($peseesGenerale->centrale_pesee_impression_unite_bascule==1){ if($produitType->pesee_no_voie<9){ $unite='Kg'; }else{ $unite='l'; } }else{ $unite=''; } @endphp @if($unite=='') @else @endif @endforeach @if($peseesGenerale->centrale_pesee_impression_vol_mx==1) @else @endif @foreach($produitsGranulat as $produitGranulat) @endforeach @foreach($produits as $produit) @endforeach @php $totalHygrometrie = 0; $totalAjoutEau = 0; @endphp @foreach($nombreGachees as $nombreGachee) @php $hygrometrie = 0; $ajoutEau = 0; @endphp @php $heureGachee = \App\Models\Pesee::where('bl_id', $blId) ->where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('pesee_type_donnee', 4) ->first(); @endphp @php $tmpsMalax = \App\Models\Pesee::where('bl_id', $blId) ->where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('pesee_type_donnee', 5) ->first(); @endphp @if($peseesGenerale->centrale_pesee_impression_vol_mx==1) {{--impression volume gachée--}} @else {{--impression temps de malaxage--}} @endif @foreach($produitsGranulatIds as $produitGranulatId) @php $produitHygro = \App\Models\Pesee::where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('bl_id', $blId) ->where('pesee_type_donnee', 0) ->where('produit_formule_id', $produitGranulatId) ->first(); @endphp @endforeach @php $ecart=0; @endphp @foreach($produitsIds as $index => $produitIdInfo) @php $pesee_acquitement_ht=''; $produitId = $produitIdInfo['produit_id']; $produitType = $produitIdInfo['produit_type']; $produitResultat = \App\Models\Pesee::where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('bl_id', $blId) ->whereIn('pesee_type_donnee', [0, 1]) ->where('produit_formule_id', $produitId) ->sum('pesee_resultat'); $produitsIds[$index]['resultat'] = $produitResultat; $produitsIds[$index]['cumul_resultat'] += $produitResultat; $produitconsignereelle = \App\Models\Pesee::where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('bl_id', $blId) ->whereIn('pesee_type_donnee', [0, 1]) ->where('produit_formule_id', $produitId) ->first(); //->sum('pesee_consigne_reelle'); // pas faire de sum car sinon fait cumul sur eau $produitsIds[$index]['consigne_reelle'] = $produitconsignereelle->pesee_consigne_reelle; $produitsIds[$index]['cumul_consigne_reelle'] += $produitconsignereelle->pesee_consigne_reelle; $produitDetail = \App\Models\Pesee::where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('bl_id', $blId) ->whereIn('pesee_type_donnee', [0, 1]) ->where('produit_formule_id', $produitId) ->first(); if($produitType == 2 && $produitDetail) { $ajoutEau = $produitDetail->pesee_data_2; $hygrometrie = $produitDetail->pesee_data_1; $totalHygrometrie += $hygrometrie; $totalAjoutEau += $ajoutEau; } if($produitDetail['pesee_acquitement_ht']==1){ $pesee_acquitement_ht='#'; } $ecart=number_format((floatval($produitsIds[$index]['resultat'])-floatval($produitsIds[$index]['consigne_reelle']))/floatval($produitsIds[$index]['consigne_reelle'])*100,2,'.',''); @endphp @endforeach @php $sicc = \App\Models\Pesee::where('bl_id', $blId) ->where('pesee_no_gachee', $nombreGachee->pesee_no_gachee) ->where('pesee_type_donnee', 8) ->first(); @endphp @endforeach @foreach($produitsIds as $produitId) @endforeach @php $totalMoyenne = 0; @endphp @foreach($produitsIds as $produitId) @php $moyenne = ($produitId['cumul_resultat'] / $peseesGenerale->bl_qte_livraison); $totalMoyenne += $moyenne; @endphp @endforeach @if($peseesGenerale->centrale_pesee_impression_ecart_total==1) @php $ecart_charge=0; @endphp @foreach($produitsIds as $produitId) @php $ecart_charge = (($produitId['cumul_resultat']-$produitId['cumul_consigne_reelle'])/$produitId['cumul_consigne_reelle']*100 ); @endphp @endforeach {{-- --}} @endif
Cons. formule (eau apport){{ $produitConsigne->pesee_consigne }}Masse Volumique
/Gachée : {{$volume_malaxeur}} m3{{ $produitConsigne->pesee_consigne }}*{{$volume_malaxeur}}{{ $consigne_gachee }}{{ $total }}KG /m3
Gachée Hygrométrie{{ $type }}{{ $type }}
({{ $unite }})
NO HEUREVOLMALAX{{ $produitGranulat->produit_code_execution }}{{ $produit->produit_code_execution }}+/- HYGR SICC.
{{ $nombreGachee->pesee_no_gachee }}{{ $heureGachee ? date('H:i', strtotime($heureGachee->pesee_heure)) : '' }}{{ $heureGachee ? $heureGachee->pesee_data_1 : '' }} m3{{ $tmpsMalax ? $tmpsMalax->pesee_data_2 : '' }} s{{ $produitHygro ? number_format($produitHygro->pesee_data_1, 1, '.', '') : '' }}%{{$pesee_acquitement_ht}} {{ $produitType != 3 ? number_format($produitResultat, 0, '.', '') : number_format($produitResultat, 2, '.', '') }}@if($peseesGenerale->centrale_pesee_impression_ecart_dosage==1)
{{$ecart}} %@endif
{{ number_format($ajoutEau, 1, '.', '') }} {{ number_format($hygrometrie, 0, '.', '') }}{{ $sicc ? $sicc->pesee_resultat : '' }}
@php $totalResultat = 0; foreach($produitsIds as $produitId) { $totalResultat += $produitId['resultat']; } @endphp {{ number_format($totalResultat, 1, '.', ' ') }}/{{ number_format($peseesGenerale->bl_qte_livraison, 2, '.', ' ') }}m3 {{ $produitId['cumul_resultat'] }}{{ number_format($totalAjoutEau, 1, '.', '') }} {{ number_format($totalHygrometrie, 0, '.', '') }}
moyenne * {{ number_format($moyenne, 0, '.', ' ') }}{{ number_format($totalMoyenne, 1, '.', ' ') }} kg/m3
écart * {{ number_format($ecart_charge, 2, '.', ' ') }} %{{ number_format($totalMoyenne, 1, '.', ' ') }} kg/m3
* données calculées