AdvancePaymentRepository.php 787 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace AppBundle\Entity\Billing\Repository;
  3. use AppBundle\Entity\AccessAndFunction\Access;
  4. use AppBundle\Entity\Organization\Organization;
  5. use Doctrine\ORM\EntityRepository;
  6. /**
  7. * Class AdvancePaymentRepository
  8. */
  9. class AdvancePaymentRepository extends EntityRepository
  10. {
  11. public function findByAccessAndSchoolYear(Access $access, $schoolYear)
  12. {
  13. $qb = $this->createQueryBuilder('o');
  14. $qb
  15. ->andWhere('o.access =:access')
  16. ->andWhere('o.startSchoolYear = :schoolYear')
  17. ->andWhere('o.bill is null')
  18. //todo: PAS D'ACOMPTE NON PLUS !!!
  19. ->setParameter('access', $access)
  20. ->setParameter('schoolYear', $schoolYear)
  21. ;
  22. return $qb->getQuery()->getResult();
  23. }
  24. }
  25. ?>