## Scott's area for testing $set_account_forward = 0; my $lpch = LP::CouponsHandler->new($dbh); my %lp_coupons = $lpch->get_coupons_by_customer($account_info_id); if(keys %lp_coupons) { my ($lp_overall,$lp_detail,$lp_schedule) = $lpch->check_coupons_requirements($account_info_id,'new',%lp_coupons); if ($lp_overall) { my $lp_components = $lpch->get_coupon_components(%lp_coupons); my ($lp_savings) = $lpch->calculate_coupon_savings($lp_components,\%lp_coupons,$lp_schedule); foreach my $coupon_id (keys %$lp_savings) { if($lp_components->{$coupon_id}{$lp_savings->{$coupon_id}{'free_hosting_offer_id'}}{'coupon_type'} eq 5) { $set_account_forward += $lp_components->{$coupon_id}{$lp_savings->{$coupon_id}{'free_hosting_offer_id'}}{'offer_amount'}; } } } } if($set_account_forward > $period) { $set_account_forward = 0; }