diff --git a/client/src/containers/Customers/CustomersLanding/components.js b/client/src/containers/Customers/CustomersLanding/components.js index 08e9cb893..38b05a403 100644 --- a/client/src/containers/Customers/CustomersLanding/components.js +++ b/client/src/containers/Customers/CustomersLanding/components.js @@ -74,12 +74,7 @@ export function AvatarCell(row) { * Phone number accessor. */ export function PhoneNumberAccessor(row) { - return ( -
-
{row.work_phone}
-
{row.personal_phone}
-
- ); + return
{row.work_phone}
; } /** @@ -121,14 +116,14 @@ export function useCustomersTableColumns() { width: 150, }, { - id: 'phone_number', - Header: formatMessage({ id: 'phone_number' }), + id: 'work_phone', + Header: formatMessage({ id: 'work_phone' }), accessor: PhoneNumberAccessor, className: 'phone_number', width: 100, }, { - id: 'receivable_balance', + id: 'balance', Header: formatMessage({ id: 'receivable_balance' }), accessor: BalanceAccessor, className: 'receivable_balance', diff --git a/client/src/containers/Vendors/VendorsLanding/components.js b/client/src/containers/Vendors/VendorsLanding/components.js index 239df38a1..bdc28ef3b 100644 --- a/client/src/containers/Vendors/VendorsLanding/components.js +++ b/client/src/containers/Vendors/VendorsLanding/components.js @@ -73,12 +73,7 @@ export function AvatarAccessor(row) { * Phone number accessor. */ export function PhoneNumberAccessor(row) { - return ( -
-
{row.work_phone}
-
{row.personal_phone}
-
- ); + return
{row.work_phone}
; } /** @@ -120,14 +115,14 @@ export function useVendorsTableColumns() { width: 150, }, { - id: 'phone_number', - Header: formatMessage({ id: 'phone_number' }), + id: 'work_phone', + Header: formatMessage({ id: 'work_phone' }), accessor: PhoneNumberAccessor, - className: 'phone_number', + className: 'work_phone', width: 100, }, { - id: 'receivable_balance', + id: 'balance', Header: formatMessage({ id: 'receivable_balance' }), accessor: BalanceAccessor, className: 'receivable_balance', diff --git a/client/src/lang/en/index.js b/client/src/lang/en/index.js index 90f7a3fb4..4b15e129a 100644 --- a/client/src/lang/en/index.js +++ b/client/src/lang/en/index.js @@ -1019,4 +1019,5 @@ export default { 'Cannot delete bill that has associated payment transactions.', cannot_change_item_type_to_inventory_with_item_has_associated_transactions: 'Cannot change item type to inventory with item has associated transactions.', + work_phone: 'Work Phone', }; diff --git a/server/src/models/Customer.js b/server/src/models/Customer.js index 70c9092a1..07ec3f429 100644 --- a/server/src/models/Customer.js +++ b/server/src/models/Customer.js @@ -129,6 +129,42 @@ export default class Customer extends TenantModel { static get fields() { return { + contact_service: { + column: 'contact_service', + }, + display_name: { + column: 'display_name', + }, + email: { + column: 'email', + }, + work_phone: { + column: 'work_phone', + }, + personal_phone: { + column: 'personal_phone', + }, + company_name: { + column: 'company_name', + }, + website: { + column: 'website' + }, + created_at: { + column: 'created_at', + }, + balance: { + column: 'balance', + }, + opening_balance: { + column: 'opening_balance', + }, + opening_balance_at: { + column: 'opening_balance_at', + }, + currency_code: { + column: 'currency_code', + }, status: { label: 'Status', options: [ diff --git a/server/src/models/Vendor.js b/server/src/models/Vendor.js index d56d6f390..91023b5b0 100644 --- a/server/src/models/Vendor.js +++ b/server/src/models/Vendor.js @@ -127,6 +127,42 @@ export default class Vendor extends TenantModel { static get fields() { return { + contact_service: { + column: 'contact_service', + }, + display_name: { + column: 'display_name', + }, + email: { + column: 'email', + }, + work_phone: { + column: 'work_phone', + }, + personal_phone: { + column: 'personal_phone', + }, + company_name: { + column: 'company_name', + }, + website: { + column: 'website' + }, + created_at: { + column: 'created_at', + }, + balance: { + column: 'balance', + }, + opening_balance: { + column: 'opening_balance', + }, + opening_balance_at: { + column: 'opening_balance_at', + }, + currency_code: { + column: 'currency_code', + }, status: { label: 'Status', options: [