Browse Source

Repository OrderShop (findAllByDateStartEnd) + Assets custom

feature/export_comptable
Guillaume 4 years ago
parent
commit
f384051766
5 changed files with 21 additions and 6 deletions
  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 View File

use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface; use Lc\ShopBundle\Context\FilterMultipleMerchantsInterface;
use Lc\ShopBundle\Context\MerchantInterface; use Lc\ShopBundle\Context\MerchantInterface;
use Lc\ShopBundle\Context\MerchantUtilsInterface; use Lc\ShopBundle\Context\MerchantUtilsInterface;
use Lc\ShopBundle\Context\OrderUtilsInterface;
use Lc\ShopBundle\Context\StatusInterface; use Lc\ShopBundle\Context\StatusInterface;
use Lc\ShopBundle\Context\TreeInterface; use Lc\ShopBundle\Context\TreeInterface;
use Lc\ShopBundle\Form\AbstractEditPositionType; use Lc\ShopBundle\Form\AbstractEditPositionType;
protected $utils; protected $utils;
protected $merchantUtils ; protected $merchantUtils ;
protected $mailjetTransport ; protected $mailjetTransport ;
protected $orderUtils ;


public function __construct(Security $security, UserManagerInterface $userManager, EntityManagerInterface $em, Utils $utils, 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->security = $security;
$this->userManager = $userManager; $this->userManager = $userManager;
$this->utils = $utils; $this->utils = $utils;
$this->merchantUtils = $merchantUtils ; $this->merchantUtils = $merchantUtils ;
$this->mailjetTransport = $mailjetTransport ; $this->mailjetTransport = $mailjetTransport ;
$this->orderUtils = $orderUtils ;
} }


/** /**

+ 1
- 1
ShopBundle/Model/OrderShop.php View File

/** /**
* @ORM\MappedSuperclass() * @ORM\MappedSuperclass()
*/ */
abstract class OrderShop implements FilterMerchantInterface
abstract class OrderShop extends AbstractEntity implements FilterMerchantInterface
{ {


/** /**

+ 12
- 0
ShopBundle/Repository/OrderShopRepository.php View File

return $query->getQuery()->getOneOrNullResult() ; 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 View File

{% endblock %} {% endblock %}


{% block head_custom_stylesheets %} {% block head_custom_stylesheets %}

<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/custom.css') }}"> <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 %} {% endblock head_custom_stylesheets %}


{# {#
{% set favicon = easyadmin_config('design.assets.favicon') %} {% set favicon = easyadmin_config('design.assets.favicon') %}
<link rel="icon" type="{{ favicon.mime_type }}" href="{{ asset(favicon.path) }}"/> <link rel="icon" type="{{ favicon.mime_type }}" href="{{ asset(favicon.path) }}"/>
{% endblock %} {% endblock %}

</head> </head>


{% block body %} {% block body %}

+ 1
- 1
ShopBundle/Services/OrderUtils.php View File

protected $security; protected $security;
protected $userUtils; protected $userUtils;
protected $merchantUtils; protected $merchantUtils;
private $orderShopRepo;
protected $orderShopRepo;
protected $priceUtils ; protected $priceUtils ;
protected $productFamilyUtils ; protected $productFamilyUtils ;



Loading…
Cancel
Save