Florida Discretionary Surtax

Contrib type: 
Module
Status: 
Complete and working
Moderation: 
Awaiting moderation
Latest version: 
1.2 (2010 Version)

Downloads

Compatibility: 
Ubercart 1.x

This module adds support for calculating Florida Discretionary Surtax in Ubercart. Florida Discretionary Surtax is added to the standard Florida state tax (currently 6%) and limited the the first $5000 of the order. The Florida Discretionary Surtax amount is calculated by determining the delivery county for the order and adding that counties surtax amount to the normal state tax.

All of this is handled by this module. Florida also uses a 'bracket system' ( http://dor.myflorida.com/dor/forms/2005/dr2x.pdf ) for calculating the taxes. Currently the module does not account for this. Instead it calculates the tax amount by using straight percentages.

Usage:

  • Install and enable the module.
  • Create a tax rule in the Ubercart Tax module.
  • Click the "Add Florida Discretionary Surtax" option in the tax rule.
  • Create a workflow-ng rule for the above event.
    • Set the condition to "Check an order's delivery zone" and set the zone to "Florida"
    • Set the action to "Charge FL discretionary tax" | * Note: Do not use the action created by your tax rule.

Now your Florida customer's will be charged the correct amount of sales tax (minus the bracket system).

PreviewAttachmentSize
uc_taxes_floridasurtax.tar (2010 Version) 234.5 KB
jccc's picture
Offline
Joined: 06/18/2008
Juice: 98
Re: Florida Discretionary Surtax

Considering the post date on this (3/24/08) as well as the status and moderation note, I'm wondering if this has been abandoned. Is this module working? Is there another module elsewhere we should be looking at instead?

digitalfrontiersmedia's picture
Offline
Getting busy with the Ubercode.
Joined: 11/08/2008
Juice: 283
Failed Code Review

Was any reason given for this contrib failing code review?

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15459
Re: Failed Code Review

Hmm... honestly, that might just be the default option once we added in that field. If it failed, it could be as simple as code style. Unfortunately, the developer who was doing the contrib moderation has been offline for over a week now. I'd give it a shot in a test site or something if I were you.

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Update

I am currently using this module on two d-5.12 /uc-1.6 sites without any problems. This was my first Drupal module so the coding probably is not the best, but the module is pretty simple and straightforward. I have not needed to make any updates to the module since the first upload.

Complete Computer Care

digitalfrontiersmedia's picture
Offline
Getting busy with the Ubercode.
Joined: 11/08/2008
Juice: 283
Re: Update

Thanks for answering my questions earlier on the phone. I didn't see you and Ryan had already responded so quickly.

Thanks!
Stephen

digitalfrontiersmedia's picture
Offline
Getting busy with the Ubercode.
Joined: 11/08/2008
Juice: 283
Re: Re: Failed Code Review

It would probably be a nice feature addition to make "Failed Review" link to a short blurb about the reasons why. It would help people assess better, since failing review due to an identified code vulnerability versus improper code formatting are two completely different things from a functional perspective.

Thanks for the reply.
Stephen

digitalfrontiersmedia's picture
Offline
Getting busy with the Ubercode.
Joined: 11/08/2008
Juice: 283
Great Module

Just a quick note to let developer and others know we installed the module on a client site and tested it and it works great! We didn't have any issues with it at all.

WebWonk's picture
Offline
Joined: 01/22/2009
Juice: 12
2009 Florida County Surtax Rates

Changes to surtax rates for Florida counties became effective on January 1, 2009. Attached is an updated .install file that will make the changes that were noted in FL Dept of Revenue publication DR-15DSS R11/08.

To update your copy of the Florida Surtax module:
1) download and uncompress the file attached to this posting
2) replace the original "uc_taxes_floridasurtax.install" file with this updated one
3) run the Update routine from your Drupal site's Admin > Modules page.

This version of the .install file adds an update_1 function which performs 4 update queries to change surtax rates for specific Florida counties.

Hope you find this helpful!

AttachmentSize
install_2009_tax_rates.tar 210 KB
WebWonk's picture
Offline
Joined: 01/22/2009
Juice: 12
Enhanced version with Florida Bracket System added

First off, I want to send a HUGE thank you to setfree for creating this module for Florida-based Ubercart users!! It has been very helpful as I prepare to launch my online store.

