X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pay.pm;h=831d7f26ce40e1873cc3de9fffd0fd952b48145e;hb=573139dbd6c37808697bfa72a3a468bb0980d4dd;hp=b7ba2b71143589dbb24da1caeba3ad9e7f2347aa;hpb=978fea1c303551f90c95ae852b6463951b78246b;p=freeside.git diff --git a/FS/FS/cust_bill_pay.pm b/FS/FS/cust_bill_pay.pm index b7ba2b711..831d7f26c 100644 --- a/FS/FS/cust_bill_pay.pm +++ b/FS/FS/cust_bill_pay.pm @@ -7,6 +7,7 @@ use FS::cust_main_Mixin; use FS::cust_bill_ApplicationCommon; use FS::cust_bill; use FS::cust_pay; +use FS::cust_pkg; @ISA = qw( FS::cust_main_Mixin FS::cust_bill_ApplicationCommon ); @@ -121,6 +122,7 @@ sub check { || $self->ut_foreign_key('invnum', 'cust_bill', 'invnum' ) || $self->ut_numbern('_date') || $self->ut_money('amount') + || $self->ut_foreign_keyn('pkgnum', 'cust_pkg', 'pkgnum') ; return $error if $error; @@ -148,6 +150,25 @@ sub cust_pay { qsearchs( 'cust_pay', { 'paynum' => $self->paynum } ); } +=item send_receipt HASHREF | OPTION => VALUE ... + + +Sends a payment receipt for the associated payment, against this specific +invoice. If there is an error, returns the error, otherwise returns false. + +See L. + +=cut + +sub send_receipt { + my $self = shift; + my $opt = ref($_[0]) ? shift : { @_ }; + $self->cust_pay->send_receipt( + 'cust_bill' => $self->cust_bill, + %$opt, + ); +} + =back =head1 BUGS