Class: MassSearch::InvoiceRegenerateEdiDocumentsWorker

Inherits:
Object
  • Object
show all
Includes:
Workers::MassSearchWorker
Defined in:
app/workers/mass_search/invoice_regenerate_edi_documents_worker.rb

Overview

Regenerates + retransmits the EDI-810 invoice message for each selected
invoice, mirroring the manual "Regenerate EDI Documents" + "Process" two-step.
Non-EDI invoices (no order edi_transaction_id) are skipped as errors so they
stay on the list rather than being silently deselected.

Instance Method Summary collapse

Methods included from Workers::MassSearchWorker

included

Instance Method Details

#build_enumerator(args, cursor:) ⇒ Object

Build enumerator.

Parameters:

  • args (Array)

    the args to build

  • cursor (Object)

    the cursor to build

Returns:

  • (Object)

    the result



15
16
17
18
19
# File 'app/workers/mass_search/invoice_regenerate_edi_documents_worker.rb', line 15

def build_enumerator(args, cursor:)
  super
  @processor = Edi::InvoiceEventProcessor.new
  active_record_records_enumerator(@search.search_results, cursor: cursor)
end