mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
refactoring: retrieve resources fields.
fix: issue in create a new custom view.
This commit is contained in:
@@ -121,7 +121,7 @@ export default class Account extends TenantModel {
|
||||
static get fields() {
|
||||
return {
|
||||
name: {
|
||||
label: 'Name',
|
||||
label: 'Account name',
|
||||
column: 'name',
|
||||
},
|
||||
type: {
|
||||
@@ -145,20 +145,25 @@ export default class Account extends TenantModel {
|
||||
relationColumn: 'account_types.root_type',
|
||||
},
|
||||
created_at: {
|
||||
label: 'Created at',
|
||||
column: 'created_at',
|
||||
columnType: 'date',
|
||||
},
|
||||
active: {
|
||||
label: 'Active',
|
||||
column: 'active',
|
||||
},
|
||||
balance: {
|
||||
label: 'Balance',
|
||||
column: 'amount',
|
||||
columnType: 'number'
|
||||
},
|
||||
currency: {
|
||||
label: 'Currency',
|
||||
column: 'currency_code',
|
||||
},
|
||||
normal: {
|
||||
label: 'Account normal',
|
||||
column: 'account_type_id',
|
||||
relation: 'account_types.id',
|
||||
relationColumn: 'account_types.normal'
|
||||
|
||||
@@ -4,7 +4,7 @@ import TenantModel from 'models/TenantModel';
|
||||
|
||||
export default class AccountType extends TenantModel {
|
||||
/**
|
||||
* Table name
|
||||
* Table name.
|
||||
*/
|
||||
static get tableName() {
|
||||
return 'account_types';
|
||||
@@ -30,4 +30,26 @@ export default class AccountType extends TenantModel {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Accounts types labels.
|
||||
*/
|
||||
static get labels() {
|
||||
return {
|
||||
fixed_asset: 'Fixed asset',
|
||||
current_asset: "Current asset",
|
||||
long_term_liability: "Long term liability",
|
||||
current_liability: "Current liability",
|
||||
equity: "Equity",
|
||||
expense: "Expense",
|
||||
income: "Income",
|
||||
accounts_receivable: "Accounts receivable",
|
||||
accounts_payable: "Accounts payable",
|
||||
other_expense: "Other expense",
|
||||
other_income: "Other income",
|
||||
cost_of_goods_sold: "Cost of goods sold (COGS)",
|
||||
other_liability: "Other liability",
|
||||
other_asset: 'Other asset',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user