-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Posting Journal and Associated Tools #2085
Conversation
@jniles |
cd74780
to
367a213
Compare
I believe the lack of validation was by design from @sfount. I think the motivation was to make it really easy for a user to edit a transaction, but the posting process would still ensure that the transaction's rules were respected. That being said, I would personally be more comfortable with stricter validation. I'll write some more checks before this is merged. Your first critique is a bug. Good catch! I never tested that path. It may be related to #2041. |
Refactor Journal Tools – Assessment 1. The comment tool has bug :
2. Selecting a group of transactions doesn’t select children transactions 3. The text “Transactions Vérifiées” must clearly refer to the posted transactions
4. The cash payment receipt has bug
5. The edit tool is not strict in terms of validation The good thing is that the trial balance modal blocks well bad transactions |
@mbayopanda, thanks for the feedback! I cannot reproduce the cash payment error. Can you give me steps to reproduce? The problem with UI Grid selection was reported in #2041. The main problem is that we are fighting ui-grid on this one - we will be changing default behavior if we try to hack this. What do you think the best option is? |
367a213
to
cdf72f4
Compare
@lomamech, @mbayopanda thanks for your feed back! I have pushed some fixes that should address everything except validation - could you check out the branch and see if those fixes work as you expect? |
@jniles, somes issues are fixed, but in regard to the description, it would have to be defined at once as for the date, or else it should be maintained like this |
@lomamech, you are right. The description is allowed to be different on every line by design. We actually change the description for things like billing services in invoices. There's also a suggestion to put the inventory item description on each line of an invoice or cash payment (#1824). For this reason, it is best to keep the ability to change each individual line's description. |
cdf72f4
to
28292b9
Compare
Alright, all feedback including validation has been addressed. @DedrickEnc @mbayopanda can I get a code review? |
cfa522d
to
594fab9
Compare
There are some new bugs found :
This behavior is also in account statement, we can only add and update a comment to a row, but we cannot remove completely a comment. |
@mbayopanda thanks for these catches! I guess the comment PR wasn't properly vetted :( I'll put some patches in by this afternoon. |
ce2faa9
to
4383cc7
Compare
- This PR makes it possible to put the period as well as the year whenever the date changes and prevent the modification of the date for closed or inexistent fiscal years - Implement of function lookupFiscalYearByDate for check the FiscalYear and period for one Date -
- Fix the comment for the description of function - Put all alteration of data in the function transformColumns() - rename the name of function selectTransdate
This commit makes sure that the posting journal's data is in the correct period.
This commit rounds out the posting journal tools by translating all the keys that are used. It also prunes the `posting_journal.json` file to find keys that are not used.
This reworks journal.js so that it passes lint checks. It also removes many of the old imports.
The previous journal edit code only considered edited lines to update the fiscal_year_id on. This behavior threw errors when new lines were added to a transaction. The errors are fixed by updating the editing code to work on both new lines and old lines.
This commit cleans up the lint issues in the transaction edit modal of the Posting Journal.
This commit improves the UX by passing the full account label (human readable label) to the Posting Journal filters. The account is now properly shown instead of just the number.
Fixes the currencies to be right-aligned instead of left-aligned. It also ensures footer values are defined before rendering "NaN" and defaults to "0".
This commit fixes a broken reference that prevented commenting the Posting Journal.
This commit right-aligns the currencies in the edit modal footer.
This commit fixes the PDF report by combining posted and unposted report routes into one and the same route.
This commit fixes various miscellaneous usability errors and typos in the journal, trial balance, and transaction editing process. Specifically: 1. Better French translation in the Journal Search Modal (thanks @mbayopanda) 2. Description is automatically copied onto new modal line when adding a new lint (thanks @lomamech) 3. Caught a typo that prevented commenting from working (@mbayopanda). 4. Caught a bug that prevents editing a row when clicking on its group header (@lomamech).
This commit adds "offline" validation to the transaction modal, which was the no 1 requested item on the feedback from developers. The intent is not to be comprehensive, but to prevent users from making silly mistakes.
This commit updates the journal with editing tests for transactions. These tests ensure that the validation works in the modal.
This commit allows the journal to remove comments. Additionally, the comment modal has been improved such that, if a unique value is used for a comment, it is displayed in the input. This makes the component feel more like it belongs on the page.
This commit renames the Posting Journal and subsequent translations to "Journal". It also removes "Posted Journal" from the database. Closes #2031
This commit fixes a few typos, consolidates a few CSS rules and removes unused code. It fixes a bug that disallowed posted records from being commented, as this path was never tested before.
4383cc7
to
fbfdacc
Compare
@mbayopanda, changes landed! |
bors r+ |
2085: refactor: Posting Journal and Associated Tools r=mbayopanda a=jniles This Pull Request finalizes the refactor of the Posting Journal and associated modules. The commit history contains a full list of changes. In brief: 1. Editing has been moved out into a modal. By breaking out the editing code, the complexity of the Posting Journal is reduced. It also enforces editing a single transaction at a time. 2. The Trial Balance has moved into Stored Procedures. This separates the JS code from the SQL code and speeds up the execution of the Trail Balance slightly. 3. The Trial Balance no longer reloads data between `$state` changes. The modal is much more snappy than previous. 4. Links to the receipts/documents/patients associated with each transaction are embedded in the Posting Journal. This makes it easy to find the details associated with a given transaction. 5. The Posting Journal is able to load "posted" transactions. To accommodate this, the Posting Journal footer has been improved to show the number of unposted or posted transactions. Additionally, the "Posted Journal" module has been removed. There have been a number of miscellaneous bug fixes addressed as well. As with any change, this may introduce new bugs specific to the changes listed above. Partially addresses #1432. Closes #1034. Closes #1163. Closes #1402. Closes #1500. Closes #1640. Closes #1659. Closes #1716. Closes #1717. Closes #1724. Closes #1832. Closes #1839. Closes #1921. Closes #1928. Closes #1934. Closes #1943. Closes #1944. Closes #1948. Closes #1950. Closes #1961. Closes #2031. Closes #2041. --- ### TODO Before Merge - [x] Ensure all keys are translated into both French and English - [x] Ensure tests pass - [x] Make sure all filters/links work on Posting Journal page. - [x] Make sure all filters/links work on the Trial Balance - [x] Ensure all editors work as expected. - [x] Ensure that new code passes lint checks.
Build succeeded |
This Pull Request finalizes the refactor of the Posting Journal and associated modules. The commit history contains a full list of changes. In brief:
$state
changes. The modal is much more snappy than previous.There have been a number of miscellaneous bug fixes addressed as well. As with any change, this may introduce new bugs specific to the changes listed above.
Partially addresses #1432.
Closes #1034.
Closes #1163.
Closes #1402.
Closes #1500.
Closes #1640.
Closes #1659.
Closes #1716.
Closes #1717.
Closes #1724.
Closes #1832.
Closes #1839.
Closes #1921.
Closes #1928.
Closes #1934.
Closes #1943.
Closes #1944.
Closes #1948.
Closes #1950.
Closes #1961.
Closes #2031.
Closes #2041.
TODO Before Merge