Informe tesoreria en excel
This commit is contained in:
@ -4,10 +4,12 @@ namespace Incoviba\Service\Contabilidad\Informe;
|
||||
use DateTimeInterface;
|
||||
use DateInterval;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use PhpOffice\PhpSpreadsheet;
|
||||
use Incoviba\Common\Ideal;
|
||||
use Incoviba\Common\Implement;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Model;
|
||||
use Incoviba\Repository;
|
||||
use Incoviba\Service;
|
||||
|
||||
class Tesoreria extends Ideal\Service
|
||||
{
|
||||
@ -16,7 +18,9 @@ class Tesoreria extends Ideal\Service
|
||||
protected Repository\Inmobiliaria\Cuenta $cuentaRepository,
|
||||
protected Repository\Deposito $depositoRepository,
|
||||
protected Repository\Cartola $cartolaRepository,
|
||||
protected Repository\Movimiento $movimientoRepository)
|
||||
protected Repository\Movimiento $movimientoRepository,
|
||||
protected Service\Contabilidad\Informe\Tesoreria\Excel $excelService,
|
||||
protected Service\Contabilidad\Informe\Tesoreria\PDF $pdfService)
|
||||
{
|
||||
parent::__construct($logger);
|
||||
|
||||
@ -123,8 +127,16 @@ class Tesoreria extends Ideal\Service
|
||||
}
|
||||
$informe['movimientos'] = $this->buildMovimientos();
|
||||
$informe['totales'] = $this->buildTotales();
|
||||
|
||||
//$this->buildInforme($fecha, $informe);
|
||||
|
||||
return $informe;
|
||||
}
|
||||
public function buildInforme(DateTimeInterface $fecha, array $data, string $type = 'Xlsx', ?string $filename = 'php://output'): void
|
||||
{
|
||||
$informe = $this->excelService->build($fecha, $data);
|
||||
$this->excelService->save($fecha, $informe, $type, $filename);
|
||||
}
|
||||
|
||||
protected function buildInmobiliaria(Model\Inmobiliaria $inmobiliaria, DateTimeInterface $fecha): object
|
||||
{
|
||||
@ -277,4 +289,5 @@ class Tesoreria extends Ideal\Service
|
||||
$this->totales->{$tipo} += $total;
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user