浏览代码

[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) {

正在加载...
取消
保存