diff --git a/lib/WebGUI/Shop/Address.pm b/lib/WebGUI/Shop/Address.pm
index 3ab0b6818..5ddff73a5 100644
--- a/lib/WebGUI/Shop/Address.pm
+++ b/lib/WebGUI/Shop/Address.pm
@@ -1,5 +1,19 @@
package WebGUI::Shop::Address;
+=head1 LEGAL
+
+ -------------------------------------------------------------------
+ WebGUI is Copyright 2001-2009 Plain Black Corporation.
+ -------------------------------------------------------------------
+ Please read the legal notices (docs/legal.txt) and the license
+ (docs/license.txt) that came with this distribution before using
+ this software.
+ -------------------------------------------------------------------
+ http://www.plainblack.com info@plainblack.com
+ -------------------------------------------------------------------
+
+=cut
+
use strict;
use Class::InsideOut qw{ :std };
use WebGUI::Exception::Shop;
diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm
index a64e5aa25..9e5fdbc4b 100644
--- a/lib/WebGUI/Shop/Tax.pm
+++ b/lib/WebGUI/Shop/Tax.pm
@@ -1,5 +1,19 @@
package WebGUI::Shop::Tax;
+=head1 LEGAL
+
+ -------------------------------------------------------------------
+ WebGUI is Copyright 2001-2009 Plain Black Corporation.
+ -------------------------------------------------------------------
+ Please read the legal notices (docs/legal.txt) and the license
+ (docs/license.txt) that came with this distribution before using
+ this software.
+ -------------------------------------------------------------------
+ http://www.plainblack.com info@plainblack.com
+ -------------------------------------------------------------------
+
+=cut
+
use strict;
use Class::InsideOut qw{ :std };
diff --git a/lib/WebGUI/Shop/TaxDriver.pm b/lib/WebGUI/Shop/TaxDriver.pm
index 70ed0d208..a7113cbcb 100644
--- a/lib/WebGUI/Shop/TaxDriver.pm
+++ b/lib/WebGUI/Shop/TaxDriver.pm
@@ -1,5 +1,19 @@
package WebGUI::Shop::TaxDriver;
+=head1 LEGAL
+
+ -------------------------------------------------------------------
+ WebGUI is Copyright 2001-2009 Plain Black Corporation.
+ -------------------------------------------------------------------
+ Please read the legal notices (docs/legal.txt) and the license
+ (docs/license.txt) that came with this distribution before using
+ this software.
+ -------------------------------------------------------------------
+ http://www.plainblack.com info@plainblack.com
+ -------------------------------------------------------------------
+
+=cut
+
=head1 NAME
Package WebGUI::Shop::TaxDriver
@@ -25,11 +39,38 @@ use strict;
use Class::InsideOut qw{ :std };
use JSON qw{ from_json to_json };
+=head1 NAME
+
+Package WebGUI::Shop::TaxDriver
+
+=head1 DESCRIPTION
+
+Base class for all modules which do tax calculations in the Shop.
+
+=head1 SYNOPSIS
+
+ use base WebGUI::Shop::TaxDriver;
+
+ my $driver = WebGUI::Shop::TaxDriver->new($session);
+
+=head1 METHODS
+
+These subroutines are available from this package:
+
+=cut
+
readonly session => my %session;
readonly messages => my %messages;
private options => my %options;
#-----------------------------------------------------------
+
+=head2 appendTaxDetailVars ($var)
+
+=head3 $var
+
+=cut
+
sub appendTaxDetailVars {
my $self = shift;
my $var = shift;
@@ -38,6 +79,13 @@ sub appendTaxDetailVars {
}
#-----------------------------------------------------------
+
+=head2 canManage
+
+Returns true if the current user can manage taxes.
+
+=cut
+
sub canManage {
my $self = shift;
my $admin = WebGUI::Shop::Admin->new( $self->session );
@@ -235,4 +283,3 @@ sub update {
}
1;
-
diff --git a/lib/WebGUI/Shop/TaxDriver/EU.pm b/lib/WebGUI/Shop/TaxDriver/EU.pm
index ab9e10874..04b67b63a 100644
--- a/lib/WebGUI/Shop/TaxDriver/EU.pm
+++ b/lib/WebGUI/Shop/TaxDriver/EU.pm
@@ -1,5 +1,19 @@
package WebGUI::Shop::TaxDriver::EU;
+=head1 LEGAL
+
+ -------------------------------------------------------------------
+ WebGUI is Copyright 2001-2009 Plain Black Corporation.
+ -------------------------------------------------------------------
+ Please read the legal notices (docs/legal.txt) and the license
+ (docs/license.txt) that came with this distribution before using
+ this software.
+ -------------------------------------------------------------------
+ http://www.plainblack.com info@plainblack.com
+ -------------------------------------------------------------------
+
+=cut
+
use strict;
use SOAP::Lite;
@@ -9,6 +23,27 @@ use WebGUI::Utility qw{ isIn };
use base qw{ WebGUI::Shop::TaxDriver };
+=head1 NAME
+
+Package WebGUI::Shop::TaxDriver::EU
+
+=head1 DESCRIPTION
+
+This package manages tax information, and calculates taxes on a shopping cart specifically handling
+European Union VAT taxes.
+
+=head1 SYNOPSIS
+
+ use WebGUI::Shop::Tax;
+
+ my $tax = WebGUI::Shop::Tax->new($session);
+
+=head1 METHODS
+
+These subroutines are available from this package:
+
+=cut
+
my $EU_COUNTRIES = {
AT => 'Austria',
BE => 'Belgium',
@@ -40,11 +75,25 @@ my $EU_COUNTRIES = {
};
#-------------------------------------------------------------------
+
+=head2 className
+
+Returns the name of this class.
+
+=cut
+
sub className {
return 'WebGUI::Shop::TaxDriver::EU';
}
-#-------------------------------------------------------------------
+#-----------------------------------------------------------
+
+=head2 getConfigurationScreen ( )
+
+Returns the form that contains the configuration options for this plugin in the admin console.
+
+=cut
+
sub getConfigurationScreen {
my $self = shift;
my $session = $self->session;
@@ -138,6 +187,17 @@ EOHTML
}
#-------------------------------------------------------------------
+
+=head2 getCountryCode ($countryName)
+
+Given a country name, return a 2 character country code.
+
+=head3 $countryName
+
+The name of the country to look up.
+
+=cut
+
sub getCountryCode {
my $self = shift;
my $countryName = shift;
@@ -147,6 +207,17 @@ sub getCountryCode {
}
#-------------------------------------------------------------------
+
+=head2 getCountryName ($countryCode)
+
+Given a 2 character country code, return the name of the country.
+
+=head3 $countryCode
+
+The code of the country to look up.
+
+=cut
+
sub getCountryName {
my $self = shift;
my $countryCode = shift;
@@ -155,6 +226,13 @@ sub getCountryName {
}
#-------------------------------------------------------------------
+
+=head2 getGroupRate ($taxGroupId)
+
+=head3 $taxGroupId
+
+=cut
+
sub getGroupRate {
my $self = shift;
my $taxGroupId = shift;
@@ -166,11 +244,17 @@ sub getGroupRate {
}
#-------------------------------------------------------------------
+
+=head2 getUserScreen ( )
+
+Returns the screen for entering per user configuration for this tax driver.
+
+=cut
+
sub getUserScreen {
my $self = shift;
my $url = $self->session->url;
-
my $output = 'VAT Numbers
'
. '
| Country | VAT Number |
|---|