Browse Source

Merge branch 'develop'

master
Guillaume Bourgeois 1 year ago
parent
commit
9e5b4eb295
1 changed files with 18 additions and 0 deletions
  1. +18
    -0
      Repository/Order/OrderShopStore.php

+ 18
- 0
Repository/Order/OrderShopStore.php View File

return $query->findOne(); return $query->findOne();
} }


public function getOneValidByDistributionAndUser(
DistributionInterface $distribution,
UserInterface $user,
$query = null
): ?OrderShopInterface
{
$query = $this->createDefaultQuery($query);

$query
->filterByDistribution($distribution)
->filterByUser($user)
->filterByStatus(OrderStatusModel::$statusAliasAsValid)
->filterIsNotComplementaryOrderShop()
->orderBy('.cycleId', 'DESC');

return $query->findOne();
}

//findLastOrderValid //findLastOrderValid
public function getOneLastValid($query = null): ?OrderShopInterface public function getOneLastValid($query = null): ?OrderShopInterface
{ {

Loading…
Cancel
Save