[freeside-commits] freeside/FS/FS/part_pkg flat.pm, 1.53.2.6, 1.53.2.7
Erik Levinson
levinse at wavetail.420.am
Fri Apr 29 05:16:49 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv26210/FS/FS/part_pkg
Modified Files:
Tag: FREESIDE_2_1_BRANCH
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.53.2.6
retrieving revision 1.53.2.7
diff -u -w -d -r1.53.2.6 -r1.53.2.7
--- flat.pm 14 Mar 2011 22:42:41 -0000 1.53.2.6
+++ flat.pm 29 Apr 2011 12:16:47 -0000 1.53.2.7
@@ -98,7 +98,12 @@
my $quantity = $cust_pkg->quantity || 1;
- sprintf("%.2f", $quantity * $self->unit_setup($cust_pkg, $sdate, $details) );
+ my $charge = $quantity * $self->unit_setup($cust_pkg, $sdate, $details);
+
+ 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