Add the tax table.

Add the getItems method, for accessing the entire tax table.
This commit is contained in:
Colin Kuskie 2008-02-15 22:15:58 +00:00
parent f08f3a0ffe
commit 70b8331794
3 changed files with 46 additions and 2 deletions

View file

@ -24,6 +24,8 @@ my $session = start(); # this line required
# upgrade functions go here
insertCommerceTaxTable($session);
finish($session); # this line required
@ -34,6 +36,25 @@ finish($session); # this line required
# # and here's our code
#}
#-------------------------------------------------
sub insertCommerceTaxTable {
my $session = shift;
print "\tInstall the Commerce Tax Table.\n" unless ($quiet);
# and here's our code
$session->db->write(<<EOSQL);
CREATE TABLE tax (
taxId VARCHAR(22) NOT NULL,
field VARCHAR(100) NOT NULL,
value VARCHAR(100) DEFAULT 0.0,
taxRate FLOAT NOT NULL,
PRIMARY KEY (taxId),
UNIQUE KEY (field, value)
)
EOSQL
}
# --------------- DO NOT EDIT BELOW THIS LINE --------------------------------