mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
feat: add models fields labels.
This commit is contained in:
@@ -125,33 +125,42 @@ export default class Expense extends TenantModel {
|
||||
static get fields() {
|
||||
return {
|
||||
payment_date: {
|
||||
label: 'Payment date',
|
||||
column: 'payment_date',
|
||||
},
|
||||
payment_account: {
|
||||
label: 'Payment account',
|
||||
column: 'payment_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
amount: {
|
||||
label: 'Amount',
|
||||
column: 'total_amount',
|
||||
},
|
||||
currency_code: {
|
||||
label: 'Currency',
|
||||
column: 'currency_code',
|
||||
},
|
||||
reference_no: {
|
||||
label: 'Reference No.',
|
||||
column: 'reference_no'
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
column: 'description',
|
||||
},
|
||||
published: {
|
||||
label: 'Published',
|
||||
column: 'published',
|
||||
},
|
||||
user: {
|
||||
label: 'User',
|
||||
column: 'user_id',
|
||||
relation: 'users.id',
|
||||
relationColumn: 'users.id',
|
||||
},
|
||||
created_at: {
|
||||
label: 'Created at',
|
||||
column: 'created_at',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -103,64 +103,83 @@ export default class Item extends TenantModel {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Item fields.
|
||||
*/
|
||||
static get fields() {
|
||||
return {
|
||||
type: {
|
||||
label: 'Type',
|
||||
column: 'type',
|
||||
},
|
||||
name: {
|
||||
label: 'Name',
|
||||
column: 'name',
|
||||
},
|
||||
sellable: {
|
||||
label: 'Sellable',
|
||||
column: 'sellable',
|
||||
},
|
||||
purchasable: {
|
||||
label: 'Purchasable',
|
||||
column: 'purchasable',
|
||||
},
|
||||
sell_price: {
|
||||
label: 'Sell price',
|
||||
column: 'sell_price'
|
||||
},
|
||||
cost_price: {
|
||||
label: 'Cost price',
|
||||
column: 'cost_price',
|
||||
},
|
||||
currency_code: {
|
||||
label: 'Currency',
|
||||
column: 'currency_code',
|
||||
},
|
||||
cost_account: {
|
||||
label: 'Cost account',
|
||||
column: 'cost_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
sell_account: {
|
||||
label: 'Sell account',
|
||||
column: 'sell_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
inventory_account: {
|
||||
label: "Inventory account",
|
||||
column: 'inventory_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
sell_description: {
|
||||
label: "Sell description",
|
||||
column: 'sell_description',
|
||||
},
|
||||
purchase_description: {
|
||||
label: "Purchase description",
|
||||
column: 'purchase_description',
|
||||
},
|
||||
quantity_on_hand: {
|
||||
label: "Quantity on hand",
|
||||
column: 'quantity_on_hand',
|
||||
},
|
||||
note: {
|
||||
label: 'Note',
|
||||
column: 'note',
|
||||
},
|
||||
category: {
|
||||
label: "Category",
|
||||
column: 'category_id',
|
||||
relation: 'categories.id',
|
||||
},
|
||||
user: {
|
||||
label: 'User',
|
||||
column: 'user_id',
|
||||
relation: 'users.id',
|
||||
relationColumn: 'users.id',
|
||||
},
|
||||
created_at: {
|
||||
label: 'Created at',
|
||||
column: 'created_at',
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,40 +42,52 @@ export default class ItemCategory extends TenantModel {
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Item category fields.
|
||||
*/
|
||||
static get fields() {
|
||||
return {
|
||||
name: {
|
||||
label: 'Name',
|
||||
column: 'name',
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
column: 'description',
|
||||
},
|
||||
parent_category_id: {
|
||||
label: 'Parent category',
|
||||
column: 'parent_category_id',
|
||||
relation: 'items_categories.id',
|
||||
relationColumn: 'items_categories.id',
|
||||
},
|
||||
user: {
|
||||
label: 'User',
|
||||
column: 'user_id',
|
||||
relation: 'users.id',
|
||||
relationColumn: 'users.id',
|
||||
},
|
||||
cost_account: {
|
||||
label: 'Cost account',
|
||||
column: 'cost_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
sell_account: {
|
||||
label: 'Sell account',
|
||||
column: 'sell_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
inventory_account: {
|
||||
label: 'Inventory account',
|
||||
column: 'inventory_account_id',
|
||||
relation: 'accounts.id',
|
||||
},
|
||||
cost_method: {
|
||||
label: 'Cost method',
|
||||
column: 'cost_method',
|
||||
},
|
||||
created_at: {
|
||||
label: 'Created at',
|
||||
column: 'created_at',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -17,9 +17,6 @@ export default class ManualJournal extends TenantModel {
|
||||
return ['createdAt', 'updatedAt'];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
static get resourceable() {
|
||||
return true;
|
||||
}
|
||||
@@ -67,32 +64,41 @@ export default class ManualJournal extends TenantModel {
|
||||
static get fields() {
|
||||
return {
|
||||
date: {
|
||||
label: 'Date',
|
||||
column: 'date',
|
||||
},
|
||||
journal_number: {
|
||||
label: 'Journal number',
|
||||
column: 'journal_number',
|
||||
},
|
||||
reference: {
|
||||
label: 'Reference No.',
|
||||
column: 'reference',
|
||||
},
|
||||
status: {
|
||||
label: 'Status',
|
||||
column: 'status',
|
||||
},
|
||||
amount: {
|
||||
label: 'Amount',
|
||||
column: 'amount',
|
||||
},
|
||||
description: {
|
||||
label: 'Description',
|
||||
column: 'description',
|
||||
},
|
||||
user: {
|
||||
label: 'User',
|
||||
column: 'user_id',
|
||||
relation: 'users.id',
|
||||
relationColumn: 'users.id',
|
||||
},
|
||||
journal_type: {
|
||||
label: 'Journal type',
|
||||
column: 'journal_type',
|
||||
},
|
||||
created_at: {
|
||||
label: 'Created at',
|
||||
column: 'created_at',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user