{"action":"created","comment":{"url":"https://api.github.com/repos/bitzesty/qae/pulls/comments/29789698","id":29789698,"diff_hunk":"@@ -156,6 +156,96 @@ def excluded_question_keys\n     end\n   end\n \n+  def years_list\n+    res = []\n+\n+    period_length.times do |i|\n+      res << \"Year #{i + 1}\"\n+    end\n+\n+    res\n+  end\n+\n+  def financial_year_dates\n+    res = []\n+\n+    period_length.times do |i|\n+      res << [\n+        form_answer.document['financial_year_date_day'].to_s.rjust(2, '0'),\n+        form_answer.document['financial_year_date_month'].to_s.rjust(2, '0'),\n+        Date.current.year - period_length + i + 1\n+      ].join(\"/\")\n+    end\n+\n+    res\n+  end\n+\n+  def financial_year_changed_dates\n+    dates_by_years = data.first[:financial_year_changed_dates]\n+\n+    if dates_by_years.present?\n+      res = []\n+      last_year = dates_by_years.last.split(\"/\")[-1][-1].to_i\n+\n+      dates_by_years.each_with_index do |date, index|\n+        res << if (index + 1) != dates_by_years.count\n+          date.join('/') + (last_year - (dates_by_years.count - (index + 1))).to_s","path":"app/form_pointers/form_financial_pointer.rb","position":37,"original_position":37,"commit_id":"3a345b33563d066c83a75fdd01e538f4190baccd","original_commit_id":"3a345b33563d066c83a75fdd01e538f4190baccd","user":{"login":"matthewford","id":215,"avatar_url":"https://avatars.githubusercontent.com/u/215?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewford","html_url":"https://github.com/matthewford","followers_url":"https://api.github.com/users/matthewford/followers","following_url":"https://api.github.com/users/matthewford/following{/other_user}","gists_url":"https://api.github.com/users/matthewford/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewford/subscriptions","organizations_url":"https://api.github.com/users/matthewford/orgs","repos_url":"https://api.github.com/users/matthewford/repos","events_url":"https://api.github.com/users/matthewford/events{/privacy}","received_events_url":"https://api.github.com/users/matthewford/received_events","type":"User","site_admin":false},"body":"Use 2 (not -5) spaces for indentation.<br>Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-05-06T18:53:51Z","updated_at":"2015-05-06T18:53:51Z","html_url":"https://github.com/bitzesty/qae/pull/478#discussion_r29789698","pull_request_url":"https://api.github.com/repos/bitzesty/qae/pulls/478","_links":{"self":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/comments/29789698"},"html":{"href":"https://github.com/bitzesty/qae/pull/478#discussion_r29789698"},"pull_request":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/478"}}},"pull_request":{"url":"https://api.github.com/repos/bitzesty/qae/pulls/478","id":34847971,"html_url":"https://github.com/bitzesty/qae/pull/478","diff_url":"https://github.com/bitzesty/qae/pull/478.diff","patch_url":"https://github.com/bitzesty/qae/pull/478.patch","issue_url":"https://api.github.com/repos/bitzesty/qae/issues/478","number":478,"state":"open","locked":false,"title":"QAE1180 Case Summary PDF improvements and fixes","user":{"login":"RuslanHamidullin","id":358508,"avatar_url":"https://avatars.githubusercontent.com/u/358508?v=3","gravatar_id":"","url":"https://api.github.com/users/RuslanHamidullin","html_url":"https://github.com/RuslanHamidullin","followers_url":"https://api.github.com/users/RuslanHamidullin/followers","following_url":"https://api.github.com/users/RuslanHamidullin/following{/other_user}","gists_url":"https://api.github.com/users/RuslanHamidullin/gists{/gist_id}","starred_url":"https://api.github.com/users/RuslanHamidullin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RuslanHamidullin/subscriptions","organizations_url":"https://api.github.com/users/RuslanHamidullin/orgs","repos_url":"https://api.github.com/users/RuslanHamidullin/repos","events_url":"https://api.github.com/users/RuslanHamidullin/events{/privacy}","received_events_url":"https://api.github.com/users/RuslanHamidullin/received_events","type":"User","site_admin":false},"body":"* Case Summary PDF: added displaying of Financial Summary tables \r\n* Fixed bug with javascript generation of year on form\r\n  https://github.com/bitzesty/qae/issues/474\r\n* Admin Financial Summary: fixed wrong displaying of years (in case if financial year dates are not changed)\r\n  https://github.com/bitzesty/qae/issues/473\r\n* Raven: disabled on Development and Test environments (as it adds some overload on exceptions)","created_at":"2015-05-06T18:53:47Z","updated_at":"2015-05-06T18:53:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4585e874781132dd4ae8a42c2edc0473b9b37114","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitzesty/qae/pulls/478/commits","review_comments_url":"https://api.github.com/repos/bitzesty/qae/pulls/478/comments","review_comment_url":"https://api.github.com/repos/bitzesty/qae/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitzesty/qae/issues/478/comments","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/3a345b33563d066c83a75fdd01e538f4190baccd","head":{"label":"bitzesty:QAE1180-case-summary-pdf-add-the-financial-table","ref":"QAE1180-case-summary-pdf-add-the-financial-table","sha":"3a345b33563d066c83a75fdd01e538f4190baccd","user":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"repo":{"id":26758825,"name":"qae","full_name":"bitzesty/qae","owner":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitzesty/qae","description":"[Beta] Queens Award for Enterprise","fork":false,"url":"https://api.github.com/repos/bitzesty/qae","forks_url":"https://api.github.com/repos/bitzesty/qae/forks","keys_url":"https://api.github.com/repos/bitzesty/qae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitzesty/qae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitzesty/qae/teams","hooks_url":"https://api.github.com/repos/bitzesty/qae/hooks","issue_events_url":"https://api.github.com/repos/bitzesty/qae/issues/events{/number}","events_url":"https://api.github.com/repos/bitzesty/qae/events","assignees_url":"https://api.github.com/repos/bitzesty/qae/assignees{/user}","branches_url":"https://api.github.com/repos/bitzesty/qae/branches{/branch}","tags_url":"https://api.github.com/repos/bitzesty/qae/tags","blobs_url":"https://api.github.com/repos/bitzesty/qae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitzesty/qae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitzesty/qae/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitzesty/qae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/{sha}","languages_url":"https://api.github.com/repos/bitzesty/qae/languages","stargazers_url":"https://api.github.com/repos/bitzesty/qae/stargazers","contributors_url":"https://api.github.com/repos/bitzesty/qae/contributors","subscribers_url":"https://api.github.com/repos/bitzesty/qae/subscribers","subscription_url":"https://api.github.com/repos/bitzesty/qae/subscription","commits_url":"https://api.github.com/repos/bitzesty/qae/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitzesty/qae/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitzesty/qae/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitzesty/qae/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitzesty/qae/contents/{+path}","compare_url":"https://api.github.com/repos/bitzesty/qae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitzesty/qae/merges","archive_url":"https://api.github.com/repos/bitzesty/qae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitzesty/qae/downloads","issues_url":"https://api.github.com/repos/bitzesty/qae/issues{/number}","pulls_url":"https://api.github.com/repos/bitzesty/qae/pulls{/number}","milestones_url":"https://api.github.com/repos/bitzesty/qae/milestones{/number}","notifications_url":"https://api.github.com/repos/bitzesty/qae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitzesty/qae/labels{/name}","releases_url":"https://api.github.com/repos/bitzesty/qae/releases{/id}","created_at":"2014-11-17T13:56:00Z","updated_at":"2015-05-06T17:42:38Z","pushed_at":"2015-05-06T18:53:47Z","git_url":"git://github.com/bitzesty/qae.git","ssh_url":"git@github.com:bitzesty/qae.git","clone_url":"https://github.com/bitzesty/qae.git","svn_url":"https://github.com/bitzesty/qae","homepage":"","size":45447,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":2,"default_branch":"master"}},"base":{"label":"bitzesty:master","ref":"master","sha":"b175144b2f072d7b92c90daa8f1556603729431d","user":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"repo":{"id":26758825,"name":"qae","full_name":"bitzesty/qae","owner":{"login":"bitzesty","id":70534,"avatar_url":"https://avatars.githubusercontent.com/u/70534?v=3","gravatar_id":"","url":"https://api.github.com/users/bitzesty","html_url":"https://github.com/bitzesty","followers_url":"https://api.github.com/users/bitzesty/followers","following_url":"https://api.github.com/users/bitzesty/following{/other_user}","gists_url":"https://api.github.com/users/bitzesty/gists{/gist_id}","starred_url":"https://api.github.com/users/bitzesty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitzesty/subscriptions","organizations_url":"https://api.github.com/users/bitzesty/orgs","repos_url":"https://api.github.com/users/bitzesty/repos","events_url":"https://api.github.com/users/bitzesty/events{/privacy}","received_events_url":"https://api.github.com/users/bitzesty/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitzesty/qae","description":"[Beta] Queens Award for Enterprise","fork":false,"url":"https://api.github.com/repos/bitzesty/qae","forks_url":"https://api.github.com/repos/bitzesty/qae/forks","keys_url":"https://api.github.com/repos/bitzesty/qae/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitzesty/qae/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitzesty/qae/teams","hooks_url":"https://api.github.com/repos/bitzesty/qae/hooks","issue_events_url":"https://api.github.com/repos/bitzesty/qae/issues/events{/number}","events_url":"https://api.github.com/repos/bitzesty/qae/events","assignees_url":"https://api.github.com/repos/bitzesty/qae/assignees{/user}","branches_url":"https://api.github.com/repos/bitzesty/qae/branches{/branch}","tags_url":"https://api.github.com/repos/bitzesty/qae/tags","blobs_url":"https://api.github.com/repos/bitzesty/qae/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitzesty/qae/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitzesty/qae/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitzesty/qae/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitzesty/qae/statuses/{sha}","languages_url":"https://api.github.com/repos/bitzesty/qae/languages","stargazers_url":"https://api.github.com/repos/bitzesty/qae/stargazers","contributors_url":"https://api.github.com/repos/bitzesty/qae/contributors","subscribers_url":"https://api.github.com/repos/bitzesty/qae/subscribers","subscription_url":"https://api.github.com/repos/bitzesty/qae/subscription","commits_url":"https://api.github.com/repos/bitzesty/qae/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitzesty/qae/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitzesty/qae/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitzesty/qae/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitzesty/qae/contents/{+path}","compare_url":"https://api.github.com/repos/bitzesty/qae/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitzesty/qae/merges","archive_url":"https://api.github.com/repos/bitzesty/qae/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitzesty/qae/downloads","issues_url":"https://api.github.com/repos/bitzesty/qae/issues{/number}","pulls_url":"https://api.github.com/repos/bitzesty/qae/pulls{/number}","milestones_url":"https://api.github.com/repos/bitzesty/qae/milestones{/number}","notifications_url":"https://api.github.com/repos/bitzesty/qae/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitzesty/qae/labels{/name}","releases_url":"https://api.github.com/repos/bitzesty/qae/releases{/id}","created_at":"2014-11-17T13:56:00Z","updated_at":"2015-05-06T17:42:38Z","pushed_at":"2015-05-06T18:53:47Z","git_url":"git://github.com/bitzesty/qae.git","ssh_url":"git@github.com:bitzesty/qae.git","clone_url":"https://github.com/bitzesty/qae.git","svn_url":"https://github.com/bitzesty/qae","homepage":"","size":45447,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/478"},"html":{"href":"https://github.com/bitzesty/qae/pull/478"},"issue":{"href":"https://api.github.com/repos/bitzesty/qae/issues/478"},"comments":{"href":"https://api.github.com/repos/bitzesty/qae/issues/478/comments"},"review_comments":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/478/comments"},"review_comment":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitzesty/qae/pulls/478/commits"},"statuses":{"href":"https://api.github.com/repos/bitzesty/qae/statuses/3a345b33563d066c83a75fdd01e538f4190baccd"}}}}