From aa5355930a03106cedda8537fdd715b623e6983c Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 5 Mar 2008 16:34:12 +0000 Subject: [PATCH] made it use a helper method --- lib/WebGUI/Shop/Tax.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/WebGUI/Shop/Tax.pm b/lib/WebGUI/Shop/Tax.pm index c670c2d1b..94cadef2f 100644 --- a/lib/WebGUI/Shop/Tax.pm +++ b/lib/WebGUI/Shop/Tax.pm @@ -8,8 +8,6 @@ use WebGUI::Storage; use WebGUI::Exception::Shop; use WebGUI::Shop::Cart; use WebGUI::Shop::CartItem; -use WebGUI::Shop::AddressBook; -use WebGUI::Shop::Address; use List::Util qw{sum}; =head1 NAME @@ -97,7 +95,7 @@ sub calculate { my $cart = shift; WebGUI::Error::InvalidParam->throw(error => 'Must pass in a WebGUI::Shop::Cart object') unless ref($cart) eq 'WebGUI::Shop::Cart'; - my $book = WebGUI::Shop::AddressBook->create($self->session); + my $book = $cart->getAddressBook; return 0 if $cart->get('shippingAddressId') eq ""; my $address = $book->getAddress($cart->get('shippingAddressId')); my $tax = 0;