From: ivan Date: Fri, 4 Jan 2008 02:36:07 +0000 (+0000) Subject: new tax rate editor X-Git-Tag: TRIXBOX_2_6~132 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3b720b3194fb140737a87830b32b2e8d616215f4 new tax rate editor --- diff --git a/httemplate/browse/elements/browse.html b/httemplate/browse/elements/browse.html index 2cc5a9660..513c2c4e9 100644 --- a/httemplate/browse/elements/browse.html +++ b/httemplate/browse/elements/browse.html @@ -1,6 +1,6 @@ <% include( '/search/elements/search.html', - @_, 'disable_download' => 1, 'disable_nonefound' => 1, + @_, ) %> diff --git a/httemplate/edit/cust_main_county.cgi b/httemplate/edit/cust_main_county.cgi deleted file mode 100755 index 7d1354d3e..000000000 --- a/httemplate/edit/cust_main_county.cgi +++ /dev/null @@ -1,99 +0,0 @@ - -% -% -%print header("Edit tax rates", menubar( -% 'Main Menu' => popurl(2), -%)); -% -%print qq!Error: !, $cgi->param('error'), -% "" -% if $cgi->param('error'); -% -%print qq!
!, &table(), < -% Country -% State -% County -% Taxclass
(per-package classification) -%END -% -%if ( dbdef->table('cust_main_county')->column('taxname') ) { -% print 'Tax name
(printed on invoices)'; -%} -% -%print <Tax -% Exempt
per
month -%END -% -%if ( dbdef->table('cust_main_county')->column('setuptax') ) { -% print 'Setup
fee
exempt'; -%} -%if ( dbdef->table('cust_main_county')->column('recurtax') ) { -% print 'Recurring
fee
exempt'; -%} -% -%print ''; -% -%foreach my $cust_main_county ( sort { $a->country cmp $b->country -% or $a->state cmp $b->state -% or $a->county cmp $b->county -% } qsearch('cust_main_county',{}) ) { -% my($hashref)=$cust_main_county->hashref; -% print < -% $hashref->{country} -%END -% -% print "{state} -% ? ' BGCOLOR="#ffffff">'.$hashref->{state} -% : ' BGCOLOR="#cccccc">(ALL)' -% , ""; -% -% print "{county} -% ? ' BGCOLOR="#ffffff">'. $hashref->{county} -% : ' BGCOLOR="#cccccc">(ALL)' -% , ""; -% -% print "{taxclass} -% ? ' BGCOLOR="#ffffff">'. $hashref->{taxclass} -% : ' BGCOLOR="#cccccc">(ALL)' -% , ""; -% -% print qq!! -% if dbdef->table('cust_main_county')->column('taxname'); -% -% print qq!
%
!; -% print qq!
\$
!; -% -% print qq!{setuptax} =~ /^Y$/i ? ' CHECKED' : '' ). -% '>' -% if dbdef->table('cust_main_county')->column('setuptax'); -% -% print qq!{recurtax} =~ /^Y$/i ? ' CHECKED' : '' ). -% '>' -% if dbdef->table('cust_main_county')->column('recurtax'); -% -% print ''; -% -%} -% -%print < -% -% -% -% -% -%END -% -% - diff --git a/httemplate/edit/process/cust_main_county.cgi b/httemplate/edit/process/cust_main_county.cgi deleted file mode 100755 index 2c3ebe866..000000000 --- a/httemplate/edit/process/cust_main_county.cgi +++ /dev/null @@ -1,31 +0,0 @@ -% -% -%foreach ( grep { /^tax\d+$/ } $cgi->param ) { -% /^tax(\d+)$/ or die "Illegal form $_!"; -% my $taxnum = $1; -% my $old = qsearchs('cust_main_county', { 'taxnum' => $taxnum }) -% or die "Couldn't find taxnum $taxnum!"; -% next unless $old->tax != $cgi->param("tax$taxnum") -% || $old->exempt_amount != $cgi->param("exempt_amount$taxnum") -% || $old->taxname ne $cgi->param("taxname$taxnum") -% || $old->setuptax ne $cgi->param("setuptax$taxnum") -% || $old->recurtax ne $cgi->param("recurtax$taxnum"); -% my %hash = $old->hash; -% $hash{tax} = $cgi->param("tax$taxnum"); -% $hash{exempt_amount} = $cgi->param("exempt_amount$taxnum"); -% $hash{taxname} = $cgi->param("taxname$taxnum"); -% $hash{setuptax} = $cgi->param("setuptax$taxnum"); -% $hash{recurtax} = $cgi->param("recurtax$taxnum"); -% my $new = new FS::cust_main_county \%hash; -% my $error = $new->replace($old); -% if ( $error ) { -% $cgi->param('error', $error); -% print $cgi->redirect(popurl(2). "cust_main_county.cgi?". $cgi->query_string ); -% myexit(); -% } -%} -% -%print $cgi->redirect(popurl(3). "browse/cust_main_county.cgi"); -% -% -