[freeside-commits] freeside/FS/FS/part_event/Action fee.pm, 1.3, 1.4 cust_bill_fee_percent.pm, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Wed Jul 1 19:02:48 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Action
In directory wavetail.420.am:/tmp/cvs-serv8587/part_event/Action
Modified Files:
fee.pm cust_bill_fee_percent.pm
Log Message:
fix late fees, RT#5665
Index: fee.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Action/fee.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fee.pm 1 Jul 2009 05:34:43 -0000 1.3
+++ fee.pm 2 Jul 2009 02:02:46 -0000 1.4
@@ -10,6 +10,7 @@
'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
'reason' => 'Reason',
'taxclass' => { label=>'Tax class', type=>'select-taxclass', },
+ 'nextbill' => { label=>'Hold late fee until next invoice', type=>'checkbox', value=>'Y' },
);
}
@@ -20,12 +21,16 @@
my $cust_main = $self->cust_main($cust_object);
- my $error = $cust_main->charge( {
+ my %charge = (
'amount' => $self->option('charge'),
'pkg' => $self->option('reason'),
'taxclass' => $self->option('taxclass')
- #'start_date' => $cust_main->next_bill_date, #unless its more than N months away?
- } );
+ );
+
+ $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away?
+ if $self->option('nextbill');
+
+ my $error = $cust_main->charge( \%charge );
die $error if $error;
Index: cust_bill_fee_percent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Action/cust_bill_fee_percent.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- cust_bill_fee_percent.pm 1 Jul 2009 05:34:43 -0000 1.3
+++ cust_bill_fee_percent.pm 2 Jul 2009 02:02:46 -0000 1.4
@@ -14,6 +14,7 @@
'percent' => { label=>'Percent', size=>2, },
'reason' => 'Reason',
'taxclass' => { label=>'Tax class', type=>'select-taxclass', },
+ 'nextbill' => { label=>'Hold late fee until next invoice', type=>'checkbox', value=>'Y' },
);
}
@@ -28,12 +29,16 @@
my $amount =
sprintf('%.2f', $cust_bill->owed * $self->option('percent') / 100 );
- my $error = $cust_main->charge( {
+ my %charge = (
'amount' => $amount,
'pkg' => $self->option('reason'),
'taxclass' => $self->option('taxclass'),
- #'start_date' => $cust_main->next_bill_date, #unless its more than N months away?
- } );
+ );
+
+ $charge{'start_date'} = $cust_main->next_bill_date #unless its more than N months away?
+ if $self->option('nextbill');
+
+ my $error = $cust_main->charge( \%charge );
die $error if $error;
More information about the freeside-commits
mailing list