Переглянути джерело

[Administration] Crédit : statut "Payé" remplacé par "Débité" #156

feature/souke
Guillaume Bourgeois 1 рік тому
джерело
коміт
a94ca89449
4 змінених файлів з 27 додано та 30 видалено
  1. +17
    -20
      backend/views/distribution/index.php
  2. +4
    -4
      backend/views/distribution/report.php
  3. +4
    -4
      backend/views/order/report.php
  4. +2
    -2
      common/logic/User/CreditHistory/Service/CreditHistorySolver.php

+ 17
- 20
backend/views/distribution/index.php Переглянути файл

@@ -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>

+ 4
- 4
backend/views/distribution/report.php Переглянути файл

@@ -61,7 +61,7 @@ foreach ($pointsSaleArray as $pointSale) {
if (count($pointSale->orders)) {
$html .= '<h3>'.$pointSale->name.'</h3>' ;
$colCredit = ($pointSale->credit) ? '<th>Rappel crédit</th>' : '' ;
$colCredit = ($pointSale->credit) ? '<th>Crédit</th>' : '' ;
$html .= '<table class="">'
. '<thead>'
@@ -138,15 +138,15 @@ foreach ($pointsSaleArray as $pointSale) {

if($orderManager->getPaymentStatus($order) == Order::PAYMENT_PAID)
{
$html .= '(payé)' ;
$html .= '(débité)' ;
}
elseif($orderManager->getPaymentStatus($order) == Order::PAYMENT_UNPAID && $orderManager->getOrderAmount($order, Order::AMOUNT_PAID))
{
$html .= '(reste '.$orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING, true).' à payer)' ;
$html .= '(reste '.$orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING, true).' à débiter)' ;
}
elseif($orderManager->getPaymentStatus($order) == Order::PAYMENT_SURPLUS)
{
$html .= '(surplus : '.$orderManager->getOrderAmount($order, Order::PAYMENT_SURPLUS, true).' à rembourser)' ;
$html .= '(surplus : '.$orderManager->getOrderAmount($order, Order::PAYMENT_SURPLUS, true).' à recréditer)' ;
}
$html .= '</strong></td>' ;

+ 4
- 4
backend/views/order/report.php Переглянути файл

@@ -52,7 +52,7 @@ foreach ($pointsSaleArray as $pointSale) {
if (count($pointSale->orders) && strlen($pointSale->$fieldInfosPointSale)) {
$html .= '<h3>'.$pointSale->name.'</h3>' ;
$colCredit = ($pointSale->credit) ? '<th>Rappel crédit</th>' : '' ;
$colCredit = ($pointSale->credit) ? '<th>Crédit</th>' : '' ;
$html .= '<table class="table table-bordered">'
. '<thead>'
@@ -115,15 +115,15 @@ foreach ($pointsSaleArray as $pointSale) {

if($orderManager->getPaymentStatus($order) == Order::PAYMENT_PAID)
{
$html .= '(payé)' ;
$html .= '(débité)' ;
}
elseif($orderManager->getPaymentStatus($order) == Order::PAYMENT_UNPAID && $orderManager->getOrderAmount($order, Order::AMOUNT_PAID))
{
$html .= '(reste '.$orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING, true).' à payer)' ;
$html .= '(reste '.$orderManager->getOrderAmount($order, Order::AMOUNT_REMAINING, true).' à débiter)' ;
}
elseif($orderManager->getPaymentStatus($order) == Order::PAYMENT_SURPLUS)
{
$html .= '(surplus : '.$orderManager->getOrderAmount($order, Order::PAYMENT_SURPLUS, true).' à rembourser)' ;
$html .= '(surplus : '.$orderManager->getOrderAmount($order, Order::PAYMENT_SURPLUS, true).' à recréditer)' ;
}
$html .= '</strong></td>' ;

+ 2
- 2
common/logic/User/CreditHistory/Service/CreditHistorySolver.php Переглянути файл

@@ -51,9 +51,9 @@ class CreditHistorySolver extends AbstractService implements SolverInterface
} elseif (CreditHistory::TYPE_CREDIT == $type) {
$str = 'Crédit';
} elseif (CreditHistory::TYPE_PAYMENT == $type) {
$str = 'Paiement';
$str = 'Débit';
} elseif (CreditHistory::TYPE_REFUND == $type) {
$str = 'Remboursement';
$str = 'Recrédit';
} elseif (CreditHistory::TYPE_DEBIT == $type) {
$str = 'Débit';
}

Завантаження…
Відмінити
Зберегти