mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: revert the resource columns
This commit is contained in:
@@ -12,18 +12,11 @@ export default {
|
||||
name: 'account.field.name',
|
||||
column: 'name',
|
||||
fieldType: 'text',
|
||||
unique: true,
|
||||
required: true,
|
||||
importable: true,
|
||||
exportable: true,
|
||||
order: 1,
|
||||
},
|
||||
description: {
|
||||
name: 'account.field.description',
|
||||
column: 'description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
exportable: true,
|
||||
},
|
||||
slug: {
|
||||
name: 'account.field.slug',
|
||||
@@ -31,20 +24,13 @@ export default {
|
||||
fieldType: 'text',
|
||||
columnable: false,
|
||||
filterable: false,
|
||||
importable: false,
|
||||
},
|
||||
code: {
|
||||
name: 'account.field.code',
|
||||
column: 'code',
|
||||
fieldType: 'text',
|
||||
exportable: true,
|
||||
importable: true,
|
||||
minLength: 3,
|
||||
maxLength: 6,
|
||||
unique: true,
|
||||
importHint: 'Unique number to identify the account.',
|
||||
},
|
||||
rootType: {
|
||||
root_type: {
|
||||
name: 'account.field.root_type',
|
||||
fieldType: 'enumeration',
|
||||
options: [
|
||||
@@ -56,7 +42,6 @@ export default {
|
||||
],
|
||||
filterCustomQuery: RootTypeFieldFilterQuery,
|
||||
sortable: false,
|
||||
importable: false,
|
||||
},
|
||||
normal: {
|
||||
name: 'account.field.normal',
|
||||
@@ -67,9 +52,8 @@ export default {
|
||||
],
|
||||
filterCustomQuery: NormalTypeFieldFilterQuery,
|
||||
sortable: false,
|
||||
importable: false,
|
||||
},
|
||||
accountType: {
|
||||
type: {
|
||||
name: 'account.field.type',
|
||||
column: 'account_type',
|
||||
fieldType: 'enumeration',
|
||||
@@ -77,46 +61,28 @@ export default {
|
||||
label: accountType.label,
|
||||
key: accountType.key,
|
||||
})),
|
||||
required: true,
|
||||
importable: true,
|
||||
exportable: true,
|
||||
order: 2,
|
||||
},
|
||||
active: {
|
||||
name: 'account.field.active',
|
||||
column: 'active',
|
||||
fieldType: 'boolean',
|
||||
filterable: false,
|
||||
exportable: true,
|
||||
importable: true,
|
||||
},
|
||||
balance: {
|
||||
name: 'account.field.balance',
|
||||
column: 'amount',
|
||||
fieldType: 'number',
|
||||
importable: false,
|
||||
},
|
||||
currencyCode: {
|
||||
currency: {
|
||||
name: 'account.field.currency',
|
||||
column: 'currency_code',
|
||||
fieldType: 'text',
|
||||
filterable: false,
|
||||
importable: true,
|
||||
exportable: true,
|
||||
},
|
||||
parentAccount: {
|
||||
name: 'account.field.parent_account',
|
||||
column: 'parent_account_id',
|
||||
fieldType: 'relation',
|
||||
to: { model: 'Account', to: 'id' },
|
||||
importable: false,
|
||||
},
|
||||
createdAt: {
|
||||
created_at: {
|
||||
name: 'account.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
importable: false,
|
||||
exportable: true,
|
||||
},
|
||||
},
|
||||
fields2: {
|
||||
|
||||
@@ -12,6 +12,10 @@ export default {
|
||||
sortOrder: 'DESC',
|
||||
sortField: 'name',
|
||||
},
|
||||
importable: true,
|
||||
importAggregator: 'group',
|
||||
importAggregateOn: 'entries',
|
||||
importAggregateBy: 'creditNoteNumber',
|
||||
fields: {
|
||||
customer: {
|
||||
name: 'credit_note.field.customer',
|
||||
@@ -77,10 +81,6 @@ export default {
|
||||
fieldType: 'date',
|
||||
},
|
||||
},
|
||||
importable: true,
|
||||
importAggregator: 'group',
|
||||
importAggregateOn: 'entries',
|
||||
importAggregateBy: 'creditNoteNumber',
|
||||
fields2: {
|
||||
customerId: {
|
||||
name: 'Customer',
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
collectionMinLength: 1,
|
||||
fields: {
|
||||
itemId: {
|
||||
name: 'Item',
|
||||
name: 'Item',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'Item',
|
||||
relationImportMatch: ['name', 'code'],
|
||||
|
||||
@@ -3,213 +3,91 @@ export default {
|
||||
defaultFilterField: 'displayName',
|
||||
defaultSort: {
|
||||
sortOrder: 'DESC',
|
||||
sortField: 'createdAt',
|
||||
sortField: 'created_at',
|
||||
},
|
||||
fields: {
|
||||
customerType: {
|
||||
name: 'Customer Type',
|
||||
column: 'contact_type',
|
||||
fieldType: 'enumeration',
|
||||
options: [
|
||||
{ key: 'business', label: 'Business' },
|
||||
{ key: 'individual', label: 'Individual' },
|
||||
],
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
firstName: {
|
||||
name: 'customer.field.first_name',
|
||||
first_name: {
|
||||
name: 'vendor.field.first_name',
|
||||
column: 'first_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
lastName: {
|
||||
name: 'customer.field.last_name',
|
||||
last_name: {
|
||||
name: 'vendor.field.last_name',
|
||||
column: 'last_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
displayName: {
|
||||
name: 'customer.field.display_name',
|
||||
display_name: {
|
||||
name: 'vendor.field.display_name',
|
||||
column: 'display_name',
|
||||
fieldType: 'text',
|
||||
required: true,
|
||||
importable: true,
|
||||
},
|
||||
email: {
|
||||
name: 'customer.field.email',
|
||||
name: 'vendor.field.email',
|
||||
column: 'email',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
workPhone: {
|
||||
name: 'customer.field.work_phone',
|
||||
work_phone: {
|
||||
name: 'vendor.field.work_phone',
|
||||
column: 'work_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
personalPhone: {
|
||||
name: 'customer.field.personal_phone',
|
||||
personal_phone: {
|
||||
name: 'vendor.field.personal_pone',
|
||||
column: 'personal_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
companyName: {
|
||||
name: 'customer.field.company_name',
|
||||
company_name: {
|
||||
name: 'vendor.field.company_name',
|
||||
column: 'company_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
website: {
|
||||
name: 'customer.field.website',
|
||||
name: 'vendor.field.website',
|
||||
column: 'website',
|
||||
fieldType: 'url',
|
||||
importable: true,
|
||||
fieldType: 'text',
|
||||
},
|
||||
created_at: {
|
||||
name: 'vendor.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
},
|
||||
balance: {
|
||||
name: 'customer.field.balance',
|
||||
name: 'vendor.field.balance',
|
||||
column: 'balance',
|
||||
fieldType: 'number',
|
||||
},
|
||||
openingBalance: {
|
||||
name: 'customer.field.opening_balance',
|
||||
opening_balance: {
|
||||
name: 'vendor.field.opening_balance',
|
||||
column: 'opening_balance',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
},
|
||||
openingBalanceAt: {
|
||||
name: 'customer.field.opening_balance_at',
|
||||
opening_balance_at: {
|
||||
name: 'vendor.field.opening_balance_at',
|
||||
column: 'opening_balance_at',
|
||||
filterable: false,
|
||||
fieldType: 'date',
|
||||
importable: true,
|
||||
},
|
||||
openingBalanceExchangeRate: {
|
||||
name: 'Opening Balance Ex. Rate',
|
||||
column: 'opening_balance_exchange_rate',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
},
|
||||
currencyCode: {
|
||||
name: 'customer.field.currency',
|
||||
currency_code: {
|
||||
name: 'vendor.field.currency',
|
||||
column: 'currency_code',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
note: {
|
||||
name: 'Note',
|
||||
column: 'note',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
active: {
|
||||
name: 'Active',
|
||||
column: 'active',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
},
|
||||
status: {
|
||||
name: 'customer.field.status',
|
||||
fieldType: 'enumeration',
|
||||
name: 'vendor.field.status',
|
||||
type: 'enumeration',
|
||||
options: [
|
||||
{ key: 'active', label: 'customer.field.status.active' },
|
||||
{ key: 'inactive', label: 'customer.field.status.inactive' },
|
||||
{ key: 'overdue', label: 'customer.field.status.overdue' },
|
||||
{ key: 'unpaid', label: 'customer.field.status.unpaid' },
|
||||
{ key: 'overdue', label: 'vendor.field.status.overdue' },
|
||||
{ key: 'unpaid', label: 'vendor.field.status.unpaid' },
|
||||
],
|
||||
filterCustomQuery: statusFieldFilterQuery,
|
||||
},
|
||||
// Billing Address
|
||||
billingAddress1: {
|
||||
name: 'Billing Address 1',
|
||||
column: 'billing_address1',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddress2: {
|
||||
name: 'Billing Address 2',
|
||||
column: 'billing_address2',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressCity: {
|
||||
name: 'Billing Address City',
|
||||
column: 'billing_address_city',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressCountry: {
|
||||
name: 'Billing Address Country',
|
||||
column: 'billing_address_country',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressPostcode: {
|
||||
name: 'Billing Address Postcode',
|
||||
column: 'billing_address_postcode',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressState: {
|
||||
name: 'Billing Address State',
|
||||
column: 'billing_address_state',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressPhone: {
|
||||
name: 'Billing Address Phone',
|
||||
column: 'billing_address_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
// Shipping Address
|
||||
shippingAddress1: {
|
||||
name: 'Shipping Address 1',
|
||||
column: 'shipping_address1',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddress2: {
|
||||
name: 'Shipping Address 2',
|
||||
column: 'shipping_address2',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressCity: {
|
||||
name: 'Shipping Address City',
|
||||
column: 'shipping_address_city',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressCountry: {
|
||||
name: 'Shipping Address Country',
|
||||
column: 'shipping_address_country',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressPostcode: {
|
||||
name: 'Shipping Address Postcode',
|
||||
column: 'shipping_address_postcode',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressPhone: {
|
||||
name: 'Shipping Address Phone',
|
||||
column: 'shipping_address_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressState: {
|
||||
name: 'Shipping Address State',
|
||||
column: 'shipping_address_state',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
//
|
||||
createdAt: {
|
||||
name: 'customer.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
filterCustomQuery: (query, role) => {
|
||||
switch (role.value) {
|
||||
case 'overdue':
|
||||
query.modify('overdue');
|
||||
break;
|
||||
case 'unpaid':
|
||||
query.modify('unpaid');
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
fields2: {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
filterCustomQuery: StatusFieldFilterQuery,
|
||||
sortCustomQuery: StatusFieldSortQuery,
|
||||
},
|
||||
createdAt: {
|
||||
created_at: {
|
||||
name: 'expense.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
name: 'expense.field.payment_account',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'Account',
|
||||
relationImportMatch: ['name', 'code'],
|
||||
relationImportMatch: ['name', 'code'],
|
||||
required: true,
|
||||
},
|
||||
referenceNo: {
|
||||
|
||||
@@ -5,96 +5,6 @@ export default {
|
||||
sortField: 'name',
|
||||
sortOrder: 'DESC',
|
||||
},
|
||||
fields2: {
|
||||
type: {
|
||||
name: 'item.field.type',
|
||||
fieldType: 'enumeration',
|
||||
options: [
|
||||
{ key: 'inventory', label: 'item.field.type.inventory' },
|
||||
{ key: 'service', label: 'item.field.type.service' },
|
||||
{ key: 'non-inventory', label: 'item.field.type.non-inventory' },
|
||||
],
|
||||
required: true,
|
||||
},
|
||||
name: {
|
||||
name: 'item.field.name',
|
||||
fieldType: 'text',
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
code: {
|
||||
name: 'item.field.code',
|
||||
fieldType: 'text',
|
||||
unique: true,
|
||||
},
|
||||
sellable: {
|
||||
name: 'item.field.sellable',
|
||||
fieldType: 'boolean',
|
||||
required: true,
|
||||
},
|
||||
purchasable: {
|
||||
name: 'item.field.purchasable',
|
||||
fieldType: 'boolean',
|
||||
required: true,
|
||||
},
|
||||
sellPrice: {
|
||||
name: 'item.field.sell_price',
|
||||
fieldType: 'number',
|
||||
required: true,
|
||||
},
|
||||
costPrice: {
|
||||
name: 'item.field.cost_price',
|
||||
fieldType: 'number',
|
||||
required: true,
|
||||
},
|
||||
costAccount: {
|
||||
name: 'item.field.cost_account',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'Account',
|
||||
relationImportMatch: ['name', 'code'],
|
||||
required: true,
|
||||
},
|
||||
sellAccount: {
|
||||
name: 'item.field.sell_account',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'Account',
|
||||
relationImportMatch: ['name', 'code'],
|
||||
required: true,
|
||||
},
|
||||
inventoryAccount: {
|
||||
name: 'item.field.inventory_account',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'Account',
|
||||
relationImportMatch: ['name', 'code'],
|
||||
required: true,
|
||||
},
|
||||
sellDescription: {
|
||||
name: 'Sell description',
|
||||
column: 'sell_description',
|
||||
fieldType: 'text',
|
||||
},
|
||||
purchaseDescription: {
|
||||
name: 'Purchase description',
|
||||
column: 'purchase_description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
note: {
|
||||
name: 'item.field.note',
|
||||
fieldType: 'text',
|
||||
},
|
||||
category: {
|
||||
name: 'item.field.category',
|
||||
fieldType: 'relation',
|
||||
relationModel: 'ItemCategory',
|
||||
relationImportMatch: 'name',
|
||||
},
|
||||
active: {
|
||||
name: 'item.field.active',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
},
|
||||
},
|
||||
fields: {
|
||||
type: {
|
||||
name: 'item.field.type',
|
||||
@@ -105,109 +15,80 @@ export default {
|
||||
{ key: 'service', label: 'item.field.type.service' },
|
||||
{ key: 'non-inventory', label: 'item.field.type.non-inventory' },
|
||||
],
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
name: {
|
||||
name: 'item.field.name',
|
||||
column: 'name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
required: true,
|
||||
unique: true,
|
||||
},
|
||||
code: {
|
||||
name: 'item.field.code',
|
||||
column: 'code',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
sellable: {
|
||||
name: 'item.field.sellable',
|
||||
column: 'sellable',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
purchasable: {
|
||||
name: 'item.field.purchasable',
|
||||
column: 'purchasable',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
sellPrice: {
|
||||
name: 'item.field.sell_price',
|
||||
sell_price: {
|
||||
name: 'item.field.cost_price',
|
||||
column: 'sell_price',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
costPrice: {
|
||||
name: 'item.field.cost_price',
|
||||
cost_price: {
|
||||
name: 'item.field.cost_account',
|
||||
column: 'cost_price',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
costAccount: {
|
||||
name: 'item.field.cost_account',
|
||||
cost_account: {
|
||||
name: 'item.field.sell_account',
|
||||
column: 'cost_account_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'costAccount',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
|
||||
importableRelationLabel: ['name', 'code'],
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
sellAccount: {
|
||||
name: 'item.field.sell_account',
|
||||
sell_account: {
|
||||
name: 'item.field.sell_description',
|
||||
column: 'sell_account_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'sellAccount',
|
||||
relationType: 'one-to-many',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
|
||||
importableRelationLabel: ['name', 'code'],
|
||||
importable: true,
|
||||
|
||||
required: true,
|
||||
},
|
||||
inventoryAccount: {
|
||||
inventory_account: {
|
||||
name: 'item.field.inventory_account',
|
||||
column: 'inventory_account_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'inventoryAccount',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
|
||||
importableRelationLabel: ['name', 'code'],
|
||||
importable: true,
|
||||
|
||||
required: true,
|
||||
},
|
||||
sellDescription: {
|
||||
sell_description: {
|
||||
name: 'Sell description',
|
||||
column: 'sell_description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
purchaseDescription: {
|
||||
purchase_description: {
|
||||
name: 'Purchase description',
|
||||
column: 'purchase_description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
quantityOnHand: {
|
||||
quantity_on_hand: {
|
||||
name: 'item.field.quantity_on_hand',
|
||||
column: 'quantity_on_hand',
|
||||
fieldType: 'number',
|
||||
@@ -216,28 +97,140 @@ export default {
|
||||
name: 'item.field.note',
|
||||
column: 'note',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
category: {
|
||||
name: 'item.field.category',
|
||||
column: 'category_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'category',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'id',
|
||||
|
||||
importableRelationLabel: 'name',
|
||||
importable: true,
|
||||
},
|
||||
active: {
|
||||
name: 'item.field.active',
|
||||
column: 'active',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
filterable: false,
|
||||
},
|
||||
createdAt: {
|
||||
created_at: {
|
||||
name: 'item.field.created_at',
|
||||
column: 'created_at',
|
||||
columnType: 'date',
|
||||
fieldType: 'date',
|
||||
},
|
||||
},
|
||||
fields2: {
|
||||
type: {
|
||||
name: 'item.field.type',
|
||||
column: 'type',
|
||||
fieldType: 'enumeration',
|
||||
options: [
|
||||
{ key: 'inventory', label: 'item.field.type.inventory' },
|
||||
{ key: 'service', label: 'item.field.type.service' },
|
||||
{ key: 'non-inventory', label: 'item.field.type.non-inventory' },
|
||||
],
|
||||
},
|
||||
name: {
|
||||
name: 'item.field.name',
|
||||
column: 'name',
|
||||
fieldType: 'text',
|
||||
},
|
||||
code: {
|
||||
name: 'item.field.code',
|
||||
column: 'code',
|
||||
fieldType: 'text',
|
||||
},
|
||||
sellable: {
|
||||
name: 'item.field.sellable',
|
||||
column: 'sellable',
|
||||
fieldType: 'boolean',
|
||||
},
|
||||
purchasable: {
|
||||
name: 'item.field.purchasable',
|
||||
column: 'purchasable',
|
||||
fieldType: 'boolean',
|
||||
},
|
||||
sell_price: {
|
||||
name: 'item.field.cost_price',
|
||||
column: 'sell_price',
|
||||
fieldType: 'number',
|
||||
},
|
||||
cost_price: {
|
||||
name: 'item.field.cost_account',
|
||||
column: 'cost_price',
|
||||
fieldType: 'number',
|
||||
},
|
||||
cost_account: {
|
||||
name: 'item.field.sell_account',
|
||||
column: 'cost_account_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'costAccount',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
},
|
||||
sell_account: {
|
||||
name: 'item.field.sell_description',
|
||||
column: 'sell_account_id',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'sellAccount',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
},
|
||||
inventory_account: {
|
||||
name: 'item.field.inventory_account',
|
||||
column: 'inventory_account_id',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'inventoryAccount',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'slug',
|
||||
},
|
||||
sell_description: {
|
||||
name: 'Sell description',
|
||||
column: 'sell_description',
|
||||
fieldType: 'text',
|
||||
},
|
||||
purchase_description: {
|
||||
name: 'Purchase description',
|
||||
column: 'purchase_description',
|
||||
fieldType: 'text',
|
||||
},
|
||||
quantity_on_hand: {
|
||||
name: 'item.field.quantity_on_hand',
|
||||
column: 'quantity_on_hand',
|
||||
fieldType: 'number',
|
||||
},
|
||||
note: {
|
||||
name: 'item.field.note',
|
||||
column: 'note',
|
||||
fieldType: 'text',
|
||||
},
|
||||
category: {
|
||||
name: 'item.field.category',
|
||||
column: 'category_id',
|
||||
|
||||
relationType: 'enumeration',
|
||||
relationKey: 'category',
|
||||
|
||||
relationEntityLabel: 'name',
|
||||
relationEntityKey: 'id',
|
||||
},
|
||||
active: {
|
||||
name: 'item.field.active',
|
||||
column: 'active',
|
||||
fieldType: 'boolean',
|
||||
filterable: false,
|
||||
},
|
||||
created_at: {
|
||||
name: 'item.field.created_at',
|
||||
column: 'created_at',
|
||||
columnType: 'date',
|
||||
|
||||
@@ -10,13 +10,11 @@ export default {
|
||||
name: 'item_category.field.name',
|
||||
column: 'name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
description: {
|
||||
name: 'item_category.field.description',
|
||||
column: 'description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
count: {
|
||||
name: 'item_category.field.count',
|
||||
|
||||
@@ -13,23 +13,18 @@ export default {
|
||||
name: 'manual_journal.field.date',
|
||||
column: 'date',
|
||||
fieldType: 'date',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
journalNumber: {
|
||||
journal_number: {
|
||||
name: 'manual_journal.field.journal_number',
|
||||
column: 'journal_number',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
reference: {
|
||||
name: 'manual_journal.field.reference',
|
||||
column: 'reference',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
journalType: {
|
||||
journal_type: {
|
||||
name: 'manual_journal.field.journal_type',
|
||||
column: 'journal_type',
|
||||
fieldType: 'text',
|
||||
@@ -43,63 +38,6 @@ export default {
|
||||
name: 'manual_journal.field.description',
|
||||
column: 'description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
entries: {
|
||||
name: 'Entries',
|
||||
fieldType: 'collection',
|
||||
collectionOf: 'object',
|
||||
collectionMinLength: 2,
|
||||
required: true,
|
||||
importable: true,
|
||||
filterable: false,
|
||||
fields: {
|
||||
credit: {
|
||||
name: 'Credit',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
debit: {
|
||||
name: 'Debit',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
accountId: {
|
||||
name: 'Account',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationKey: 'account',
|
||||
relationModel: 'Account',
|
||||
|
||||
importable: true,
|
||||
required: true,
|
||||
importableRelationLabel: ['name', 'code'],
|
||||
},
|
||||
contactId: {
|
||||
name: 'Contact',
|
||||
fieldType: 'relation',
|
||||
|
||||
relationKey: 'contact',
|
||||
relationModel: 'Contact',
|
||||
|
||||
required: false,
|
||||
|
||||
importable: true,
|
||||
importableRelationLabel: 'displayName',
|
||||
},
|
||||
note: {
|
||||
name: 'Note',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
publish: {
|
||||
name: 'Publish',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
},
|
||||
status: {
|
||||
name: 'manual_journal.field.status',
|
||||
@@ -112,7 +50,7 @@ export default {
|
||||
filterCustomQuery: StatusFieldFilterQuery,
|
||||
sortCustomQuery: StatusFieldSortQuery,
|
||||
},
|
||||
createdAt: {
|
||||
created_at: {
|
||||
name: 'manual_journal.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
@@ -132,7 +70,6 @@ export default {
|
||||
reference: {
|
||||
name: 'manual_journal.field.reference',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
journalType: {
|
||||
name: 'manual_journal.field.journal_type',
|
||||
|
||||
@@ -2,7 +2,7 @@ export default {
|
||||
defaultFilterField: 'customer',
|
||||
defaultSort: {
|
||||
sortOrder: 'DESC',
|
||||
sortField: 'createdAt',
|
||||
sortField: 'created_at',
|
||||
},
|
||||
importable: true,
|
||||
importAggregator: 'group',
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
filterCustomQuery: StatusFieldFilterQuery,
|
||||
sortCustomQuery: StatusFieldSortQuery,
|
||||
},
|
||||
createdAt: {
|
||||
created_at: {
|
||||
name: 'invoice.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
|
||||
@@ -2,7 +2,7 @@ export default {
|
||||
defaultFilterField: 'createdAt',
|
||||
defaultSort: {
|
||||
sortOrder: 'DESC',
|
||||
sortField: 'createdAt',
|
||||
sortField: 'created_at',
|
||||
},
|
||||
importable: true,
|
||||
fields: {
|
||||
@@ -10,33 +10,27 @@ export default {
|
||||
name: 'Date',
|
||||
column: 'date',
|
||||
fieldType: 'date',
|
||||
importable: true,
|
||||
required: true,
|
||||
},
|
||||
payee: {
|
||||
name: 'Payee',
|
||||
column: 'payee',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
description: {
|
||||
name: 'Description',
|
||||
column: 'description',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
referenceNo: {
|
||||
name: 'Reference No.',
|
||||
column: 'reference_no',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
amount: {
|
||||
name: 'Amount',
|
||||
column: 'Amount',
|
||||
fieldType: 'numeric',
|
||||
required: true,
|
||||
importable: true,
|
||||
},
|
||||
account: {
|
||||
name: 'Account',
|
||||
@@ -78,6 +72,5 @@ export default {
|
||||
fieldType: 'numeric',
|
||||
required: true,
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,99 +2,74 @@ export default {
|
||||
defaultFilterField: 'displayName',
|
||||
defaultSort: {
|
||||
sortOrder: 'DESC',
|
||||
sortField: 'createdAt',
|
||||
sortField: 'created_at',
|
||||
},
|
||||
importable: true,
|
||||
fields: {
|
||||
firstName: {
|
||||
first_name: {
|
||||
name: 'vendor.field.first_name',
|
||||
column: 'first_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
lastName: {
|
||||
last_name: {
|
||||
name: 'vendor.field.last_name',
|
||||
column: 'last_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
displayName: {
|
||||
display_name: {
|
||||
name: 'vendor.field.display_name',
|
||||
column: 'display_name',
|
||||
fieldType: 'text',
|
||||
required: true,
|
||||
importable: true,
|
||||
},
|
||||
email: {
|
||||
name: 'vendor.field.email',
|
||||
column: 'email',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
workPhone: {
|
||||
work_phone: {
|
||||
name: 'vendor.field.work_phone',
|
||||
column: 'work_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
personalPhone: {
|
||||
name: 'vendor.field.personal_phone',
|
||||
personal_phone: {
|
||||
name: 'vendor.field.personal_pone',
|
||||
column: 'personal_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
companyName: {
|
||||
company_name: {
|
||||
name: 'vendor.field.company_name',
|
||||
column: 'company_name',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
website: {
|
||||
name: 'vendor.field.website',
|
||||
column: 'website',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
created_at: {
|
||||
name: 'vendor.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
},
|
||||
balance: {
|
||||
name: 'vendor.field.balance',
|
||||
column: 'balance',
|
||||
fieldType: 'number',
|
||||
},
|
||||
openingBalance: {
|
||||
opening_balance: {
|
||||
name: 'vendor.field.opening_balance',
|
||||
column: 'opening_balance',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
},
|
||||
openingBalanceAt: {
|
||||
opening_balance_at: {
|
||||
name: 'vendor.field.opening_balance_at',
|
||||
column: 'opening_balance_at',
|
||||
fieldType: 'date',
|
||||
importable: true,
|
||||
},
|
||||
openingBalanceExchangeRate: {
|
||||
name: 'Opening Balance Ex. Rate',
|
||||
column: 'opening_balance_exchange_rate',
|
||||
fieldType: 'number',
|
||||
importable: true,
|
||||
},
|
||||
currencyCode: {
|
||||
currency_code: {
|
||||
name: 'vendor.field.currency',
|
||||
column: 'currency_code',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
note: {
|
||||
name: 'Note',
|
||||
column: 'note',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
active: {
|
||||
name: 'Active',
|
||||
column: 'active',
|
||||
fieldType: 'boolean',
|
||||
importable: true,
|
||||
},
|
||||
status: {
|
||||
name: 'vendor.field.status',
|
||||
@@ -114,97 +89,6 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
// Billing Address
|
||||
billingAddress1: {
|
||||
name: 'Billing Address 1',
|
||||
column: 'billing_address1',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddress2: {
|
||||
name: 'Billing Address 2',
|
||||
column: 'billing_address2',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressCity: {
|
||||
name: 'Billing Address City',
|
||||
column: 'billing_address_city',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressCountry: {
|
||||
name: 'Billing Address Country',
|
||||
column: 'billing_address_country',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressPostcode: {
|
||||
name: 'Billing Address Postcode',
|
||||
column: 'billing_address_postcode',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressState: {
|
||||
name: 'Billing Address State',
|
||||
column: 'billing_address_state',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
billingAddressPhone: {
|
||||
name: 'Billing Address Phone',
|
||||
column: 'billing_address_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
// Shipping Address
|
||||
shippingAddress1: {
|
||||
name: 'Shipping Address 1',
|
||||
column: 'shipping_address1',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddress2: {
|
||||
name: 'Shipping Address 2',
|
||||
column: 'shipping_address2',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressCity: {
|
||||
name: 'Shipping Address City',
|
||||
column: 'shipping_address_city',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressCountry: {
|
||||
name: 'Shipping Address Country',
|
||||
column: 'shipping_address_country',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressPostcode: {
|
||||
name: 'Shipping Address Postcode',
|
||||
column: 'shipping_address_postcode',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressState: {
|
||||
name: 'Shipping Address State',
|
||||
column: 'shipping_address_state',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
shippingAddressPhone: {
|
||||
name: 'Shipping Address Phone',
|
||||
column: 'shipping_address_phone',
|
||||
fieldType: 'text',
|
||||
importable: true,
|
||||
},
|
||||
createdAt: {
|
||||
name: 'vendor.field.created_at',
|
||||
column: 'created_at',
|
||||
fieldType: 'date',
|
||||
},
|
||||
},
|
||||
fields2: {
|
||||
firstName: {
|
||||
|
||||
Reference in New Issue
Block a user