freeside/FS/FS cust_pkg.pm,1.52,1.53
ivan
ivan at pouncequick.420.am
Wed Jan 19 13:25:46 PST 2005
- Previous message: freeside/FS/FS/part_pkg flat.pm,1.2,1.3 sesmon_hour.pm,1.2,1.3 sesmon_minute.pm,1.2,1.3 sql_external.pm,1.2,1.3 sql_generic.pm,1.2,1.3 sqlradacct_hour.pm,1.2,1.3 voip_sqlradacct.pm,1.6,1.7
- Next message: freeside/FS/FS/part_pkg flat.pm,1.3,1.4 flat_comission.pm,1.2,1.3 flat_comission_cust.pm,1.2,1.3 flat_comission_pkg.pm,1.2,1.3 flat_delayed.pm,1.2,1.3 prorate.pm,1.2,1.3 sesmon_hour.pm,1.3,1.4 sesmon_minute.pm,1.3,1.4 sql_external.pm,1.3,1.4 sql_generic.pm,1.3,1.4 sqlradacct_hour.pm,1.3,1.4 subscription.pm,1.2,1.3 voip_sqlradacct.pm,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory pouncequick:/tmp/cvs-serv1952
Modified Files:
cust_pkg.pm
Log Message:
credit for unused portion at cancellation, patch from pbowen
Index: cust_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_pkg.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- cust_pkg.pm 19 Jan 2005 00:57:11 -0000 1.52
+++ cust_pkg.pm 19 Jan 2005 21:25:43 -0000 1.53
@@ -376,6 +376,16 @@
}
}
+ # Add a credit for remaining service
+ my $remaining_value= $self->calc_remain();
+ if ($remaining_value > 0) {
+ my $error = $self->credit($remaining_value, 'Credit for service remaining');
+ if ($error) {
+ $dbh->rollback if $oldAutoCommit;
+ return "Error crediting customer for service remaining: $error";
+ }
+ }
+
unless ( $self->getfield('cancel') ) {
my %hash = $self->hash;
$hash{'cancel'} = time;
@@ -590,6 +600,30 @@
sub calc_recur {
my $self = shift;
$self->part_pkg->calc_recur($self, @_);
+}
+
+=item calc_remain
+
+Calls the I<calc_remain> of the FS::part_pkg object associated with this
+billing item.
+
+=cut
+
+sub calc_recur {
+ my $self = shift;
+ $self->part_pkg->calc_remain($self, @_);
+}
+
+=item calc_cancel
+
+Calls the I<calc_cancel> of the FS::part_pkg object associated with this
+billing item.
+
+=cut
+
+sub calc_cancel {
+ my $self = shift;
+ $self->part_pkg->calc_cancel($self, @_);
}
=item cust_svc [ SVCPART ]
- Previous message: freeside/FS/FS/part_pkg flat.pm,1.2,1.3 sesmon_hour.pm,1.2,1.3 sesmon_minute.pm,1.2,1.3 sql_external.pm,1.2,1.3 sql_generic.pm,1.2,1.3 sqlradacct_hour.pm,1.2,1.3 voip_sqlradacct.pm,1.6,1.7
- Next message: freeside/FS/FS/part_pkg flat.pm,1.3,1.4 flat_comission.pm,1.2,1.3 flat_comission_cust.pm,1.2,1.3 flat_comission_pkg.pm,1.2,1.3 flat_delayed.pm,1.2,1.3 prorate.pm,1.2,1.3 sesmon_hour.pm,1.3,1.4 sesmon_minute.pm,1.3,1.4 sql_external.pm,1.3,1.4 sql_generic.pm,1.3,1.4 sqlradacct_hour.pm,1.3,1.4 subscription.pm,1.2,1.3 voip_sqlradacct.pm,1.7,1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list