=================================================================== RCS file: /cvs/RT/Invoicing/lib/RTI/State.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- RT/Invoicing/lib/RTI/State.pm 2011/12/22 04:52:42 1.1 +++ RT/Invoicing/lib/RTI/State.pm 2011/12/30 05:01:56 1.2 @@ -119,7 +119,9 @@ my ($self, $custid) = @_; $self->_match_payments; - return $self->{_table}->{unpaid}->{$custid}; + return defined $custid + ? $self->{_table}->{unpaid}->{$custid} + : $self->{_table}->{unpaid}; } sub save {