projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT# 78547 noexport_hack part_export::ikano
[freeside.git]
/
FS
/
FS
/
cust_bill_pay.pm
diff --git
a/FS/FS/cust_bill_pay.pm
b/FS/FS/cust_bill_pay.pm
index
74a8bcd
..
23f8814
100644
(file)
--- a/
FS/FS/cust_bill_pay.pm
+++ b/
FS/FS/cust_bill_pay.pm
@@
-1,13
+1,9
@@
package FS::cust_bill_pay;
package FS::cust_bill_pay;
+use base qw( FS::cust_main_Mixin FS::cust_bill_ApplicationCommon );
use strict;
use strict;
-use vars qw( @ISA $conf );
-use FS::Record qw( qsearchs );
-use FS::cust_bill_ApplicationCommon;
-use FS::cust_bill;
-use FS::cust_pay;
-
-@ISA = qw( FS::cust_bill_ApplicationCommon );
+use vars qw( $conf );
+use FS::UID;
#ask FS::UID to run this stuff for us later
FS::UID->install_callback( sub {
#ask FS::UID to run this stuff for us later
FS::UID->install_callback( sub {
@@
-87,9
+83,9
@@
Deletes this payment application, unless the closed flag for the parent payment
sub delete {
my $self = shift;
return "Can't delete application for closed payment"
sub delete {
my $self = shift;
return "Can't delete application for closed payment"
- if $self->cust_pay->closed =~ /^Y/i;
+ if $self->cust_pay
&& $self->cust_pay
->closed =~ /^Y/i;
return "Can't delete application for closed invoice"
return "Can't delete application for closed invoice"
- if $self->cust_bill->closed =~ /^Y/i;
+ if $self->cust_bill
&& $self->cust_bill
->closed =~ /^Y/i;
$self->SUPER::delete(@_);
}
$self->SUPER::delete(@_);
}
@@
-120,6
+116,7
@@
sub check {
|| $self->ut_foreign_key('invnum', 'cust_bill', 'invnum' )
|| $self->ut_numbern('_date')
|| $self->ut_money('amount')
|| $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;
;
return $error if $error;
@@
-140,11
+137,22
@@
sub check {
Returns the payment (see L<FS::cust_pay>)
Returns the payment (see L<FS::cust_pay>)
+=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<FS::cust_pay/send_receipt>.
+
=cut
=cut
-sub
cust_pay
{
+sub
send_receipt
{
my $self = shift;
my $self = shift;
- qsearchs( 'cust_pay', { 'paynum' => $self->paynum } );
+ my $opt = ref($_[0]) ? shift : { @_ };
+ $self->cust_pay->send_receipt(
+ 'cust_bill' => $self->cust_bill,
+ %$opt,
+ );
}
=back
}
=back