[freeside-commits] freeside/FS/FS rate.pm,1.10.4.1,1.10.4.2
Ivan,,,
ivan at wavetail.420.am
Thu May 13 19:16:33 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv28829/FS/FS
Modified Files:
Tag: FREESIDE_1_9_BRANCH
rate.pm
Log Message:
fix losing rates when renaming a rate plan, RT#8173
Index: rate.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/rate.pm,v
retrieving revision 1.10.4.1
retrieving revision 1.10.4.2
diff -u -w -d -r1.10.4.1 -r1.10.4.2
--- rate.pm 11 May 2010 06:38:27 -0000 1.10.4.1
+++ rate.pm 14 May 2010 02:16:31 -0000 1.10.4.2
@@ -364,6 +364,7 @@
'dest_regionnum' => $regionnum,
map { $_ => $param->{"$_$regionnum"} }
qw( min_included min_charge sec_granularity )
+ #qw( min_included conn_charge conn_sec min_charge sec_granularity )
};
} else {
@@ -371,6 +372,9 @@
new FS::rate_detail {
'dest_regionnum' => $regionnum,
'min_included' => 0,
+ 'conn_charge' => 0,
+ 'conn_sec' => 0,
+ 'conn_charge' => 0,
'min_charge' => 0,
'sec_granularity' => '60'
};
@@ -387,10 +391,13 @@
my $error = '';
if ( $param->{'ratenum'} ) {
warn "$rate replacing $old (". $param->{'ratenum'}. ")\n" if $DEBUG;
- $error = $rate->replace( $old,
- 'rate_detail' => \@rate_detail,
- 'job' => $job,
- );
+
+ my @param = ( 'job'=>$job );
+ push @param, 'rate_detail'=>\@rate_detail
+ unless $param->{'preserve_rate_detail'};
+
+ $error = $rate->replace( $old, @param );
+
} else {
warn "inserting $rate\n" if $DEBUG;
$error = $rate->insert( 'rate_detail' => \@rate_detail,
More information about the freeside-commits
mailing list