FIX: format
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
|
Reference in New Issue
Block a user