rendered paste bodysub calccost() {
my ($adjconn, $adjcost, $answeredtime, $increment) = @_;
my $cost;
$increment = 60; #Added by sadaat-Handle Billing Increment
my $adjtime = eval { $adjtime = int((($answeredtime - $numdata->{includedseconds}) + $increment - 1) / $increment) * $increment;
return $adjtime };
if ($adjtime < 0) {
$adjtime = 0;
}
print STDERR "Adjusted time is $adjtime, cost is $adjcost with $adjconn fee\n";
$cost = ($adjcost * $adjtime / 60) + $adjconn; #Changed
# eval { $cost = int($adjcost * $adjtime / 60) };
# $cost += $adjconn;
print STDERR "Total cost is $cost\n";
return $cost;
}