mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
223
src/common/accountTypes.js
Normal file
223
src/common/accountTypes.js
Normal file
@@ -0,0 +1,223 @@
|
||||
export const ACCOUNT_TYPE = {
|
||||
CASH: 'cash',
|
||||
BANK: 'bank',
|
||||
ACCOUNTS_RECEIVABLE: 'accounts-receivable',
|
||||
INVENTORY: 'inventory',
|
||||
OTHER_CURRENT_ASSET: 'other-ACCOUNT_PARENT_TYPE.CURRENT_ASSET',
|
||||
FIXED_ASSET: 'fixed-asset',
|
||||
NON_CURRENT_ASSET: 'non-ACCOUNT_PARENT_TYPE.CURRENT_ASSET',
|
||||
|
||||
ACCOUNTS_PAYABLE: 'accounts-payable',
|
||||
CREDIT_CARD: 'credit-card',
|
||||
TAX_PAYABLE: 'tax-payable',
|
||||
OTHER_CURRENT_LIABILITY: 'other-current-liability',
|
||||
LOGN_TERM_LIABILITY: 'long-term-liability',
|
||||
NON_CURRENT_LIABILITY: 'non-current-liability',
|
||||
|
||||
EQUITY: 'equity',
|
||||
INCOME: 'income',
|
||||
OTHER_INCOME: 'other-income',
|
||||
COST_OF_GOODS_SOLD: 'cost-of-goods-sold',
|
||||
EXPENSE: 'expense',
|
||||
OTHER_EXPENSE: 'other-expense',
|
||||
};
|
||||
|
||||
export const ACCOUNT_PARENT_TYPE = {
|
||||
CURRENT_ASSET: 'current-asset',
|
||||
FIXED_ASSET: 'fixed-asset',
|
||||
NON_CURRENT_ASSET: 'non-ACCOUNT_PARENT_TYPE.CURRENT_ASSET',
|
||||
|
||||
CURRENT_LIABILITY: 'current-liability',
|
||||
LOGN_TERM_LIABILITY: 'long-term-liability',
|
||||
NON_CURRENT_LIABILITY: 'non-current-liability',
|
||||
|
||||
EQUITY: 'equity',
|
||||
EXPENSE: 'expense',
|
||||
INCOME: 'income',
|
||||
};
|
||||
|
||||
export const ACCOUNT_ROOT_TYPE = {
|
||||
ASSET: 'asset',
|
||||
LIABILITY: 'liability',
|
||||
EQUITY: 'equity',
|
||||
EXPENSE: 'expene',
|
||||
INCOME: 'income',
|
||||
};
|
||||
|
||||
export const ACCOUNT_NORMAL = {
|
||||
CREDIT: 'credit',
|
||||
DEBIT: 'debit',
|
||||
};
|
||||
export const ACCOUNT_TYPES = [
|
||||
{
|
||||
label: 'Cash',
|
||||
key: ACCOUNT_TYPE.CASH,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_ASSET,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Bank',
|
||||
key: ACCOUNT_TYPE.BANK,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_ASSET,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Accounts Receivable',
|
||||
key: ACCOUNT_TYPE.ACCOUNTS_RECEIVABLE,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Inventory',
|
||||
key: ACCOUNT_TYPE.INVENTORY,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Other Current Asset',
|
||||
key: ACCOUNT_TYPE.OTHER_CURRENT_ASSET,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Fixed Asset',
|
||||
key: ACCOUNT_TYPE.FIXED_ASSET,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
parentType: ACCOUNT_PARENT_TYPE.FIXED_ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Non-Current Asset',
|
||||
key: ACCOUNT_TYPE.NON_CURRENT_ASSET,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.ASSET,
|
||||
parentType: ACCOUNT_PARENT_TYPE.FIXED_ASSET,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Accounts Payable',
|
||||
key: ACCOUNT_TYPE.ACCOUNTS_PAYABLE,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_LIABILITY,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Credit Card',
|
||||
key: ACCOUNT_TYPE.CREDIT_CARD,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_LIABILITY,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Tax Payable',
|
||||
key: ACCOUNT_TYPE.TAX_PAYABLE,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_LIABILITY,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Other Current Liability',
|
||||
key: ACCOUNT_TYPE.OTHER_CURRENT_LIABILITY,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.CURRENT_LIABILITY,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Long Term Liability',
|
||||
key: ACCOUNT_TYPE.LOGN_TERM_LIABILITY,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.LOGN_TERM_LIABILITY,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Non-Current Liability',
|
||||
key: ACCOUNT_TYPE.NON_CURRENT_LIABILITY,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.LIABILITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.NON_CURRENT_LIABILITY,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Equity',
|
||||
key: ACCOUNT_TYPE.EQUITY,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.EQUITY,
|
||||
parentType: ACCOUNT_PARENT_TYPE.EQUITY,
|
||||
balanceSheet: true,
|
||||
incomeSheet: false,
|
||||
},
|
||||
{
|
||||
label: 'Income',
|
||||
key: ACCOUNT_TYPE.INCOME,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.INCOME,
|
||||
parentType: ACCOUNT_PARENT_TYPE.INCOME,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Other Income',
|
||||
key: ACCOUNT_TYPE.OTHER_INCOME,
|
||||
normal: ACCOUNT_NORMAL.CREDIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.INCOME,
|
||||
parentType: ACCOUNT_PARENT_TYPE.INCOME,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Cost of Goods Sold',
|
||||
key: ACCOUNT_TYPE.COST_OF_GOODS_SOLD,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.EXPENSE,
|
||||
parentType: ACCOUNT_PARENT_TYPE.EXPENSE,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Expense',
|
||||
key: ACCOUNT_TYPE.EXPENSE,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.EXPENSE,
|
||||
parentType: ACCOUNT_PARENT_TYPE.EXPENSE,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
{
|
||||
label: 'Other Expense',
|
||||
key: ACCOUNT_TYPE.OTHER_EXPENSE,
|
||||
normal: ACCOUNT_NORMAL.DEBIT,
|
||||
rootType: ACCOUNT_ROOT_TYPE.EXPENSE,
|
||||
parentType: ACCOUNT_PARENT_TYPE.EXPENSE,
|
||||
balanceSheet: false,
|
||||
incomeSheet: true,
|
||||
},
|
||||
];
|
||||
6
src/common/adjustmentType.js
Normal file
6
src/common/adjustmentType.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export default [
|
||||
{ name: intl.get('decrement'), value: 'decrement' },
|
||||
{ name: intl.get('increment'), value: 'increment' },
|
||||
]
|
||||
6
src/common/allocateLandedCostType.js
Normal file
6
src/common/allocateLandedCostType.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export default [
|
||||
{ name: intl.get('bills'), value: 'Bill' },
|
||||
{ name: intl.get('expenses'), value: 'Expense' },
|
||||
];
|
||||
97
src/common/classes.js
Normal file
97
src/common/classes.js
Normal file
@@ -0,0 +1,97 @@
|
||||
import { Classes } from '@blueprintjs/core';
|
||||
|
||||
const CLASSES = {
|
||||
DASHBOARD_PAGE: 'dashboard__page',
|
||||
DASHBOARD_DATATABLE: 'dashboard__datatable',
|
||||
DASHBOARD_CARD: 'dashboard__card',
|
||||
DASHBOARD_CARD_PAGE: 'dashboard__card--page',
|
||||
|
||||
DATATABLE_EDITOR: 'datatable-editor',
|
||||
DATATABLE_EDITOR_ACTIONS: 'datatable-editor__actions',
|
||||
DATATABLE_EDITOR_ITEMS_ENTRIES: 'items-entries-table',
|
||||
DATATABLE_EDITOR_HAS_TOTAL_ROW: 'has-total-row',
|
||||
|
||||
DASHBOARD_CONTENT: 'dashboard-content',
|
||||
DASHBOARD_CONTENT_PREFERENCES: 'dashboard-content--preferences',
|
||||
DASHBOARD_CONTENT_PANE: 'Pane2',
|
||||
DASHBOARD_CENTERED_EMPTY_STATUS: 'dashboard__centered-empty-status',
|
||||
|
||||
PAGE_FORM: 'page-form',
|
||||
PAGE_FORM_HEADER: 'page-form__header',
|
||||
PAGE_FORM_HEADER_PRIMARY: 'page-form__primary-section',
|
||||
PAGE_FORM_HEADER_FIELDS: 'page-form__header-fields',
|
||||
PAGE_FORM_HEADER_BIG_NUMBERS: 'page-form__big-numbers',
|
||||
PAGE_FORM_TABS: 'page-form__tabs',
|
||||
PAGE_FORM_BODY: 'page-form__body',
|
||||
PAGE_FORM_STRIP_STYLE: 'page-form--strip',
|
||||
|
||||
PAGE_FORM_FOOTER: 'page-form__footer',
|
||||
PAGE_FORM_FLOATING_ACTIONS: 'page-form__floating-actions',
|
||||
|
||||
PAGE_FORM_BILL: 'page-form--bill',
|
||||
PAGE_FORM_ESTIMATE: 'page-form--estimate',
|
||||
PAGE_FORM_INVOICE: 'page-form--invoice',
|
||||
PAGE_FORM_RECEIPT: 'page-form--receipt',
|
||||
PAGE_FORM_PAYMENT_MADE: 'page-form--payment-made',
|
||||
PAGE_FORM_PAYMENT_RECEIVE: 'page-form--payment-receive',
|
||||
PAGE_FORM_CUSTOMER: 'page-form--customer',
|
||||
PAGE_FORM_VENDOR: 'page-form--vendor',
|
||||
PAGE_FORM_ITEM: 'page-form--item',
|
||||
PAGE_FORM_MAKE_JOURNAL: 'page-form--make-journal-entries',
|
||||
PAGE_FORM_EXPENSE: 'page-form--expense',
|
||||
|
||||
FORM_GROUP_LIST_SELECT: 'form-group--select-list',
|
||||
|
||||
CLOUD_SPINNER: 'cloud-spinner',
|
||||
IS_LOADING: 'is-loading',
|
||||
|
||||
DATATABLE_EMPTY_STATUS: 'datatable-empty-status',
|
||||
DATATABLE_EMPTY_STATUS_TITLE: 'datatable-empty-status__title',
|
||||
DATATABLE_EMPTY_STATUS_DESC: 'datatable-empty-status__desc',
|
||||
DATATABLE_EMPTY_STATUS_ACTIONS: 'datatable-empty-status__actions',
|
||||
|
||||
SELECT_LIST_FILL_POPOVER: 'select-list--fill-popover',
|
||||
|
||||
PREFERENCES_PAGE: 'preferences-page',
|
||||
PREFERENCES_PAGE_SIDEBAR: 'preferences-page__sidebar',
|
||||
PREFERENCES_PAGE_TOPBAR: 'preferences-page__topbar',
|
||||
PREFERENCES_PAGE_CONTENT: 'preferences-page__content',
|
||||
PREFERENCES_PAGE_TABS: 'preferences-page__tabs',
|
||||
|
||||
PREFERENCES_SIDEBAR: 'preferences-sidebar',
|
||||
PREFERENCES_TOPBAR: 'preferences-topbar',
|
||||
|
||||
PREFERENCES_PAGE_INSIDE_CONTENT: 'preferences-page__inside-content',
|
||||
PREFERENCES_PAGE_INSIDE_CONTENT_GENERAL: 'preferences-page__inside-content--general',
|
||||
PREFERENCES_PAGE_INSIDE_CONTENT_USERS: 'preferences-page__inside-content--users',
|
||||
PREFERENCES_PAGE_INSIDE_CONTENT_CURRENCIES: 'preferences-page__inside-content--currencies',
|
||||
PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT: 'preferences-page__inside-content--accountant',
|
||||
|
||||
FINANCIAL_REPORT_INSIDER: 'dashboard__insider--financial-report',
|
||||
|
||||
|
||||
UNIVERSAL_SEARCH: 'universal-search',
|
||||
UNIVERSAL_SEARCH_OMNIBAR: 'universal-search__omnibar',
|
||||
UNIVERSAL_SEARCH_OVERLAY: 'universal-search-overlay',
|
||||
UNIVERSAL_SEARCH_INPUT: 'universal-search__input',
|
||||
UNIVERSAL_SEARCH_INPUT_RIGHT_ELEMENTS: 'universal-search-input-right-elements',
|
||||
UNIVERSAL_SEARCH_TYPE_SELECT_OVERLAY: 'universal-search__type-select-overlay',
|
||||
UNIVERSAL_SEARCH_TYPE_SELECT_BTN: 'universal-search__type-select-btn',
|
||||
UNIVERSAL_SEARCH_FOOTER: 'universal-search__footer',
|
||||
|
||||
UNIVERSAL_SEARCH_ACTIONS: 'universal-search__actions',
|
||||
UNIVERSAL_SEARCH_ACTION_SELECT: 'universal-search__action universal-search__action--select',
|
||||
UNIVERSAL_SEARCH_ACTION_CLOSE: 'universal-search__action universal-search__action--close',
|
||||
UNIVERSAL_SEARCH_ACTION_ARROWS: 'universal-search__action universal-search__action--arrows',
|
||||
|
||||
DIALOG_PDF_PREVIEW: 'dialog--pdf-preview-dialog',
|
||||
|
||||
...Classes,
|
||||
CARD: 'card',
|
||||
ALIGN_RIGHT: 'align-right',
|
||||
FONT_BOLD: 'font-bold',
|
||||
};
|
||||
|
||||
export {
|
||||
CLASSES,
|
||||
}
|
||||
7
src/common/contactsOptions.js
Normal file
7
src/common/contactsOptions.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export default [
|
||||
{ name: intl.get('customer'), path: 'customers' },
|
||||
{ name: intl.get('vendor'), path: 'vendors' },
|
||||
];
|
||||
8
src/common/countries.js
Normal file
8
src/common/countries.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getCountries = () => [
|
||||
{
|
||||
name: intl.get('libya'),
|
||||
value: 'libya',
|
||||
},
|
||||
];
|
||||
23
src/common/currencies.js
Normal file
23
src/common/currencies.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import currencies from 'js-money/lib/currency';
|
||||
import { sortBy } from 'lodash';
|
||||
|
||||
export const getCurrencies = () => [
|
||||
{ name: intl.get('us_dollar'), code: 'USD' },
|
||||
{ name: intl.get('euro'), code: 'EUR' },
|
||||
{ name: intl.get('libyan_diner'), code: 'LYD' },
|
||||
];
|
||||
|
||||
export const getAllCurrenciesOptions = () => {
|
||||
const codes = Object.keys(currencies);
|
||||
const sortedCodes = sortBy(codes);
|
||||
|
||||
return sortedCodes.map((code) => {
|
||||
const currency = currencies[code];
|
||||
|
||||
return {
|
||||
key: code,
|
||||
name: `${code} - ${currency.name}`,
|
||||
};
|
||||
});
|
||||
};
|
||||
7
src/common/dataTypes.js
Normal file
7
src/common/dataTypes.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export const DATATYPES_LENGTH = {
|
||||
STRING: 255,
|
||||
TEXT: 65535,
|
||||
INT_10: 4294967295,
|
||||
DECIMAL_13_3: 9999999999.999,
|
||||
DECIMAL_15_5: 999999999999.999,
|
||||
};
|
||||
41
src/common/dateFormatsOptions.js
Normal file
41
src/common/dateFormatsOptions.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import moment from 'moment';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getDateFormats =()=> [
|
||||
{
|
||||
id: 1,
|
||||
name: intl.get('mm_dd_yy'),
|
||||
label: `${moment().format('MM/DD/YYYY')}`,
|
||||
value: 'mm/dd/yy',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: intl.get('dd_mm_yy'),
|
||||
label: `${moment().format('DD/MM/YYYY')}`,
|
||||
value: 'dd/mm/yy',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: intl.get('yy_mm_dd'),
|
||||
label: `${moment().format('YYYY/MM/DD')}`,
|
||||
value: 'yy/mm/dd',
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: intl.get('mm_dd_yy'),
|
||||
label: `${moment().format('MM-DD-YYYY')}`,
|
||||
value: 'mm-dd-yy',
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: intl.get('dd_mm_yy_'),
|
||||
label: `${moment().format('DD-MM-YYYY')}`,
|
||||
value: 'dd-mm-yy',
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: intl.get('yy_mm_dd_'),
|
||||
label: `${moment().format('YYYY-MM-DD')}`,
|
||||
value: 'yy-mm-dd',
|
||||
},
|
||||
];
|
||||
12
src/common/drawers.js
Normal file
12
src/common/drawers.js
Normal file
@@ -0,0 +1,12 @@
|
||||
export const DRAWERS = {
|
||||
ESTIMATE_DRAWER: 'estimate-drawer',
|
||||
MANUAL_JOURNAL_DRAWER: 'journal-drawer',
|
||||
INVOICE_DRAWER: 'invoice-drawer',
|
||||
RECEIPT_DRAWER: 'receipt-drawer',
|
||||
PAYMENT_RECEIVE_DRAWER: 'payment-receive-drawer',
|
||||
ACCOUNT_DRAWER: 'account-drawer',
|
||||
JOURNAL_DRAWER: 'journal-drawer',
|
||||
EXPENSE_DRAWER: 'expense-drawer',
|
||||
BILL_DRAWER: 'bill-drawer',
|
||||
INVENTORY_ADJUSTMENT_DRAWER: 'inventory-adjustment-drawer',
|
||||
};
|
||||
19
src/common/errors.js
Normal file
19
src/common/errors.js
Normal file
@@ -0,0 +1,19 @@
|
||||
export const ERROR = {
|
||||
// Sales Estimates
|
||||
ESTIMATE_NUMBER_IS_NOT_UNQIUE: 'ESTIMATE.NUMBER.IS.NOT.UNQIUE',
|
||||
SALE_ESTIMATE_NO_IS_REQUIRED: 'SALE_ESTIMATE_NO_IS_REQUIRED',
|
||||
|
||||
// Sales Invoices
|
||||
SALE_INVOICE_NUMBER_IS_EXISTS: 'SALE.INVOICE.NUMBER.IS.EXISTS',
|
||||
SALE_INVOICE_NO_NOT_UNIQUE: 'SALE_INVOICE_NO_NOT_UNIQUE',
|
||||
SALE_ESTIMATE_IS_ALREADY_CONVERTED_TO_INVOICE:
|
||||
'SALE_ESTIMATE_IS_ALREADY_CONVERTED_TO_INVOICE',
|
||||
|
||||
// Sales Receipts
|
||||
SALE_RECEIPT_NUMBER_NOT_UNIQUE: 'SALE_RECEIPT_NUMBER_NOT_UNIQUE',
|
||||
SALE_RECEIPT_NO_IS_REQUIRED: 'SALE_RECEIPT_NO_IS_REQUIRED',
|
||||
|
||||
// Bills
|
||||
BILL_NUMBER_EXISTS: 'BILL.NUMBER.EXISTS',
|
||||
SALE_INVOICE_NO_IS_REQUIRED: 'SALE_INVOICE_NO_IS_REQUIRED',
|
||||
};
|
||||
52
src/common/fiscalYearOptions.js
Normal file
52
src/common/fiscalYearOptions.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getFiscalYear = () => [
|
||||
{
|
||||
name: `${intl.get('january')} - ${intl.get('december')}`,
|
||||
key: 'january',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('february')} - ${intl.get('january')}`,
|
||||
key: 'february',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('march')} - ${intl.get('february')}`,
|
||||
key: 'march',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('april')} - ${intl.get('march')}`,
|
||||
key: 'april',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('may')} - ${intl.get('april')}`,
|
||||
key: 'may',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('june')} - ${intl.get('may')}`,
|
||||
key: 'june',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('july')} - ${intl.get('june')}`,
|
||||
key: 'july',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('august')} - ${intl.get('july')}`,
|
||||
key: 'august',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('september')} - ${intl.get('august')}`,
|
||||
key: 'september',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('october')} - ${intl.get('november')}`,
|
||||
key: 'october',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('november')} - ${intl.get('october')}`,
|
||||
key: 'november',
|
||||
},
|
||||
{
|
||||
name: `${intl.get('december')} - ${intl.get('november')}`,
|
||||
key: 'december',
|
||||
},
|
||||
]
|
||||
121
src/common/homepageOptions.js
Normal file
121
src/common/homepageOptions.js
Normal file
@@ -0,0 +1,121 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
|
||||
export const accountsReceivable = [
|
||||
{
|
||||
sectionTitle: <T id={'accounts_receivable_a_r'} />,
|
||||
shortcuts: [
|
||||
{
|
||||
title: <T id={'sales_invoices'} />,
|
||||
description: <T id={'tracking_sales_invoices_with_your_customers'} />,
|
||||
link: '/invoices',
|
||||
},
|
||||
{
|
||||
title: <T id={'sales_estimates'} />,
|
||||
description: <T id={'manage_your_sales_estimates_to_create_quotes'} />,
|
||||
link: '/estimates',
|
||||
},
|
||||
{
|
||||
title: <T id={'sales_receipts'} />,
|
||||
description: <T id={'manage_sales_receipts_for_sales_that_get_paid'} />,
|
||||
link: '/receipts',
|
||||
},
|
||||
{
|
||||
title: <T id={'customers'} />,
|
||||
description: <T id={'manage_the_customers_relations_with_customer'} />,
|
||||
link: '/customers',
|
||||
},
|
||||
{
|
||||
title: <T id={'customers_payments'} />,
|
||||
description: (
|
||||
<T id={'manage_payment_transactions_from_your_customers'} />
|
||||
),
|
||||
link: '/payment-receives',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export const accountsPayable = [
|
||||
{
|
||||
sectionTitle: <T id={'accounts_payable_a_p'} />,
|
||||
shortcuts: [
|
||||
{
|
||||
title: <T id={'purchase_invoices'} />,
|
||||
description: (
|
||||
<T id={'manage_the_purchase_invoices_with_your_vendors'} />
|
||||
),
|
||||
link: '/bills',
|
||||
},
|
||||
{
|
||||
title: <T id={'vendors'} />,
|
||||
description: (
|
||||
<T id={'manage_the_vendors_relations_with_vendor_relations'} />
|
||||
),
|
||||
link: '/vendors',
|
||||
},
|
||||
{
|
||||
title: <T id={'vendors_payments'} />,
|
||||
description: <T id={'manage_payments_transactions_to_your_vendors'} />,
|
||||
link: '/payment-mades',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export const financialAccounting = [
|
||||
{
|
||||
sectionTitle: <T id={'financial_accounting'} />,
|
||||
shortcuts: [
|
||||
{
|
||||
title: <T id={'chart_of_accounts'} />,
|
||||
description: (
|
||||
<T
|
||||
id={
|
||||
'manage_your_accounts_chart_to_record_your_transactions_and_categories'
|
||||
}
|
||||
/>
|
||||
),
|
||||
link: '/accounts',
|
||||
},
|
||||
{
|
||||
title: <T id={'manual_journal'}/>,
|
||||
description:<T id={'manage_manual_journal_transactions_on_accounts'}/>,
|
||||
link: '/manual-journals',
|
||||
},
|
||||
{
|
||||
title: <T id={'expenses'}/>,
|
||||
description:<T id={'track_your_indirect_expenses_under_specific_categories'}/>,
|
||||
link: '/expenses',
|
||||
},
|
||||
{
|
||||
title: <T id={'financial_statements'}/>,
|
||||
description:<T id={'show_financial_reports_about_your_organization'}/>,
|
||||
link: '/financial-reports',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export const productsServices = [
|
||||
{
|
||||
sectionTitle: <T id={'products_services_inventory'} />,
|
||||
shortcuts: [
|
||||
{
|
||||
title: <T id={'products_services'}/>,
|
||||
description:<T id={'manage_your_products_inventory_or_non_inventory'}/>,
|
||||
link: '/items',
|
||||
},
|
||||
{
|
||||
title: <T id={'products_services_categories'}/>,
|
||||
description:<T id={'group_your_products_and_service'}/>,
|
||||
link: 'items/categories',
|
||||
},
|
||||
{
|
||||
title: <T id={'inventory_adjustments'}/>,
|
||||
description: <T id={'manage_your_inventory_adjustment_of_inventory_items'}/>,
|
||||
link: '/inventory-adjustments',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
105
src/common/keyboardShortcutsOptions.js
Normal file
105
src/common/keyboardShortcutsOptions.js
Normal file
@@ -0,0 +1,105 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export default [
|
||||
{
|
||||
shortcut_key: 'Shift + I',
|
||||
description: intl.get('jump_to_the_invoices'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + E',
|
||||
description: intl.get('jump_to_the_estimates'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + R',
|
||||
description: intl.get('jump_to_the_receipts'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + X',
|
||||
description: intl.get('jump_to_the_expenses'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + C',
|
||||
description: intl.get('jump_to_the_customers'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + V',
|
||||
description: intl.get('jump_to_the_vendors'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + A',
|
||||
description: intl.get('jump_to_the_chart_of_accounts'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + B',
|
||||
description: intl.get('jump_to_the_bills'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + M',
|
||||
description: intl.get('jump_to_the_manual_journals'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + W',
|
||||
description: intl.get('jump_to_the_items'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + 1',
|
||||
description: intl.get('jump_to_the_balance_sheet'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + 2',
|
||||
description: intl.get('jump_to_the_profit_loss_sheet'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + 3',
|
||||
description: intl.get('jump_to_the_journal_sheet'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + 4',
|
||||
description: intl.get('jump_to_the_general_ledger_sheet'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Shift + 5',
|
||||
description: intl.get('jump_to_the_trial_balance_sheet'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + I ',
|
||||
description: intl.get('create_a_new_invoice'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + E ',
|
||||
description: intl.get('create_a_new_estimate'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + R ',
|
||||
description: intl.get('create_a_new_receipt'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + X ',
|
||||
description: intl.get('create_a_new_expense'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + C ',
|
||||
description: intl.get('create_a_new_customer'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + V ',
|
||||
description: intl.get('create_a_new_vendor'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + B ',
|
||||
description: intl.get('create_a_new_bill'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + M ',
|
||||
description: intl.get('create_a_new_journal'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + Shift + W ',
|
||||
description: intl.get('create_a_new_item'),
|
||||
},
|
||||
{
|
||||
shortcut_key: 'Ctrl + / ',
|
||||
description: intl.get('close_and_open_sidebar'),
|
||||
},
|
||||
];
|
||||
6
src/common/languagesOptions.js
Normal file
6
src/common/languagesOptions.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getLanguages = () => [
|
||||
{ name: intl.get('english'), value: 'en' },
|
||||
{ name: intl.get('arabic'), value: 'ar' },
|
||||
];
|
||||
21
src/common/numberFormatsOptions.js
Normal file
21
src/common/numberFormatsOptions.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const moneyFormat = [
|
||||
{ key: 'total', text: intl.get('total_rows') },
|
||||
{ key: 'always', text: intl.get('always') },
|
||||
{ key: 'none', text: intl.get('none') },
|
||||
];
|
||||
|
||||
export const negativeFormat = [
|
||||
{ key: 'parentheses', text: '($1000)' },
|
||||
{ key: 'mines', text: '-$1000' },
|
||||
];
|
||||
|
||||
export const decimalPlaces = [
|
||||
{ text: '$1', key: 0 },
|
||||
{ text: '$0.1', key: 1 },
|
||||
{ text: '$0.01', key: 2 },
|
||||
{ text: '$0.001', key: 3 },
|
||||
{ text: '$0.0001', key: 4 },
|
||||
{ text: '$0.00001', key: 5 },
|
||||
];
|
||||
10
src/common/quickNewOptions.js
Normal file
10
src/common/quickNewOptions.js
Normal file
@@ -0,0 +1,10 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getQuickNewActions = () => [
|
||||
{ path: 'invoices/new', name: intl.get('sale_invoice') },
|
||||
{ path: 'bills/new', name: intl.get('purchase_invoice') },
|
||||
{ path: 'make-journal-entry', name: intl.get('manual_journal') },
|
||||
{ path: 'expenses/new', name: intl.get('expense') },
|
||||
{ path: 'customers/new', name: intl.get('customer') },
|
||||
{ path: 'vendors/new', name: intl.get('vendor') },
|
||||
];
|
||||
16
src/common/registerWizard.js
Normal file
16
src/common/registerWizard.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
export const getSetupWizardSteps = () => [
|
||||
{
|
||||
label: intl.get('setup.plan.plans'),
|
||||
},
|
||||
{
|
||||
label: intl.get('setup.plan.getting_started'),
|
||||
},
|
||||
{
|
||||
label: intl.get('setup.plan.initializing'),
|
||||
},
|
||||
{
|
||||
label: intl.get('setup.plan.congrats'),
|
||||
},
|
||||
];
|
||||
14
src/common/resourcesTypes.js
Normal file
14
src/common/resourcesTypes.js
Normal file
@@ -0,0 +1,14 @@
|
||||
export const RESOURCES_TYPES = {
|
||||
INVOICE: 'invoice',
|
||||
ESTIMATE: 'estimate',
|
||||
RECEIPT: 'receipt',
|
||||
PAYMENT_RECEIVE: 'payment_receive',
|
||||
PAYMENT_MADE: 'payment_made',
|
||||
CUSTOMER: 'customer',
|
||||
VENDOR: 'vendor',
|
||||
ITEM: 'item',
|
||||
BILL: 'bill',
|
||||
EXPENSE: 'expense',
|
||||
MANUAL_JOURNAL: 'manual_journal',
|
||||
ACCOUNT: 'account',
|
||||
};
|
||||
9
src/common/subscriptionModels.js
Normal file
9
src/common/subscriptionModels.js
Normal file
@@ -0,0 +1,9 @@
|
||||
// Subscription plans.
|
||||
export const plans = [
|
||||
|
||||
];
|
||||
|
||||
// Payment methods.
|
||||
export const paymentMethods = [
|
||||
|
||||
];
|
||||
15
src/common/tables.js
Normal file
15
src/common/tables.js
Normal file
@@ -0,0 +1,15 @@
|
||||
export const TABLES = {
|
||||
ITEMS: 'items',
|
||||
INVENTORY_ADJUSTMENTS: 'inventory_adjustment',
|
||||
ESTIMATES: 'estimates',
|
||||
INVOICES: 'invoices',
|
||||
RECEIPTS: 'receipts',
|
||||
PAYMENT_RECEIVES: 'payment_receives',
|
||||
BILLS: 'bills',
|
||||
PAYMENT_MADES: 'payment_mades',
|
||||
CUSTOMER: 'customers',
|
||||
VENDORS: 'vendors',
|
||||
ACCOUNTS: 'accounts',
|
||||
MANUAL_JOURNALS: 'manual_journal',
|
||||
EXPENSES: 'expenses',
|
||||
};
|
||||
Reference in New Issue
Block a user