浏览代码

[Global] Bons cadeaux

feature/module_traiteur_v1
Fab 4 年前
父节点
当前提交
8c56bc7865
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. +1
    -2
      ShopBundle/Form/Frontend/SendGiftVoucherType.php
  2. +3
    -0
      ShopBundle/Repository/ReductionCreditRepository.php

+ 1
- 2
ShopBundle/Form/Frontend/SendGiftVoucherType.php 查看文件

@@ -32,8 +32,7 @@ class SendGiftVoucherType extends AbstractType

$builder->add('activationDate', DateType::class, [
'label' => 'Date d\'activation de votre bon cadeau',
'widget'=> 'single_text',
'mapped'=> false,
'widget'=> 'single_text'
])
->add('title', TextType::class, [
'label' => 'Nom de votre bon cadeau'

+ 3
- 0
ShopBundle/Repository/ReductionCreditRepository.php 查看文件

@@ -39,6 +39,9 @@ class ReductionCreditRepository extends BaseRepository implements DefaultReposit
$query->andWhere('e.status = 1');
$query->andWhere('e.type = :type');
$query->andWhere(':user MEMBER OF e.users');
$query->andWhere(':now > e.activationDate');
$query->setParameter('now', new \DateTime()) ;

$query->setParameter('user', $user);
$query->setParameter('type', ReductionCredit::TYPE_GIFT);
return $query->getQuery()->getResult() ;

正在加载...
取消
保存