[freeside-commits] freeside/FS/FS/part_pkg flat.pm,1.62,1.63
Erik Levinson
levinse at wavetail.420.am
Fri Apr 29 05:12:48 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv25422/FS/FS/part_pkg
Modified Files:
flat.pm
Log Message:
apply discount to setup fees, part 1 of 2, RT11512
Index: flat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -w -d -r1.62 -r1.63
--- flat.pm 8 Apr 2011 01:00:37 -0000 1.62
+++ flat.pm 29 Apr 2011 12:12:45 -0000 1.63
@@ -106,7 +106,11 @@
my $quantity = $cust_pkg->quantity || 1;
my $charge = $quantity * $self->unit_setup($cust_pkg, $sdate, $details);
- sprintf('%.2f', $charge);
+
+ my $param = { 'setup_charge' => $charge };
+ my $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param);
+
+ sprintf('%.2f', $charge - $discount);
}
sub unit_setup {
More information about the freeside-commits
mailing list