Skip to content

Commit

Permalink
Flash message shows edi_vend_id as string
Browse files Browse the repository at this point in the history
  • Loading branch information
jgreben committed Aug 1, 2018
1 parent d16ec89 commit d02a0a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/edi_invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ def self.make_updates(vendor, invoice)
@edi_invoice = where('edi_vend_id = ? AND edi_doc_num = ?', vendor, invoice)
if @edi_invoice.present?
if %w(CreInvc SKIP CreOrd Excld).include?(@edi_invoice.pluck(:todo)[0].to_s)
['error', "Invoice NOT excluded! #{@edi_invoice.edi_vend_id} invoice no. #{@edi_invoice.edi_doc_num} "\
['error', "Invoice NOT excluded! #{@edi_invoice.edi_vend_id.to_s} invoice no. #{@edi_invoice.edi_doc_num} "\
'is already through EDI processing past the point of safe Exclusion via web form.']
else
update_edi_invoice
delete_edi_inv_line
delete_edi_piece
['warning', "#{@edi_invoice.edi_vend_id} invoice no. #{@edi_invoice.edi_doc_num} excluded from EDI processing"]
['warning', "#{@edi_invoice.edi_vend_id.to_s} invoice no. #{@edi_invoice.edi_doc_num} excluded from EDI processing"]
end
else
insert_edi_invoice(vendor, invoice)
['warning', "#{@edi_invoice.edi_vend_id} invoice no. #{@edi_invoice.edi_doc_num}, "\
['warning', "#{@edi_invoice.edi_vend_id.to_s} invoice no. #{@edi_invoice.edi_doc_num}, "\
'excluded from EDI processing']
end
end
Expand Down

0 comments on commit d02a0a9

Please sign in to comment.