[freeside-commits] freeside/FS/FS/cust_main Billing.pm, NONE, 1.1 Billing_Realtime.pm, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Fri Sep 17 13:19:43 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/cust_main
In directory wavetail.420.am:/tmp/cvs-serv17383/FS/FS/cust_main
Added Files:
Billing.pm Billing_Realtime.pm
Log Message:
refactor giant cust_main.pm a little in preparation of adding API methods for maestro, RT#9967
--- NEW FILE: Billing_Realtime.pm ---
package FS::cust_main::Billing_Realtime;
use strict;
use vars qw( $conf $DEBUG $me );
use FS::UID qw( dbh );
use FS::Record qw( qsearch qsearchs );
use FS::payby;
use FS::cust_pay;
use FS::cust_pay_pending;
use FS::cust_refund;
#$realtime_bop_decline_quiet = 0;
# 1 is mostly method/subroutine entry and options
# 2 traces progress of some operations
# 3 is even more information including possibly sensitive data
$DEBUG = 0;
$me = '[FS::cust_main::Billing_Realtime]';
[...1400 lines suppressed...]
}
}
''; #no error
}
=back
=head1 BUGS
Not autoloaded.
=head1 SEE ALSO
L<FS::cust_main>, L<FS::cust_main::Billing>
=cut
1;
--- NEW FILE: Billing.pm ---
package FS::cust_main::Billing;
use strict;
use vars qw( $conf $DEBUG $me );
use Carp;
use FS::UID qw( dbh );
use FS::Record qw( qsearch qsearchs );
use FS::cust_bill;
use FS::cust_bill_pkg;
use FS::cust_bill_pkg_display;
use FS::cust_bill_pay;
use FS::cust_credit_bill;
use FS::cust_pkg;
use FS::cust_tax_adjustment;
use FS::tax_rate;
use FS::tax_rate_location;
use FS::cust_bill_pkg_tax_location;
use FS::cust_bill_pkg_tax_rate_location;
[...1510 lines suppressed...]
$cust_bill_pay->pkgnum( $payment->pkgnum )
if $conf->exists('pkg-balances') && $payment->pkgnum;
my $error = $cust_bill_pay->insert(%options);
if ( $error ) {
$dbh->rollback or die $dbh->errstr if $oldAutoCommit;
die $error;
}
redo if ( $cust_bill->owed > 0) && ! $conf->exists('pkg-balances');
}
my $total_unapplied_payments = $self->total_unapplied_payments;
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
return $total_unapplied_payments;
}
1;
More information about the freeside-commits
mailing list