diff --git a/src/accounting/static/js/journal-entry-form.js b/src/accounting/static/js/journal-entry-form.js index f3544fd..b9cf1cb 100644 --- a/src/accounting/static/js/journal-entry-form.js +++ b/src/accounting/static/js/journal-entry-form.js @@ -784,6 +784,53 @@ class DebitCreditSubForm { } } +/** + * A journal entry account. + * + */ +class JournalEntryAccount { + + /** + * The account code + * @type {string} + */ + code; + + /** + * The account text + * @type {string} + */ + text; + + /** + * Whether the line items in the account needs offset + * @type {boolean} + */ + isNeedOffset; + + /** + * Constructs a journal entry account. + * + * @param code {string} the account code + * @param text {string} the account text + * @param isNeedOffset {boolean} true if the line items in the account needs offset, or false otherwise + */ + constructor(code, text, isNeedOffset) { + this.code = code; + this.text = text; + this.isNeedOffset = isNeedOffset; + } + + /** + * Returns a copy of the account. + * + * @return {JournalEntryAccount} the copy of the account + */ + copy() { + return new JournalEntryAccount(this.code, this.text, this.isNeedOffset); + } +} + /** * The line item sub-form. * diff --git a/src/accounting/static/js/journal-entry-line-item-editor.js b/src/accounting/static/js/journal-entry-line-item-editor.js index 441520d..3015054 100644 --- a/src/accounting/static/js/journal-entry-line-item-editor.js +++ b/src/accounting/static/js/journal-entry-line-item-editor.js @@ -583,49 +583,3 @@ class JournalEntryLineItemEditor { } } -/** - * A journal entry account. - * - */ -class JournalEntryAccount { - - /** - * The account code - * @type {string} - */ - code; - - /** - * The account text - * @type {string} - */ - text; - - /** - * Whether the line items in the account needs offset - * @type {boolean} - */ - isNeedOffset; - - /** - * Constructs a journal entry account. - * - * @param code {string} the account code - * @param text {string} the account text - * @param isNeedOffset {boolean} true if the line items in the account needs offset, or false otherwise - */ - constructor(code, text, isNeedOffset) { - this.code = code; - this.text = text; - this.isNeedOffset = isNeedOffset; - } - - /** - * Returns a copy of the account. - * - * @return {JournalEntryAccount} the copy of the account - */ - copy() { - return new JournalEntryAccount(this.code, this.text, this.isNeedOffset); - } -}