Posted by wimh on December 31, 2011 at 12:58pm
2 followers
| Project: | Ubercart VAT Number |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | wimh |
| Status: | active |
Issue Summary
This module has had its own table to store VAT numbers, uc_vat_number, but this hasn't been implemented. Instead, VAT numbers are stored in $order->data. This makes it more difficult to properly search for VAT numbers, extend fields used by this module, etc. We should move all VAT numbers from $order->data into the uc_vat_number table.
Comments
#1
This patch contains the code necessary to load and store VAT numbers in the uc_vat_number table, rather than in $order->data. It also contains the update code to move existing VAT numbers.
Can someone test this patch? It works for me but I'd like to get a second opinion. Please make sure you have a backup of your database before trying this.
Once this is applied, other code (such as custom invoices) that expect a VAT number to be in $order->data['vat_number'] will have to be adapted to use $order->vat_number instead. I'll bump the version of this module to 6.x-3.x-dev and make a note in the release notes.
#2
The git repo currently does not yet contain a
6.x-3.xbranch, please consider creating one.