Compare commits
2 Commits
bc8aa02236
...
1e2bd617fa
Author | SHA1 | Date | |
---|---|---|---|
1e2bd617fa | |||
62e7001fba |
@ -69,18 +69,7 @@ return [
|
||||
$container->get(Psr\Log\LoggerInterface::class),
|
||||
$container->get(Incoviba\Repository\Contabilidad\Nubox::class),
|
||||
$container->get(Incoviba\Service\Redis::class),
|
||||
new GuzzleHttp\Client([
|
||||
'defaults' => [
|
||||
'config' => [
|
||||
'curl' => [
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_SSL_VERIFYPEER => false,
|
||||
CURLOPT_SSL_VERIFYHOST => false
|
||||
]
|
||||
]
|
||||
]
|
||||
]),
|
||||
new GuzzleHttp\Client(),
|
||||
$container->get(Psr\Http\Message\RequestFactoryInterface::class),
|
||||
$container->get('nubox')->get('url'));
|
||||
},
|
||||
|
@ -33,7 +33,7 @@ class Terreno extends Ideal\Service
|
||||
try {
|
||||
$proyecto = $this->proyectoRepository->fetchById($proyecto_id);
|
||||
$today = new DateTimeImmutable();
|
||||
$lastDecember = (new DateTimeImmutable($today->format('Y-01-01')));
|
||||
$lastDecember = (new DateTimeImmutable($today->format('Y-01-01')))->sub(new DateInterval('P1M'));
|
||||
if ($proyecto->terreno->fecha >= $lastDecember) {
|
||||
return $proyecto->terreno;
|
||||
}
|
||||
|
Reference in New Issue
Block a user