Lines 211-222
sub process_invoice {
Link Here
|
211 |
my $logger = Log::Log4perl->get_logger(); |
211 |
my $logger = Log::Log4perl->get_logger(); |
212 |
my $vendor_acct; |
212 |
my $vendor_acct; |
213 |
|
213 |
|
214 |
my $plugin = $invoice_message->edi_acct()->plugin(); |
214 |
my $plugin_class = $invoice_message->edi_acct()->plugin(); |
|
|
215 |
|
216 |
# Plugin has its own invoice processor, only run it and not the standard invoice processor below |
217 |
if ( $plugin_class ) { |
218 |
my $plugin = $plugin_class->new(); |
219 |
if ( $plugin->can('edifact_process_invoice') ) { |
220 |
Koha::Plugins::Handler->run( |
221 |
{ |
222 |
class => $plugin_class, |
223 |
method => 'edifact_process_invoice', |
224 |
params => { |
225 |
invoice => $invoice_message, |
226 |
} |
227 |
} |
228 |
); |
229 |
return; |
230 |
} |
231 |
} |
232 |
|
215 |
my $edi_plugin; |
233 |
my $edi_plugin; |
216 |
if ( $plugin ) { |
234 |
if ( $plugin_class ) { |
217 |
$edi_plugin = Koha::Plugins::Handler->run( |
235 |
$edi_plugin = Koha::Plugins::Handler->run( |
218 |
{ |
236 |
{ |
219 |
class => $plugin, |
237 |
class => $plugin_class, |
220 |
method => 'edifact', |
238 |
method => 'edifact', |
221 |
params => { |
239 |
params => { |
222 |
invoice_message => $invoice_message, |
240 |
invoice_message => $invoice_message, |