demo/my_functions.rb
# Generate a file name according to TRAVIC conventions
# based on the active interchange data row and a given job-id
Generate a file name according to TRAVIC conventions
based on the active interchange data row and a given job-id
Generate a file name according to TRAVIC conventions based on the active interchange data row and a given job - id
def compute_filename( customer_id, job_id ) 
      travic_id = 'EXMT' + customer_id[0..4]
      travic_orderid = SecureRandom.hex(2).upcase
      "XXX.#{travic_id}.CCU.O.#{travic_orderid}.#{job_id}"
    end
def compute_filename ( customer_id , job_id ) travic_id = 'EXMT' + customer_id [ 0 .. 4 ] travic_orderid = SecureRandom . hex ( 2 ) . upcase "XXX.#{travic_id}.CCU.O.#{travic_orderid}.#{job_id}" end
Generate a file name according to TRAVIC conventions
based on the active interchange data row and a given job-id
Generate a file name according to TRAVIC conventions based on the active interchange data row and a given job - id
# Generate a virtual TRAVIC customer id (8 chars) # Generate a virtual 4 char TRAVIC order number
customer_id
<not_specific>
job_id
<not_specific>