};
</%doc>
-<% include( 'search.html',
+<& search.html,
'name' => 'customers',
'query' => $sql_query,
'count_query' => $count_sql,
'30-60',
'60-90',
'90+',
- 'Total',
+ emt('Total'),
@pay_head,
],
'footer' => [
'',
@pay_links,
],
- #'align' => 'rlccrrrrr',
'align' => FS::UI::Web::cust_aligns().
'rrrrr'.
('c' x @pay_labels),
- #'size' => [ '', '', '-1', '-1', '', '', '', '', '', ],
- #'style' => [ '', '', 'b', 'b', '', '', '', '', 'b', ],
'size' => [ ( map '', FS::UI::Web::cust_header() ),
#'-1', '', '', '', '', '', ],
'', '', '', '', '', '',
( map '', @pay_labels ),
],
%opt,
- )
-%>
+&>
<%init>
my %opt = @_;
$opt{'title'} .= ' ('.$cgi->param('as_of').')' if $offset > 0;
}
-#my $range_cols = join(',', map &{$range_sub}( @$_ ), @ranges );
my $range_cols = join(',', map call_range_sub($range_sub, @$_, 'offset' => $offset ), @$ranges );
my $select_count_pkgs = FS::cust_main->select_count_pkgs_sql;
#prospect active inactive suspended cancelled
if ( grep { $cgi->param('status') eq $_ } FS::cust_main->statuses() ) {
my $method = $cgi->param('status'). '_sql';
- #push @where, $class->$method();
push @where, FS::cust_main->$method();
}
@pay_labels = (map { my $payby = $_;
my $label = $label{$payby};
- sub {($payby eq $_[0]->payby) ? "<b>$label (on file)</b>" : $label}
+ sub {($payby eq $_[0]->payby) ? "<b>".emt("$label (on file)")."</b>" : emt($label)}
} @payby );
@pay_links = (map { [ "${p}misc/payment.cgi?payby=$_;custnum=", 'custnum' ] }
)
</%doc>
-<% include( 'search.html',
- 'title' => $title,
+<& search.html,
+ 'title' => $title, # XXX: translate
'name_singular' => $name_singular,
'query' => $sql_query,
'count_query' => $count_query,
'links' => \@links,
'color' => \@color,
'style' => \@style,
- )
-%>
+&>
<%init>
my %opt = @_;
push @sort_fields, '', $amount_field;
if ( $unapplied ) {
- push @header, 'Unapplied';
+ push @header, emt('Unapplied');
$align .= 'r';
push @links, '';
push @fields, sub { sprintf('$%.2f', shift->unapplied_amount) };
push @sort_fields, '';
}
-push @header, 'Date';
+push @header, emt('Date');
$align .= 'r';
push @links, '';
push @fields, sub { time2str('%b %d %Y', shift->_date ) };
push @sort_fields, '_date';
unless ( $opt{'disable_by'} ) {
- push @header, 'By';
+ push @header, emt('By');
$align .= 'c';
push @links, '';
push @fields, sub { my $o = shift->otaker;
}
if ( $tax_names ) {
- push @header, ('Tax names', 'Tax province');
+ push @header, (emt('Tax names'), emt('Tax province'));
$align .= 'cc';
push @links, ('','');
push @fields, sub { join (' + ', map { /^(.*?)(, \w\w)?$/; $1 }
)
</%doc>
-<% include('/elements/header.html', $title ) %>
+<& /elements/header.html, emt($title) &>
<FORM ACTION="<% $table %>.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="_date">
<TR>
<TH CLASS="background" COLSPAN=2 ALIGN="left">
- <FONT SIZE="+1">Search options</FONT>
+ <FONT SIZE="+1"><% mt('Search options') |h %></FONT>
</TH>
</TR>
<TD ALIGN="right"><% ucfirst(PL($name_singular)) %> of type: </TD>
<TD>
<SELECT NAME="payby" onChange="payby_changed(this)">
- <OPTION VALUE="">all</OPTION>
- <OPTION VALUE="CARD">credit card (all)</OPTION>
- <OPTION VALUE="CARD-VisaMC">credit card (Visa/MasterCard)</OPTION>
- <OPTION VALUE="CARD-Amex">credit card (American Express)</OPTION>
- <OPTION VALUE="CARD-Discover">credit card (Discover)</OPTION>
- <OPTION VALUE="CARD-Maestro">credit card (Maestro/Switch/Solo)</OPTION>
- <OPTION VALUE="CHEK">electronic check / ACH</OPTION>
- <OPTION VALUE="BILL">check</OPTION>
- <OPTION VALUE="PREP">prepaid card</OPTION>
- <OPTION VALUE="CASH">cash</OPTION>
- <OPTION VALUE="WEST">Western Union</OPTION>
- <OPTION VALUE="MCRD">manual credit card</OPTION>
+ <OPTION VALUE=""><% mt('all') |h %></OPTION>
+ <OPTION VALUE="CARD"><% mt('credit card (all)') |h %></OPTION>
+ <OPTION VALUE="CARD-VisaMC"><% mt('credit card (Visa/MasterCard)') |h %></OPTION>
+ <OPTION VALUE="CARD-Amex"><% mt('credit card (American Express)') |h %></OPTION>
+ <OPTION VALUE="CARD-Discover"><% mt('credit card (Discover)') |h %></OPTION>
+ <OPTION VALUE="CARD-Maestro"><% mt('credit card (Maestro/Switch/Solo)') |h %></OPTION>
+ <OPTION VALUE="CHEK"><% mt('electronic check / ACH') |h %></OPTION>
+ <OPTION VALUE="BILL"><% mt('check') |h %></OPTION>
+ <OPTION VALUE="PREP"><% mt('prepaid card') |h %></OPTION>
+ <OPTION VALUE="CASH"><% mt('cash') |h %></OPTION>
+ <OPTION VALUE="WEST"><% mt('Western Union') |h %></OPTION>
+ <OPTION VALUE="MCRD"><% mt('manual credit card') |h %></OPTION>
</SELECT>
</TD>
</TR>
</SCRIPT>
<TR>
- <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb">Check #: </FONT></TD>
+ <TD ALIGN="right"><FONT ID="checkno_caption" COLOR="#bbbbbb"><% mt('Check #:') |h %> </FONT></TD>
<TD>
<INPUT TYPE="text" NAME="payinfo" DISABLED STYLE="background-color: #dddddd">
</TD>
</TR>
- <% include( '/elements/tr-select-agent.html',
+ <& /elements/tr-select-agent.html,
'curr_value' => scalar($cgi->param('agentnum')),
- 'label' => 'for agent: ',
+ 'label' => emt('for agent: '),
'disable_empty' => 0,
- )
- %>
+ &>
- <% include( '/elements/tr-select-user.html' ) %>
+ <& /elements/tr-select-user.html &>
<TR>
- <TD ALIGN="right" VALIGN="center">Payment</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Payment') |h %></TD>
<TD>
<TABLE>
- <% include( '/elements/tr-input-beginning_ending.html',
+ <& /elements/tr-input-beginning_ending.html,
layout => 'horiz',
- )
- %>
+ &>
</TABLE>
</TD>
</TR>
% if ( $void ) {
<TR>
- <TD ALIGN="right" VALIGN="center">Voided</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Voided') |h %></TD>
<TD>
<TABLE>
- <% include( '/elements/tr-input-beginning_ending.html',
+ <& /elements/tr-input-beginning_ending.html,
prefix => 'void',
layout => 'horiz',
- )
- %>
+ &>
</TABLE>
</TD>
</TR>
% }
- <% include( '/elements/tr-input-lessthan_greaterthan.html',
- 'label' => 'Amount',
- 'field' => 'paid',
- )
- %>
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ 'label' => emt('Amount'),
+ 'field' => 'paid',
+ &>
% if ( $table eq 'cust_pay' ) {
- <% include( '/elements/tr-checkbox.html',
- 'label' => 'Include tax names',
- 'field' => 'tax_names',
+ <& /elements/tr-checkbox.html,
+ 'label' => emt('Include tax names'),
+ 'field' => 'tax_names',
'value' => 1,
- )
- %>
+ &>
% }
</TABLE>
<BR>
-<INPUT TYPE="submit" VALUE="Get Report">
+<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
</FORM>
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
<%init>
my %opt = @_;
-<% include('/elements/header.html', 'Invoice Report' ) %>
+<& /elements/header.html, emt('Invoice Report') &>
<FORM ACTION="cust_bill.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="_date">
<TABLE BGCOLOR="#cccccc" CELLSPACING=0
- <% include( '/elements/tr-select-agent.html',
+ <& /elements/tr-select-agent.html,
'curr_value' => scalar( $cgi->param('agentnum') ),
- 'label' => 'Invoices for agent: ',
+ 'label' => emt('Invoices for agent: '),
'disable_empty' => 0,
- )
- %>
+ &>
- <% include( '/elements/tr-input-beginning_ending.html' ) %>
+ <& /elements/tr-input-beginning_ending.html &>
- <% include( '/elements/tr-input-lessthan_greaterthan.html',
- label => 'Charged',
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ label => emt('Charged'),
field => 'charged',
- )
- %>
+ &>
- <% include( '/elements/tr-input-lessthan_greaterthan.html',
- label => 'Owed',
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ label => emt('Owed'),
field => 'owed',
- )
- %>
- <% include( '/elements/tr-select-payby.html',
- label => 'Payment method:',
+ &>
+ <& /elements/tr-select-payby.html,
+ label => emt('Payment method:'),
payby_type => 'cust',
multiple => 1,
all_selected => 1,
- )
- %>
+ &>
<TR>
<TD ALIGN="right"><INPUT TYPE="checkbox" NAME="open" VALUE="1" CHECKED></TD>
- <TD>Show only open invoices</TD>
+ <TD><% mt('Show only open invoices') |h %></TD>
</TR>
<TR>
<TD ALIGN="right"><INPUT TYPE="checkbox" NAME="newest_percust" VALUE="1"></TD>
- <TD>Show only the single most recent invoice per-customer</TD>
+ <TD><% mt('Show only the single most recent invoice per-customer') |h %></TD>
</TR>
</TABLE>
<BR>
-<INPUT TYPE="submit" VALUE="Get Report">
+<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
</FORM>
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
<%init>
die "access denied"
-<% include('/elements/header.html', 'Customer Report' ) %>
+<& /elements/header.html, emt('Customer Report') &>
<FORM ACTION="cust_main.html" METHOD="GET">
<INPUT TYPE="hidden" NAME="magic" VALUE="bill">
<TABLE BGCOLOR="#cccccc" CELLSPACING=0>
<TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Search options</FONT></TH>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Search options') |h %></FONT></TH>
</TR>
- <% include( '/elements/tr-select-agent.html',
+ <& /elements/tr-select-agent.html,
'curr_value' => scalar($cgi->param('agentnum')),
'disable_empty' => 0,
- )
- %>
+ &>
- <% include( '/elements/tr-select-cust_main-status.html',
- 'label' => 'Status'
- )
- %>
+ <& /elements/tr-select-cust_main-status.html,
+ 'label' => emt('Status'),
+ &>
- <% include( '/elements/tr-select-cust_class.html',
- 'label' => 'Class',
+ <& /elements/tr-select-cust_class.html,
+ 'label' => emt('Class'),
'multiple' => 1,
- 'pre_options' => [ '' => '(none)' ],
+ 'pre_options' => [ '' => emt('(none)') ],
'all_selected' => 1,
- )
- %>
+ &>
<TR>
- <TD ALIGN="right" VALIGN="center">Address</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Address') |h %></TD>
<TD><INPUT TYPE="text" NAME="address" SIZE=54></TD>
</TR>
-% foreach my $field (qw( signupdate )) {
-
- <TR>
- <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Signup date') |h %></TD>
<TD>
- <TABLE>
- <% include( '/elements/tr-input-beginning_ending.html',
- prefix => $field,
- layout => 'horiz',
- )
- %>
- </TABLE>
+ <TABLE>
+ <& /elements/tr-input-beginning_ending.html,
+ prefix => 'signupdate',
+ layout => 'horiz',
+ &>
+ </TABLE>
</TD>
- </TR>
-
-% }
+ </TR>
- <% include( '/elements/tr-select-cust_tag.html',
- 'cgi' => $cgi,
- 'is_report' => 1,
+ <& /elements/tr-select-cust_tag.html,
+ 'cgi' => $cgi,
+ 'is_report' => 1,
'multiple' => 1,
- )
- %>
+ &>
- <% include( '/elements/tr-select-payby.html',
+ <& /elements/tr-select-payby.html,
'payby_type' => 'cust',
'multiple' => 1,
'all_selected' => 1,
- )
- %>
+ &>
<TR>
- <TD ALIGN="right">Payment expiration before</TD>
+ <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
<TD>
<SELECT NAME="paydate_month" DISABLED>
% foreach my $month ( 1 .. 12 ) {
</SCRIPT>
<TR>
- <TD ALIGN="right">Invoice terms</TD>
+ <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
<TD>
- <% include( '/elements/select-terms.html',
- 'pre_options' => [ '' => 'all' ],
+ <& /elements/select-terms.html,
+ 'pre_options' => [ '' => emt('all') ],
'empty_value' => 'NULL',
- )
- %>
+ &>
</TD>
</TR>
- <% include( '/elements/tr-input-lessthan_greaterthan.html',
- label => 'Current balance',
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ label => emt('Current balance'),
field => 'current_balance',
- )
- %>
+ &>
<TR>
- <TD ALIGN="right" VALIGN="center">Include cancelled packages</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Include cancelled packages') |h %></TD>
<TD><INPUT TYPE="checkbox" NAME="cancelled_pkgs"></TD>
</TR>
<TR>
- <TD ALIGN="right" VALIGN="center">Without census tract</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Without census tract') |h %></TD>
<TD><INPUT TYPE="checkbox" NAME="no_censustract"></TD>
</TR>
% if ( $conf->exists('enable_taxproducts') ) {
<TR>
- <TD ALIGN="right" VALIGN="center">With hardcoded tax location</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('With hardcoded tax location') |h %></TD>
<TD><INPUT TYPE="checkbox" NAME="with_geocode"></TD>
</TR>
</TR>
<TR>
- <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1">Display options</FONT></TH>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Display options') |h %></FONT></TH>
</TR>
- <% include( '/elements/tr-select-cust-fields.html' ) %>
+ <& /elements/tr-select-cust-fields.html &>
<TR>
- <TD ALIGN="right" VALIGN="center">Add package columns</TD>
+ <TD ALIGN="right" VALIGN="center"><% mt('Add package columns') |h %></TD>
<TD><INPUT TYPE="checkbox" NAME="flattened_pkgs"></TD>
</TR>
</TABLE>
<BR>
-<INPUT TYPE="submit" VALUE="Get Report">
+<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
</FORM>
-<% include('/elements/footer.html') %>
+<& /elements/footer.html &>
<%init>
die "access denied"
my $conf = new FS::Conf;
</%init>
-<%once>
-
-my %label = (
- 'signupdate' => 'Signup date',
-);
-
-</%once>