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 // eau (2) : 1 décimale, adjuvants (3), ajouts et autres : 2 décimales, sinon $defaut (null = valeur brute) $formatQte = function ($valeur, $type, $defaut = null, $sep = '') { $decimales = match ((int) $type) { 2 => 1, 3, \App\Services\pesee_pdf_service_v2::TYPE_AJOUT, \App\Services\pesee_pdf_service_v2::TYPE_AUTRE => 2, default => $defaut, }; return $decimales === null ? $valeur : number_format((float) $valeur, $decimales, '.', $sep); }; @endphp @foreach($produits as $produitConsigne) @endforeach @php $total = 0; $index_produit=0; @endphp @foreach($produits as $produitConsigne) @php // ImpPesee.cls (initcolonne) : la consigne théorique d'une colonne n'est // initialisée que depuis les lignes pesee_type_donnee=0. Les lignes de type 1 // (ajout manuel) ne portent jamais de consigne formule. $peseeConsigneFormule = \App\Models\Pesee::where('bl_id', $blId) ->where('produit_formule_id', $produitConsigne->produit_formule_id) ->where('pesee_type_donnee', 0) ->first(); $consigneFormule = $peseeConsigneFormule ? $peseeConsigneFormule->pesee_consigne : 0; $total += $consigneFormule * $produitConsigne->densite_mv; $index_produit++; $consigne_gachee = $consigneFormule * $volume_malaxeur; @endphp {{--Ici c'est la consigne x volume malaxeur de la gachée 1 --}} @endforeach @foreach($produits as $produitType) @php $type = 'AUTRE'; 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; case '5': $type = 'AUTRE2'; break; } if($peseesGenerale->centrale_pesee_impression_unite_bascule==1){ if($produitType->pesee_no_voie<9 || in_array((int) $produitType->produit_type, [\App\Services\pesee_pdf_service_v2::TYPE_AJOUT, \App\Services\pesee_pdf_service_v2::TYPE_AUTRE], true)){ $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_valeur_watt = \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??0; $produitsIds[$index]['cumul_consigne_reelle'] += $produitconsignereelle->pesee_consigne_reelle??0; $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(isset($produitDetail['pesee_acquitement_ht']) && $produitDetail['pesee_acquitement_ht']==1){ $pesee_acquitement_ht='#'; } $ecart=$produitsIds[$index]['consigne_reelle']!=0?number_format((floatval($produitsIds[$index]['resultat'])-floatval($produitsIds[$index]['consigne_reelle']))/floatval($produitsIds[$index]['consigne_reelle'])*100,2,'.',''):0; @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; $diviseurMoyenne = $totalGacheeVolumeReelle > 0 ? $totalGacheeVolumeReelle : 1; @endphp @foreach($produitsIds as $produitId) @php $moyenne = ($produitId['cumul_resultat'] / $diviseurMoyenne); $totalMoyenne += $moyenne * $produitId['densite_mv']; @endphp @endforeach @if($peseesGenerale->centrale_pesee_impression_ecart_total==1) @php $ecart_charge=0; @endphp @foreach($produitsIds as $produitId) @php $ecart_charge =$produitId['cumul_consigne_reelle']!=0? (($produitId['cumul_resultat']-$produitId['cumul_consigne_reelle'])/$produitId['cumul_consigne_reelle']*100 ):0; @endphp @endforeach @endif
Cons. formule (eau apport) {{ $formatQte($produitConsigne->pesee_type_donnee == 0 ? $produitConsigne->pesee_consigne : 0, $produitConsigne->produit_type) }} Masse Volumique
/Gachée : {{$volume_malaxeur}} m3{{ $formatQte($consigne_gachee, $produitConsigne->produit_type) }}{{ number_format($total, 1, '.', '') }}KG /m3
Gachée Hygrométrie{{ $type }}{{ $type }}
({{ $unite }})
NO HEUREVOLMALAXV WATT{{ $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_valeur_watt ? $tmpsMalax_valeur_watt->pesee_data_2 : '' }} s{{ $tmpsMalax_valeur_watt ? $tmpsMalax_valeur_watt->pesee_data_3 : '' }} %{{ $produitHygro ? number_format($produitHygro->pesee_data_1, 1, '.', '') : '' }}%{{$pesee_acquitement_ht}} {{ $formatQte($produitResultat, $produitType, 0) }}@if($peseesGenerale->centrale_pesee_impression_ecart_dosage==1)
{{$ecart}} %@endif
{{ number_format($ajoutEau, 1, '.', '') }} {{ number_format($hygrometrie, 1, '.', '') }}{{ $sicc ? $sicc->pesee_resultat : '' }}
@php $totalResultat = 0; foreach($produitsIds as $produitId) { $totalResultat += $produitId['cumul_resultat'] * $produitId['densite_mv']; } @endphp {{-- ImpPesee.cls (PUFimppes) : "Masse volumique réelle / volume réel des gâchées", et non le volume prévu du BL (bl_qte_livraison). --}} {{ number_format($totalResultat, 1, '.', ' ') }} / {{ number_format($totalGacheeVolumeReelle, 2, '.', ' ') }}m3 {{ $formatQte($produitId['cumul_resultat'], $produitId['produit_type']) }}{{ number_format($totalAjoutEau, 1, '.', '') }} {{ number_format($totalHygrometrie, 1, '.', '') }}
moyenne * {{ $formatQte($moyenne, $produitId['produit_type'], 0, ' ') }}{{ number_format($totalMoyenne, 1, '.', ' ') }} kg/m3
écart * {{ number_format($ecart_charge, 2, '.', ' ') }} %
* données calculées