Adjust league table adjustment filter

This commit is contained in:
Brian Miyaji
2014-06-13 19:01:03 +10:00
parent a71ce847a9
commit 8deb52393e

View File

@@ -263,10 +263,10 @@ class SP_League_Table extends SP_Custom_Post{
$placeholder = sp_solve( $stat->equation, sp_array_value( $totals, $team_id, array() ), $stat->precision ); $placeholder = sp_solve( $stat->equation, sp_array_value( $totals, $team_id, array() ), $stat->precision );
// Adjustments // Adjustments
$placeholder += sp_array_value( sp_array_value( $adjustments, $team_id, array() ), $stat->post_name, 0 ); $adjustment = sp_array_value( $adjustments, $team_id, array() );
// Format number if ( $adjustment != 0 ):
if ( $placeholder != '-' ): $placeholder += sp_array_value( $adjustment, $stat->post_name, 0 );
$placeholder = number_format( $placeholder, $stat->precision ); $placeholder = number_format( $placeholder, $stat->precision );
endif; endif;
endif; endif;