feat : ajout de l'export récap. salaire
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Bonus;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
@@ -17,4 +18,21 @@ final class BonusRepository extends ServiceEntityRepository
|
||||
{
|
||||
parent::__construct($registry, Bonus::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Bonus[]
|
||||
*/
|
||||
public function findByMonth(DateTimeImmutable $from, DateTimeImmutable $to): array
|
||||
{
|
||||
return $this->createQueryBuilder('b')
|
||||
->andWhere('b.month >= :from')
|
||||
->andWhere('b.month <= :to')
|
||||
->setParameter('from', $from)
|
||||
->setParameter('to', $to)
|
||||
->innerJoin('b.employee', 'e')
|
||||
->addSelect('e')
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,21 @@ final class EmployeeRttPaymentRepository extends ServiceEntityRepository
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EmployeeRttPayment[]
|
||||
*/
|
||||
public function findByYearAndMonth(int $year, int $month): array
|
||||
{
|
||||
return $this->createQueryBuilder('p')
|
||||
->andWhere('p.year = :year')
|
||||
->andWhere('p.month = :month')
|
||||
->setParameter('year', $year)
|
||||
->setParameter('month', $month)
|
||||
->innerJoin('p.employee', 'e')
|
||||
->addSelect('e')
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\MileageAllowance;
|
||||
use DateTimeImmutable;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
@@ -17,4 +18,21 @@ final class MileageAllowanceRepository extends ServiceEntityRepository
|
||||
{
|
||||
parent::__construct($registry, MileageAllowance::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MileageAllowance[]
|
||||
*/
|
||||
public function findByMonth(DateTimeImmutable $from, DateTimeImmutable $to): array
|
||||
{
|
||||
return $this->createQueryBuilder('m')
|
||||
->andWhere('m.month >= :from')
|
||||
->andWhere('m.month <= :to')
|
||||
->setParameter('from', $from)
|
||||
->setParameter('to', $to)
|
||||
->innerJoin('m.employee', 'e')
|
||||
->addSelect('e')
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user