Author: benj
Date: Thu Jul 7 15:52:19 2016
New Revision: 1727
URL: http://svn.gna.org/viewcvs/gdtc?rev=1727&view=rev
Log:
Display modification comments
Modified:
trunk/gdtc/include/coherence.php
trunk/gdtc/templates/smarty/admin/display_modifs.tpl
Modified: trunk/gdtc/include/coherence.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/coherence.php?rev=1727&r1=1726&r2=1727&view=diff
==============================================================================
--- trunk/gdtc/include/coherence.php (original)
+++ trunk/gdtc/include/coherence.php Thu Jul 7 15:52:19 2016
@@ -136,7 +136,8 @@
$result = get_all_actor_details ( $id );
$changes [ 'renewal_date' ] = $result [ 'subscription' ] [ 'end_date' ];
$commit = commit ( 'membership', 'membership_id',
- $result [ 'membership' ] [ 'membership_id' ], $changes );
+ $result [ 'membership' ] [ 'membership_id' ], $changes,
+ "Fix auto incoherence" );
if ( $commit [ 'message' ] [ 'notice' ] )
print 'good';
else
@@ -194,7 +195,8 @@
$matches [ 1 ] - 1,
$matches [ 2 ], $matches [ 3 ] );
$commit = commit ( 'subscription', 'subscription_id',
- $result [ 'subscription' ] [ 'subscription_id' ], $changes
);
+ $result [ 'subscription' ] [ 'subscription_id' ], $changes,
+ "Fix auto incoherence" );
if ( $commit [ 'message' ] [ 'notice' ] )
print 'good';
else
@@ -232,7 +234,8 @@
$result = get_all_actor_details ( $id );
$changes [ 'renewal_date' ] = $result [ 'subscription' ] [ 'end_date' ];
$commit = commit ( 'membership', 'membership_id',
- $result [ 'membership' ] [ 'membership_id' ], $changes );
+ $result [ 'membership' ] [ 'membership_id' ], $changes,
+ "Fix auto incoherence" );
if ( $commit [ 'message' ] [ 'notice' ] )
print 'good';
else
@@ -302,7 +305,8 @@
$actor [ 'subscription' ] [ 'prelevement_amount' ],
sprintf ( "%04d-%02d-%02d\n", $year, $month, $day ) ) );
record_change ( 'added', 'subscription', 'subscription_id',
- mysql_insert_id(), '', '', '' );
+ mysql_insert_id(), '', '', '',
+ "Fix auto incoherence" );
/* Fix membership renewal_date as well. */
preg_match ( '/([0-9]*)-([0-9]*)-([0-9]*)/',
@@ -313,7 +317,8 @@
$matches [ 3 ] );
commit ( 'membership', 'membership_id',
$actor [ 'subscription'] [ 'membership_id' ],
- $changes );
+ $changes,
+ "Fix auto incoherence" );
print "good";
}
@@ -384,7 +389,8 @@
$actor [ 'subscription' ] [ 'prelevement_amount' ],
sprintf ( "%04d-%02d-%02d\n", $year, $month, $day ) ) );
record_change ( 'added', 'subscription', 'subscription_id',
- mysql_insert_id(), '', '', '' );
+ mysql_insert_id(), '', '', '',
+ "Fix auto incoherence" );
/* Fix membership renewal_date as well. */
preg_match ( '/([0-9]*)-([0-9]*)-([0-9]*)/',
@@ -395,7 +401,8 @@
$matches [ 3 ] );
commit ( 'membership', 'membership_id',
$actor [ 'subscription'] [ 'membership_id' ],
- $changes );
+ $changes,
+ "Fix auto incoherence" );
print "good";
}
@@ -478,7 +485,8 @@
{
record_change ( 'changed', 'subscription', 'subscription_id',
$orig['subscription_id'], 'amount', $orig [ 'amount'
],
- compute_real_cbrecur_amount ( $orig['start_date'],
$orig['end_date'], $orig['prelevement_amount'], $orig['cbrecur_prorata'] ) );
+ compute_real_cbrecur_amount ( $orig['start_date'],
$orig['end_date'], $orig['prelevement_amount'], $orig['cbrecur_prorata'] ),
+ "Fix auto incoherence" );
return print "good";
}
}
@@ -534,11 +542,14 @@
( "UPDATE subscription SET voucher = '%s', reference='%s',
cbrecur_prorata = 0, amount=%d WHERE subscription_id = '%d';",
$result [ 'voucher' ], $result [ 'reference' ],
compute_real_cbrecur_amount ( $result['start_date'], $result['end_date'],
$result['prelevement_amount'], $result['cbrecur_prorata'] ), $orig [
'subscription_id' ] ) ) )
record_change ( 'changed', 'subscription', 'subscription_id',
- $orig['subscription_id'], 'amount', $orig [ 'amount' ],
compute_real_cbrecur_amount ( $result['start_date'], $result['end_date'],
$result['prelevement_amount'], $result['cbrecur_prorata'] ) );
+ $orig['subscription_id'], 'amount', $orig [ 'amount' ],
compute_real_cbrecur_amount ( $result['start_date'], $result['end_date'],
$result['prelevement_amount'], $result['cbrecur_prorata'] ),
+ "Fix auto incoherence" );
record_change ( 'changed', 'subscription', 'subscription_id',
- $orig['subscription_id'], 'reference', $orig [
'reference' ], $result [ 'reference' ] );
+ $orig['subscription_id'], 'reference', $orig [
'reference' ], $result [ 'reference' ],
+ "Fix auto incoherence" );
record_change ( 'changed', 'subscription', 'subscription_id',
- $orig['subscription_id'], 'voucher', $orig [ 'voucher'
], $result [ 'voucher' ] );
+ $orig['subscription_id'], 'voucher', $orig [ 'voucher'
], $result [ 'voucher' ],
+ "Fix auto incoherence" );
return print "good";
}
Modified: trunk/gdtc/templates/smarty/admin/display_modifs.tpl
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/templates/smarty/admin/display_modifs.tpl?rev=1727&r1=1726&r2=1727&view=diff
==============================================================================
--- trunk/gdtc/templates/smarty/admin/display_modifs.tpl (original)
+++ trunk/gdtc/templates/smarty/admin/display_modifs.tpl Thu Jul 7
15:52:19 2016
@@ -10,6 +10,7 @@
<th>Ancienne valeur</th>
<th> </th>
<th>Nouvelle valeur</th>
+ <th>Commentaire</th>
</tr>
{/if}
{strip}
@@ -33,6 +34,7 @@
{else}
<td colspan="4">{$additional.modifications[modif].field_name}</td>
{/if}
+ <td>{$additional.modifications[modif].comment}</td>
</tr>
{/strip}
{if $smarty.section.modif.last}
_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits