91 replies [Last post]
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15476
Was this information Helpful?

I got this image in an e-mail from Dries' blog, a basic flowchart for understanding VAT in Europe: http://www.buytaert.net/images/blog/vat-in-europe.jpg

He has a disclaimer, but it seems to be a good visual understanding of what must be possible for Ubercart to be a viable e-commerce solution in Europe. The two things we don't easily facilitate at the moment, by my reckoning, are allowing customers to enter their own VAT number (do we need to do a checksum on these to validate them?) and making it easy to apply taxes only to EU member states.

I believe zmove's VAT contrib can handle accepting a customer's VAT through a checkout pane, though I haven't tested it myself. Perhaps we should focus our efforts on making this module solid for that use and then building into it a workflow-ng condition that will check an order to see if the customer is in an EU member state with a single condition. Right now you'd have to have the countries enabled and add individual conditions to the tax configuration for each country... a single condition could make this super simple. Since we're using ISO-3166-1 number for country IDs, it won't be a problem to build this into a single condition check. (in_array() anyone? Smiling)

Once this is polished up, I think we also need to address the product price display concerns. I'm sure there are a range of things countries require, but we can work towards total flexibility.

As soon as this action happens, or even during, I propose opening a project on drupal.org for the VAT module that we can direct people to. I'm happy to open this for us and provide CVS access to anyone interested in contributing. We simply can't ignore such an important task, and at the moment core just doesn't cut it.

Please respond if I'm missing anything or if you have other feedback. Perhaps the module should be a more general International Tax module to accommodate the PST, GST, and whatever other taxes exist in places like Australia, Canada, etc. Puzzled

Al
Al's picture
Offline
Bug FinderGetting busy with the Ubercode.Internationalizationizer
Joined: 02/14/2008
Juice: 249
display VAT

Hello Ryan,

thank you very much for taking care for this topic! Just a few short thoughts on this topic. The flowchart is really good, probably just missing the difference between professional and private customers, but there I am now also not sure.

VAT contrib: IMO there is missing that just professional customers have to provide their VAT number, so the additional condition should be if the customer fills the Company field. This one I still was not in, so more I can't tell ATM.

IMO this should be definitely also the way for Australia, Canada and probably others.

zmoves uc_taxes_alter is a good starting point to achieve most of the things on a module base, but it is far from being complete.

A module's base should be 2 main configurations:
- Are taxes calculated on per order base (like it is) or on per product base (like e.g. the EU needs). This is a rounding issue and just 3 lines somewhere in uc_taxes need to be packed in a if/else statement.
- Display taxes: Show taxes just on checkout or always? I mean really always, e.g. products, teasers, cart, order pages, invoice template, shipping, ... all displayed incl. VAT.
The rest can work through Workflow-ng (and that a "Display Tax" module checks theses settings)

I am looking forward to contribute whatever is useful from the code I produced up to now, best regards,

Al

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15476
Re: display VAT

Thanks for the input, Al. It sounds like we may need to make some simple core improvements, then, to display prices w/ VAT included. I wouldn't be opposed to that for Ubercart 1.1. Have you setup a European Ubercart store yet, and if so, do you have a link to the snippets you patched in in the forums? I know there's discussion in several places about the topic, so I'd love to bring it all together. I'll ping zmove about this thread so we can get his input. Smiling

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Read it if you can ! ;)

Hi,

I'm very happy to see that the European case will be a major point for the next Ubercart releases Eye-wink. I spent a lot of time to think about the best way to implement the European needs and I think, now, I have a pretty strong opinion about the question.

As Ryan said, and I'm totally agree, it's not just a VAT number concern. Provide a Store VAT number (set up in the store setting) and a customer VAT number (set up in the checkout page via a checkout pane) as my VAT contrib do is just anecdotic. There is a price display issue too.

So the ideal "European Friendly" module would merge 2 modules : VAT contrib and Add tax to product price contrib but ATM, this 2 modules need a lot of work to be usable by most users.

See below what the module should do in a perfect world :

The VAT module

This module have to know 2 informations about the user :

  • His status (individual or professionnel)
  • His country (in European Union or not)

If the status is professionnal and the country is in European Union, the store have to show a required VAT number field. To make these conditions, I think workflow is a good solution. As the module already provide a "check the customer delivery address", it would provide a "check the customer billing address". In addition, the country select list is multiple, so it's easy to check all european countries in one rules.

I would add that, for usability, that the VAT number should not be in a separate pane. It should be in the customer billing information pane, and appear or disapear if the customer change his country for an european country or not. As you have to use javascript to make the condition (because the country is not asked before the checkout pane) I think it can be done using javascript too. (see the screenshot 1)

For the condition about the user status, I think the best way to dissociate an individual customer than a professionnal is to create 2 different roles in drupal, it's what I done for my Kalys gastronomie website There are a lot of advantages to make it via roles :

See in my screenshot that the company field become required if the user role is professionnal, so it means the core can provide optional/required field depending on user role

  • Its drupal core, so there are a lot of modules that extend functionnalities (example, ask different information depending on the role on registration, separate individual and professionnal statistics in google analytics, create coupons just for a selected role etc...)
  • Its easy to add a condition in workflow to check the user role, some actions to gives roles etc...
  • more, more, more...

And the module would provide 2 token for the invoice :

  • One to show the store VAT number
  • One to display the customer VAT number

One cool feature would be to check if the VAT number is correct on a European database, I know it's doable because there is one module for osCommerce that do it. the store admin would be able to choose if he want this option or not

The display price module

In an european store, all individual (all over the world) have to pay the VAT. For professionnals, only the professionnal of the country of the store pay the VAT, the others don't pay it. So you need to know 2 informations about your customer when showing price

  • His status (professionnal or individual)
  • His country (the same than the store or not)

As it's impossible to know the country of the customer before the checkout page, you cannot check the second condition on a product page but you can show both prices (with a bigger price includng VAT, because it's the more important). A cool feature would be to let the choice to the user, to show single price or both. If single price is checked, the store show price including VAT to individuals and price excluding VAT to professionnal.

The "including VAT" or "excluding VAT" have to be specified near the price to not confuse the user, so the module have to implement a kind of suffix after all prices.

In addition, the prices have to be managed excluding prices, because all calculation on product (example discount) are made on excluding price. Adding the tax to the price is only for display.

So to resume, in europe, it's better to show prices including prices to the user, but you have to manage them excluding price. One problem I encounter when I developped the add tax to product price contrib was that Ubercart calculate the subtotal by adding, for each product, the product price * quantity. So, as I wanted a subtotal excluding tax, I had to make a reverse calculation te remove the tax I added on sell price on the checkout page, which could bring some rounding problems. I think core have to change some things (don't know what) to make that more extensible.

Another things is that, the subtotal have to be displayed like that on the invoice :
- Subtotal excluding tax
- Shipping quote excluding tax
- Discount (if one) applied on the subtotal excluding price
- Total excluding price
- Tax
- Total including price

But this is already possible with the Lyle addition to show the Total excluding price before the tax if a tax is displayed (Thank you Lyle Eye-wink)

Voilà, I wish my post is complete enough.

About my work on that module, I'm not opposed to that, but maybe not as the main maintainer. Maybe as a co-maintainer or a consultate, because It's not my work, I'm not sponsored to only work on that so I don't often have the time for that. I could work on the 2 modules I develop because it was a need of a customer, now it's done, I'm on another project that don't need it ATM so I don't have much time to spend on it (and on my free time I'm developping a website for my eve online corporation ^^).

So maybe as a co maintainer or a consultate, I'm ok.

AttachmentSize
screenshot1.png 37.04 KB
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15476
Re: Read it if you can ! ;)

Thanks so much for taking the time to put this whole post together, zmove. Smiling

I'll chew on this for a while and we'll see where to go next. I'm sure we can put this all into one module that's usable for Ubercart 1.0 and then work it into core for 2.0. We'd be happy to have you on as a co-maintainer/adviser.

I may look into that osC contrib to figure out how they're validating VAT numbers, too.

reglogge's picture
Offline
Joined: 05/08/2008
Juice: 4
Hi Ryan, I'm working as a

Hi Ryan,

I'm working as a product manager on a rather biggish drupal project in Germany which plans to utilize your wonderful shop module. Currently we are stuck at the precise point this thread is about: the correct display of tax rates.

I'm really looking forward to the module you are planning. Great to see that you are taking on this issue. One observation I would like to make:
- The tax display issue is by far the most critical, since the current mode of adding taxes to the total of all ordered products is a complete dealbreaker for most european countries.
- Also a solution should not only be limited to diplaying orders and the cart but should also include the way orders are stored in the database, notifications mailed to customers and so forth. (I'm no drupal/ubercart expert so please forgive me if that sounds stupid...).
- Taxes should be calculated on a per-item-basis with the added capability of applying dfferent tax-rates to different product categories.
- The issue with the VAT-numbers is also important, but on the other hand there will be a majority of shops who only deal with private customers within their own country or at the most within the EU. And those shops wouldn't need this functionality.

My plea, therefore: If it would speed things up to seperate the two isues into two modules, by all means do it. And then push out the tax display module as soon as possible.

Thanks for your consideration.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Hi Ryan, I'm working as a

Hmm I would precise that, even if you only sell to private customers, you have to show your shop VAT number in the invoice, so it's equally important that the Tax price display issue.

I agree that the tax should be calculated per item basis, or we will have rounding issue on the checkout page (as I have on my shop). The problem is that we have to store the price excluding tax somewhere because this is the base of all discount calculation.

The major problem with tax is that the tax have to be calculated at the very end in the invoice (and checkout page) but, at the same time, each product must be showed including tax.

And the way ubercart calculate the subtotal ATM make this not possible.

reglogge's picture
Offline
Joined: 05/08/2008
Juice: 4
Quote:even if you only sell
Quote:

even if you only sell to private customers, you have to show your shop VAT number in the invoice, so it's equally important that the Tax price display issue.

The shop VAT number can very easily be placed in the template for the invoice, and also in the footer of pages or an "about"-page since it never changes. The really problematic VAT numbers we would need a module for are those of customers from other EU-countries which you have to somehow store in order to report the taxes you received correctly to the local IRS...

xen.dk@drupal.org's picture
Offline
Joined: 02/22/2008
Juice: 5
Re: Ubercart European VAT Compatibility

We've been working on the same problem, but threw in another one that seemed to be somewhat related: Different prices.

It seems a requirement/wish for a lot of customers to be able to have different prices depending on different criteria, some examples:

Role based prices for setting custom prices for 'Gold customers'.

Currency based prices, as pure rate based conversions isn't satisfactory for some customers.

Our, work in progress, solution moves prices out into a generalised module that allows add on modules to define hooks into the price finding process. In the finding process each hook can either change the price or add another 'price' as a property. An example of the latter could be a VAT calculating module that stores the VAT with the price without changing the price as such. The theming function can then decide whether to show the price with or without VAT, or with VAT as a separate item.

The idea is that a shop system (not limited to Ubercart) requests the price for an object (often node, though other types can be implemented), and uses the theme function to display it (by telling the theme function where the price is to be shown, which allows the themer to variate the display depending on context), and an 'getter' function for getting the price that should be ultimately charged for this object (allowing for more hooks).

Also the price object contains the currency of the price, which allows for both exchange rate based modifiers as well as add-on modules that store prices for different currencies.

This allows for considerable control over how prices and their display.

Al
Al's picture
Offline
Bug FinderGetting busy with the Ubercode.Internationalizationizer
Joined: 02/14/2008
Juice: 249
EU patch suggestions

@xen.dk@drupal.org: How far are you? This development sounds very interesting to me.

My opinion about what we really need to display taxes:

  1. First issue is about rounding on a per product/item base, so this means in uc_taxes_workflow.inc 3 if/else statements. That simple if you know where it happens. To get an idea what about it should look like see the attached patch
  2. Next is for discussion: To get the taxed Subtotal for the checkout process I added 3 lines in uc_cart_checkout_pane.inc. Target is to collect the subtotal where I already have the values taxed (through my module) and save it in a $_SESSION['taxed_subtotal']. This works now already 2 or 3 weeks without any issues for me. Maybe this could be done by a module also, but not in 3 lines.
  3. Probably not a much bigger thing, but I still didn't have time to look into it how it could be done: In the order we need for every product and every line-item the tax rate(s) at time the order was submitted. Tax rates are no diamonds, so this is needed to get old orders displayed right if tax rates changed.
  4. Where I am totally lost are the 2 Javascripts on /checkout: Both should save the values without tax (as is), but call Workflow-ng for the tax rules and then display the taxed values. This any solution will need. If someone has a better relationship with JS than me and wants to help out - you are warmly welcome!!!
  5. If we talk about Europe I would like to mention that currencies still are a very big issue, so my +1 for xen.dk@drupal.org's efforts or I start in a couple of weeks a thread about "opening uc_currency_formt()". Smiling

To get things finally started independent on which module base this are the basic requirements. More core support or a more sophisticated approach would make our life easier for keeping our module up to date, but only the above things are the real show stoppers.

Ok, from whatever reason the second patch doesn't generate, so inline. Sorry. Base is uc_taxes_workflow.inc, v 1.1.2.5 2008/04/23 19:38:13

line 89

<?php
        $amount
+= $item->price * $item->qty * $tax->rate;
?>

gets line 89-95

<?php
       
// EU support
       
if (variable_get('uc_taxes_per_item', '0')) {
         
$amount += round($item->price * $tax->rate, variable_get('uc_currency_prec', '2')) * $item->qty;
        }
        else {
         
$amount += $item->price * $item->qty * $tax->rate;
        }
?>

line 101

<?php
        $amount
+= $line_item['amount'] * $tax->rate;
?>

gets line 108-114

<?php
       
// EU support
       
if (variable_get('uc_taxes_per_item', '0')) {
         
$amount += round($line_item['amount'] * $tax->rate, variable_get('uc_currency_prec', '2'));
        }
        else {
         
$amount += $line_item['amount'] * $tax->rate;
        }
?>

line 107

<?php
      $amount
+= $other_tax['amount'] * $tax->rate;
?>

gets line 122-128

<?php
     
// EU support
     
if (variable_get('uc_taxes_per_item', '0')) {
       
$amount += round($other_tax['amount'] * $tax->rate, variable_get('uc_currency_prec', '2'));
      }
      else {
       
$amount += $other_tax['amount'] * $tax->rate;
      }
?>
AttachmentSize
uc_cart_checkout_pane.inc_.patch 1.08 KB
mortendk's picture
Offline
Internationalizationizer
Joined: 04/07/2008
Juice: 32
Re: EU patch suggestions

im the testing monkey for xen (and the dude that puts in the €/$/Dkk )
I hope to have a test run done sometime after the weekend, put please if your interested in this module send me og xen.dk a pm it looks like were not the only ones who need a kick ass pricing system build in to ubercart (roles, taxes etc) - we need testing drones and code to get this ball rolling - as it "kinda" messes with üc core (oooh oooh ) - and probably will end with messing with a coupple of other modules that works with the price Eye-wink

/morten.dk

tormi's picture
Offline
Joined: 08/08/2007
Juice: 58
Re: Ubercart European VAT Compatibility

There is even a SOAP service for EU VAT number validation.

Tormi

andrew9109's picture
Offline
Joined: 05/05/2008
Juice: 15
UK Vat Rules

Hi Ryan,

In the UK a company does not have to be VAT registered if it makes less that £64,000 ($120,000) per year, if its over they must be VAT registered.

However, certain industry sectors are not VAT registered even though there income is way over this small threshold. An example are the private medical service providers.

It was a government initiative to provide transparency to the general public...and such questions have always been raised as to whether it has done such things as they stated it would make things cheaper?!?! even though the companies couldn't claim the VAT back on items they bought and so had to cover the cost by charging it to the customer.

I currently work for a cosmetic surgery provider that makes around £40 million per year, this company is not VAT registered as it falls into the category above and so will be unable to provide a VAT number on purchases using the VAT Contrib module

Sadly nothing is as simple as it seams, as this rule is only for the UK but there could be other little rules like this in other companies.

Andrew

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: UK Vat Rules

If you consider selling to professionnal that are not in your country, you have to ask for a number that only professionnal people can have.

On the begining of my shop, my VAT number module was not required for professionnal because there are some professionnal (association etc... that couldn't provide this number).

The problem is that some individuals customers registered as professionnal and didn't fill their VAT number to be invoiced without VAT.

So about VAT number, I thing there is 3 things to do to avoid this kind of abuse :

  • If the role of the user is professionnal, make the society field required for billing address
  • Next to the VAT field (see my screenshot above), provide a checkbox "I dont have a VAT number", if checked, the VAT number field is changed to another required field, that all society in the world could have (I believe this society number exist)... Something that could certify that the society name filled in the billing address isn't a fake
  • Make verifications as much as possible. Verify if the VAT number is correct with the SOAP service in case of the user choose to fill the VAT and verify that the society number is correct via another SOAP service (if one exist) with the society number
elephantiX@drupal.org's picture
Offline
Joined: 06/05/2008
Juice: 49
also in urgent need of ...

hi folks,
nice to meet you all. at the beginnig - i´m germany based and have also that VAt problem often mentioned in several threads. as we all see there are so many differences in all our countrys that only a generalistic solution will make sense to be future open. i´n germany the tax rouls are changed every year and nobody knows all (exept those cracy people diciding these tax rouls). i would suggest to make some sort of a knowledge database to collect all these needs to consider theme while development. an i think the much more open solution for a pricing system that would perhaps be node based should be the goal. for instance i have several hundred products - but the most have the same price (they are produced on demand and are charged per squaremeter). so if my purchasing conditions change it is much work to change all prices per product. so a central pricing and taxing solution should be the goal. we should learn from the xt commerce project perhaps a bit (i don´t like xtc !). so i would be glad if a pricing and taxing solution would be raised on the development list a bit up as money is what commerce is build around.

folks - by the way you rock all as it is realy nice to have so much engaged people around!
carsten

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi, I'm posting some new

Hi,

I'm posting some new informations about the taxes rules, because I'm experiencing the problem on my shop ATM, and I think I will be obliged to hack the core to do it. So it would be helpful to integrate that in the next release of Ubercart that want to be VAT friendly.

The problem I have is that I must add somme new products on my website for which another tax rules is applied. In france, most of the products are taxes to a 19.6% rate, but the books, for example, are taxed with a 5.5%.

So ubercart already allow to do that, I successfully created a new book class, I created a 5.5% tax that is applied to books, very easy to do, works well...

The problem is on the invoice (the checkout page too so, but the law mention that it's required for the invoice, not especially others documents), if a people order some products at 19.6% and some others at 5.5%, ubercart successfully show the 2 taxes rules like that :

Subtotal : 75.75€
Shipping quote : 8€
Total Excluding taxes : 83.75€
VAT 5.5% :1.25€
VAT 19.6% : 11.98€
Total including taxes : 96.98€

All calculation are good, the problem is that the law oblige us to show the the total for which the 5.5% VAT applied and the total for which the 19.6% VAT applied... So it should be

Subtotal : 75.75€
Shipping quote : 8€
Base 5.5% : 22.65€
Base 19.6% : 61.10€
Total excluding taxes : 83.75€
Total including taxes : 93.98€

It's pretty fastidious, but this is the law Eye-wink. So concretly, instead of displaying a single total excluding taxes, the tax module would detect if there are different tax rules applied to an order and, id yes display the base of all calculation as a line item, and then display the total of all bases.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi, I have to apologie about

Hi,

I have to apologie about my previous post about displaying a base for all taxes if several taxes are applied to an order, it's not completely true, I misunderstood my accountant when she explain it to me...

If several taxes are applied in a single invoice, the things to do is to explain to the customer what product is taxed by taxe 1 and what product is taxed by tax 2.

This can be easily done by adding a new column in the invoice that show the taxe applied for each product. It even can made with the actual version of ubercart, and a little tweak of the invoice.

Maybe, to provide the best "out of the box" invoice as possible, you could add a little code that detect if there are several different taxes applied to that product and, if yes, display that column. Or always display a tax column, even if it's a little useless if only one tax is applied.

so don't take care of my previous post, I don't delete it to show you how am I stupid Eye-wink

evil_cz's picture
Offline
Joined: 07/11/2008
Juice: 6
More EU/VAT questions

Hi folks, nice to meet so many VAT-warriors.
My locations is Prague/Czech Republic/EU and I have the same couple of problems with VAT...
But (unlike you) I am totally Drupal-newbie. Even I am excited by this wonderful and modular system I am still just exploring possibilities of the system and trying to understand how it works.
Right now I have to make a decision on what system use as a base for next site including 2 separated eshops. I would really like to use Drupal and Ubercart (because of many advantages of Drupal) but the VAT issues...
My question #1 is: what is the status of this VAT project?
My question #2 is: how can I help?

Some notes to VAT processing used here (according to local rules and/or my costumers requests):

1) Prices must be shown both (w/ even w/o the VAT) at the moment. Alternatives "only w/VAT" and "only w/o VAT" are used only for space-saving on web page (switching prices showing w/ x w/o VAT must be enabled even for unregistered user). [USER-REQUEST]

2) Even the cart should show both prices (mainly the price w/VAT). [USER-REQUEST]
The price w/VAT is the main goal > most customers will PAY the amount w/VAT (individuals even professionels). Only professionels outside the local country but inside the EU, with EU tax registration number will pay the amount w/o the VAT. And more: these foreign customers MUST ask for this opinion, 'cause they CAN pay the VAT in the country where the eshop is located (in EU) instead of VAT in their location (different VAT values are used in our countries). [RULE]

3) There are usually 3 levels of VAT: zero level, lower-level (9% here) and normal-level (19% here). Each kind of goods pertains in one of these 3 levels. [RULE]

4) There are many currencies across the EU, not only € - there are still countries not in "€-zone". The prices can be set using the main currency (local or €) and calculated to other currencies using (1a) the convert ratio download from the bank at the moment OR (1b) using fixed ratio set by user OR (2!) using fixed prices in different currencies. [USER-REQUEST]

btw. My costumer is an extreme -> different prices in different currencies based on a user-roles_product-groups matrix...

5) Except the VAT there are also other product-based fees. Eg. Recycling-fee for electronics or "authors fee" (ransom for local reincarnation of RIAA). [RULE]
These fees can be setup by group OR (better) per product. [USER-REQUEST]

gp.mazzola's picture
Offline
Joined: 06/30/2008
Juice: 27
Re: More EU/VAT questions

I am also interested in this topic.
I want just add that for Italy (where I live) you need to specify both VAT (we call it IVA) and Fiscal Code.
So another field should be added for Italy.

evil_cz's picture
Offline
Joined: 07/11/2008
Juice: 6
Re: Re: More EU/VAT questions

> I want just add that for Italy (where I live) you need to specify both VAT (we call it IVA) and Fiscal Code.

Can u tell me more about this Italy-specific issue?

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Re: Re: More EU/VAT questions

The way to display the products price need to be very extensible, to fill most of needs.

What about the idea to tokenize the display of the products by providing some tokens :

[sell-price] = display the normal sell price
[sell-price-tax] = display the sell price with a tax included.
[global-currency] = the currency set up in the shop
[local-currency] an eventual local currency set up in the "my accoun" page, in case of some multicurrencies features.

With an admin option that provide a textarea in which you can put the text you want + token like that

[sell-price][global-currency] Without VAT
[sell-price-tax][global-currency] Vat included

maybe you could provide too this same textarea in product page, in case of, for some products, you want to override the global setting.

gp.mazzola's picture
Offline
Joined: 06/30/2008
Juice: 27
evil_cz wrote:> I want just
evil_cz wrote:

> I want just add that for Italy (where I live) you need to specify both VAT (we call it IVA) and Fiscal Code.

Can u tell me more about this Italy-specific issue?

Hi evil_cz.
I give you an example to clarify.
By example I am a free professional so I have a VAT (IVA) number. However everyone here also have a Fiscal Code Number (wich is calculated from name, surname, date and place of birth).
When I make an invoice, I need to expose both this numbers. Or if I buy something and I need an ivoice for tax purposes, on this invoice I need both my VAT number and Fiscal Code

I hope it helped Smiling

evil_cz's picture
Offline
Joined: 07/11/2008
Juice: 6
gp.mazzola> Oh, thanks... So

gp.mazzola>

Oh, thanks... So small continent and so many numbers...
Sorry I did not get the idea before. Probably a missing word in my vocabulary.

Okay - it's NOT Italian issue, it's probably euro-wide.

Even here in CZ we have to fill in two independent numbers:
1 = professionel registration number
2 = VAT registration number
(crazy thing about that is you have VAT-reg-num even whe you r not returning VAT and more there r some organisations /usualy founded by state/ which does NOT have any VAT-reg-num).

tassoman's picture
Offline
Joined: 07/21/2008
Juice: 2
About italian Codice Fiscale and Partita IVA

Hi, getting deeper into the "Italian job" we must say that here in Italy, professional VAT number is called "Partita IVA", that's a numeric 11 digits string without IT prefix. Italian VAT is made by the described algorithm I can translate for you. http://it.wikipedia.org/wiki/Partita_IVA

