Index: civicrm/trunk/sites/all/modules/contribution_audit/contribution_audit.module |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | $allocated = array(); // country => $ |
53 | 53 | // find the info from missing trxns |
54 | 54 | $missing_trxns = contribution_audit_find_missing_trxns( $start_date, $end_date ); |
| 55 | + watchdog( 'contribution_audit', 'Total missing transactions: @num', array('@num' => count( $missing_trxns )), WATCHDOG_DEBUG ); |
55 | 56 | foreach ( $missing_trxns as $missing_trxn ) { |
56 | 57 | // what happens if we still dont have country data? |
57 | 58 | if ( !strlen($missing_trxn[ 'country' ])) { |
— | — | @@ -70,7 +71,7 @@ |
71 | 72 | $allocated[ $trxn[ 'country' ]][ 'count' ] = 1; |
72 | 73 | } else { |
73 | 74 | $allocated[ $trxn[ 'country' ]][ 'amnt' ] += $trxn[ 'gross' ]; |
74 | | - $allocated[ $trxn[ 'country' ]][ 'count' ]++; |
| 75 | + $allocated[ $trxn[ 'country' ]][ 'count' ] += 1; |
75 | 76 | } |
76 | 77 | } |
77 | 78 | |
Index: civicrm/trunk/sites/all/modules/contribution_audit/allocate_unallocated_contribs.drush.inc |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | function allocate_unallocated_contribs_merge( &$allocated, $local_allocated ) { |
77 | 77 | foreach ( $local_allocated as $country => $data ) { |
78 | 78 | if ( !in_array( $country, array_keys( $allocated ))) { |
79 | | - $allocated = array_merge( $allocated, $local_allocated ); |
| 79 | + $allocated[$country] = $local_allocated[$country]; |
80 | 80 | } else { |
81 | 81 | $allocated[ $country ][ 'amnt' ] += $local_allocated[ $country ][ 'amnt' ]; |
82 | 82 | $allocated[ $country ][ 'count' ] += $local_allocated[ $country ][ 'count' ]; |