<div dir="ltr">Hello,<div><br></div><div>I may have a found a potential bug in FreeSide 4.0 (running on Debian 8.5), which I recently installed from deb packages just a couple weeks ago.</div><div><br></div><div>I realize that FreeSide offers paid support services, but I am posting to the mailing list because I believe this is a bug rather than a PEBKAC or "dumb admin" problem. If a developer feels differently after reading my post, they can say so and I'll go from there.</div><div><br></div><div>When attempting to "Bill Now" on any customer who is not "tax exempt" whose billing address has a configured state/county/city locale in the internal tax engine, I receive the following error:</div><div><br></div><div style="text-align:start"><span style="color:rgb(255,0,0);font-family:"Times New Roman";font-size:large;text-align:-webkit-center;background-color:rgb(204,204,255)">Error: Error billing custnum 5981: Can't call method "setuptax" on an undefined value at /usr/share/perl5/FS/TaxEngine/<a href="http://internal.pm">internal.pm</a> line 127.</span></div><div style="text-align:start"><span style="color:rgb(255,0,0);font-family:"Times New Roman";font-size:large;text-align:-webkit-center;background-color:rgb(204,204,255)"><br></span></div><div style="text-align:start">I'm certain I have not set anything up incorrectly. I'm by no means a Perl expert, but the code throwing an error there seems to be implying that either $part_pkg or $tax_object are undefined values, which strikes me as very strange. If they were undefined values it doesn't seem like execution should even be making it that far into the billing process.</div><div style="text-align:start"><br></div><div style="text-align:start">Also, $tax_object doesn't seem to be treated as being undefined earlier in the taxline subroutine code (methods/attributes of $tax_object are checked several times), which seems to point the finger at $part_pkg despite the fact that no error is thrown when it is initialized from $cust_bill_pkg->part_pkg on line 102.</div><div style="text-align:start"><br></div><div style="text-align:start">Again, if I exempt the customer from taxes, the error is not thrown.  Setting tax exemptions inside a package definition has no effect.</div><div style="text-align:start"><br></div><div style="text-align:start">I have not not done anything strange inside the "Locales and tax rates" configuration settings. I have only set basic State Sales & Use Tax rates for a few cities inside my county/state. Changing the Setup tax exemption flag on these does not help either.</div><div style="text-align:start"><br></div><div style="text-align:start">HOWEVER, throwing another wrench into the works, if I REMOVE the tax city/locale of my test customer from the tax locale configurations, "Bill Now" works as normal with no problem, including the processing/addition of fees like state E911 fees and municipal telecom tax license recovery fees during billing events, and also checking if there is automatic payment information available to process a card or ACH.</div><div style="text-align:start"><br></div><div style="text-align:start">The only problem is that I cannot properly assess Sales & Use Taxes using the internal tax engine. I could do it if I removed the locale and add a manual tax adjustment for each customer in that locale, but I would have to keep an eye on it every time there is a package or service change since it's a flat adjustment, which makes it a hack-y workaround and not a fix for this problem. Since practically 0 of my customers are tax exempt, I have also considered another workaround by assessing the sales tax as a "fee" and invoicing it in the same way as the E911 and MTLT fees, at least until a solution can be found. Although this introduces another problem since, in my state, the MTLT fee is part of the taxable base of the sales tax (and I have it currently configured as such), but E911 is not. Adding the sales tax as a fee definition will require me to set it up in a way that may not calculate the all of the sales taxes correctly.</div><div style="text-align:start"><br></div><div style="text-align:start">Anyone have any idea what could be going on here?</div><div style="text-align:start"><br></div><div style="text-align:start">Thanks in advance for any help provided.</div><div style="text-align:start"><br></div><div style="text-align:start">--</div><div style="text-align:start">JD Erickson</div><div><span style="color:rgb(255,0,0);font-family:"Times New Roman";font-size:large;text-align:-webkit-center;background-color:rgb(204,204,255)"><br></span></div><div><span style="color:rgb(255,0,0);font-family:"Times New Roman";font-size:large;text-align:-webkit-center;background-color:rgb(204,204,255)"><br></span></div></div>