|
|
@@ -11,13 +11,18 @@ |
|
|
|
<th colspan="2"> |
|
|
|
<span>Produits / Producteurs</span> |
|
|
|
</th> |
|
|
|
<th v-if="order.countComplementaryOrderShops > 0">Compléments</th> |
|
|
|
<th> |
|
|
|
<span v-if="order.countComplementaryOrderShops > 0">Compléments</span> |
|
|
|
</th> |
|
|
|
|
|
|
|
<th> |
|
|
|
<span>Prix HT à l'unité</span> |
|
|
|
<span>Prix achat HT </span> |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<span>Prix HT</span> |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<span>Prix TTC à l'unité </span> |
|
|
|
<span>Prix TTC </span> |
|
|
|
</th> |
|
|
|
<th> |
|
|
|
<span>Marge </span> |
|
|
@@ -53,33 +58,36 @@ |
|
|
|
{% macro productsTemplate(form_order_products=null) %} |
|
|
|
<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" /> |
|
|
|
<input type="checkbox" :value="orderProduct.id" class="order-product-checkbox"/> |
|
|
|
</td> |
|
|
|
<td colspan="2"> |
|
|
|
<a :href="orderProduct.editLink" target="_blank"> |
|
|
|
<img :src="orderProduct.image" :alt="orderProduct.title" /> |
|
|
|
{% verbatim %}{{orderProduct.title}}{% endverbatim %} |
|
|
|
<span v-show="orderProduct.hasRedelivery"> |
|
|
|
- <i class="fa fa-undo" data-toggle="tooltip" :title="orderProduct.redeliveryOrderShop" ></i> |
|
|
|
<img :src="orderProduct.image" :alt="orderProduct.title"/> |
|
|
|
{% 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 est une relivraison" ></i> |
|
|
|
<span v-show="orderProduct.isRedelivery"> |
|
|
|
- <i class="fa fa-undo" data-toggle="tooltip" title="Ce produit est une relivraison"></i> |
|
|
|
</span> |
|
|
|
</a> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
<span v-if="orderProduct.complementaryReference"> {% verbatim %}{{orderProduct.complementaryReference}}{% endverbatim %}</span> |
|
|
|
<span v-if="orderProduct.complementaryReference"> {% verbatim %}{{orderProduct.complementaryReference}}{% endverbatim %}</span> |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.buyingPrice}}{% endverbatim %} € |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.price}}{% endverbatim %}€ |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.priceWithTax}}{% endverbatim %}€ |
|
|
|
{% verbatim %}{{orderProduct.priceWithTax}}{% endverbatim %} € |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.totalMargin}}{% endverbatim %}€ / |
|
|
|
{% verbatim %}{{orderProduct.marginPercent}}{% endverbatim %}% |
|
|
|
{% verbatim %}{{orderProduct.totalMargin}}{% endverbatim %} € / |
|
|
|
{% verbatim %}{{orderProduct.marginPercent}}{% endverbatim %} % |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.availableQuantity}}{% endverbatim %} |
|
|
@@ -102,19 +110,22 @@ |
|
|
|
{% endif %} |
|
|
|
</td> |
|
|
|
<td> |
|
|
|
{% verbatim %}{{orderProduct.totalWithTaxAndReduction}}{% endverbatim %}€ |
|
|
|
{% verbatim %}{{orderProduct.totalWithTaxAndReduction}}{% endverbatim %} € |
|
|
|
</td> |
|
|
|
<td :class="editionMode ? '' : 'hidden'"> |
|
|
|
<div class="dropdown" :class="editionMode ? '' : 'hidden'"> |
|
|
|
<button class="btn-sm btn-info dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-expanded="false"> |
|
|
|
<div class="dropdown" :class="editionMode ? '' : 'hidden'"> |
|
|
|
<button class="btn-sm 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="modalExist('#modal-add-redelivery-order-product') && orderProduct.hasRedelivery == false" type="button" class="dropdown-item" @click="modalAddRedeliveryOrderProduct"> |
|
|
|
<button v-show="modalExist('#modal-add-redelivery-order-product') && orderProduct.hasRedelivery == false" |
|
|
|
type="button" class="dropdown-item" @click="modalAddRedeliveryOrderProduct"> |
|
|
|
Générer une relivraison |
|
|
|
</button> |
|
|
|
|
|
|
|
<button v-show="modalExist('#modal-add-reduction-credit')" type="button" class="dropdown-item" @click="modalAddReductionCredit" > |
|
|
|
<button v-show="modalExist('#modal-add-reduction-credit')" type="button" class="dropdown-item" |
|
|
|
@click="modalAddReductionCredit"> |
|
|
|
Générer un avoir |
|
|
|
</button> |
|
|
|
</div> |
|
|
@@ -149,7 +160,7 @@ |
|
|
|
<tbody> |
|
|
|
<tr> |
|
|
|
<th>Total produits TTC</th> |
|
|
|
<td>${order.totalOrderProductsWithTax}€</td> |
|
|
|
<td>${order.totalOrderProductsWithTax} €</td> |
|
|
|
</tr> |
|
|
|
<template v-for="(orderReductionCart, key) in order.orderReductionCarts"> |
|
|
|
<tr> |
|
|
@@ -161,7 +172,7 @@ |
|
|
|
<i class="fa fa-trash"></i> |
|
|
|
</button> |
|
|
|
</th> |
|
|
|
<td>${orderReductionCart.amount}€</td> |
|
|
|
<td>${orderReductionCart.amount} €</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
<template v-for="(orderReductionCredit, key) in order.orderReductionCredits"> |
|
|
@@ -174,25 +185,25 @@ |
|
|
|
<i class="fa fa-trash"></i> |
|
|
|
</button> |
|
|
|
</th> |
|
|
|
<td>${orderReductionCredit.amount}€</td> |
|
|
|
<td>${orderReductionCredit.amount} €</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
<tr> |
|
|
|
<th>Total produits après réductions TTC</th> |
|
|
|
<td>${order.totalOrderProductsWithTaxAndReductions}€</td> |
|
|
|
<td>${order.totalOrderProductsWithTaxAndReductions} €</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<th>Total marge produits</th> |
|
|
|
<td>${order.totalMargin}€ <br /> ${order.totalMarginPercent}%</td> |
|
|
|
<td>${order.totalMargin} € <br/> ${order.totalMarginPercent} %</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<th>Frais de livraisons TTC</th> |
|
|
|
<td>${order.deliveryPriceWithTaxAndReduction}€</td> |
|
|
|
<td>${order.deliveryPriceWithTaxAndReduction} €</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<th>Total TTC</th> |
|
|
|
<td>${order.totalWithTax}€</td> |
|
|
|
<td>${order.totalWithTax} €</td> |
|
|
|
</tr> |
|
|
|
|
|
|
|
</tbody> |
|
|
@@ -217,11 +228,22 @@ |
|
|
|
|
|
|
|
|
|
|
|
{% macro box_user_info() %} |
|
|
|
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} |
|
|
|
{% set value = ' <a v-if="order.user" :href="order.userLink" target="_blank" v-html="order.user"></a> |
|
|
|
<span v-else v-html="order.visitor"></span>' %} |
|
|
|
{{ macros.box_info('bg-info', 'user',"field.default.user"|trans({}, 'lcshop'), value) }} |
|
|
|
|
|
|
|
{% embed '@LcShop/backend/default/block/embed_box.twig' %} |
|
|
|
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} |
|
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
{% block class %}bg-info{% endblock %} |
|
|
|
{% block icon %}credit-card{% endblock %} |
|
|
|
{% block label %}{{ "field.OrderShop.reference"|trans({}, 'lcshop') }}{% endblock %} |
|
|
|
{% block value %} |
|
|
|
<span v-if="order.user" v-html="order.user"></span> |
|
|
|
<span v-else v-html="order.visitor"></span> |
|
|
|
{% endblock %} |
|
|
|
{% block button %} |
|
|
|
<a class="btn btn-sm btn-secondary" target="_blank" :href="order.userLink"> |
|
|
|
Voir la fiche |
|
|
|
</a> |
|
|
|
{% endblock %} |
|
|
|
{% endembed %} |
|
|
|
{% endmacro box_user_info %} |
|
|
|
|
|
|
|
|
|
|
@@ -233,16 +255,13 @@ |
|
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
{% block class %}bg-info{% endblock %} |
|
|
|
{% block icon %}credit-card{% endblock %} |
|
|
|
{% block label %}{{ "field.OrderShop.reference"|trans({}, 'lcshop')}}{% endblock %} |
|
|
|
{% block label %}{{ "field.OrderShop.reference"|trans({}, 'lcshop') }}{% endblock %} |
|
|
|
{% block value %} |
|
|
|
${order.reference}<br /> |
|
|
|
${order.reference}<br/> |
|
|
|
<span v-if="order.countComplementaryOrderShops > 0"> |
|
|
|
${order.countComplementaryOrderShops} commande(s) complémentaire(s) |
|
|
|
</span> |
|
|
|
{% endblock %} |
|
|
|
{% block button %} |
|
|
|
{{ order_macros.order_modal_button('#modal-order-delivery-address') }} |
|
|
|
{% endblock %} |
|
|
|
{% endembed %} |
|
|
|
{% endmacro %} |
|
|
|
|
|
|
@@ -257,9 +276,26 @@ |
|
|
|
|
|
|
|
|
|
|
|
{% macro box_total_order() %} |
|
|
|
{% import '@LcShop/backend/default/block/macros.html.twig' as macros %} |
|
|
|
{% embed '@LcShop/backend/default/block/embed_box.twig' %} |
|
|
|
{% import '@LcShop/backend/order/macros.html.twig' as order_macros %} |
|
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
{% block class %}bg-danger{% endblock %} |
|
|
|
{% block icon %}euro-sign{% endblock %} |
|
|
|
{% block infoBox %} |
|
|
|
Total produits après réduc TTC : |
|
|
|
<strong class="float-right"> ${order.totalOrderProductsWithTaxAndReductions} €</strong><br/> |
|
|
|
|
|
|
|
Total marge produits : |
|
|
|
<strong class="float-right">${order.totalMargin} € / ${order.totalMarginPercent} %</strong><br/> |
|
|
|
|
|
|
|
Frais de livraisons TTC : |
|
|
|
<strong class="float-right">${order.deliveryPriceWithTaxAndReduction} €</strong><br/> |
|
|
|
|
|
|
|
{{ macros.box_info('bg-danger', 'euro-sign',"field.OrderShop.total"|trans({}, 'lcshop'), ' ${order.totalWithTax} €') }} |
|
|
|
Total commandes : |
|
|
|
<strong class="float-right"> ${order.totalWithTax} €</strong><br/> |
|
|
|
|
|
|
|
{% endblock %} |
|
|
|
{% endembed %} |
|
|
|
|
|
|
|
{% endmacro %} |
|
|
|
|
|
|
@@ -290,7 +326,7 @@ |
|
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
{% block class %}bg-success{% endblock %} |
|
|
|
{% block icon %}map-marked-alt{% endblock %} |
|
|
|
{% block label %}{{ "field.default.deliveryAddress"|trans({}, 'lcshop')}}{% endblock %} |
|
|
|
{% block label %}{{ "field.default.deliveryAddress"|trans({}, 'lcshop') }}{% endblock %} |
|
|
|
{% block value %} |
|
|
|
<div v-if="order.deliveryAddress"> |
|
|
|
<address v-html="order.deliveryAddress"> |
|
|
@@ -352,48 +388,49 @@ |
|
|
|
</div>' %} |
|
|
|
|
|
|
|
{{ macros.card_start("OrderShop.payment", 'danger card-outline', false, tools) }} |
|
|
|
<table class="table table-striped" style="margin-bottom: 15px"> |
|
|
|
<tbody> |
|
|
|
<thead> |
|
|
|
<table class="table table-striped" style="margin-bottom: 15px"> |
|
|
|
<tbody> |
|
|
|
<thead> |
|
|
|
<tr> |
|
|
|
<th v-if="order.countComplementaryOrderShops > 0">Référence</th> |
|
|
|
<th>Mode de règlement</th> |
|
|
|
<th>Date</th> |
|
|
|
<th>Montant</th> |
|
|
|
<th>Actions</th> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<template v-for="(orderPayment, i) in order.orderPayments"> |
|
|
|
<tr> |
|
|
|
<th v-if="order.countComplementaryOrderShops > 0">Référence</th> |
|
|
|
<th>Mode de règlement</th> |
|
|
|
<th>Date</th> |
|
|
|
<th>Montant</th> |
|
|
|
<th>Actions</th> |
|
|
|
<td v-if="order.countComplementaryOrderShops > 0"> |
|
|
|
${orderPayment.orderReference} |
|
|
|
</td> |
|
|
|
<td>${orderPayment.meanPaymentText}</td> |
|
|
|
<td>${orderPayment.paidAtText}</td> |
|
|
|
<td>${orderPayment.amount}</td> |
|
|
|
|
|
|
|
<td> |
|
|
|
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" |
|
|
|
class="btn-sm btn-info" type="button" @click="editOrderPayment(orderPayment.id)"> |
|
|
|
<i class="fa fa-pen"></i> |
|
|
|
</button> |
|
|
|
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" |
|
|
|
type="button" class="btn-sm btn-danger" |
|
|
|
@click="modalDeleteOrderPayment(orderPayment.id)"> |
|
|
|
<i class="fa fa-trash"></i> |
|
|
|
</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</thead> |
|
|
|
<tbody> |
|
|
|
<template v-for="(orderPayment, i) in order.orderPayments"> |
|
|
|
<tr> |
|
|
|
<td v-if="order.countComplementaryOrderShops > 0"> |
|
|
|
${orderPayment.orderReference} |
|
|
|
</td> |
|
|
|
<td>${orderPayment.meanPaymentText}</td> |
|
|
|
<td>${orderPayment.paidAtText}</td> |
|
|
|
<td>${orderPayment.amount}</td> |
|
|
|
|
|
|
|
<td> |
|
|
|
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" class="btn-sm btn-info" type="button" @click="editOrderPayment(orderPayment.id)"> |
|
|
|
<i class="fa fa-pen"></i> |
|
|
|
</button> |
|
|
|
<button v-show="orderPayment.editable && editionMode && modalExist('#modal-delete-order-payment')" |
|
|
|
type="button" class="btn-sm btn-danger" |
|
|
|
@click="modalDeleteOrderPayment(orderPayment.id)"> |
|
|
|
<i class="fa fa-trash"></i> |
|
|
|
</button> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<div class="col-11"> |
|
|
|
{{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} |
|
|
|
</template> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<div class="col-11"> |
|
|
|
{{ _self.order_modal_button('#modal-order-payment', 'btn-info', "action.order.addOrderPayment") }} |
|
|
|
|
|
|
|
<strong class="float-right">Total règlement : ${order.totalOrderPaid} €</strong> |
|
|
|
<strong class="float-right">Total règlement : ${order.totalOrderPaid} €</strong> |
|
|
|
|
|
|
|
{#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#} |
|
|
|
</div> |
|
|
|
{#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#} |
|
|
|
</div> |
|
|
|
{{ macros.card_end() }} |
|
|
|
{% endmacro %} |
|
|
|
|
|
|
@@ -424,7 +461,8 @@ |
|
|
|
<td>Facture</td> |
|
|
|
<td>${orderDocument.reference}</td> |
|
|
|
<td> |
|
|
|
<a :href="'./?entity=Document&action=downloadInvoice&id='+orderDocument.id" class="btn-sm btn-default">Télécharger</a> |
|
|
|
<a :href="'./?entity=Document&action=downloadInvoice&id='+orderDocument.id" |
|
|
|
class="btn-sm btn-default">Télécharger</a> |
|
|
|
</td> |
|
|
|
</tr> |
|
|
|
</template> |
|
|
@@ -508,7 +546,7 @@ |
|
|
|
{% trans_default_domain 'lcshop' %} |
|
|
|
{% block class %}bg-success{% endblock %} |
|
|
|
{% block icon %}info{% endblock %} |
|
|
|
{% block label %}{{ "field.OrderShop.status"|trans({}, 'lcshop')}}{% endblock %} |
|
|
|
{% block label %}{{ "field.OrderShop.status"|trans({}, 'lcshop') }}{% endblock %} |
|
|
|
{% block value %} |
|
|
|
<strong> ${order.orderStatus}</strong> |
|
|
|
{% endblock %} |