From bce4bcf8584846bdfc22c9d78e1661bd425ebe9f Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Mon, 29 Feb 2016 11:56:17 +0100 Subject: [PATCH] =?utf8?q?post=20in=20SL::DB::Invoice=20funktioniert=20nur?= =?utf8?q?=20f=C3=BCr=20Verkaufsrechnungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Abbruch, wenn post bei einer Debitorenbuchung aufgerufen wird. --- SL/DB/Invoice.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SL/DB/Invoice.pm b/SL/DB/Invoice.pm index 54da8fa7f..7efe38ed4 100644 --- a/SL/DB/Invoice.pm +++ b/SL/DB/Invoice.pm @@ -222,6 +222,8 @@ sub new_from { sub post { my ($self, %params) = @_; + die "not an invoice" unless $self->invoice; + require SL::DB::Chart; if (!$params{ar_id}) { my $chart = SL::DB::Manager::Chart->get_all(query => [ SL::DB::Manager::Chart->link_filter('AR') ], -- 2.20.1