diff --git a/lib/RevBank/Products.pm b/lib/RevBank/Products.pm index 7dcafb1..9a96b41 100644 --- a/lib/RevBank/Products.pm +++ b/lib/RevBank/Products.pm @@ -144,8 +144,9 @@ sub read_products($filename = "revbank.products", $default_contra = "+sales/prod } # Calculate tag and total price - PRODUCT: for my $product (values %products) { - next if $product->{id} =~ /^\+/; + PRODUCT: for my $id (keys %products) { + next if $id =~ /^\+/; + my $product = $products{$id}; my $tag_price = $product->{price} || 0; my $hidden = 0;