Преглед на файлове

[Administration] Distributions > liste commandes : libellé "Gratuit" si montant à 0€ #1262

feature/souke
Guillaume Bourgeois преди 1 година
родител
ревизия
8ce6d78360
променени са 2 файла, в които са добавени 7 реда и са изтрити 4 реда
  1. +1
    -1
      backend/views/distribution/index.php
  2. +6
    -3
      common/logic/Order/Order/Repository/OrderRepository.php

+ 1
- 1
backend/views/distribution/index.php Целия файл

@@ -392,7 +392,7 @@ $this->setPageTitle('Distributions') ;
<a href="javascript:void(0);" @click="orderPaymentModalClick" :data-id-order="order.id">
<order-state-payment :order="order" :producer="producer"></order-state-payment>
</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 class="column-credit" v-if="!idActivePointSale || (pointSaleActive && pointSaleActive.credit == 1)">
<template v-if="order.isCreditContext">

+ 6
- 3
common/logic/Order/Order/Repository/OrderRepository.php Целия файл

@@ -543,10 +543,10 @@ class OrderRepository extends AbstractRepository
$titleLabel = '';

if(!$amountPaid) {
if($isOrderPaid) {
if($isOrderPaid && $amountTotal != 0) {
$label = 'Facture payée';
}
elseif($this->isCreditAutoPayment($order)) {
elseif($this->isCreditAutoPayment($order) && $amountTotal != 0) {
if($order->subscription && $order->subscription->auto_payment == 0) {
$label = 'Crédit désactivé';
}
@@ -554,6 +554,9 @@ class OrderRepository extends AbstractRepository
$label = 'Crédit non débité';
}
}
elseif($amountTotal == 0) {
$label = 'Gratuit';
}
else {
$label = 'Non réglé';
}
@@ -578,7 +581,7 @@ class OrderRepository extends AbstractRepository
$classLabel = 'warning';
$titleLabel = 'Paiement en surplus';
}
elseif($isOrderPaid) {
elseif(($isOrderPaid && $amountTotal != 0) || $amountTotal == 0) {
$classLabel = 'success';
}
elseif($orderPaymentStatus == Order::PAYMENT_UNPAID) {

Loading…
Отказ
Запис