[freeside-commits] freeside/httemplate/view/cust_main billing.html,
1.6, 1.7 contacts.html, 1.4, 1.5 misc.html, 1.3,
1.4 order_pkg.html, 1.1, 1.2 packages.html, 1.7,
1.8 payment_history.html, 1.13, 1.14 quick-charge.html, 1.4,
1.5 tickets.html, 1.6, 1.7
Ivan,,,
ivan at wavetail.420.am
Wed Aug 23 15:25:41 PDT 2006
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail:/tmp/cvs-serv18630/httemplate/view/cust_main
Modified Files:
billing.html contacts.html misc.html order_pkg.html
packages.html payment_history.html quick-charge.html
tickets.html
Log Message:
Will things ever be the same again?
It's the final masonize
Index: payment_history.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/payment_history.html,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- payment_history.html 13 Aug 2006 10:25:58 -0000 1.13
+++ payment_history.html 23 Aug 2006 22:25:38 -0000 1.14
@@ -1,421 +1,416 @@
-<%
- my( $cust_main ) = @_;
- my $custnum = $cust_main->custnum;
-
- my $conf = new FS::Conf;
-
- my $curuser = $FS::CurrentUser::CurrentUser;
-
- 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 ))
[...1010 lines suppressed...]
- <%= $showbalance %>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% $showbalance %>
</TD>
</TR>
+% }
-<% } %>
</TABLE>
@@ -559,7 +558,7 @@
var balance_forward_row = document.getElementById('balance_forward_row');
balance_forward_row.style.display = 'none';
- for ( var i = 0; i < <%= $old_history %>; i++ ) {
+ for ( var i = 0; i < <% $old_history %>; i++ ) {
var oldRow = document.getElementById('old_history'+i);
oldRow.style.display = '';
}
Index: order_pkg.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/order_pkg.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- order_pkg.html 11 Dec 2004 07:51:00 -0000 1.1
+++ order_pkg.html 23 Aug 2006 22:25:38 -0000 1.2
@@ -1,6 +1,7 @@
-<%
- my( $cust_main ) = @_;
-%>
+%
+% my( $cust_main ) = @_;
+%
+
<SCRIPT TYPE="text/javascript">
function enable_order_pkg () {
@@ -12,25 +13,25 @@
}
</SCRIPT>
-<FORM NAME="OrderPkgForm" ACTION="<%= $p %>edit/process/quick-cust_pkg.cgi" METHOD="POST">
+<FORM NAME="OrderPkgForm" ACTION="<% $p %>edit/process/quick-cust_pkg.cgi" METHOD="POST">
-<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $cust_main->custnum %>">
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>">
<SELECT NAME="pkgpart" onChange="enable_order_pkg()"><OPTION>Order additional package
+%
+%foreach my $part_pkg (
+% qsearch( 'part_pkg', { 'disabled' => '' }, '',
+% ' AND 0 < ( SELECT COUNT(*) FROM type_pkgs '.
+% ' WHERE typenum = '. $cust_main->agent->typenum.
+% ' AND type_pkgs.pkgpart = part_pkg.pkgpart )'
+% )
+%) {
+%
-<%
-foreach my $part_pkg (
- qsearch( 'part_pkg', { 'disabled' => '' }, '',
- ' AND 0 < ( SELECT COUNT(*) FROM type_pkgs '.
- ' WHERE typenum = '. $cust_main->agent->typenum.
- ' AND type_pkgs.pkgpart = part_pkg.pkgpart )'
- )
-) {
-%>
- <OPTION VALUE="<%= $part_pkg->pkgpart %>"><%= $part_pkg->pkg %> - <%= $part_pkg->comment %>
+ <OPTION VALUE="<% $part_pkg->pkgpart %>"><% $part_pkg->pkg %> - <% $part_pkg->comment %>
+% }
-<% } %>
</SELECT>
Index: tickets.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/tickets.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- tickets.html 13 Aug 2006 10:25:58 -0000 1.6
+++ tickets.html 23 Aug 2006 22:25:39 -0000 1.7
@@ -1,43 +1,44 @@
-<%
- my( $cust_main ) = @_;
-
- my $conf = new FS::Conf;
- my $num = $conf->config('cust_main-max_tickets') || 10;
-
- my @tickets = ();
- unless ( $conf->config('ticket_system-custom_priority_field') ) {
-
- @tickets =
- @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) };
-
- } else {
-
- foreach my $priority (
- $conf->config('ticket_system-custom_priority_field-values'), ''
- ) {
- last if scalar(@tickets) >= $num;
- push @tickets,
- @{ FS::TicketSystem->customer_tickets( $cust_main->custnum,
- $num - scalar(@tickets),
- $priority,
- )
- };
- }
-
- }
+%
+% my( $cust_main ) = @_;
+%
+% my $conf = new FS::Conf;
+% my $num = $conf->config('cust_main-max_tickets') || 10;
+%
+% my @tickets = ();
+% unless ( $conf->config('ticket_system-custom_priority_field') ) {
+%
+% @tickets =
+% @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) };
+%
+% } else {
+%
+% foreach my $priority (
+% $conf->config('ticket_system-custom_priority_field-values'), ''
+% ) {
+% last if scalar(@tickets) >= $num;
+% push @tickets,
+% @{ FS::TicketSystem->customer_tickets( $cust_main->custnum,
+% $num - scalar(@tickets),
+% $priority,
+% )
+% };
+% }
+%
+% }
+%
+%
-%>
Highest priority tickets
-(<A HREF="<%= FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>)
-(<A HREF="<%= FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">New ticket for this customer</A>)
+(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>)
+(<A HREF="<% FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">New ticket for this customer</A>)
-<%= include("/elements/table-grid.html") %>
+<% include("/elements/table-grid.html") %>
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor = '';
+%
-<% my $bgcolor1 = '#eeeeee';
- my $bgcolor2 = '#ffffff';
- my $bgcolor = '';
-%>
<TR>
<TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
@@ -46,31 +47,31 @@
<TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Status</TH>
</TR>
+% foreach my $ticket ( @tickets ) {
+% my $href = FS::TicketSystem->href_ticket($ticket->{id});
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
+%
-<% foreach my $ticket ( @tickets ) {
- my $href = FS::TicketSystem->href_ticket($ticket->{id});
- if ( $bgcolor eq $bgcolor1 ) {
- $bgcolor = $bgcolor2;
- } else {
- $bgcolor = $bgcolor1;
- }
-%>
<TR>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF=<%=$href%>><%= $ticket->{id} %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF=<%$href%>><% $ticket->{id} %></A></TD>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><A HREF=<%=$href%>><%= $ticket->{subject} %></A></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF=<%$href%>><% $ticket->{subject} %></A></TD>
- <TD ALIGN="right" CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $ticket->{content} || $ticket->{priority} %></TD>
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{content} || $ticket->{priority} %></TD>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $ticket->{name} %></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{name} %></TD>
- <TD CLASS="grid" BGCOLOR="<%= $bgcolor %>"><%= $ticket->{status} %></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{status} %></TD>
</TR>
+% }
-<% } %>
</TABLE>
Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/billing.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- billing.html 13 Aug 2006 10:25:58 -0000 1.6
+++ billing.html 23 Aug 2006 22:25:38 -0000 1.7
@@ -1,182 +1,188 @@
-<%
- my( $cust_main ) = @_;
- my @invoicing_list = $cust_main->invoicing_list;
- my $conf = new FS::Conf;
- my $money_char = $conf->config('money_char') || '$';
-%>
+%
+% my( $cust_main ) = @_;
+% my @invoicing_list = $cust_main->invoicing_list;
+% my $conf = new FS::Conf;
+% my $money_char = $conf->config('money_char') || '$';
+%
+
Billing information
-(<A HREF="<%= $p %>misc/bill.cgi?<%= $cust_main->custnum %>">Bill now</A>)
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
+(<A HREF="<% $p %>misc/bill.cgi?<% $cust_main->custnum %>">Bill now</A>)
+<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
+%
+%( my $balance = $cust_main->balance )
+% =~ s/^(\-?)(.*)$/<FONT SIZE=+1>$1<\/FONT>$money_char$2/;
+%
-<%
-( my $balance = $cust_main->balance )
- =~ s/^(\-?)(.*)$/<FONT SIZE=+1>$1<\/FONT>$money_char$2/;
-%>
<TR>
<TD ALIGN="right">Balance due</TD>
- <TD BGCOLOR="#ffffff"><B><%= $balance %></B></TD>
+ <TD BGCOLOR="#ffffff"><B><% $balance %></B></TD>
</TR>
<TR>
<TD ALIGN="right">Billing type</TD>
<TD BGCOLOR="#ffffff">
+% if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) {
-<% if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) { %>
- Credit card <%= $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' %>
+ Credit card <% $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' %>
</TD>
</TR>
<TR>
<TD ALIGN="right">Card number</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payinfo_masked %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payinfo_masked %></TD>
</TR>
+%
+%#false laziness w/elements/select-month_year.html & edit/cust_main/billing.html
+%my( $mon, $year );
+%my $date = $cust_main->paydate || '12-2037';
+%if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
+% ( $mon, $year ) = ( $2, $1 );
+%} elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
+% ( $mon, $year ) = ( $1, $3 );
+%} else {
+% warn "unrecognized expiration date format: $date";
+% ( $mon, $year ) = ( '', '' );
+%}
+%
-<%
-#false laziness w/elements/select-month_year.html & edit/cust_main/billing.html
-my( $mon, $year );
-my $date = $cust_main->paydate || '12-2037';
-if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
- ( $mon, $year ) = ( $2, $1 );
-} elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
- ( $mon, $year ) = ( $1, $3 );
-} else {
- warn "unrecognized expiration date format: $date";
- ( $mon, $year ) = ( '', '' );
-}
-%>
<TR>
<TD ALIGN="right">Expiration</TD>
- <TD BGCOLOR="#ffffff"><%= "$mon/$year" %></TD>
+ <TD BGCOLOR="#ffffff"><% "$mon/$year" %></TD>
</TR>
+% if ( $cust_main->paystart_month ) {
-<% if ( $cust_main->paystart_month ) { %>
<TR>
<TD ALIGN="right">Start date</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->paystart_month. '/'. $cust_main->paystart_year %>
+ <TD BGCOLOR="#ffffff"><% $cust_main->paystart_month. '/'. $cust_main->paystart_year %>
</TR>
-<% } elsif ( $cust_main->payissue ) { %>
+% } elsif ( $cust_main->payissue ) {
+
<TR>
<TD ALIGN="right">Issue #</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payissue %>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payissue %>
</TR>
-<% } %>
+% }
+
<TR>
<TD ALIGN="right">Name on card</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payname %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
</TR>
+% } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') {
+% my( $account, $aba ) = split('@', $cust_main->payinfo );
+%
-<% } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') {
- my( $account, $aba ) = split('@', $cust_main->payinfo );
-%>
- Electronic check <%= $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %>
+ Electronic check <% $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' %>
</TD>
</TR>
<TR>
<TD ALIGN="right">ABA/Routing code</TD>
- <TD BGCOLOR="#ffffff"><%= $aba %></TD>
+ <TD BGCOLOR="#ffffff"><% $aba %></TD>
</TR>
<TR>
<TD ALIGN="right">Account number</TD>
- <TD BGCOLOR="#ffffff"><%= 'x'x(length($account)-2). substr($account,(length($account)-2)) %></TD>
+ <TD BGCOLOR="#ffffff"><% 'x'x(length($account)-2). substr($account,(length($account)-2)) %></TD>
</TR>
<TR>
<TD ALIGN="right">Bank name</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payname %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
</TR>
+% } elsif ( $cust_main->payby eq 'LECB' ) {
+% $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
+% my $payinfo = "$1-$2-$3";
+%
-<% } elsif ( $cust_main->payby eq 'LECB' ) {
- $cust_main->payinfo =~ /^(\d{3})(\d{3})(\d{4})$/;
- my $payinfo = "$1-$2-$3";
-%>
Phone bill billing
</TD>
</TR>
<TR>
<TD ALIGN="right">Phone number</TD>
- <TD BGCOLOR="#ffffff"><%= $payinfo %></TD>
+ <TD BGCOLOR="#ffffff"><% $payinfo %></TD>
</TR>
+% } elsif ( $cust_main->payby eq 'BILL' ) {
-<% } elsif ( $cust_main->payby eq 'BILL' ) { %>
Billing
</TD>
</TR>
+% if ( $cust_main->payinfo ) {
- <% if ( $cust_main->payinfo ) { %>
<TR>
<TD ALIGN="right">P.O. </TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payinfo %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payinfo %></TD>
</TR>
- <% } %>
+% }
+
<TR>
<TD ALIGN="right">Attention</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payname %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payname %></TD>
</TR>
+% } elsif ( $cust_main->payby eq 'COMP' ) {
-<% } elsif ( $cust_main->payby eq 'COMP' ) { %>
Complimentary
</TD>
</TR>
<TR>
<TD ALIGN="right">Authorized by</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->payinfo %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->payinfo %></TD>
</TR>
+%
+%#false laziness w/above etc.
+%my( $mon, $year );
+%my $date = $cust_main->paydate || '12-2037';
+%if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
+% ( $mon, $year ) = ( $2, $1 );
+%} elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
+% ( $mon, $year ) = ( $1, $3 );
+%} else {
+% warn "unrecognized expiration date format: $date";
+% ( $mon, $year ) = ( '', '' );
+%}
+%
-<%
-#false laziness w/above etc.
-my( $mon, $year );
-my $date = $cust_main->paydate || '12-2037';
-if ( $date =~ /^(\d{4})-(\d{1,2})-\d{1,2}$/ ) { #PostgreSQL date format
- ( $mon, $year ) = ( $2, $1 );
-} elsif ( $date =~ /^(\d{1,2})-(\d{1,2}-)?(\d{4}$)/ ) {
- ( $mon, $year ) = ( $1, $3 );
-} else {
- warn "unrecognized expiration date format: $date";
- ( $mon, $year ) = ( '', '' );
-}
-%>
<TR>
<TD ALIGN="right">Expiration</TD>
- <TD BGCOLOR="#ffffff"><%= "$mon/$year" %></TD>
+ <TD BGCOLOR="#ffffff"><% "$mon/$year" %></TD>
</TR>
+% }
-<% } %>
<TR>
<TD ALIGN="right">Tax exempt</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->tax ? 'yes' : 'no' %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->tax ? 'yes' : 'no' %></TD>
</TR>
<TR>
<TD ALIGN="right">Postal invoices</TD>
<TD BGCOLOR="#ffffff">
- <%= ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no' %>
+ <% ( grep { $_ eq 'POST' } @invoicing_list ) ? 'yes' : 'no' %>
</TD>
</TR>
<TR>
<TD ALIGN="right">FAX invoices</TD>
<TD BGCOLOR="#ffffff">
- <%= ( grep { $_ eq 'FAX' } @invoicing_list ) ? 'yes' : 'no' %>
+ <% ( grep { $_ eq 'FAX' } @invoicing_list ) ? 'yes' : 'no' %>
</TD>
</TR>
<TR>
<TD ALIGN="right">Email invoices</TD>
<TD BGCOLOR="#ffffff">
- <%= join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
+ <% join(', ', grep { $_ !~ /^(POST|FAX)$/ } @invoicing_list ) || 'no' %>
</TD>
</TR>
-<% if ( $conf->exists('voip-cust_cdr_spools') ) { %>
+% if ( $conf->exists('voip-cust_cdr_spools') ) {
+
<TR>
<TD ALIGN="right">Spool CDRs</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->spool_cdr ? 'yes' : 'no' %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->spool_cdr ? 'yes' : 'no' %></TD>
</TR>
-<% } %>
+% }
+
</TABLE></TD></TR></TABLE>
Index: quick-charge.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/quick-charge.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- quick-charge.html 8 Oct 2005 00:47:20 -0000 1.4
+++ quick-charge.html 23 Aug 2006 22:25:39 -0000 1.5
@@ -1,16 +1,17 @@
-<%
- my( $cust_main ) = @_;
-%>
+%
+% my( $cust_main ) = @_;
+%
-<FORM ACTION="<%=$p%>edit/process/quick-charge.cgi" METHOD="POST">
-<INPUT TYPE="hidden" NAME="custnum" VALUE="<%= $cust_main->custnum %>">
+<FORM ACTION="<%$p%>edit/process/quick-charge.cgi" METHOD="POST">
+
+<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $cust_main->custnum %>">
Description:<INPUT TYPE="text" NAME="pkg">
Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>
-<%= include('/elements/select-taxclass.html') %>
+<% include('/elements/select-taxclass.html') %>
<INPUT TYPE="submit" VALUE="One-time charge">
Index: contacts.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/contacts.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- contacts.html 19 Jun 2006 08:05:28 -0000 1.4
+++ contacts.html 23 Aug 2006 22:25:38 -0000 1.5
@@ -1,58 +1,64 @@
-<%
- my( $cust_main ) = @_;
- my $conf = new FS::Conf;
-%>
+%
+% my( $cust_main ) = @_;
+% my $conf = new FS::Conf;
+%
+
Billing address
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
+<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Contact name</TD>
<TD COLSPAN=3 BGCOLOR="#ffffff">
- <%= $cust_main->last. ', '. $cust_main->first %>
+ <% $cust_main->last. ', '. $cust_main->first %>
</TD>
-<% if ( $conf->exists('show_ss') ) { %>
+% if ( $conf->exists('show_ss') ) {
+
<TD ALIGN="right">SS#</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->ss || ' ' %></TD>
-<% } %>
+ <TD BGCOLOR="#ffffff"><% $cust_main->ss || ' ' %></TD>
+% }
+
</TR>
<TR>
<TD ALIGN="right">Company</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->company %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->company %></TD>
</TR>
<TR>
<TD ALIGN="right">Address</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->address1 %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->address1 %></TD>
</TR>
-<% if ( $cust_main->address2 ) { %>
+% if ( $cust_main->address2 ) {
+
<TR>
<TD ALIGN="right"> </TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->address2 %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->address2 %></TD>
</TR>
-<% } %>
+% }
+
<TR>
<TD ALIGN="right">City</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->city %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->city %></TD>
<TD ALIGN="right">State</TD>
- <TD BGCOLOR="#ffffff"><%= state_label($cust_main->state, $cust_main->country) %></TD>
+ <TD BGCOLOR="#ffffff"><% state_label($cust_main->state, $cust_main->country) %></TD>
<TD ALIGN="right">Zip</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->zip %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->zip %></TD>
</TR>
<TR>
<TD ALIGN="right">Country</TD>
- <TD BGCOLOR="#ffffff"><%= code2country($cust_main->country) %></TD>
+ <TD BGCOLOR="#ffffff"><% code2country($cust_main->country) %></TD>
</TR>
-<%
- my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
- ? 'Day Phone'
- : FS::Msgcat::_gettext('daytime');
- my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
- ? 'Night Phone'
- : FS::Msgcat::_gettext('night');
-%>
+%
+% my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/
+% ? 'Day Phone'
+% : FS::Msgcat::_gettext('daytime');
+% my $night_label = FS::Msgcat::_gettext('night') =~ /^(night)?$/
+% ? 'Night Phone'
+% : FS::Msgcat::_gettext('night');
+%
+
<TR>
- <TD ALIGN="right"><%= $daytime_label %></TD>
+ <TD ALIGN="right"><% $daytime_label %></TD>
<TD COLSPAN=6 BGCOLOR="#ffffff">
- <%= include('/elements/phonenumber.html',
+ <% include('/elements/phonenumber.html',
$cust_main->daytime,
'callable'=>1
)
@@ -60,9 +66,9 @@
</TD>
</TR>
<TR>
- <TD ALIGN="right"><%= $night_label %></TD>
+ <TD ALIGN="right"><% $night_label %></TD>
<TD COLSPAN=6 BGCOLOR="#ffffff">
- <%= include('/elements/phonenumber.html',
+ <% include('/elements/phonenumber.html',
$cust_main->night,
'callable'=>1
)
@@ -72,54 +78,56 @@
<TR>
<TD ALIGN="right">Fax</TD>
<TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->fax || ' ' %>
+ <% $cust_main->fax || ' ' %>
</TD>
</TR>
</TABLE></TD></TR></TABLE>
+% if ( defined $cust_main->dbdef_table->column('ship_last') ) {
+% my $pre = $cust_main->ship_last ? 'ship_' : '';
+%
-<% if ( defined $cust_main->dbdef_table->column('ship_last') ) {
- my $pre = $cust_main->ship_last ? 'ship_' : '';
-%>
<BR>
Service address
-<%= ntable("#cccccc") %><TR><TD><%= ntable("#cccccc",2) %>
+<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Contact name</TD>
<TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %>
+ <% $cust_main->get("${pre}last"). ', '. $cust_main->get("${pre}first") %>
</TD>
</TR>
<TR>
<TD ALIGN="right">Company</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->get("${pre}company") %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->get("${pre}company") %></TD>
</TR>
<TR>
<TD ALIGN="right">Address</TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->get("${pre}address1") %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address1") %></TD>
</TR>
-<% if ( $cust_main->get("${pre}address2") ) { %>
+% if ( $cust_main->get("${pre}address2") ) {
+
<TR>
<TD ALIGN="right"> </TD>
- <TD COLSPAN=5 BGCOLOR="#ffffff"><%= $cust_main->get("${pre}address2") %></TD>
+ <TD COLSPAN=5 BGCOLOR="#ffffff"><% $cust_main->get("${pre}address2") %></TD>
</TR>
-<% } %>
+% }
+
<TR>
<TD ALIGN="right">City</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->get("${pre}city") %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}city") %></TD>
<TD ALIGN="right">State</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->get("${pre}state") %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}state") %></TD>
<TD ALIGN="right">Zip</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->get("${pre}zip") %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->get("${pre}zip") %></TD>
</TR>
<TR>
<TD ALIGN="right">Country</TD>
- <TD BGCOLOR="#ffffff"><%= code2country( $cust_main->get("${pre}country") ) %></TD>
+ <TD BGCOLOR="#ffffff"><% code2country( $cust_main->get("${pre}country") ) %></TD>
</TR>
<TR>
- <TD ALIGN="right"><%= $daytime_label %></TD>
+ <TD ALIGN="right"><% $daytime_label %></TD>
<TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= include('/elements/phonenumber.html',
+ <% include('/elements/phonenumber.html',
$cust_main->get("${pre}daytime"),
'callable'=>1
)
@@ -127,9 +135,9 @@
</TD>
</TR>
<TR>
- <TD ALIGN="right"><%= $night_label %></TD>
+ <TD ALIGN="right"><% $night_label %></TD>
<TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= include('/elements/phonenumber.html',
+ <% include('/elements/phonenumber.html',
$cust_main->get("${pre}night"),
'callable'=>1
)
@@ -139,9 +147,9 @@
<TR>
<TD ALIGN="right">Fax</TD>
<TD COLSPAN=5 BGCOLOR="#ffffff">
- <%= $cust_main->get("${pre}fax") || ' ' %>
+ <% $cust_main->get("${pre}fax") || ' ' %>
</TD>
</TR>
</TABLE></TD></TR></TABLE>
+% }
-<% } %>
Index: misc.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/misc.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- misc.html 13 Aug 2006 10:25:58 -0000 1.3
+++ misc.html 23 Aug 2006 22:25:38 -0000 1.4
@@ -1,76 +1,77 @@
-<%
- my( $cust_main ) = @_;
- my $conf = new FS::Conf;
-%>
+%
+% my( $cust_main ) = @_;
+% my $conf = new FS::Conf;
+%
-<%= ntable("#cccccc") %><TR><TD><%= &ntable("#cccccc",2) %>
+
+<% ntable("#cccccc") %><TR><TD><% &ntable("#cccccc",2) %>
<TR>
<TD ALIGN="right">Customer number</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->custnum %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->custnum %></TD>
</TR>
<TR>
<TD ALIGN="right">Status</TD>
- <TD BGCOLOR="#ffffff"><FONT COLOR="#<%= $cust_main->statuscolor %>"><B><%= ucfirst($cust_main->status) %></B></FONT></TD>
+ <TD BGCOLOR="#ffffff"><FONT COLOR="#<% $cust_main->statuscolor %>"><B><% ucfirst($cust_main->status) %></B></FONT></TD>
</TR>
+%
+% my @agents = qsearch( 'agent', {} );
+% my $agent;
+% unless ( scalar(@agents) == 1 ) {
+% $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
+%
-<%
- my @agents = qsearch( 'agent', {} );
- my $agent;
- unless ( scalar(@agents) == 1 ) {
- $agent = qsearchs('agent',{ 'agentnum' => $cust_main->agentnum } );
-%>
<TR>
<TD ALIGN="right">Agent</TD>
- <TD BGCOLOR="#ffffff"><%= $agent->agentnum %>: <%= $agent->agent %></TD>
+ <TD BGCOLOR="#ffffff"><% $agent->agentnum %>: <% $agent->agent %></TD>
</TR>
+%
+% } else {
+% $agent = $agents[0];
+% }
+%
+% if ( $cust_main->agent_custid ) {
+%
-<%
- } else {
- $agent = $agents[0];
- }
-
- if ( $cust_main->agent_custid ) {
-%>
<TR>
<TD ALIGN="right">Agent customer ref#</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->agent_custid %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->agent_custid %></TD>
</TR>
+%
+% }
+%
+% unless ( FS::part_referral->num_part_referral == 1 ) {
+% my $referral = qsearchs('part_referral', {
+% 'refnum' => $cust_main->refnum
+% } );
+%
-<%
- }
-
- unless ( FS::part_referral->num_part_referral == 1 ) {
- my $referral = qsearchs('part_referral', {
- 'refnum' => $cust_main->refnum
- } );
-%>
<TR>
<TD ALIGN="right">Advertising source</TD>
- <TD BGCOLOR="#ffffff"><%= $referral->refnum %>: <%= $referral->referral%></TD>
+ <TD BGCOLOR="#ffffff"><% $referral->refnum %>: <% $referral->referral%></TD>
</TR>
+% }
-<% } %>
<TR>
<TD ALIGN="right">Referring Customer</TD>
<TD BGCOLOR="#ffffff">
+%
+% my $referring_cust_main = '';
+% if ( $cust_main->referral_custnum
+% && ( $referring_cust_main =
+% qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
+% )
+% ) {
+%
-<%
- my $referring_cust_main = '';
- if ( $cust_main->referral_custnum
- && ( $referring_cust_main =
- qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
- )
- ) {
-%>
-<A HREF="<%= popurl(1) %>cust_main.cgi?<%= $cust_main->referral_custnum %>"><%=$cust_main->referral_custnum %>:
-<%=
+<A HREF="<% popurl(1) %>cust_main.cgi?<% $cust_main->referral_custnum %>"><%$cust_main->referral_custnum %>:
+<%
( $referring_cust_main->company
? $referring_cust_main->company. ' ('.
$referring_cust_main->last. ', '. $referring_cust_main->first.
@@ -78,15 +79,15 @@
: $referring_cust_main->last. ', '. $referring_cust_main->first
)
%></A>
+% }
-<% } %>
</TD>
</TR>
<TR>
<TD ALIGN="right">Order taker</TD>
- <TD BGCOLOR="#ffffff"><%= $cust_main->otaker %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->otaker %></TD>
</TR>
</TABLE></TD></TR></TABLE>
Index: packages.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/packages.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- packages.html 13 Aug 2006 10:25:58 -0000 1.7
+++ packages.html 23 Aug 2006 22:25:38 -0000 1.8
@@ -1,567 +1,575 @@
-<%
- my( $cust_main ) = @_;
- my $conf = new FS::Conf;
+%
+% my( $cust_main ) = @_;
+% my $conf = new FS::Conf;
+%
+% my $curuser = $FS::CurrentUser::CurrentUser;
+%
+% my $packages = get_packages($cust_main, $conf);
+%
[...969 lines suppressed...]
+%sub pkg_expire_link {
+% my $pkg = shift or return '';
+% qq!<A HREF="${p}misc/expire_pkg.cgi?$pkg->{pkgnum}">Cancel later</A>!;
+%}
+%
+%sub pkg_dates_link {
+% my $pkg = shift or return '';
+% qq!<A HREF="${p}edit/REAL_cust_pkg.cgi?$pkg->{pkgnum}">Edit dates</A>!;
+%}
+%
+%sub pkg_customize_link {
+% my $pkg = shift or return '';
+% my $custnum = shift;
+% qq!<A HREF="${p}edit/part_pkg.cgi?keywords=$custnum;clone=$pkg->{pkgpart};!.
+% qq!pkgnum=$pkg->{pkgnum}">Customize</A>!;
+%}
+%
+%
-%>
More information about the freeside-commits
mailing list