Verified Commit d2b516b1 authored by John's avatar John
Browse files

Left join pour la jointure avec transactions.

parent 5b92c52b
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<th class="type_transaction" scope="col"><:campagnodon:label_type_transaction:></th> <th class="type_transaction" scope="col"><:campagnodon:label_type_transaction:></th>
<th class="id_transaction" scope="col">[(#TRI{id_transaction,<:campagnodon:label_transaction:>})]</th> <th class="id_transaction" scope="col">[(#TRI{id_transaction,<:campagnodon:label_transaction:>})]</th>
<th class='statut' scope='col'>[(#TRI{statut,<:bank:label_tri_statut:>,ajax})]</th> <th class='statut' scope='col'>[(#TRI{statut,<:bank:label_tri_statut:>,ajax})]</th>
<th class='transaction_mode' scope='col'><:bank:label_tri_mode:></th>
<th class="montant" scope="col"><:campagnodon:label_montant:></th> <th class="montant" scope="col"><:campagnodon:label_montant:></th>
<th class="mode" scope="col"><:campagnodon:label_mode:></th> <th class="mode" scope="col"><:campagnodon:label_mode:></th>
<th class="statut_synchronisation" scope="col">[(#TRI{date_synchronisation,<:campagnodon:label_derniere_synchronisation:>})]</th> <th class="statut_synchronisation" scope="col">[(#TRI{date_synchronisation,<:campagnodon:label_derniere_synchronisation:>})]</th>
...@@ -22,7 +23,8 @@ ...@@ -22,7 +23,8 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<BOUCLE_liste_campagnodon_transactions(CAMPAGNODON_TRANSACTIONS transactions) <BOUCLE_liste_campagnodon_transactions(CAMPAGNODON_TRANSACTIONS)
{campagnodon_jointure_transactions}
{statut_synchronisation?=#ENV{statut_synchronisation}} {statut_synchronisation?=#ENV{statut_synchronisation}}
{tri #ENV{par,id_campagnodon_transaction},#GET{defaut_tri}} {tri #ENV{par,id_campagnodon_transaction},#GET{defaut_tri}}
{pagination #ENV{nb,10}} {pagination #ENV{nb,10}}
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
title="<:info_numero_abbreviation|attribut_html:> #ID_TRANSACTION">#ID_TRANSACTION</a> title="<:info_numero_abbreviation|attribut_html:> #ID_TRANSACTION">#ID_TRANSACTION</a>
</td> </td>
<td class="statut">[(#STATUT|match{echec|ok|rembourse}|et{#MESSAGE|trim|strlen}|?{[<abbr title="[(#MESSAGE|attribut_html)[ - (#ERREUR|attribut_html)]]">(#STATUT)</abbr>],#STATUT})]</td> <td class="statut">[(#STATUT|match{echec|ok|rembourse}|et{#MESSAGE|trim|strlen}|?{[<abbr title="[(#MESSAGE|attribut_html)[ - (#ERREUR|attribut_html)]]">(#STATUT)</abbr>],#STATUT})]</td>
<td class="transaction_mode">[(#TRANSACTION_MODE|bank_afficher_mode)]</td>
<td class="montant">[(#MONTANT|bank_affiche_montant)]</td> <td class="montant">[(#MONTANT|bank_affiche_montant)]</td>
<td class="mode">#MODE</td> <td class="mode">#MODE</td>
<td class="statut_synchronisation"> <td class="statut_synchronisation">
......
<?php
/*
* Auteurs :
* John Livingston
* (c) 2022 - AGPL-v3
*
*/
if (!defined('_ECRIRE_INC_VERSION')){
return;
}
function critere_campagnodon_jointure_transactions_dist($idb, &$boucles, $crit) {
$boucle = &$boucles[$idb];
$boucle->from['transactions'] = 'spip_transactions';
$boucle->from_type['transactions'] = 'LEFT';
// le format de join est :
// array(table depart, cle depart [,cle arrivee[,condition optionnelle and ...]])
$boucle->join['transactions'] = array("'campagnodon_transactions'", "'id_transaction'", "'id_transaction'");
$boucle->select[] = 'transactions.mode AS transaction_mode'; // ce champ a un homonyme dans campagnodon_transactions, on contourne.
}
function balise_TRANSACTION_MODE_dist($p) {
return rindex_pile($p, 'transaction_mode', 'campagnodon_jointure_transactions');
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment