[freeside-commits] freeside/FS/FS/part_pkg bulk.pm,1.4,1.5
Ivan,,,
ivan at wavetail.420.am
Mon Mar 23 19:36:33 PDT 2009
- Previous message: [freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.8, 1.9
- Next message: [freeside-commits] freeside/FS/FS cust_svc.pm, 1.78, 1.79 h_cust_svc.pm, 1.9, 1.10 cust_bill.pm, 1.238, 1.239 part_pkg.pm, 1.87, 1.88 Record.pm, 1.185, 1.186
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv31328/FS/FS/part_pkg
Modified Files:
bulk.pm
Log Message:
bulk price plan: label as Name <email>, supress extraneous service list, RT#3519
Index: bulk.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/bulk.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- bulk.pm 23 Mar 2009 17:03:03 -0000 1.4
+++ bulk.pm 24 Mar 2009 02:36:30 -0000 1.5
@@ -7,7 +7,7 @@
@ISA = qw(FS::part_pkg::flat);
-$DEBUG = 0;
+$DEBUG = 1;
$me = '[FS::part_pkg::bulk]';
%info = (
@@ -45,6 +45,9 @@
my $last_bill = $cust_pkg->last_bill;
+ return sprintf("%.2f", $self->base_recur($cust_pkg) )
+ unless $$sdate > $last_bill;
+
my $total_svc_charge = 0;
warn "$me billing for bulk services from ". time2str('%x', $last_bill).
@@ -52,16 +55,15 @@
if $DEBUG;
# END START
- foreach my $h_svc ( $cust_pkg->h_cust_svc( $$sdate, $last_bill ) ) {
+ foreach my $h_cust_svc ( $cust_pkg->h_cust_svc( $$sdate, $last_bill ) ) {
- my @label = $h_svc->label_long( $$sdate, $last_bill );
+ my @label = $h_cust_svc->label_long( $$sdate, $last_bill );
die "fatal: no historical label found, wtf?" unless scalar(@label); #?
- #my $svc_details = $label[0].': '. $label[1]. ': ';
- my $svc_details = $label[1]. ': ';
+ my $svc_details = $label[0]. ': '. $label[1]. ': ';
my $svc_charge = 0;
- my $svc_start = $h_svc->date_inserted;
+ my $svc_start = $h_cust_svc->date_inserted;
if ( $svc_start < $last_bill ) {
$svc_start = $last_bill;
} elsif ( $svc_setup_fee ) {
@@ -69,7 +71,7 @@
$svc_details .= $money_char. sprintf('%.2f setup, ', $svc_setup_fee);
}
- my $svc_end = $h_svc->date_deleted;
+ my $svc_end = $h_cust_svc->date_deleted;
$svc_end = ( !$svc_end || $svc_end > $$sdate ) ? $$sdate : $svc_end;
$svc_charge = $self->option('svc_recur_fee') * ( $svc_end - $svc_start )
@@ -88,6 +90,10 @@
sprintf("%.2f", $self->base_recur($cust_pkg) + $total_svc_charge );
}
+sub hide_svc_detail {
+ 1;
+}
+
sub is_free_options {
qw( setup_fee recur_fee svc_setup_fee svc_recur_fee );
}
- Previous message: [freeside-commits] freeside/httemplate/misc/process recharge_svc.html, 1.8, 1.9
- Next message: [freeside-commits] freeside/FS/FS cust_svc.pm, 1.78, 1.79 h_cust_svc.pm, 1.9, 1.10 cust_bill.pm, 1.238, 1.239 part_pkg.pm, 1.87, 1.88 Record.pm, 1.185, 1.186
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list