Commit Graph

  • 9a704c8185 Revised the JavaScript account reorder code to avoid nested template literals, for readability. imacat 2023-04-03 21:20:24 +08:00
  • 8286c0c6d8 Revised the JavaScript MonthTab class in the period chooser to avoid nested template literals, for readability. imacat 2023-04-03 21:19:48 +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. imacat 2023-04-03 19:36:26 +08:00
  • 9263ae0274 Changed the "account" property to private as "__account" in the DescriptionAccount class. imacat 2023-04-03 19:13:16 +08:00
  • 78a9d7794c Revised the JavaScript OriginalLineItem class to store the form instead of the selector. The selector is only used in the constructor. imacat 2023-04-03 14:57:51 +08:00
  • f3ae37a409 Removed the "#selector" attribute from the JavaScript RecurringAccount class. It is only used in the constructor. There is no need to hold a reference to it. imacat 2023-04-03 14:52:22 +08:00
  • ddc1081252 Removed the "#selector" attribute from the JavaScript BaseAccountOption class. It is only used in the constructor. There is no need to hold a reference to it. imacat 2023-04-03 14:48:22 +08:00
  • 202d51a032 Removed the "#selector" attribute from the JavaScript JournalEntryAccountOption class. It is only used in the constructor. There is no need to hold a reference to it. imacat 2023-04-03 14:44:43 +08:00
  • 562bc47be7 Revised the saveDescription method of the JournalEntryLineItemEditor editor to also save the isAccountConfirmed status of the DescriptionEditor editor, so that when the user selected any suggested account other than the confirmed account, the confirmed account is released from the next edit. imacat 2023-04-03 10:47:34 +08:00
  • f3d43a66cc Fixed the operator in the selectAccount method of the JavaScript DescriptionEditor editor. imacat 2023-04-03 10:44:22 +08:00
  • c3fc6d9a87 Revised the onOpen method of the JavaScript DescriptionEditor editor, to clear the tab planes after the confirmed account is set, so that it works in an environment where the confirmed account is already set. imacat 2023-04-03 10:37:15 +08:00
  • e1a0380628 Revised the saveDescription method of the JavaScript JournalEntryLineItemEditor to accept the description editor instead of the separated description and account values. imacat 2023-04-03 10:25:47 +08:00
  • f2a2fcdd32 Revised the "#onDescriptionChange" method to also reset the selected account in the JavaScript DescriptionEditor editor. imacat 2023-04-03 10:21:50 +08:00
  • ab29166f1e Renamed the "#reset" method to "#resetTabPlanes" in the JavaScript DescriptionEditor, to be clear. imacat 2023-04-03 10:18:47 +08:00
  • 8033921181 Revised the JavaScript DescriptionEditor class so that the #reset() method is triggered by the #onDescriptionChange event, but not the onOpen event, so that user-edited description updates also clear the tab planes. imacat 2023-04-03 10:06:19 +08:00
  • 08732c1e66 Renamed the description attribute to #descriptionInput, and added the description getter and setter to the JavaScript DescriptionEditor editor, to hide the actual implementation of the description input. imacat 2023-04-03 09:48:15 +08:00
  • 4adc464d3d Merged the saveDescriptionWithAccount into the saveDescription method in the JavaScript JournalEntryLineItemEditor class. imacat 2023-04-03 09:32:08 +08:00
  • 2f9d2e36cb Revised the parameters of the saveDescriptionWithAccount method of the JavaScript JournalEntryLineItemEditor class to accept an DescriptionEditorAccount instance instead of the individual account values. imacat 2023-04-03 09:27:34 +08:00
  • 5bb10bf6ba Added the JavaScript DescriptionEditorAccount, DescriptionEditorSuggestedAccount, and DescriptionEditorConfirmedAccount classes, and revised the DescriptionEditor editor to work with these class instances instead of the HTML elements, for simplicity and readability. imacat 2023-04-03 09:18:10 +08:00
  • 06e7b6ddff Added the missing "is_need_offset" property to the DescriptionAccount class. imacat 2023-04-02 22:41:16 +08:00
  • 20e1982984 Renamed the "accounting-is-need-offset" class to "accounting-account-is-need-offset" in the line item sub-form of the journal entry form, for consistency. imacat 2023-04-02 22:29:27 +08:00
  • a70720be50 Renamed the #selectedAccount attribute to #selectedAccountButton, and the filterSuggestedAccounts, #selectSuggestedAccount, clearSuggestedAccounts, #initializeSuggestedAccounts, #selectAccount, #setConfirmedAccount, and #setSuggestedAccounts methods to filterSuggestedAccountButtons, #selectSuggestedAccountButton, clearSuggestedAccountButtons, #initializeSuggestedAccountButtons, #selectAccountButton, #setConfirmedAccountButton, and #setSuggestedAccountButtons, respectively, in the JavaScript DescriptionEditor class. imacat 2023-04-02 22:16:29 +08:00
  • cb6de08152 Moved the JournalEntryAccount class from journal-entry-line-item-editor.js to journal-entry-form.js. imacat 2023-04-01 22:42:34 +08:00
  • 211821b4d7 Added the "confirmed account" to the description editor so that it does not override the user's selected account when the user specifically selected it or already confirmed it. imacat 2023-04-01 18:05:48 +08:00
  • 0faca49540 Revised the save method of the JavaScript LineItemSubForm class to update whether it needs offsetting, too. imacat 2023-04-01 00:34:29 +08:00
  • 14e79df571 Revised the line item sub-form to store the information whether it needs offsetting as a class instead of a dataset attribute, and store it in the account code input instead of the whole element, for simplicity and readability. imacat 2023-04-01 00:29:04 +08:00
  • 04fbb725d2 Revised the logic to save the account in the save method of the LineItemSubForm class, since when saving from the line item editor, the account is never null. imacat 2023-04-01 00:19:32 +08:00
  • a1d6844e52 Replaced the accountCode and accountText getters with the account getter in the JavaScript LineItemSubForm class. imacat 2023-04-01 00:14:47 +08:00
  • 94391b02a6 Added the copy() method to the JavaScript JournalEntryAccount class, and replaced the accountCode and accountText fields with the account field in the OriginalLineItem class. imacat 2023-03-31 23:54:56 +08:00
  • 1cb8a7563e Added the JavaScript JournalEntryAccount class, and added the account field to the JournalEntryLineItemEditor class to replace the accountCode, accountText, and isNeedOffset fields. imacat 2023-03-31 23:33:38 +08:00
  • 63f0f28948 Prefix the classes in the JavaScript description editor with the "DescriptionEditor". imacat 2023-03-27 07:22:36 +08:00
  • 3431922f12 Removed an unused import from the "accounting.models" module. imacat 2023-03-26 01:06:19 +08:00
  • d5a9e1af18 Removed an unnecessary "start" variable in the constructor of the JavaScript MonthTab class. imacat 2023-03-25 08:02:52 +08:00
  • 73f5d63f44 Replaced string concatenations with ES6 template literals. imacat 2023-03-25 07:39:18 +08:00
  • bf2c7bb785 Advanced to version 0.9.1. v0.9.1 imacat 2023-03-24 09:16:54 +08:00
  • 93ba086548 Simplified the code in the query_values pseudo property of the JournalEntryLineItem data model. imacat 2023-03-24 09:15:29 +08:00
  • 5c4f6017b8 Removed the redundant partial time in the query_values pseudo property of the JournalEntryLineItem data model. They are redundant since it is always partial match now. imacat 2023-03-24 09:13:26 +08:00
  • cb16b2f0ff Updated the translation of the test site. imacat 2023-03-24 08:34:14 +08:00
  • d2f11e8779 Replaced the "editor" and "editor2" accounts in the test site with "admin" and "editor", to be clear. imacat 2023-03-24 08:32:28 +08:00
  • 4ccaf01b3c Revised the template of the option detail to be visually different from the option edit form, to avoid confusion. imacat 2023-03-24 08:24:47 +08:00
  • 7c512b1c15 Revised the JavaScript DebitCreditSubForm to have a better visual effect when the line item editor is opened and closed with no line items. imacat 2023-03-24 07:58:32 +08:00
  • dc432da398 Revised the coding style in the constructor of the JavaScript JournalEntryLineItemEditor class. imacat 2023-03-24 07:49:58 +08:00
  • c8504bcbf5 Revised the #isQueryMatched method to match the current net balance instead of the net balance but the current form in the JavaScript OriginalLineItem class. imacat 2023-03-24 07:47:41 +08:00
  • c865141583 Revised the #isQueryMatched method to always does partial match in the JavaScript OriginalLineItem class. Removed the full match from the query values. It is really wierd to type in the half with no match until you type the full term. It may create misunderstanding that there is no further match if you keep typing. imacat 2023-03-24 07:38:17 +08:00
  • 8c1ecd6eac Renamed the #isDebitCreditMatches and #isQueryMatches methods in the JavaScript OriginalLineItem class to #isDebitCreditMatched and #isQueryMatched, respectively. imacat 2023-03-24 07:32:23 +08:00
  • e8e4100677 Revised the documentation of the JavaScript #isQueryMatches method of the OriginalLineItem class. imacat 2023-03-24 07:31:13 +08:00
  • 6a8773c531 Revised the code in the constructor of the JavaScript OriginalLineItemSelector class. imacat 2023-03-24 07:30:09 +08:00
  • 30e0c7682c Renamed the JavaScript AccountSelector class to JournalEntryAccountSelector, to avoid confusion. There is a RecurringAccountSelector in the option form now. imacat 2023-03-24 07:27:01 +08:00
  • eb5a7bef7e Added the JavaScript AccountOption class to object-ize the account options in the journal entry form. imacat 2023-03-24 07:23:56 +08:00
  • 8a174d8847 Renamed the setBaseAccount method to saveBaseAccount in the JavaScript AccountForm form, for consistency. imacat 2023-03-24 07:20:40 +08:00
  • 7459afd63a Renamed the hasAnyMatched variable to isAnyMatched in the JavaScript #filterOptions method of the BaseAccountSelector, RecurringAccountSelector, and OriginalLineItemSelector classes. imacat 2023-03-24 06:52:14 +08:00
  • a9afc385e9 Added the "baseCode" getter to the JavaScript AccountForm form, and removed the "baseCode" parameter from the onOpen method of the BaseAccountSelector class. It can retrieve the base code directly from the parent account form now. imacat 2023-03-24 06:46:22 +08:00
  • a8be739ec7 Fixed the documentation of the JavaScript BaseAccountOption class. imacat 2023-03-24 06:35:44 +08:00
  • 0130bc58a9 Added prefix to the constructor of the BaseAccountSelector class, to simplify the code. imacat 2023-03-24 00:37:59 +08:00
  • 821059fa80 Added the JavaScript BaseAccountOption class to object-ize the base account options in the account form. imacat 2023-03-24 00:35:50 +08:00
  • 5b4f57d0b3 Removed a debugging log from the onOpen method of the RecurringAccountSelector class. imacat 2023-03-24 00:27:37 +08:00
  • 4bfac2d545 Removed an unused "noinspection JSValidateTypes" comment from the constructor of the JavaScript DebitCreditSubForm class. imacat 2023-03-24 00:21:33 +08:00
  • f105f0cf7b Removed an orphan comment from the JavaScript RecurringTransactionTab class. imacat 2023-03-24 00:19:53 +08:00
  • 5e320729d7 Removed an excess blank line in testlib.py. imacat 2023-03-23 17:30:38 +08:00
  • 7515032082 Moved the Accounts shortcut from testlib_journal_entry.py to testlib.py. imacat 2023-03-23 17:26:27 +08:00
  • 361b18e411 Moved the duplicated NEXT_URI constant from test_account.py and testlib_journal_entry.py to testlib.py. imacat 2023-03-23 17:22:57 +08:00
  • 7d084e570e Revised the debit-credit content to have a better look when it is still empty. imacat 2023-03-23 09:13:52 +08:00
  • cb397910f8 Added the "resetNo" method to the RecurringItemSubForm, CurrencySubForm, and LineItemSubForm forms to provide a simpler way to reset the order number, and removed the "elementId" getter and "no" setter. imacat 2023-03-23 08:55:16 +08:00
  • 5f8b0dec98 Renamed the JavaScript "lineItemIndex" property to "index" in the LineItemSubForm form. imacat 2023-03-23 08:44:20 +08:00
  • 8398d1e8bb Fixed a type error in the constructor of the JavaScript LineItemSubForm form. imacat 2023-03-23 08:42:48 +08:00
  • 562801692a Added the JavaScript setDeleteButtonShown method to the CurrencySubForm and LineItemSubForm forms, and hides the implementation of the delete buttons from outside. Changed the delete buttons to private. imacat 2023-03-23 08:40:19 +08:00
  • faee1e61c6 Added the JavaScript elementId getter and no setter to the RecurringItemSubForm, CurrencySubForm, and LineItemSubForm forms, to hide the actual implementation of the element ID and order number. imacat 2023-03-23 08:24:58 +08:00
  • 57a4177037 Replaced the JavaScript getXXX methods with the "get XXX" getters. imacat 2023-03-23 08:11:11 +08:00
  • fa1dedf207 Unified the documentation of the JavaScript prefix attribute. imacat 2023-03-23 07:08:40 +08:00
  • 7ed13dc0af Replaced the JavaScript prefix attributes that are only used in the class constructors with the prefix constant variables in the constructor. imacat 2023-03-23 07:06:58 +08:00
  • 52807c5322 Advanced to version 0.9.0. v0.9.0 imacat 2023-03-23 00:48:14 +08:00
  • 231a71feea Updated the Sphinx documentation. imacat 2023-03-23 00:47:04 +08:00
  • 4902eecae0 Updated the translation. imacat 2023-03-23 00:46:18 +08:00
  • 889e4c058e Revised the option form to have a better look when there is no recurring expense and income. imacat 2023-03-23 00:45:19 +08:00
  • 7262a6cb42 Removed an unused ID in the form-recurring-item.html template. imacat 2023-03-23 00:27:23 +08:00
  • c4ff4ecb3d Fixed the layout in the option detail when there is no recurring expenses or incomes. imacat 2023-03-23 00:24:57 +08:00
  • 2859f628ea Fixed the error finding the account in the default_ie_account_code_text pseudo property of the Options data model. imacat 2023-03-23 00:21:31 +08:00
  • e0355b2af1 Revised the error message of the CurrentAccountExists and AccountNotCurrent validators. imacat 2023-03-23 00:09:57 +08:00
  • b4d390c33a Renamed the isMatches method to isMatched in the JavaScript RecurringAccount class. imacat 2023-03-23 00:00:39 +08:00
  • a4ab8a761c Renamed the "content" dataset to "text" in the base account selector of the account form, for consistency. imacat 2023-03-22 23:56:37 +08:00
  • 907ce6d06e Renamed the "content" dataset to "text" in the account selector of the journal entry form, for consistency. imacat 2023-03-22 23:55:28 +08:00
  • 7e1388735e Added the OptionTestCase test case. imacat 2023-03-22 23:50:14 +08:00
  • 6f773dd837 Added the ACCOUNT_REQUIRED validator to the account_code field of the RecurringExpenseForm and RecurringIncomeForm forms. imacat 2023-03-22 23:25:20 +08:00
  • 87fa5aa6bc Moved the ACCOUNT_REQUIRED validator from the "accounting.journal_entry.forms.line_item" module to the "accounting.forms" module, in order to share it. imacat 2023-03-22 23:23:53 +08:00
  • 35e05b3708 Revised the IsDebitAccount and IsCreditAccount validators to require the error message, and moved their default error messages to the DebitLineItemForm and CreditLineItemForm forms. imacat 2023-03-22 23:19:52 +08:00
  • 7ccc96bda0 Added the CurrentAccountExists and AccountNotCurrent validators to the default_ie_account_code field of the OptionForm form, to validate that the current account exists and is a current account. imacat 2023-03-22 23:12:21 +08:00
  • 283758ebe9 Revised the shortcut accounts in testlib_journal_entry.py. imacat 2023-03-22 22:56:37 +08:00
  • b673c7aeaf Renamed the "default_currency" option to "default_currency_code". imacat 2023-03-22 22:34:13 +08:00
  • 0ad2ac53dd Added the "sql_condition" method to the CurrentAccount data model to simplify the queries. imacat 2023-03-22 21:43:58 +08:00
  • 7e90ec5a8f Replaced the "current_accounts" function with the "accounts" class method of the CurrentAccount data model. imacat 2023-03-22 21:39:18 +08:00
  • 7755365467 Revised the documentation of the CurrentAccount data model. imacat 2023-03-22 21:36:07 +08:00
  • 979eea606a Added the missing documentation to the account property of the CurrentAccount data model. imacat 2023-03-22 20:40:43 +08:00
  • 5a9e08f2c4 Moved the AccountExists, IsDebitAccount, and IsCreditAccount validators from the "accounting.journal_entry.forms.line_item" module to the "accounting.forms" module, to share it with the "accounting.option.forms" module. Removed the redundant AccountExists, IsExpenseAccount, and IsIncomeAccount validators from the "accounting.option.forms" module. imacat 2023-03-22 20:37:53 +08:00
  • 68c810d492 Renamed the debit and credit methods in the Account data model to selectable_debit and selectable_credit, to be clear. imacat 2023-03-22 20:21:52 +08:00
  • 5f88260507 Revised the elements in the option detail page for better layout. imacat 2023-03-22 20:16:08 +08:00
  • 779d89f8c4 Replaced the "clear" method with the "onOpen" method when the account is clicked in the RecurringItemEditor in the JavaScript RecurringAccountSelector class. imacat 2023-03-22 20:09:41 +08:00
  • 5d4bf4361b Revised the error messages of the NotStartPayableFromExpense and NotStartReceivableFromIncome validators. imacat 2023-03-22 20:00:17 +08:00
  • 10170d613d Fixed the debit and credit methods of the Account data model, removing the payable accounts that need offset from the debit accounts, and the receivable accounts that need offset from the credit accounts. They should not be selectable. imacat 2023-03-22 19:54:27 +08:00
  • c885c08c37 Moved the "accounting.option.options" module to "accounting.utils.options", because it is meant to shared by other submodules. imacat 2023-03-22 19:47:24 +08:00
  • e2a4340f2a Revised the imports in the "accounting.option.views" module. imacat 2023-03-22 19:43:10 +08:00