[freeside-devel] Re: [freeside] texas tax patch

Rick Eicher II rick at pbol.net
Tue Apr 16 07:22:00 PDT 2002


> I can't even apply this patch to inspect the changes:
>
> ivan at rootwood:~/texastax/freeside$ patch -p1 <../texastax.patch
> patching file FS/FS/cust_main.pm
> patch: **** malformed patch at line 12: @@ -861,6 +861,9 @@
>
> Can you send a usable patch, please?  If you can't apply the patch
> yourself to an unmodified checkout of the code, that's a good indication
> you shouldn't be sending it to the mailing list four times.

> From a visual inspection of the patch it looks like you still need to (at
> least):
> - patch README.1.4.0pre12
> - add a configuration option so none of this gets turned on unless
>   requested.
> - allow null values in the `taxclass' field or otherwise handle folks
>   upgrades from folks who *aren't* running this code.
>
> I'm holding up 1.4.0pre12 for this (since this is the last prerelease I'd
> like to make schema changes in) but I won't much longer.  If you (or
> anyone else in texas) wants to see this in 1.4.0 you need to get on the
> ball on this...
>

You are right this patch is only good to patch the code a month ago. I first
submitted this code on 03/18/02. So if you are trying to apply it now, I
assume that the code has changed a good amount.

After trying to apply the patch my self I have been able to get it to apply
to all files except for ../httemplate/edit/part_pkg.cgi . There was a
function in that file that no longer exists. So with a little work I am sure
you can get it to work. The main part of getting it to work is the
cust_main.pm file which will patch.

As far as the files that did not get patched goes. I did not patch the
README. I have no need for adding "a configuration option so none of this
gets turned on unless requested". More so, you said not to worry about it
and that you would do that.

Here is the last diff I have. It would not be to hard to implement it.

########################################################################

Only in freeside_new/FS/FS: CGIwrapper.pm
Only in freeside/FS/FS: CVS
Only in freeside/FS/FS/UI: CVS
diff -rub freeside/FS/FS/cust_main.pm freeside_new/FS/FS/cust_main.pm
--- freeside_new/FS/FS/part_pkg.pm      Tue Apr 16 02:10:06 2002
+++ freeside/FS/FS/part_pkg.pm  Tue Apr 16 02:11:37 2002
@@ -59,6 +59,8 @@

 =item recurtax - Recurring fee tax exempt flag, empty or `Y'

+=item taxclass - Texas tax class flag, 'none','access',or 'hosting'
+
 =item plan - Price plan

 =item plandata - Price plan data
diff -rub freeside/httemplate/docs/schema.html
--- freeside_new/httemplate/docs/schema.html    Mon Mar 18 08:09:12 2002
+++ freeside/httemplate/docs/schema.html        Sun Apr 14 04:11:22 2002
@@ -224,6 +223,7 @@
         <li>recur - recurring fee expression
         <li>setuptax - Setup fee tax exempt flag, empty or `Y'
         <li>recurtax - Recurring fee tax exempt flag, empty or `Y'
+        <li>taxclass - Tax class flag, none, access, or hosting
         <li>plan - price plan
         <li>plandata - additional price plan data
         <li>disabled - Disabled flag, empty or `Y'
diff -rub freeside/httemplate/edit/part_pkg.cgi
freeside_new/httemplate/edit/part_pkg.cgi
+++ freeside_new/httemplate/edit/part_pkg.cgi   Mon Mar 18 08:09:12 2002
--- freeside/httemplate/edit/part_pkg.cgi       Mon Feb 18 20:57:39 2002
@@ -100,6 +100,25 @@

 print '</TD></TR>';

+print <<END;
+<TR><TD ALIGN="right">Use Texas Tax Class</TD><TD>
+END
+
+print '<SELECT SIZE="1" NAME="taxclass">';
+print '<OPTION VALUE="none"';
+print ' SELECTED' if $hashref->{taxclass} eq "none";
+print '>None</OPTION>';
+print '<OPTION VALUE="access"';
+print ' SELECTED' if $hashref->{taxclass} eq "access";
+print '>access</OPTION>';
+print '<OPTION VALUE="hosting"';
+print ' SELECTED' if $hashref->{taxclass} eq "hosting";
+print '>hosting</OPTION></SELECT>';
+
+print '</TD></TR>';
+
+
+
 print '<TR><TD ALIGN="right">Disable new orders</TD><TD>';
 print '<INPUT TYPE="checkbox" NAME="disabled" VALUE="Y"';
 print ' CHECKED' if $hashref->{disabled} eq "Y";
@@ +354,7 -373,7 @@
 }

 function fixup(what) {
+<% foreach my $f ( qw( pkg comment freq taxclass), @fixups ) { %>
-<% foreach my $f ( qw( pkg comment freq ), @fixups ) { %>
   what.<%= $f %>.value = document.dummy.<%= $f %>.value;
 <% } %>
 <% foreach my $f ( qw( setuptax recurtax disabled ) ) { %>
@@ -414,7 +395,6 @@
 <INPUT TYPE="hidden" NAME="freq" VALUE="<%= $hashref->{freq} %>">
 <INPUT TYPE="hidden" NAME="setuptax" VALUE="<%= $hashref->{setuptax} %>">
 <INPUT TYPE="hidden" NAME="recurtax" VALUE="<%= $hashref->{recurtax} %>">
+<INPUT TYPE="hidden" NAME="taxclass" VALUE="<%= $hashref->{taxclass} %>">
 <INPUT TYPE="hidden" NAME="disabled" VALUE="<%= $hashref->{disabled} %>">
 <% foreach my $f ( @fixups ) { %>
 <INPUT TYPE="hidden" NAME="<%= $f %>" VALUE="">

############################################################################
#

As with every thing in business it is all about the bottom line. The bottom
line here is it works on our system. Since our company does not make money
with freeside like you company does, we can not allot any more time to
"Texas taxes". We believe that we have contributed back to the community and
will be more than happy to contribute when every possible. But as it stands
now we need to concentrate on what makes our company money.

Maybe in the future if freeside still does not support Texas taxes we will
work on this again.

Thank you for your time,
Rick Eicher II





More information about the freeside-devel mailing list