added basic invoice rendering #97 #93 (#99)

This commit is contained in:
Kevin Papst
2018-01-21 22:50:46 +01:00
committed by GitHub
parent 9a161b8fd9
commit 4cbc5391c0
73 changed files with 2986 additions and 918 deletions

View File

@@ -15,6 +15,7 @@ use App\Entity\User;
use App\Entity\Activity;
use App\Entity\Timesheet;
use Doctrine\DBAL\Types\Type;
use Doctrine\ORM\QueryBuilder;
use Pagerfanta\Pagerfanta;
use App\Model\Statistic\Month;
use App\Model\Statistic\Year;
@@ -266,7 +267,7 @@ class TimesheetRepository extends AbstractRepository
/**
* @param TimesheetQuery $query
* @return Pagerfanta
* @return QueryBuilder|Pagerfanta
*/
public function findByQuery(TimesheetQuery $query)
{
@@ -291,6 +292,15 @@ class TimesheetRepository extends AbstractRepository
$qb->andWhere($qb->expr()->isNotNull('t.end'));
}
if ($query->getBegin() !== null) {
$qb->andWhere('t.begin >= :begin')
->setParameter('begin', $query->getBegin());
}
if ($query->getEnd() !== null) {
$qb->andWhere('t.end <= :end')
->setParameter('end', $query->getEnd());
}
if ($query->getActivity() !== null) {
$qb->andWhere('t.activity = :activity')
->setParameter('activity', $query->getActivity());