瀏覽代碼

Merge branch 'develop'

master
Guillaume Bourgeois 1 年之前
父節點
當前提交
9e5b4eb295
共有 1 個檔案被更改,包括 18 行新增0 行删除
  1. +18
    -0
      Repository/Order/OrderShopStore.php

+ 18
- 0
Repository/Order/OrderShopStore.php 查看文件

@@ -343,6 +343,24 @@ class OrderShopStore extends AbstractStore
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
public function getOneLastValid($query = null): ?OrderShopInterface
{

Loading…
取消
儲存