diff options
| author | ivan <ivan> | 2009-06-30 19:38:57 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2009-06-30 19:38:57 +0000 | 
| commit | 443150b6184876c967adffa199c20f53d5b76075 (patch) | |
| tree | 69cb79e2d3e8dc593916f81c24c60f55e9eba937 /httemplate/elements | |
| parent | a70239efdaeddf0b20fea7f5126a2e3f0a962eb6 (diff) | |
disabling a taxclass, RT#5472
Diffstat (limited to 'httemplate/elements')
| -rw-r--r-- | httemplate/elements/menu.html | 2 | ||||
| -rw-r--r-- | httemplate/elements/select-taxclass.html | 4 | ||||
| -rw-r--r-- | httemplate/elements/tr-select-taxclass.html | 4 | 
3 files changed, 6 insertions, 4 deletions
| diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index b855f790c..c9adb169e 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -319,6 +319,8 @@ if ( $curuser->access_right('Configuration') ) {    $config_billing{'View/Edit call rates and regions'} = [ \%config_billing_rates, 'Manage rate plans, regions and prefixes for VoIP and call billing' ];    $config_billing{'View/Edit locales and tax rates (old tax class system)'}  = [ $fsurl.'browse/cust_main_county.cgi', 'Change tax rates, or break down a country into states, or a state into counties and assign different tax rates to each' ];    $config_billing{'View/Edit tax rates (new tax products system)'}  = [ $fsurl.'browse/tax_rate.cgi', 'Edit tax rates for the new tax products system' ]; +  $config_billing{'View/Edit tax classes'}  = [ $fsurl.'browse/part_pkg_taxclass.html', 'Edit tax classes' ] +    if $conf->exists('enable_taxclasses');    $config_billing{'View/Edit credit reason types'}  = [ $fsurl.'browse/reason_type.html?class=R', 'Credit reason types define groups of reasons, for reporting and convenience purposes.' ];    $config_billing{'View/Edit credit reasons'}  = [ $fsurl.'browse/reason.html?class=R', 'Credit reasons explain why a credit was issued.' ];  } diff --git a/httemplate/elements/select-taxclass.html b/httemplate/elements/select-taxclass.html index 2504a5b1d..fb09cfdb9 100644 --- a/httemplate/elements/select-taxclass.html +++ b/httemplate/elements/select-taxclass.html @@ -30,9 +30,9 @@ my $conf = new FS::Conf;  unless ( $opt{'taxclasses'} ) {    #my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county') -  my $sth = dbh->prepare('SELECT taxclass FROM part_pkg_taxclass') +  my $sth = dbh->prepare("SELECT taxclass FROM part_pkg_taxclass WHERE disabled IS NULL OR disabled = '' OR taxclass = ?")      or die dbh->errstr; -  $sth->execute or die $sth->errstr; +  $sth->execute($selected_taxclass) or die $sth->errstr;    my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref};    @{ $opt{'taxclasses'} } = grep $_, keys %taxclasses; diff --git a/httemplate/elements/tr-select-taxclass.html b/httemplate/elements/tr-select-taxclass.html index 981c1a5f2..95cabf7f7 100644 --- a/httemplate/elements/tr-select-taxclass.html +++ b/httemplate/elements/tr-select-taxclass.html @@ -23,9 +23,9 @@ my $selected_taxclass = $opt{'curr_value'}; # || $opt{'value'} necessary?  unless ( $opt{'taxclasses'} ) {    #my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county') -  my $sth = dbh->prepare('SELECT taxclass FROM part_pkg_taxclass') +  my $sth = dbh->prepare("SELECT taxclass FROM part_pkg_taxclass WHERE disabled IS NULL OR disabled = '' OR taxclass = ?")      or die dbh->errstr; -  $sth->execute or die $sth->errstr; +  $sth->execute($selected_taxclass) or die $sth->errstr;    my %taxclasses = map { $_->[0] => 1 } @{$sth->fetchall_arrayref};    @{ $opt{'taxclasses'} } = grep $_, keys %taxclasses; | 