I noticed setfree's comment that his version of the module did not include calculation using the Florida Sales Tax Bracket System. I did not want to launch my store with the possibility of incorrect collection of sales tax (I know, it's only pennies -- but audits scare me)... so I started studying the bracket system. I was able to reverse-engineer the rounding patterns involved in creating the brackets. (Not that I understand the rational, I just figured out the pattern.) So, I created a function that duplicates the Florida tax values for all the tax rate cards published to the FL Dept of Revenue website.

Attached is an enhanced version of the uc_taxes_floridasurtax module. This version calculates sales tax using the function I built to match the published rate cards. The 2009 county surtax rate changes are included in this updated version. In addition, this version is also somewhat (not completely) aware of the uc_coupon module if it is installed (optional). More details about the functional changes are included in the readme.txt file and in comments within the module code.

I have tested this with Ubercart 1.6 and Drupal 5.10 and it works well for me.

Installation instructions are unchanged from the original version. See the readme.txt and setfree's instructions on this page.

AttachmentSize
flsurtax_with_brackets_v1.tar 240 KB
setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Re: Enhanced version with Florida Bracket System added

Very nice! Thank you very much for both of the updates. I'm glad you were able to figure out an algorithm for calculating the brackets. I peaked at the code and this wasn't a simply thing to do. I will be implementing your updates on my stores soon.

WebWonk's picture
Offline
Joined: 01/22/2009
Juice: 12
Works with UC 1.7 and Drupal 5.15

FYI --

I upgraded my store today and this Enhanced FL Discretionary Sales Tax module is still working correctly with the current Ubercart 1.7 and Drupal 5.15 versions (along with updating all modules that Ubercart depends on to the latest recommended versions).

snepa's picture
Offline
Joined: 01/15/2009
Juice: 38
Ubercart 2.0 Beta 4 and Drupal 6.9 and 6.10

As a Florida merchant I'd love to take advantage of this module but I:

1. have no PHP mojo
2. am using Ubercart 2.0 Beta 4 and Drupal 6.9 (soon to be 6.10)

Anyone working on an equivalent solution in Ubercart 2.x?

WebWonk's picture
Offline
Joined: 01/22/2009
Juice: 12
No Ubercart 2.0 version

Hi snepa:

All my current ecommerce websites are built on Ubercart 1.x because of the maturity and stability of that code. I've read good reviews of the UC 2.x betas, but I have no current plans to move to the new version in the immediate future. I don't know whether or not the original module author is planning an upgrade to his website soon.

I wish you the best. If you do find a PHP coder to do the module conversion, this module is a very good starting place. The code is pretty clean, the logic of handling Florida's tax rules appears solid, and the functionality has been tested on several existing websites.

As is typical, the availability of contributed modules will lag a bit behind the release of the core system. That is the penalty you pay for being on the "bleeding edge." You get new functions in core but have to struggle with the contributed pieces.

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Re: Ubercart 2.0 Beta 4 and Drupal 6.9 and 6.10

I do plan on doing a complete rewrite of this module at some time. I am waiting to build my first site in D6/UC2, unfortunately, I don't know when this will be yet. I will post as soon as I start work on it.

Complete Computer Care

backdrifting's picture
Offline
Joined: 10/03/2008
Juice: 373
Drupal 6.x and UC 2.x version

What do we need to do to get this working for UC 2.x and Drupal 6.x?

-backdrifting

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Re: Drupal 6.x and UC 2.x version

I'm working on a port to D6/UC2 and will be ready by next week (6/12). I will post back when ready.

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
D6 Release

The Drupal 6 / Ubercart 2 Florida Surtax module can be found at: http://drupal.org/project/uc_taxes_floridasurtax

VitaLife's picture
Offline
Bug Finder
Joined: 10/29/2007
Juice: 257
Module works, but different that 5 version

I upgraded my store to Drupal 6 today, and since I'm in FL, I use this module. I had to tweak things to make it work, but it appears to be working. The whole CA to Rules switch still has me confused. Anyway, here is my question. When I first installed the module, I was getting changed double tax, One at 6% and one at 7% both called FL Sales Tax. I deleted the FL Sales tax rule that was leftover from my D5 installation and now I have just one tax being charged at 7%. OK so far. Anyway, here is my question, on D5 I got two items in the line_items table, one witht he state tax, and one with the county tax. On D6, I only have the 1 items with State tax. Is this by design? I was using both items to help simplify our monthly tax reporting.

