[freeside-commits] freeside/FS/FS/part_pkg flat_comission.pm, 1.4,
1.5
Ivan,,,
ivan at wavetail.420.am
Sat Dec 2 14:04:13 PST 2006
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail:/tmp/cvs-serv19526
Modified Files:
flat_comission.pm
Log Message:
fix for commission price plan
Index: flat_comission.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_comission.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- flat_comission.pm 9 Jul 2005 10:36:43 -0000 1.4
+++ flat_comission.pm 2 Dec 2006 22:04:10 -0000 1.5
@@ -41,8 +41,14 @@
$cust_pkg->cust_main->referral_cust_pkg( $self->option('comission_depth') )
);
- my $error = $cust_pkg->cust_main->credit( $amount*$num_active, "commission" );
- die $error if $error;
+ my $commission = sprintf('%.2f', $amount*$num_active);
+
+ if ( $commission > 0 ) {
+
+ my $error = $cust_pkg->cust_main->credit( $commission, "commission" );
+ die $error if $error;
+
+ }
$self->option('recur_fee');
}
More information about the freeside-commits
mailing list