diff --git a/app/Service/Informe/Contabilidad/Resumen.php b/app/Service/Informe/Contabilidad/Resumen.php index 85f53f8..0d39df0 100644 --- a/app/Service/Informe/Contabilidad/Resumen.php +++ b/app/Service/Informe/Contabilidad/Resumen.php @@ -126,20 +126,20 @@ class Resumen protected function buildLibro(Venta $venta, DateTimeInterface $up_to) { $pagos = $this->getPagos($venta, $up_to); - $output = [";Cuenta: Anticipos Dpto {$venta->unidad()->descripcion}"]; + $output = ['', "Cuenta: Anticipos Dpto {$venta->unidad()->descripcion}"]; $debe = 0; $haber = 0; foreach ($pagos as $pago) { if ($pago->valor > 0) { - $output []= implode($this->separator, ['', $pago->fecha->format('d/m/Y'), '', $this->formatValue($pago->valor)]); + $output []= ['', $pago->fecha->format('d/m/Y'), '', $this->formatValue($pago->valor)]; $debe += $pago->valor; } else { - $output []= implode($this->separator, ['', $pago->fecha->format('d/m/Y'), $this->formatValue(-$pago->valor), '']); + $output []= ['', $pago->fecha->format('d/m/Y'), $this->formatValue(-$pago->valor), '']; $haber -= $pago->valor; } } - $output []= implode($this->separator, ['', '', $haber, $debe]); + $output []= ['', '', $haber, $debe]; return $output; } diff --git a/app/Service/Informe/Informe.php b/app/Service/Informe/Informe.php index fac7ad3..25660b1 100644 --- a/app/Service/Informe/Informe.php +++ b/app/Service/Informe/Informe.php @@ -20,7 +20,7 @@ class Informe public function send(string $filename) { header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); - header("Content-Disposition: attachment;filename='{$filename}'"); + header("Content-Disposition: attachment;filename=\"{$filename}\""); header('Cache-Control: max-age=0'); $writer = IOFactory::createWriter($this->spreadsheet, 'Xlsx');