Dear Ruby community,
I am looking for a “simple” PDF output for monthly salaries. Input is a
CSV file and output should be a PDF file.
I just get more or less these fields from the CSV
id, name, valid_time and date
While creating the tables and preparing the output, there have are
several calculations to be done before PDF generation.
However, I am not yet there
Here is what I got so far:
#csv_input = File.open(‘testtest.csv’,‘r’)
csv_input = <<-EOF
table = Table(:string => csv_input)
table = table.sub_table(%w[id name valid_time date])
table.rename_columns(‘id’ => ‘ID’, ‘name’ => ‘Name’, ‘valid_time’ =>
‘Hours worked’, ‘date’ => ‘Date’)
grouped_by_id = Grouping(table, :by => ‘ID’, :order => :ID)
My question for now. How can I sort within the grouping according to the
date. Basic sorting is asc ID.