@php const UNIT_TYPE_ID_GLL = 'GLL'; // solo se considera cpe y nv $group_items = $documents->whereIn('record_type', ['document_item', 'sale_note_item']) ->where('unit_type_id', UNIT_TYPE_ID_GLL) ->groupBy('description'); @endphp
# | Producto | {{ UNIT_TYPE_ID_GLL }} | Importe |
---|---|---|---|
{{ $loop->iteration }} | {{ $item_description }} | {{ $row->sum(function($item){return $item['quantity'];}) }} | {{ $row->sum(function($item){return $item['total'];}) }} |