@foreach ($valuet as $key4=>$value4)
@php
$montoFinal += $value4['total']
@endphp
{{$key4}}
INGRESO
@foreach ($value4['data'] as $key2=>$value2)
{{$key2}}
# |
NRO GUIA |
SERIE/NUMERO |
CLIENTE |
MONTO |
@php
$row = 1;
@endphp
@for ($key3 = 0; $key3 < sizeof($value2['registros']); $key3++)
@php
$next = false;
if ($key3 > 0) {
$facturaIte = $value2['registros'][$key3]['id_cp'];
if ($facturaIte != $ultimaFactura) {
$monto = $montoAcumulado;
$ultimaFactura = $value2['registros'][$key3]['id_cp'];
$key3--;
$montoAcumulado = 0;
$next = true;
}else {
if ($key3 == sizeof($value2['registros'])-1) {
$monto = $value2['registros'][$key3]['monto'] + $montoAcumulado;
$montoAcumulado = 0;
$next = true;
}else{
$montoAcumulado += $value2['registros'][$key3]['monto'];
}
}
}else {
if($key3==0 && sizeof($value2['registros'])==1){
$next = true;
$monto = $value2['registros'][$key3]['monto'];
}else{
$ultimaFactura = $value2['registros'][$key3]['id_cp'];
$montoAcumulado += $value2['registros'][$key3]['monto'];
}
}
@endphp
@if ($next)
{{$row++}} |
{{$value2['registros'][$key3]['guias'][0]['numero_guia']}} |
{{$value2['registros'][$key3]['serie_comprobante']}}/{{$value2['registros'][$key3]['numero_comprobante']}} |
{{$value2["registros"][$key3]["cliente_razon_social"]}} |
S/. {{$monto}} |
@endif
@endfor
|
|
|
MONTO: |
S/. {{$value2['subtotal']}} |
@endforeach
@endforeach
# |
NRO GUIA |
SERIE/NUMERO |
CLIENTE |
MONTO |
|
|
|
MONTO FINAL: |
S/. {{$montoFinal}} |
@php
$montoFinal = 0;
$countDataTable++;
if(count($data_table)!=$countDataTable){
$pageBreak = "page_break";
}else{
$pageBreak = "";
}
@endphp