SL::DB::Order: verwendete Klassen explizit requiren
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 4 Feb 2014 11:50:10 +0000 (12:50 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Mon, 24 Feb 2014 13:40:00 +0000 (14:40 +0100)
SL/DB/Order.pm

index a3c9de0..89f602e 100644 (file)
@@ -131,6 +131,7 @@ sub convert_to_invoice {
 
   my $invoice;
   if (!$self->db->do_transaction(sub {
+    require SL::DB::Invoice;
     $invoice = SL::DB::Invoice->new_from($self)->post(%params) || die;
     $self->link_to_record($invoice);
     $self->update_attributes(closed => 1);