Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a666237
Choose a base ref
...
head repository: mantisbt/mantisbt
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50c2a46
Choose a head ref
  • 3 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 19, 2011

  1. Fix #11662: Allow decimal costs in time tracking/billing

    Previously the cost was retrieved from the form using gpc_get_int(), and
    error 203 was triggered when decimal values were entered. We now get the
    field as a string and convert it using floatval().
    dregad committed Sep 19, 2011
    Copy the full SHA
    b5a3b8c View commit details
  2. Fix #13338: Time tracking cost column font size

    There was no class specified on the td tag for the cost column.
    dregad committed Sep 19, 2011
    Copy the full SHA
    e93f4d7 View commit details
  3. Cosmetic changes in the time tracking table layout

      - reset the alternating line colors at start of each block
      - use bold font for Totals line
      - right-align the cost column
    dregad committed Sep 19, 2011
    Copy the full SHA
    50c2a46 View commit details
Showing with 27 additions and 22 deletions.
  1. +24 −19 billing_inc.php
  2. +3 −3 bugnote_stats_inc.php
43 changes: 24 additions & 19 deletions billing_inc.php
Original file line number Diff line number Diff line change
@@ -79,7 +79,10 @@
$t_bugnote_stats_to_y = gpc_get_int('end_year', $t_bugnote_stats_to_def_y);

$f_get_bugnote_stats_button = gpc_get_string('get_bugnote_stats_button', '');
$f_bugnote_cost = gpc_get_int( 'bugnote_cost', '' );

# Retrieve the cost as a string and convert to floating point
$f_bugnote_cost = floatval( gpc_get_string( 'bugnote_cost', '' ) );

$f_project_id = helper_get_current_project();

if ( ON == config_get( 'time_tracking_with_billing' ) ) {
@@ -171,15 +174,15 @@
?>
<br />
<table class="width100" cellspacing="0">
<tr class="row-category-history">
<td class="small-caption">
<tr class="row-category2">
<td class="small-caption bold">
<?php echo lang_get( $t_name_field ) ?>
</td>
<td class="small-caption">
<td class="small-caption bold">
<?php echo lang_get( 'time_tracking' ) ?>
</td>
<?php if ( $t_cost_col) { ?>
<td class="small-caption">
<td class="small-caption bold right">
<?php echo lang_get( 'time_tracking_cost' ) ?>
</td>
<?php } ?>
@@ -204,6 +207,7 @@
$t_link = sprintf( lang_get( 'label' ), string_get_bug_view_link( $t_item['bug_id'] ) ) . lang_get( 'word_separator' ) . string_display( $t_item['summary'] );
echo '<tr class="row-category-history"><td colspan="4">' . $t_link . "</td></tr>";
$t_prev_id = $t_item['bug_id'];
helper_alternate_class( 1 );
}
?>
<tr <?php echo helper_alternate_class() ?>>
@@ -214,23 +218,23 @@
<?php echo $t_item['sum_time_tracking'] ?>
</td>
<?php if ($t_cost_col) { ?>
<td>
<td class="small-caption right">
<?php echo string_attribute( number_format( $t_item['cost'], 2 ) ); ?>
</td>
<?php } ?>
</tr>

<?php } # end for loop ?>

<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption">
<tr class="row-category2">
<td class="small-caption bold">
<?php echo lang_get( 'total_time' ); ?>
</td>
<td class="small-caption">
<td class="small-caption bold">
<?php echo db_minutes_to_hhmm( $t_sum_in_minutes ); ?>
</td>
<?php if ( $t_cost_col ) { ?>
<td>
<td class="small-caption bold right">
<?php echo string_attribute( number_format( $t_sum_in_minutes * $f_bugnote_cost / 60, 2 ) ); ?>
</td>
<?php } ?>
@@ -241,21 +245,22 @@
<br />

<table class="width100" cellspacing="0">
<tr class="row-category-history">
<td class="small-caption">
<tr class="row-category2">
<td class="small-caption bold">
<?php echo lang_get( $t_name_field ) ?>
</td>
<td class="small-caption">
<td class="small-caption bold">
<?php echo lang_get( 'time_tracking' ) ?>
</td>
<?php if ( $t_cost_col ) { ?>
<td class="small-caption">
<td class="small-caption bold right">
<?php echo lang_get( 'time_tracking_cost' ) ?>
</td>
<?php } ?>
</tr>

<?php
helper_alternate_class( 1 );
foreach ( $t_user_summary as $t_username => $t_total_time ) {
?>
<tr <?php echo helper_alternate_class() ?>>
@@ -266,21 +271,21 @@
<?php echo db_minutes_to_hhmm($t_total_time); ?>
</td>
<?php if ( $t_cost_col ) { ?>
<td>
<td class="small-caption right">
<?php echo string_attribute( number_format( $t_total_time * $f_bugnote_cost / 60, 2 ) ); ?>
</td>
<?php } ?>
</tr>
<?php } ?>
<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption">
<tr class="row-category2">
<td class="small-caption bold">
<?php echo lang_get( 'total_time' ); ?>
</td>
<td class="small-caption">
<td class="small-caption bold">
<?php echo db_minutes_to_hhmm( $t_sum_in_minutes ); ?>
</td>
<?php if ( $t_cost_col ) { ?>
<td>
<td class="small-caption bold right">
<?php echo string_attribute( number_format( $t_sum_in_minutes * $f_bugnote_cost / 60, 2 ) ); ?>
</td>
<?php } ?>
6 changes: 3 additions & 3 deletions bugnote_stats_inc.php
Original file line number Diff line number Diff line change
@@ -175,11 +175,11 @@
<?php
} # end for loop
?>
<tr <?php echo helper_alternate_class() ?>>
<td class="small-caption">
<tr class="row-category2">
<td class="small-caption bold">
<?php echo lang_get( 'total_time' ) ?>
</td>
<td class="small-caption">
<td class="small-caption bold">
<?php echo db_minutes_to_hhmm ( $t_sum_in_minutes ) ?>
</td>
</tr>