[freeside-commits] freeside/httemplate/edit/process part_pkg.cgi, 1.19, 1.20 svc_acct.cgi, 1.7, 1.8
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed Apr 11 20:16:45 PDT 2007
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail:/tmp/cvs-serv7777/httemplate/edit/process
Modified Files:
part_pkg.cgi svc_acct.cgi
Log Message:
input and output on data volume fields specified with k,m,g,or t
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/svc_acct.cgi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- svc_acct.cgi 5 Dec 2006 02:37:14 -0000 1.7
+++ svc_acct.cgi 12 Apr 2007 03:16:43 -0000 1.8
@@ -23,6 +23,11 @@
%#unmunge usergroup
%$cgi->param('usergroup', [ $cgi->param('radius_usergroup') ] );
%
+%#unmunge bytecounts
+%foreach (map { $_,$_."_threshold" } qw( upbytes downbytes totalbytes )) {
+% $cgi->param($_, FS::UI::Web::parse_bytecount($cgi->param($_)) );
+%}
+%
%my %hash = $svcnum ? $old->hash : ();
%map {
% $hash{$_} = scalar($cgi->param($_));
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/part_pkg.cgi,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- part_pkg.cgi 26 Feb 2007 17:54:19 -0000 1.19
+++ part_pkg.cgi 12 Apr 2007 03:16:43 -0000 1.20
@@ -6,11 +6,17 @@
%
%my $old = qsearchs('part_pkg',{'pkgpart'=>$pkgpart}) if $pkgpart;
%
+%tie my %plans, 'Tie::IxHash', %{ FS::part_pkg::plan_info() };
+%my $href = $plans{$cgi->param('plan')}->{'fields'};
+%
%#fixup plandata
%my $plandata = $cgi->param('plandata');
%my @plandata = split(',', $plandata);
%$cgi->param('plandata',
-% join('', map { "$_=". join(', ', $cgi->param($_)). "\n" } @plandata )
+% join('', map { my $parser = sub { shift };
+% $parser = $href->{$_}{parse} if exists($href->{$_}{parse});
+% "$_=". join(', ', &$parser($cgi->param($_))). "\n"
+% } @plandata )
%);
%
%foreach (qw( setuptax recurtax disabled )) {
More information about the freeside-commits
mailing list