Commit Graph

84 Commits

Author SHA1 Message Date
89948eeec2 Moved the "__as_next" utility from the test site to the "accounting.utils.next_uri" module, and applied it to the template of the unmatched offset list. 2023-05-23 09:00:51 +08:00
19a219466e Applied URLSafeSerializer to the next URI utilities to encode and decode the next URI to prevent tampering the next URI. 2023-05-23 08:35:44 +08:00
822c8fc49b Renamed the "__get_next_uri" function to "__get_next" in the "accounting.utils.next_uri" module. 2023-05-23 07:10:30 +08:00
b397515457 Removed the size restriction in the next URI utilities. Buffer overflow may happen with any parameter, not only the "next" parameter. It should be solved in uWSGI, but not the application. 2023-05-18 23:30:36 +08:00
482a0faa23 Added safeguard to the next URI utilities from invalid or insecure next URI. 2023-05-17 16:26:35 +08:00
0ecf7b6617 Revised the documentation of the "accounting.utils.cast" module. 2023-05-17 15:33:42 +08:00
433110f486 Revised the way to query accounts with Flask-SQLAlchemy style queries in the accounts method of the CurrentAccount data model. 2023-05-04 09:35:20 +08:00
0bc9947234 Revised the documentation of the new_id function. 2023-04-26 20:36:09 +08:00
8c58a9083a Added type hint subscription for the cls parameter of the new_id function. 2023-04-26 18:31:13 +08:00
f45663754c Fixed the documentation of the "accounting.utils.random_id" module. 2023-04-26 18:30:18 +08:00
cda9e4e3c6 Replaced importing the "typing" module as "t" with importing the individual names in the "typing" module. Since Python 3.9 introduced type hinting generics in standard collections, we do not have as many names to import now. This is also to be consistent with the practices of most major and standard packages and examples. 2023-04-26 18:22:45 +08:00
c11ae23885 Removed an unused import from the "accounting.utils.cast" module. 2023-04-26 13:15:18 +08:00
eed4c923f6 Removed the "be" cast function to cast data type for the binary expressions. It is to be replaced by the mapped type hints. 2023-04-23 13:21:48 +08:00
e2f854b5cc Changed the unmatched offsets from a module to a report, and to show both the unapplied original line items and the unmatched offsets instead of only the unmatched offsets, and added the accumulated balance, in order for ease of use. Removed the match information from the unapplied original line item report. Added the currency and period filters to both the unapplied original line item report and unmatched offset reports. 2023-04-18 01:12:04 +08:00
f8895e3bff Revised the documentation of the "__get_unmatched_offsets" method of the OffsetMatcher class. 2023-04-16 22:52:14 +08:00
84ad065782 Merged the "accounting.utils.unapplied" module into the "accounting.utils.offset_matcher" module as the "__get_unapplied" method of the OffsetMatcher class. It is only used in the offset matcher. 2023-04-16 22:51:46 +08:00
1218b224fc Renamed the "accounting.unmatched_offset.forms" module to "accounting.utils.offset_matcher". 2023-04-09 00:39:45 +08:00
052b62cdd4 Moved the __query_line_items method in the UnappliedOriginalLineItems report to the new "accounting.utils.unapplied" module, to share this query. 2023-04-08 18:12:56 +08:00
ac3b5523b1 Fixed the documentation of the default_currency and default_ie_account pseudo property in the Options class. 2023-04-08 18:12:55 +08:00
5af6fd9619 Moved the "accounting.journal_entry.utils.offset_alias" module to "accounting.utils.offset_alias". 2023-04-08 18:12:55 +08:00
71a20cba29 Replaced the "default_currency_text" pseudo property with the "default_currency" pseudo property in the Options class. 2023-04-08 18:12:54 +08:00
4a4cf1ea40 Removed the redundant "default_ie_account_code_text" pseudo property from the Options class. 2023-04-08 18:12:54 +08:00
4c2dcc5070 Renamed the project from "Mia! Accounting Flask" to "Mia! Accounting". 2023-04-04 18:26:54 +08:00
f7efacad75 Added the unauthorized method to the UserUtilityInterface interface, so that when the user has not logged in, the permission decorator can ask the user to log in instead of failing with HTTP 403 Forbidden. 2023-04-03 19:50:47 +08:00
2859f628ea Fixed the error finding the account in the default_ie_account_code_text pseudo property of the Options data model. 2023-03-23 00:21:31 +08:00
b673c7aeaf Renamed the "default_currency" option to "default_currency_code". 2023-03-22 22:34:13 +08:00
0ad2ac53dd Added the "sql_condition" method to the CurrentAccount data model to simplify the queries. 2023-03-22 21:43:58 +08:00
7e90ec5a8f Replaced the "current_accounts" function with the "accounts" class method of the CurrentAccount data model. 2023-03-22 21:39:18 +08:00
7755365467 Revised the documentation of the CurrentAccount data model. 2023-03-22 21:36:07 +08:00
979eea606a Added the missing documentation to the account property of the CurrentAccount data model. 2023-03-22 20:40:43 +08:00
c885c08c37 Moved the "accounting.option.options" module to "accounting.utils.options", because it is meant to shared by other submodules. 2023-03-22 19:47:37 +08:00
567004f7d9 Renamed IncomeExpensesAccount to CurrentAccount. 2023-03-22 15:42:44 +08:00
761d5a5824 Added the option management, and moved the configuration of the default currency, the default account for the income and expenses log, and the recurring expenses and incomes to the options. 2023-03-22 15:34:28 +08:00
656762850c Moved the IncomeExpensesAccount data model from the "accounting.report.utils.ie_account" module to the "accounting.utils.ie_account" module. 2023-03-22 07:29:41 +08:00
855356084e Fixed the documentation of the can_view and can_edit functions in the "accounting.utils.permission" module. 2023-03-22 04:50:12 +08:00
b1af1d7425 Renamed "voucher" to "journal entry". 2023-03-20 22:33:14 +08:00
5db13393cc Renamed "transaction" to "voucher", "cash expense transaction" to "cash disbursement voucher", and "cash income transaction" to "cash receipt voucher". 2023-03-19 13:56:46 +08:00
23a0721d8d Added assert in the be function in the "accounting.utils.cast" module, to insure the correctness of the expression received. 2023-03-15 23:23:01 +08:00
e9d8a8fcd8 Added the "accounting.utils.cast" module to cast the things to the expected type in order to supress the warnings from PyCharm. 2023-03-15 01:09:59 +08:00
8061a23fdc Renamed the AbstractUserUtils class to UserUtilityInterface, and added the can_view and can_edit functions to the UserUtilityInterface interface. There is no need to separately supply two additional can_view and can_edit callbacks. 2023-03-14 17:03:18 +08:00
cd8a480cd0 Revised the documentation of the AbstractUserUtils class. 2023-03-14 17:03:16 +08:00
a98723c57b Removed an unused import from the "accounting.utils.pagination" module. 2023-03-09 14:36:10 +08:00
6bed180790 Renamed the TransactionTypeEnum enum to TransactionType. 2023-03-04 19:39:13 +08:00
9833bac6e4 Added the TransactionTypeEnum in the new "accounting.utils.txn_types" module to remove the dependency from the "accounting.report" module to the "accounting.transaction" module. 2023-03-04 19:32:36 +08:00
05fde3a742 Added the transaction management. 2023-02-27 15:28:45 +08:00
a672a13789 Revised the strip_text filter to return None when the text is empty. 2023-02-26 08:00:58 +08:00
4cfe7c7c59 Added the flash_all_errors utility in the "accounting.utils.flash_errors" module to recursively flush all form errors in the sub-forms. 2023-02-25 12:27:55 +08:00
a73e3204b9 Renamed the "accounting.utils.next_url" module to "accounting.utils.next_uri". 2023-02-20 16:08:32 +08:00
330a71ebf2 Fixed the logic in the __set_next method in the "accounting.utils.next_url" module. 2023-02-20 08:17:31 +08:00
d99f592cff Merged the "accounting.database" module into the "accounting" module. It has only one member as "db", the database instance, and does not need to be separated into another file. 2023-02-08 11:13:09 +08:00