Pārlūkot izejas kodu

Correctif débit commandes issues d'abonnement avec débit automatique

feature/souke
Guillaume Bourgeois pirms 1 gada
vecāks
revīzija
1dab903b41
2 mainītis faili ar 11 papildinājumiem un 2 dzēšanām
  1. +1
    -1
      backend/views/distribution/index.php
  2. +10
    -1
      common/logic/Order/Order/Repository/OrderRepository.php

+ 1
- 1
backend/views/distribution/index.php Parādīt failu

@@ -399,7 +399,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.amount != 0 && 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.isCreditAutoPayment && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>

<div v-if="order.amount_paid > 0 && order.amount_paid < order.amount">
<span class="glyphicon glyphicon-alert"></span> Reste à payer

+ 10
- 1
common/logic/Order/Order/Repository/OrderRepository.php Parādīt failu

@@ -333,8 +333,17 @@ class OrderRepository extends AbstractRepository

public function isCreditAutoPayment(Order $order, bool $debitCreditOnFunctioningOptional = false)
{
$pointSale = $order->pointSale;
if($order->subscription) {
if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_YES) {
return true;
}

if($order->subscription->auto_payment == Subscription::AUTO_PAYMENT_NO) {
return false;
}
}

$pointSale = $order->pointSale;
if($pointSale) {
$creditFunctioning = $this->producerRepository->getPointSaleCreditFunctioning($pointSale);


Notiek ielāde…
Atcelt
Saglabāt