Compare commits

..

2 Commits

Author SHA1 Message Date
elforjani13
c49a240280 BIG-359: 2022-04-03 19:42:11 +02:00
elforjani13
dbf4666dfc BIG-163: add journal type select. 2022-04-03 17:42:04 +02:00
44 changed files with 426 additions and 728 deletions

View File

@@ -2,19 +2,6 @@
All notable changes to Bigcapital server-side will be in this file.
## [1.7.3-rc.2] - 15-04-2022
### Fixed
- `BIG-372` Activate branches and warehouses dialog reloading once activating.
- `BIG-373` Issue general ledger report select specific account.
- `BIG-377` Make readonly details entries as oneline with tooltip for more details.
## [1.7.2-rc.2] - 04-04-2022
### Fixed
- Add the missing Arabic localization.
- Subscription plans modifications.
## [1.7.1-rc.2] - 30-03-2022
## Added

View File

@@ -85,9 +85,6 @@ function getClientEnvironment(publicUrl) {
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
// Application version.
VERSION: paths.appVersion
}
);
// Stringify all values so we can feed into webpack DefinePlugin

View File

@@ -48,8 +48,6 @@ const resolveModule = (resolveFn, filePath) => {
return resolveFn(`${filePath}.js`);
};
const appVersion = require(resolveApp('package.json')).version;
// config after eject: we're in ./config/
module.exports = {
dotenv: resolveApp('.env'),
@@ -67,7 +65,6 @@ module.exports = {
proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'),
publicUrlOrPath,
appVersion
};

View File

@@ -0,0 +1,8 @@
import intl from 'react-intl-universal';
export const journalTypes = [
{
name: intl.get('journal'),
value: 'Journal',
},
];

View File

@@ -11,7 +11,7 @@ export const CommercialDocHeader = styled.div`
`;
export const CommercialDocTopHeader = styled.div`
margin-bottom: 30px;
margin-bottom: 25px;
`;
export const CommercialDocEntriesTable = styled(DataTable)`

View File

@@ -1,27 +0,0 @@
import React from 'react';
import { Tooltip, Position } from '@blueprintjs/core';
/**
* Text overview tooltip cell.
* @returns {JSX.Element}
*/
export function TextOverviewTooltipCell({ cell: { value } }) {
const SUBMENU_POPOVER_MODIFIERS = {
flip: { boundariesElement: 'viewport', padding: 20 },
offset: { offset: '0, 10' },
preventOverflow: { boundariesElement: 'viewport', padding: 40 },
};
return (
<Tooltip
content={value}
position={Position.BOTTOM_LEFT}
boundary={'viewport'}
minimal={true}
modifiers={SUBMENU_POPOVER_MODIFIERS}
targetClassName={'table-tooltip-overview-target'}
>
{value}
</Tooltip>
);
}

View File

@@ -10,7 +10,6 @@ import CheckBoxFieldCell from './CheckBoxFieldCell';
import SwitchFieldCell from './SwitchFieldCell';
import TextAreaCell from './TextAreaCell';
import BranchesListFieldCell from './BranchesListFieldCell';
import { TextOverviewTooltipCell } from './TextOverviewTooltipCell';
export {
AccountsListFieldCell,
@@ -26,5 +25,4 @@ export {
SwitchFieldCell,
TextAreaCell,
BranchesListFieldCell,
TextOverviewTooltipCell,
};

View File

@@ -28,7 +28,7 @@ export default function Sidebar({ dashboardContentRef }) {
* @returns {React.JSX}
*/
function SidebarFooterVersion() {
const { VERSION } = process.env;
const { REACT_APP_VERSION: VERSION } = process.env;
if (!VERSION) {
return null;

View File

@@ -49,6 +49,7 @@ import DrawerHeaderContent from './Drawer/DrawerHeaderContent';
import Postbox from './Postbox';
import AccountsSuggestField from './AccountsSuggestField';
import MaterialProgressBar from './MaterialProgressBar';
import { MoneyFieldCell } from './DataTableCells';
import AvaterCell from './AvaterCell';
import { ItemsMultiSelect } from './Items';
@@ -104,7 +105,6 @@ export * from './Currencies';
export * from './FormTopbar'
export * from './Paper';
export * from './Accounts'
export * from './DataTableCells';
const Hint = FieldHint;
@@ -167,6 +167,7 @@ export {
Postbox,
AccountsSuggestField,
MaterialProgressBar,
MoneyFieldCell,
ItemsMultiSelect,
AvaterCell,
MoreMenuItems,

View File

@@ -1,45 +0,0 @@
export enum ISidebarMenuItemType {
Label = 'label',
Link = 'link',
Group = 'group',
Overlay = 'overlay'
}
export interface ISidebarMenuItemOverlay extends ISidebarMenuItemCommon {
type: ISidebarMenuItemType.Overlay;
}
export interface ISidebarMenuItemLink extends ISidebarMenuItemCommon {
text: string | JSX.Element;
href: string;
type: ISidebarMenuItemType.Link;
matchExact?: boolean;
}
export interface ISidebarMenuItemLabel extends ISidebarMenuItemCommon {
text?: string;
type: ISidebarMenuItemType.Label;
}
export interface ISidebarMenuItemGroup extends ISidebarMenuItemCommon {
type: ISidebarMenuItemType.Group;
}
export interface ISidebarMenuItemPermission {
subject: string;
ability: string;
}
export interface ISidebarMenuItemCommon {
ability?: ISidebarMenuItemPermission | ISidebarMenuItemPermission[];
feature?: string;
disabled?: boolean;
children?: ISidebarMenuItem[];
onlySubscriptionExpired?: boolean;
}
export type ISidebarMenuItem =
| ISidebarMenuItemLink
| ISidebarMenuItemLabel
| ISidebarMenuItemGroup
| ISidebarMenuItemOverlay;

View File

@@ -4,6 +4,7 @@ import {
FormGroup,
Position,
ControlGroup,
Classes,
} from '@blueprintjs/core';
import { FastField, ErrorMessage } from 'formik';
import { DateInput } from '@blueprintjs/datetime';
@@ -11,6 +12,8 @@ import { FormattedMessage as T } from 'components';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { journalTypes } from '../../../common/journalTypes';
import { FFormGroup } from '../../../components';
import {
momentFormatter,
compose,
@@ -28,12 +31,13 @@ import {
} from 'components';
import withSettings from 'containers/Settings/withSettings';
import { useMakeJournalFormContext } from './MakeJournalProvider';
import { JournalExchangeRateInputField } from './components';
import { JournalExchangeRateInputField, JournalTypeSelect } from './components';
import withDialogActions from 'containers/Dialog/withDialogActions';
import {
currenciesFieldShouldUpdate,
useObserveJournalNoSettings,
} from './utils';
/**
* Make journal entries header.
*/
@@ -169,21 +173,18 @@ function MakeJournalEntriesHeader({
</FastField>
{/*------------ Journal type -----------*/}
<FastField name={'journal_type'}>
{({ form, field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'journal_type'} />}
className={classNames('form-group--account-type', CLASSES.FILL)}
inline={true}
>
<InputGroup
intent={inputIntent({ error, touched })}
fill={true}
{...field}
/>
</FormGroup>
)}
</FastField>
<FFormGroup
name={'journal_type'}
label={<T id={'journal_type'} />}
inline={true}
className={classNames('form-group--select-list', Classes.FILL)}
>
<JournalTypeSelect
items={journalTypes}
name={'journal_type'}
popoverProps={{ minimal: true }}
/>
</FFormGroup>
{/*------------ Currency -----------*/}
<FastField

View File

@@ -9,6 +9,7 @@ import {
Icon,
Hint,
FormattedMessage as T,
FSelect,
} from 'components';
import {
AccountsListFieldCell,
@@ -183,3 +184,71 @@ export function JournalExchangeRateInputField({ ...props }) {
/>
);
}
/**
*
* @param {*} query
* @param {*} journal
* @param {*} _index
* @param {*} exactMatch
* @returns
*/
const itemPredicate = (query, journal, _index, exactMatch) => {
const normalizedTitle = journal.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return normalizedTitle.indexOf(normalizedQuery) >= 0;
}
};
/**
*
* @param {*} item
* @param {*} param1
* @returns
*/
const itemRenderer = (item, { handleClick, modifiers, query }) => {
return (
<MenuItem
active={modifiers.active}
disabled={modifiers.disabled}
text={item.name}
label={item.label}
key={item.id}
onClick={handleClick}
/>
);
};
const itemSelectProps = {
itemPredicate: itemPredicate,
itemRenderer: itemRenderer,
valueAccessor: 'name',
labelAccessor: 'name',
};
export function JournalTypeSelect({ items, ...rest }) {
return (
<FSelect
{...itemSelectProps}
{...rest}
items={items}
input={itemSelectButton}
/>
);
}
/**
* @param {*} label
* @returns
*/
function itemSelectButton({ label }) {
return (
<Button
text={label ? label : intl.get('make_journal.label.select_journal_type')}
/>
);
}

View File

@@ -57,7 +57,9 @@ function BillTransactionDeleteAlert({
loading={isLoading}
>
<p>
<T id={`landed_cost.once_your_delete_this_located_landed_cost`} />
<T
id={`Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?`}
/>
</p>
</Alert>
);

View File

@@ -79,10 +79,6 @@ export const handleCashFlowTransactionType = (reference, openDrawer) => {
return openDrawer('refund-vendor-detail-drawer', {
refundTransactionId: reference.reference_id,
});
case 'InventoryAdjustment':
return openDrawer('inventory-adjustment-drawer', {
inventoryId: reference.reference_id,
});
default:
return openDrawer('cashflow-transaction-drawer', {

View File

@@ -37,7 +37,7 @@ function AllocateLandedCostFloatingActions({
<DialogFooterActions alignment={'left'}>
{costTransactionEntry && (
<UnallocatedAmount>
<T id={'landed_cost.dialog.label_unallocated_cost_amount'}/>
Unallocated cost Amount:{' '}
<strong>{formattedUnallocatedCostAmount}</strong>
</UnallocatedAmount>
)}

View File

@@ -42,10 +42,7 @@ function AllocateLandedCostForm({
.map((entry) => transformToForm(entry, defaultInitialValues.items[0]));
if (entries.length <= 0) {
AppToaster.show({
message: intl.get('something_wrong'),
intent: Intent.DANGER,
});
AppToaster.show({ message: 'Something wrong!', intent: Intent.DANGER });
return;
}
const form = {
@@ -72,14 +69,13 @@ function AllocateLandedCostForm({
)
) {
AppToaster.show({
message: intl.get(
'landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line',
),
message:
'The total located cost is bigger than the transaction line.',
intent: Intent.DANGER,
});
} else {
AppToaster.show({
message: intl.get('something_went_wrong'),
message: 'Something went wrong!',
intent: Intent.DANGER,
});
}

View File

@@ -9,7 +9,7 @@ const BranchActivateContext = React.createContext();
* Branch activate form provider.
*/
function BranchActivateFormProvider({ dialogName, ...props }) {
const { mutateAsync: activateBranches } = useActivateBranches();
const { mutateAsync: activateBranches, isLoading } = useActivateBranches();
// State provider.
const provider = {
@@ -18,7 +18,7 @@ function BranchActivateFormProvider({ dialogName, ...props }) {
};
return (
<DialogContent>
<DialogContent isLoading={isLoading}>
<BranchActivateContext.Provider value={provider} {...props} />
</DialogContent>
);

View File

@@ -36,7 +36,7 @@ function PaymentViaLicenseDialogContent({
setSubmitting(true);
const mutateValues = {
plan_slug: `essentials-monthly`,
plan_slug: `${values.plan_slug}-${values.period}ly`,
license_code: values.license_code,
};
// Payment via voucher mutate.

View File

@@ -9,7 +9,8 @@ const WarehouseActivateContext = React.createContext();
* warehouse activate form provider.
*/
function WarehouseActivateFormProvider({ dialogName, ...props }) {
const { mutateAsync: activateWarehouses } = useActivateWarehouses();
const { mutateAsync: activateWarehouses, isLoading } =
useActivateWarehouses();
// State provider.
const provider = {
@@ -18,7 +19,7 @@ function WarehouseActivateFormProvider({ dialogName, ...props }) {
};
return (
<DialogContent>
<DialogContent isLoading={isLoading}>
<WarehouseActivateContext.Provider value={provider} {...props} />
</DialogContent>
);

View File

@@ -13,81 +13,57 @@ import {
} from '@blueprintjs/core';
import {
FormatNumberCell,
TextOverviewTooltipCell,
FormattedMessage as T,
Choose,
Icon,
} from '../../../components';
import { getColumnWidth } from 'utils';
import { useBillDrawerContext } from './BillDrawerProvider';
/**
* Retrieve bill readonly details entries table columns.
*/
export const useBillReadonlyEntriesTableColumns = () => {
const {
bill: { entries },
} = useBillDrawerContext();
return React.useMemo(
export const useBillReadonlyEntriesTableColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 150,
className: 'item',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};
/**
* Bill details status.

View File

@@ -10,81 +10,56 @@ import {
Tag,
Intent,
} from '@blueprintjs/core';
import { getColumnWidth } from 'utils';
import {
Icon,
FormattedMessage as T,
TextOverviewTooltipCell,
FormatNumberCell,
Choose,
} from '../../../components';
import { useCreditNoteDetailDrawerContext } from './CreditNoteDetailDrawerProvider';
export const useCreditNoteReadOnlyEntriesColumns = () => {
// credit note details drawer context.
const {
creditNote: { entries },
} = useCreditNoteDetailDrawerContext();
return React.useMemo(
export const useCreditNoteReadOnlyEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 150,
className: 'name',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};
/**
* Credit note more actions mneu.

View File

@@ -1,74 +1,47 @@
import React from 'react';
import intl from 'react-intl-universal';
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
import { getColumnWidth } from 'utils';
import { useEstimateDetailDrawerContext } from './EstimateDetailDrawerProvider';
import { FormatNumberCell } from '../../../components';
/**
* Retrieve table columns of estimate readonly entries details.
*/
export const useEstimateReadonlyEntriesColumns = () => {
// estimate details drawer context.
const {
estimate: { entries },
} = useEstimateDetailDrawerContext();
return React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 150,
className: 'name',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};
export const useEstimateReadonlyEntriesColumns = () =>
React.useMemo(() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
width: 150,
className: 'name',
disableSortBy: true,
},
{
Header: intl.get('description'),
accessor: 'description',
className: 'description',
disableSortBy: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
},
], []);

View File

@@ -1,46 +1,33 @@
import React from 'react';
import intl from 'react-intl-universal';
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
import { useExpenseDrawerContext } from './ExpenseDrawerProvider';
import { getColumnWidth } from 'utils';
import { FormatNumberCell } from '../../../components';
/**
* Retrieve expense readonly details entries table columns.
*/
export const useExpenseReadEntriesColumns = () => {
// Expense drawer context.
const {
expense: { categories },
} = useExpenseDrawerContext();
return React.useMemo(
export const useExpenseReadEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('expense_account'),
accessor: 'expense_account.name',
Cell: TextOverviewTooltipCell,
width: 110,
disableSortBy: true,
textOverview: true,
className: 'account',
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
width: 110,
disableSortBy: true,
textOverview: true,
className: 'description',
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(categories, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
disableSortBy: true,
className: 'amount',
align: 'right',
@@ -48,4 +35,3 @@ export const useExpenseReadEntriesColumns = () => {
],
[],
);
};

View File

@@ -1,60 +1,37 @@
import React from 'react';
import intl from 'react-intl-universal';
import { getColumnWidth } from 'utils';
import { TextOverviewTooltipCell } from 'components';
import { useInventoryAdjustmentDrawerContext } from './InventoryAdjustmentDrawerProvider';
export const useInventoryAdjustmentEntriesColumns = () => {
// Inventory adjustment details drawer context.
const {
inventoryAdjustment: { entries },
} = useInventoryAdjustmentDrawerContext();
return React.useMemo(
export const useInventoryAdjustmentEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('inventory_adjustment.column.product'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 100,
width: 150,
className: 'name',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('cost'),
accessor: 'cost',
width: getColumnWidth(entries, 'cost', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('value'),
accessor: 'value',
width: getColumnWidth(entries, 'value', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};

View File

@@ -11,14 +11,12 @@ import {
Intent,
Tag,
} from '@blueprintjs/core';
import { getColumnWidth } from 'utils';
import {
FormatNumberCell,
Icon,
FormattedMessage as T,
Choose,
Can,
TextOverviewTooltipCell,
} from 'components';
import {
SaleInvoiceAction,
@@ -29,69 +27,49 @@ import { useInvoiceDetailDrawerContext } from './InvoiceDetailDrawerProvider';
/**
* Retrieve invoice readonly details table columns.
*/
export const useInvoiceReadonlyEntriesColumns = () => {
// Invoice details drawer context.
const {
invoice: { entries },
} = useInvoiceDetailDrawerContext();
return React.useMemo(
export const useInvoiceReadonlyEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
disableSortBy: true,
textOverview: true,
width: 150,
className: 'name',
disableSortBy: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
},
],
[],
);
};
/**
* Invoice details more actions menu.

View File

@@ -10,10 +10,7 @@ import { TableStyle } from '../../../common';
* Manual journal drawer table.
*/
export default function ManualJournalDrawerTable() {
// Retrieves the readonly manual journal entries columns.
const columns = useManualJournalEntriesColumns();
// Manual journal drawer context.
const { manualJournal } = useManualJournalDrawerContext();
return (

View File

@@ -1,17 +1,28 @@
import intl from 'react-intl-universal';
import React from 'react';
import { Tag, Intent } from '@blueprintjs/core';
import { Tag, Intent, Classes, Tooltip, Position } from '@blueprintjs/core';
import {
T,
Choose,
FormatNumberCell,
TextOverviewTooltipCell,
} from '../../../components';
import { T, Choose, FormatNumberCell, If, Icon } from '../../../components';
import { Features } from 'common';
import { getColumnWidth } from 'utils';
import { useFeatureCan } from 'hooks/state';
import { useManualJournalDrawerContext } from './ManualJournalDrawerProvider';
/**
* Note column accessor.
*/
export function NoteAccessor(row) {
return (
<If condition={row.note}>
<Tooltip
className={Classes.TOOLTIP_INDICATOR}
content={row.note}
position={Position.LEFT_TOP}
hoverOpenDelay={50}
>
<Icon icon={'file-alt'} iconSize={16} />
</Tooltip>
</If>
);
}
/**
* Publish column accessor.
@@ -39,45 +50,37 @@ export function ManualJournalDetailsStatus({ manualJournal }) {
*/
export const useManualJournalEntriesColumns = () => {
const { featureCan } = useFeatureCan();
// manual journal details drawer context.
const {
manualJournal: { entries },
} = useManualJournalDrawerContext();
return React.useMemo(
() => [
{
Header: intl.get('account_name'),
Cell: TextOverviewTooltipCell,
accessor: 'account.name',
width: 130,
disableSortBy: true,
textOverview: true,
className: 'account',
},
{
Header: intl.get('contact'),
accessor: 'contact.display_name',
Cell: TextOverviewTooltipCell,
width: 100,
width: 130,
disableSortBy: true,
textOverview: true,
className: 'contact',
},
{
Header: intl.get('note'),
accessor: 'note',
Cell: TextOverviewTooltipCell,
accessor: NoteAccessor,
width: 80,
disableSortBy: true,
textOverview: true,
width: 100,
className: 'note',
},
...(featureCan(Features.Branches)
? [
{
Header: intl.get('branch'),
width: 100,
width: 130,
accessor: 'branch.name',
disableSortBy: true,
className: 'branch',
},
]
: []),
@@ -85,31 +88,25 @@ export const useManualJournalEntriesColumns = () => {
Header: intl.get('credit'),
accessor: 'credit',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'credit', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
disableResizable: true,
disableSortBy: true,
textOverview: true,
formatNumber: { noZero: true },
className: 'credit',
align: 'right',
},
{
Header: intl.get('debit'),
accessor: 'debit',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'debit', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
disableResizable: true,
textOverview: true,
disableSortBy: true,
formatNumber: { noZero: true },
className: 'debit',
align: 'right',
},
],
[],
[featureCan],
);
};

View File

@@ -3,65 +3,43 @@ import intl from 'react-intl-universal';
import moment from 'moment';
import { FormatNumberCell } from '../../../components';
import { getColumnWidth } from 'utils';
import { usePaymentMadeDetailContext } from './PaymentMadeDetailProvider';
export const usePaymentMadeEntriesColumns = () => {
// Payment made details context.
const {
paymentMade: { entries },
} = usePaymentMadeDetailContext();
return React.useMemo(
() => [
{
Header: intl.get('date'),
accessor: (row) => moment(row.date).format('YYYY MMM DD'),
width: 100,
disableSortBy: true,
className: 'date',
},
{
Header: intl.get('bill_number'),
accessor: 'bill_no',
width: 150,
disableSortBy: true,
className: 'bill_number',
},
{
Header: intl.get('bill_amount'),
accessor: 'bill.amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'bill.amount', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
},
{
Header: intl.get('due_amount'),
accessor: 'bill.due_amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'bill.due_amount', {
minWidth: 60,
magicSpacing: 5,
}),
disableSortBy: true,
align: 'right',
},
{
Header: intl.get('payment_amount'),
accessor: 'payment_amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'payment_amount', {
minWidth: 60,
magicSpacing: 5,
}),
disableSortBy: true,
textOverview: true,
align: 'right',
},
],
[],
);
};
export const usePaymentMadeEntriesColumns = () =>
React.useMemo(() => [
{
Header: intl.get('date'),
accessor: (row) => moment(row.date).format('YYYY MMM DD'),
width: 100,
disableSortBy: true,
className: 'date',
},
{
Header: intl.get('bill_number'),
accessor: 'bill_no',
width: 150,
disableSortBy: true,
className: 'bill_number',
},
{
Header: intl.get('bill_amount'),
accessor: 'bill.amount',
Cell: FormatNumberCell,
align: 'right',
},
{
Header: intl.get('due_amount'),
accessor: 'bill.due_amount',
Cell: FormatNumberCell,
width: 100,
disableSortBy: true,
align: 'right',
},
{
Header: intl.get('payment_amount'),
accessor: 'payment_amount',
Cell: FormatNumberCell,
width: 100,
disableSortBy: true,
align: 'right',
},
], []);

View File

@@ -2,18 +2,12 @@ import React from 'react';
import intl from 'react-intl-universal';
import moment from 'moment';
import { FormatNumberCell } from '../../../components';
import { getColumnWidth } from 'utils';
import { usePaymentReceiveDetailContext } from './PaymentReceiveDetailProvider';
/**
* Retrieve payment entries table columns.
*/
export const usePaymentReceiveEntriesColumns = () => {
const {
paymentReceive: { entries },
} = usePaymentReceiveDetailContext();
return React.useMemo(
export const usePaymentReceiveEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('date'),
@@ -33,38 +27,24 @@ export const usePaymentReceiveEntriesColumns = () => {
Header: intl.get('invoice_amount'),
accessor: 'invoice.balance',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'invoice.balance', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
textOverview: true,
},
{
Header: intl.get('amount_due'),
accessor: 'invoice.due_amount',
Cell: FormatNumberCell,
align: 'right',
width: getColumnWidth(entries, 'invoice.due_amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('payment_amount'),
accessor: 'invoice.payment_amount',
Cell: FormatNumberCell,
align: 'right',
width: getColumnWidth(entries, 'invoice.payment_amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
disableSortBy: true,
textOverview: true,
},
],
[],
);
};

View File

@@ -1,69 +1,44 @@
import React from 'react';
import intl from 'react-intl-universal';
import { getColumnWidth } from 'utils';
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
import { useReceiptDetailDrawerContext } from './ReceiptDetailDrawerProvider.js';
import { FormatNumberCell } from '../../../components';
export const useReceiptReadonlyEntriesTableColumns = () => {
// Receipt details drawer context.
const {
receipt: { entries },
} = useReceiptDetailDrawerContext();
return React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 150,
className: 'name',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};
export const useReceiptReadonlyEntriesTableColumns = () => React.useMemo(() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
width: 150,
className: 'name',
disableSortBy: true
},
{
Header: intl.get('description'),
accessor: 'description',
className: 'description',
disableSortBy: true
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: 100,
align: 'right',
disableSortBy: true
},
], []);

View File

@@ -10,82 +10,59 @@ import {
Tag,
Intent,
} from '@blueprintjs/core';
import { getColumnWidth } from 'utils';
import {
Icon,
FormattedMessage as T,
TextOverviewTooltipCell,
FormatNumberCell,
Choose,
} from '../../../components';
import { useVendorCreditDetailDrawerContext } from './VendorCreditDetailDrawerProvider';
/**
* Retrieve vendor credit readonly details entries table columns.
*/
export const useVendorCreditReadonlyEntriesTableColumns = () => {
const {
vendorCredit: { entries },
} = useVendorCreditDetailDrawerContext();
return React.useMemo(
export const useVendorCreditReadonlyEntriesTableColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('product_and_service'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 150,
className: 'item',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('rate'),
accessor: 'rate',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'rate', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('amount'),
accessor: 'amount',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'amount', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
textOverview: true,
},
],
[],
);
};
/**
* Vendor note more actions menu.

View File

@@ -1,58 +1,40 @@
import React from 'react';
import intl from 'react-intl-universal';
import { Intent, Tag } from '@blueprintjs/core';
import { getColumnWidth } from 'utils';
import { useWarehouseDetailDrawerContext } from './WarehouseTransferDetailDrawerProvider';
import {
FormattedMessage as T,
FormatNumberCell,
TextOverviewTooltipCell,
Choose,
} from '../../../components';
/**
* Retrieves the readonly warehouse transfer entries columns.
*/
export const useWarehouseTransferReadOnlyEntriesColumns = () => {
const {
warehouseTransfer: { entries },
} = useWarehouseDetailDrawerContext();
return React.useMemo(
export const useWarehouseTransferReadOnlyEntriesColumns = () =>
React.useMemo(
() => [
{
Header: intl.get('warehouse_transfer.column.item_name'),
accessor: 'item.name',
Cell: TextOverviewTooltipCell,
width: 100,
width: 150,
className: 'name',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('warehouse_transfer.column.description'),
accessor: 'description',
Cell: TextOverviewTooltipCell,
className: 'description',
disableSortBy: true,
textOverview: true,
},
{
Header: intl.get('warehouse_transfer.column.transfer_quantity'),
accessor: 'quantity',
Cell: FormatNumberCell,
width: getColumnWidth(entries, 'quantity', {
minWidth: 60,
magicSpacing: 5,
}),
width: 100,
align: 'right',
disableSortBy: true,
},
],
[],
);
};
/**
* Warehouses transfer details status.

View File

@@ -43,10 +43,7 @@ export function ActionsCellRenderer({
const exampleMenu = (
<Menu>
<MenuItem
onClick={onRemoveRole}
text={<T id={'item_entries.remove_row'} />}
/>
<MenuItem onClick={onRemoveRole} text={'item_entries.remove_row'} />
</Menu>
);

View File

@@ -1,6 +1,7 @@
import React from 'react';
import { Classes } from '@blueprintjs/core';
import { FormGroup, Classes } from '@blueprintjs/core';
import { FormattedMessage as T } from 'components';
import classNames from 'classnames';
import { AccountMultiSelect, Row, Col } from 'components';
import { FFormGroup } from '../../../components/Forms';
@@ -46,10 +47,10 @@ function GLHeaderGeneralPaneContent() {
<Col xs={4}>
<FFormGroup
label={<T id={'specific_accounts'} />}
name={'accountsIds'}
name={'accounts'}
className={Classes.FILL}
>
<AccountMultiSelect name="accountsIds" accounts={accounts} />
<AccountMultiSelect name="accounts" accounts={accounts} />
</FFormGroup>
</Col>
</Row>

View File

@@ -32,7 +32,7 @@ export const getDefaultGeneralLedgerQuery = () => {
basis: 'accural',
filterByOption: 'with-transactions',
branchesIds: [],
accountsIds: [],
accounts: [],
};
};
@@ -49,9 +49,8 @@ const parseGeneralLedgerQuery = (locationQuery) => {
return {
...transformed,
// Ensures the branches, accounts ids is always array.
// Ensures the branches ids is always array.
branchesIds: castArray(transformed.branchesIds),
accountsIds: castArray(transformed.accountsIds),
};
};

View File

@@ -12,6 +12,7 @@ function VendorsBalanceSummaryProvider({ filter, ...props }) {
const query = React.useMemo(() => transformFilterFormToQuery(filter), [
filter,
]);
// Fetching vendors balance summary report based on the given query.
const {
data: VendorBalanceSummary,

View File

@@ -50,7 +50,7 @@ export default function ItemFormFormik({
// Handles the form submit.
const handleFormSubmit = (values, form) => {
const { setSubmitting, resetForm, setErrors } = form;
const formValues = { ...values };
const formValues = { ...values, type: values.type.toString() };
setSubmitting(true);
@@ -96,7 +96,7 @@ export default function ItemFormFormik({
validationSchema={isNewMode ? CreateItemFormSchema : EditItemFormSchema}
initialValues={initialValues}
onSubmit={handleFormSubmit}
>
>
<Form>
<div class={classNames(CLASSES.PAGE_FORM_BODY)}>
<ItemFormPrimarySection />

View File

@@ -7,7 +7,12 @@ import {
Radio,
Position,
} from '@blueprintjs/core';
import { FormattedMessage as T, FormattedHTMLMessage } from 'components';
import {
FormattedMessage as T,
FormattedHTMLMessage,
FCheckbox,
FFormGroup,
} from 'components';
import { ErrorMessage, FastField } from 'formik';
import {
CategoriesSelectList,
@@ -29,7 +34,7 @@ import { categoriesFieldShouldUpdate } from './utils';
export default function ItemFormPrimarySection() {
// Item form context.
const { isNewMode, item, itemsCategories } = useItemFormContext();
console.log(item.type, 'XXX');
const nameFieldRef = useRef(null);
useEffect(() => {
@@ -53,7 +58,34 @@ export default function ItemFormPrimarySection() {
return (
<div className={classNames(CLASSES.PAGE_FORM_HEADER_PRIMARY)}>
{/*----------- Item type ----------*/}
<FastField name={'type'}>
<FFormGroup
name={'type'}
label={<T id={'item_type'} />}
labelInfo={
<span>
<FieldRequiredHint />
<Hint
content={itemTypeHintContent}
position={Position.BOTTOM_LEFT}
/>
</span>
}
inline={true}
>
<FCheckbox
inline={true}
name="type"
label={<T id={'service'} />}
value="service"
/>
<FCheckbox
inline={true}
name="type"
label={<T id={'inventory'} />}
value="inventory"
/>
</FFormGroup>
{/* <FastField name={'type'}>
{({ form, field: { value }, meta: { touched, error } }) => (
<FormGroup
medium={true}
@@ -85,7 +117,7 @@ export default function ItemFormPrimarySection() {
</RadioGroup>
</FormGroup>
)}
</FastField>
</FastField> */}
<Row>
<Col xs={7}>

View File

@@ -147,7 +147,7 @@ function InvoiceFormHeaderFields({
</FastField>
</Col>
<Col xs={6}>
<Col className={'col--due-date'}>
{/* ----------- Due date ----------- */}
<FastField name={'due_date'}>
{({ form, field: { value }, meta: { error, touched } }) => (

View File

@@ -1173,6 +1173,7 @@
"From transaction": "من معاملة",
"Landed": "Landed",
"This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.": "يتيح لك هذا الخيار إمكانية إضافة تكلفة إضافية على سبيل المثال اضافة تكلفة الشحن ومن ثم تخصيص التكلفة لفواتير الشراء.",
"Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?": "بمجرد حذف معاملة تحميل التكلفة ، لن تتمكن من استعادتها لاحقًا ، هل أنت متأكد من أنك تريد حذف هذه المعاملة؟",
"journal_entries": "القيود",
"contact": "جهة الاتصال",
"invoice_details": "تفاصيل الفاتورة",
@@ -1389,7 +1390,7 @@
"filter.value": "قيمة",
"payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!.",
"estimate.delete.error.estimate_converted_to_invoice": "لا يمكن حذف عملية عرض اسعار الذي تم تحويلها إلي فاتورة بيع.",
"landed_cost.action.delete.success_message": "تم حذف تكلفة اضافية بنجاح. ",
"landed_cost.action.delete.success_message": "The landed cost has been deleted successfully.",
"items.option.only_active": "Only active",
"items.option_all_items.hint": "جميع الاصناف ، بما في ذلك تلك الاصناف لديها رصيد صفر.",
"items.option_with_transactions": "الاصناف مع معاملات",
@@ -1593,9 +1594,6 @@
"refund": "استرجاع",
"landed_cost.dialog.label_select_transaction": "حدد المعاملة ",
"landed_cost.dialog.label_select_transaction_entry": "حدد سطر المعاملة ",
"landed_cost.dialog.label_unallocated_cost_amount":"قيمة التكلفة غير المحملة:",
"landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line":"إجمالي قيمة التكلفة المحملة أكبر من قيمة سطر المعاملة.",
"landed_cost.once_your_delete_this_located_landed_cost": "بمجرد حذف معاملة تحميل التكلفة ، لن تتمكن من استعادتها لاحقًا ، هل أنت متأكد من أنك تريد حذف هذه المعاملة؟",
"refund_credit_note.dialog.label": "استرجاع اموال",
"refund_credit_note.dialog.success_message": "تم انشاء معاملة استرجاع الاموال لإشعار الدائن بنجاح.",
"refund_credit_note.dialog.refund_date": "تاريخ الاسترجاع",
@@ -1918,7 +1916,7 @@
"branches_multi_select.placeholder": "تصفية حسب الفروع…",
"warehouses_multi_select.label": "مخازن",
"warehouses_multi_select.placeholder": "تصفية حسب المخازن…",
"dimensions": "الأبعاد",
"dimensions": "Dimensions",
"warehouse_transfer.save_initiate_transfer": "حفظ وبدء النقل",
"warehouse_transfer.save_mark_as_transferred": "حفظ وتم النقل",
"warehouse_transfer.label.transfer_initiated": "بدء النقل",
@@ -1947,7 +1945,7 @@
"view_customer_details": "عرض تفاصيل العميل ",
"view_vendor_details": "عرض تفاصيل المورد ",
"thanks_for_your_business_and_have_a_great_day": "Thanks for your business and have a great day!",
"terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"expenses.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
"make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
"estimate_form.label.total": "إجمالي",
@@ -1955,15 +1953,14 @@
"estimate_form.label.customer_note": "ملاحظة الزبون",
"estimate_form.label.terms_conditions": "الشروط والأحكام",
"estimate_form.customer_note.placeholder": "Thanks for your business and have a great day!",
"estimate_form.terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"estimate_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"invoice_form.label.total": "إجمالي",
"invoice_form.label.subtotal": "المجموع",
"invoice_form.label.due_amount": "مبلغ المستحق",
"invoice_form.label.payment_amount": "مبلغ المدفوع",
"invoice_form.label.invoice_message": "رسالة الفاتورة",
"invoice_form.invoice_message.placeholder": "Thanks for your business and have a great day!",
"invoice_form.label.terms_conditions": "الشروط والأحكام",
"invoice_form.terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"receipt_form.label.total": "إجمالي",
"receipt_form.label.subtotal": "المجموع",
"receipt_form.label.due_amount": "مبلغ المستحق",
@@ -1977,13 +1974,13 @@
"payment_receive_form.label.subtotal": "المجموع",
"payment_receive_form.label.total": "إجمالي",
"bill_form.label.note": "ملاحظة",
"bill_form.label.note.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"bill_form.label.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"bill_form.label.subtotal": "المجموع",
"bill_form.label.total": "إجمالي",
"bill_form.label.due_amount": "مبلغ المستحق",
"bill_form.label.payment_amount": "مبلغ المدفوع",
"vendor_credit_form.label.note": "ملاحظة",
"vendor_credit_form.note.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"vendor_credit_form.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"vendor_credit_form.label.subtotal": "المجموع",
"vendor_credit_form.label.total": "إجمالي",
"payment_made_form.label.statement": "بيان",
@@ -1992,6 +1989,7 @@
"payment_made_form.label.total": "إجمالي",
"make_journal.label.subtotal": "المجموع",
"make_journal.label.total": "إجمالي",
"make_journal.label.select_journal_type":"حدد نوع القيد",
"expense.label.subtotal": "المجموع",
"expense.label.total": "إجمالي",
"expense.branch_button.label": "الفرع: {label}",
@@ -2011,7 +2009,7 @@
"warehouse_transfer.empty_status.title": "إدارة عمليات النقل بين المخازن",
"warehouse_transfer.empty_status.description": "غالبًا ماتحتاج الاعمال ذات مخازن متعددة لطلبات نقل البضائع من مخزن إلى آخر عندما تكون في حاجة ماسة إلى البائعين.",
"warehouse_transfer.form.reason.label": "أسباب النقل",
"warehouse_transfer.form.reason.placeholder": "أدخل السبب وراء طلب النقل.",
"warehouse_transfer.form.reason.placeholder": "Enter the reason behind the transfer order.",
"item.error.you_could_not_delete_item_has_associated": "لا يمكنك حذف العنصر لديه معاملات مرتبطة به ",
"warehouse_transfer.quantity_cannot_be_zero_or_empty": "لا يمكن أن تكون الكمية صفراً أو فارغة.",
"invoice.validation.due_date": "يجب أن يكون حقل {path} في وقت لاحق من {min}",

View File

@@ -1147,6 +1147,7 @@
"From transaction": "From transaction",
"landed": "Landed",
"This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.": "This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.",
"Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?": "Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?",
"journal_entries": "Journal Entries",
"contact": "Contact",
"invoice_details": "Invoice details",
@@ -1258,41 +1259,12 @@
"setup.initializing.please_refresh_the_page": "Please refresh the page",
"setup.organization.title": "Lets Get Started",
"setup.organization.description": "Tell the system a little bit about your organization.",
"plan.capital_basic.title": "Capital Basic",
"plan.feature.sales_invoices": "Sales Invoices.",
"plan.feature.sales_estimates": "Sales Estimates.",
"plan.feature.customers": "Customers.",
"plan.feature.credit_notes": "Credit notes.",
"plan.feature.manual_journals": "Manual Journals.",
"plan.feature.expenses_tracking": "Expenses Tracking",
"plan.feature.basic_financial_reports": "Basic Financial Reports.",
"plan.capital_plus.title": "Capital Plus",
"plan.feature.all_capital_basic": "All Capital Basic features.",
"plan.feature.predefined_user_roles": "Predefined User Roles.",
"plan.feature.custom_tables_views": "Custom Tables Views.",
"plan.feature.transactions_locking": "Transactions Locking.",
"plan.feature.plus_financial_reports": "Plus Financial Reports.",
"plan.feature.custom_fields_resources": "Custom Fields & Resources.",
"plan.essential.title": "Capital Essential",
"plan.feature.all_capital_plus": "All Capital Basic features.",
"plan.feature.sales_purchases_order": "Sales & Purchases Order.",
"plan.feature.purchase_invoices": "Purchase Invoices.",
"plan.feature.inventory_tracking": "Inventory Tracking.",
"plan.feature.custom_roles": "Custom Roles.",
"plan.feature.multiply_currency_transcations": "Multiply Currency Transcations.",
"plan.feature.inventory_reports": "Inventory Reports.",
"plan.feature.landed_cost": "Landed cost.",
"plan.capital_enterprise.title": "Capital Enterprise",
"plan.feature.all_capital_essential": "All Capital Essential features.",
"plan.feature.multiply_branches": "Multiply Branches.",
"plan.feature.multiply_warehouses": "Multiply Warehouses.",
"plan.feature.accounting_dimensions": "Accounting Dimensions.",
"plan.feature.warehouses_reports": "Warehouses Reports.",
"plan.feature.branches_reports": "Branches Reports.",
"plan.professional.title": "Pro",
"plan.essential.title": "Essential",
"plan.plus.title": "Plus+",
"plan.feature.sale_purchase_invoice": "Sale and purchase invoices.",
"plan.feature.receivable_payable_accounts": "Customers/vendors accounts.",
"plan.feature.expenses_tracking": "Expenses tracking",
"plan.feature.manual_journal": "Manual journals.",
"plan.feature.financial_reports": "Financial reports.",
"plan.feature.one_user_with_accountant": "For one user and accountant",
@@ -1303,7 +1275,9 @@
"plan.feature.three_users": "Three users with your accountant",
"plan.feature.advanced_financial_reports": "Advanced financial reports",
"plan.feature.tracking_multi_locations": "Track multi-branches and locations",
"plan.feature.all_capital_essential": "All Capital Essential features.",
"plan.feature.projects_accounting": "Projects accounting and timesheets",
"plan.feature.accounting_dimensions": "Accounting dimensions.",
"plan.monthly": "Monthly",
"plan.yearly": "Yearly",
"payment_via_voucher.success_message": "Payment has been done successfully.",
@@ -1319,11 +1293,11 @@
"inventory_adjustment.details_drawer.title": "Inventory adjustment details",
"setup.organization.location": "Location",
"preferences.general.success_message": "The general preferences has been saved.",
"customer.drawer.action.new_invoice": "New Invoice",
"customer.drawer.action.new_estimate": "New Estimate",
"customer.drawer.action.new_payment": "New Payment",
"customer.drawer.action.new_receipt": "New Receipt",
"customer.drawer.action.new_transaction": "New Transaction",
"customer.drawer.action.new_invoice": "New invoice",
"customer.drawer.action.new_estimate": "New estimate",
"customer.drawer.action.new_payment": "New payment",
"customer.drawer.action.new_receipt": "New receipt",
"customer.drawer.action.new_transaction": "New transaction",
"customer.drawer.action.edit_opening_balance": "Edit Opening Balance",
"customer.drawer.action.edit": "Edit",
"customer.drawer.label.outstanding_receivable": "Outstanding receivable",
@@ -1350,9 +1324,9 @@
"vendor.drawer.label.note": "Note",
"vendor.drawer.action.edit_vendor": "Edit vendor",
"vendor.drawer.action.delete": "Delete",
"vendor.drawer.action.new_transaction": "New Transaction",
"vendor.drawer.action.new_payment": "New Payment",
"vendor.drawer.action.new_invoice": "New Purchase Invoice",
"vendor.drawer.action.new_transaction": "New transaction",
"vendor.drawer.action.new_payment": "New payment",
"vendor.drawer.action.new_invoice": "New purchase invoice",
"vendor.drawer.action.edit": "Edit",
"vendor.drawer.action.edit_opening_balance": "Edit Opening Balance",
"manual_journals.empty_status.description": "Manual journals can be used to record financial transactions manually, used by accountants to work with the ledger.",
@@ -1611,9 +1585,6 @@
"refund": "Refund",
"landed_cost.dialog.label_select_transaction": "Select transaction",
"landed_cost.dialog.label_select_transaction_entry": "Select transaction entry",
"landed_cost.dialog.label_unallocated_cost_amount": "Unallocated cost Amount:",
"landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line": "The total located cost is bigger than the transaction line.",
"landed_cost.once_your_delete_this_located_landed_cost": "Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?",
"refund_credit_note.dialog.label": "Refund Credit Note",
"refund_credit_note.dialog.success_message": "The customer credit note refund has been created successfully.",
"refund_credit_note.dialog.refund_date": "Refund date",
@@ -1968,6 +1939,7 @@
"payment_made.error.withdrawal_account_currency_invalid": "The withdrawal account currency should be same vendor currency or organization base currency.",
"view_customer_details": "View Customer Details",
"view_vendor_details": "View Vendor Details",
"thanks_for_your_business_and_have_a_great_day": "Thanks for your business and have a great day!",
"terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"expenses.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
"make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
@@ -2017,6 +1989,7 @@
"payment_made.form.internal_note.placeholder": "Internal note (Not visible to the vendor).",
"make_journal.label.subtotal": "Subtotal",
"make_journal.label.total": "TOTAL",
"make_journal.label.select_journal_type":"Select Journal Type",
"expense.label.subtotal": "Subtotal",
"expense.label.total": "TOTAL",
"expense.branch_button.label": "Branch: {label}",

View File

@@ -2,6 +2,7 @@ import { createReducer } from '@reduxjs/toolkit';
import intl from 'react-intl-universal';
import t from 'store/types';
const getSubscriptionPeriods = () => [
{
slug: 'month',
@@ -14,110 +15,79 @@ const getSubscriptionPeriods = () => [
];
const getSubscriptionPlans = () => [
{
name: intl.get('plan.capital_basic.title'),
slug: 'capital_basic',
description: [
intl.get('plan.feature.sales_invoices'),
intl.get('plan.feature.sales_estimates'),
intl.get('plan.feature.customers'),
intl.get('plan.feature.credit_notes'),
intl.get('plan.feature.manual_journals'),
intl.get('plan.feature.expenses_tracking'),
intl.get('plan.feature.basic_financial_reports'),
],
price: '55',
periods: [
{
slug: 'month',
label: intl.get('plan.monthly'),
price: '55',
},
{
slug: 'year',
label: intl.get('plan.yearly'),
price: '595',
},
],
currencyCode: 'LYD',
},
{
name: intl.get('plan.capital_plus.title'),
slug: 'capital_plus',
description: [
intl.get('plan.feature.all_capital_basic'),
intl.get('plan.feature.predefined_user_roles'),
intl.get('plan.feature.custom_tables_views'),
intl.get('plan.feature.transactions_locking'),
intl.get('plan.feature.plus_financial_reports'),
intl.get('plan.feature.custom_fields_resources'),
],
price: '75',
periods: [
{
slug: 'month',
label: intl.get('plan.monthly'),
price: '75',
},
{
slug: 'year',
label: intl.get('plan.yearly'),
price: '795',
},
],
currencyCode: 'LYD',
},
{
name: intl.get('plan.essential.title'),
slug: 'essentials',
description: [
intl.get('plan.feature.all_capital_plus'),
intl.get('plan.feature.sales_purchases_order'),
intl.get('plan.feature.purchase_invoices'),
intl.get('plan.feature.inventory_tracking'),
intl.get('plan.feature.custom_roles'),
intl.get('plan.feature.multiply_currency_transcations'),
intl.get('plan.feature.inventory_reports'),
intl.get('plan.feature.landed_cost'),
intl.get('plan.feature.sale_purchase_invoice'),
intl.get('plan.feature.receivable_payable_accounts'),
intl.get('plan.feature.expenses_tracking'),
intl.get('plan.feature.manual_journal'),
intl.get('plan.feature.financial_reports'),
intl.get('plan.feature.one_user_with_accountant'),
],
price: '95',
price: '100',
periods: [
{
slug: 'month',
label: intl.get('plan.monthly'),
price: '95',
price: '100'
},
{
slug: 'year',
label: intl.get('plan.yearly'),
price: '995',
price: '1,200',
},
],
currencyCode: 'LYD',
},
{
name: intl.get('plan.capital_enterprise.title'),
slug: 'enterprise',
name: intl.get('plan.professional.title'),
slug: 'plus',
description: [
intl.get('plan.feature.all_capital_essential'),
intl.get('plan.feature.multiply_branches'),
intl.get('plan.feature.multiply_warehouses'),
intl.get('plan.feature.accounting_dimensions'),
intl.get('plan.feature.warehouses_reports'),
intl.get('plan.feature.branches_reports'),
intl.get('plan.feature.multi_currency'),
intl.get('plan.feature.purchase_sell_orders'),
intl.get('plan.feature.multi_inventory_managment'),
intl.get('plan.feature.three_users'),
intl.get('plan.feature.advanced_financial_reports'),
],
price: '120',
price: '200',
currencyCode: 'LYD',
periods: [
{
slug: 'month',
label: intl.get('plan.monthly'),
price: '120',
price: '200'
},
{
slug: 'year',
label: intl.get('plan.yearly'),
price: '1,195',
price: '1,200',
},
],
},
{
name: intl.get('plan.plus.title'),
slug: 'enterprise',
description: [
intl.get('plan.feture.all_capital_professional_features'),
intl.get('plan.feature.tracking_multi_locations'),
intl.get('plan.feature.projects_accounting'),
intl.get('plan.feature.accounting_dimensions'),
],
price: '300',
currencyCode: 'LYD',
periods: [
{
slug: 'month',
label: intl.get('plan.monthly'),
price: '300'
},
{
slug: 'year',
label: intl.get('plan.yearly'),
price: '1,200',
},
],
},

View File

@@ -290,8 +290,3 @@ html[lang^='ar'] {
.font-bold {
font-weight: 600;
}
span.table-tooltip-overview-target{
display: inline;
}

View File

@@ -1,6 +1,6 @@
.billing-plans{
max-width: 753px;
.paragraph{
font-size: 15px;
}