Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mpysiak committed Jun 27, 2024
1 parent e63896e commit a417b8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/Provider/DefaultDateProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ public function getDefaultStartDate(): \DateTime
{
$now = new \DateTime();

return $now
->modify('first day of -12 months');
return $now->modify('first day of -12 months');
}

public function getDefaultEndDate(): \DateTime
{
$now = new \DateTime();

return $now
->modify('last day of last month');
return $now->modify('last day of last month');
}
}
3 changes: 2 additions & 1 deletion src/Provider/GmvProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ private function findCurrenciesInOrders(\DateTimeInterface $periodStart, \DateTi
private function calculateGmvForPeriodAndCurrency(\DateTimeInterface $periodStart, \DateTimeInterface $periodEnd, string $currencyCode): int
{
$queryBuilder = $this->createCommonQueryBuilder($periodStart, $periodEnd);
$queryBuilder->andWhere('o.currencyCode = :currencyCode')
$queryBuilder
->andWhere('o.currencyCode = :currencyCode')
->setParameter('currencyCode', $currencyCode);

$totalItems = (int) $queryBuilder
Expand Down
1 change: 0 additions & 1 deletion tests/DataFixtures/sales_with_shipping_and_taxes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ Sylius\Component\Core\Model\Adjustment:
amount: 34500
neutral: false


Sylius\Component\Core\Model\Channel:
channel:
code: "CHANNEL"
Expand Down

0 comments on commit a417b8f

Please sign in to comment.