Remove Class::InsideOut from TaxDriver and child classes. The EU driver could be improved to use FormBuilder to make the configuration file.
This commit is contained in:
parent
d995ec19d1
commit
56e28acd50
3 changed files with 100 additions and 113 deletions
|
|
@ -26,6 +26,45 @@ use JSON qw{ to_json };
|
|||
use Tie::IxHash;
|
||||
|
||||
use base qw{ WebGUI::Shop::TaxDriver };
|
||||
use Moose;
|
||||
use WebGUI::Definition;
|
||||
extends 'WebGUI::Shop::TaxDriver';
|
||||
|
||||
property taxGroups => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => sub { [] },
|
||||
);
|
||||
|
||||
property shopCountry => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => '',
|
||||
);
|
||||
|
||||
property userTemplateId => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => '',
|
||||
);
|
||||
|
||||
property automaticViesApproval => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => '',
|
||||
);
|
||||
|
||||
property acceptOnViesUnavailable => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => '',
|
||||
);
|
||||
|
||||
property defaultGroup => (
|
||||
fieldType => 'text',
|
||||
noFormPost => 1,
|
||||
default => '',
|
||||
);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -200,18 +239,6 @@ sub appendCartItemVars {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 className
|
||||
|
||||
Returns the name of this class.
|
||||
|
||||
=cut
|
||||
|
||||
sub className {
|
||||
return 'WebGUI::Shop::TaxDriver::EU';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 deleteGroup ( groupId )
|
||||
|
||||
Deletes a tax group.
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ use WebGUI::Exception::Shop;
|
|||
use List::Util qw{ sum };
|
||||
use Tie::IxHash;
|
||||
|
||||
use base qw{ WebGUI::Shop::TaxDriver };
|
||||
use Moose;
|
||||
use WebGUI::Definition;
|
||||
extends 'WebGUI::Shop::TaxDriver';
|
||||
|
||||
|
||||
=head1 NAME
|
||||
|
|
@ -142,18 +144,6 @@ sub getTaxRate {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 className
|
||||
|
||||
Returns the name of this class.
|
||||
|
||||
=cut
|
||||
|
||||
sub className {
|
||||
return 'WebGUI::Shop::TaxDriver::Generic';
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 delete ( [$params] )
|
||||
|
||||
Deletes data from the tax table by taxId.
|
||||
|
|
@ -469,7 +459,8 @@ sub www_getTaxesAsJson {
|
|||
my ($db, $form) = $session->quick(qw(db form));
|
||||
my $startIndex = $form->get('startIndex') || 0;
|
||||
my $numberOfResults = $form->get('results') || 25;
|
||||
my %goodKeys = qw/country 1 state 1 city 1 code 1 'tax rate' 1/;
|
||||
my %goodKeys = qw/country 1 state 1 city 1 code 1/;
|
||||
$goodKeys{'tax rate'} = 1;
|
||||
my $sortKey = $form->get('sortKey');
|
||||
$sortKey = $goodKeys{$sortKey} == 1 ? $sortKey : 'country';
|
||||
my $sortDir = $form->get('sortDir');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue