+ my $plugin_class = $invoice_message->edi_acct()->plugin();
+
+ # Plugin has its own invoice processor, only run it and not the standard invoice processor below
+ if ( $plugin_class ) {
+ eval "require $plugin_class"; # Import the class, eval is needed because requiring a string doesn't work like requiring a bareword
+ my $plugin = $plugin_class->new();
+ if ( $plugin->can('edifact_process_invoice') ) {
+ Koha::Plugins::Handler->run(
+ {
+ class => $plugin_class,
+ method => 'edifact_process_invoice',
+ params => {
+ invoice => $invoice_message,
+ }
+ }
+ );
+ return;
+ }
+ }
+