From 5a753503a060c1ee043664186febe455f984e97e Mon Sep 17 00:00:00 2001
From: Julien Jorry <julien.jorry@gmail.com>
Date: Fri, 5 Aug 2022 16:22:23 +0200
Subject: [PATCH] Fix solidoume command for redistribution don bug + fix solidoume item show

---
 src/Command/SolidoumeCommand.php                                                                 | 2 +-
 templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_prelevements.html.twig    | 2 +-
 templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_redistributions.html.twig | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Command/SolidoumeCommand.php b/src/Command/SolidoumeCommand.php
index f576446..4780410 100644
--- a/src/Command/SolidoumeCommand.php
+++ b/src/Command/SolidoumeCommand.php
@@ -265,7 +265,7 @@ class SolidoumeCommand extends Command
                 $operationUtils = $this->operationUtils;
                 $callback = function () use ($em, $items, $isTest, $io, $totalByParticipant, $operationUtils) {
                     foreach ($items as $item) {
-                        if ($this->isItemPayedThisMonth($item)) {
+                        if ($this->isItemPayedThisMonth($item) && !$item->getIsDonation()) {
                             // Envoi de l'emlc sur le compte de l'adherent
                             $flux = new TransactionPrestataireAdherent();
                             $flux->setExpediteur($em->getRepository(Prestataire::class)->getPrestataireSolidoume());
diff --git a/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_prelevements.html.twig b/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_prelevements.html.twig
index 3432bbe..d908cf9 100644
--- a/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_prelevements.html.twig
+++ b/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_prelevements.html.twig
@@ -1,4 +1,4 @@
-{% extends admin.getTemplate('base_show_field') %}
+{% extends '@SonataAdmin/CRUD/base_show_field.html.twig' %}
 
 {% block field %}
     {%- spaceless %}
diff --git a/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_redistributions.html.twig b/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_redistributions.html.twig
index 354a435..1741d15 100644
--- a/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_redistributions.html.twig
+++ b/templates/themes/kohinos/bundles/SonataAdminBundle/CRUD/show_solidoume_redistributions.html.twig
@@ -1,4 +1,4 @@
-{% extends admin.getTemplate('base_show_field') %}
+{% extends '@SonataAdmin/CRUD/base_show_field.html.twig' %}
 
 {% block field %}
     {%- spaceless %}
--
libgit2 0.26.0