[freeside-commits] freeside/FS/FS/part_event/Action fee.pm, 1.2, 1.3 cust_bill_fee_percent.pm, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Tue Jun 30 22:34:45 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_event/Action
In directory wavetail.420.am:/tmp/cvs-serv24747/FS/FS/part_event/Action
Modified Files:
fee.pm cust_bill_fee_percent.pm
Log Message:
add tax class selection back for late charges w/1.9 events, RT#5665
Index: fee.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_event/Action/fee.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fee.pm 22 Nov 2008 22:17:27 -0000 1.2
+++ fee.pm 1 Jul 2009 05:34:43 -0000 1.3
@@ -7,8 +7,9 @@
sub option_fields {
(
- 'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
- 'reason' => 'Reason',
+ 'charge' => { label=>'Amount', type=>'money', }, # size=>7, },
+ 'reason' => 'Reason',
+ 'taxclass' => { label=>'Tax class', type=>'select-taxclass', },
);
}
@@ -19,7 +20,12 @@
my $cust_main = $self->cust_main($cust_object);
- my $error = $cust_main->charge( $self->option('charge'), $self->option('reason') );
+ my $error = $cust_main->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?
+ } );
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.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cust_bill_fee_percent.pm 22 Nov 2008 22:17:27 -0000 1.2
+++ cust_bill_fee_percent.pm 1 Jul 2009 05:34:43 -0000 1.3
@@ -11,8 +11,9 @@
sub option_fields {
(
- 'percent' => { label=>'Percent', size=>2, },
- 'reason' => 'Reason',
+ 'percent' => { label=>'Percent', size=>2, },
+ 'reason' => 'Reason',
+ 'taxclass' => { label=>'Tax class', type=>'select-taxclass', },
);
}
@@ -24,10 +25,16 @@
#my $cust_main = $self->cust_main($cust_bill);
my $cust_main = $cust_bill->cust_main;
- my $error = $cust_main->charge(
- sprintf('%.2f', $cust_bill->owed * $self->option('percent') / 100 ),
- $self->option('reason')
- );
+ my $amount =
+ sprintf('%.2f', $cust_bill->owed * $self->option('percent') / 100 );
+
+ my $error = $cust_main->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?
+ } );
+
die $error if $error;
'';
More information about the freeside-commits
mailing list