|
|
@@ -286,7 +286,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
<button v-if="tillerIsSynchro" id="btn-tiller" class="btn btn-success btn-xs" disabled><span class="glyphicon glyphicon-refresh"></span> Synchronisé avec Tiller</button> |
|
|
|
<button v-else id="btn-tiller" class="btn btn-xs btn-default" @click="synchroTiller"><span class="glyphicon glyphicon-refresh"></span> Synchroniser avec Tiller</button> |
|
|
|
</template> |
|
|
|
<button v-if="producer && producer.credit" id="btn-pay-orders" class="btn btn-default btn-xs" @click="payOrders"><span class="glyphicon glyphicon-euro"></span> Payer les commandes</button> |
|
|
|
<button v-if="producer && producer.credit" id="btn-pay-orders" class="btn btn-default btn-xs" @click="payOrders"><span class="glyphicon glyphicon-euro"></span> Débiter les commandes</button> |
|
|
|
<button id="btn-add-order" @click="openModalFormOrderCreate" class="btn btn-xs btn-primary"><span class="glyphicon glyphicon-plus"></span> Ajouter une commande</button> |
|
|
|
</div> |
|
|
|
<div class="left"> |
|
|
@@ -323,7 +323,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
<th class="column-user">Utilisateur</th> |
|
|
|
<th class="column-point-sale" v-if="idActivePointSale == 0">Point de vente</th> |
|
|
|
<th class="column-amount">Montant</th> |
|
|
|
<th class="column-state-payment">Paiement</th> |
|
|
|
<th class="column-state-payment">Crédit</th> |
|
|
|
<th class="column-payment"></th> |
|
|
|
<th class="column-tiller" v-if="producer && producer.tiller">Tiller</th> |
|
|
|
<th class="column-actions"></th> |
|
|
@@ -382,16 +382,16 @@ $this->setPageTitle('Distributions') ; |
|
|
|
<td class="column-payment" v-if="producer && producer.credit"> |
|
|
|
<div class="btn-group" v-if="order.user && !order.date_delete"> |
|
|
|
<button class="btn btn-xs btn-default" v-if="order.amount_paid == order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount"> |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Rembourser |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Recréditer |
|
|
|
</button> |
|
|
|
<button class="btn btn-xs btn-default" v-else-if="order.amount_paid == 0" @click="orderPaymentClick" :data-id-order="order.id" data-type="payment" :data-amount="order.amount"> |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Payer |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Débiter |
|
|
|
</button> |
|
|
|
<button class="btn btn-xs btn-default" v-else-if="order.amount_paid < order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="payment" :data-amount="order.amount_remaining"> |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Payer |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Débiter |
|
|
|
</button> |
|
|
|
<button class="btn btn-xs btn-default" v-else-if="order.amount_paid > order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount_surplus"> |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Rembourser |
|
|
|
<span class="glyphicon glyphicon-euro"></span> Recréditer |
|
|
|
</button> |
|
|
|
|
|
|
|
<button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> |
|
|
@@ -455,10 +455,10 @@ $this->setPageTitle('Distributions') ; |
|
|
|
<span class="info-box-number">{{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }}</span> |
|
|
|
<span class="info-box-text"> |
|
|
|
Statut<br /> |
|
|
|
<span class="label label-success" v-if="order.amount_paid == order.amount">payé</span> |
|
|
|
<span class="label label-default" v-else-if="order.amount_paid == 0">non réglé</span> |
|
|
|
<span class="label label-success" v-if="order.amount_paid == order.amount">débité</span> |
|
|
|
<span class="label label-default" v-else-if="order.amount_paid == 0">non débité</span> |
|
|
|
<span class="label label-default" v-else-if="order.amount_paid > order.amount">surplus</span> |
|
|
|
<span class="label label-warning" v-else-if="order.amount_paid < order.amount">reste à payer</span> |
|
|
|
<span class="label label-warning" v-else-if="order.amount_paid < order.amount">reste à débiter</span> |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@@ -477,7 +477,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
data-type="refund" |
|
|
|
@click="orderPaymentClick" > |
|
|
|
<span class="glyphicon glyphicon-chevron-right"></span> |
|
|
|
Rembourser {{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
Recréditer {{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
</button> |
|
|
|
|
|
|
|
<button v-else-if="order.amount_paid == 0" |
|
|
@@ -486,7 +486,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
data-type="payment" |
|
|
|
@click="orderPaymentClick"> |
|
|
|
<span class="glyphicon glyphicon-chevron-right"></span> |
|
|
|
Payer {{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
Débiter {{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
</button> |
|
|
|
|
|
|
|
<button v-else-if="order.amount_paid > order.amount" |
|
|
@@ -495,7 +495,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
data-type="refund" |
|
|
|
@click="orderPaymentClick"> |
|
|
|
<span class="glyphicon glyphicon-chevron-right"></span> |
|
|
|
Rembourser {{ order.amount_surplus.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
Recréditer {{ order.amount_surplus.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
</button> |
|
|
|
|
|
|
|
<button v-else-if="order.amount_paid < order.amount" |
|
|
@@ -504,7 +504,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
data-type="payment" |
|
|
|
@click="orderPaymentClick"> |
|
|
|
<span class="glyphicon glyphicon-chevron-right"></span> |
|
|
|
Payer le restant {{ order.amount_remaining.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
Débiter le restant {{ order.amount_remaining.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+' €' }} |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
|
|
|
@@ -581,10 +581,10 @@ $this->setPageTitle('Distributions') ; |
|
|
|
|
|
|
|
<script type="text/x-template" id="order-state-payment"> |
|
|
|
<div class="input-group"> |
|
|
|
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span> |
|
|
|
<span class="label label-default input-group-addon" v-else-if="order.amount_paid == 0">non réglé</span> |
|
|
|
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">débité</span> |
|
|
|
<span class="label label-default input-group-addon" v-else-if="order.amount_paid == 0">non débité</span> |
|
|
|
<span class="label label-default input-group-addon" v-else-if="order.amount_paid > order.amount">surplus</span> |
|
|
|
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span> |
|
|
|
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à débiter</span> |
|
|
|
|
|
|
|
<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span> |
|
|
|
</div> |
|
|
@@ -700,9 +700,6 @@ $this->setPageTitle('Distributions') ; |
|
|
|
</div> |
|
|
|
<div slot="footer"> |
|
|
|
<div class="actions-form"> |
|
|
|
<!--<button class="modal-default-button btn btn-primary" @click="submitFormCreate" v-if="!order.id && order.id_user > 0" data-process-credit="1">Créer et payer</button> |
|
|
|
<button class="modal-default-button btn btn-primary" @click="submitFormUpdate" v-if="order.id && order.id_user > 0" data-process-credit="1">Modifier et payer</button>--> |
|
|
|
|
|
|
|
<button class="modal-default-button btn btn-primary" @click="submitFormUpdate" v-if="order.id">Modifier</button> |
|
|
|
<button class="modal-default-button btn btn-primary" @click="submitFormCreate" v-if="!order.id">Créer</button> |
|
|
|
|
|
|
@@ -729,7 +726,7 @@ $this->setPageTitle('Distributions') ; |
|
|
|
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span> |
|
|
|
<span class="label label-default input-group-addon" v-else-if="order.amount_paid == 0">non réglé</span> |
|
|
|
<span class="label label-default input-group-addon" v-else-if="order.amount_paid > order.amount">surplus</span> |
|
|
|
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span> |
|
|
|
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à débiter</span> |
|
|
|
|
|
|
|
<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span> |
|
|
|
</div> |