return $this->getAddress() . ' - ' . $this->getZip() . ' ' . $this->getCity(); | return $this->getAddress() . ' - ' . $this->getZip() . ' ' . $this->getCity(); | ||||
} | } | ||||
public function getSummary() | |||||
public function getSummary($withTitle = true) | |||||
{ | { | ||||
$html = ''; | $html = ''; | ||||
if ($this->getTitle()) { | |||||
if ($this->getTitle() && $withTitle) { | |||||
$html .= $this->getTitle() . '<br />'; | $html .= $this->getTitle() . '<br />'; | ||||
} | } | ||||
documents: Documents | documents: Documents | ||||
selectUser: Sélectionner un utilisateur | selectUser: Sélectionner un utilisateur | ||||
deliveryAddress: Adresse de livraison | deliveryAddress: Adresse de livraison | ||||
complementary: Commandes complémentaires | |||||
tickets: Tickets relatif à la commande | |||||
Ticket: | Ticket: | ||||
listMessages: Liste des messages | listMessages: Liste des messages | ||||
PointSale: | PointSale: | ||||
weekNumber: Numéro de semaine | weekNumber: Numéro de semaine | ||||
deliveryAvailabilityPointSale: Choix du créneau | deliveryAvailabilityPointSale: Choix du créneau | ||||
deliveryAvailabilityZone: Choix du créneau | deliveryAvailabilityZone: Choix du créneau | ||||
mainOrder: "Complément à la commande :" | |||||
UserMerchant: | UserMerchant: | ||||
credit: Solde du compte prépayé | credit: Solde du compte prépayé | ||||
CreditHistory: | CreditHistory: |
{% macro box_main_order() %} | {% macro box_main_order() %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{{ macros.box_info('bg-info', 'basket',"field.OrderShop.mainOrder"|trans({}, 'lcshop'), '${order.mainOrder}') }} | |||||
{% set value = '${order.mainOrder.reference} <a :href="order.mainOrder.link">[Afficher]</a>' %} | |||||
{{ macros.box_info('bg-danger', 'link',"field.OrderShop.mainOrder"|trans({}, 'lcshop'), value) }} | |||||
{% endmacro %} | {% endmacro %} | ||||
{% macro box_complementary() %} | {% macro box_complementary() %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{{ macros.card_start("OrderShop.complementary", 'bg-outline-primary') }} | |||||
{{ macros.card_start("OrderShop.complementary", 'primary card-outline') }} | |||||
<table class="table table-striped"> | <table class="table table-striped"> | ||||
<tbody> | <tbody> | ||||
<thead> | <thead> | ||||
{% macro box_tickets() %} | {% macro box_tickets() %} | ||||
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | {% import '@LcShop/backend/default/block/macros.html.twig' as macros %} | ||||
{{ macros.card_start("OrderShop.complementary", 'bg-outline-primary') }} | |||||
{{ macros.card_start("OrderShop.tickets", 'primary card-outline') }} | |||||
<table class="table table-striped"> | <table class="table table-striped"> | ||||
<tbody> | <tbody> | ||||
<thead> | <thead> |
<div v-show="order.valid" class="col-3" > | <div v-show="order.valid" class="col-3" > | ||||
{{ order_macros.box_reference() }} | {{ order_macros.box_reference() }} | ||||
<div v-show="order.mainOrder" > | |||||
<div v-if="order.mainOrder" > | |||||
{{ order_macros.box_main_order() }} | {{ order_macros.box_main_order() }} | ||||
</div> | </div> | ||||
use Doctrine\ORM\EntityManagerInterface; | use Doctrine\ORM\EntityManagerInterface; | ||||
use Lc\ShopBundle\Context\DocumentInterface; | use Lc\ShopBundle\Context\DocumentInterface; | ||||
use Lc\ShopBundle\Context\MerchantUtilsInterface; | use Lc\ShopBundle\Context\MerchantUtilsInterface; | ||||
use Lc\ShopBundle\Context\OrderPaymentInterface; | |||||
use Lc\ShopBundle\Context\OrderReductionCartInterface; | |||||
use Lc\ShopBundle\Context\OrderProductInterface; | |||||
use Lc\ShopBundle\Context\OrderReductionCreditInterface; | use Lc\ShopBundle\Context\OrderReductionCreditInterface; | ||||
use Lc\ShopBundle\Context\OrderShopInterface; | use Lc\ShopBundle\Context\OrderShopInterface; | ||||
use Lc\ShopBundle\Context\OrderStatusHistoryInterface; | use Lc\ShopBundle\Context\OrderStatusHistoryInterface; | ||||
use Lc\ShopBundle\Context\OrderStatusInterface; | |||||
use Lc\ShopBundle\Context\PriceUtilsInterface; | use Lc\ShopBundle\Context\PriceUtilsInterface; | ||||
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; | use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; | ||||
use Lc\ShopBundle\Context\ReductionCartInterface; | |||||
use Lc\ShopBundle\Context\ReductionCreditInterface; | use Lc\ShopBundle\Context\ReductionCreditInterface; | ||||
use Lc\ShopBundle\Context\UserInterface; | |||||
use Lc\ShopBundle\Model\Document; | |||||
use Lc\ShopBundle\Form\Backend\Order\OrderReductionCreditType; | |||||
use Lc\ShopBundle\Model\Product; | |||||
use Lc\ShopBundle\Model\ProductFamily; | use Lc\ShopBundle\Model\ProductFamily; | ||||
use Lc\ShopBundle\Services\CreditUtils; | use Lc\ShopBundle\Services\CreditUtils; | ||||
use Lc\ShopBundle\Services\DocumentUtils; | use Lc\ShopBundle\Services\DocumentUtils; | ||||
use Lc\ShopBundle\Services\Price\OrderShopPriceUtils; | |||||
use Lc\ShopBundle\Services\UserUtils; | use Lc\ShopBundle\Services\UserUtils; | ||||
use Lc\ShopBundle\Services\Utils; | use Lc\ShopBundle\Services\Utils; | ||||
use Symfony\Component\HttpFoundation\Session\SessionInterface; | |||||
use Symfony\Component\Routing\RouterInterface; | |||||
use Symfony\Component\Security\Core\Security; | use Symfony\Component\Security\Core\Security; | ||||
class OrderUtils | class OrderUtils | ||||
protected $documentUtils; | protected $documentUtils; | ||||
protected $utils; | protected $utils; | ||||
protected $creditUtils; | protected $creditUtils; | ||||
protected $router; | |||||
public function __construct(EntityManagerInterface $em, Security $security, UserUtils $userUtils, | |||||
public function __construct(EntityManagerInterface $em, Security $security, RouterInterface $router, UserUtils $userUtils, | |||||
MerchantUtilsInterface $merchantUtils, PriceUtilsInterface $priceUtils, ProductFamilyUtilsInterface $productFamilyUtils, | MerchantUtilsInterface $merchantUtils, PriceUtilsInterface $priceUtils, ProductFamilyUtilsInterface $productFamilyUtils, | ||||
DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils) | DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils) | ||||
{ | { | ||||
$this->documentUtils = $documentUtils; | $this->documentUtils = $documentUtils; | ||||
$this->utils = $utils; | $this->utils = $utils; | ||||
$this->creditUtils = $creditUtils; | $this->creditUtils = $creditUtils; | ||||
$this->router = $router; | |||||
} | } | ||||