예제 #1
0
 /**
  * @return array
  */
 public function getTasks()
 {
     $tasks = [];
     $taxDeclarationPeriod = new Period(new \DateTime('1.01.' . $this->criteria->getYear()), (new \DateTime('1.01.' . $this->criteria->getYear()))->add(new \DateInterval(sprintf('P%d%s', $this->during, $this->type))));
     if ($this->criteria->getPeriod()->isCrossWithPeriod($taxDeclarationPeriod)) {
         $tasks[] = $this->generator->generate($this->criteria->getYear(), $taxDeclarationPeriod);
     }
     return $tasks;
 }
예제 #2
0
 /**
  * @return array
  */
 public function getTasks()
 {
     $tasks = [];
     $interval = new \DateInterval('P1M');
     $range = new \DatePeriod($this->criteria->getPeriod()->getFrom(), $interval, $this->criteria->getPeriod()->getTo());
     foreach ($range as $date) {
         $period = new Period($date, (new \DateTime($date->format('d.m.Y')))->add(new \DateInterval(sprintf('P%d%s', $this->during, $this->type))));
         $tasks[] = $this->generator->generate($this->criteria->getYear(), $period);
     }
     return $tasks;
 }
예제 #3
0
 /**
  * @return array
  */
 public function getTasks()
 {
     $tasks = [];
     if ($this->criteria->getPeriod()->isCrossWithPeriod($this->getFirstQuarterPaymentPeriod())) {
         $tasks[] = $this->generator->generate(1, $this->criteria->getYear(), $this->getFirstQuarterPaymentPeriod());
     }
     if ($this->criteria->getPeriod()->isCrossWithPeriod($this->getSecondQuarterPaymentPeriod())) {
         $tasks[] = $this->generator->generate(2, $this->criteria->getYear(), $this->getSecondQuarterPaymentPeriod());
     }
     if ($this->criteria->getPeriod()->isCrossWithPeriod($this->getThirdQuarterPaymentPeriod())) {
         $tasks[] = $this->generator->generate(3, $this->criteria->getYear(), $this->getThirdQuarterPaymentPeriod());
     }
     if ($this->criteria->getPeriod()->isCrossWithPeriod($this->getFourthQuarterPaymentPeriod())) {
         $tasks[] = $this->generator->generate(4, $this->criteria->getYear(), $this->getFourthQuarterPaymentPeriod());
     }
     return $tasks;
 }