Moved the JournalEntryAccount class from journal-entry-line-item-editor.js to journal-entry-form.js.
This commit is contained in:
parent
211821b4d7
commit
cb6de08152
@ -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.
|
||||
*
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user