2024-06-18

This commit is contained in:
Juan Pablo Vial
2024-06-18 22:41:03 -04:00
parent 6169089475
commit 390e79ad6d
60 changed files with 3162 additions and 155 deletions

View File

@ -0,0 +1,36 @@
<?php
namespace Incoviba\Service\Contabilidad\Informe;
use DateTimeInterface;
use DateInterval;
use Psr\Log\LoggerInterface;
use Incoviba\Common\Ideal;
use Incoviba\Repository;
use Incoviba\Service;
class Semanal extends Ideal\Service
{
public function __construct(LoggerInterface $logger, protected Repository\Inmobiliaria $repositoryRepository,
protected Service\Inmobiliaria\Cuenta $cuentaService,
protected Repository\Contabilidad\Deposito $depositoRepository,
protected Service\Contabilidad\Cartola $cartolaService,
protected Service\Contabilidad\Movimiento $movimientoService,
protected Service\Contabilidad\Informe\Tesoreria\Excel $excelService,
protected Service\Contabilidad\Informe\Tesoreria\PDF $pdfService)
{
parent::__construct($logger);
}
public function getAnterior(DateTimeInterface $fecha): DateTimeInterface
{
if (!isset($this->anterior)) {
$this->anterior = $fecha->sub(new DateInterval('P1D'));
if ($this->anterior->format('N') === '7') {
$this->anterior = $fecha->sub(new DateInterval('P3D'));
}
}
return $this->anterior;
}
public function build(DateTimeInterface $fecha): array
{}
}