@@ -119,11 +119,11 @@ abstract class Address extends AbstractEntity | |||
return $this->getAddress() . ' - ' . $this->getZip() . ' ' . $this->getCity(); | |||
} | |||
public function getSummary() | |||
public function getSummary($withTitle = true) | |||
{ | |||
$html = ''; | |||
if ($this->getTitle()) { | |||
if ($this->getTitle() && $withTitle) { | |||
$html .= $this->getTitle() . '<br />'; | |||
} | |||
@@ -58,6 +58,8 @@ group: | |||
documents: Documents | |||
selectUser: Sélectionner un utilisateur | |||
deliveryAddress: Adresse de livraison | |||
complementary: Commandes complémentaires | |||
tickets: Tickets relatif à la commande | |||
Ticket: | |||
listMessages: Liste des messages | |||
PointSale: | |||
@@ -383,6 +385,7 @@ field: | |||
weekNumber: Numéro de semaine | |||
deliveryAvailabilityPointSale: Choix du créneau | |||
deliveryAvailabilityZone: Choix du créneau | |||
mainOrder: "Complément à la commande :" | |||
UserMerchant: | |||
credit: Solde du compte prépayé | |||
CreditHistory: |
@@ -261,8 +261,8 @@ | |||
{% macro box_main_order() %} | |||
{% 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 %} | |||
@@ -417,7 +417,7 @@ | |||
{% macro box_complementary() %} | |||
{% 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"> | |||
<tbody> | |||
<thead> | |||
@@ -450,7 +450,7 @@ | |||
{% macro box_tickets() %} | |||
{% 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"> | |||
<tbody> | |||
<thead> |
@@ -23,7 +23,7 @@ | |||
<div v-show="order.valid" class="col-3" > | |||
{{ order_macros.box_reference() }} | |||
<div v-show="order.mainOrder" > | |||
<div v-if="order.mainOrder" > | |||
{{ order_macros.box_main_order() }} | |||
</div> | |||
@@ -7,28 +7,19 @@ use App\Entity\OrderShop; | |||
use Doctrine\ORM\EntityManagerInterface; | |||
use Lc\ShopBundle\Context\DocumentInterface; | |||
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\OrderShopInterface; | |||
use Lc\ShopBundle\Context\OrderStatusHistoryInterface; | |||
use Lc\ShopBundle\Context\OrderStatusInterface; | |||
use Lc\ShopBundle\Context\PriceUtilsInterface; | |||
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; | |||
use Lc\ShopBundle\Context\ReductionCartInterface; | |||
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\Services\CreditUtils; | |||
use Lc\ShopBundle\Services\DocumentUtils; | |||
use Lc\ShopBundle\Services\Price\OrderShopPriceUtils; | |||
use Lc\ShopBundle\Services\UserUtils; | |||
use Lc\ShopBundle\Services\Utils; | |||
use Symfony\Component\HttpFoundation\Session\SessionInterface; | |||
use Symfony\Component\Routing\RouterInterface; | |||
use Symfony\Component\Security\Core\Security; | |||
class OrderUtils | |||
@@ -52,8 +43,9 @@ class OrderUtils | |||
protected $documentUtils; | |||
protected $utils; | |||
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, | |||
DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils) | |||
{ | |||
@@ -70,6 +62,7 @@ class OrderUtils | |||
$this->documentUtils = $documentUtils; | |||
$this->utils = $utils; | |||
$this->creditUtils = $creditUtils; | |||
$this->router = $router; | |||
} | |||