Quellcode durchsuchen

Repository OrderShop (findAllByDateStartEnd) + Assets custom

feature/export_comptable
Guillaume vor 4 Jahren
Ursprung
Commit
f384051766
5 geänderte Dateien mit 21 neuen und 6 gelöschten Zeilen
  1. +4
    -1
      ShopBundle/Controller/Admin/AdminController.php
  2. +1
    -1
      ShopBundle/Model/OrderShop.php
  3. +12
    -0
      ShopBundle/Repository/OrderShopRepository.php
  4. +3
    -3
      ShopBundle/Resources/views/backend/default/layout.html.twig
  5. +1
    -1
      ShopBundle/Services/OrderUtils.php

+ 4
- 1
ShopBundle/Controller/Admin/AdminController.php Datei anzeigen

@@ -10,6 +10,7 @@ use FOS\UserBundle\Model\UserManagerInterface;
use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface;
use Lc\ShopBundle\Context\MerchantInterface;
use Lc\ShopBundle\Context\MerchantUtilsInterface;
use Lc\ShopBundle\Context\OrderUtilsInterface;
use Lc\ShopBundle\Context\StatusInterface;
use Lc\ShopBundle\Context\TreeInterface;
use Lc\ShopBundle\Form\AbstractEditPositionType;
@@ -30,9 +31,10 @@ class AdminController extends EasyAdminController
protected $utils;
protected $merchantUtils ;
protected $mailjetTransport ;
protected $orderUtils ;

public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, Utils $utils,
MerchantUtilsInterface $merchantUtils, MailjetTransport $mailjetTransport)
MerchantUtilsInterface $merchantUtils, MailjetTransport $mailjetTransport, OrderUtilsInterface $orderUtils)
{
$this->security = $security;
$this->userManager = $userManager;
@@ -40,6 +42,7 @@ class AdminController extends EasyAdminController
$this->utils = $utils;
$this->merchantUtils = $merchantUtils ;
$this->mailjetTransport = $mailjetTransport ;
$this->orderUtils = $orderUtils ;
}

/**

+ 1
- 1
ShopBundle/Model/OrderShop.php Datei anzeigen

@@ -11,7 +11,7 @@ use Lc\ShopBundle\Context\FilterMerchantInterface;
/**
* @ORM\MappedSuperclass()
*/
abstract class OrderShop implements FilterMerchantInterface
abstract class OrderShop extends AbstractEntity implements FilterMerchantInterface
{

/**

+ 12
- 0
ShopBundle/Repository/OrderShopRepository.php Datei anzeigen

@@ -36,4 +36,16 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
return $query->getQuery()->getOneOrNullResult() ;
}

public function findAllByDateStartEnd($dateStart, $dateEnd)
{
$query = $this->findByMerchantQuery()
->andWhere('e.createdAt >= :dateStart')
->setParameter('dateStart', $dateStart)
->andWhere('e.createdAt <= :dateEnd')
->setParameter('dateEnd', $dateEnd)
;

return $query->getQuery()->getResult() ;
}

}

+ 3
- 3
ShopBundle/Resources/views/backend/default/layout.html.twig Datei anzeigen

@@ -31,9 +31,10 @@
{% endblock %}

{% block head_custom_stylesheets %}

<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/custom.css') }}">

{% for asset_css in easyadmin_config('design.assets.css') %}
<link rel="stylesheet" href="{{ asset(asset_css) }}">
{% endfor %}
{% endblock head_custom_stylesheets %}

{#
@@ -48,7 +49,6 @@
{% set favicon = easyadmin_config('design.assets.favicon') %}
<link rel="icon" type="{{ favicon.mime_type }}" href="{{ asset(favicon.path) }}"/>
{% endblock %}

</head>

{% block body %}

+ 1
- 1
ShopBundle/Services/OrderUtils.php Datei anzeigen

@@ -16,7 +16,7 @@ class OrderUtils
protected $security;
protected $userUtils;
protected $merchantUtils;
private $orderShopRepo;
protected $orderShopRepo;
protected $priceUtils ;
protected $productFamilyUtils ;


Laden…
Abbrechen
Speichern