Author: benj
Date: Thu Jul 7 14:42:34 2016
New Revision: 1724
URL: http://svn.gna.org/viewcvs/gdtc?rev=1724&view=rev
Log:
Fix incoherence computation (closes: #24826)
Modified:
trunk/gdtc/include/coherence.php
Modified: trunk/gdtc/include/coherence.php
URL:
http://svn.gna.org/viewcvs/gdtc/trunk/gdtc/include/coherence.php?rev=1724&r1=1723&r2=1724&view=diff
==============================================================================
--- trunk/gdtc/include/coherence.php (original)
+++ trunk/gdtc/include/coherence.php Thu Jul 7 14:42:34 2016
@@ -434,7 +434,7 @@
$interval = $date1->diff($date2);
$months = $interval->format('%m') + $interval->format('%y')*12;
if ( date_format($date1, 'd' ) > 5 ) $months--;
- if ( date_format($date2, 'd' ) >= 5 ) $months++;
+ if ( date_format($date2, 'd' ) > 5 ) $months++;
#if ( date_format($date1, 'd' ) == date_format($date2, 'd' ) ) $months--;
return $months * $result [ 'prelevement_amount' ] + $result [
'cbrecur_prorata' ];
}
_______________________________________________
Gdtc-commits mailing list
[email protected]
https://mail.gna.org/listinfo/gdtc-commits