@isset($txt) @php $filecontent=""; @endphp @foreach ($product as $item) @if ($item["Pedir"]>0) @php $plano= "1234"."\t".$item["codigo"]."\t".$item["nombre"]."\t".$item["Pedir"]."\n"; $filecontent= $filecontent.$plano; @endphp @endif @endforeach @php $downloadfile="plano.txt"; header("Content-disposition: attachment; filename=$downloadfile"); header("Content-Type: application/force-download"); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".strlen($filecontent)); header("Pragma: no-cache"); header("Expires: 0"); echo $filecontent; @endphp @else @isset($exportar) @php header("Cache-Control: maxage=1"); header("Pragma: public"); header('Content-type: application/vnd.ms-excel'); header("Content-Disposition: attachment; filename=Sugerido_De_Compra.xls"); header("Pragma: no-cache"); header("Expires: 0"); @endphp @endisset @isset($product) @foreach ($product as $item) @if ($item["Pedir"]>0 || $item["P_llegar"]>0 ) @endif @endforeach
codigo barras barras1 nombre Pedir totalRotado Pendiente LLegar inventario Costo_Compra Marca Categoria Bodega
{{$item["codigo"]}} {{$item["barras"]}} {{$item["barras2"]}} {{$item["nombre"]}} {{$item["Pedir"]}} {{round( $item["totalRotado"],2)}} {{$item["P_llegar"]}} {{$item["inventario"]}} {{$item["Costo_Compra"]}} {{$item["nommarca"]}} {{$item["nomcategoria"]}} {{$item["bodegaVenta"]}}
@endisset @endisset