[Astpp-commit] SF.net SVN: astpp: [2152] trunk
Brought to you by:
darrenkw
From: <dar...@us...> - 2007-11-03 22:29:22
|
Revision: 2152 http://astpp.svn.sourceforge.net/astpp/?rev=2152&view=rev Author: darrenkw Date: 2007-11-03 15:29:23 -0700 (Sat, 03 Nov 2007) Log Message: ----------- Resolve bug #305 Modified Paths: -------------- trunk/astpp-admin.cgi trunk/astpp-common.pl Modified: trunk/astpp-admin.cgi =================================================================== --- trunk/astpp-admin.cgi 2007-11-03 22:03:16 UTC (rev 2151) +++ trunk/astpp-admin.cgi 2007-11-03 22:29:23 UTC (rev 2152) @@ -6373,7 +6373,8 @@ . "</td><td>" . popup_menu( -name => 'account', - -values => \@accountlist + -values => \@accountlist, + -default => "" ) . "</td><td>" . textfield( Modified: trunk/astpp-common.pl =================================================================== --- trunk/astpp-common.pl 2007-11-03 22:03:16 UTC (rev 2151) +++ trunk/astpp-common.pl 2007-11-03 22:29:23 UTC (rev 2152) @@ -4014,7 +4014,7 @@ sub update_list_cards() { my ($astpp_db, $config, $sweep) = @_; my ( $sql, @cardlist, $row ); - if ( $sweep eq "" ) { + if (!$sweep || $sweep eq "" ) { $sql = $astpp_db->prepare( "SELECT number FROM accounts WHERE status < 2 AND reseller IN (NULL,'') AND posttoexternal = 0 " @@ -4445,14 +4445,14 @@ sub calc_charges() { my ($astpp_db, $config, $cardno, @output) = @_; - my $cost; + my $cost = 0; my @chargelist = &get_charges($astpp_db, $config, $cardno); foreach my $id (@chargelist) { print STDERR "ID: $id\n" if $config->{debug} == 1; my $chargeinfo = &get_astpp_cdr( $astpp_db, $id ); - $cost = $cost + $chargeinfo->{debit}; + $cost = $cost + $chargeinfo->{debit} if $chargeinfo->{debit}; print STDERR "Debit: $chargeinfo->{debit} Credit: $chargeinfo->{credit}\n" if $config->{debug} == 1; - $cost = $cost - $chargeinfo->{credit}; + $cost = $cost - $chargeinfo->{credit} if $chargeinfo->{credit}; &markbilled( $astpp_db, $id, 1 ); } return $cost; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |