|
Lines 328-335
if ( $edifact_enabled && $details->{'message_id'} ) {
Link Here
|
| 328 |
|
328 |
|
| 329 |
if ($edifact_message) { |
329 |
if ($edifact_message) { |
| 330 |
|
330 |
|
| 331 |
# Get any processing errors for this message using the relation accessor |
331 |
# Get processing errors for this specific invoice, plus any message-level |
| 332 |
my $errors = $edifact_message->errors; |
332 |
# errors (invoicenumber IS NULL) that affect the whole EDI file. |
|
|
333 |
# This avoids showing errors from other invoices in the same EDI file. |
| 334 |
my $errors = $edifact_message->errors->search( |
| 335 |
{ |
| 336 |
-or => [ |
| 337 |
{ invoicenumber => $details->{'invoicenumber'} }, |
| 338 |
{ invoicenumber => undef }, |
| 339 |
] |
| 340 |
} |
| 341 |
); |
| 333 |
|
342 |
|
| 334 |
while ( my $error = $errors->next ) { |
343 |
while ( my $error = $errors->next ) { |
| 335 |
push @$edifact_errors, { |
344 |
push @$edifact_errors, { |
| 336 |
- |
|
|