[freeside-commits] freeside/httemplate/misc/process timeworked.html, 1.3, 1.4
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Oct 2 08:11:55 PDT 2007
Update of /home/cvs/cvsroot/freeside/httemplate/misc/process
In directory wavetail:/tmp/cvs-serv19045/httemplate/misc/process
Modified Files:
timeworked.html
Log Message:
missed file in self service support usage improvements
Index: timeworked.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/misc/process/timeworked.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- timeworked.html 13 Sep 2007 22:35:20 -0000 1.3
+++ timeworked.html 2 Oct 2007 15:11:48 -0000 1.4
@@ -10,14 +10,17 @@
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 @@
'custnum' => $customer,
'transaction_id' => $transaction,
'seconds' => $seconds{$customer},
+ 'support' => $seconds{$customer} * $msum,
};
}
More information about the freeside-commits
mailing list