[freeside-devel] Texas tax

Rick Eicher II rick at pbol.net
Wed Feb 27 12:29:52 PST 2002


Ok I uncommented this in the process/part_pkg.cgi.

warn "setuptax: ". $new->setuptax;
warn "texastax: ". $new->texastax;
warn "recurtax: ". $new->recurtax;

I get the following in the logs.


setuptax:  at part_pkg.cgi line 26.
texastax:  at part_pkg.cgi line 27.
recurtax: Y at part_pkg.cgi line 28.

So I assume that the 'Y' is not makeing it to that point. I have the
following in the part_pkg.cgi file.


print <<END;
<TR><TD ALIGN="right">Use Texas Tax</TD><TD>
END

print '<INPUT TYPE="checkbox" NAME="texastax" VALUE="Y"';
print ' CHECKED' if $hashref->{texastax} eq "Y";
print '>';
print '</TD></TR>';
.
.
.
.
<% foreach my $f ( qw( setuptax recurtax disabled texastax) ) { %>
  if (document.dummy.<%= $f %>.checked)
    what.<%= $f %>.value = 'Y';
  else
    what.<%= $f %>.value = '';
<% } %>
.
.
.
<INPUT TYPE="hidden" NAME="texastax" VALUE="<%= $hashref->{texastax} %>">
<INPUT TYPE="hidden" NAME="disabled" VALUE="<%= $hashref->{disabled} %>">
<% foreach my $f ( @fixups ) { %>
<INPUT TYPE="hidden" NAME="<%= $f %>" VALUE="">
<% } %>



Basicly tried to set this up the same as setup tax. Any ideas on what I am
leaving out or forgetting.

Once I get this texas tax working I will submit the patches.

Thanks,
rick







> -----Original Message-----
> From: Rick Eicher II [mailto:rick at pbol.net]
> Sent: Wednesday, February 27, 2002 2:01 PM
> To: Freeside Dev
> Subject: [freeside-devel] Texas tax
>
>
> I am intergrating texas taxes into freeside.
>
> I am just getting start, so I am trying set a "flag" on the pkg_part.cgi
> page for texas tax. I was going to do this flag the same way
> settax is done.
> Once I get this flag to be set in the database I will check if
> this flag is
> set before the taxes are calculated. That way it can use the texas tax or
> normal tax formula.
>
> So I have added a char column to the part_pkg table to hold this flag. I
> have edited the part_pkg.cgi file and the part_pkg.cgi file that is in the
> process dir. I used the settax flag as a template for all changes made.
>
> But as it stands not a 'Y' is not showing up in the table. Apache
> logs show:
>
> [warning][FS::Record] FS::part_pkg=HASH(0x8ca30fc) -> replace
> FS::part_pkg=HASH(0x8b60a18): records identical at part_pkg.cgi line 51
>
> I am editing a package I already have made. I take the above to mean that
> even though I have now checked the texas tax box the record is still the
> same.
>
> If I was to start over what files would need to be edited to make
> this flag
> show in the table.
>
> Thanks,
> Rick
>
>
>
>





More information about the freeside-devel mailing list