projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
4.x style
[freeside.git]
/
httemplate
/
edit
/
bulk-cust_main_county.html
diff --git
a/httemplate/edit/bulk-cust_main_county.html
b/httemplate/edit/bulk-cust_main_county.html
index
8e447e5
..
650fa78
100644
(file)
--- a/
httemplate/edit/bulk-cust_main_county.html
+++ b/
httemplate/edit/bulk-cust_main_county.html
@@
-3,6
+3,7
@@
<FORM ACTION="<% popurl(1)."process/bulk-cust_main_county.html" %>" METHOD="POST">
<INPUT TYPE="hidden" NAME="action" VALUE="<% $action %>">
<FORM ACTION="<% popurl(1)."process/bulk-cust_main_county.html" %>" METHOD="POST">
<INPUT TYPE="hidden" NAME="action" VALUE="<% $action %>">
+<INPUT TYPE="hidden" NAME="rate_only" VALUE="<% $rate_only %>">
<INPUT TYPE="hidden" NAME="taxnum" VALUE="<% join(',', @taxnum) %>">
<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
<INPUT TYPE="hidden" NAME="taxnum" VALUE="<% join(',', @taxnum) %>">
<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
@@
-24,6
+25,20
@@
</TR>
% }
</TR>
% }
+% if ( $cities ) {
+ <& /elements/tr-td-label.html, 'label' => 'City' &>
+ <TD BGCOLOR="#dddddd"><% $cities %>
+ </TD>
+ </TR>
+% }
+
+% if ( $districts ) {
+ <& /elements/tr-td-label.html, 'label' => 'District' &>
+ <TD BGCOLOR="#dddddd"><% $districts %>
+ </TD>
+ </TR>
+% }
+
% if ( $conf->exists('enable_taxclasses') && $taxclasses ) {
<% include('/elements/tr-td-label.html', 'label' => 'Tax Class' ) %>
<TD BGCOLOR="#dddddd"><% $taxclasses %>
% if ( $conf->exists('enable_taxclasses') && $taxclasses ) {
<% include('/elements/tr-td-label.html', 'label' => 'Tax Class' ) %>
<TD BGCOLOR="#dddddd"><% $taxclasses %>
@@
-31,11
+46,13
@@
</TR>
% }
</TR>
% }
-<% include('/elements/tr-input-text.html',
+% unless ($rate_only) {
+ <% include('/elements/tr-input-text.html',
'field' => 'taxname',
'label' => 'Tax name'
)
'field' => 'taxname',
'label' => 'Tax name'
)
-%>
+ %>
+% }
<% include('/elements/tr-input-percentage.html',
'field' => 'tax',
<% include('/elements/tr-input-percentage.html',
'field' => 'tax',
@@
-43,27
+60,29
@@
)
%>
)
%>
-<% include('/elements/tablebreak-tr-title.html', value=>'Exemptions' ) %>
+% unless ($rate_only) {
+ <% include('/elements/tablebreak-tr-title.html', value=>'Exemptions' ) %>
-<% include('/elements/tr-checkbox.html',
+
<% include('/elements/tr-checkbox.html',
'field' => 'setuptax',
'value' => 'Y',
'label' => 'This tax not applicable to setup fees',
)
'field' => 'setuptax',
'value' => 'Y',
'label' => 'This tax not applicable to setup fees',
)
-%>
+
%>
-<% include('/elements/tr-checkbox.html',
+
<% include('/elements/tr-checkbox.html',
'field' => 'recurtax',
'value' => 'Y',
'label' => 'This tax not applicable to recurring fees',
)
'field' => 'recurtax',
'value' => 'Y',
'label' => 'This tax not applicable to recurring fees',
)
-%>
+
%>
-<% include('/elements/tr-input-money.html',
+
<% include('/elements/tr-input-money.html',
'field' => 'exempt_amount',
'label' => 'Monthly exemption per customer ($25 "Texas tax")',
)
'field' => 'exempt_amount',
'label' => 'Monthly exemption per customer ($25 "Texas tax")',
)
-%>
+ %>
+% }
</TABLE>
</TABLE>
@@
-83,8
+102,13
@@
$cgi->param('taxnum') =~ /^([\d,]+)$/
or $m->comp('/elements/errorpage-popup.html', $cgi->param('error') || 'Nothing selected');
my @taxnum = split(',', $1);
or $m->comp('/elements/errorpage-popup.html', $cgi->param('error') || 'Nothing selected');
my @taxnum = split(',', $1);
-$cgi->param('action') =~ /^(add|edit)$/ or die "unknown action";
+$cgi->param('action') =~ /^(add|edit
|edit_rate_only
)$/ or die "unknown action";
my $action = $1;
my $action = $1;
+my $rate_only;
+if ($action eq "edit_rate_only") {
+ $action = "edit";
+ $rate_only = 1;
+}
my $title = "Bulk $action tax rate";
my @cust_main_county =
my $title = "Bulk $action tax rate";
my @cust_main_county =
@@
-95,7
+119,7
@@
my @cust_main_county =
@taxnum;
my %seen_country = {};
@taxnum;
my %seen_country = {};
-my @countries = map code2country($_)." ($_)",
+my @countries = map
FS::geocode_Mixin->
code2country($_)." ($_)",
grep !$seen_country{$_}++,
map $_->country,
@cust_main_county;
grep !$seen_country{$_}++,
map $_->country,
@cust_main_county;
@@
-112,6
+136,13
@@
my %seen_county = {};
my @counties = grep !$seen_county{$_}++, map $_->county, @cust_main_county;
my $counties = join(', ', @counties);
my @counties = grep !$seen_county{$_}++, map $_->county, @cust_main_county;
my $counties = join(', ', @counties);
+my %seen_city = ( map { $_->city => 1 } @cust_main_county );
+my @cities = grep $_, keys %seen_city;
+my $cities = join(', ', @cities);
+
+my @districts = grep $_, map { $_->district } @cust_main_county;
+my $districts = join(', ', @districts);
+
my %seen_taxclass = {};
my @taxclasses = grep !$seen_taxclass{$_}++, map $_->taxclass, @cust_main_county;
my $taxclasses = join(', ', @taxclasses);
my %seen_taxclass = {};
my @taxclasses = grep !$seen_taxclass{$_}++, map $_->taxclass, @cust_main_county;
my $taxclasses = join(', ', @taxclasses);