Commit Graph

  • ed18b81ad8 Moved the code to compose the period specification from the Period utility to the PeriodSpecification utility, to simplify the code. imacat 2023-03-08 19:18:43 +08:00
  • b46cec6fab Updated the translation. imacat 2023-03-08 19:11:46 +08:00
  • 6c122666a0 Revised to simplify the PeriodDescription utility. imacat 2023-03-08 19:09:12 +08:00
  • 7ddc9ececf Added the __format_day method to the PeriodDescription utility to simplify the code. imacat 2023-03-08 19:00:59 +08:00
  • 4eebbd9692 Moved the code to compose the period description from the Period utility to the PeriodDescription utility, to simplify the code. imacat 2023-03-08 18:58:24 +08:00
  • 338b49c965 Added the __get_since_desc and __get_until_desc methods to simplify the __get_desc method in the Period utility. imacat 2023-03-08 18:50:54 +08:00
  • f438f97571 Revised the styles of the f-strings in the Period utility. imacat 2023-03-08 18:37:11 +08:00
  • 9b273115a0 Removed the empty _set_properties method override from the YearPeriod period. imacat 2023-03-08 18:35:27 +08:00
  • 58d1add810 Added type hints to the CASH_CODE, ACCUMULATED_CHANGE_CODE, and NET_CHANGE_CODE constants. imacat 2023-03-08 18:32:27 +08:00
  • c189615ca4 Renamed the CASH, ACCUMULATED_CHANGE, and NET_CHANGE constants to CASH_CODE, ACCUMULATED_CHANGE_CODE, and NET_CHANGE_CODE, respectively, to avoid confusion. imacat 2023-03-08 18:31:35 +08:00
  • 5687852dfb Added the _get_currency_options method to the BasePageParams class, and applied it to the currency_options pseudo property of the PageParams classes of the ledger, income and expenses log, trial balance, income statement, and balance sheet reports. imacat 2023-03-08 18:23:49 +08:00
  • d74c62dbb7 Removed excess property documentation from the Journal and Search classes. imacat 2023-03-08 18:07:16 +08:00
  • 987e98ebc0 Moved the code to collect the report entries to the EntryCollector class in the Search report. imacat 2023-03-08 18:06:14 +08:00
  • 7083f22577 Revised the documentation in the page parameters and the report in the ledger and income and expenses log. imacat 2023-03-08 18:01:07 +08:00
  • 7b10eb68bc Revised the documentation of the EntryCollector class in the ledger and income and expenses log. imacat 2023-03-08 17:59:56 +08:00
  • f277010991 Renamed the TrialBalanceTotal class to Total, to be short and clear. imacat 2023-03-08 17:56:57 +08:00
  • 729a7fd107 Renamed the TrialBalanceAccount, IncomeStatementAccount, and BalanceSheetAccount classes to ReportAccount, to be short and clear. imacat 2023-03-08 17:55:34 +08:00
  • c8230c949d Renamed the Entry class to ReportEntry in the journal, ledger, income and expenses log, and search result, to be clear without confusion. imacat 2023-03-08 17:52:29 +08:00
  • 3c98960efe Replaced the Entry CSVRow, and populate_entries in the "accounting.report.reports.search" module with those in the journal module, because their contents are identical. imacat 2023-03-08 17:49:54 +08:00
  • c5d0d91a7d Renamed the _populate_entries functions to populate_entries in journal, ledger, income and expenses log, and search result, changing them from protected to public so that they can be reused. imacat 2023-03-08 17:47:30 +08:00
  • fb06e9db44 Shortened the names of the BalanceSheetSubsection and BalanceSheetSubsection classes to Section and Subsection, respectively. imacat 2023-03-08 17:41:07 +08:00
  • d47e2e231b Shortened the names of the IncomeStatementSection, IncomeStatementSubsection, and IncomeStatementAccumulatedTotal classes to Section, Subsection, and AccumulatedTotal, respectively. imacat 2023-03-08 17:40:08 +08:00
  • cb89f34455 Renamed the "PageParams" class to "BasePageParams", and renamed its module from "accounting.report.reports.utils.page_params" to "accounting.report.reports.utils.base_page_params". Renamed all its subclasses to PageParams, to shorten their names and make code more readable. imacat 2023-03-08 17:27:19 +08:00
  • 11ab4a4ba6 Revised the documentation of the CSV rows for the reports. imacat 2023-03-08 17:21:14 +08:00
  • 5dc8387ad9 Fixed the incorrect account in the __add_current_period method of the AccountCollector class in the "accounting.report.reports.balance_sheet" module. imacat 2023-03-08 14:48:51 +08:00
  • 26b70bb625 Fixed the logic for all-time in the period_spec function in the "accounting.report.reports.utils.csv_export" module. imacat 2023-03-08 14:44:18 +08:00
  • f30a96d7e9 Simplified the logic in the period_spec method in the "accounting.report.reports.utils.csv_export" module. imacat 2023-03-08 14:42:39 +08:00
  • a1627b7fbf Revised to use a simpler way to run the class methods in the __get_desc method of the Period utility, to prevent confusion with SonarQube. imacat 2023-03-08 14:31:36 +08:00
  • 7c3b8c8f44 Revised to store the newly-constructed period chooser and month chooser in variables to prevent SonarQube from complaining. imacat 2023-03-08 14:22:29 +08:00
  • b19f4fa939 Added "use strict"; to all the JavaScript files. imacat 2023-03-08 14:08:40 +08:00
  • 41c3e06ce4 Removed the period chooser JavaScript from the search result page. imacat 2023-03-08 14:05:50 +08:00
  • 8a3df7a689 Revised the search report to match the amount when the query keyword is a number, instead of matching the amount as a text string. For example, "0150.00" matches 150, while "50" does not match 150. imacat 2023-03-08 13:59:00 +08:00
  • 196a115c99 Revised the coding style in the __get_transaction_condition method of the Search report. imacat 2023-03-08 13:46:11 +08:00
  • 005f9083aa Revised the constructor of the IncomeExpensesAccount pseudo account. imacat 2023-03-08 12:16:49 +08:00
  • 12dbae56c4 Revised the f-strings in the "accounting.models" module. imacat 2023-03-08 12:13:59 +08:00
  • a98723c57b Removed an unused import from the "accounting.utils.pagination" module. imacat 2023-03-08 12:09:09 +08:00
  • d5bd3b8383 Fixed an HTML error in the template of the trial balance. imacat 2023-03-08 12:08:13 +08:00
  • 617dd29f23 Added the period_spec function to be used to compose the download file name, to replace the spec property of the Period utility. imacat 2023-03-08 11:55:52 +08:00
  • b0a4a735f3 Added the is_a_month property to the Period utility. imacat 2023-03-08 11:37:05 +08:00
  • 41770e38b8 Updated the translation. imacat 2023-03-08 11:32:21 +08:00
  • d8a6614543 Fixed the text for the account used in the titles of the ledger and the income and expenses log. imacat 2023-03-08 11:32:07 +08:00
  • 8d76b5130e Fixed the localization function used in the titles of the reports. imacat 2023-03-08 11:30:19 +08:00
  • 43fc4b9b8d Renamed "total revenue" to "total operating revenue". imacat 2023-03-08 11:19:41 +08:00
  • 3ed8d7f1d2 Removed the now-unused table-row-link.js. It is replaced by the grid display. imacat 2023-03-08 11:10:21 +08:00
  • ea7c194d7e Revised the period-chooser.html template to simplify the code to include it. imacat 2023-03-08 11:09:11 +08:00
  • 041a905fc0 Added font-awesome icons to the report chooser. imacat 2023-03-08 11:03:52 +08:00
  • 10d1be8bd1 Added the action-buttons.html template and retired the report-chooser.html and currency-chooser.html templates, as the template for the common action buttons. imacat 2023-03-08 10:33:28 +08:00
  • 6e1d35eda4 Revised the report-chooser.html template to simplify the reports. imacat 2023-03-08 07:51:48 +08:00
  • 52b5151fe0 Added the currency-chooser.html template to simplify the templates of the report. imacat 2023-03-08 07:49:34 +08:00
  • f9fc033de6 Removed the unused RECEIVABLE, PAYABLE, and BROUGHT_FORWARD constants and the unused receivable(), payable(), brought_forward(), and net_change() shortcut methods from the Account data model. imacat 2023-03-08 07:43:03 +08:00
  • 116d00a557 Replaced the hard-coded cash account codes with the ACCUMULATED_CHANGE and NET_CHANGE constants and the accumulated_change() method of the Account data model. imacat 2023-03-08 07:41:19 +08:00
  • 329e3d5362 Replaced the hard-coded cash account codes with the CASH constant and the cash() method of the Account data model. imacat 2023-03-08 07:38:57 +08:00
  • 47e8944f06 Changed the constants of the common account codes in the Account data model from private to public. imacat 2023-03-08 07:37:50 +08:00
  • e7c43ae390 Revised the documentation to use the term "income and expenses log" instead of "income and expenses", for consistency. imacat 2023-03-08 07:34:33 +08:00
  • b8b51b34d3 Added the income-expenses-row-desktop.html and ledger-row-desktop.html templates to simplify templates of the income and expenses log and ledger. imacat 2023-03-08 07:30:28 +08:00
  • d083036719 Renamed the income-expenses-mobile-row.html and ledger-mobile-row.html templates to income-expenses-row-mobile.html and ledger-row-mobile.html, respectively. imacat 2023-03-08 07:24:33 +08:00
  • 7fe81c710b Added the balance-sheet-section.html template to simplify the template of balance sheet. imacat 2023-03-08 07:20:20 +08:00
  • 9993f65627 Added the search to the accounting data. imacat 2023-03-08 01:50:24 +08:00
  • fe01d5418d Fixed to limit the width of the search box in the currency list, base account list, account list, and transaction list. imacat 2023-03-08 01:38:08 +08:00
  • 2f7b9932a0 Added the base report class to ensure that the reports can both be shown on the page and downloaded as CSV. imacat 2023-03-08 00:41:34 +08:00
  • 1eed16b732 Added the pseudo account for the income and expenses log to query the income and expenses log of the current assets and liabilities. imacat 2023-03-08 00:27:40 +08:00
  • ede1160943 Fixed the ledger and the income and expenses log not to show the total entry when there is actually no data. imacat 2023-03-07 23:32:28 +08:00
  • 3814f0cb18 Added the missing accounting_format_amount filter to the total of the ledger. imacat 2023-03-07 23:25:00 +08:00
  • 24315b8203 Fixed the styles of the negative numbers in the reports with red and braced absolute values. imacat 2023-03-07 23:21:18 +08:00
  • 3c200d0dc6 Fixed the sign of the amount in income statement. imacat 2023-03-07 23:15:46 +08:00
  • 9f1e724875 Added the "accounting.report.reports.csv_export" module to handle the CSV export in one place. imacat 2023-03-07 22:45:29 +08:00
  • f838e7f893 Moved the utilities that are only for the report generators from the "accounting.report" module to the "accounting.report.reports.utils" module. imacat 2023-03-07 22:33:16 +08:00
  • edb893ecd3 Replaced the report generators with a separated module for each report, to work with the diversity of the report formats without messing-up one another. imacat 2023-03-07 22:26:51 +08:00
  • 436a4c367f Added the balance sheet. imacat 2023-03-07 16:56:44 +08:00
  • 1813ce0cfa Removed the unused and empty __get_category method from the IncomeStatement report. imacat 2023-03-07 12:54:11 +08:00
  • 7683347997 Removed a non-existing parameter from the documentation of the constructor of the IncomeStatementParams class. imacat 2023-03-07 12:43:20 +08:00
  • 46ffc7a73d Changed the display style of the rows in the income statement from grid to flex, to simplify the layout. imacat 2023-03-07 12:39:29 +08:00
  • e0a807d625 Fixed the style of the indent and total line of the income statement. imacat 2023-03-07 12:35:56 +08:00
  • dffcf6d2ce Removed the unused is_account pseudo property in the IncomeStatementRow row. imacat 2023-03-07 12:26:27 +08:00
  • 84d239e4b1 Added the income statement. imacat 2023-03-07 09:56:10 +08:00
  • fcefc64117 Removed an excess closing </div> in the template of the trial balance. imacat 2023-03-07 09:23:11 +08:00
  • 81fbb380b4 Renamed the variable select_trial_balance to select_balances in the __query_balances method of the TrialBalance report. imacat 2023-03-07 08:27:52 +08:00
  • d7ac8a3dcf Fixed the documentation of the TrialBalanceRow class. imacat 2023-03-07 07:36:32 +08:00
  • bcd3418e2c Fixed the documentation in the constructor of the trail balance. imacat 2023-03-07 07:34:15 +08:00
  • ef9e5cb5b3 Split the report parameters from the report class so that it works better with both CSV export and HTML templates. imacat 2023-03-06 23:37:20 +08:00
  • e797cfeb8c Simplified the logic to test the total row in the ledger and income and expenses. imacat 2023-03-06 16:26:13 +08:00
  • 22bae7f766 Replaced the <ul></ul> list with CSS "display: grid" for the trial balance, to allow using <a></a> as the table row. imacat 2023-03-06 08:24:05 +08:00
  • aa669e9f53 Replaced tables with CSS "display: grid" for the journal, ledger, and income and expenses, to allow using <a></a> as the table row. imacat 2023-03-06 08:15:10 +08:00
  • 898a1af7b5 Revised the separation lines in the table headers and footers of the ledger tables. imacat 2023-03-06 07:00:53 +08:00
  • f762bcf48f Replaced the duplicated "accounting-transaction-card" and "accounting-report-card" CSS classes with the "accounting-sheet" class, for simplicity. imacat 2023-03-06 02:36:37 +08:00
  • 5d4effa360 Added the "debit" and "credit" properties to, and removed the "is_debit" property from the JournalRow row, to reduce the amount of logic in the template of the journal. imacat 2023-03-06 02:32:02 +08:00
  • dd05478bf3 Simplified the syntax to retrieve query arguments in the templates, and reduced the amount of logic in the templates. imacat 2023-03-06 02:25:25 +08:00
  • 9450915404 Added the "default" filter to reduce the amount of logic in the templates, which differs from the Jinja2 "default" filter in that it looks for None instead of undefined values. imacat 2023-03-06 02:13:37 +08:00
  • 8d126e183f Changed the date field of the transaction forms to set the default value in the view, but not the form, so that the default value is not set when it did not receive a value. imacat 2023-03-06 01:58:32 +08:00
  • bfb08cf5fc Changed the format_amount_input filter to accept None, and return an empty string if the value is None. imacat 2023-03-06 01:35:04 +08:00
  • a7bcf4b5c1 Changed the format_amount template filter to return None when the value is None. imacat 2023-03-06 01:16:07 +08:00
  • cd49ca44b1 Fixed to avoid getting the income and expenses with accounts that are not current assets and liabilities when switching from the ledger. imacat 2023-03-06 00:29:29 +08:00
  • 734362396f Adding the missing currency when constructing the report chooser in the trial balance. imacat 2023-03-06 00:26:07 +08:00
  • 88147bea66 Revised the currency in the titles and options of the ledger, income and expenses, and trial balance. imacat 2023-03-06 00:24:20 +08:00
  • cca43c68a6 Added trial balance. imacat 2023-03-06 00:20:11 +08:00
  • 480e2d2d8f Simplified the invocation of the super class constructor in the subclasses of Period. imacat 2023-03-05 23:02:26 +08:00
  • be100ce7ec Simplified the constructors of the period choosers. imacat 2023-03-05 22:58:08 +08:00
  • eca91d32ed Fixed the documentation of the IncomeExpensesPeriodChooser class. imacat 2023-03-05 22:56:32 +08:00
  • 1f95212494 Revised to use the title case in the CSV output of the journal and income and expenses. imacat 2023-03-05 22:46:23 +08:00
  • 0173104c84 Revised the currency field in the CSV output of the journal. imacat 2023-03-05 22:45:02 +08:00