summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorjeff <jeff>2007-10-02 15:11:48 +0000
committerjeff <jeff>2007-10-02 15:11:48 +0000
commit91dbef4f8a693cba3aeb0d014611b944785be1d1 (patch)
tree85e6b95c60a5ed2e4daccad6e5187ceb97dd6ac4 /httemplate
parentdc847cc499934b48c9da04bd0adb9c500ea6c0ac (diff)
missed file in self service support usage improvements
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/misc/process/timeworked.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/httemplate/misc/process/timeworked.html b/httemplate/misc/process/timeworked.html
index 8e1a66336..9f0399531 100644
--- a/httemplate/misc/process/timeworked.html
+++ b/httemplate/misc/process/timeworked.html
@@ -10,14 +10,17 @@ die "access denied"
my %multipliers = map { /^custnum(\d+)$/; ($cgi->param("custnum$1") => $cgi->param("multiplier$1")); }
grep /^custnum\d+$/, $cgi->param;
+my $msum = 0;
+foreach(values %multipliers) {$msum += $_};
my @acct_rt_transaction;
foreach my $transaction (
map { /^transactionid(\d+)$/; $1; } grep /^transactionid\d+$/, $cgi->param
) {
my $seconds = $cgi->param("seconds$transaction");
- my %seconds = map { $_ => sprintf("%.0f", $seconds * $multipliers{$_}) }
- (keys %multipliers);
+ my %seconds =
+ map { $_ => sprintf("%.0f", $seconds * $multipliers{$_} / $msum) }
+ (keys %multipliers);
my $sum = 0;
my $count = 0;
foreach (values %seconds) {
@@ -39,6 +42,7 @@ foreach my $transaction (
'custnum' => $customer,
'transaction_id' => $transaction,
'seconds' => $seconds{$customer},
+ 'support' => $seconds{$customer} * $msum,
};
}