freeside/FS/FS/part_pkg flat_comission_cust.pm,1.3,1.4
ivan
ivan at pouncequick.420.am
Tue Apr 12 20:38:38 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory pouncequick:/tmp/cvs-serv3467/FS/FS/part_pkg
Modified Files:
flat_comission_cust.pm
Log Message:
fix bug in flat_commission price plan, thanks to Troy Hammonds
Index: flat_comission_cust.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission_cust.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- flat_comission_cust.pm 19 Jan 2005 21:25:43 -0000 1.3
+++ flat_comission_cust.pm 13 Apr 2005 03:38:34 -0000 1.4
@@ -38,13 +38,16 @@
my $amount = $self->option('comission_amount');
my $num_active = scalar(
- $cust_pkg->cust_main->referral_cust_pkgcust_main_ncancelled(
+ $cust_pkg->cust_main->referral_cust_main_ncancelled(
$self->option('comission_depth')
)
);
- my $error = $cust_pkg->cust_main->credit( $amount*$num_active, "commission" );
- die $error if $error;
+ if ( $amount && $num_active ) {
+ my $error =
+ $cust_pkg->cust_main->credit( $amount*$num_active, "commission" );
+ die $error if $error;
+ }
$self->option('recur_fee');
}
More information about the freeside-commits
mailing list