Thanks
Jim

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Re: Module works, but different that 5 version

On the D5 version, where were you seeing the county tax line item displayed? I just checked on a site that still uses the D5 version and it only displays "Florida Sales Tax" on the totals pane.

Is it necessary to break out the county tax? I notice that on other sites (Dell, etc) there is only one line item for tax and they do not breakout the county tax. I welcome your feedback and suggestions to improve the module though.

VitaLife's picture
Offline
Bug Finder
Joined: 10/29/2007
Juice: 257
D5 and D% version diffferent

The taxes were recorded separately in the UC_order_line_items table and shown on the review form

Here are some entries from my table

<?php
935    719    shipping    U
.S.P.S. Priority Mail    5.28    1   
936    719    tax            Florida Sales Tax    1.92    8   
937    719    tax           Fl County Tax           0.32    9   
?>

From a users perspective, it does not matter if they see the tax or not, but when we report our taxes to FL each month we have to seperate our county and state tax on the report, and this made it really easy. I'm OK with it showing on the review form or not, it did before, but having it in the database was great. If you don't want to change the module, I can probably change the hook_order process and pull in from the order object somehow. Here is some code I had in my system to put these taxes into our accounting system

<?php
foreach ($order->line_items as $item) {
   if (
$item['type'] == 'subtotal') $st = $item['amount'];
   if (
$item['type'] == 'shipping')  {
  
$shipcost = $item['amount'];  
  
$shipmethod = $item['title'];  
   }
   if (
$item['title'] == 'Florida Sales Tax') $stax = $item['amount'];
   if (
$item['title'] == 'Fl County Tax') $ctax = $item['amount'];

// insert into database, etc.
?>

Thanks for the help.
JimF

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
New 2010 Version Release

The new, 2010 version with updated tax rates has been released. Please use the module download at the top of this page.

fymbscu's picture
Offline
Joined: 01/14/2010
Juice: 21
UC 2 Version Absent? – Seeking to Simplify and Adapt for Cal

Correct me if I am wrong, but the 2010 version at the top of this page is for D5-UC 1.x, right? The version on the Drupal site, http://drupal.org/project/uc_taxes_floridasurtax, states D6-UC 1.7. A D6 UC 2 version is mentioned in the comments on this page, but I don't see where it is at. Could someone direct me to it, please? I must be an idiot.

At any rate, I am building a new site with D6 and UC 2, which means I do not have access to Workflow-NG. Instead I have Conditional Actions. And I'm in California. For compliance in California, I to collect the county tax rate for the county I operate in and the standard state rate for the other counties. I don't have the surtax county-to-county dilemma of Florida, but I am in Los Angeles county which has 511 zip codes to be accounted for.

I am very green when it comes to PHP and even less familiar with the workings of Drupal and UC. I have some prior experience with ZenCart and was able to build a lookup table for Orange County, CA, back in 2007, adapting a module originally built for L.A.

If Conditional Actions in UC 2 supported an array feature out of the box, adapting this module to CA might not be necessary, but adding some 500+ conditions for one action seems highly impractical. I also find myself stumbling around the "hook" feature of Drupal code. More sophisticated than my mind is grasping at the moment.

What are the prospects for leaving the city/county aspects of this FLA module on the sidelines and focussing on a simple zip lookup? I am sure this would be valuable for other counties and states as well.

So, I would like a look at the UC 2 code for this module and any other guidance you can offer me. I've already vetted the zip codes I need for the module. Thanks for any reply.

Regards,

Mark Harrison

setfree's picture
Offline
Uber Donor
Joined: 12/16/2007
Juice: 442
Hello, Yes, the module for

Hello,

Yes, the module for download on this comment page is for D5/UC1. I have used the link (http://drupal.org/project/uc_taxes_floridasurtax) and verified that the UC2/D6 version is in fact there and available for download. Is is in the "downloads" section towards the bottom of the page. I'm not sure why you couldn't find it, perhaps the Drupal site was having a temporary issue.