freeside/httemplate/view cust_main.cgi,1.89,1.90
ivan
ivan at pouncequick.420.am
Tue Oct 26 04:26:40 PDT 2004
- Previous message: freeside/FS/FS/part_pkg flat.pm,NONE,1.1 flat_comission.pm,NONE,1.1 flat_comission_cust.pm,NONE,1.1 flat_comission_pkg.pm,NONE,1.1 flat_delayed.pm,NONE,1.1 prorate.pm,NONE,1.1 sesmon_hour.pm,NONE,1.1 sesmon_minute.pm,NONE,1.1 sql_external.pm,NONE,1.1 sql_generic.pm,NONE,1.1 sqlradacct_hour.pm,NONE,1.1 subscription.pm,NONE,1.1
- Next message: freeside/httemplate/edit part_pkg.cgi,1.44,1.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory pouncequick:/tmp/cvs-serv3074/httemplate/view
Modified Files:
cust_main.cgi
Log Message:
modular price plans!
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- cust_main.cgi 22 Oct 2004 10:31:22 -0000 1.89
+++ cust_main.cgi 26 Oct 2004 11:26:34 -0000 1.90
@@ -411,27 +411,13 @@
#}
print "<TD ROWSPAN=$rowspan>". &itable('');
- sub freq {
-
- #false laziness w/edit/part_pkg.cgi
- my %freq = ( #move this
- '1d' => 'daily',
- '1w' => 'weekly',
- '2w' => 'biweekly (every 2 weeks)',
- '1' => 'monthly',
- '2' => 'bimonthly (every 2 months)',
- '3' => 'quarterly (every 3 months)',
- '6' => 'semiannually (every 6 months)',
- '12' => 'annually',
- '24' => 'biannually (every 2 years)',
- );
-
- my $freq = shift;
- exists $freq{$freq} ? $freq{$freq} : "every $freq months";
+ sub myfreq {
+ my $part_pkg = shift;
+ my $freq = $part_pkg->freq_pretty;
+ $freq =~ s/ / /g;
+ $freq;
}
- #eomove
-
if ( $pkg->{cancel} ) { #status: cancelled
print '<TR><TD><FONT COLOR="#ff0000"><B>Cancelled </B></FONT></TD>'.
@@ -480,7 +466,7 @@
print '<TR><TD COLSPAN=2>( '. pkg_cancel_link($pkg).
' )</TD</TR>';
} else {
- print 'billed '. freq($pkg->{freq}). ')</TD></TR>';
+ print 'billed '. myfreq($pkg->{part_pkg}). ')</TD></TR>';
}
} else { #setup
@@ -491,7 +477,7 @@
pkg_datestr($pkg,'setup',$conf). '</TD></TR>';
} else {
print '<TR><TD COLSPAN=2><FONT COLOR="#00CC00"><B>Active</B></FONT>'.
- ', billed '. freq($pkg->{freq}). '</TD></TR>'.
+ ', billed '. myfreq($pkg->{part_pkg}). '</TD></TR>'.
'<TR><TD>Setup </TD><TD>'.
pkg_datestr($pkg, 'setup',$conf). '</TD></TR>';
}
@@ -900,8 +886,13 @@
) {
my $part_pkg = $cust_pkg->part_pkg;
-
+
my %pkg = ();
+
+ #to get back to the original object... should use it in the first place!!
+ $pkg{cust_pkg} = $cust_pkg;
+ $pkg{part_pkg} = $part_pkg;
+
$pkg{pkgnum} = $cust_pkg->pkgnum;
$pkg{pkg} = $part_pkg->pkg;
$pkg{pkgpart} = $part_pkg->pkgpart;
@@ -913,6 +904,7 @@
$pkg{susp} = $cust_pkg->getfield('susp');
$pkg{expire} = $cust_pkg->getfield('expire');
$pkg{cancel} = $cust_pkg->getfield('cancel');
+
my %svcparts = map {
$_->svcpart => {
- Previous message: freeside/FS/FS/part_pkg flat.pm,NONE,1.1 flat_comission.pm,NONE,1.1 flat_comission_cust.pm,NONE,1.1 flat_comission_pkg.pm,NONE,1.1 flat_delayed.pm,NONE,1.1 prorate.pm,NONE,1.1 sesmon_hour.pm,NONE,1.1 sesmon_minute.pm,NONE,1.1 sql_external.pm,NONE,1.1 sql_generic.pm,NONE,1.1 sqlradacct_hour.pm,NONE,1.1 subscription.pm,NONE,1.1
- Next message: freeside/httemplate/edit part_pkg.cgi,1.44,1.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list