<a href="javascript:void(0);" @click="orderPaymentModalClick" :data-id-order="order.id"> | <a href="javascript:void(0);" @click="orderPaymentModalClick" :data-id-order="order.id"> | ||||
<order-state-payment :order="order" :producer="producer"></order-state-payment> | <order-state-payment :order="order" :producer="producer"></order-state-payment> | ||||
</a> | </a> | ||||
<span class="glyphicon glyphicon-time" title="Débit automatique du crédit la veille de la distribution" v-if="order.auto_payment && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span> | |||||
<span class="glyphicon glyphicon-time" title="Débit automatique du crédit la veille de la distribution" v-if="order.amount != 0 && order.auto_payment && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span> | |||||
</td> | </td> | ||||
<td class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.credit == 1)"> | <td class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.credit == 1)"> | ||||
<template v-if="order.isCreditContext"> | <template v-if="order.isCreditContext"> |
$titleLabel = ''; | $titleLabel = ''; | ||||
if(!$amountPaid) { | if(!$amountPaid) { | ||||
if($isOrderPaid) { | |||||
if($isOrderPaid && $amountTotal != 0) { | |||||
$label = 'Facture payée'; | $label = 'Facture payée'; | ||||
} | } | ||||
elseif($this->isCreditAutoPayment($order)) { | |||||
elseif($this->isCreditAutoPayment($order) && $amountTotal != 0) { | |||||
if($order->subscription && $order->subscription->auto_payment == 0) { | if($order->subscription && $order->subscription->auto_payment == 0) { | ||||
$label = 'Crédit désactivé'; | $label = 'Crédit désactivé'; | ||||
} | } | ||||
$label = 'Crédit non débité'; | $label = 'Crédit non débité'; | ||||
} | } | ||||
} | } | ||||
elseif($amountTotal == 0) { | |||||
$label = 'Gratuit'; | |||||
} | |||||
else { | else { | ||||
$label = 'Non réglé'; | $label = 'Non réglé'; | ||||
} | } | ||||
$classLabel = 'warning'; | $classLabel = 'warning'; | ||||
$titleLabel = 'Paiement en surplus'; | $titleLabel = 'Paiement en surplus'; | ||||
} | } | ||||
elseif($isOrderPaid) { | |||||
elseif(($isOrderPaid && $amountTotal != 0) || $amountTotal == 0) { | |||||
$classLabel = 'success'; | $classLabel = 'success'; | ||||
} | } | ||||
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { | elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) { |