X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pay.pm;h=873d718efc1446d26628c0f82a97eb8c712231f6;hb=e5aee97b7d4c0cd8d6d0c3f0b1bca05adb676d7d;hp=831d7f26ce40e1873cc3de9fffd0fd952b48145e;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/FS/FS/cust_bill_pay.pm b/FS/FS/cust_bill_pay.pm index 831d7f26c..873d718ef 100644 --- a/FS/FS/cust_bill_pay.pm +++ b/FS/FS/cust_bill_pay.pm @@ -89,9 +89,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" - 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" - if $self->cust_bill->closed =~ /^Y/i; + if $self->cust_bill && $self->cust_bill->closed =~ /^Y/i; $self->SUPER::delete(@_); } @@ -152,7 +152,6 @@ sub 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.