+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Zip') |h %></TD>
+ <TD><INPUT TYPE="text" NAME="zip" SIZE=12></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Country') |h %></TD>
+ <TD>
+ <& /elements/select-country.html,
+ disable_empty => 0,
+ state_disable_empty => 0,
+ state_empty_label => '(all)',
+ &>
+ </TD>
+ </TR>
+
+ <TR>
+ <TH CLASS="background" COLSPAN=2> </TH>
+ </TR>
+
+ <TR>
+ <TH CLASS="background" COLSPAN=2 ALIGN="left"><FONT SIZE="+1"><% mt('Billing search options') |h %></FONT></TH>
+ </TR>
+
+ <& /elements/tr-select-payby.html,
+ 'payby_type' => 'cust',
+ 'multiple' => 1,
+ 'all_selected' => 1,
+ &>
+
+ <TR>
+ <TD ALIGN="right"><% mt('Payment expiration before') |h %></TD>
+ <TD>
+ <SELECT NAME="paydate_month" DISABLED>
+% foreach my $month ( 1 .. 12 ) {
+ <OPTION VALUE="<% $month %>"><% $month %></OPTION>
+% }
+ </SELECT>
+ /
+ <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
+ <OPTION VALUE=""></OPTION>
+% my $lastyear = (localtime(time))[5] + 1899;
+% foreach my $year ( $lastyear .. $lastyear+12 ) {
+ <OPTION VALUE="<% $year %>"><% $year %></OPTION>
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
+ <SCRIPT TYPE="text/javascript">
+ function paydate_year_changed(what) {
+ var value = what.options[what.selectedIndex].value;
+ var month_select = what.form.paydate_month;
+ if ( value == '' ) {
+ month_select.disabled = true;
+ } else {
+ month_select.disabled = false;
+ }
+ }
+ </SCRIPT>
+
+% my @exempt_groups = grep /\S/, $conf->config('tax-cust_exempt-groups');
+% unless ( @exempt_groups ) {
+
+% #falze laziness with With/Without postal mail invoices
+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Tax exempt') |h %></TD>
+ <TD><INPUT TYPE="checkbox" NAME="tax" ID="tax" onClick="tax_changed();"></TD>
+ </TR>
+
+ <TR>
+ <TD ALIGN="right" VALIGN="center"><% mt('Not tax exempt') |h %></TD>
+ <TD><INPUT TYPE="checkbox" NAME="no_tax" ID="no_tax" onClick="no_tax_changed();"></TD>
+ </TR>
+
+ <SCRIPT TYPE="text/javascript">
+ function tax_changed() {
+ if ( document.getElementById('tax').checked == true ) {
+ document.getElementById('no_tax').checked = false;
+ }
+ }
+ function no_tax_changed() {
+ if ( document.getElementById('no_tax').checked == true ) {
+ document.getElementById('tax').checked = false;
+ }
+ }
+ </SCRIPT>
+% }
+
+ <TR>
+ <TD ALIGN="right"><% mt('Invoice terms') |h %></TD>
+ <TD>
+% my @agentnums = $FS::CurrentUser::CurrentUser->agentnums;
+% my $agentnum = scalar(@agentnums) == 1 ? $agentnums[0] : '';
+ <& /elements/select-terms.html,
+ 'pre_options' => [ '' => emt('all') ],
+ 'empty_value' => 'NULL',
+ 'agentnum' => $agentnum,
+ &>
+ </TD>
+ </TR>
+
+ <& /elements/tr-input-lessthan_greaterthan.html,
+ label => emt('Current balance'),