{"action":"created","issue":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/2542","repository_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/2542/labels{/name}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/2542/comments","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/2542/events","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/2542","id":296995762,"number":2542,"title":"Refactor: Fiscal Year","user":{"login":"jniles","id":896472,"avatar_url":"https://avatars0.githubusercontent.com/u/896472?v=4","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"labels":[{"id":331223378,"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/labels/Bug%20Fix","name":"Bug Fix","color":"006b75","default":false},{"id":346219463,"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/labels/Refactor","name":"Refactor","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-14T07:06:29Z","updated_at":"2018-02-21T13:16:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/pulls/2542","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/2542","diff_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/2542.diff","patch_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/2542.patch"},"body":"This PR essentially rewrites a lot of the Fiscal Year's core components.  The code was over a year old and a bit brittle.  Plus, a few more corner cases are considered (though not all of them #2397).  Here are the major changes:\r\n\r\n 1. The user interface now include text instead of just buttons.  This makes it easier to click and see what the values of each button are.  They are hidden on small screen sizes, though.\r\n 2. A complete rewrite of the core features of the `Tree` library.  This allows much greater flexibility without changing the tree's API at all.  This library has also been ported to the client as the `TreeService`.  In the future, we should figure out how to compile the same code to both the client and the server.\r\n 3. Updated the opening balance modal to show totals on the title accounts and include a grid footer with the balances in the footer.  This feature uses the new `TreeService`.\r\n 4. Opening balances can only be edited for the first year, so I've removed the button editing the fiscal year's opening balances.  If you are in the first fiscal year, it is open for edit.  Otherwise, it is closed.\r\n 5. Removed the Income/Expense accounts from the opening balance modal.  Also ensured we are not posting balances for Title Accounts.\r\n 6. Made all fiscal controllers and services pass ESLint checks on the client.\r\n 7. Used \"filter\" icons instead of \"search\" icons for filtering the ui-grid (we do this in all other places in the application, it's confusing to do it differently here).\r\n 8. A closed fiscal year can no longer be closed again.  The button is hidden/removed.  \r\n\r\nHere are some screenshots:\r\n\r\n![fiscalyearlist](https://user-images.githubusercontent.com/896472/36191440-748f53be-115d-11e8-8496-f955fc702b61.PNG)\r\n_Fig 1: Fiscal Year List_\r\n\r\n![beginningbalancemodalthatcanbeedited](https://user-images.githubusercontent.com/896472/36191483-b5788166-115d-11e8-92b2-08f35c42ef2a.PNG)\r\n_Fig 2: First Fiscal Year's Opening Balance can be edited_\r\n\r\n![beginningbalancemodalthatcannotbeedited](https://user-images.githubusercontent.com/896472/36191492-c24023cc-115d-11e8-9c81-b3e8d86d81a3.PNG)\r\n_Fig 3: Other Fiscal Year's Opening Balances cannot be edited_\r\n\r\n\r\nCloses #2349. \r\nCloses #2535. \r\nCloses #2536."},"comment":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/comments/367322256","html_url":"https://github.com/IMA-WorldHealth/bhima-2.X/pull/2542#issuecomment-367322256","issue_url":"https://api.github.com/repos/IMA-WorldHealth/bhima-2.X/issues/2542","id":367322256,"user":{"login":"bors[bot]","id":26634292,"avatar_url":"https://avatars3.githubusercontent.com/in/1847?v=4","gravatar_id":"","url":"https://api.github.com/users/bors%5Bbot%5D","html_url":"https://github.com/apps/bors","followers_url":"https://api.github.com/users/bors%5Bbot%5D/followers","following_url":"https://api.github.com/users/bors%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/bors%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/bors%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bors%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/bors%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/bors%5Bbot%5D/repos","events_url":"https://api.github.com/users/bors%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/bors%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-02-21T13:16:08Z","updated_at":"2018-02-21T13:16:08Z","author_association":"NONE","body":"# Merge conflict"}}
{"actor":{"display_login":"bors"}}