From: Moritz Bunkus Date: Thu, 11 Nov 2010 16:29:46 +0000 (+0100) Subject: Nur Verkaufsbelege in Rechnungen umwandeln X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~58 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f4dca613e8bead358d42df904b2b54b098ef0fcb;p=kivitendo-erp.git Nur Verkaufsbelege in Rechnungen umwandeln --- diff --git a/SL/DB/Order.pm b/SL/DB/Order.pm index ebf099442..573e4f5c5 100644 --- a/SL/DB/Order.pm +++ b/SL/DB/Order.pm @@ -101,6 +101,8 @@ sub convert_to { sub convert_to_invoice { my ($self, %params) = @_; + croak("Conversion to invoices is only supported for sales records") unless $self->customer_id; + if (!$params{ar_id}) { my $chart = SL::DB::Manager::Chart->get_all(query => [ SL::DB::Manager::Chart->link_filter('AR') ], sort_by => 'id ASC',