/**
  * Refresh sales invoiced report statistics for last day
  *
  * @return void
  */
 public function execute()
 {
     $this->localeResolver->emulate(0);
     $currentDate = $this->localeDate->date();
     $date = $currentDate->subHour(25);
     $this->invoicedFactory->create()->aggregate($date);
     $this->localeResolver->revert();
 }
 /**
  * Refresh sales invoiced report statistics for last day
  *
  * @return void
  */
 public function execute()
 {
     $this->localeResolver->emulate(0);
     $currentDate = $this->localeDate->date();
     $date = $currentDate->sub(new \DateInterval('PT25H'));
     $this->invoicedFactory->create()->aggregate($date);
     $this->localeResolver->revert();
 }
Пример #3
0
 /**
  * Refresh sales invoiced report statistics for last day
  *
  * @param \Magento\Cron\Model\Schedule $schedule
  * @return $this
  */
 public function aggregateSalesReportInvoicedData($schedule)
 {
     $this->_localeResolver->emulate(0);
     $currentDate = $this->_localeDate->date();
     $date = $currentDate->subHour(25);
     $this->_invoicedFactory->create()->aggregate($date);
     $this->_localeResolver->revert();
     return $this;
 }