Skip to content

Commit

Permalink
Merge #2085
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors[bot] committed Sep 25, 2017
2 parents 727994b + fbfdacc commit afc9ee2
Show file tree
Hide file tree
Showing 95 changed files with 3,176 additions and 3,575 deletions.
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ SESS_UNSET='destroy'

LOG_LEVEL='warn'
# LOG_LEVEL='debug'

UPLOAD_DIR='client/upload'

# this will toggle all MYSQL errors to be reflected to the client.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"angular-messages": "1.6.5",
"angular-bootstrap": "2.5.0",
"angular-ui-router": "1.0.0-rc.1",
"angular-ui-grid": "4.0.6",
"angular-ui-grid": "4.0.4",
"angular-translate": "2.15.2",
"angular-translate-loader-static-files": "2.15.2",
"angular-translate-loader-url": "2.15.2",
Expand Down
9 changes: 8 additions & 1 deletion client/src/css/structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,9 @@ a[disabled] {

.filter-list {
display : inline-block;

/* Remove large bottom margin offsetting filter bars */
margin-bottom : 5px;
}

.filter-list > li {
Expand All @@ -920,4 +923,8 @@ a[disabled] {

.strike {
text-decoration : line-through;
}
}

.dropdown-menu {
z-index : 9999;
}
6 changes: 6 additions & 0 deletions client/src/css/ui-grid.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@
width: 100%;
height : calc(100vh - 106px);
}


.grid-journal {
width : 100%;
height : calc(100vh - 108px);
}

.grid-journal-alert {
width : 100%;
height : calc(100vh - 150px);
}

.grid-util-journal {
width : 100%;
height : calc(100vh - 95px - 35px);
Expand Down
14 changes: 10 additions & 4 deletions client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"UPDATE": "Update",
"VALIDATE": "Validate",
"VIEW_ERRORS": "View Errors",
"VIEW_DETAILS": "View Details"
"VIEW_DETAILS": "View Details",
"VIEW_IN_JOURNAL": "View in Journal"
},
"DIALOGS": {
"CONFIRM_ACTION": "Do you confirm this action?",
Expand Down Expand Up @@ -130,8 +131,9 @@
"NO_SUPPLIER": "A purchase order must have a supplier before specifying items.",
"NO_RECORDS_DATABASE": "There are no records in the database for this query",
"OPERATION_SUCCESS": "Operation performed successfully",
"NUM_TRANSACTION": "Number of transactions",
"OF": "of",
"OTHER_ACTIONS": "Other Actions",
"NUM_TRANSACTION": "Number of transactions",
"PATIENTS": "Patients",
"PATIENT_FOUND": "Patient Found",
"PATIENT_NOT_FOUND": "Patient Not Found",
Expand All @@ -146,7 +148,9 @@
"SHOWING": "Showing",
"TRANSACTION_REVER_SUCCESS": "This transaction was reversed with success",
"UNAUTHORIZED": "Unauthorized",
"UNPOSTED_TRANSACTION": "Unposted Transactions",
"UNPOSTED_TRANSACTION": "Non-posted transaction(s) not shown",
"ROWS": "rows",
"TRANSACTIONS": "Transactions",
"UPDATE_SUCCESS": "Updated successfully",
"UPLOAD_PICTURE_FAILED": "The selected file is not an picture",
"VIEW_BEGINNING_BALANCE": "View Beginning Balance",
Expand Down Expand Up @@ -388,7 +392,7 @@
"PHONE_NO": "Phone Number",
"POSITION": "Position",
"POST_OFFICE_BOX": "Post Office Box",
"POSTING_JOURNAL": "Posting Journal",
"POSTING_JOURNAL": "Journal",
"PO_BOX": "PO Box",
"PURCHASE_INTERVAL": "Purchase Interval",
"QUANTITY": "Quantity",
Expand Down Expand Up @@ -461,6 +465,8 @@
"TO_LOCK": "To lock",
"TRANS_ID": "Transaction ID",
"TRANSACTION": "Transaction",
"POSTED_TRANSACTIONS": "Posted transaction(s)",
"NON_POSTED_TRANSACTIONS": "Non-posted transaction(s)",
"TRANSACTION_DATE": "Transaction Date",
"TRANSACTION_TYPE": "Transaction type",
"TRANSFER_ACCOUNT": "Transfer Account",
Expand Down
133 changes: 65 additions & 68 deletions client/src/i18n/en/posting_journal.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,65 @@
{"POSTING_JOURNAL":{"ABOLISH_GROUPS":"Abolishing Group",
"ACCOUNT":"Account",
"ADD_ROW":"Add Row",
"REMOVE_ROW":"Remove Row(s)",
"ADD_TRANSACTION":"Add Transaction",
"CONFIGURE":"Configure",
"CREDIT":"Credit",
"ROW":"Row",
"ROWS":"Row(s)",
"CREDIT_LETTER":"C",
"DEBIT_LETTER":"D",
"DEBIT":"Debit",
"TOTAL_ROWS":"Rows",
"DEB_CRED":"Deb Cred",
"DELETE_TRANSACTION":"Delete Transaction",
"EDIT":"Edit",
"EDIT_TRANSACTION":"Edit transaction",
"ENTERPRISE":"Enterprise",
"ENTERPRISE_MANAGEMENT":"Enterprise Management",
"FISCAL_YEAR":"Fiscal Year",
"GENERAL_LEDGER":"General Ledger",
"GROUP_BY":"Group By",
"IN_PROGRESS":"In progress",
"JUSTIFICATION":"Justification",
"LINES":"Lines",
"LIVE_TRANSACTION":"Live Transaction",
"RECORDS":"records",
"REFRESH":"Refresh",
"SAVE_TRANSACTION":"Save Transaction",
"SINGLE_EDIT_ONLY":"Single Edit Only",
"SPLIT":"Split",
"SPLIT_TRANSACTION":"Split transaction",
"TRANSACTION":"Transaction",
"TRANSACTION_DATE":"Transaction Date",
"SAVE_TRANSACTION_SUCCESS":"Transaction record was updated successfully.",
"TRANSACTION_NUMBER":"Transaction Number",
"TRANSACTION_SUCCESS":"Transaction success",
"UNKNOWN_ACCOUNT":"Unknown Account",
"VERIFY_TRANSACTION":"Verify Transaction",
"CONFIGURATION":{"TITLE":"Columns configuration",
"COLUMNS":"Columns"},
"ERRORS":{"DATE_IN_WRONG_PERIOD":"Dates in wrong period",
"MISSING_DESCRIPTION":"Descriptions omitted",
"VARIOUS_TRANSACTION_TYPE":"Various transaction type for a transaction",
"LOCKED_ACCOUNT":"Locked account(s)",
"TRANSACTION_DIFF_DATES" : "Transactions with different dates",
"UNBALANCED_TRANSACTIONS":"Unbalanced Transaction(s)",
"MISSING_ACCOUNTS":"Accounts omitted",
"MISSING_DATES":"Missing Dates",
"DEB_CRED_NOT_NULL" : "Debit and Credit should not be Zero",
"CREDITED_DEBITED" : "On the same transaction line an account can not be debited and credited at the same time",
"MISSING_DOCUMENT_ID":"Records without document ID",
"MISSING_ENTITY":"Record without entity ID",
"MISSING_FISCAL_OR_PERIOD":"Fiscal year or period omitted",
"MULTIPLE_CANCELLING":"Multiple Cancelling. This transaction has been already cancelled",
"SINGLE_LINE_TRANSACTION":"Transaction with a single line",
"EDIT_INVALID_ACCOUNT":"Transaction contains invalid account(s)",
"EDIT_INVALID_ENTITY":"Transaction contains an invalid entity",
"EDIT_INVALID_REFERENCE":"Transaction contains an invlid reference"},
"WARNINGS":{"MISSING_ENTITY":"Record without entity type and entity ID",
"NO_TRANSACTIONS_SELECTED":"No transactions selected. You must be in Transaction view to use this tool."},
"ERROR_REPORT":{"TITLE":"Error Report"},
"TRIAL_BALANCE":{"TITLE":"Trial Balance",
"MAIN":"Main",
"DETAIL":"Detail",
"ERROR_LIST":"Error List"},
"TITLE":"Posting Journal",
"EDIT_MODE":"Edit Mode"}}
{
"POSTING_JOURNAL": {
"ADD_ROW" : "Add Row",
"REMOVE_ROW" : "Remove Row(s)",
"ROWS" : "Row(s)",
"EDITING" : "Editing",
"NO_TRANSACTION_TYPE" : "No assigned transaction type",
"JUSTIFICATION" : "Justification",
"REFRESH" : "Refresh",
"SAVE_TRANSACTION" : "Save Transaction",
"SAVE_TRANSACTION_SUCCESS" : "Transaction record was updated successfully.",
"TRANSACTION" : "Transaction",
"VIEWING" : "Viewing",
"OUTDATED_DATA_MESSAGE_1" : "The data displayed may have changed since it was loaded.",
"OUTDATED_DATA_MESSAGE_2" : "the latest data.",
"CLICK_HERE_TO_RELOAD" : "Click here to reload",
"CONFIGURATION": {
"TITLE" : "Columns configuration",
"COLUMNS" : "Columns"
},
"ERRORS": {
"DATE_IN_WRONG_PERIOD" : "Dates in wrong period",
"MISSING_DESCRIPTION" : "Descriptions omitted",
"NO_FISCAL_FOR_DATE" : "There is no fiscal year for this Date",
"CLOSED_FISCAL_YEAR" : "The fiscal year for this date has already been closed",
"VARIOUS_TRANSACTION_TYPE" : "Various transaction type for a transaction",
"LOCKED_ACCOUNT" : "An accountant has locked one or more accounts used in a transaction. To correct this error, update the transaction or unlock the periods.",
"TRANSACTION_DIFF_DATES" : "A transaction must have identical dates, yet some transaction contains different dates. Correct this by updating the dates of the affected transactions.",
"UNBALANCED_TRANSACTIONS" : "Unbalanced Transaction(s)",
"MISSING_TRANSACTIONS" : "No transactions have been submitted.",
"MISSING_ACCOUNTS" : "Accounts omitted",
"MISSING_DATES" : "Missing Dates",
"DEB_CRED_NOT_NULL" : "The debits and credits should not be zero",
"CREDITED_DEBITED" : "On the same transaction line an account can not be debited and credited at the same time",
"MISSING_DOCUMENT_ID" : "Records without document ID",
"MISSING_ENTITY" : "Record without entity ID",
"MISSING_FISCAL_OR_PERIOD" : "Fiscal year or period omitted",
"MULTIPLE_CANCELLING" : "Multiple Cancelling. This transaction has been already cancelled",
"SINGLE_LINE_TRANSACTION" : "A transaction must have two or more lines. To correct this, locate the transaction and add the balancing line.",
"EDIT_INVALID_ACCOUNT" : "Transaction contains invalid account(s)",
"EDIT_INVALID_ENTITY" : "Transaction contains an invalid entity",
"EDIT_INVALID_REFERENCE" : "Transaction contains an invalid reference",
"TRANSACTION_ALREADY_POSTED" : "Transaction has already been posted and cannot be edited",
"USER_CANNOT_EDIT_POSTED_TRANSACTION" : "User cannot edit this transaction as it has already been posted",
"TRANSACTION_MUST_CONTAIN_ROWS" : "Existing transactions must contain rows"
},
"WARNINGS": {
"MISSING_ENTITY" : "Record without entity type and entity ID",
"NO_TRANSACTIONS_SELECTED" : "No transactions selected. You must be in Transaction view to use this tool.",
"MULTIPLE_TRANSACTION_EDIT_DISABLED" : "You have multiple transactions selected. Multiple transaction editing is currently disabled.",
"TRIAL_BALANCE_HAS_POSTED_RECORDS" : "You have selected posted records! The Trial Balance can only show results of unposted records."
},
"TRIAL_BALANCE" : {
"TITLE" : "Trial Balance",
"OVERVIEW" : "Overview",
"HAS_ERRORS" : "Attention! {{ numErrors }} Errors Detected.",
"EXPORT" : "Export the Trial Balance",
"SHOW_ERRORS" : "Switch to Error View",
"RETURN_TO_OVERVIEW" : "Return to Summary View",
"IS_BALANCED" : "Balanced",
"POSTED_TRANSACTIONS" : "Success! Posted {{ numRecords }} Transactions to the General Ledger."
},
"TITLE" : "Journal"
}
}
4 changes: 2 additions & 2 deletions client/src/i18n/en/report.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"TITLE":"Cash Flow Physical Report",
"DESCRIPTION":"This report shows changes in the accounts and revenues of the balance sheet on cash",
"SHOW_WEEKLY_REPORT_HELP":"Enabling this option will allow to view the cash flow report per week"
},
},
"CASH_INCOME":"Incomes",
"CHART_OF_ACCOUNTS": "Chart of Accounts",
"CLIENTS_REPORT": {
Expand All @@ -54,7 +54,7 @@
"SHOW_DETAILED_VIEW" : "Include Columns for Last Dates of Invoicing and Payment",
"SHOW_DETAILED_VIEW_HELP" : "Enabling this option will include the last date the debtor paid and the last date they were invoiced. This is useful for understanding when they were at the institution. However, it will make the query take slightly longer.",
"SHOW_UNVERIFIED_TRANSACTIONS" : "Include Unverified Transactions",
"SHOW_UNVERIFIED_TRANSACTIONS_HELP" : "Enabling this option includes records from the Posting Journal which have not been audited by the accountant as well as records from the General Ledger the accountant has verified. This view must be treated as a projection until the accountant has approved the Posting Journal transactions and moved them to the General Ledger."
"SHOW_UNVERIFIED_TRANSACTIONS_HELP" : "Enabling this option includes records from the Journal which have not been audited by the accountant as well as records from the General Ledger the accountant has verified. This view must be treated as a projection until the accountant has approved the Journal transactions and moved them to the General Ledger."
},
"OPENING_BALANCE": "Opening Balance",
"ORDER": {
Expand Down
15 changes: 11 additions & 4 deletions client/src/i18n/en/transactions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{"TRANSACTIONS":{"SINGLE_ACCOUNT_TRANSACTION":"This transaction only concerns a single account. Please select multiple accounts to complete the transaction.",
"MISSING_TRANSACTION_TYPE":"Transactions involving cash accounts (banks or cashboxes) must have a transaction type specified to differentiate them in the cashflow report. Please select a transaction type.",
"IMBALANCED_TRANSACTION":"This transaction's debits and credits must balance. Please correct the imbalances before submitting.",
"SINGLE_ROW_TRANSACTION":"This transaction only has a single row, but two rows are required. Please add one or more lines."}}
{
"TRANSACTIONS":{
"VERIFIED_TRANSACTIONS": "Verified Transactions",
"INCLUDE_POSTED_TRANSACTIONS_DETAIL": "Include posted transactions in search",
"INCLUDE_POSTED_TRANSACTIONS_SHORT": "Posted Transactions",
"SINGLE_ACCOUNT_TRANSACTION":"This transaction only concerns a single account. Please select multiple accounts to complete the transaction.",
"MISSING_TRANSACTION_TYPE":"Transactions involving cash accounts (banks or cashboxes) must have a transaction type specified to differentiate them in the cashflow report. Please select a transaction type.",
"IMBALANCED_TRANSACTION":"This transaction's debits and credits must balance. Please correct the imbalances before submitting.",
"SINGLE_ROW_TRANSACTION":"This transaction only has a single row, but two rows are required. Please add one or more lines."
}
}
3 changes: 1 addition & 2 deletions client/src/i18n/en/tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@
"PATIENT_REGISTRATIONS":"Patient Registrations",
"PATIENT_REGISTRY":"Patients Registry",
"PHARMACY":"Pharmacy Management",
"POSTED_JOURNAL":"Posted Journal",
"POSTING_JOURNAL":"Posting Journal",
"POSTING_JOURNAL":"Journal",
"PRICE_LIST":"Price List",
"PROJECT":"Projects",
"PURCHASE_ORDER":"Purchase Order",
Expand Down
16 changes: 11 additions & 5 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"UPDATE": "Mettre à jour",
"VALIDATE": "Valider",
"VIEW_ERRORS": "Voir Erreurs",
"VIEW_DETAILS": "Détails"
"VIEW_DETAILS": "Détails",
"VIEW_IN_JOURNAL": "Voir dans le Journal"
},
"DIALOGS": {
"CONFIRM_ACTION": "Confirmez vous cette action ?",
Expand Down Expand Up @@ -131,6 +132,7 @@
"NO_SUPPLIER": "Un ordre d'achat doit avoir un fournisseur avant de préciser les éléments.",
"NUM_TRANSACTION": "Nombres des transactions",
"OPERATION_SUCCESS": "Opération effectuée avec succès",
"OF": "de",
"OTHER_ACTIONS": "Autres actions",
"PATIENTS": "Patients",
"PATIENT_FOUND": "Patient Trouvé",
Expand All @@ -146,16 +148,20 @@
"SHOWING": "Aperçue",
"TRANSACTION_REVER_SUCCESS": "Cette transaction a été Annulée avec succès",
"UNAUTHORIZED": "Non autorisée",
"UNPOSTED_TRANSACTION": "Transactions non postées",
"UPDATE_SUCCESS": "Mise à jour avec succès",
"UPLOAD_PICTURE_FAILED": "Le fichier selectionné n'est pas une image",
"VIEW_BEGINNING_BALANCE": "Aperçue de la balance d'ouverture",
"VIEW_CLOSING_BALANCE": "Aperçue de la balance de cloture"
"VIEW_CLOSING_BALANCE": "Aperçue de la balance de cloture",
"UNPOSTED_TRANSACTION": "Transactions non-posté ne sont pas affichées",
"TRANSACTIONS": "Transactions",
"ROWS": "enregistrements"
},
"LABELS": {
"ABBREVIATION": "Abbreviation",
"ACCOUNT": "Compte",
"ACCOUNT_EXTRACT": "Extrait de compte",
"NON_POSTED_TRANSACTIONS": "Transactions non-posté",
"POSTED_TRANSACTIONS": "Transactions posté",
"ACCOUNT_NUMBER": "Numéro de Compte",
"ACCOUNT_TITLE": "Libelle de Compte",
"ACCOUNT_TYPE": "Type de Compte",
Expand Down Expand Up @@ -287,7 +293,7 @@
"ROWS_ALL": "Tous les enregistrements",
"ROWS_VISIBLE": "Les enregistrements visibles",
"ROWS_SELECTED": "Les enregistrements selectionnés",
"FINANCIAL_DETAIL": "Balance actuelle, journal de saisie inclue :",
"FINANCIAL_DETAIL": "Balance actuelle, journal inclue :",
"FINANCIAL_STATUS": "Situation Financière",
"FIRST_NAME": "Prenom",
"FISCAL_YEAR": "Annee Fiscale",
Expand Down Expand Up @@ -388,7 +394,7 @@
"PHONE_NO": "Numéro de Téléphone",
"POSITION": "Position",
"POST_OFFICE_BOX": "Boîte Postale",
"POSTING_JOURNAL": "Journal de saisie",
"POSTING_JOURNAL": "Journal",
"PO_BOX": "BP",
"PREFIX": "Prefix",
"PREVIOUS_DATE": "Date precedente",
Expand Down
Loading

0 comments on commit afc9ee2

Please sign in to comment.