[freeside-commits]
freeside/httemplate/view cust_bill-logo.cgi, 1.5,
1.6 cust_bill-pdf.cgi, 1.7, 1.8 cust_bill-ps.cgi, 1.4,
1.5 cust_bill.cgi, 1.35, 1.36 cust_main.cgi, 1.103,
1.104 cust_pkg.cgi, 1.14, 1.15 svc_acct.cgi, 1.45,
1.46 svc_broadband.cgi, 1.9, 1.10 svc_domain.cgi, 1.20,
1.21 svc_external.cgi, 1.5, 1.6 svc_forward.cgi, 1.13,
1.14 svc_phone.cgi, 1.1, 1.2 svc_www.cgi, 1.12, 1.13
Ivan,,,
ivan at wavetail.420.am
Wed Aug 23 15:25:40 PDT 2006
- Previous message: [freeside-commits]
freeside/httemplate/graph cust_bill_pkg.cgi, 1.3,
1.4 money_time.cgi, 1.14, 1.15 report_cust_bill_pkg.html, 1.1,
1.2 report_money_time.html, 1.2, 1.3
- Next message: [freeside-commits] freeside/httemplate/misc/process
batch-cust_pay.cgi, 1.2, 1.3 catchall.cgi, 1.4,
1.5 cdr-import.html, 1.2, 1.3 cust_main-import.cgi, 1.4,
1.5 cust_main-import_charges.cgi, 1.3, 1.4 delete-customer.cgi,
1.4, 1.5 expire_pkg.cgi, 1.1, 1.2 inventory_item-import.html,
1.2, 1.3 link.cgi, 1.14, 1.15 meta-import.cgi, 1.6,
1.7 payment.cgi, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail:/tmp/cvs-serv18630/httemplate/view
Modified Files:
cust_bill-logo.cgi cust_bill-pdf.cgi cust_bill-ps.cgi
cust_bill.cgi cust_main.cgi cust_pkg.cgi svc_acct.cgi
svc_broadband.cgi svc_domain.cgi svc_external.cgi
svc_forward.cgi svc_phone.cgi svc_www.cgi
Log Message:
Will things ever be the same again?
It's the final masonize
Index: cust_bill-logo.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill-logo.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cust_bill-logo.cgi 6 Oct 2005 23:09:39 -0000 1.5
+++ cust_bill-logo.cgi 23 Aug 2006 22:25:38 -0000 1.6
@@ -1,15 +1,16 @@
-<%
-
-my $conf = new FS::Conf;
-
-my($query) = $cgi->keywords;
-$query =~ /^([^\.\/]*)$/;
-my $templatename = $1;
-if ( $templatename && $conf->exists("logo_$templatename.png") ) {
- $templatename = "_$templatename";
-} else {
- $templatename = '';
-}
-
-http_header('Content-Type' => 'image/png' );
-%><%= $conf->config_binary("logo$templatename.png") %>
+%
+%
+%my $conf = new FS::Conf;
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^([^\.\/]*)$/;
+%my $templatename = $1;
+%if ( $templatename && $conf->exists("logo_$templatename.png") ) {
+% $templatename = "_$templatename";
+%} else {
+% $templatename = '';
+%}
+%
+%http_header('Content-Type' => 'image/png' );
+%
+<% $conf->config_binary("logo$templatename.png") %>
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main.cgi,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- cust_main.cgi 13 Aug 2006 10:25:58 -0000 1.103
+++ cust_main.cgi 23 Aug 2006 22:25:38 -0000 1.104
@@ -1,23 +1,25 @@
-<%
-
-my $conf = new FS::Conf;
+%
+%
+%my $conf = new FS::Conf;
+%
+%my $curuser = $FS::CurrentUser::CurrentUser;
+%
+%die "No customer specified (bad URL)!" unless $cgi->keywords;
+%my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
+%$query =~ /^(\d+)$/;
+%my $custnum = $1;
+%my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
+%die "Customer not found!" unless $cust_main;
+%
+%
-my $curuser = $FS::CurrentUser::CurrentUser;
-die "No customer specified (bad URL)!" unless $cgi->keywords;
-my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array
-$query =~ /^(\d+)$/;
-my $custnum = $1;
-my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum});
-die "Customer not found!" unless $cust_main;
-
-%>
+<% include("/elements/header.html","Customer View: ". $cust_main->name ) %>
+% if ( $curuser->access_right('Edit customer') ) {
-<%= include("/elements/header.html","Customer View: ". $cust_main->name ) %>
+ <A HREF="<% $p %>edit/cust_main.cgi?<% $custnum %>">Edit this customer</A> |
+% }
-<% if ( $curuser->access_right('Edit customer') ) { %>
- <A HREF="<%= $p %>edit/cust_main.cgi?<%= $custnum %>">Edit this customer</A> |
-<% } %>
<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT>
@@ -33,96 +35,100 @@
</SCRIPT>
<SCRIPT TYPE="text/javascript">
+%
+%my $ban = '';
+%if ( $cust_main->payby =~ /^(CARD|DCRD|CHEK|DCHK)$/ ) {
+% $ban = '<BR><P ALIGN="center">'.
+% '<INPUT TYPE="checkbox" NAME="ban" VALUE="1"> Ban this customer\\\'s ';
+% if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
+% $ban .= 'credit card';
+% } elsif ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
+% $ban .= 'ACH account';
+% }
+%}
+%
-<%
-my $ban = '';
-if ( $cust_main->payby =~ /^(CARD|DCRD|CHEK|DCHK)$/ ) {
- $ban = '<BR><P ALIGN="center">'.
- '<INPUT TYPE="checkbox" NAME="ban" VALUE="1"> Ban this customer\\\'s ';
- if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) {
- $ban .= 'credit card';
- } elsif ( $cust_main->payby =~ /^(CHEK|DCHK)$/ ) {
- $ban .= 'ACH account';
- }
-}
-%>
-var confirm_cancel = '<FORM METHOD="POST" ACTION="<%= $p %>misc/cust_main-cancel.cgi"> <INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $custnum %>"> <BR><P ALIGN="center"><B>Permanently delete all services and cancel this customer?</B> <%= $ban%><BR><P ALIGN="CENTER"> <INPUT TYPE="submit" VALUE="Cancel customer"> <INPUT TYPE="BUTTON" VALUE="Don\'t cancel" onClick="cClick()"> </FORM> ';
+var confirm_cancel = '<FORM METHOD="POST" ACTION="<% $p %>misc/cust_main-cancel.cgi"> <INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>"> <BR><P ALIGN="center"><B>Permanently delete all services and cancel this customer?</B> <% $ban%><BR><P ALIGN="CENTER"> <INPUT TYPE="submit" VALUE="Cancel customer"> <INPUT TYPE="BUTTON" VALUE="Don\'t cancel" onClick="cClick()"> </FORM> ';
</SCRIPT>
+% if ( $curuser->access_right('Cancel customer')
+% && $cust_main->ncancelled_pkgs
+% ) {
+%
-<% if ( $curuser->access_right('Cancel customer')
- && $cust_main->ncancelled_pkgs
- ) {
-%>
<A HREF="javascript:void(0);" onClick="overlib(confirm_cancel, CAPTION, 'Confirm cancellation', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH, 576, HEIGHT, 128, TEXTSIZE, 3, BGCOLOR, '#ff0000', CGCOLOR, '#ff0000' ); return false; ">Cancel this customer</A> |
-<% } %>
-
+% }
+% if ( $conf->exists('deletecustomers')
+% && $curuser->access_right('Delete customer')
+% ) {
+%
-<% if ( $conf->exists('deletecustomers')
- && $curuser->access_right('Delete customer')
- ) {
-%>
- <A HREF="<%= $p %>misc/delete-customer.cgi?<%= $custnum%>">Delete this customer</A> |
-<% } %>
+ <A HREF="<% $p %>misc/delete-customer.cgi?<% $custnum%>">Delete this customer</A> |
+% }
+% unless ( $conf->exists('disable_customer_referrals') ) {
+ <A HREF="<% popurl(2) %>edit/cust_main.cgi?referral_custnum=<% $custnum %>">Refer a new customer</A> |
+ <A HREF="<% popurl(2) %>search/cust_main.cgi?referral_custnum=<% $custnum %>">View this customer's referrals</A>
+% }
-<% unless ( $conf->exists('disable_customer_referrals') ) { %>
- <A HREF="<%= popurl(2) %>edit/cust_main.cgi?referral_custnum=<%= $custnum %>">Refer a new customer</A> |
- <A HREF="<%= popurl(2) %>search/cust_main.cgi?referral_custnum=<%= $custnum %>">View this customer's referrals</A>
-<% } %>
<BR><BR>
+%
+%my $signupurl = $conf->config('signupurl');
+%if ( $signupurl ) {
+%
+
+ This customer's signup URL: <A HREF="<% $signupurl %>?ref=<% $custnum %>"><% $signupurl %>?ref=<% $custnum %></A><BR><BR>
+% }
-<%
-my $signupurl = $conf->config('signupurl');
-if ( $signupurl ) {
-%>
- This customer's signup URL: <A HREF="<%= $signupurl %>?ref=<%= $custnum %>"><%= $signupurl %>?ref=<%= $custnum %></A><BR><BR>
-<% } %>
<A NAME="cust_main"></A>
<TABLE BORDER=0>
<TR>
<TD VALIGN="top">
- <%= include('cust_main/contacts.html', $cust_main ) %>
+ <% include('cust_main/contacts.html', $cust_main ) %>
</TD>
<TD VALIGN="top" STYLE="padding-left: 54px">
- <%= include('cust_main/misc.html', $cust_main ) %>
- <% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
+ <% include('cust_main/misc.html', $cust_main ) %>
+% if ( $conf->config('payby-default') ne 'HIDE' ) {
+
<BR>
- <%= include('cust_main/billing.html', $cust_main ) %>
- <% } %>
+ <% include('cust_main/billing.html', $cust_main ) %>
+% }
+
</TD>
</TR>
</TABLE>
+%
+%if ( defined $cust_main->dbdef_table->column('comments')
+% && $cust_main->comments =~ /[^\s\n\r]/ ) {
+%
-<%
-if ( defined $cust_main->dbdef_table->column('comments')
- && $cust_main->comments =~ /[^\s\n\r]/ ) {
-%>
<BR>
Comments
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
+<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
<TR>
<TD BGCOLOR="#ffffff">
- <PRE><%= encode_entities($cust_main->comments) %></PRE>
+ <PRE><% encode_entities($cust_main->comments) %></PRE>
</TD>
</TR>
</TABLE></TABLE>
-<% } %>
+% }
+% if ( $conf->config('ticket_system') ) {
-<% if ( $conf->config('ticket_system') ) { %>
<BR>
- <%= include('cust_main/tickets.html', $cust_main ) %>
-<% } %>
+ <% include('cust_main/tickets.html', $cust_main ) %>
+% }
+
<BR><BR>
-<%= include('cust_main/packages.html', $cust_main ) %>
+<% include('cust_main/packages.html', $cust_main ) %>
+% if ( $conf->config('payby-default') ne 'HIDE' ) {
-<% if ( $conf->config('payby-default') ne 'HIDE' ) { %>
- <%= include('cust_main/payment_history.html', $cust_main ) %>
-<% } %>
+ <% include('cust_main/payment_history.html', $cust_main ) %>
+% }
-<%= include('/elements/footer.html') %>
+
+<% include('/elements/footer.html') %>
Index: cust_bill-pdf.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill-pdf.cgi,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- cust_bill-pdf.cgi 6 Mar 2005 03:04:29 -0000 1.7
+++ cust_bill-pdf.cgi 23 Aug 2006 22:25:38 -0000 1.8
@@ -1,17 +1,18 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)(.pdf)?$/;
-my $templatename = $2;
-my $invnum = $3;
-
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Invoice #$invnum not found!" unless $cust_bill;
-
-my $pdf = $cust_bill->print_pdf( '', $templatename);
-
-http_header('Content-Type' => 'application/pdf' );
-http_header('Content-Length' => length($pdf) );
-http_header('Cache-control' => 'max-age=60' );
-%><%= $pdf %>
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)(.pdf)?$/;
+%my $templatename = $2;
+%my $invnum = $3;
+%
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Invoice #$invnum not found!" unless $cust_bill;
+%
+%my $pdf = $cust_bill->print_pdf( '', $templatename);
+%
+%http_header('Content-Type' => 'application/pdf' );
+%http_header('Content-Length' => length($pdf) );
+%http_header('Cache-control' => 'max-age=60' );
+%
+<% $pdf %>
Index: svc_domain.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_domain.cgi,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- svc_domain.cgi 31 Jan 2006 04:26:54 -0000 1.20
+++ svc_domain.cgi 23 Aug 2006 22:25:38 -0000 1.21
@@ -1,38 +1,39 @@
<!-- mason kludge -->
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
-die "Unknown svcnum" unless $svc_domain;
-
-my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
- $custnum=$cust_pkg->getfield('custnum');
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-
-my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
-die "Unknown svcpart" unless $part_svc;
-
-my $email = '';
-if ($svc_domain->catchall) {
- my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
- die "Unknown svcpart" unless $svc_acct;
- $email = $svc_acct->email;
-}
-
-my $domain = $svc_domain->domain;
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_domain = qsearchs('svc_domain',{'svcnum'=>$svcnum});
+%die "Unknown svcnum" unless $svc_domain;
+%
+%my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+% $custnum=$cust_pkg->getfield('custnum');
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%
+%my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+%die "Unknown svcpart" unless $part_svc;
+%
+%my $email = '';
+%if ($svc_domain->catchall) {
+% my $svc_acct = qsearchs('svc_acct',{'svcnum'=> $svc_domain->catchall } );
+% die "Unknown svcpart" unless $svc_acct;
+% $email = $svc_acct->email;
+%}
+%
+%my $domain = $svc_domain->domain;
+%
+%
-%>
-<%= include("/elements/header.html",'Domain View', menubar(
+<% include("/elements/header.html",'Domain View', menubar(
( ( $pkgnum || $custnum )
? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
@@ -42,12 +43,12 @@
"Main menu" => $p,
)) %>
-Service #<%= $svcnum %>
-<BR>Service: <B><%= $part_svc->svc %></B>
-<BR>Domain name: <B><%= $domain %></B>
-<BR>Catch all email <A HREF="<%= ${p} %>misc/catchall.cgi?<%= $svcnum %>">(change)</A>:
-<%= $email ? "<B>$email</B>" : "<I>(none)<I>" %>
-<BR><BR><A HREF="<%= ${p} %>misc/whois.cgi?custnum=<%=$custnum%>;svcnum=<%=$svcnum%>;domain=<%=$domain%>">View whois information.</A>
+Service #<% $svcnum %>
+<BR>Service: <B><% $part_svc->svc %></B>
+<BR>Domain name: <B><% $domain %></B>
+<BR>Catch all email <A HREF="<% ${p} %>misc/catchall.cgi?<% $svcnum %>">(change)</A>:
+<% $email ? "<B>$email</B>" : "<I>(none)<I>" %>
+<BR><BR><A HREF="<% ${p} %>misc/whois.cgi?custnum=<%$custnum%>;svcnum=<%$svcnum%>;domain=<%$domain%>">View whois information.</A>
<BR><BR>
<SCRIPT>
function areyousure(href, message) {
@@ -58,51 +59,58 @@
return confirm("Remove all records and slave from " + document.SlaveForm.recdata.value + "?");
}
</SCRIPT>
+% my @records; if ( @records = $svc_domain->domain_record ) {
-<% my @records; if ( @records = $svc_domain->domain_record ) { %>
- <%= ntable("",2) %>
+ <% ntable("",2) %>
<tr><th>Zone</th><th>Type</th><th>Data</th></tr>
+% foreach my $domain_record ( @records ) {
+% my $type = $domain_record->rectype eq '_mstr'
+% ? "(slave)"
+% : $domain_record->recaf. ' '. $domain_record->rectype;
+%
- <% foreach my $domain_record ( @records ) {
- my $type = $domain_record->rectype eq '_mstr'
- ? "(slave)"
- : $domain_record->recaf. ' '. $domain_record->rectype;
- %>
- <tr><td><%= $domain_record->reczone %></td>
- <td><%= $type %></td>
- <td><%= $domain_record->recdata %>
+ <tr><td><% $domain_record->reczone %></td>
+ <td><% $type %></td>
+ <td><% $domain_record->recdata %>
+% unless ( $domain_record->rectype eq 'SOA' ) {
+
+ (<A HREF="javascript:areyousure('<%$p%>misc/delete-domain_record.cgi?<%$domain_record->recnum%>', 'Delete \'<% $domain_record->reczone %> <% $type %> <% $domain_record->recdata %>\' ?' )">delete</A>)
+% }
- <% unless ( $domain_record->rectype eq 'SOA' ) { %>
- (<A HREF="javascript:areyousure('<%=$p%>misc/delete-domain_record.cgi?<%=$domain_record->recnum%>', 'Delete \'<%= $domain_record->reczone %> <%= $type %> <%= $domain_record->recdata %>\' ?' )">delete</A>)
- <% } %>
</td></tr>
- <% } %>
+% }
+
</table>
-<% } %>
+% }
+
<BR>
-<FORM METHOD="POST" ACTION="<%=$p%>edit/process/domain_record.cgi">
-<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
+<FORM METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
+<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
<INPUT TYPE="text" NAME="reczone">
<INPUT TYPE="hidden" NAME="recaf" VALUE="IN"> IN
<SELECT NAME="rectype">
-<% foreach (qw( A NS CNAME MX PTR TXT) ) { %>
- <OPTION VALUE="<%=$_%>"><%=$_%></OPTION>
-<% } %>
+% foreach (qw( A NS CNAME MX PTR TXT) ) {
+
+ <OPTION VALUE="<%$_%>"><%$_%></OPTION>
+% }
+
</SELECT>
<INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Add record">
</FORM><BR><BR>or<BR><BR>
-<FORM NAME="SlaveForm" METHOD="POST" ACTION="<%=$p%>edit/process/domain_record.cgi">
-<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
+<FORM NAME="SlaveForm" METHOD="POST" ACTION="<%$p%>edit/process/domain_record.cgi">
+<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
+% if ( @records ) {
+ Delete all records and
+% }
-<% if ( @records ) { %> Delete all records and <% } %>
Slave from nameserver IP
-<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
+<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
<INPUT TYPE="hidden" NAME="reczone" VALUE="@">
<INPUT TYPE="hidden" NAME="recaf" VALUE="IN">
<INPUT TYPE="hidden" NAME="rectype" VALUE="_mstr">
<INPUT TYPE="text" NAME="recdata"> <INPUT TYPE="submit" VALUE="Slave domain" onClick="return slave_areyousure()">
</FORM>
-<BR><BR><%= joblisting({'svcnum'=>$svcnum}, 1) %>
+<BR><BR><% joblisting({'svcnum'=>$svcnum}, 1) %>
</BODY></HTML>
Index: svc_www.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_www.cgi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- svc_www.cgi 26 May 2005 19:16:59 -0000 1.12
+++ svc_www.cgi 23 Aug 2006 22:25:38 -0000 1.13
@@ -1,73 +1,74 @@
<!-- mason kludge -->
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_www = qsearchs( 'svc_www', { 'svcnum' => $svcnum } )
- or die "svc_www: Unknown svcnum $svcnum";
-
-#false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
- $custnum = $cust_pkg->custnum;
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-#eofalse
-
-my $usersvc = $svc_www->usersvc;
-my $svc_acct = '';
-my $email = '';
-if ( $usersvc ) {
- $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
- or die "svc_www: Unknown usersvc $usersvc";
- $email = $svc_acct->email;
-}
-
-my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } )
- or die "svc_www: Unknown recnum ". $svc_www->recnum;
-
-my $www = $domain_record->zone;
-
-print header('Website View', menubar(
- ( ( $custnum )
- ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
- )
- : ( "Cancel this (unaudited) website" =>
- "${p}misc/cancel-unaudited.cgi?$svcnum" )
- ),
- "Main menu" => $p,
-)).
- qq!<A HREF="${p}edit/svc_www.cgi?$svcnum">Edit this information</A><BR>!.
- ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
- qq!<TR><TD ALIGN="right">Service number</TD>!.
- qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
- qq!<TR><TD ALIGN="right">Website name</TD>!.
- qq!<TD BGCOLOR="#ffffff"><A HREF="http://$www">$www<A></TD></TR>!.
- qq!<TR><TD ALIGN="right">Account</TD>!.
- qq!<TD BGCOLOR="#ffffff">!;
-
-if ( $usersvc ) {
- print qq!<A HREF="${p}view/svc_acct.cgi?$usersvc">$email</A>!;
-} else {
- print '</i>(none)</i>';
-}
-
-print '</TD></TR>';
-
-foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
- print $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)),
- "\n";
-}
-
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_www = qsearchs( 'svc_www', { 'svcnum' => $svcnum } )
+% or die "svc_www: Unknown svcnum $svcnum";
+%
+%#false laziness w/all svc_*.cgi
+%my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
+% $custnum = $cust_pkg->custnum;
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%#eofalse
+%
+%my $usersvc = $svc_www->usersvc;
+%my $svc_acct = '';
+%my $email = '';
+%if ( $usersvc ) {
+% $svc_acct = qsearchs('svc_acct', { 'svcnum' => $usersvc } )
+% or die "svc_www: Unknown usersvc $usersvc";
+% $email = $svc_acct->email;
+%}
+%
+%my $domain_record = qsearchs('domain_record', { 'recnum' => $svc_www->recnum } )
+% or die "svc_www: Unknown recnum ". $svc_www->recnum;
+%
+%my $www = $domain_record->zone;
+%
+%print header('Website View', menubar(
+% ( ( $custnum )
+% ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+% )
+% : ( "Cancel this (unaudited) website" =>
+% "${p}misc/cancel-unaudited.cgi?$svcnum" )
+% ),
+% "Main menu" => $p,
+%)).
+% qq!<A HREF="${p}edit/svc_www.cgi?$svcnum">Edit this information</A><BR>!.
+% ntable("#cccccc"). '<TR><TD>'. ntable("#cccccc",2).
+% qq!<TR><TD ALIGN="right">Service number</TD>!.
+% qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
+% qq!<TR><TD ALIGN="right">Website name</TD>!.
+% qq!<TD BGCOLOR="#ffffff"><A HREF="http://$www">$www<A></TD></TR>!.
+% qq!<TR><TD ALIGN="right">Account</TD>!.
+% qq!<TD BGCOLOR="#ffffff">!;
+%
+%if ( $usersvc ) {
+% print qq!<A HREF="${p}view/svc_acct.cgi?$usersvc">$email</A>!;
+%} else {
+% print '</i>(none)</i>';
+%}
+%
+%print '</TD></TR>';
+%
+%foreach (sort { $a cmp $b } $svc_www->virtual_fields) {
+% print $svc_www->pvf($_)->widget('HTML', 'view', $svc_www->getfield($_)),
+% "\n";
+%}
+%
+%
+%print '</TABLE></TD></TR></TABLE>'.
+% '<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
+% '</BODY></HTML>'
+%;
+%
-print '</TABLE></TD></TR></TABLE>'.
- '<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
- '</BODY></HTML>'
-;
-%>
Index: svc_phone.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_phone.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- svc_phone.cgi 12 Jul 2006 00:20:22 -0000 1.1
+++ svc_phone.cgi 23 Aug 2006 22:25:38 -0000 1.2
@@ -1,4 +1,4 @@
-<%= include('elements/svc_Common.html',
+<% include('elements/svc_Common.html',
'table' => 'svc_phone',
'fields' => [qw( countrycode phonenum )], #pin
'labels' => {
Index: cust_bill-ps.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill-ps.cgi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cust_bill-ps.cgi 6 Mar 2005 03:04:29 -0000 1.4
+++ cust_bill-ps.cgi 23 Aug 2006 22:25:38 -0000 1.5
@@ -1,13 +1,14 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $templatename = $2;
-my $invnum = $3;
-
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Invoice #$invnum not found!" unless $cust_bill;
-
-http_header('Content-Type' => 'application/postscript' );
-%><%= $cust_bill->print_ps( '', $templatename) %>
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)$/;
+%my $templatename = $2;
+%my $invnum = $3;
+%
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Invoice #$invnum not found!" unless $cust_bill;
+%
+%http_header('Content-Type' => 'application/postscript' );
+%
+<% $cust_bill->print_ps( '', $templatename) %>
Index: cust_bill.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_bill.cgi,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cust_bill.cgi 31 Jan 2006 04:26:54 -0000 1.35
+++ cust_bill.cgi 23 Aug 2006 22:25:38 -0000 1.36
@@ -1,151 +1,155 @@
-<%
-
-#untaint invnum
-my($query) = $cgi->keywords;
-$query =~ /^((.+)-)?(\d+)$/;
-my $templatename = $2;
-my $invnum = $3;
-
-my $conf = new FS::Conf;
-
-my @payby = grep /\w/, $conf->config('payby');
-#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
- at payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
- unless @payby;
-my %payby = map { $_=>1 } @payby;
-
-my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
-die "Invoice #$invnum not found!" unless $cust_bill;
-my $custnum = $cust_bill->getfield('custnum');
-
-#my $printed = $cust_bill->printed;
-
-my $link = $templatename ? "$templatename-$invnum" : $invnum;
+%
+%
+%#untaint invnum
+%my($query) = $cgi->keywords;
+%$query =~ /^((.+)-)?(\d+)$/;
+%my $templatename = $2;
+%my $invnum = $3;
+%
+%my $conf = new FS::Conf;
+%
+%my @payby = grep /\w/, $conf->config('payby');
+%#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
+%@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
+% unless @payby;
+%my %payby = map { $_=>1 } @payby;
+%
+%my $cust_bill = qsearchs('cust_bill',{'invnum'=>$invnum});
+%die "Invoice #$invnum not found!" unless $cust_bill;
+%my $custnum = $cust_bill->getfield('custnum');
+%
+%#my $printed = $cust_bill->printed;
+%
+%my $link = $templatename ? "$templatename-$invnum" : $invnum;
+%
+%
-%>
-<%= include("/elements/header.html",'Invoice View', menubar(
+<% include("/elements/header.html",'Invoice View', menubar(
"Main Menu" => $p,
"View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)) %>
+% if ( $cust_bill->owed > 0
+% && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} )
+% )
+% {
+% my $s = 0;
+%
-<% if ( $cust_bill->owed > 0
- && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} )
- )
- {
- my $s = 0;
-%>
Post
+% if ( $payby{'BILL'} ) {
- <% if ( $payby{'BILL'} ) { %>
- <%= $s++ ? ' | ' : '' %>
- <A HREF="<%= $p %>edit/cust_pay.cgi?payby=BILL;invnum=<%= $invnum %>">check</A>
-
- <% } %>
-
- <% if ( $payby{'CASH'} ) { %>
-
- <%= $s++ ? ' | ' : '' %>
- <A HREF="<%= $p %>edit/cust_pay.cgi?payby=CASH;invnum=<%= $invnum %>">cash</A>
-
- <% } %>
-
- <% if ( $payby{'WEST'} ) { %>
-
- <%= $s++ ? ' | ' : '' %>
- <A HREF="<%= $p %>edit/cust_pay.cgi?payby=WEST;invnum=<%= $invnum %>">Western Union</A>
+ <% $s++ ? ' | ' : '' %>
+ <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>">check</A>
+% }
+% if ( $payby{'CASH'} ) {
+
- <% } %>
+ <% $s++ ? ' | ' : '' %>
+ <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>">cash</A>
+% }
+% if ( $payby{'WEST'} ) {
- <% if ( $payby{'MCRD'} ) { %>
- <%= $s++ ? ' | ' : '' %>
- <A HREF="<%= $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<%= $invnum %>">manual credit card</A>
+ <% $s++ ? ' | ' : '' %>
+ <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>">Western Union</A>
+% }
+% if ( $payby{'MCRD'} ) {
+
- <% } %>
+ <% $s++ ? ' | ' : '' %>
+ <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>">manual credit card</A>
+% }
+
payment against this invoice<BR>
+% }
-<% } %>
-<A HREF="<%= $p %>misc/print-invoice.cgi?<%= $link %>">Re-print this invoice</A>
+<A HREF="<% $p %>misc/print-invoice.cgi?<% $link %>">Re-print this invoice</A>
+% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) {
-<% if ( grep { $_ ne 'POST' } $cust_bill->cust_main->invoicing_list ) { %>
- | <A HREF="<%= $p %>misc/email-invoice.cgi?<%= $link %>">Re-email
+ | <A HREF="<% $p %>misc/email-invoice.cgi?<% $link %>">Re-email
this invoice</A>
-<% } %>
+% }
+% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) {
-<% if ( $conf->exists('hylafax') && length($cust_bill->cust_main->fax) ) { %>
- | <A HREF="<%= $p %>misc/fax-invoice.cgi?<%= $link %>">Re-fax
+ | <A HREF="<% $p %>misc/fax-invoice.cgi?<% $link %>">Re-fax
this invoice</A>
-<% } %>
+% }
+
<BR><BR>
+% if ( $conf->exists('invoice_latex') ) {
-<% if ( $conf->exists('invoice_latex') ) { %>
- <A HREF="<%= $p %>view/cust_bill-pdf.cgi?<%= $link %>.pdf">View typeset invoice</A>
+ <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $link %>.pdf">View typeset invoice</A>
<BR><BR>
-<% } %>
+% }
+% #false laziness with search/cust_bill_event.cgi
+% unless ( $templatename ) {
-<% #false laziness with search/cust_bill_event.cgi
- unless ( $templatename ) { %>
- <%= table() %>
+ <% table() %>
<TR>
<TH>Event</TH>
<TH>Date</TH>
<TH>Status</TH>
</TR>
+% foreach my $cust_bill_event (
+% sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
+% ) {
+%
+% my $status = $cust_bill_event->status;
+% $status .= ': '. encode_entities($cust_bill_event->statustext)
+% if $cust_bill_event->statustext;
+% my $part_bill_event = $cust_bill_event->part_bill_event;
+%
- <% foreach my $cust_bill_event (
- sort { $a->_date <=> $b->_date } $cust_bill->cust_bill_event
- ) {
-
- my $status = $cust_bill_event->status;
- $status .= ': '. encode_entities($cust_bill_event->statustext)
- if $cust_bill_event->statustext;
- my $part_bill_event = $cust_bill_event->part_bill_event;
- %>
<TR>
- <TD><%= $part_bill_event->event %>
-
- <% if ( $part_bill_event->templatename ) {
- my $alt_templatename = $part_bill_event->templatename;
- my $alt_link = "$alt_templatename-$invnum";
- %>
- ( <A HREF="<%= $p %>view/cust_bill.cgi?<%= $alt_link %>">view</A>
- | <A HREF="<%= $p %>view/cust_bill-pdf.cgi?<%= $alt_link %>.pdf">view
+ <TD><% $part_bill_event->event %>
+% if ( $part_bill_event->templatename ) {
+% my $alt_templatename = $part_bill_event->templatename;
+% my $alt_link = "$alt_templatename-$invnum";
+%
+
+ ( <A HREF="<% $p %>view/cust_bill.cgi?<% $alt_link %>">view</A>
+ | <A HREF="<% $p %>view/cust_bill-pdf.cgi?<% $alt_link %>.pdf">view
typeset</A>
- | <A HREF="<%= $p %>misc/print-invoice.cgi?<%= $alt_link %>">re-print</A>
- <% if ( grep { $_ ne 'POST' }
- $cust_bill->cust_main->invoicing_list ) { %>
- | <A HREF="<%= $p %>misc/email-invoice.cgi?<%= $alt_link %>">re-email</A>
- <% } %>
-
- <% if ( $conf->exists('hylafax')
- && length($cust_bill->cust_main->fax) ) { %>
- | <A HREF="<%= $p %>misc/fax-invoice.cgi?<%= $alt_link %>">re-fax</A>
- <% } %>
+ | <A HREF="<% $p %>misc/print-invoice.cgi?<% $alt_link %>">re-print</A>
+% if ( grep { $_ ne 'POST' }
+% $cust_bill->cust_main->invoicing_list ) {
+
+ | <A HREF="<% $p %>misc/email-invoice.cgi?<% $alt_link %>">re-email</A>
+% }
+% if ( $conf->exists('hylafax')
+% && length($cust_bill->cust_main->fax) ) {
+
+ | <A HREF="<% $p %>misc/fax-invoice.cgi?<% $alt_link %>">re-fax</A>
+% }
+
)
- <% } %>
+% }
+
</TD>
- <TD><%= time2str("%a %b %e %T %Y", $cust_bill_event->_date) %></TD>
- <TD><%= $status %></TD>
+ <TD><% time2str("%a %b %e %T %Y", $cust_bill_event->_date) %></TD>
+ <TD><% $status %></TD>
</TR>
- <% } %>
+% }
+
</TABLE>
<BR>
+% }
+% if ( $conf->exists('invoice_html') ) {
-<% } %>
+ <% join('', $cust_bill->print_html('', $templatename) ) %>
+% } else {
+
+ <PRE><% join('', $cust_bill->print_text('', $templatename) ) %></PRE>
+% }
-<% if ( $conf->exists('invoice_html') ) { %>
- <%= join('', $cust_bill->print_html('', $templatename) ) %>
-<% } else { %>
- <PRE><%= join('', $cust_bill->print_text('', $templatename) ) %></PRE>
-<% } %>
</BODY></HTML>
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_acct.cgi,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- svc_acct.cgi 31 Jan 2006 04:26:54 -0000 1.45
+++ svc_acct.cgi 23 Aug 2006 22:25:38 -0000 1.46
@@ -1,51 +1,51 @@
-<%
-
-my $conf = new FS::Conf;
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
-die "Unknown svcnum" unless $svc_acct;
-
-#false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } );
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
- $custnum = $cust_pkg->custnum;
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-#eofalse
-
-my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
-die "Unknown svcpart" unless $part_svc;
-my $svc = $part_svc->svc;
-
-die 'Empty domsvc for svc_acct.svcnum '. $svc_acct->svcnum
- unless $svc_acct->domsvc;
-my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } );
-die 'Unknown domain (domsvc '. $svc_acct->domsvc.
- ' for svc_acct.svcnum '. $svc_acct->svcnum. ')'
- unless $svc_domain;
-my $domain = $svc_domain->domain;
-
-%>
+%
+%
+%my $conf = new FS::Conf;
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$svcnum});
+%die "Unknown svcnum" unless $svc_acct;
+%
+%#false laziness w/all svc_*.cgi
+%my $cust_svc = qsearchs( 'cust_svc' , { 'svcnum' => $svcnum } );
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
+% $custnum = $cust_pkg->custnum;
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%#eofalse
+%
+%my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } );
+%die "Unknown svcpart" unless $part_svc;
+%my $svc = $part_svc->svc;
+%
+%die 'Empty domsvc for svc_acct.svcnum '. $svc_acct->svcnum
+% unless $svc_acct->domsvc;
+%my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $svc_acct->domsvc } );
+%die 'Unknown domain (domsvc '. $svc_acct->domsvc.
+% ' for svc_acct.svcnum '. $svc_acct->svcnum. ')'
+% unless $svc_domain;
+%my $domain = $svc_domain->domain;
+%
+%
+% if ( $custnum ) {
-<% if ( $custnum ) { %>
- <%= include("/elements/header.html","View $svc account", menubar(
+ <% include("/elements/header.html","View $svc account", menubar(
"View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
"Main menu" => $p,
)) %>
- <%= include( '/elements/small_custview.html', $custnum, '', 1 ) %>
+ <% include( '/elements/small_custview.html', $custnum, '', 1 ) %>
<BR>
+% } else {
-<% } else { %>
<SCRIPT>
function areyousure(href) {
@@ -54,76 +54,80 @@
}
</SCRIPT>
- <%= include("/elements/header.html",'Account View', menubar(
+ <% include("/elements/header.html",'Account View', menubar(
"Cancel this (unaudited) account" =>
"javascript:areyousure(\'${p}misc/cancel-unaudited.cgi?$svcnum\')",
"Main menu" => $p,
)) %>
+% }
+% if ( $part_svc->part_export_usage ) {
+%
+% my $last_bill;
+% my %plandata;
+% if ( $cust_pkg ) {
+% #false laziness w/httemplate/edit/part_pkg... this stuff doesn't really
+% #belong in plan data
+% %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
+% split("\n", $cust_pkg->part_pkg->plandata );
+%
+% $last_bill = $cust_pkg->last_bill;
+% } else {
+% $last_bill = 0;
+% %plandata = ();
+% }
+%
+% my $seconds = $svc_acct->seconds_since_sqlradacct( $last_bill, time );
+% my $hour = int($seconds/3600);
+% my $min = int( ($seconds%3600) / 60 );
+% my $sec = $seconds%60;
+%
+% my $input = $svc_acct->attribute_since_sqlradacct(
+% $last_bill, time, 'AcctInputOctets'
+% ) / 1048576;
+% my $output = $svc_acct->attribute_since_sqlradacct(
+% $last_bill, time, 'AcctOutputOctets'
+% ) / 1048576;
+%
+%
-<% } %>
-
-<% if ( $part_svc->part_export_usage ) {
-
- my $last_bill;
- my %plandata;
- if ( $cust_pkg ) {
- #false laziness w/httemplate/edit/part_pkg... this stuff doesn't really
- #belong in plan data
- %plandata = map { /^(\w+)=(.*)$/; ( $1 => $2 ); }
- split("\n", $cust_pkg->part_pkg->plandata );
-
- $last_bill = $cust_pkg->last_bill;
- } else {
- $last_bill = 0;
- %plandata = ();
- }
-
- my $seconds = $svc_acct->seconds_since_sqlradacct( $last_bill, time );
- my $hour = int($seconds/3600);
- my $min = int( ($seconds%3600) / 60 );
- my $sec = $seconds%60;
-
- my $input = $svc_acct->attribute_since_sqlradacct(
- $last_bill, time, 'AcctInputOctets'
- ) / 1048576;
- my $output = $svc_acct->attribute_since_sqlradacct(
- $last_bill, time, 'AcctOutputOctets'
- ) / 1048576;
-
-%>
RADIUS session information<BR>
- <%= ntable('#cccccc',2) %>
+ <% ntable('#cccccc',2) %>
<TR><TD BGCOLOR="#ffffff">
+% if ( $seconds ) {
+
+ Online <B><% $hour %></B>h <B><% $min %></B>m <B><% $sec %></B>s
+% } else {
- <% if ( $seconds ) { %>
- Online <B><%= $hour %></B>h <B><%= $min %></B>m <B><%= $sec %></B>s
- <% } else { %>
Has not logged on
- <% } %>
+% }
+% if ( $cust_pkg ) {
+
+ since last bill (<% time2str('%a %b %o %Y', $last_bill) %>)
+% if ( length($plandata{recur_included_hours}) ) {
+
+ - <% $plandata{recur_included_hours} %> total hours in plan
+% }
- <% if ( $cust_pkg ) { %>
- since last bill (<%= time2str('%a %b %o %Y', $last_bill) %>)
- <% if ( length($plandata{recur_included_hours}) ) { %>
- - <%= $plandata{recur_included_hours} %> total hours in plan
- <% } %>
<BR>
- <% } else { %>
+% } else {
+
(no billing cycle available for unaudited account)<BR>
- <% } %>
+% }
- Upload: <B><%= sprintf("%.3f", $input) %></B> megabytes<BR>
- Download: <B><%= sprintf("%.3f", $output) %></B> megabytes<BR>
- <% my $href = qq!<A HREF="${p}search/sqlradius.cgi?svcnum=$svcnum!; %>
+ Upload: <B><% sprintf("%.3f", $input) %></B> megabytes<BR>
+ Download: <B><% sprintf("%.3f", $output) %></B> megabytes<BR>
+% my $href = qq!<A HREF="${p}search/sqlradius.cgi?svcnum=$svcnum!;
+
View session detail:
- <%= $href %>;begin=<%= $last_bill %>">this billing cycle</A>
- | <%= $href %>;begin=<%= time-15552000 %>">past six months</A>
- | <%= $href %>">all sessions</A>
+ <% $href %>;begin=<% $last_bill %>">this billing cycle</A>
+ | <% $href %>;begin=<% time-15552000 %>">past six months</A>
+ | <% $href %>">all sessions</A>
</TD></TR></TABLE><BR>
+% }
-<% } %>
<SCRIPT TYPE="text/javascript">
function enable_change () {
@@ -134,199 +138,204 @@
}
}
</SCRIPT>
-<FORM NAME="OneTrueForm" ACTION="<%=$p%>edit/process/cust_svc.cgi">
-<INPUT TYPE="hidden" NAME="svcnum" VALUE="<%= $svcnum %>">
-<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<%= $pkgnum %>">
-
-<% #print qq!<BR><A HREF="../misc/sendconfig.cgi?$svcnum">Send account information</A>!; %>
+<FORM NAME="OneTrueForm" ACTION="<%$p%>edit/process/cust_svc.cgi">
+<INPUT TYPE="hidden" NAME="svcnum" VALUE="<% $svcnum %>">
+<INPUT TYPE="hidden" NAME="pkgnum" VALUE="<% $pkgnum %>">
+% #print qq!<BR><A HREF="../misc/sendconfig.cgi?$svcnum">Send account information</A>!;
+%
+% my @part_svc = ();
+% if ( $pkgnum ) {
+% @part_svc = grep { $_->svcdb eq 'svc_acct'
+% && $_->svcpart != $part_svc->svcpart }
+% $cust_pkg->available_part_svc;
+% } else {
+% @part_svc = qsearch('part_svc', {
+% svcdb => 'svc_acct',
+% disabled => '',
+% svcpart => { op=>'!=', value=>$part_svc->svcpart },
+% } );
+% }
+%
-<%
- my @part_svc = ();
- if ( $pkgnum ) {
- @part_svc = grep { $_->svcdb eq 'svc_acct'
- && $_->svcpart != $part_svc->svcpart }
- $cust_pkg->available_part_svc;
- } else {
- @part_svc = qsearch('part_svc', {
- svcdb => 'svc_acct',
- disabled => '',
- svcpart => { op=>'!=', value=>$part_svc->svcpart },
- } );
- }
-%>
-Service #<B><%= $svcnum %></B>
-| <A HREF="<%=$p%>edit/svc_acct.cgi?<%=$svcnum%>">Edit this service</A>
+Service #<B><% $svcnum %></B>
+| <A HREF="<%$p%>edit/svc_acct.cgi?<%$svcnum%>">Edit this service</A>
+% if ( @part_svc ) {
-<% if ( @part_svc ) { %>
| <SELECT NAME="svcpart" onChange="enable_change()">
<OPTION VALUE="">Change service</OPTION>
<OPTION VALUE="">--------------</OPTION>
- <% foreach my $opt_part_svc ( @part_svc ) { %>
- <OPTION VALUE="<%= $opt_part_svc->svcpart %>"><%= $opt_part_svc->svc %></OPTION>
- <% } %>
+% foreach my $opt_part_svc ( @part_svc ) {
+
+ <OPTION VALUE="<% $opt_part_svc->svcpart %>"><% $opt_part_svc->svc %></OPTION>
+% }
+
</SELECT>
<INPUT NAME="submit" TYPE="submit" VALUE="Change" disabled>
-<% } %>
+% }
-<%= &ntable("#cccccc") %><TR><TD><%= &ntable("#cccccc",2) %>
+
+<% &ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Service</TD>
- <TD BGCOLOR="#ffffff"><%= $part_svc->svc %></TD>
+ <TD BGCOLOR="#ffffff"><% $part_svc->svc %></TD>
</TR>
<TR>
<TD ALIGN="right">Username</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->username %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->username %></TD>
</TR>
<TR>
<TD ALIGN="right">Domain</TD>
- <TD BGCOLOR="#ffffff"><%= $domain %></TD>
+ <TD BGCOLOR="#ffffff"><% $domain %></TD>
</TR>
<TR>
<TD ALIGN="right">Password</TD>
<TD BGCOLOR="#ffffff">
+% my $password = $svc_acct->_password;
+% if ( $password =~ /^\*\w+\* (.*)$/ ) {
+% $password = $1;
+%
- <% my $password = $svc_acct->_password; %>
- <% if ( $password =~ /^\*\w+\* (.*)$/ ) {
- $password = $1;
- %>
<I>(login disabled)</I>
- <% } %>
+% }
+% if ( $conf->exists('showpasswords') ) {
+
+ <PRE><% encode_entities($password) %></PRE>
+% } else {
- <% if ( $conf->exists('showpasswords') ) { %>
- <PRE><%= encode_entities($password) %></PRE>
- <% } else { %>
<I>(hidden)</I>
- <% } %>
+% }
+
</TD>
</TR>
-<% $password = ''; %>
+% $password = '';
+% if ( $conf->exists('security_phrase') ) {
+% my $sec_phrase = $svc_acct->sec_phrase;
+%
-<% if ( $conf->exists('security_phrase') ) {
- my $sec_phrase = $svc_acct->sec_phrase;
-%>
<TR>
<TD ALIGN="right">Security phrase</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->sec_phrase %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->sec_phrase %></TD>
</TR>
-<% } %>
+% }
+% if ( $svc_acct->popnum ) {
+% my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
+%
-<% if ( $svc_acct->popnum ) {
- my $svc_acct_pop = qsearchs('svc_acct_pop',{'popnum'=>$svc_acct->popnum});
-%>
<TR>
<TD ALIGN="right">Access number</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct_pop->text %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct_pop->text %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->uid ne '') {
-<% if ($svc_acct->uid ne '') { %>
<TR>
<TD ALIGN="right">UID</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->uid %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->uid %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->gid ne '') {
-<% if ($svc_acct->gid ne '') { %>
<TR>
<TD ALIGN="right">GID</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->gid %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->gid %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->finger ne '') {
-<% if ($svc_acct->finger ne '') { %>
<TR>
<TD ALIGN="right">GECOS</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->finger %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->finger %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->dir ne '') {
-<% if ($svc_acct->dir ne '') { %>
<TR>
<TD ALIGN="right">Home directory</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->dir %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->dir %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->shell ne '') {
-<% if ($svc_acct->shell ne '') { %>
<TR>
<TD ALIGN="right">Shell</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->shell %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->shell %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->quota ne '') {
-<% if ($svc_acct->quota ne '') { %>
<TR>
<TD ALIGN="right">Quota</TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->quota %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->quota %></TD>
</TR>
-<% } %>
+% }
+% if ($svc_acct->slipip) {
-<% if ($svc_acct->slipip) { %>
<TR>
<TD ALIGN="right">IP address</TD>
<TD BGCOLOR="#ffffff">
- <%= ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
+ <% ( $svc_acct->slipip eq "0.0.0.0" || $svc_acct->slipip eq '0e0' )
? "<I>(Dynamic)</I>"
: $svc_acct->slipip
%>
</TD>
</TR>
-<% } %>
+% }
+% foreach my $attribute ( grep /^radius_/, $svc_acct->fields ) {
+% $attribute =~ /^radius_(.*)$/;
+% my $pattribute = $FS::raddb::attrib{$1};
+%
-<% foreach my $attribute ( grep /^radius_/, $svc_acct->fields ) {
- $attribute =~ /^radius_(.*)$/;
- my $pattribute = $FS::raddb::attrib{$1};
-%>
<TR>
- <TD ALIGN="right">Radius (reply) <%= $pattribute %></TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->getfield($attribute) %></TD>
+ <TD ALIGN="right">Radius (reply) <% $pattribute %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->getfield($attribute) %></TD>
</TR>
-<% } %>
+% }
+% foreach my $attribute ( grep /^rc_/, $svc_acct->fields ) {
+% $attribute =~ /^rc_(.*)$/;
+% my $pattribute = $FS::raddb::attrib{$1};
+%
-<% foreach my $attribute ( grep /^rc_/, $svc_acct->fields ) {
- $attribute =~ /^rc_(.*)$/;
- my $pattribute = $FS::raddb::attrib{$1};
-%>
<TR>
- <TD ALIGN="right">Radius (check) <%= $pattribute %></TD>
- <TD BGCOLOR="#ffffff"><%= $svc_acct->getfield($attribute) %></TD>
+ <TD ALIGN="right">Radius (check) <% $pattribute %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_acct->getfield($attribute) %></TD>
</TR>
-<% } %>
+% }
+
<TR>
<TD ALIGN="right">RADIUS groups</TD>
- <TD BGCOLOR="#ffffff"><%= join('<BR>', $svc_acct->radius_groups) %></TD>
+ <TD BGCOLOR="#ffffff"><% join('<BR>', $svc_acct->radius_groups) %></TD>
</TR>
+% if ( $svc_acct->seconds =~ /^\d+$/ ) {
-<% if ( $svc_acct->seconds =~ /^\d+$/ ) { %>
<TR>
<TD ALIGN="right">Prepaid time</TD>
- <TD BGCOLOR="#ffffff"><%= duration_exact($svc_acct->seconds) %></TD>
+ <TD BGCOLOR="#ffffff"><% duration_exact($svc_acct->seconds) %></TD>
</TR>
-<% } %>
+% }
+%
+%# Can this be abstracted further? Maybe a library function like
+%# widget('HTML', 'view', $svc_acct) ? It would definitely make UI
+%# style management easier.
+%
+% foreach (sort { $a cmp $b } $svc_acct->virtual_fields) {
-<%
-# Can this be abstracted further? Maybe a library function like
-# widget('HTML', 'view', $svc_acct) ? It would definitely make UI
-# style management easier.
-%>
+ <% $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)) %>
+% }
-<% foreach (sort { $a cmp $b } $svc_acct->virtual_fields) { %>
- <%= $svc_acct->pvf($_)->widget('HTML', 'view', $svc_acct->getfield($_)) %>
-<% } %>
</TABLE></TD></TR></TABLE>
</FORM>
<BR><BR>
-<%= join("<BR>", $conf->config('svc_acct-notes') ) %>
+<% join("<BR>", $conf->config('svc_acct-notes') ) %>
<BR><BR>
-<%= joblisting({'svcnum'=>$svcnum}, 1) %>
+<% joblisting({'svcnum'=>$svcnum}, 1) %>
</BODY>
</HTML>
Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_pkg.cgi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cust_pkg.cgi 12 Jul 2005 09:31:21 -0000 1.14
+++ cust_pkg.cgi 23 Aug 2006 22:25:38 -0000 1.15
@@ -1,165 +1,166 @@
<!-- mason kludge -->
-<%
-
-my $conf = new FS::Conf;
-
-my %uiview = ();
-my %uiadd = ();
-foreach my $part_svc ( qsearch('part_svc',{}) ) {
- $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
- $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
-}
-
-my ($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $pkgnum = $1;
-
-#get package record
-my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
-die "No package!" unless $cust_pkg;
-my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')});
-
-my $custnum = $cust_pkg->getfield('custnum');
-print header('Package View', menubar(
- "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum",
- 'Main Menu' => popurl(2)
-));
-
-#print info
-my ($susp,$cancel,$expire)=(
- $cust_pkg->getfield('susp'),
- $cust_pkg->getfield('cancel'),
- $cust_pkg->getfield('expire'),
-);
-my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment'));
-my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill'));
-my $otaker = $cust_pkg->getfield('otaker');
-
-print <<END;
-<SCRIPT>
-function areyousure(href) {
- if (confirm("Permanently delete included services and cancel this package?") == true)
- window.location.href = href;
-}
-</SCRIPT>
-END
-
-print "Package information";
-print ' (<A HREF="'. popurl(2). 'misc/unsusp_pkg.cgi?'. $pkgnum.
- '">unsuspend</A>)'
- if ( $susp && ! $cancel );
-
-print ' (<A HREF="'. popurl(2). 'misc/susp_pkg.cgi?'. $pkgnum.
- '">suspend</A>)'
- unless ( $susp || $cancel );
-
-print ' (<A HREF="javascript:areyousure(\''. popurl(2). 'misc/cancel_pkg.cgi?'.
- $pkgnum. '\')">cancel</A>)'
- unless $cancel;
-
-print ' (<A HREF="'. popurl(2). 'edit/REAL_cust_pkg.cgi?'. $pkgnum.
- '">edit dates</A>)';
-
-print &ntable("#cccccc"), '<TR><TD>', &ntable("#cccccc",2),
- '<TR><TD ALIGN="right">Package number</TD><TD BGCOLOR="#ffffff">',
- $pkgnum, '</TD></TR>',
- '<TR><TD ALIGN="right">Package</TD><TD BGCOLOR="#ffffff">',
- $pkg, '</TD></TR>',
- '<TR><TD ALIGN="right">Comment</TD><TD BGCOLOR="#ffffff">',
- $comment, '</TD></TR>',
- '<TR><TD ALIGN="right">Setup date</TD><TD BGCOLOR="#ffffff">',
- ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>';
-
-print '<TR><TD ALIGN="right">Last bill date</TD><TD BGCOLOR="#ffffff">',
- ( $cust_pkg->get('last_bill') ? time2str("%D",$cust_pkg->get('last_bill')) : " " ),
- '</TD></TR>'
- if $cust_pkg->dbdef_table->column('last_bill');
-
-print '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
- ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>';
-
-print '<TR><TD ALIGN="right">Suspension date</TD><TD BGCOLOR="#ffffff">',
- time2str("%D",$susp), '</TD></TR>' if $susp;
-print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
- time2str("%D",$expire), '</TD></TR>' if $expire;
-print '<TR><TD ALIGN="right">Cancellation date</TD><TD BGCOLOR="#ffffff">',
- time2str("%D",$cancel), '</TD></TR>' if $cancel;
-print '<TR><TD ALIGN="right">Order taker</TD><TD BGCOLOR="#ffffff">',
- $otaker, '</TD></TR>',
- '</TABLE></TD></TR></TABLE>';
-
-unless ($expire) {
- print <<END;
-<FORM ACTION="../misc/expire_pkg.cgi" METHOD="post">
-<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
-Expire (date): <INPUT TYPE="text" NAME="date" VALUE="" >
-<INPUT TYPE="submit" VALUE="Cancel later">
-END
-}
-
-unless ($cancel) {
-
- #services
- print '<BR>Service Information', &table();
-
- #list of services this pkgpart includes
- my $pkg_svc;
- my %pkg_svc;
- #foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) {
- foreach $pkg_svc ( $cust_pkg->part_pkg->pkg_svc ) {
- $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity;
- }
-
- #list of records from cust_svc
- my $svcpart;
- foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) {
-
- my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc');
-
- my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum,
- 'svcpart'=>$svcpart,
- });
-
- my($enum);
- for $enum ( 1 .. $pkg_svc{$svcpart} ) {
-
- my($cust_svc);
- if ( $cust_svc=shift @cust_svc ) {
- my($svcnum)=$cust_svc->svcnum;
- my($label, $value, $svcdb) = $cust_svc->label;
- print <<END;
-<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View/Edit) $svc: $value<A></TD></TR>
-END
- } else {
- print qq!<TR><TD>!.
- qq!<A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">!.
- qq!(Provision) $svc</A>!;
-
- print qq! or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!.
- qq!(Link to legacy) $svc</A>!
- if $conf->exists('legacy_link');
-
- print '</TD></TR>';
- }
-
- }
- warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;;
- }
-
- print "</TABLE><FONT SIZE=-1>",
- "Choose (View/Edit) to view or edit an existing service<BR>",
- "Choose (Provision) to setup a new service<BR>";
-
- print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service"
- if $conf->exists('legacy_link');
-
- print "</FONT>";
-}
-
-#formatting
-print <<END;
- </BODY>
-</HTML>
-END
+%
+%
+%my $conf = new FS::Conf;
+%
+%my %uiview = ();
+%my %uiadd = ();
+%foreach my $part_svc ( qsearch('part_svc',{}) ) {
+% $uiview{$part_svc->svcpart} = popurl(2). "view/". $part_svc->svcdb . ".cgi";
+% $uiadd{$part_svc->svcpart}= popurl(2). "edit/". $part_svc->svcdb . ".cgi";
+%}
+%
+%my ($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $pkgnum = $1;
+%
+%#get package record
+%my $cust_pkg = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+%die "No package!" unless $cust_pkg;
+%my $part_pkg = qsearchs('part_pkg',{'pkgpart'=>$cust_pkg->getfield('pkgpart')});
+%
+%my $custnum = $cust_pkg->getfield('custnum');
+%print header('Package View', menubar(
+% "View this customer (#$custnum)" => popurl(2). "view/cust_main.cgi?$custnum",
+% 'Main Menu' => popurl(2)
+%));
+%
+%#print info
+%my ($susp,$cancel,$expire)=(
+% $cust_pkg->getfield('susp'),
+% $cust_pkg->getfield('cancel'),
+% $cust_pkg->getfield('expire'),
+%);
+%my($pkg,$comment)=($part_pkg->getfield('pkg'),$part_pkg->getfield('comment'));
+%my($setup,$bill)=($cust_pkg->getfield('setup'),$cust_pkg->getfield('bill'));
+%my $otaker = $cust_pkg->getfield('otaker');
+%
+%print <<END;
+%<SCRIPT>
+%function areyousure(href) {
+% if (confirm("Permanently delete included services and cancel this package?") == true)
+% window.location.href = href;
+%}
+%</SCRIPT>
+%END
+%
+%print "Package information";
+%print ' (<A HREF="'. popurl(2). 'misc/unsusp_pkg.cgi?'. $pkgnum.
+% '">unsuspend</A>)'
+% if ( $susp && ! $cancel );
+%
+%print ' (<A HREF="'. popurl(2). 'misc/susp_pkg.cgi?'. $pkgnum.
+% '">suspend</A>)'
+% unless ( $susp || $cancel );
+%
+%print ' (<A HREF="javascript:areyousure(\''. popurl(2). 'misc/cancel_pkg.cgi?'.
+% $pkgnum. '\')">cancel</A>)'
+% unless $cancel;
+%
+%print ' (<A HREF="'. popurl(2). 'edit/REAL_cust_pkg.cgi?'. $pkgnum.
+% '">edit dates</A>)';
+%
+%print &ntable("#cccccc"), '<TR><TD>', &ntable("#cccccc",2),
+% '<TR><TD ALIGN="right">Package number</TD><TD BGCOLOR="#ffffff">',
+% $pkgnum, '</TD></TR>',
+% '<TR><TD ALIGN="right">Package</TD><TD BGCOLOR="#ffffff">',
+% $pkg, '</TD></TR>',
+% '<TR><TD ALIGN="right">Comment</TD><TD BGCOLOR="#ffffff">',
+% $comment, '</TD></TR>',
+% '<TR><TD ALIGN="right">Setup date</TD><TD BGCOLOR="#ffffff">',
+% ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>';
+%
+%print '<TR><TD ALIGN="right">Last bill date</TD><TD BGCOLOR="#ffffff">',
+% ( $cust_pkg->get('last_bill') ? time2str("%D",$cust_pkg->get('last_bill')) : " " ),
+% '</TD></TR>'
+% if $cust_pkg->dbdef_table->column('last_bill');
+%
+%print '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
+% ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>';
+%
+%print '<TR><TD ALIGN="right">Suspension date</TD><TD BGCOLOR="#ffffff">',
+% time2str("%D",$susp), '</TD></TR>' if $susp;
+%print '<TR><TD ALIGN="right">Expiration date</TD><TD BGCOLOR="#ffffff">',
+% time2str("%D",$expire), '</TD></TR>' if $expire;
+%print '<TR><TD ALIGN="right">Cancellation date</TD><TD BGCOLOR="#ffffff">',
+% time2str("%D",$cancel), '</TD></TR>' if $cancel;
+%print '<TR><TD ALIGN="right">Order taker</TD><TD BGCOLOR="#ffffff">',
+% $otaker, '</TD></TR>',
+% '</TABLE></TD></TR></TABLE>';
+%
+%unless ($expire) {
+% print <<END;
+%<FORM ACTION="../misc/expire_pkg.cgi" METHOD="post">
+%<INPUT TYPE="hidden" NAME="pkgnum" VALUE="$pkgnum">
+%Expire (date): <INPUT TYPE="text" NAME="date" VALUE="" >
+%<INPUT TYPE="submit" VALUE="Cancel later">
+%END
+%}
+%
+%unless ($cancel) {
+%
+% #services
+% print '<BR>Service Information', &table();
+%
+% #list of services this pkgpart includes
+% my $pkg_svc;
+% my %pkg_svc;
+% #foreach $pkg_svc ( qsearch('pkg_svc',{'pkgpart'=> $cust_pkg->pkgpart }) ) {
+% foreach $pkg_svc ( $cust_pkg->part_pkg->pkg_svc ) {
+% $pkg_svc{$pkg_svc->svcpart} = $pkg_svc->quantity if $pkg_svc->quantity;
+% }
+%
+% #list of records from cust_svc
+% my $svcpart;
+% foreach $svcpart (sort {$a <=> $b} keys %pkg_svc) {
+%
+% my($svc)=qsearchs('part_svc',{'svcpart'=>$svcpart})->getfield('svc');
+%
+% my(@cust_svc)=qsearch('cust_svc',{'pkgnum'=>$pkgnum,
+% 'svcpart'=>$svcpart,
+% });
+%
+% my($enum);
+% for $enum ( 1 .. $pkg_svc{$svcpart} ) {
+%
+% my($cust_svc);
+% if ( $cust_svc=shift @cust_svc ) {
+% my($svcnum)=$cust_svc->svcnum;
+% my($label, $value, $svcdb) = $cust_svc->label;
+% print <<END;
+%<TR><TD><A HREF="$uiview{$svcpart}?$svcnum">(View/Edit) $svc: $value<A></TD></TR>
+%END
+% } else {
+% print qq!<TR><TD>!.
+% qq!<A HREF="$uiadd{$svcpart}?pkgnum$pkgnum-svcpart$svcpart">!.
+% qq!(Provision) $svc</A>!;
+%
+% print qq! or <A HREF="../misc/link.cgi?pkgnum$pkgnum-svcpart$svcpart">!.
+% qq!(Link to legacy) $svc</A>!
+% if $conf->exists('legacy_link');
+%
+% print '</TD></TR>';
+% }
+%
+% }
+% warn "WARNING: Leftover services pkgnum $pkgnum!" if @cust_svc;;
+% }
+%
+% print "</TABLE><FONT SIZE=-1>",
+% "Choose (View/Edit) to view or edit an existing service<BR>",
+% "Choose (Provision) to setup a new service<BR>";
+%
+% print "Choose (Link to legacy) to link to a legacy (pre-Freeside) service"
+% if $conf->exists('legacy_link');
+%
+% print "</FONT>";
+%}
+%
+%#formatting
+%print <<END;
+% </BODY>
+%</HTML>
+%END
+%
+%
-%>
Index: svc_external.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_external.cgi,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- svc_external.cgi 16 Jul 2006 00:55:06 -0000 1.5
+++ svc_external.cgi 23 Aug 2006 22:25:38 -0000 1.6
@@ -1,30 +1,31 @@
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_external = qsearchs( 'svc_external', { 'svcnum' => $svcnum } )
- or die "svc_external: Unknown svcnum $svcnum";
-
-my $conf = new FS::Conf;
-
-#false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
- $custnum = $cust_pkg->custnum;
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-#eofalse
-
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_external = qsearchs( 'svc_external', { 'svcnum' => $svcnum } )
+% or die "svc_external: Unknown svcnum $svcnum";
+%
+%my $conf = new FS::Conf;
+%
+%#false laziness w/all svc_*.cgi
+%my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
+% $custnum = $cust_pkg->custnum;
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%#eofalse
+%
+%
+%
-%>
-<%= include("/elements/header.html",'External Service View', menubar(
+<% include("/elements/header.html",'External Service View', menubar(
( ( $custnum )
? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
@@ -34,20 +35,21 @@
"Main menu" => $p,
)) %>
-<A HREF="<%=$p%>edit/svc_external.cgi?<%=$svcnum%>">Edit this information</A><BR>
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
+<A HREF="<%$p%>edit/svc_external.cgi?<%$svcnum%>">Edit this information</A><BR>
+<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
<TR><TD ALIGN="right">Service number</TD>
- <TD BGCOLOR="#ffffff"><%= $svcnum %></TD></TR>
-<TR><TD ALIGN="right"><%= FS::Msgcat::_gettext('svc_external-id') || 'External ID' %></TD>
- <TD BGCOLOR="#ffffff"><%= $conf->config('svc_external-display_type') eq 'artera_turbo' ? sprintf('%010d', $svc_external->id) : $svc_external->id %></TD></TR>
-<TR><TD ALIGN="right"><%= FS::Msgcat::_gettext('svc_external-title') || 'Title' %></TD>
- <TD BGCOLOR="#ffffff"><%= $svc_external->title %></TD></TR>
+ <TD BGCOLOR="#ffffff"><% $svcnum %></TD></TR>
+<TR><TD ALIGN="right"><% FS::Msgcat::_gettext('svc_external-id') || 'External ID' %></TD>
+ <TD BGCOLOR="#ffffff"><% $conf->config('svc_external-display_type') eq 'artera_turbo' ? sprintf('%010d', $svc_external->id) : $svc_external->id %></TD></TR>
+<TR><TD ALIGN="right"><% FS::Msgcat::_gettext('svc_external-title') || 'Title' %></TD>
+ <TD BGCOLOR="#ffffff"><% $svc_external->title %></TD></TR>
+% foreach (sort { $a cmp $b } $svc_external->virtual_fields) {
+
+ <% $svc_external->pvf($_)->widget('HTML', 'view', $svc_external->getfield($_)) %>
+% }
-<% foreach (sort { $a cmp $b } $svc_external->virtual_fields) { %>
- <%= $svc_external->pvf($_)->widget('HTML', 'view', $svc_external->getfield($_)) %>
-<% } %>
</TABLE></TD></TR></TABLE>
-<BR><%= joblisting({'svcnum'=>$svcnum}, 1) %>
+<BR><% joblisting({'svcnum'=>$svcnum}, 1) %>
</BODY></HTML>
Index: svc_broadband.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_broadband.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- svc_broadband.cgi 31 Jan 2006 04:26:54 -0000 1.9
+++ svc_broadband.cgi 23 Aug 2006 22:25:38 -0000 1.10
@@ -1,50 +1,51 @@
<!-- mason kludge -->
-<%
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_broadband = qsearchs( 'svc_broadband', { 'svcnum' => $svcnum } )
- or die "svc_broadband: Unknown svcnum $svcnum";
-
-#false laziness w/all svc_*.cgi
-my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
- $custnum = $cust_pkg->custnum;
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-#eofalse
-
-my $addr_block = $svc_broadband->addr_block;
-my $router = $addr_block->router;
-
-if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
+%
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_broadband = qsearchs( 'svc_broadband', { 'svcnum' => $svcnum } )
+% or die "svc_broadband: Unknown svcnum $svcnum";
+%
+%#false laziness w/all svc_*.cgi
+%my $cust_svc = qsearchs( 'cust_svc', { 'svcnum' => $svcnum } );
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg = qsearchs( 'cust_pkg', { 'pkgnum' => $pkgnum } );
+% $custnum = $cust_pkg->custnum;
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%#eofalse
+%
+%my $addr_block = $svc_broadband->addr_block;
+%my $router = $addr_block->router;
+%
+%if (not $router) { die "Could not lookup router for svc_broadband (svcnum $svcnum)" };
+%
+%my (
+% $routername,
+% $routernum,
+% $speed_down,
+% $speed_up,
+% $ip_addr,
+% $ip_gateway,
+% $ip_netmask,
+% ) = (
+% $router->getfield('routername'),
+% $router->getfield('routernum'),
+% $svc_broadband->getfield('speed_down'),
+% $svc_broadband->getfield('speed_up'),
+% $svc_broadband->getfield('ip_addr'),
+% $addr_block->ip_gateway,
+% $addr_block->NetAddr->mask,
+% );
+%
-my (
- $routername,
- $routernum,
- $speed_down,
- $speed_up,
- $ip_addr,
- $ip_gateway,
- $ip_netmask,
- ) = (
- $router->getfield('routername'),
- $router->getfield('routernum'),
- $svc_broadband->getfield('speed_down'),
- $svc_broadband->getfield('speed_up'),
- $svc_broadband->getfield('ip_addr'),
- $addr_block->ip_gateway,
- $addr_block->NetAddr->mask,
- );
-%>
-<%=include("/elements/header.html",'Broadband Service View', menubar(
+<%include("/elements/header.html",'Broadband Service View', menubar(
( ( $custnum )
? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
)
@@ -55,101 +56,108 @@
))
%>
-<A HREF="<%=${p}%>edit/svc_broadband.cgi?<%=$svcnum%>">Edit this information</A>
+<A HREF="<%${p}%>edit/svc_broadband.cgi?<%$svcnum%>">Edit this information</A>
<BR>
-<%=ntable("#cccccc")%>
+<%ntable("#cccccc")%>
<TR>
<TD>
- <%=ntable("#cccccc",2)%>
+ <%ntable("#cccccc",2)%>
<TR>
<TD ALIGN="right">Service number</TD>
- <TD BGCOLOR="#ffffff"><%=$svcnum%></TD>
+ <TD BGCOLOR="#ffffff"><%$svcnum%></TD>
</TR>
<TR>
<TD ALIGN="right">Router</TD>
- <TD BGCOLOR="#ffffff"><%=$routernum%>: <%=$routername%></TD>
+ <TD BGCOLOR="#ffffff"><%$routernum%>: <%$routername%></TD>
</TR>
<TR>
<TD ALIGN="right">Download Speed</TD>
- <TD BGCOLOR="#ffffff"><%=$speed_down%></TD>
+ <TD BGCOLOR="#ffffff"><%$speed_down%></TD>
</TR>
<TR>
<TD ALIGN="right">Upload Speed</TD>
- <TD BGCOLOR="#ffffff"><%=$speed_up%></TD>
+ <TD BGCOLOR="#ffffff"><%$speed_up%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Address</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_addr%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_addr%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Netmask</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_netmask%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_netmask%></TD>
</TR>
<TR>
<TD ALIGN="right">IP Gateway</TD>
- <TD BGCOLOR="#ffffff"><%=$ip_gateway%></TD>
+ <TD BGCOLOR="#ffffff"><%$ip_gateway%></TD>
</TR>
<TR COLSPAN="2"><TD></TD></TR>
+%
+%foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
+% print $svc_broadband->pvf($_)->widget('HTML', 'view',
+% $svc_broadband->getfield($_)), "\n";
+%}
+%
+%
-<%
-foreach (sort { $a cmp $b } $svc_broadband->virtual_fields) {
- print $svc_broadband->pvf($_)->widget('HTML', 'view',
- $svc_broadband->getfield($_)), "\n";
-}
-
-%>
</TABLE>
</TD>
</TR>
</TABLE>
<BR>
-<%=ntable("#cccccc", 2)%>
-<%
- my $sb_router = qsearchs('router', { svcnum => $svcnum });
- if ($sb_router) {
- %>
- <B>Router associated: <%=$sb_router->routername%> </B>
- <A HREF="<%=popurl(2)%>edit/router.cgi?<%=$sb_router->routernum%>">
+<%ntable("#cccccc", 2)%>
+%
+% my $sb_router = qsearchs('router', { svcnum => $svcnum });
+% if ($sb_router) {
+%
+
+ <B>Router associated: <%$sb_router->routername%> </B>
+ <A HREF="<%popurl(2)%>edit/router.cgi?<%$sb_router->routernum%>">
(details)
</A>
<BR>
- <% my @sb_addr_block;
- if (@sb_addr_block = $sb_router->addr_block) {
- %>
+% my @sb_addr_block;
+% if (@sb_addr_block = $sb_router->addr_block) {
+%
+
<B>Address space </B>
- <A HREF="<%=popurl(2)%>browse/addr_block.cgi">
+ <A HREF="<%popurl(2)%>browse/addr_block.cgi">
(edit)
</A>
<BR>
- <% print ntable("#cccccc", 1);
- foreach (@sb_addr_block) { %>
+% print ntable("#cccccc", 1);
+% foreach (@sb_addr_block) {
+
<TR>
- <TD><%=$_->ip_gateway%>/<%=$_->ip_netmask%></TD>
+ <TD><%$_->ip_gateway%>/<%$_->ip_netmask%></TD>
</TR>
- <% } %>
+% }
+
</TABLE>
- <% } else { %>
+% } else {
+
<B>No address space allocated.</B>
- <% } %>
+% }
+
<BR>
- <%
- } else {
-%>
+%
+% } else {
+%
-<FORM METHOD="GET" ACTION="<%=popurl(2)%>edit/router.cgi">
- <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%=$svcnum%>">
+
+<FORM METHOD="GET" ACTION="<%popurl(2)%>edit/router.cgi">
+ <INPUT TYPE="hidden" NAME="svcnum" VALUE="<%$svcnum%>">
Add router named
- <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%=$svcnum%>)">
+ <INPUT TYPE="text" NAME="routername" SIZE="32" VALUE="Broadband router (<%$svcnum%>)">
<INPUT TYPE="submit" VALUE="Add router">
</FORM>
+%
+%}
+%
-<%
-}
-%>
<BR>
-<%=joblisting({'svcnum'=>$svcnum}, 1)%>
+<%joblisting({'svcnum'=>$svcnum}, 1)%>
</BODY>
</HTML>
Index: svc_forward.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_forward.cgi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- svc_forward.cgi 22 Mar 2004 11:05:58 -0000 1.13
+++ svc_forward.cgi 23 Aug 2006 22:25:38 -0000 1.14
@@ -1,84 +1,85 @@
<!-- mason kludge -->
-<%
-
-my $conf = new FS::Conf;
-
-my($query) = $cgi->keywords;
-$query =~ /^(\d+)$/;
-my $svcnum = $1;
-my $svc_forward = qsearchs('svc_forward',{'svcnum'=>$svcnum});
-die "Unknown svcnum" unless $svc_forward;
-
-my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
-my $pkgnum = $cust_svc->getfield('pkgnum');
-my($cust_pkg, $custnum);
-if ($pkgnum) {
- $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
- $custnum=$cust_pkg->getfield('custnum');
-} else {
- $cust_pkg = '';
- $custnum = '';
-}
-
-my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } )
- or die "Unkonwn svcpart";
-
-print header('Mail Forward View', menubar(
- ( ( $pkgnum || $custnum )
- ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
- )
- : ( "Cancel this (unaudited) mail forward" =>
- "${p}misc/cancel-unaudited.cgi?$svcnum" )
- ),
- "Main menu" => $p,
-));
-
-my($srcsvc,$dstsvc,$dst) = (
- $svc_forward->srcsvc,
- $svc_forward->dstsvc,
- $svc_forward->dst,
-);
-my $src = $svc_forward->dbdef_table->column('src') ? $svc_forward->src : '';
-
-my $svc = $part_svc->svc;
-
-my $source;
-if ($srcsvc) {
- my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$srcsvc})
- or die "Corrupted database: no svc_acct.svcnum matching srcsvc $srcsvc";
- $source = $svc_acct->email;
-} else {
- $source = $src;
-}
-
-my $destination;
-if ($dstsvc) {
- my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$dstsvc})
- or die "Corrupted database: no svc_acct.svcnum matching dstsvc $dstsvc";
- $destination = $svc_acct->email;
-} else {
- $destination = $dst;
-}
-
-print qq!<A HREF="${p}edit/svc_forward.cgi?$svcnum">Edit this information</A>!.
- ntable("#cccccc",2).
- '<TR><TD ALIGN="right">Service number</TD>'.
- qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
- '<TR><TD ALIGN="right">Service</TD>'.
- qq!<TD BGCOLOR="#ffffff">$svc</TD></TR>!.
- qq!<TR><TD ALIGN="right">Email to</TD>!.
- qq!<TD BGCOLOR="#ffffff">$source</TD></TR>!.
- qq!<TR><TD ALIGN="right">Forwards to </TD>!.
- qq!<TD BGCOLOR="#ffffff">$destination</TD></TR>!;
-
-foreach (sort { $a cmp $b } $svc_forward->virtual_fields) {
- print $svc_forward->pvf($_)->widget('HTML', 'view', $svc_forward->getfield($_)),
- "\n";
-}
-
-print qq! </TABLE>!.
- '<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
- '</BODY></HTML>'
-;
+%
+%
+%my $conf = new FS::Conf;
+%
+%my($query) = $cgi->keywords;
+%$query =~ /^(\d+)$/;
+%my $svcnum = $1;
+%my $svc_forward = qsearchs('svc_forward',{'svcnum'=>$svcnum});
+%die "Unknown svcnum" unless $svc_forward;
+%
+%my $cust_svc = qsearchs('cust_svc',{'svcnum'=>$svcnum});
+%my $pkgnum = $cust_svc->getfield('pkgnum');
+%my($cust_pkg, $custnum);
+%if ($pkgnum) {
+% $cust_pkg=qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
+% $custnum=$cust_pkg->getfield('custnum');
+%} else {
+% $cust_pkg = '';
+% $custnum = '';
+%}
+%
+%my $part_svc = qsearchs('part_svc',{'svcpart'=> $cust_svc->svcpart } )
+% or die "Unkonwn svcpart";
+%
+%print header('Mail Forward View', menubar(
+% ( ( $pkgnum || $custnum )
+% ? ( "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+% )
+% : ( "Cancel this (unaudited) mail forward" =>
+% "${p}misc/cancel-unaudited.cgi?$svcnum" )
+% ),
+% "Main menu" => $p,
+%));
+%
+%my($srcsvc,$dstsvc,$dst) = (
+% $svc_forward->srcsvc,
+% $svc_forward->dstsvc,
+% $svc_forward->dst,
+%);
+%my $src = $svc_forward->dbdef_table->column('src') ? $svc_forward->src : '';
+%
+%my $svc = $part_svc->svc;
+%
+%my $source;
+%if ($srcsvc) {
+% my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$srcsvc})
+% or die "Corrupted database: no svc_acct.svcnum matching srcsvc $srcsvc";
+% $source = $svc_acct->email;
+%} else {
+% $source = $src;
+%}
+%
+%my $destination;
+%if ($dstsvc) {
+% my $svc_acct = qsearchs('svc_acct',{'svcnum'=>$dstsvc})
+% or die "Corrupted database: no svc_acct.svcnum matching dstsvc $dstsvc";
+% $destination = $svc_acct->email;
+%} else {
+% $destination = $dst;
+%}
+%
+%print qq!<A HREF="${p}edit/svc_forward.cgi?$svcnum">Edit this information</A>!.
+% ntable("#cccccc",2).
+% '<TR><TD ALIGN="right">Service number</TD>'.
+% qq!<TD BGCOLOR="#ffffff">$svcnum</TD></TR>!.
+% '<TR><TD ALIGN="right">Service</TD>'.
+% qq!<TD BGCOLOR="#ffffff">$svc</TD></TR>!.
+% qq!<TR><TD ALIGN="right">Email to</TD>!.
+% qq!<TD BGCOLOR="#ffffff">$source</TD></TR>!.
+% qq!<TR><TD ALIGN="right">Forwards to </TD>!.
+% qq!<TD BGCOLOR="#ffffff">$destination</TD></TR>!;
+%
+%foreach (sort { $a cmp $b } $svc_forward->virtual_fields) {
+% print $svc_forward->pvf($_)->widget('HTML', 'view', $svc_forward->getfield($_)),
+% "\n";
+%}
+%
+%print qq! </TABLE>!.
+% '<BR>'. joblisting({'svcnum'=>$svcnum}, 1).
+% '</BODY></HTML>'
+%;
+%
+%
-%>
- Previous message: [freeside-commits]
freeside/httemplate/graph cust_bill_pkg.cgi, 1.3,
1.4 money_time.cgi, 1.14, 1.15 report_cust_bill_pkg.html, 1.1,
1.2 report_money_time.html, 1.2, 1.3
- Next message: [freeside-commits] freeside/httemplate/misc/process
batch-cust_pay.cgi, 1.2, 1.3 catchall.cgi, 1.4,
1.5 cdr-import.html, 1.2, 1.3 cust_main-import.cgi, 1.4,
1.5 cust_main-import_charges.cgi, 1.3, 1.4 delete-customer.cgi,
1.4, 1.5 expire_pkg.cgi, 1.1, 1.2 inventory_item-import.html,
1.2, 1.3 link.cgi, 1.14, 1.15 meta-import.cgi, 1.6,
1.7 payment.cgi, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list