Acquisitions EDI invoice creation needs better logging

Bug #1810853 reported by Blake GH
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Evergreen
Confirmed
Undecided
Unassigned

Bug Description

EG 3.1.6

I finally found the reason why an EDI INVOIC message in acq.edi_message was successfully processed but no invoice created in acq.invoice. The transaction was rolled back for what apparently was no reason.

Relevant logs:
[INFO:16636:osrf_application.c:1075:] CALL: open-ils.cstore open-ils.cstore.direct.acq.fund_debit.search.atomic {"id":[1870282]}
[INFO:16636:osrf_app_session.c:1177:] [open-ils.cstore] sent 478 bytes of data to <email address hidden>/client
[INFO:16636:osrf_stack.c:163:] Message processing duration 0.000923
[INFO:17436:osrf_stack.c:163:154644480195782] Message processing duration 0.000742
[INFO:18553:CStoreEditor.pm:139:] editor[1|0] open-ils.cstore.direct.acq.fund_debit.search.atomic: returned 1 result(s)
[INFO:18553:CStoreEditor.pm:139:] editor[1|0] rolling back db session

After much diagnosis, it turned out to be a silent failure due to a quantity mismatch. This line of code:

if ($orig_entry->amount_paid != $entry->amount_paid or
                    $entry->phys_item_count != $orig_entry->phys_item_count) {
                    return $evt if $evt = rollback_entry_debits(
                        $e, $orig_entry, $orig_entry);

Located in Invoice.pm around line 102

This statement will throw the process into an error and not process any of the invoice if one of the reported EDI quantities in the EDI message is different than the number of related rows in acq.lineitem_detail.

A more helpful error message in the logs would save us time in the future. A message in acq.edi_message.error would be even better.

Changed in evergreen:
status: New → Confirmed
tags: added: acq edi
Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

Confirming that this is still an issue in 3.5

tags: added: acq-edi acq-invoice
removed: edi
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.