Procházet zdrojové kódy

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

feature/souke
Guillaume Bourgeois před 1 rokem
rodič
revize
1dab903b41
2 změnil soubory, kde provedl 11 přidání a 2 odebrání
  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 Zobrazit soubor

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

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


Načítá se…
Zrušit
Uložit