texas tax
Rick Eicher II
rick at pbol.net
Fri Mar 22 13:31:59 PST 2002
I am having problems with this snip of code.
#########################################333
$taxable_charged = sprintf( "%.2f", $taxable_setup + $taxable_recur );
unless ( $self->tax =~ /Y/i || $self->payby eq 'COMP' || $taxable_charged
== 0 ) {
my $cust_main_county = qsearchs('cust_main_county',{
'state' => $self->state,
'county' => $self->county,
'country' => $self->country,
} ) or die "fatal: can't find tax rate for state/county/country ".
$self->state. "/". $self->county. "/". $self->country. "\n";
if ( $part_pkg->dbdef_table->column('taxclass') && $part_pkg->taxclass
ne 'none' ){
if ( $part_pkg->taxclass eq 'access' && $taxable_charged > 25){
$taxable_charged = $taxable_charged - 25;
$tax += sprintf( "%.2f",$taxable_charged * (
$cust_main_county->getfield('tax') / 100 ));
}elsif ($part_pkg->taxclass eq 'hosting'){
$taxable_charged = $taxable_charged * .80;
$tax += sprintf( "%.2f",$taxable_charged * (
$cust_main_county->getfield('tax') / 100 ));
}else{
$tax += sprintf("%.2f",0);
}
}else{
$tax += sprintf( "%.2f",$taxable_charged * (
$cust_main_county->getfield('tax') / 100 ));
}
}
#####################################################
It is not setting elsif ($part_pkg->taxclass eq 'hosting') true when it
should.
Any ideas what I am doing wrong?
Rick
More information about the freeside-devel
mailing list