Then We have the "Codice Fiscale" (that's a tax id) generally is based on registry data (birthday, birthplace, name and surname) but in some rare cases it must be recalculated.. We have a bunch of "Li Wu" Chinese people Italian citizens but "Codice Fiscale" asks for 6 characters based on name and surname... But this is another problem.
http://it.wikipedia.org/wiki/Codice_Fiscale

The real problem is that since this year (2008) "Codice Fiscale" is also asked and it's required for professionals for each transaction.

ATM I'm just adding a Bio profile with cck fields; there isn't a real validation but using tokens module i'm exposing that fields to UC invoices. And the dirt job is done.

splash112@drupal.org's picture
Offline
Joined: 03/31/2008
Juice: 413
Re: About italian Codice Fiscale and Partita IVA

Which of the italian tax-id will check correctly with:
http://ec.europa.eu/taxation_customs/vies/

Abilnet's picture
Offline
Uber DonorBug Finder
Joined: 12/28/2007
Juice: 714
Re: Re: About italian Codice Fiscale and Partita IVA

Thanks "splash112" for the source. Nothing easy to understand here, but as far as I understand, this and this link are presenting some EU-based facts and other useful information about the topic.

catorghans@drupal.org's picture
Offline
Joined: 08/16/2007
Juice: 72
Re: Re: Re: About italian Codice Fiscale and Partita IVA

Welcome to (the chaos of) Europe.

Does it make sense to make the VAT (display) rules part of the localization options of ubercart? So every uc community per country can configure/write their specific rules (and checks). Then uc users can just choose their own country and all their rules are covered.

tassoman@drupal.org's picture
Offline
Joined: 02/26/2008
Juice: 97
partita iva
splash112@drupal.org wrote:

Which of the italian tax-id will check correctly with:
http://ec.europa.eu/taxation_customs/vies/

this check is for VAT number. In Italy is called "Partita IVA"

tassoman@drupal.org's picture
Offline
Joined: 02/26/2008
Juice: 97
hooking the price and the customer's data

I've just set a dirt VAT enabled shop using the prices with tax contrib, bio module, tokens module, and a dirty hacking of the invoices templates.
I'm asking customers to fill a CCK text field with theire vat-id but there isn't any check on it. Then that cck field is shown into invoice by token module.
Prices are calculated without decimals cause taxes are rounded and you could get 50.01€ prices -_-'

So what i'm asking for is an easy way to hook taxes with prices and the vat field in the customer data that could be self validated with an hook or override.
Then developers from european countries could easily mantain their own country vat contrib.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: hooking the price and the customer's data

For sure, this is a battleplan for the 3.x version of ubercart, but I hope to see that features in the 2.0 Eye-wink

fdq
fdq's picture
Offline
Joined: 08/20/2008
Juice: 8
tassoman@drupal.org
tassoman@drupal.org wrote:

I've just set a dirt VAT enabled shop using the prices with tax contrib, bio module, tokens module, and a dirty hacking of the invoices templates.
I'm asking customers to fill a CCK text field with theire vat-id but there isn't any check on it. Then that cck field is shown into invoice by token module.

Hi folks, I am from Austria and want to use ubercart for a winemakers website. Could you please provide a short description on how and with which steps you have implemented your "dirt VAT enabled shop"? I think it would be enough for my requirements.

Update: a few minutes ago I got a mail from my winemaker in which it says that the tax rates are 12% for wines and 10% for juices (grapejuice in this case) in Austria.

Leo
Leo's picture
Offline
Joined: 01/27/2008
Juice: 17
Re: tassoman@drupal.org

If true VAT support will only see light by version 3.0, then I'm sorry to say that I'll abandon any hope for now in Ubercart and switch my project to a newly discovered PrestaShop...

I had enough of code hacking, CCK configs, endless modules hunting and adjustments, etc, etc,etc...

Sorry guys, but as much as I used to love Ubercart, maybe for the US users Drupal+Ubercart is just perfect, but for me in Europe... D+U is just not ready for prime time. Or maybe we were not meant to be for one another...

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15476
Leo wrote:Sorry guys, but as
Leo wrote:

Sorry guys, but as much as I used to love Ubercart, maybe for the US users Drupal+Ubercart is just perfect, but for me in Europe... D+U is just not ready for prime time. Or maybe we were not meant to be for one another...

I say use what works for you when you need it. We lament our shortcomings just as much as you, but in the end a business decision is a business decision. No hard feelings. Cool

fwiw, we're talking here about core VAT handling. There is at least one working solution through the VAT contrib module, and we just today made it possible in the tax module to calculate taxes through a hook and I expect VAT solutions to be released that take advantage of that. In other words... VAT support will be here well before a 3.0 release.

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Re: Leo wrote:Sorry guys, but as

"VAT support will be here well before a 3.0 release."

Yeeeeeehaaaaaa Cool

fdq
fdq's picture
Offline
Joined: 08/20/2008
Juice: 8
Ryan wrote:VAT support will
Ryan wrote:

VAT support will be here well before a 3.0 release.

On the dange to aks a question again which was asked previously:
1. what is "well before" in weeks or months?
2. whats the release date of 3.0?

tassoman@drupal.org's picture
Offline
Joined: 02/26/2008
Juice: 97
fdq wrote:Ryan wrote:VAT
fdq wrote:
Ryan wrote:

VAT support will be here well before a 3.0 release.

On the dange to aks a question again which was asked previously:
1. what is "well before" in weeks or months?
2. whats the release date of 3.0?

I'm not core developer but... Let me guess...

1. Check CVS
2. When It's done

Laughing out loud just kidding

splash112@drupal.org's picture
Offline
Joined: 03/31/2008
Juice: 413
Hi guys, I suggested some

Hi guys,

I suggested some extra code for the VAT number module.
http://www.ubercart.org/contrib/797#comment-21545

Hope it helps tackling the VAT problems.
Can't find the flowchart of Dries anymore, so maybe somebody got it laying around?

Greetz
Mark

Abilnet's picture
Offline
Uber DonorBug Finder
Joined: 12/28/2007
Juice: 714
splash112@drupal.org
splash112@drupal.org wrote:

...Can't find the flowchart of Dries anymore, so maybe somebody got it laying around?...

Found it!

AttachmentSize
vat-in-europe.jpg 115.09 KB
splash112@drupal.org's picture
Offline
Joined: 03/31/2008
Juice: 413
Great, Ok, so far it does

Great,

Ok, so far it does about the same as the proposals I made in the VAT number contrib.
The flowchart is fine for physical products. Services and E-products follow different rulesets... I don't even want to mention combinations of these...

Thanks
Mark

careykf's picture
Offline
Joined: 07/21/2008
Juice: 2
VAT - again

Hi guys,

I know this has been thrown around over and over again... just wondering if this is being worked on. Currently our ONLY issue which is preventing go-live on our site is the inability to have a price for a product including vat (so it is added to the cart at the vat inclusive price) and at end of checkout have a subtotal (excluding vat), a vat total and then a final total including vat.

We have managed to hack around and remove some code - but it then gives the final total excluding vat and shipping (commenting out line items excludes both these items).

Does anyone know how we can add one and not the other (i.e. add shipping to the final total but not vat)

Basic process we have followed thus far is:
1. Changed the VAT to a negative percentage
2. Products were added with prices inclusive of vat
3. We then used the standard VAT calculation (applied with workflow)
4. Finally we commented out code which added line items to the total (this then works fine for items which don't have a shipping cost)

Do we have any timelines for development on this? is it being worked on?

zmove's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.Internationalizationizer
Joined: 08/13/2007
Juice: 1195
Hi, @careykf : I add exactly

Hi,

@careykf : I had exactly the same problems than you. If I understand well you manage your prices including VAT when you add a product ? I had the same problem than you with the VAT management with ubercart, but there is one things I'm pretty sure, it's to absolutely avoid to manage products price including VAT.

VAT is not for you, it is for your country, so it's a non-sense to manage your prices including VAT. In addition, if you want to add a discount system on your shop, the calculation will be wrong as it have to be calculated on excluding VAT prices. The informations you send to google analytics will be wrong too for the same reasons.

If your shop have to display prices including VAT (as mine), you should use the module Add tax to product prices I develop because I had the same needs than you, but I didn't want to manage product price including VAT for all reasons listed above.

The problem is that the module correctly display the product price including VAT on the product price, and on the cart. But, in the checkout page, all prices are displayed excluding VAT. I know this is a problem, but today, there is no real solutions without hacking the core (at least, I didn't find one...) because the first line item subtotal price is calculated by adding $item->quantity * $item->price of the cart, line by line. So, if I put price including tax in the cart of the checkout page, the subtotal will be including taxes, the discounts will be calculated on subtotal including tax etc.... All calculation will be wrong, and the tax module will add a tax at the end on price already including taxes, that's why it was impossible.

The way to do would be to change the way the subtotal is calculated. In my module, you can choose which role can see product prices without vat and which roles see product price with VAT, so, somewhere in the ubercart subtotal calculation, it need a code that detect the user role, if role see product prices excluding VAT > make the actual calculation. And if the role see product prices including VAT > remove the VAT to the subtotal calculation. Like this, you will be able to keep a shopping cart including VAT and have a subtotal excluding VAT.

But the other problem is that, even if you keep your product prices including VAT for a coherent display to your user during all checkout process, they have to be added in the database without VAT, so I think ubercart core, would alter something else than the subtotal calculation to save the orders items excluding VAT, to keep coherence for administrator that have to manage their products without VAT.

So the VAT price problem is a display issue only. Ubercart is already made to manage products price excluding VAT, and this is the good way to proceed. The missing stuff is to provide an option that allow, even if your products are managed without VAT, to display product prices including VAT to users, on all the shop and during all the checkout process.

ramonxu's picture
Offline
Joined: 07/24/2008
Juice: 8
VAT number must be a adress field

VAT number must be in the Adress fields in the Costumer Information in the Store Administration-Configuration-Checkout settings. This way, we can append the title (VAT in EU, CIF for Spain only, NIF, etc., the store can select the name prefered). User from others conuntries that don´t use VAT could use this field to store the customer code that prefer (the countable code for example) or leaving blank. Also a verification square with the posibilities to make the field visible or not visible in the invoices. No ecommerce systems that I know considers that VAT in EU is so important or more that the customer name or hs adress. And this is the big error. Please you must think about this as if you were the one EU store owner. Thanks.

splash112@drupal.org's picture
Offline
Joined: 03/31/2008
Juice: 413
Re: VAT number must be a adress field

It might be a better idea to include per country rules in the .cif files. Is that even possible? Could we make it possible? I want to send a package from holland to Italy, so my Italian customer has to put in an extra number?
Of course, translation should be done where it is needed. If your website is (displaying) in English, we talk about VAT, CIF in Spain, BTW in the Netherlands etc.

Thanks
Mark

Abilnet's picture
Offline
Uber DonorBug Finder
Joined: 12/28/2007
Juice: 714
Re: Re: VAT number must be a adress field

In Europe, being not able to follow the VAT-rules, can be a show stopper to any chopping cart. That's why it just is so important to have the famous "Ubercart style flexibility" also in handling the VAT issues.

Some starting points:

Maybe...?

Maybe it makes sense, if Ubercart / Ryan will ask directions also directly from EU authorities? (there's a rule in EU that the authorities have to point you to the right direction / to the right office to ask and get helped)

If we're lucky, there's a clear check list for developers to follow...

My 2 centimos from Sunny Spain...

splash112@drupal.org's picture
Offline
Joined: 03/31/2008
Juice: 413
Re: Re: Re: VAT number must be a adress field

Why would a bunch of US boys start asking around how to make a contrib module for EU users?

Maybe... Why don't you send an e-mail to the proper institution?

Regards
Mark

ramonxu's picture
Offline
Joined: 07/24/2008
Juice: 8
Vat number

Hello. I want to speak only of the vat number, not of the tax.

In one physics store, when a customer wants to buy something, the shopper write a card to him. That card contains these data: name, vat number, address, telephone, etc. The vat number always scores, just as the name. It is different from the tax, is only a number. And one scores in the card of the client, does not score in a different paper, but in the same place.

We identify the vat number with the tax. That is an error. The vat number is a number, very easy to solve if it is added to the information of the client, just as becomes in a physical store.

In the USA, in Thailandia and Hong Kong, although it has or although it has not imposed, in cards of the client also writes down a code. It is just as the Ubercart system it assigns an internal code in the database. That is for control of Ubercart. It must have a specific field to put the client code, as it is written in a normal card in a physical store.

I have created a store in Ubercart, with the present stable version, to only sell in Spain. And I cannot put it into real operation because I cannot put my vat number in the invoices, nor either leaves the vat number of the client. That is to say, that leaves illegal invoices, without the vat number.

I believe that we would have to begin by the principle. We are going to put the vat number in its real place before programming the taxes, because without the vat number in the invoices, Ubercart will not be worth us for anything.

Sorry, my English is horrible ... Thanks.

ramonxu's picture
Offline
Joined: 07/24/2008
Juice: 8
last name field

I want to make that the last name field contains 90 characters in customer information. Where must I change the size of this field please? I changes the orders table in the database but the field don´t let me insert more than 35 characters. Thanks.

ramonxu's picture
Offline
Joined: 07/24/2008
Juice: 8
Vat number in Spain

Vat number in Spain:

You could make these changes in the Address fields of Checkout settings:

In the "First name" field you must place "NIF-CIF" (or "NIF-CIF-VAT").
In the "Last name" field you must place "Nombre".
In the "Company" field you must place "Apellidos - Empresa".

This is a big big fudge, but all work fine! and the invoice is almost legal! Thanks.

frost's picture
Offline
Joined: 07/23/2008
Juice: 135
VAT on shipping and line item VAT codes

Ok I'm afraid I'm going to add two additional requirements, based on my experience in IRELAND.

There is VAT added on the cost of SHIPPING. Here's an example (using Irish VAT rates).

Widget      80.00 
Book        15.00 

Shipping     5.00 
------
Net Total: 100.00
VAT:        19.88 
TOTAL DUE: 119.88

Note: The line item prices are all EXCLUDING VAT (the term is "ex VAT" or "Net" in Irleland).
In this example, Widgets and shipping are in the 21% rate and Books are 13.5%.

As mentioned in previous posts to this thread, the VAT Breakdown must appear on the invoice. This shows what was charged at each rate. In Ireland, it normally appears in a box on the invoice, separately from the total figures above, but that isn't necessary, as long as it appears in some form:

Net at 21% :   85.00 
VAT at 21% :   17.85 

Net at 13.5% : 15.00 
VAT at 13.5% :  2.03

Finally, a second requirement, which I think is a "nice to have" and not related to EU regulations, is that some of the invoices I get from Irish suppliers show a VAT code on each line item. So in the example above, the invoice would look like this:

Widget   [1]  80.00 
Book     [2]  15.00 

Shipping       5.00 
------
Net Total:   100.00
VAT:          19.88 
TOTAL DUE:   119.88

VAT Breakdown:
Code Rate    Net     VAT
0     0%      0.00   0.00
1    21%     85.00  17.85
2    13.5%   15.00   2.03

Shipping doesn't display its VAT code "[1]" while the line items do. This is based on the invoices I have received, but I think it would be better if Shipping did display like this:

Shipping [1]    5.00 
frost's picture
Offline
Joined: 07/23/2008
Juice: 135
Storing VAT details / Reporting

It may be already mentioned above, but it is a requirement of VAT registered businesses to submit VAT returns to the tax authority of their country, and also to submit annual statistics returns. So the details stored by Ubercart must be able to produce these reports for a given date range.

I'm VAT-registered in Ireland. Here is the information required on my VAT3 return, which is the one I have to send to the Revenue Commissioners (tax authority) every 2 months. I've left off items that aren't relevent to Ubercart (eg items that my company purchased)

  • Total VAT on Sales (a total of VAT charged at ALL rates)
  • Value of goods sent to EU countries (i.e. sales where VAT not charged because selling into another country to a VAT-registered customer)

Once a year, I also have to fill out a "VAT Return of Trading Details" form. The details which are relevent to Ubercart are a breakdown by each VAT Rate, the total amount of sales at that rate. Note that the VAT rates include several zero rates:

  • Exempt - this is treated as different from a 0% rate, even though both charge no VAT. For example, most food is EXEMPT, but Training services are 0%. (There are reasons for this but I won't get into it here. It does point out a requirement for Ubercart to allow for an Exempt and a 0% rate though).
  • 0% home - this is items charged at 0% sold within Ireland
  • 0% exports - this includes both exports outside the EU, and exports within the EU to VAT-registered companies. In both cases, no VAT would be charged.
  • 13.5% - Sales (without VAT) that were charged at 13.5%
  • 21% - Sales (without VAT) that were charged at 21%

The rates would differ country to country of course.

calbasi's picture
Offline
Joined: 03/01/2009
Juice: 109
Good trip, Ramonxu I've

Good trip, Ramonxu Smiling

I've tried to set "address 2" line as NIF, but I don't know why my shop only shows "address 1 field", then I've set NIF in Company name, and Company name and First Name use the same field.

Regards,

Joan