use Lc\ShopBundle\Context\OrderUtilsInterface; | use Lc\ShopBundle\Context\OrderUtilsInterface; | ||||
use Lc\ShopBundle\Context\UserInterface; | use Lc\ShopBundle\Context\UserInterface; | ||||
use Lc\ShopBundle\Form\Backend\Order\AddPoductToOrderType; | use Lc\ShopBundle\Form\Backend\Order\AddPoductToOrderType; | ||||
use Lc\ShopBundle\Form\Backend\Order\AddRedeliveryOrderProductType; | |||||
use Lc\ShopBundle\Form\Backend\Order\DeleteOrderPaymentType; | use Lc\ShopBundle\Form\Backend\Order\DeleteOrderPaymentType; | ||||
use Lc\ShopBundle\Form\Backend\Order\DeleteOrderReductionCartType; | use Lc\ShopBundle\Form\Backend\Order\DeleteOrderReductionCartType; | ||||
use Lc\ShopBundle\Form\Backend\Order\DeleteOrderReductionCreditType; | use Lc\ShopBundle\Form\Backend\Order\DeleteOrderReductionCreditType; | ||||
use Lc\ShopBundle\Form\Backend\Order\OrderDeliveryAddressType; | use Lc\ShopBundle\Form\Backend\Order\OrderDeliveryAddressType; | ||||
use Lc\ShopBundle\Form\Backend\Order\OrderInvoiceAddressType; | use Lc\ShopBundle\Form\Backend\Order\OrderInvoiceAddressType; | ||||
use Lc\ShopBundle\Form\Backend\Order\OrderPaymentType; | use Lc\ShopBundle\Form\Backend\Order\OrderPaymentType; | ||||
use Lc\ShopBundle\Form\Backend\Order\OrderProductsActionType; | |||||
use Lc\ShopBundle\Form\Backend\Order\OrderProductsType; | use Lc\ShopBundle\Form\Backend\Order\OrderProductsType; | ||||
use Lc\ShopBundle\Form\Backend\Order\AddOrderReductionCartType; | use Lc\ShopBundle\Form\Backend\Order\AddOrderReductionCartType; | ||||
use Lc\ShopBundle\Form\Backend\Order\AddOrderReductionCreditType; | use Lc\ShopBundle\Form\Backend\Order\AddOrderReductionCreditType; | ||||
use Lc\ShopBundle\Services\CreditUtils; | use Lc\ShopBundle\Services\CreditUtils; | ||||
use Lc\ShopBundle\Services\Utils; | use Lc\ShopBundle\Services\Utils; | ||||
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport; | use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport; | ||||
use Proxies\__CG__\App\Entity\OrderProduct; | |||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType; | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||||
use Symfony\Component\HttpFoundation\Response; | use Symfony\Component\HttpFoundation\Response; | ||||
$error = false; | $error = false; | ||||
// dump($formOrderProducts->get('orderProducts')->getData()); | // dump($formOrderProducts->get('orderProducts')->getData()); | ||||
foreach ($orderShop->getOrderProducts() as $orderProduct) { | foreach ($orderShop->getOrderProducts() as $orderProduct) { | ||||
if ($this->orderUtils->isProductAvailable($orderProduct->getProduct(), $orderProduct->getQuantityOrder())) { | |||||
if ($orderProduct->getQuantityOrder() <= 0) { | |||||
$this->em->remove($orderProduct); | |||||
if($orderProduct->isRedelivery() === false) { | |||||
if ($this->orderUtils->isProductAvailable($orderProduct->getProduct(), $orderProduct->getQuantityOrder())) { | |||||
if ($orderProduct->getQuantityOrder() <= 0) { | |||||
$this->em->remove($orderProduct); | |||||
} else { | |||||
$this->em->persist($orderProduct); | |||||
} | |||||
} else { | } else { | ||||
$this->em->persist($orderProduct); | |||||
$error = true; | |||||
$this->utils->addFlash('error', 'error.order.productUnavailable'); | |||||
} | } | ||||
} else { | |||||
$error = true; | |||||
$this->utils->addFlash('error', 'error.order.productUnavailable'); | |||||
} | } | ||||
} | } | ||||
if (!$error) { | if (!$error) { | ||||
} | } | ||||
public function addRedeliveryOrderProductAction() | |||||
{ | |||||
$orderShop = $this->getOrderShopEntity(); | |||||
$formAddOrderReductionCredit = $this->createForm(AddRedeliveryOrderProductType::class, $orderShop); | |||||
//TODO 0 écrire | |||||
} | |||||
public function deleteOrderReductionCartAction() | public function deleteOrderReductionCartAction() | ||||
{ | { | ||||
$orderShop = $this->getOrderShopEntity(); | $orderShop = $this->getOrderShopEntity(); | ||||
$parameters['form_order_status'] = $this->createCustomForm(OrderStatusType::class, 'orderStatus', $parameters)->createView(); | $parameters['form_order_status'] = $this->createCustomForm(OrderStatusType::class, 'orderStatus', $parameters)->createView(); | ||||
$parameters['form_order_invoice_address'] = $this->createCustomForm(OrderInvoiceAddressType::class, 'orderInvoiceAddress', $parameters)->createView(); | $parameters['form_order_invoice_address'] = $this->createCustomForm(OrderInvoiceAddressType::class, 'orderInvoiceAddress', $parameters)->createView(); | ||||
break; | break; | ||||
case OrderStatus::ALIAS_PAID_BY_CREDIT : | |||||
case OrderStatus::ALIAS_PAID_ONLINE : | |||||
$parameters['form_order_status'] = $this->createCustomForm(OrderStatusType::class, 'orderStatus', $parameters)->createView(); | |||||
break; | |||||
} | } | ||||
<?php | |||||
namespace Lc\ShopBundle\Form\Backend\Order; | |||||
use Doctrine\ORM\EntityManagerInterface; | |||||
use Lc\ShopBundle\Context\MerchantUtilsInterface; | |||||
use Lc\ShopBundle\Context\OrderShopInterface; | |||||
use Symfony\Component\Form\AbstractType; | |||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType; | |||||
use Symfony\Component\Form\Extension\Core\Type\CollectionType; | |||||
use Symfony\Component\Form\FormBuilderInterface; | |||||
use Symfony\Component\OptionsResolver\OptionsResolver; | |||||
class OrderProductsActionType extends AbstractType | |||||
{ | |||||
protected $em; | |||||
protected $merchantUtils; | |||||
public function __construct(EntityManagerInterface $em, MerchantUtilsInterface $merchantUtils) | |||||
{ | |||||
$this->em = $em; | |||||
$this->merchantUtils = $merchantUtils; | |||||
} | |||||
public function buildForm(FormBuilderInterface $builder, array $options) | |||||
{ | |||||
$builder->add('orderProducts', CollectionType::class, array( | |||||
'label' => false, | |||||
'mapped'=>false, | |||||
'entry_type' => CheckboxType::class, | |||||
'entry_options' => ['label' => false], | |||||
'allow_add' => true, | |||||
'allow_delete' => true | |||||
) | |||||
); | |||||
} | |||||
public function configureOptions(OptionsResolver $resolver) | |||||
{ | |||||
$resolver->setDefaults([ | |||||
]); | |||||
} | |||||
} |
.lc-offline-field label::after{content:' [hors ligne]'} | .lc-offline-field label::after{content:' [hors ligne]'} | ||||
/* Général */ | /* Général */ | ||||
.btn.btn-primary.action-save{float: right;} | .btn.btn-primary.action-save{float: right;} | ||||
.button-action .btn{margin-left: 10px;} | .button-action .btn{margin-left: 10px;} | ||||
.table-order-summary{width: 100%;} | .table-order-summary{width: 100%;} | ||||
.order-product-item.redelivery{background: rgba(18, 104, 253, 0.38) !important;} | |||||
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | /*.select2-container--bootstrap .select2-selection{max-width: none;}*/ | ||||
/*.order-product-item{margin: 15px 0; padding: 0;}*/ | /*.order-product-item{margin: 15px 0; padding: 0;}*/ | ||||
this.$parent.updateOrderProducts(); | this.$parent.updateOrderProducts(); | ||||
}, | }, | ||||
modalAddRedeliveryOrderProduct:function () { | modalAddRedeliveryOrderProduct:function () { | ||||
log(this.orderProduct.id); | |||||
log(this.orderProduct.unit); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormOrderProduct']).val(this.orderProduct.id); | $(this.$parent.$refs['addRedeliveryOrderProductFormOrderProduct']).val(this.orderProduct.id); | ||||
$(this.$parent.$refs['addRedeliveryOrderProductFormTitle']).val(this.orderProduct.title); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormUnit']).val(this.orderProduct.unit).trigger('change'); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormQuantityProduct']).val(this.orderProduct.quantityProduct); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormQuantityOrder']).val(this.orderProduct.quantityOrder); | |||||
$('#modal-add-redelivery-order-product').modal('show'); | $('#modal-add-redelivery-order-product').modal('show'); | ||||
} | } | ||||
/*log($('#order-products-list').data('prototype')); | /*log($('#order-products-list').data('prototype')); | ||||
this.editionMode = true; | this.editionMode = true; | ||||
} | } | ||||
}, | }, | ||||
/* | |||||
//TODO Sélection groupé à utiliser pr les remboursements | |||||
modalAddGroupRedeliveryOrderProduct: function (){ | |||||
log(this.order.orderProducts); | |||||
$('#orderProductsAction').find('.order-product-checkbox:checked').each(function (i,checkbox) { | |||||
log($(checkbox).val()); | |||||
}); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormOrderProduct']).val(this.orderProduct.id); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormTitle']).val(this.orderProduct.title); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormUnit']).val(this.orderProduct.unit).trigger('change'); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormQuantityProduct']).val(this.orderProduct.quantityProduct); | |||||
$(this.$parent.$refs['addRedeliveryOrderProductFormQuantityOrder']).val(this.orderProduct.quantityOrder); | |||||
$('#modal-add-redelivery-order-product').modal('show'); | |||||
},*/ | |||||
addProductToOrder: function () { | addProductToOrder: function () { | ||||
this.postForm('#addProductToOrderForm', false); | this.postForm('#addProductToOrderForm', false); | ||||
}, | }, | ||||
$('#modal-order-payment').modal("show") | $('#modal-order-payment').modal("show") | ||||
}, | }, | ||||
setOrderPaymentFormValues(orderPayment = false) { | setOrderPaymentFormValues(orderPayment = false) { | ||||
if (orderPayment)this.orderPaymentFormId = orderPayment['id']; | if (orderPayment)this.orderPaymentFormId = orderPayment['id']; | ||||
else this.orderPaymentFormId = null; | else this.orderPaymentFormId = null; |
addProduct: Ajout de produit à la commande | addProduct: Ajout de produit à la commande | ||||
orderPayment: Ajouter un règlement | orderPayment: Ajouter un règlement | ||||
orderStatus: Changer de status | orderStatus: Changer de status | ||||
addRedeliveryOrderProduct: Ajouter une relivraison | |||||
None: Aucune valeur | None: Aucune valeur | ||||
label.form.empty_value: Choisissez une option | label.form.empty_value: Choisissez une option | ||||
form.label.delete: Supprimer l'image | form.label.delete: Supprimer l'image | ||||
changeInvoiceAddress: L'adresse de facuration a bien été modifié | changeInvoiceAddress: L'adresse de facuration a bien été modifié | ||||
changeDeliveryAddress: L'adresse de livraison a bien été modifié | changeDeliveryAddress: L'adresse de livraison a bien été modifié | ||||
addProduct: Le produit a bien été ajouté | addProduct: Le produit a bien été ajouté | ||||
addRedeliveryOrderProduct: Un produit a été ajouté en relivraison pour la prochaine commande client | |||||
credit: | credit: | ||||
debited: Le compte prépayé a bien été débité | debited: Le compte prépayé a bien été débité | ||||
added: Le compte a bien été crédité | added: Le compte a bien été crédité | ||||
total: Total | total: Total | ||||
status: Statut | status: Statut | ||||
orderStatus: Status de commande | orderStatus: Status de commande | ||||
quantityOrder: Quantité commandé | |||||
quantityProduct: Quantité (en rapport à l'unité) | |||||
unit: Unité | |||||
redeliverySupplier: Erreur producteur (A rappeler au prochain bon de commande producteur) | |||||
UserMerchant: | UserMerchant: | ||||
credit: Solde du compte prépayé | credit: Solde du compte prépayé | ||||
CreditHistory: | CreditHistory: | ||||
<u>Remarque</u> :<br /> Vous ne pouvez demander un nouveau mot de passe que toutes les 2 heures. | <u>Remarque</u> :<br /> Vous ne pouvez demander un nouveau mot de passe que toutes les 2 heures. | ||||
message: | |||||
OrderShop: | |||||
hasRedelivery: Ce produit a fait l'objet d'une relivraison dans la commande n° %id% |
{% else %} | {% else %} | ||||
{% set trad = name|lc_trad(easyadmin['entity']['name'], 'field') %} | {% set trad = name|lc_trad(easyadmin['entity']['name'], 'field') %} | ||||
{% endif %} | {% endif %} | ||||
{%- endif -%} | {%- endif -%} | ||||
<{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ trad }}</{{ element|default('label') }}> | <{{ element|default('label') }}{% if label_attr %}{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}{% endif %}>{{ trad }}</{{ element|default('label') }}> | ||||
{%- endif -%} | {%- endif -%} |
{% trans_default_domain 'lcshop' %} | {% trans_default_domain 'lcshop' %} | ||||
{#<div class="col-4"> | |||||
<h6><strong>{{ "field.OrderShop.mainInfo"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<p> | |||||
<strong>{{ "field.OrderShop.status"|trans }} </strong><br /> | |||||
<span>${order.orderStatus}</span> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-status"> | |||||
{{ "action.edit"|trans }} | |||||
</button> | |||||
</p> | |||||
<p> | |||||
<strong>{{ "field.OrderShop.user"|trans }} </strong><br /> | |||||
<span>${order.user}</span> | |||||
</p> | |||||
<p> | |||||
<strong>{{ "field.OrderShop.orderNumber"|trans }} </strong><br /> | |||||
<span>${order.id}</span> | |||||
</p> | |||||
</div>#} | |||||
{#<div class="col-4" > | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<h6><strong>{{ "field.default.deliveryAddress"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<address v-html="order.deliveryAddress"> | |||||
</address> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<h6><strong>{{ "field.default.deliveryPointSale"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<address v-html="order.deliveryPointSale"> | |||||
</address> | |||||
</div> | |||||
<div v-else> | |||||
Aucun lieu de livraison défini. | |||||
</div> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-delivery-address"> | |||||
{{ "action.edit"|trans }} | |||||
</button> | |||||
</div>#} | |||||
{#<div class="col-4"> | |||||
<h6><strong>{{ "field.default.invoiceAddress"|trans({}, 'lcshop') }}</strong></h6> | |||||
<address v-html="order.invoiceAddress"> | |||||
</address> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-invoice-address"> | |||||
{{ "action.edit"|trans }} | |||||
</button> | |||||
</div>#} | |||||
{#<div class="col-12"> | |||||
<h6><strong>{{ "field.default.deliveryAvailabilty"|trans({}, 'lcshop') }} : </strong></h6> | |||||
<div v-if="order.deliveryType == 'home'"> | |||||
<div v-html="order.deliveryAvailabilityZone"> | |||||
</div> | |||||
</div> | |||||
<div v-else-if="order.deliveryType == 'point-sale'"> | |||||
<div v-html="order.deliveryAvailabilityPointSale"> | |||||
</div> | |||||
</div> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-delivery-availability"> | |||||
{{ "action.edit"|trans }} | |||||
</button> | |||||
</div>#} | |||||
<div class="col-12"> | <div class="col-12"> | ||||
{% if form_order_products is defined %} | {% if form_order_products is defined %} | ||||
{{ form_start(form_order_products, {'attr': {'id' : 'orderProductsForm'}}) }} | {{ form_start(form_order_products, {'attr': {'id' : 'orderProductsForm'}}) }} | ||||
<script> | <script> | ||||
window.templateTest = '{{ orderMacros.productsTemplate(form_order_products)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; | |||||
window.templateTest = '{{ orderMacros.productsTemplate(form_order_products)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; | |||||
</script> | </script> | ||||
{% else %} | {% else %} | ||||
<script> | <script> | ||||
window.templateTest = '{{ orderMacros.productsTemplate(null)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; | |||||
window.templateTest = '{{ orderMacros.productsTemplate(null)|replace({"\n":' ', "\r":' ', "'" : "\\'"})|raw }}'; | |||||
</script> | </script> | ||||
<form id="orderProductsAction"> | |||||
{% endif %} | {% endif %} | ||||
{{ orderMacros.tableHead() }} | |||||
{{ orderMacros.tableHead() }} | |||||
{{ orderMacros.products() }} | |||||
{{ orderMacros.products() }} | |||||
{{ orderMacros.tableTotal() }} | |||||
{{ orderMacros.tableTotal() }} | |||||
{% if form_order_products is defined %} | {% if form_order_products is defined %} | ||||
{% do form_order_products.orderProducts.setRendered %} | |||||
{% do form_order_products.orderProducts.setRendered %} | |||||
{{ form_end(form_order_products) }} | {{ form_end(form_order_products) }} | ||||
{% else %} | |||||
</form> | |||||
{% endif %} | {% endif %} | ||||
<div class="clearfix"></div> | <div class="clearfix"></div> | ||||
window.orderObject = {{ order|json_encode|raw }}; | window.orderObject = {{ order|json_encode|raw }}; | ||||
</script> | </script> | ||||
</div> | </div> | ||||
{# <h6><strong>Réductions</strong></h6> | |||||
${order.orderReductionCart} | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-reduction-cart"> | |||||
{{ "action.addReductionCart"|trans }} | |||||
</button> | |||||
<br /> | |||||
${order.orderReductionCredit} | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-reduction-credit"> | |||||
{{ "action.addReductionCredit"|trans }} | |||||
</button> | |||||
<br /> | |||||
<h6><strong>Historiques des paiments</strong></h6> | |||||
#}{#TODO: afficher si la commande est règlé et afficher une alerte si le montant des paiments est supérieur au montant total de la commande#}{# | |||||
${order.orderPaid} | |||||
<ul v-for="(orderPayment, i) in order.orderPayments"> | |||||
<li>${orderPayment}</li> | |||||
</ul> | |||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#modal-order-payment"> | |||||
{{ "action.addOrderPayment"|trans }} | |||||
</button>#} | |||||
<div class="modal-body"> | <div class="modal-body"> | ||||
<div class="col"> | <div class="col"> | ||||
{{ form_row(form_add_redelivery_order_product.orderProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormOrderProduct'}}) }} | {{ form_row(form_add_redelivery_order_product.orderProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormOrderProduct'}}) }} | ||||
{{ form_row(form_add_redelivery_order_product.title) }} | |||||
{{ form_row(form_add_redelivery_order_product.unit) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityProduct) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityOrder) }} | |||||
{{ form_row(form_add_redelivery_order_product.title, {'attr' :{'ref' : 'addRedeliveryOrderProductFormTitle'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.unit, {'attr' :{'ref' : 'addRedeliveryOrderProductFormUnit'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityProduct, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityProduct'}}) }} | |||||
{{ form_row(form_add_redelivery_order_product.quantityOrder, {'attr' :{'ref' : 'addRedeliveryOrderProductFormQuantityOrder'}}) }} | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="modal-footer justify-content-between"> | <div class="modal-footer justify-content-between"> |
<table id="order-products-list" class="table table-striped"> | <table id="order-products-list" class="table table-striped"> | ||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th :class="editionMode ? '' : 'hidden'"> | |||||
</th> | |||||
<th colspan="2"> | <th colspan="2"> | ||||
<span>Produits / Producteurs</span> | <span>Produits / Producteurs</span> | ||||
</th> | </th> | ||||
<th> | <th> | ||||
<span>Total</span> | <span>Total</span> | ||||
</th> | </th> | ||||
<th :class="editionMode ? '' : 'hidden'"> | |||||
Actions | |||||
</th> | |||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
{% endmacro %} | {% endmacro %} | ||||
{% macro productsTemplate(form_order_products=null) %} | {% macro productsTemplate(form_order_products=null) %} | ||||
<tr class="order-product-item"> | |||||
<td colspan="2">{% verbatim %}{{orderProduct.title}}{% endverbatim %}</td> | |||||
<tr :class=" orderProduct.isRedelivery ? 'redelivery order-product-item' : 'order-product-item'"> | |||||
<td :class="editionMode ? '' : 'hidden'"> | |||||
<input type="checkbox" :value="orderProduct.id" class="order-product-checkbox" /> | |||||
</td> | |||||
<td colspan="2"> | |||||
{% verbatim %}{{orderProduct.title}}{% endverbatim %} | |||||
<span v-show="orderProduct.hasRedelivery"> | |||||
- <i class="fa fa-undo" data-toggle="tooltip" :title="orderProduct.redeliveryOrderShop" ></i> | |||||
</span> | |||||
<span v-show="orderProduct.isRedelivery"> | |||||
- <i class="fa fa-undo" data-toggle="tooltip" title="Ce produit fait l'objet d'une relivraison" ></i> | |||||
</span> | |||||
</td> | |||||
<td> | <td> | ||||
{% verbatim %}{{orderProduct.price}}{% endverbatim %}€ | {% verbatim %}{{orderProduct.price}}{% endverbatim %}€ | ||||
</td> | </td> | ||||
</td> | </td> | ||||
<td> | <td> | ||||
{% if form_order_products is not null %} | {% if form_order_products is not null %} | ||||
<div :class="editionMode ? '' : 'hidden'"> | |||||
<div :class="editionMode && orderProduct.isRedelivery ==false ? '' : 'hidden'"> | |||||
{{ form_widget(form_order_products.orderProducts.vars.prototype.quantityOrder, {'attr' : {'ref': 'fieldQuantity', 'v-model' : 'orderProduct.quantityOrder', '@change' : 'updateOrderProducts'}}) }} | {{ form_widget(form_order_products.orderProducts.vars.prototype.quantityOrder, {'attr' : {'ref': 'fieldQuantity', 'v-model' : 'orderProduct.quantityOrder', '@change' : 'updateOrderProducts'}}) }} | ||||
{{ form_widget(form_order_products.orderProducts.vars.prototype.product, {'attr' : {'ref' : 'fieldProduct', 'v-model' : 'orderProduct.product'}}) }} | {{ form_widget(form_order_products.orderProducts.vars.prototype.product, {'attr' : {'ref' : 'fieldProduct', 'v-model' : 'orderProduct.product'}}) }} | ||||
{#{{ form_widget(form_order_products.orderProducts.vars.prototype.id, {'attr' : {'ref' : 'fieldId', 'v-model' : 'orderProduct.id'}}) }}#} | {#{{ form_widget(form_order_products.orderProducts.vars.prototype.id, {'attr' : {'ref' : 'fieldId', 'v-model' : 'orderProduct.id'}}) }}#} | ||||
<i class="fa fa-trash"></i> | <i class="fa fa-trash"></i> | ||||
</button> | </button> | ||||
</div> | </div> | ||||
<div :class="editionMode ? 'hidden' : ''"> | |||||
<div :class="editionMode && orderProduct.isRedelivery ==false ? 'hidden' : ''"> | |||||
{% verbatim %}{{ orderProduct.quantityOrder }}{% endverbatim %} | {% verbatim %}{{ orderProduct.quantityOrder }}{% endverbatim %} | ||||
</div> | </div> | ||||
{% else %} | {% else %} | ||||
{% endif %} | {% endif %} | ||||
</td> | </td> | ||||
<td> | <td> | ||||
<button type="button" class="btn-remove-product btn btn-default" @click="modalAddRedeliveryOrderProduct"> | |||||
NICHE | |||||
</button> | |||||
{% verbatim %}{{orderProduct.totalWithTaxAndReduction}}{% endverbatim %}€ | {% verbatim %}{{orderProduct.totalWithTaxAndReduction}}{% endverbatim %}€ | ||||
</td> | </td> | ||||
<td :class="editionMode ? '' : 'hidden'"> | |||||
<div class="dropdown" :class="editionMode ? '' : 'hidden'"> | |||||
<button class="btn btn-info dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-expanded="false"> | |||||
Actions | |||||
</button> | |||||
<div class="dropdown-menu" aria-labelledby="dropdownMenu"> | |||||
<button v-show="orderProduct.hasRedelivery == false"type="button" class="dropdown-item" @click="modalAddRedeliveryOrderProduct"> | |||||
Relivraison | |||||
</button> | |||||
<button type="button" class="dropdown-item" > | |||||
Avoirs groupé | |||||
</button> | |||||
</div> | |||||
</div> | |||||
</td> | |||||
</tr> | </tr> | ||||
{% endmacro %} | {% endmacro %} | ||||
{% macro tableTotal() %} | {% macro tableTotal() %} | ||||
</table> | </table> | ||||
<div class="col-12"> | |||||
<button type="button" class="dropdown-item" > | |||||
Avoirs groupé | |||||
</button> | |||||
</div> | |||||
<div class="clearfix"></div> | <div class="clearfix"></div> | ||||
<div class="row"> | <div class="row"> | ||||
</table> | </table> | ||||
{{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} | {{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} | ||||
</div> | </div> | ||||
<div class="col-8"> | <div class="col-8"> | ||||
<div v-show="order.isOrderPaid" class="alert alert-success alert-dismissible"> | <div v-show="order.isOrderPaid" class="alert alert-success alert-dismissible"> |