From: Ivan Kohler Date: Sun, 28 Feb 2016 07:11:38 +0000 (-0800) Subject: still allow void of ancient invoices from unusual circumstances X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=bc601b882202995ed763b2bef94b9642cb325fd1;p=freeside.git still allow void of ancient invoices from unusual circumstances --- diff --git a/FS/FS/cust_bill_pay.pm b/FS/FS/cust_bill_pay.pm index 3f787d3b7..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(@_); }