X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pay_pkg.pm;h=ccfa49258adaa4892cdb4ef945d6dd3d8240a14b;hp=eb2e80c78a832b9413e67dc76effdf879d62a1d8;hb=5372897f367498972c96f5494e142e6e11b29eb8;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984 diff --git a/FS/FS/cust_bill_pay_pkg.pm b/FS/FS/cust_bill_pay_pkg.pm index eb2e80c78..ccfa49258 100644 --- a/FS/FS/cust_bill_pay_pkg.pm +++ b/FS/FS/cust_bill_pay_pkg.pm @@ -1,13 +1,8 @@ package FS::cust_bill_pay_pkg; +use base qw( FS::cust_main_Mixin FS::Record ); use strict; -use vars qw( @ISA ); use FS::Conf; -use FS::Record qw( qsearch qsearchs ); -use FS::cust_bill_pay; -use FS::cust_bill_pkg; - -@ISA = qw(FS::Record); =head1 NAME @@ -102,7 +97,11 @@ sub insert { #payment receipt my $conf = new FS::Conf; - my $trigger = $conf->config('payment_receipt-trigger') || 'cust_pay'; + my $trigger = + $conf->config('payment_receipt-trigger', + $self->cust_bill_pay->cust_bill->cust_main->agentnum, + ) + || 'cust_pay'; if ( $trigger eq 'cust_bill_pay_pkg' ) { my $error = $self->send_receipt( 'manual' => $options{'manual'}, @@ -171,24 +170,10 @@ sub check { Returns the FS::cust_bill_pay object (payment application to the overall invoice). -=cut - -sub cust_bill_pay { - my $self = shift; - qsearchs('cust_bill_pay', { 'billpaynum' => $self->billpaynum } ); -} - =item cust_bill_pkg Returns the FS::cust_bill_pkg object (line item to which payment is applied). -=cut - -sub cust_bill_pkg { - my $self = shift; - qsearchs('cust_bill_pkg', { 'billpkgnum' => $self->billpkgnum } ); -} - =item send_receipt Sends a payment receipt for the associated payment, against this specific