Compare commits

..

13 Commits

Author SHA1 Message Date
a.bouhuolia
df4c4a832b Merge branch 'develop' into main 2022-03-24 15:32:30 +02:00
a.bouhuolia
98a02396a9 Merge branch 'develop' into main 2022-02-21 15:02:35 +02:00
a.bouhuolia
96635ffa84 Merge branch 'develop' into main 2022-02-18 20:44:42 +02:00
a.bouhuolia
68c0678dc3 Merge branch 'develop' into main 2022-02-17 12:10:20 +02:00
a.bouhuolia
da699a766a Merge branch 'develop' into main 2022-01-13 15:40:55 +02:00
a.bouhuolia
f1899e1ce1 Merge branch 'develop' into main 2022-01-08 18:20:08 +02:00
Ahmed Bouhuolia
11851d114d Merge pull request #16 from bigcapitalhq/develop
Release 1.5.5
2022-01-04 22:35:49 +02:00
a.bouhuolia
21779007be fix: application version. 2022-01-03 23:14:11 +02:00
a.bouhuolia
4fc1ecdc2d Merge branch 'main' of https://github.com/bigcapitalhq/client into main 2022-01-03 19:42:48 +02:00
a.bouhuolia
c9b5cecf7a Merge branch 'develop' into main 2022-01-03 19:42:23 +02:00
elforjani13
c31e9dcd29 fix: inventory adjustment & contacts drawer. 2022-01-03 14:35:50 +02:00
elforjani13
430ab95dc3 landed cost localiztion. 2022-01-03 13:38:22 +02:00
Ahmed Bouhuolia
8100a57195 Merge pull request #15 from bigcapitalhq/develop
Merge `develop` to `main`
2022-01-03 12:31:14 +02:00
85 changed files with 494 additions and 833 deletions

View File

@@ -2,53 +2,6 @@
All notable changes to Bigcapital server-side will be in this file. All notable changes to Bigcapital server-side will be in this file.
## [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
- `BIG-141` Add inactive status to item drawer details.
- `BIG-278` Add created at date on expense details.
- `BIG-350` Add empty status content of warehouse transfers service.
- `BIG-344` Add branch details to manual journal and expense details.
## Fixed
- `BIG-221` Remove Non-inventory radio choice on item form.
- `BIG-236` Validate estimate expiration date should be equal or bigger than estimate date.
- `BIG-237` Validate invoice due date should be equal or bigger than invoice date.
- `BIG-238` Validate bill due date should be equal or bigger than bill date.
- `BIG-280` Optimize style of multi-select accounts menu.
- `BIG-284` Cashflow statement loading bar.
- `BIG-296` Creating a new child account from accounts list.
- `BIG-301` Navigation bar divider on actions bar hide with permissions control.
- `BIG-304` Adding cash or bank account from cash flow service.
- `BIG-351` Invalid date in the inventory adjustment detail.
- `BIG-352` Fix terms and notes fields on footer of all services.
- `BIG-354` Validate the warehouse transfer quantity should be above zero.
## [1.7.0-rc.1] - 24-03-2022
## Added
- Multiply currencies with foreign currencies.
- Multiply warehouses to track inventory items.
- Multiply branches to track organization transactions.
- Transfer orders between warehouses.
- Integrate financial reports with multiply branches.
- Integrate inventory reports with multiply warehouses.
## Changes
- Optimize style of sale invoice form.
- Optimize style of sale receipt form.
- Optimize style of credit note form.
- Optimize style of payment receive form.
- Optimize style of bill form.
- Optimize style of payment made form.
- Optimize style of manual journal form.
- Optimize style of expense form.
## [1.6.3] - 21-02-2022 ## [1.6.3] - 21-02-2022
### Fixed ### Fixed

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{ {
"name": "bigcapital-client", "name": "bigcapital-client",
"version": "1.7.1", "version": "1.6.3",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@babel/core": "7.8.4", "@babel/core": "7.8.4",

View File

@@ -1,4 +1,3 @@
export * from './accountTypes';
export * from './TableStyle'; export * from './TableStyle';
export * from './features'; export * from './features';
export * from './cellTypes'; export * from './cellTypes';

View File

@@ -1,73 +0,0 @@
import React from 'react';
import styled from 'styled-components';
import { MenuItem } from '@blueprintjs/core';
import { FMultiSelect } from '../Forms';
import classNames from 'classnames';
import { Classes } from '@blueprintjs/popover2';
/**
*
* @param {*} query
* @param {*} account
* @param {*} _index
* @param {*} exactMatch
* @returns
*/
const accountItemPredicate = (query, account, _index, exactMatch) => {
const normalizedTitle = account.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return `${account.code}. ${normalizedTitle}`.indexOf(normalizedQuery) >= 0;
}
};
/**
*
* @param {*} account
* @param {*} param1
* @returns
*/
const accountItemRenderer = (
account,
{ handleClick, modifiers, query },
{ isSelected },
) => {
return (
<MenuItem
icon={isSelected ? 'tick' : 'blank'}
text={account.name}
label={account.code}
key={account.id}
onClick={handleClick}
/>
);
};
const accountSelectProps = {
itemPredicate: accountItemPredicate,
itemRenderer: accountItemRenderer,
valueAccessor: (item) => item.id,
labelAccessor: (item) => item.code,
tagRenderer: (item) => item.name,
};
/**
* branches mulit select.
* @param {*} param0
* @returns {JSX.Element}
*/
export function AccountMultiSelect({ accounts, ...rest }) {
return (
<FMultiSelect
items={accounts}
popoverProps={{
minimal: true,
}}
{...accountSelectProps}
{...rest}
/>
);
}

View File

@@ -1 +0,0 @@
export * from './AccountMultiSelect';

View File

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

View File

@@ -104,7 +104,6 @@ export * from './Warehouses';
export * from './Currencies'; export * from './Currencies';
export * from './FormTopbar' export * from './FormTopbar'
export * from './Paper'; export * from './Paper';
export * from './Accounts'
const Hint = FieldHint; const Hint = FieldHint;

View File

@@ -4,12 +4,7 @@ import { Popover2 } from '@blueprintjs/popover2';
import { useFormikContext } from 'formik'; import { useFormikContext } from 'formik';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import { import { ExchangeRateInputGroup, Icon, Hint, FormattedMessage as T } from 'components';
ExchangeRateInputGroup,
Icon,
Hint,
FormattedMessage as T,
} from 'components';
import { import {
AccountsListFieldCell, AccountsListFieldCell,
MoneyFieldCell, MoneyFieldCell,
@@ -68,10 +63,7 @@ export const ActionsCellRenderer = ({
}; };
const exampleMenu = ( const exampleMenu = (
<Menu> <Menu>
<MenuItem <MenuItem onClick={handleClickRemoveRole} text="Remove line" />
onClick={handleClickRemoveRole}
text={intl.get('make_journal.entries.remove_row')}
/>
</Menu> </Menu>
); );
return ( return (

View File

@@ -15,8 +15,6 @@ import withSettings from '../Settings/withSettings';
import { useAccountsChartContext } from './AccountsChartProvider'; import { useAccountsChartContext } from './AccountsChartProvider';
import { useMemorizedColumnsWidths } from '../../hooks'; import { useMemorizedColumnsWidths } from '../../hooks';
import { AccountDialogAction } from '../Dialogs/AccountDialog/utils';
import withAlertsActions from 'containers/Alert/withAlertActions'; import withAlertsActions from 'containers/Alert/withAlertActions';
import withDialogActions from 'containers/Dialog/withDialogActions'; import withDialogActions from 'containers/Dialog/withDialogActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions'; import withDrawerActions from 'containers/Drawer/withDrawerActions';
@@ -60,10 +58,7 @@ function AccountsDataTable({
// Handle edit account action. // Handle edit account action.
const handleEditAccount = (account) => { const handleEditAccount = (account) => {
openDialog('account-form', { openDialog('account-form', { action: 'edit', id: account.id });
action: AccountDialogAction.Edit,
id: account.id,
});
}; };
// Handle view detail account. // Handle view detail account.
@@ -74,7 +69,7 @@ function AccountsDataTable({
// Handle new child button click. // Handle new child button click.
const handleNewChildAccount = (account) => { const handleNewChildAccount = (account) => {
openDialog('account-form', { openDialog('account-form', {
action: AccountDialogAction.NewChild, action: 'new_child',
parentAccountId: account.id, parentAccountId: account.id,
accountType: account.account_type, accountType: account.account_type,
}); });

View File

@@ -57,9 +57,7 @@ function BillTransactionDeleteAlert({
loading={isLoading} loading={isLoading}
> >
<p> <p>
<T <T id={`landed_cost.once_your_delete_this_located_landed_cost`} />
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> </p>
</Alert> </Alert>
); );

View File

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

View File

@@ -16,9 +16,6 @@ import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
import withDialogActions from 'containers/Dialog/withDialogActions'; import withDialogActions from 'containers/Dialog/withDialogActions';
import withCashflowAccountsTableActions from '../AccountTransactions/withCashflowAccountsTableActions'; import withCashflowAccountsTableActions from '../AccountTransactions/withCashflowAccountsTableActions';
import { AccountDialogAction } from '../../Dialogs/AccountDialog/utils';
import { ACCOUNT_TYPE } from '../../../common';
import { compose } from 'utils'; import { compose } from 'utils';
/** /**
@@ -40,15 +37,15 @@ function CashFlowAccountsActionsBar({
// Handle add bank account. // Handle add bank account.
const handleAddBankAccount = () => { const handleAddBankAccount = () => {
openDialog('account-form', { openDialog('account-form', {
action: AccountDialogAction.NewDefinedType, action: 'NEW_ACCOUNT_DEFINED_TYPE',
accountType: ACCOUNT_TYPE.CASH, accountType: 'cash',
}); });
}; };
// Handle add cash account. // Handle add cash account.
const handleAddCashAccount = () => { const handleAddCashAccount = () => {
openDialog('account-form', { openDialog('account-form', {
action: AccountDialogAction.NewDefinedType, action: 'NEW_ACCOUNT_DEFINED_TYPE',
accountType: ACCOUNT_TYPE.BANK, accountType: 'bank',
}); });
}; };
// Handle inactive switch changing. // Handle inactive switch changing.

View File

@@ -5,9 +5,21 @@ import AccountDialogForm from './AccountDialogForm';
/** /**
* Account dialog content. * Account dialog content.
*/ */
export default function AccountDialogContent({ dialogName, payload }) { export default function AccountDialogContent({
dialogName,
accountId,
action,
parentAccountId,
accountType,
}) {
return ( return (
<AccountDialogProvider dialogName={dialogName} payload={payload}> <AccountDialogProvider
dialogName={dialogName}
accountId={accountId}
action={action}
parentAccountId={parentAccountId}
accountType={accountType}
>
<AccountDialogForm /> <AccountDialogForm />
</AccountDialogProvider> </AccountDialogProvider>
); );

View File

@@ -43,7 +43,9 @@ function AccountFormDialogContent({
account, account,
accountId, accountId,
payload, action,
parentAccountId,
accountType,
isNewMode, isNewMode,
dialogName, dialogName,
} = useAccountDialogContext(); } = useAccountDialogContext();
@@ -99,6 +101,7 @@ function AccountFormDialogContent({
.catch(handleError); .catch(handleError);
} }
}; };
// Form initial values in create and edit mode. // Form initial values in create and edit mode.
const initialValues = { const initialValues = {
...defaultInitialValues, ...defaultInitialValues,
@@ -108,7 +111,11 @@ function AccountFormDialogContent({
* as well. * as well.
*/ */
...transformToForm( ...transformToForm(
transformAccountToForm(account, payload), transformAccountToForm(account, {
action,
parentAccountId,
accountType,
}),
defaultInitialValues, defaultInitialValues,
), ),
}; };
@@ -126,7 +133,7 @@ function AccountFormDialogContent({
> >
<AccountDialogFormContent <AccountDialogFormContent
dialogName={dialogName} dialogName={dialogName}
action={payload?.action} action={action}
onClose={handleClose} onClose={handleClose}
/> />
</Formik> </Formik>

View File

@@ -39,8 +39,7 @@ function AccountFormDialogFields({
const accountNameFieldRef = useAutofocus(); const accountNameFieldRef = useAutofocus();
// Account form context. // Account form context.
const { fieldsDisabled, accounts, accountsTypes, currencies } = const { accounts, accountsTypes, currencies } = useAccountDialogContext();
useAccountDialogContext();
return ( return (
<Form> <Form>
@@ -63,7 +62,11 @@ function AccountFormDialogFields({
form.setFieldValue('account_type', accountType.key); form.setFieldValue('account_type', accountType.key);
form.setFieldValue('currency_code', ''); form.setFieldValue('currency_code', '');
}} }}
disabled={fieldsDisabled.accountType} disabled={
action === 'edit' ||
action === 'new_child' ||
action === 'NEW_ACCOUNT_DEFINED_TYPE'
}
popoverProps={{ minimal: true }} popoverProps={{ minimal: true }}
popoverFill={true} popoverFill={true}
/> />
@@ -206,7 +209,7 @@ function AccountFormDialogFields({
<Button <Button
intent={Intent.PRIMARY} intent={Intent.PRIMARY}
loading={isSubmitting} loading={isSubmitting}
style={{ minWidth: '95px' }} style={{ minWidth: '75px' }}
type="submit" type="submit"
> >
{action === 'edit' ? <T id={'edit'} /> : <T id={'submit'} />} {action === 'edit' ? <T id={'edit'} /> : <T id={'submit'} />}

View File

@@ -8,14 +8,21 @@ import {
useAccounts, useAccounts,
useEditAccount, useEditAccount,
} from 'hooks/query'; } from 'hooks/query';
import { AccountDialogAction, getDisabledFormFields } from './utils';
const AccountDialogContext = createContext(); const AccountDialogContext = createContext();
/** /**
* Account form provider. * Account form provider.
*/ */
function AccountDialogProvider({ dialogName, payload, ...props }) { function AccountDialogProvider({
accountId,
parentAccountId,
action,
accountType,
dialogName,
...props
}) {
// Create and edit account mutations. // Create and edit account mutations.
const { mutateAsync: createAccountMutate } = useCreateAccount(); const { mutateAsync: createAccountMutate } = useCreateAccount();
const { mutateAsync: editAccountMutate } = useEditAccount(); const { mutateAsync: editAccountMutate } = useEditAccount();
@@ -28,31 +35,22 @@ function AccountDialogProvider({ dialogName, payload, ...props }) {
useAccountsTypes(); useAccountsTypes();
// Fetches the specific account details. // Fetches the specific account details.
const { data: account, isLoading: isAccountLoading } = useAccount( const { data: account, isLoading: isAccountLoading } = useAccount(accountId, {
payload.accountId, enabled: !!accountId,
{ });
enabled:
!!payload.accountId && payload.action === AccountDialogAction.Edit,
},
);
// Handle fetch Currencies data table // Handle fetch Currencies data table
const { data: currencies, isLoading: isCurrenciesLoading } = useCurrencies(); const { data: currencies, isLoading: isCurrenciesLoading } = useCurrencies();
const isNewMode = !payload?.action; const isNewMode = !accountId;
// Retrieves the disabled fields of the form.
const fieldsDisabled = React.useMemo(
() => getDisabledFormFields(account, payload),
[account, payload],
);
// Provider payload. // Provider payload.
const provider = { const provider = {
dialogName, dialogName,
payload, accountId,
fieldsDisabled, parentAccountId,
action,
accountType,
currencies, currencies,
createAccountMutate, createAccountMutate,

View File

@@ -18,11 +18,9 @@ function AccountFormDialog({
<Dialog <Dialog
name={dialogName} name={dialogName}
title={ title={
payload.action === 'edit' ? ( (payload.action === 'edit') ?
<T id={'edit_account'} /> (<T id={'edit_account'} />) :
) : ( (<T id={'new_account'} />)
<T id={'new_account'} />
)
} }
className={'dialog--account-form'} className={'dialog--account-form'}
autoFocus={true} autoFocus={true}
@@ -30,10 +28,18 @@ function AccountFormDialog({
isOpen={isOpen} isOpen={isOpen}
> >
<DialogSuspense> <DialogSuspense>
<AccountDialogContent dialogName={dialogName} payload={payload} /> <AccountDialogContent
dialogName={dialogName}
accountId={payload.id}
action={payload.action}
parentAccountId={payload.parentAccountId}
accountType={payload.accountType}
/>
</DialogSuspense> </DialogSuspense>
</Dialog> </Dialog>
); );
} }
export default compose(withDialogRedux())(AccountFormDialog); export default compose(
withDialogRedux(),
)(AccountFormDialog);

View File

@@ -1,17 +1,7 @@
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import * as R from 'ramda'; import * as R from 'ramda';
import { isUndefined } from 'lodash'; import { isEmpty } from 'lodash';
//
export const AccountDialogAction = {
Edit: 'edit',
NewChild: 'NewChild',
NewDefinedType: 'NewDefinedType',
};
/**
* Transformes the response API errors.
*/
export const transformApiErrors = (errors) => { export const transformApiErrors = (errors) => {
const fields = {}; const fields = {};
if (errors.find((e) => e.type === 'NOT_UNIQUE_CODE')) { if (errors.find((e) => e.type === 'NOT_UNIQUE_CODE')) {
@@ -33,7 +23,7 @@ export const transformApiErrors = (errors) => {
/** /**
* Payload transformer in account edit mode. * Payload transformer in account edit mode.
*/ */
function tranformNewChildAccountPayload(payload) { function transformEditMode(payload) {
return { return {
parent_account_id: payload.parentAccountId || '', parent_account_id: payload.parentAccountId || '',
account_type: payload.accountType || '', account_type: payload.accountType || '',
@@ -44,7 +34,7 @@ function tranformNewChildAccountPayload(payload) {
/** /**
* Payload transformer in new account with defined type. * Payload transformer in new account with defined type.
*/ */
function transformNewDefinedTypePayload(payload) { function transformNewAccountDefinedType(payload) {
return { return {
account_type: payload.accountType || '', account_type: payload.accountType || '',
}; };
@@ -70,9 +60,9 @@ const defaultPayloadTransform = () => ({});
*/ */
function getConditions() { function getConditions() {
return [ return [
[AccountDialogAction.Edit], ['edit'],
[AccountDialogAction.NewChild, tranformNewChildAccountPayload], ['new_child', transformEditMode],
[AccountDialogAction.NewDefinedType, transformNewDefinedTypePayload], ['NEW_ACCOUNT_DEFINED_TYPE', transformNewAccountDefinedType],
]; ];
} }
@@ -83,7 +73,7 @@ export const transformAccountToForm = (account, payload) => {
const conditions = getConditions(); const conditions = getConditions();
const results = conditions.map((condition) => { const results = conditions.map((condition) => {
const transformer = !isUndefined(condition[1]) const transformer = !isEmpty(condition[1])
? condition[1] ? condition[1]
: defaultPayloadTransform; : defaultPayloadTransform;
@@ -94,15 +84,3 @@ export const transformAccountToForm = (account, payload) => {
}); });
return R.cond(results)(account); return R.cond(results)(account);
}; };
/**
* Detarmines whether the for fields are disabled.
*/
export const getDisabledFormFields = (account, payload) => {
return {
accountType:
payload.action === AccountDialogAction.Edit ||
payload.action === AccountDialogAction.NewChild ||
payload.action === AccountDialogAction.NewDefinedType,
};
};

View File

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

View File

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

View File

@@ -9,15 +9,15 @@ import {
} from '@blueprintjs/core'; } from '@blueprintjs/core';
import { Can, FormattedMessage as T } from 'components'; import { Can, FormattedMessage as T } from 'components';
import { AccountAction, AbilitySubject } from '../../../common/abilityOption';
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar'; import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
import withDialogActions from 'containers/Dialog/withDialogActions'; import withDialogActions from 'containers/Dialog/withDialogActions';
import withAlertsActions from 'containers/Alert/withAlertActions'; import withAlertsActions from 'containers/Alert/withAlertActions';
import { AccountDialogAction } from 'containers/Dialogs/AccountDialog/utils'; import { safeCallback } from 'utils';
import { AccountAction, AbilitySubject } from '../../../common/abilityOption';
import { compose } from 'utils';
import { useAccountDrawerContext } from './AccountDrawerProvider'; import { useAccountDrawerContext } from './AccountDrawerProvider';
import { compose, safeCallback } from 'utils';
/** /**
* Account drawer action bar. * Account drawer action bar.
@@ -35,18 +35,17 @@ function AccountDrawerActionBar({
// Handle new child button click. // Handle new child button click.
const onNewChildAccount = () => { const onNewChildAccount = () => {
openDialog('account-form', { openDialog('account-form', {
action: AccountDialogAction.NewChild, action: 'new_child',
parentAccountId: account.id, parentAccountId: account.id,
accountType: account.account_type, accountType: account.account_type,
}); });
}; };
// Handle edit account action. // Handle edit account action.
const onEditAccount = () => { const onEditAccount = () => {
openDialog('account-form', { openDialog('account-form', { action: 'edit', id: account.id });
action: AccountDialogAction.Edit,
id: account.id,
});
}; };
// Handle delete action account. // Handle delete action account.
const onDeleteAccount = () => { const onDeleteAccount = () => {
openAlert('account-delete', { accountId: account.id }); openAlert('account-delete', { accountId: account.id });

View File

@@ -95,9 +95,9 @@ function BillDetailActionsBar({
onClick={handleQuickBillPayment} onClick={handleQuickBillPayment}
/> />
</If> </If>
<NavbarDivider />
</Can> </Can>
<Can I={BillAction.Delete} a={AbilitySubject.Bill}> <Can I={BillAction.Delete} a={AbilitySubject.Bill}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

@@ -131,17 +131,17 @@ function CustomerDetailsActionsBar({
/> />
</Popover> </Popover>
<NavbarDivider />
<Can I={CustomerAction.Edit} a={AbilitySubject.Customer}> <Can I={CustomerAction.Edit} a={AbilitySubject.Customer}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon="pen-18" />} icon={<Icon icon="pen-18" />}
text={intl.get('customer.drawer.action.edit')} text={intl.get('customer.drawer.action.edit')}
onClick={handleEditContact} onClick={handleEditContact}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={CustomerAction.Delete} a={AbilitySubject.Customer}> <Can I={CustomerAction.Delete} a={AbilitySubject.Customer}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

@@ -96,9 +96,9 @@ function EstimateDetailActionsBar({
intent={Intent.DANGER} intent={Intent.DANGER}
onClick={handleDeleteEstimate} onClick={handleDeleteEstimate}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={SaleEstimateAction.NotifyBySms} a={AbilitySubject.Estimate}> <Can I={SaleEstimateAction.NotifyBySms} a={AbilitySubject.Estimate}>
<NavbarDivider />
<MoreMenuItems <MoreMenuItems
payload={{ payload={{
onNotifyViaSMS: handleNotifyViaSMS, onNotifyViaSMS: handleNotifyViaSMS,

View File

@@ -55,9 +55,9 @@ function ExpenseDrawerActionBar({
text={<T id={'edit_expense'} />} text={<T id={'edit_expense'} />}
onClick={handleEditExpense} onClick={handleEditExpense}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={ExpenseAction.Delete} a={AbilitySubject.Expense}> <Can I={ExpenseAction.Delete} a={AbilitySubject.Expense}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon="trash-16" iconSize={16} />} icon={<Icon icon="trash-16" iconSize={16} />}

View File

@@ -10,7 +10,6 @@ import {
Col, Col,
DetailItem, DetailItem,
DetailsMenu, DetailsMenu,
FormatDate,
ExchangeRateDetailItem, ExchangeRateDetailItem,
FormattedMessage as T, FormattedMessage as T,
} from 'components'; } from 'components';
@@ -65,12 +64,10 @@ export default function ExpenseDrawerHeader() {
minLabelSize={'180px'} minLabelSize={'180px'}
> >
<DetailItem label={<T id={'published_at'} />}> <DetailItem label={<T id={'published_at'} />}>
<FormatDate value={expense.published_at} /> {moment(expense.published_at).format('YYYY MMM DD')}
</DetailItem> </DetailItem>
<DetailItem label={<T id={'created_at'} />}> <DetailItem label={<T id={'created_at'} />}>2021 Aug 24</DetailItem>
<FormatDate value={expense.created_at} />
</DetailItem>
</DetailsMenu> </DetailsMenu>
</Col> </Col>
</Row> </Row>

View File

@@ -1,9 +1,6 @@
import React from 'react'; import React from 'react';
import intl from 'react-intl-universal';
import { useExpense } from 'hooks/query'; import { useExpense } from 'hooks/query';
import { DrawerHeaderContent, DrawerLoading } from 'components'; import { DrawerLoading } from 'components';
import { Features } from 'common';
import { useFeatureCan } from 'hooks/state';
const ExpenseDrawerDrawerContext = React.createContext(); const ExpenseDrawerDrawerContext = React.createContext();
@@ -11,9 +8,6 @@ const ExpenseDrawerDrawerContext = React.createContext();
* Expense drawer provider. * Expense drawer provider.
*/ */
function ExpenseDrawerProvider({ expenseId, ...props }) { function ExpenseDrawerProvider({ expenseId, ...props }) {
// Features guard.
const { featureCan } = useFeatureCan();
// Fetch the expense details. // Fetch the expense details.
const { const {
data: expense, data: expense,
@@ -34,17 +28,6 @@ function ExpenseDrawerProvider({ expenseId, ...props }) {
return ( return (
<DrawerLoading loading={isExpenseLoading}> <DrawerLoading loading={isExpenseLoading}>
<DrawerHeaderContent
name="expense-drawer"
title={intl.get('expense.drawer.title')}
subTitle={
featureCan(Features.Branches)
? intl.get('expense.drawer.subtitle', {
value: expense.branch?.name,
})
: null
}
/>
<ExpenseDrawerDrawerContext.Provider value={provider} {...props} /> <ExpenseDrawerDrawerContext.Provider value={provider} {...props} />
</DrawerLoading> </DrawerLoading>
); );

View File

@@ -1,4 +1,6 @@
import React, { lazy } from 'react'; import React, { lazy } from 'react';
import intl from 'react-intl-universal';
import { Drawer, DrawerSuspense } from 'components'; import { Drawer, DrawerSuspense } from 'components';
import withDrawers from 'containers/Drawer/withDrawers'; import withDrawers from 'containers/Drawer/withDrawers';
@@ -20,6 +22,7 @@ function ExpenseDrawer({
<Drawer <Drawer
isOpen={isOpen} isOpen={isOpen}
name={name} name={name}
title={intl.get('expense.drawer.title')}
size={'65%'} size={'65%'}
style={{ minWidth: '700px', maxWidth: '900px' }} style={{ minWidth: '700px', maxWidth: '900px' }}
> >

View File

@@ -5,7 +5,7 @@ import intl from 'react-intl-universal';
import { defaultTo } from 'lodash'; import { defaultTo } from 'lodash';
import clsx from 'classnames'; import clsx from 'classnames';
import { DetailsMenu, DetailItem, FormatDate } from 'components'; import { DetailsMenu, DetailItem } from 'components';
import { useInventoryAdjustmentDrawerContext } from './InventoryAdjustmentDrawerProvider'; import { useInventoryAdjustmentDrawerContext } from './InventoryAdjustmentDrawerProvider';
import InventoryAdjustmentDrawerCls from 'style/components/Drawers/InventoryAdjustmentDrawer.module.scss'; import InventoryAdjustmentDrawerCls from 'style/components/Drawers/InventoryAdjustmentDrawer.module.scss';
@@ -20,7 +20,7 @@ export default function InventoryAdjustmentDetailHeader() {
<div className={clsx(InventoryAdjustmentDrawerCls.detail_panel_header)}> <div className={clsx(InventoryAdjustmentDrawerCls.detail_panel_header)}>
<DetailsMenu direction={'horizantal'} minLabelSize={'180px'}> <DetailsMenu direction={'horizantal'} minLabelSize={'180px'}>
<DetailItem label={intl.get('date')}> <DetailItem label={intl.get('date')}>
<FormatDate value={inventoryAdjustment.date} /> {moment(inventoryAdjustment.date).format('YYYY MMM DD')}
</DetailItem> </DetailItem>
<DetailItem label={intl.get('type')}> <DetailItem label={intl.get('type')}>
@@ -36,7 +36,7 @@ export default function InventoryAdjustmentDetailHeader() {
</DetailItem> </DetailItem>
<DetailItem label={intl.get('published_at')}> <DetailItem label={intl.get('published_at')}>
<FormatDate value={inventoryAdjustment.published_at} /> {moment(inventoryAdjustment.published_at).format('YYYY MMM DD')}
</DetailItem> </DetailItem>
<DetailItem label={intl.get('reason')}> <DetailItem label={intl.get('reason')}>
@@ -44,7 +44,7 @@ export default function InventoryAdjustmentDetailHeader() {
</DetailItem> </DetailItem>
<DetailItem label={intl.get('created_at')}> <DetailItem label={intl.get('created_at')}>
<FormatDate value={inventoryAdjustment.created_at} /> {moment(inventoryAdjustment.created_at).format('YYYY MMM DD')}
</DetailItem> </DetailItem>
</DetailsMenu> </DetailsMenu>
</div> </div>

View File

@@ -55,9 +55,10 @@ function ItemDetailActionsBar({
text={<T id={'edit_item'} />} text={<T id={'edit_item'} />}
onClick={handleEditItem} onClick={handleEditItem}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={ItemAction.Delete} a={AbilitySubject.Item}> <Can I={ItemAction.Delete} a={AbilitySubject.Item}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

@@ -1,7 +1,6 @@
import React from 'react'; import React from 'react';
import { DrawerHeaderContent, DrawerLoading } from 'components'; import { DrawerHeaderContent, DrawerLoading } from 'components';
import { useItem } from 'hooks/query'; import { useItem } from 'hooks/query';
import { inactiveStatus } from './utlis';
const ItemDetailDrawerContext = React.createContext(); const ItemDetailDrawerContext = React.createContext();
@@ -28,10 +27,7 @@ function ItemDetailDrawerProvider({ itemId, ...props }) {
return ( return (
<DrawerLoading loading={isItemLoading}> <DrawerLoading loading={isItemLoading}>
<DrawerHeaderContent <DrawerHeaderContent name="item-detail-drawer" title={item?.name} />
name="item-detail-drawer"
title={inactiveStatus(item)}
/>
<ItemDetailDrawerContext.Provider value={provider} {...props} /> <ItemDetailDrawerContext.Provider value={provider} {...props} />
</DrawerLoading> </DrawerLoading>
); );

View File

@@ -1,27 +0,0 @@
import React from 'react';
import styled from 'styled-components';
import { Intent, Tag } from '@blueprintjs/core';
import { Choose, FormattedMessage as T } from '../../../components';
/**
* items inactive status.
* @returns {React.JSX}
*/
export function inactiveStatus(item) {
return (
<Choose>
<Choose.When condition={!item.active}>
{item.name}
<StatusTag intent={Intent.NONE} minimal={true} round={true}>
<T id={'item.details.inactive'} />
</StatusTag>
</Choose.When>
<Choose.Otherwise>{item.name}</Choose.Otherwise>
</Choose>
);
}
const StatusTag = styled(Tag)`
font-size: 11px;
margin-left: 10px;
`;

View File

@@ -55,9 +55,9 @@ function ManualJournalDrawerActionBar({
text={<T id={'edit_journal'} />} text={<T id={'edit_journal'} />}
onClick={handleEditManualJournal} onClick={handleEditManualJournal}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={ManualJournalAction.Delete} a={AbilitySubject.ManualJournal}> <Can I={ManualJournalAction.Delete} a={AbilitySubject.ManualJournal}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon="trash-16" iconSize={16} />} icon={<Icon icon="trash-16" iconSize={16} />}

View File

@@ -3,8 +3,6 @@ import React from 'react';
import { Tag, Intent, Classes, Tooltip, Position } from '@blueprintjs/core'; import { Tag, Intent, Classes, Tooltip, Position } from '@blueprintjs/core';
import { T, Choose, FormatNumberCell, If, Icon } from '../../../components'; import { T, Choose, FormatNumberCell, If, Icon } from '../../../components';
import { Features } from 'common';
import { useFeatureCan } from 'hooks/state';
/** /**
* Note column accessor. * Note column accessor.
@@ -48,9 +46,8 @@ export function ManualJournalDetailsStatus({ manualJournal }) {
/** /**
* Retrieve read-only manual journal entries columns. * Retrieve read-only manual journal entries columns.
*/ */
export const useManualJournalEntriesColumns = () => { export const useManualJournalEntriesColumns = () =>
const { featureCan } = useFeatureCan(); React.useMemo(
return React.useMemo(
() => [ () => [
{ {
Header: intl.get('account_name'), Header: intl.get('account_name'),
@@ -73,17 +70,6 @@ export const useManualJournalEntriesColumns = () => {
disableSortBy: true, disableSortBy: true,
className: 'note', className: 'note',
}, },
...(featureCan(Features.Branches)
? [
{
Header: intl.get('branch'),
width: 130,
accessor: 'branch.name',
disableSortBy: true,
className: 'branch',
},
]
: []),
{ {
Header: intl.get('credit'), Header: intl.get('credit'),
accessor: 'credit', accessor: 'credit',
@@ -107,6 +93,5 @@ export const useManualJournalEntriesColumns = () => {
align: 'right', align: 'right',
}, },
], ],
[featureCan], [],
); );
};

View File

@@ -58,9 +58,9 @@ function PaymentMadeDetailActionsBar({
text={<T id={'edit_payment_made'} />} text={<T id={'edit_payment_made'} />}
onClick={handleEditPaymentMade} onClick={handleEditPaymentMade}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}> <Can I={PaymentMadeAction.Delete} a={AbilitySubject.PaymentMade}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

@@ -95,12 +95,12 @@ function PaymentReceiveActionsBar({
intent={Intent.DANGER} intent={Intent.DANGER}
onClick={handleDeletePaymentReceive} onClick={handleDeletePaymentReceive}
/> />
<NavbarDivider />
</Can> </Can>
<Can <Can
I={PaymentReceiveAction.NotifyBySms} I={PaymentReceiveAction.NotifyBySms}
a={AbilitySubject.PaymentReceive} a={AbilitySubject.PaymentReceive}
> >
<NavbarDivider />
<MoreMenuItems <MoreMenuItems
payload={{ payload={{
onNotifyViaSMS: handleNotifyViaSMS, onNotifyViaSMS: handleNotifyViaSMS,

View File

@@ -92,9 +92,9 @@ function ReceiptDetailActionBar({
intent={Intent.DANGER} intent={Intent.DANGER}
onClick={safeCallback(onDeleteReceipt)} onClick={safeCallback(onDeleteReceipt)}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={SaleReceiptAction.NotifyBySms} a={AbilitySubject.Receipt}> <Can I={SaleReceiptAction.NotifyBySms} a={AbilitySubject.Receipt}>
<NavbarDivider />
<MoreMenuItems <MoreMenuItems
payload={{ payload={{
onNotifyViaSMS: handleNotifyViaSMS, onNotifyViaSMS: handleNotifyViaSMS,

View File

@@ -79,10 +79,10 @@ function VendorCreditDetailActionsBar({
text={<T id={'refund'} />} text={<T id={'refund'} />}
onClick={handleRefundVendorCredit} onClick={handleRefundVendorCredit}
/> />
<NavbarDivider />
</If> </If>
</Can> </Can>
<Can I={VendorCreditAction.Delete} a={AbilitySubject.VendorCredit}> <Can I={VendorCreditAction.Delete} a={AbilitySubject.VendorCredit}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

@@ -102,17 +102,17 @@ function VendorDetailsActionsBar({
icon={<Icon icon={'plus'} />} icon={<Icon icon={'plus'} />}
/> />
</Popover> </Popover>
<NavbarDivider />
<Can I={VendorAction.Edit} a={AbilitySubject.Vendor}> <Can I={VendorAction.Edit} a={AbilitySubject.Vendor}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon="pen-18" />} icon={<Icon icon="pen-18" />}
text={<T id={'vendor.drawer.action.edit'} />} text={<T id={'vendor.drawer.action.edit'} />}
onClick={safeCallback(onEditContact)} onClick={safeCallback(onEditContact)}
/> />
<NavbarDivider />
</Can> </Can>
<Can I={VendorAction.Delete} a={AbilitySubject.Vendor}> <Can I={VendorAction.Delete} a={AbilitySubject.Vendor}>
<NavbarDivider />
<Button <Button
className={Classes.MINIMAL} className={Classes.MINIMAL}
icon={<Icon icon={'trash-16'} iconSize={16} />} icon={<Icon icon={'trash-16'} iconSize={16} />}

View File

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

View File

@@ -48,10 +48,7 @@ const ActionsCellRenderer = ({
}; };
const exampleMenu = ( const exampleMenu = (
<Menu> <Menu>
<MenuItem <MenuItem onClick={handleClickRemoveRole} text="Remove line" />
onClick={handleClickRemoveRole}
text={intl.get('expense.entries.remove_row')}
/>
</Menu> </Menu>
); );
return ( return (

View File

@@ -18,7 +18,6 @@ function APAgingSummaryHeaderDimensionsProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -18,7 +18,6 @@ function ARAgingSummaryHeaderDimensionsProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -19,7 +19,6 @@ function BalanceSheetHeaderDimensionsProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -10,16 +10,16 @@ const CashFlowStatementDimensionsPanelContext = React.createContext();
* cash flow statement dimensions panel provider. * cash flow statement dimensions panel provider.
* @returns * @returns
*/ */
function CashFlowStatementDimensionsPanelProvider({ query, ...props }) { function CashFlowStatementDimensionsPanelProvider({ query,...props }) {
// Features guard. // Features guard.
const { featureCan } = useFeatureCan(); const { featureCan } = useFeatureCan();
const isBranchFeatureCan = featureCan(Features.Branches); const isBranchFeatureCan = featureCan(Features.Branches);
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(
enabled: isBranchFeatureCan, query,
keepPreviousData: true, { enabled: isBranchFeatureCan },
}); );
// Provider // Provider
const provider = { const provider = {

View File

@@ -26,9 +26,9 @@ export const useCashFlowStatementColumns = () => {
* Cash flow statement loading bar. * Cash flow statement loading bar.
*/ */
export function CashFlowStatementLoadingBar() { export function CashFlowStatementLoadingBar() {
const { isCashFlowFetching } = useCashFlowStatementContext(); const { isCashFlowLoading } = useCashFlowStatementContext();
return ( return (
<If condition={isCashFlowFetching}> <If condition={isCashFlowLoading}>
<FinancialLoadingBar /> <FinancialLoadingBar />
</If> </If>
); );

View File

@@ -19,7 +19,6 @@ function GeneralLedgerHeaderDimensionsPanelProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -3,8 +3,7 @@ import { FormGroup, Classes } from '@blueprintjs/core';
import { FormattedMessage as T } from 'components'; import { FormattedMessage as T } from 'components';
import classNames from 'classnames'; import classNames from 'classnames';
import { AccountMultiSelect, Row, Col } from 'components'; import { AccountsMultiSelect, Row, Col } from 'components';
import { FFormGroup } from '../../../components/Forms';
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange'; import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
import RadiosAccountingBasis from '../RadiosAccountingBasis'; import RadiosAccountingBasis from '../RadiosAccountingBasis';
@@ -45,13 +44,12 @@ function GLHeaderGeneralPaneContent() {
</Row> </Row>
<Row> <Row>
<Col xs={4}> <Col xs={4}>
<FFormGroup <FormGroup
label={<T id={'specific_accounts'} />} label={<T id={'specific_accounts'} />}
name={'accounts'} className={classNames('form-group--select-list', Classes.FILL)}
className={Classes.FILL}
> >
<AccountMultiSelect name="accounts" accounts={accounts} /> <AccountsMultiSelect items={accounts} />
</FFormGroup> </FormGroup>
</Col> </Col>
</Row> </Row>

View File

@@ -32,7 +32,6 @@ export const getDefaultGeneralLedgerQuery = () => {
basis: 'accural', basis: 'accural',
filterByOption: 'with-transactions', filterByOption: 'with-transactions',
branchesIds: [], branchesIds: [],
accounts: [],
}; };
}; };

View File

@@ -24,13 +24,12 @@ function InventoryValuationHeaderDimensionsProvider({ ...props }) {
// Fetches the warehouses list. // Fetches the warehouses list.
const { data: warehouses, isLoading: isWarehouesLoading } = useWarehouses( const { data: warehouses, isLoading: isWarehouesLoading } = useWarehouses(
null, null,
{ enabled: isWarehouseFeatureCan, keepPreviousData: true }, { enabled: isWarehouseFeatureCan },
); );
// Fetches the branches list. // Fetches the branches list.
const { data: branches, isLoading: isBranchLoading } = useBranches(null, { const { data: branches, isLoading: isBranchLoading } = useBranches(null, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -15,12 +15,9 @@ function ProfitLossSheetProvider({ query, ...props }) {
isFetching, isFetching,
isLoading, isLoading,
refetch, refetch,
} = useProfitLossSheet( } = useProfitLossSheet({
{ ...transformFilterFormToQuery(query),
...transformFilterFormToQuery(query), });
},
{ keepPreviousData: true },
);
const provider = { const provider = {
profitLossSheet, profitLossSheet,

View File

@@ -19,7 +19,6 @@ function ProfitLossSheetHeaderDimensionsProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -18,7 +18,6 @@ function TrialBLHeaderDimensionsPanelProvider({ query, ...props }) {
// Fetches the branches list. // Fetches the branches list.
const { isLoading: isBranchesLoading, data: branches } = useBranches(query, { const { isLoading: isBranchesLoading, data: branches } = useBranches(query, {
enabled: isBranchFeatureCan, enabled: isBranchFeatureCan,
keepPreviousData: true,
}); });
// Provider // Provider

View File

@@ -47,6 +47,11 @@ export default function ItemFormPrimarySection() {
<div class="mb1"> <div class="mb1">
<FormattedHTMLMessage id={'products_you_buy_and_or_sell'} /> <FormattedHTMLMessage id={'products_you_buy_and_or_sell'} />
</div> </div>
<div class="mb1">
<FormattedHTMLMessage
id={'products_you_buy_and_or_sell_but_don_t_need'}
/>
</div>
</> </>
); );
@@ -81,6 +86,7 @@ export default function ItemFormPrimarySection() {
disabled={!isNewMode && item.type === 'inventory'} disabled={!isNewMode && item.type === 'inventory'}
> >
<Radio label={<T id={'service'} />} value="service" /> <Radio label={<T id={'service'} />} value="service" />
<Radio label={<T id={'non_inventory'} />} value="non-inventory" />
<Radio label={<T id={'inventory'} />} value="inventory" /> <Radio label={<T id={'inventory'} />} value="inventory" />
</RadioGroup> </RadioGroup>
</FormGroup> </FormGroup>
@@ -120,11 +126,7 @@ export default function ItemFormPrimarySection() {
helperText={<ErrorMessage name={'code'} />} helperText={<ErrorMessage name={'code'} />}
inline={true} inline={true}
> >
<InputGroup <InputGroup medium={true} intent={inputIntent({ error, touched })} {...field} />
medium={true}
intent={inputIntent({ error, touched })}
{...field}
/>
</FormGroup> </FormGroup>
)} )}
</FastField> </FastField>

View File

@@ -64,6 +64,7 @@ export const transitionItemTypeKeyToLabel = (itemTypeKey) => {
const table = { const table = {
service: intl.get('service'), service: intl.get('service'),
inventory: intl.get('inventory'), inventory: intl.get('inventory'),
'non-inventory': intl.get('non_inventory'),
}; };
return typeof table[itemTypeKey] === 'string' ? table[itemTypeKey] : ''; return typeof table[itemTypeKey] === 'string' ? table[itemTypeKey] : '';
}; };
@@ -103,14 +104,6 @@ export const handleDeleteErrors = (errors) => {
intent: Intent.DANGER, intent: Intent.DANGER,
}); });
} }
if (
errors.find((error) => error.type === 'ITEM_HAS_ASSOCIATED_TRANSACTIONS')
) {
AppToaster.show({
message: intl.get('item.error.you_could_not_delete_item_has_associated'),
intent: Intent.DANGER,
});
}
}; };
/** /**

View File

@@ -50,7 +50,7 @@ function ItemsCategoryTable({
loading={isCategoriesLoading} loading={isCategoriesLoading}
headerLoading={isCategoriesLoading} headerLoading={isCategoriesLoading}
progressBarLoading={isCategoriesFetching} progressBarLoading={isCategoriesFetching}
expandable={false} expandable={true}
sticky={true} sticky={true}
selectionColumn={true} selectionColumn={true}
TableLoadingRenderer={TableSkeletonRows} TableLoadingRenderer={TableSkeletonRows}

View File

@@ -1,19 +1,16 @@
import * as Yup from 'yup'; import * as Yup from 'yup';
import moment from 'moment';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import { DATATYPES_LENGTH } from 'common/dataTypes'; import { DATATYPES_LENGTH } from 'common/dataTypes';
import { isBlank } from 'utils'; import { isBlank } from 'utils';
const BillFormSchema = Yup.object().shape({ const BillFormSchema = Yup.object().shape({
vendor_id: Yup.number().required().label(intl.get('vendor_name_')), vendor_id: Yup.number()
bill_date: Yup.date().required().label(intl.get('bill_date_')), .required()
.label(intl.get('vendor_name_')),
bill_date: Yup.date()
.required()
.label(intl.get('bill_date_')),
due_date: Yup.date() due_date: Yup.date()
.min(Yup.ref('bill_date'), ({ path, min }) =>
intl.get('bill.validation.due_date', {
path,
min: moment(min).format('YYYY/MM/DD'),
}),
)
.required() .required()
.label(intl.get('due_date_')), .label(intl.get('due_date_')),
bill_number: Yup.string() bill_number: Yup.string()
@@ -28,7 +25,7 @@ const BillFormSchema = Yup.object().shape({
open: Yup.boolean(), open: Yup.boolean(),
branch_id: Yup.string(), branch_id: Yup.string(),
warehouse_id: Yup.string(), warehouse_id: Yup.string(),
exchange_rate: Yup.number(), exchange_rate:Yup.number(),
entries: Yup.array().of( entries: Yup.array().of(
Yup.object().shape({ Yup.object().shape({
quantity: Yup.number() quantity: Yup.number()

View File

@@ -3,28 +3,24 @@ import intl from 'react-intl-universal';
import styled from 'styled-components'; import styled from 'styled-components';
import { FFormGroup, FEditableText, FormattedMessage as T } from 'components'; import { FFormGroup, FEditableText, FormattedMessage as T } from 'components';
/**
* Payment made form footer left-side.
* @returns {JSX.Element}
*/
export function PaymentMadeFormFooterLeft() { export function PaymentMadeFormFooterLeft() {
return ( return (
<React.Fragment> <React.Fragment>
{/* --------- Internal Note--------- */} {/* --------- Statement--------- */}
<InternalNoteFormGroup <StatementFormGroup
name={'internal_note'} name={'statement'}
label={<T id={'payment_made.form.internal_note.label'} />} label={<T id={'payment_made_form.label.statement'} />}
hintText={'Will be displayed on the Payment'}
> >
<FEditableText <FEditableText
name={'internal_note'} name={'statement'}
placeholder={intl.get('payment_made.form.internal_note.placeholder')} placeholder={intl.get('payment_made_form.statement.placeholder')}
/> />
</InternalNoteFormGroup> </StatementFormGroup>
</React.Fragment> </React.Fragment>
); );
} }
const StatementFormGroup = styled(FFormGroup)`
const InternalNoteFormGroup = styled(FFormGroup)`
&.bp3-form-group { &.bp3-form-group {
margin-bottom: 40px; margin-bottom: 40px;

View File

@@ -103,7 +103,7 @@ function PaymentMadeFormProvider({ query, paymentMadeId, ...props }) {
<DashboardInsider <DashboardInsider
loading={ loading={
isVendorsLoading || isVendorsLoading ||
isItemsLoading || isItemsFetching ||
isAccountsLoading || isAccountsLoading ||
isPaymentLoading isPaymentLoading
} }

View File

@@ -10,6 +10,7 @@ export function CreditNoteFormFooterLeft() {
<CreditNoteMsgFormGroup <CreditNoteMsgFormGroup
name={'note'} name={'note'}
label={<T id={'credit_note.label_customer_note'} />} label={<T id={'credit_note.label_customer_note'} />}
hintText={'Will be displayed on the invoice'}
> >
<FEditableText <FEditableText
name={'note'} name={'note'}
@@ -23,9 +24,9 @@ export function CreditNoteFormFooterLeft() {
> >
<FEditableText <FEditableText
name={'terms_conditions'} name={'terms_conditions'}
placeholder={intl.get( placeholder={
'credit_note.label_terms_and_conditions.placeholder', <T id={'credit_note.label_terms_and_conditions.placeholder'} />
)} }
/> />
</TermsConditsFormGroup> </TermsConditsFormGroup>
</React.Fragment> </React.Fragment>

View File

@@ -2,19 +2,16 @@ import * as Yup from 'yup';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import { DATATYPES_LENGTH } from 'common/dataTypes'; import { DATATYPES_LENGTH } from 'common/dataTypes';
import { isBlank } from 'utils'; import { isBlank } from 'utils';
import moment from 'moment';
const Schema = Yup.object().shape({ const Schema = Yup.object().shape({
customer_id: Yup.number().label(intl.get('customer_name_')).required(), customer_id: Yup.number()
estimate_date: Yup.date().required().label(intl.get('estimate_date_')), .label(intl.get('customer_name_'))
.required(),
estimate_date: Yup.date()
.required()
.label(intl.get('estimate_date_')),
expiration_date: Yup.date() expiration_date: Yup.date()
.required() .required()
.min(Yup.ref('estimate_date'), ({ path, min }) =>
intl.get('estimate.validation.expiration_date', {
path,
min: moment(min).format('YYYY/MM/DD'),
}),
)
.label(intl.get('expiration_date_')), .label(intl.get('expiration_date_')),
estimate_number: Yup.string() estimate_number: Yup.string()
.max(DATATYPES_LENGTH.STRING) .max(DATATYPES_LENGTH.STRING)

View File

@@ -1,5 +1,4 @@
import * as Yup from 'yup'; import * as Yup from 'yup';
import moment from 'moment';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import { DATATYPES_LENGTH } from 'common/dataTypes'; import { DATATYPES_LENGTH } from 'common/dataTypes';
import { isBlank } from 'utils'; import { isBlank } from 'utils';
@@ -8,15 +7,7 @@ const getSchema = () =>
Yup.object().shape({ Yup.object().shape({
customer_id: Yup.string().label(intl.get('customer_name_')).required(), customer_id: Yup.string().label(intl.get('customer_name_')).required(),
invoice_date: Yup.date().required().label(intl.get('invoice_date_')), invoice_date: Yup.date().required().label(intl.get('invoice_date_')),
due_date: Yup.date() due_date: Yup.date().required().label(intl.get('due_date_')),
.min(Yup.ref('invoice_date'), ({ path, min }) =>
intl.get('invoice.validation.due_date', {
path,
min: moment(min).format('YYYY/MM/DD'),
}),
)
.required()
.label(intl.get('due_date_')),
invoice_no: Yup.string() invoice_no: Yup.string()
.max(DATATYPES_LENGTH.STRING) .max(DATATYPES_LENGTH.STRING)
.label(intl.get('invoice_no_')), .label(intl.get('invoice_no_')),

View File

@@ -10,6 +10,7 @@ export function InvoiceFormFooterLeft() {
<InvoiceMsgFormGroup <InvoiceMsgFormGroup
name={'invoice_message'} name={'invoice_message'}
label={<T id={'invoice_message'} />} label={<T id={'invoice_message'} />}
hintText={'Will be displayed on the invoice'}
> >
<FEditableText <FEditableText
name={'invoice_message'} name={'invoice_message'}
@@ -19,7 +20,7 @@ export function InvoiceFormFooterLeft() {
{/* --------- Terms and conditions --------- */} {/* --------- Terms and conditions --------- */}
<TermsConditsFormGroup <TermsConditsFormGroup
label={<T id={'invoice_form.label.terms_conditions'} />} label={<T id={'invoice_form.label.invoice_message'} />}
name={'terms_conditions'} name={'terms_conditions'}
> >
<FEditableText <FEditableText

View File

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

View File

@@ -7,24 +7,14 @@ export function PaymentReceiveFormFootetLeft() {
return ( return (
<React.Fragment> <React.Fragment>
{/* --------- Statement--------- */} {/* --------- Statement--------- */}
<PaymentMsgFormGroup
name={'message'}
label={<T id={'payment_receive_form.message.label'} />}
>
<FEditableText
name={'message'}
placeholder={intl.get('payment_receive_form.message.placeholder')}
/>
</PaymentMsgFormGroup>
{/* --------- Internal Note--------- */}
<TermsConditsFormGroup <TermsConditsFormGroup
name={'internal_note'} name={'statement'}
label={<T id={'payment_receive_form.label.note'} />} label={<T id={'payment_receive_form.label.statement'} />}
hintText={'Will be displayed on the Payment'}
> >
<FEditableText <FEditableText
name={'internal_note'} name={'statement'}
placeholder={intl.get('payment_receive_form.internal_note.placeholder')} placeholder={intl.get('payment_receive_form.statement.placeholder')}
/> />
</TermsConditsFormGroup> </TermsConditsFormGroup>
</React.Fragment> </React.Fragment>
@@ -42,17 +32,3 @@ const TermsConditsFormGroup = styled(FFormGroup)`
} }
} }
`; `;
const PaymentMsgFormGroup = styled(FFormGroup)`
&.bp3-form-group {
margin-bottom: 40px;
.bp3-label {
font-size: 12px;
margin-bottom: 12px;
}
.bp3-form-content {
margin-left: 10px;
}
}
`;

View File

@@ -18,18 +18,16 @@ export function ReceiptFormFooterLeft() {
/> />
</ReceiptMsgFormGroup> </ReceiptMsgFormGroup>
{/* --------- Terms and conditions --------- */} {/* --------- Statement--------- */}
<TermsConditsFormGroup <StatementFormGroup
label={<T id={'receipt_form.label.terms_conditions'} />} label={<T id={'receipt_form.label.statement'} />}
name={'terms_conditions'} name={'statement'}
> >
<FEditableText <FEditableText
name={'terms_conditions'} name={'statement'}
placeholder={intl.get( placeholder={intl.get('receipt_form.statement.placeholder')}
'receipt_form.terms_and_conditions.placeholder',
)}
/> />
</TermsConditsFormGroup> </StatementFormGroup>
</React.Fragment> </React.Fragment>
); );
} }
@@ -48,7 +46,7 @@ const ReceiptMsgFormGroup = styled(FFormGroup)`
} }
`; `;
const TermsConditsFormGroup = styled(FFormGroup)` const StatementFormGroup = styled(FFormGroup)`
&.bp3-form-group { &.bp3-form-group {
.bp3-label { .bp3-label {
font-size: 12px; font-size: 12px;

View File

@@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import { Formik, Form } from 'formik'; import { Formik, Form } from 'formik';
import { isEmpty, sumBy } from 'lodash'; import { isEmpty } from 'lodash';
import { Intent } from '@blueprintjs/core'; import { Intent } from '@blueprintjs/core';
import { useHistory } from 'react-router-dom'; import { useHistory } from 'react-router-dom';
import { CLASSES } from 'common/classes'; import { CLASSES } from 'common/classes';
@@ -20,7 +20,7 @@ import WarehouseTransferFormDialog from './WarehouseTransferFormDialog';
import withDashboardActions from 'containers/Dashboard/withDashboardActions'; import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import withSettings from 'containers/Settings/withSettings'; import withSettings from 'containers/Settings/withSettings';
import { AppToaster } from 'components'; import { AppToaster, } from 'components';
import { useWarehouseTransferFormContext } from './WarehouseTransferFormProvider'; import { useWarehouseTransferFormContext } from './WarehouseTransferFormProvider';
import { compose, orderingLinesIndexes, transactionNumber } from 'utils'; import { compose, orderingLinesIndexes, transactionNumber } from 'utils';
import { WarehouseTransferObserveItemsCost } from './components'; import { WarehouseTransferObserveItemsCost } from './components';

View File

@@ -20,7 +20,7 @@ const Schema = Yup.object().shape({
Yup.object().shape({ Yup.object().shape({
item_id: Yup.number().nullable(), item_id: Yup.number().nullable(),
description: Yup.string().nullable().max(DATATYPES_LENGTH.TEXT), description: Yup.string().nullable().max(DATATYPES_LENGTH.TEXT),
quantity: Yup.number().min(1).max(DATATYPES_LENGTH.INT_10), quantity: Yup.number().nullable().max(DATATYPES_LENGTH.INT_10),
}), }),
), ),
}); });

View File

@@ -45,7 +45,7 @@ export default function WarehouseTransferFormEntriesTable({
item_id: newRowMeta.itemId, item_id: newRowMeta.itemId,
warehouses: newRowMeta.warehouses, warehouses: newRowMeta.warehouses,
description: '', description: '',
quantity: '', quantity: 0,
}; };
const newRows = mutateTableRow(newRowMeta.rowIndex, newRow, entries); const newRows = mutateTableRow(newRowMeta.rowIndex, newRow, entries);

View File

@@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import styled from 'styled-components'; import styled from 'styled-components';
import intl from 'react-intl-universal';
import { FFormGroup, FEditableText, FormattedMessage as T } from 'components'; import { FFormGroup, FEditableText, FormattedMessage as T } from 'components';
export function WarehouseTransferFormFooterLeft() { export function WarehouseTransferFormFooterLeft() {
@@ -8,12 +7,14 @@ export function WarehouseTransferFormFooterLeft() {
<React.Fragment> <React.Fragment>
{/* --------- Terms and conditions --------- */} {/* --------- Terms and conditions --------- */}
<TermsConditsFormGroup <TermsConditsFormGroup
label={<T id={'warehouse_transfer.form.reason.label'} />} label={<T id={'terms_conditions'} />}
name={'reason'} name={'reason'}
> >
<FEditableText <FEditableText
name={'reason'} name={'reason'}
placeholder={intl.get('warehouse_transfer.form.reason.placeholder')} placeholder={
'Enter the terms and conditions of your business to be displayed in your transaction'
}
/> />
</TermsConditsFormGroup> </TermsConditsFormGroup>
</React.Fragment> </React.Fragment>

View File

@@ -1,5 +1,7 @@
import React from 'react'; import React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { useFormikContext } from 'formik';
import intl from 'react-intl-universal';
import { CLASSES } from 'common/classes'; import { CLASSES } from 'common/classes';
import WarehouseTransferFormHeaderFields from './WarehouseTransferFormHeaderFields'; import WarehouseTransferFormHeaderFields from './WarehouseTransferFormHeaderFields';

View File

@@ -183,6 +183,20 @@ function WarehouseTransferFormHeaderFields({
</FormGroup> </FormGroup>
)} )}
</FastField> </FastField>
{/*------------ reason -----------*/}
<FastField name={'reason'}>
{({ field, meta: { error, touched } }) => (
<FormGroup
label={<T id={'reason'} />}
className={'form-group--reason'}
intent={inputIntent({ error, touched })}
inline={true}
helperText={<ErrorMessage name={'reason'} />}
>
<InputGroup minimal={true} {...field} />
</FormGroup>
)}
</FastField>
</div> </div>
); );
} }

View File

@@ -21,10 +21,7 @@ export function ActionsCellRenderer({
const exampleMenu = ( const exampleMenu = (
<Menu> <Menu>
<MenuItem <MenuItem onClick={onRemoveRole} text="Remove line" />
onClick={onRemoveRole}
text={intl.get('warehouse_transfer.entries.remove_row')}
/>
</Menu> </Menu>
); );

View File

@@ -33,9 +33,6 @@ const commonInvalidateQueries = (queryClient) => {
// Invalidate items associated bills transactions. // Invalidate items associated bills transactions.
queryClient.invalidateQueries(t.ITEMS_ASSOCIATED_WITH_BILLS); queryClient.invalidateQueries(t.ITEMS_ASSOCIATED_WITH_BILLS);
// Invalidate item warehouses.
queryClient.invalidateQueries(t.ITEM_WAREHOUSES_LOCATION);
}; };
/** /**

View File

@@ -33,6 +33,5 @@ export * from './roles';
export * from './creditNote'; export * from './creditNote';
export * from './vendorCredit'; export * from './vendorCredit';
export * from './transactionsLocking'; export * from './transactionsLocking';
export * from './warehouses'; export * from './warehouses'
export * from './branches'; export * from './branches';
export * from './warehousesTransfers';

View File

@@ -34,9 +34,6 @@ const commonInvalidateQueries = (queryClient) => {
// Invalidate // Invalidate
queryClient.invalidateQueries(t.ITEM_ASSOCIATED_WITH_INVOICES); queryClient.invalidateQueries(t.ITEM_ASSOCIATED_WITH_INVOICES);
// Invalidate item warehouses.
queryClient.invalidateQueries(t.ITEM_WAREHOUSES_LOCATION);
}; };
/** /**

View File

@@ -27,9 +27,6 @@ const commonInvalidateQueries = (queryClient) => {
// Invalidate // Invalidate
queryClient.invalidateQueries(t.ITEM_ASSOCIATED_WITH_RECEIPTS); queryClient.invalidateQueries(t.ITEM_ASSOCIATED_WITH_RECEIPTS);
// Invalidate item warehouses.
queryClient.invalidateQueries(t.ITEM_WAREHOUSES_LOCATION);
// Invalidate the settings. // Invalidate the settings.
queryClient.invalidateQueries([t.SETTING, t.SETTING_RECEIPTS]); queryClient.invalidateQueries([t.SETTING, t.SETTING_RECEIPTS]);
}; };

View File

@@ -12,6 +12,7 @@ const commonInvalidateQueries = (queryClient) => {
// Invalidate warehouses transfers. // Invalidate warehouses transfers.
queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS); queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS);
// queryClient.invalidateQueries(t.WAREHOUSE_TRANSFER);
queryClient.invalidateQueries(t.DASHBOARD_META); queryClient.invalidateQueries(t.DASHBOARD_META);
}; };
@@ -104,6 +105,164 @@ export function useWarehouse(id, props, requestProps) {
); );
} }
/**
* Create a new warehouse transfer.
*/
export function useCreateWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(values) => apiRequest.post('warehouses/transfers', values),
{
onSuccess: (res, values) => {
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
* Edits the given warehouse transfer.
*/
export function useEditWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
([id, values]) => apiRequest.post(`warehouses/transfers/${id}`, values),
{
onSuccess: (res, [id, values]) => {
// Invalidate specific sale invoice.
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
* Deletes the given warehouse Transfer.
*/
export function useDeleteWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation((id) => apiRequest.delete(`warehouses/transfers/${id}`), {
onSuccess: (res, id) => {
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
});
}
const transformWarehousesTransfer = (res) => ({
warehousesTransfers: res.data.data,
pagination: transformPagination(res.data.pagination),
filterMeta: res.data.filter,
});
/**
* Retrieve Warehoues list.
*/
export function useWarehousesTransfers(query, props) {
return useRequestQuery(
[t.WAREHOUSE_TRANSFERS, query],
{ method: 'get', url: 'warehouses/transfers', params: query },
{
select: transformWarehousesTransfer,
defaultData: {
warehousesTransfers: [],
pagination: {
page: 1,
pageSize: 20,
total: 0,
},
filterMeta: {},
},
...props,
},
);
}
/**
* Retrieve the warehouse transfer details.
* @param {number}
*/
export function useWarehouseTransfer(id, props, requestProps) {
return useRequestQuery(
[t.WAREHOUSE_TRANSFER, id],
{ method: 'get', url: `warehouses/transfers/${id}`, ...requestProps },
{
select: (res) => res.data.data,
defaultData: {},
...props,
},
);
}
/**
*
* @param {*} props
* @returns
*/
export function useInitiateWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(id) => apiRequest.put(`warehouses/transfers/${id}/initiate`),
{
onSuccess: (res, id) => {
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
*
* @param {*} props
* @returns
*/
export function useTransferredWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(id) => apiRequest.put(`warehouses/transfers/${id}/transferred`),
{
onSuccess: (res, id) => {
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
export function useRefreshWarehouseTransfers() {
const queryClient = useQueryClient();
return {
refresh: () => {
queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS);
},
};
}
/** /**
* Activate the given warehouse. * Activate the given warehouse.
*/ */

View File

@@ -1,172 +0,0 @@
import { useQueryClient, useMutation } from 'react-query';
import { transformPagination } from 'utils';
import { useRequestQuery } from '../useQueryRequest';
import useApiRequest from '../useRequest';
import t from './types';
// Common invalidate queries.
const commonInvalidateQueries = (queryClient) => {
// Invalidate warehouses transfers.
queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS);
// Invalidate item warehouses.
queryClient.invalidateQueries(t.ITEM_WAREHOUSES_LOCATION);
};
/**
* Create a new warehouse transfer.
*/
export function useCreateWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(values) => apiRequest.post('warehouses/transfers', values),
{
onSuccess: (res, values) => {
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
* Edits the given warehouse transfer.
*/
export function useEditWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
([id, values]) => apiRequest.post(`warehouses/transfers/${id}`, values),
{
onSuccess: (res, [id, values]) => {
// Invalidate specific sale invoice.
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
* Deletes the given warehouse Transfer.
*/
export function useDeleteWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation((id) => apiRequest.delete(`warehouses/transfers/${id}`), {
onSuccess: (res, id) => {
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
});
}
const transformWarehousesTransfer = (res) => ({
warehousesTransfers: res.data.data,
pagination: transformPagination(res.data.pagination),
filterMeta: res.data.filter,
});
/**
* Retrieve Warehoues list.
*/
export function useWarehousesTransfers(query, props) {
return useRequestQuery(
[t.WAREHOUSE_TRANSFERS, query],
{ method: 'get', url: 'warehouses/transfers', params: query },
{
select: transformWarehousesTransfer,
defaultData: {
warehousesTransfers: [],
pagination: {
page: 1,
pageSize: 20,
total: 0,
},
filterMeta: {},
},
...props,
},
);
}
/**
* Retrieve the warehouse transfer details.
* @param {number}
*/
export function useWarehouseTransfer(id, props, requestProps) {
return useRequestQuery(
[t.WAREHOUSE_TRANSFER, id],
{ method: 'get', url: `warehouses/transfers/${id}`, ...requestProps },
{
select: (res) => res.data.data,
defaultData: {},
...props,
},
);
}
/**
*
* @param {*} props
* @returns
*/
export function useInitiateWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(id) => apiRequest.put(`warehouses/transfers/${id}/initiate`),
{
onSuccess: (res, id) => {
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
/**
*
* @param {*} props
* @returns
*/
export function useTransferredWarehouseTransfer(props) {
const queryClient = useQueryClient();
const apiRequest = useApiRequest();
return useMutation(
(id) => apiRequest.put(`warehouses/transfers/${id}/transferred`),
{
onSuccess: (res, id) => {
queryClient.invalidateQueries([t.WAREHOUSE_TRANSFER, id]);
// Common invalidate queries.
commonInvalidateQueries(queryClient);
},
...props,
},
);
}
export function useRefreshWarehouseTransfers() {
const queryClient = useQueryClient();
return {
refresh: () => {
queryClient.invalidateQueries(t.WAREHOUSE_TRANSFERS);
},
};
}

View File

@@ -1173,7 +1173,6 @@
"From transaction": "من معاملة", "From transaction": "من معاملة",
"Landed": "Landed", "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?": "بمجرد حذف معاملة تحميل التكلفة ، لن تتمكن من استعادتها لاحقًا ، هل أنت متأكد من أنك تريد حذف هذه المعاملة؟",
"journal_entries": "القيود", "journal_entries": "القيود",
"contact": "جهة الاتصال", "contact": "جهة الاتصال",
"invoice_details": "تفاصيل الفاتورة", "invoice_details": "تفاصيل الفاتورة",
@@ -1361,7 +1360,6 @@
"item.field.sell_account.hint": "أدخل السعر الذي ستبيعه لهذا العنصر.", "item.field.sell_account.hint": "أدخل السعر الذي ستبيعه لهذا العنصر.",
"item_entries.products_services.hint": "أدخل المنتجات أو الخدمات التي تبيعها أو تشتريها لتتبع ما قمت ببيعه أو شرائه.", "item_entries.products_services.hint": "أدخل المنتجات أو الخدمات التي تبيعها أو تشتريها لتتبع ما قمت ببيعه أو شرائه.",
"item_entries.landed.hint": "يتيح لك هذه الخيار إمكانية إضافة تكلفة اضافية علي فاتورة الشراء متال علي ذلك تكاليف الشحن ، ثم تحديد هذه التكلفة لتحميلها علي فاتورة الشراء.", "item_entries.landed.hint": "يتيح لك هذه الخيار إمكانية إضافة تكلفة اضافية علي فاتورة الشراء متال علي ذلك تكاليف الشحن ، ثم تحديد هذه التكلفة لتحميلها علي فاتورة الشراء.",
"item_entries.remove_row": "حذف الصف",
"invoice.auto_increment.auto": "يتم تعيين أرقام الفواتير على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟", "invoice.auto_increment.auto": "يتم تعيين أرقام الفواتير على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟",
"invoice.auto_increment.manually": "يتم تعيين أرقام فواتيرك يدوياً. هل أنت متأكد من تغيير هذه الإعدادات؟", "invoice.auto_increment.manually": "يتم تعيين أرقام فواتيرك يدوياً. هل أنت متأكد من تغيير هذه الإعدادات؟",
"manual_journals.auto_increment.auto": "يتم تعيين أرقام القيود على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟", "manual_journals.auto_increment.auto": "يتم تعيين أرقام القيود على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟",
@@ -1390,7 +1388,7 @@
"filter.value": "قيمة", "filter.value": "قيمة",
"payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!.", "payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!.",
"estimate.delete.error.estimate_converted_to_invoice": "لا يمكن حذف عملية عرض اسعار الذي تم تحويلها إلي فاتورة بيع.", "estimate.delete.error.estimate_converted_to_invoice": "لا يمكن حذف عملية عرض اسعار الذي تم تحويلها إلي فاتورة بيع.",
"landed_cost.action.delete.success_message": "The landed cost has been deleted successfully.", "landed_cost.action.delete.success_message": "تم حذف تكلفة اضافية بنجاح. ",
"items.option.only_active": "Only active", "items.option.only_active": "Only active",
"items.option_all_items.hint": "جميع الاصناف ، بما في ذلك تلك الاصناف لديها رصيد صفر.", "items.option_all_items.hint": "جميع الاصناف ، بما في ذلك تلك الاصناف لديها رصيد صفر.",
"items.option_with_transactions": "الاصناف مع معاملات", "items.option_with_transactions": "الاصناف مع معاملات",
@@ -1594,6 +1592,9 @@
"refund": "استرجاع", "refund": "استرجاع",
"landed_cost.dialog.label_select_transaction": "حدد المعاملة ", "landed_cost.dialog.label_select_transaction": "حدد المعاملة ",
"landed_cost.dialog.label_select_transaction_entry": "حدد سطر المعاملة ", "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.label": "استرجاع اموال",
"refund_credit_note.dialog.success_message": "تم انشاء معاملة استرجاع الاموال لإشعار الدائن بنجاح.", "refund_credit_note.dialog.success_message": "تم انشاء معاملة استرجاع الاموال لإشعار الدائن بنجاح.",
"refund_credit_note.dialog.refund_date": "تاريخ الاسترجاع", "refund_credit_note.dialog.refund_date": "تاريخ الاسترجاع",
@@ -1779,7 +1780,7 @@
"credit_note_preview.dialog.title": "معاينة إشعار الدائن PDF", "credit_note_preview.dialog.title": "معاينة إشعار الدائن PDF",
"payment_receive_preview.dialog.title": "معاينة سند الزبون PDF", "payment_receive_preview.dialog.title": "معاينة سند الزبون PDF",
"balance_sheet.comparisons": "مقارنات", "balance_sheet.comparisons": "مقارنات",
"balance_sheet.dimensions": "الابعاد", "balance_sheet.dimensions": "Dimensions",
"balance_sheet.percentage_of_column": "% التغير العمودي", "balance_sheet.percentage_of_column": "% التغير العمودي",
"balance_sheet.percentage_of_row": "% التغير الأفقي", "balance_sheet.percentage_of_row": "% التغير الأفقي",
"balance_sheet.previous_year": "السنة السابقة (س.س)", "balance_sheet.previous_year": "السنة السابقة (س.س)",
@@ -1787,7 +1788,7 @@
"balance_sheet.change": "% التغيرات", "balance_sheet.change": "% التغيرات",
"balance_sheet.previous_period": "الفترة السابقة (ف.س) ", "balance_sheet.previous_period": "الفترة السابقة (ف.س) ",
"profit_loss_sheet.comparisons": "مقارنات", "profit_loss_sheet.comparisons": "مقارنات",
"profit_loss_sheet.dimensions": "الابعاد", "profit_loss_sheet.dimensions": "Dimensions",
"profit_loss_sheet.previous_year": "السنة السابقة (س.س)", "profit_loss_sheet.previous_year": "السنة السابقة (س.س)",
"profit_loss_sheet.total_change": "إجمالي التغيرات", "profit_loss_sheet.total_change": "إجمالي التغيرات",
"profit_loss_sheet.perentage_change": "% التغيرات", "profit_loss_sheet.perentage_change": "% التغيرات",
@@ -1796,10 +1797,13 @@
"profit_loss_sheet.percentage_of_row": "% التغير الأفقي", "profit_loss_sheet.percentage_of_row": "% التغير الأفقي",
"profit_loss_sheet.percentage_of_expense": "% التغير في المصاريف", "profit_loss_sheet.percentage_of_expense": "% التغير في المصاريف",
"profit_loss_sheet.percentage_of_income": "% التغير الإيرادات", "profit_loss_sheet.percentage_of_income": "% التغير الإيرادات",
"report.balance_sheet_comparison.title": "مقارنة الميزانية العمومية", "report.balance_sheet_comparison.title": "مقارنة الميزانية العمومية",
"report.balance_sheet_comparison.desc": "يعرض أصول الشركة والتزاماتها وحقوق المساهمين في نقطة زمنية محددة مقارنة بالسنة الماضية.", "report.balance_sheet_comparison.desc": "يعرض أصول الشركة والتزاماتها وحقوق المساهمين في نقطة زمنية محددة مقارنة بالسنة الماضية.",
"report.profit_loss_sheet_comparison.title": "مقارنة قائمة الدخل", "report.profit_loss_sheet_comparison.title": "مقارنة قائمة الدخل",
"report.profit_loss_sheet_comparison.desc": "يعرض الإيرادات والتكاليف والمصاريف المتكبدة في نقطة محددة ومقارنة بالعام السابق.", "report.profit_loss_sheet_comparison.desc": "يعرض الإيرادات والتكاليف والمصاريف المتكبدة في نقطة محددة ومقارنة بالعام السابق.",
"warehouse_locations.label": "المخازن", "warehouse_locations.label": "المخازن",
"warehouse_locations.column.warehouse_name": "اسم المخزن", "warehouse_locations.column.warehouse_name": "اسم المخزن",
"warehouse_locations.column.quantity": "الكمية", "warehouse_locations.column.quantity": "الكمية",
@@ -1848,7 +1852,6 @@
"warehouse_transfer.column.transfer_quantity": "الكمية ", "warehouse_transfer.column.transfer_quantity": "الكمية ",
"warehouse_transfer.column.source_warehouse": "المصدر", "warehouse_transfer.column.source_warehouse": "المصدر",
"warehouse_transfer.column.destination_warehouse": "الوجهة", "warehouse_transfer.column.destination_warehouse": "الوجهة",
"warehouse_transfer.column.cost_price": "سعر التكلفة",
"warehouse_transfer.auto_increment.auto": "يتم تعيين أرقام النقل على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟", "warehouse_transfer.auto_increment.auto": "يتم تعيين أرقام النقل على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟",
"warehouse_transfer.auto_increment.manually": "يتم تعيين أرقام النقل يدوياً. هل أنت متأكد من تغيير هذه الإعدادات؟", "warehouse_transfer.auto_increment.manually": "يتم تعيين أرقام النقل يدوياً. هل أنت متأكد من تغيير هذه الإعدادات؟",
"warehouse_transfer.setting_your_auto_generated_transfer_no": "تعيين رقم النقل الذي تم إنشاؤه تلقائيًا", "warehouse_transfer.setting_your_auto_generated_transfer_no": "تعيين رقم النقل الذي تم إنشاؤه تلقائيًا",
@@ -1916,7 +1919,7 @@
"branches_multi_select.placeholder": "تصفية حسب الفروع…", "branches_multi_select.placeholder": "تصفية حسب الفروع…",
"warehouses_multi_select.label": "مخازن", "warehouses_multi_select.label": "مخازن",
"warehouses_multi_select.placeholder": "تصفية حسب المخازن…", "warehouses_multi_select.placeholder": "تصفية حسب المخازن…",
"dimensions": "الأبعاد", "dimensions": "Dimensions",
"warehouse_transfer.save_initiate_transfer": "حفظ وبدء النقل", "warehouse_transfer.save_initiate_transfer": "حفظ وبدء النقل",
"warehouse_transfer.save_mark_as_transferred": "حفظ وتم النقل", "warehouse_transfer.save_mark_as_transferred": "حفظ وتم النقل",
"warehouse_transfer.label.transfer_initiated": "بدء النقل", "warehouse_transfer.label.transfer_initiated": "بدء النقل",
@@ -1945,7 +1948,7 @@
"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!", "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", "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", "make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
"estimate_form.label.total": "إجمالي", "estimate_form.label.total": "إجمالي",
@@ -1953,15 +1956,14 @@
"estimate_form.label.customer_note": "ملاحظة الزبون", "estimate_form.label.customer_note": "ملاحظة الزبون",
"estimate_form.label.terms_conditions": "الشروط والأحكام", "estimate_form.label.terms_conditions": "الشروط والأحكام",
"estimate_form.customer_note.placeholder": "Thanks for your business and have a great day!", "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.total": "إجمالي",
"invoice_form.label.subtotal": "المجموع", "invoice_form.label.subtotal": "المجموع",
"invoice_form.label.due_amount": "مبلغ المستحق", "invoice_form.label.due_amount": "مبلغ المستحق",
"invoice_form.label.payment_amount": "مبلغ المدفوع", "invoice_form.label.payment_amount": "مبلغ المدفوع",
"invoice_form.label.invoice_message": "رسالة الفاتورة", "invoice_form.label.invoice_message": "رسالة الفاتورة",
"invoice_form.invoice_message.placeholder": "Thanks for your business and have a great day!", "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": "Enter the terms and conditions of your business to be displayed in your transaction",
"invoice_form.terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
"receipt_form.label.total": "إجمالي", "receipt_form.label.total": "إجمالي",
"receipt_form.label.subtotal": "المجموع", "receipt_form.label.subtotal": "المجموع",
"receipt_form.label.due_amount": "مبلغ المستحق", "receipt_form.label.due_amount": "مبلغ المستحق",
@@ -1975,13 +1977,13 @@
"payment_receive_form.label.subtotal": "المجموع", "payment_receive_form.label.subtotal": "المجموع",
"payment_receive_form.label.total": "إجمالي", "payment_receive_form.label.total": "إجمالي",
"bill_form.label.note": "ملاحظة", "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.subtotal": "المجموع",
"bill_form.label.total": "إجمالي", "bill_form.label.total": "إجمالي",
"bill_form.label.due_amount": "مبلغ المستحق", "bill_form.label.due_amount": "مبلغ المستحق",
"bill_form.label.payment_amount": "مبلغ المدفوع", "bill_form.label.payment_amount": "مبلغ المدفوع",
"vendor_credit_form.label.note": "ملاحظة", "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.subtotal": "المجموع",
"vendor_credit_form.label.total": "إجمالي", "vendor_credit_form.label.total": "إجمالي",
"payment_made_form.label.statement": "بيان", "payment_made_form.label.statement": "بيان",
@@ -2006,17 +2008,6 @@
"estimate.warehouse_button.label": "المخزن: {label}", "estimate.warehouse_button.label": "المخزن: {label}",
"receipt.branch_button.label": "الفرع: {label}", "receipt.branch_button.label": "الفرع: {label}",
"receipt.warehouse_button.label": "المخزن: {label}", "receipt.warehouse_button.label": "المخزن: {label}",
"warehouse_transfer.empty_status.title": "إدارة عمليات النقل بين المخازن", "warehouse_transfer.empty_status.title": "",
"warehouse_transfer.empty_status.description": "غالبًا ماتحتاج الاعمال ذات مخازن متعددة لطلبات نقل البضائع من مخزن إلى آخر عندما تكون في حاجة ماسة إلى البائعين.", "warehouse_transfer.empty_status.description": ""
"warehouse_transfer.form.reason.label": "أسباب النقل",
"warehouse_transfer.form.reason.placeholder": "أدخل السبب وراء طلب النقل.",
"item.error.you_could_not_delete_item_has_associated": "لا يمكنك حذف العنصر لديه معاملات مرتبطة به ",
"warehouse_transfer.quantity_cannot_be_zero_or_empty": "لا يمكن أن تكون الكمية صفراً أو فارغة.",
"invoice.validation.due_date": "يجب أن يكون حقل {path} في وقت لاحق من {min}",
"estimate.validation.expiration_date": "يجب أن يكون حقل {path} في وقت لاحق من {min}",
"make_journal.entries.remove_row": "حذف الصف",
"expense.entries.remove_row": "حذف الصف",
"warehouse_transfer.entries.remove_row": "حذف الصف",
"item.details.inactive": "غير نشط",
"bill.validation.due_date": "يجب أن يكون حقل {path} في وقت لاحق من {min}"
} }

View File

@@ -1147,7 +1147,6 @@
"From transaction": "From transaction", "From transaction": "From transaction",
"landed": "Landed", "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.", "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", "journal_entries": "Journal Entries",
"contact": "Contact", "contact": "Contact",
"invoice_details": "Invoice details", "invoice_details": "Invoice details",
@@ -1164,7 +1163,7 @@
"sorry_about_that_something_went_wrong": "Sorry about that! Something went wrong", "sorry_about_that_something_went_wrong": "Sorry about that! Something went wrong",
"if_the_problem_stuck_please_contact_us_as_soon_as_possible": "If the problem stuck, please contact us as soon as possible.", "if_the_problem_stuck_please_contact_us_as_soon_as_possible": "If the problem stuck, please contact us as soon as possible.",
"non-inventory": "Non-Inventory", "non-inventory": "Non-Inventory",
"terms_conditions": "Terms & Conditions", "terms_conditions": "Terms conditions",
"inventory_adjustment.publish.success_message": "The inventory adjustment has been published successfully.", "inventory_adjustment.publish.success_message": "The inventory adjustment has been published successfully.",
"inventory_adjustment.publish.alert_message": "Are you sure you want to publish this inventory adjustment?", "inventory_adjustment.publish.alert_message": "Are you sure you want to publish this inventory adjustment?",
"the_contact_has_been_activated_successfully": "The contact has been inactivated successfully.", "the_contact_has_been_activated_successfully": "The contact has been inactivated successfully.",
@@ -1259,41 +1258,12 @@
"setup.initializing.please_refresh_the_page": "Please refresh the page", "setup.initializing.please_refresh_the_page": "Please refresh the page",
"setup.organization.title": "Lets Get Started", "setup.organization.title": "Lets Get Started",
"setup.organization.description": "Tell the system a little bit about your organization.", "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.professional.title": "Pro",
"plan.essential.title": "Essential",
"plan.plus.title": "Plus+", "plan.plus.title": "Plus+",
"plan.feature.sale_purchase_invoice": "Sale and purchase invoices.", "plan.feature.sale_purchase_invoice": "Sale and purchase invoices.",
"plan.feature.receivable_payable_accounts": "Customers/vendors accounts.", "plan.feature.receivable_payable_accounts": "Customers/vendors accounts.",
"plan.feature.expenses_tracking": "Expenses tracking",
"plan.feature.manual_journal": "Manual journals.", "plan.feature.manual_journal": "Manual journals.",
"plan.feature.financial_reports": "Financial reports.", "plan.feature.financial_reports": "Financial reports.",
"plan.feature.one_user_with_accountant": "For one user and accountant", "plan.feature.one_user_with_accountant": "For one user and accountant",
@@ -1304,7 +1274,9 @@
"plan.feature.three_users": "Three users with your accountant", "plan.feature.three_users": "Three users with your accountant",
"plan.feature.advanced_financial_reports": "Advanced financial reports", "plan.feature.advanced_financial_reports": "Advanced financial reports",
"plan.feature.tracking_multi_locations": "Track multi-branches and locations", "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.projects_accounting": "Projects accounting and timesheets",
"plan.feature.accounting_dimensions": "Accounting dimensions.",
"plan.monthly": "Monthly", "plan.monthly": "Monthly",
"plan.yearly": "Yearly", "plan.yearly": "Yearly",
"payment_via_voucher.success_message": "Payment has been done successfully.", "payment_via_voucher.success_message": "Payment has been done successfully.",
@@ -1320,11 +1292,11 @@
"inventory_adjustment.details_drawer.title": "Inventory adjustment details", "inventory_adjustment.details_drawer.title": "Inventory adjustment details",
"setup.organization.location": "Location", "setup.organization.location": "Location",
"preferences.general.success_message": "The general preferences has been saved.", "preferences.general.success_message": "The general preferences has been saved.",
"customer.drawer.action.new_invoice": "New invoice", "customer.drawer.action.new_invoice": "New Invoice",
"customer.drawer.action.new_estimate": "New estimate", "customer.drawer.action.new_estimate": "New Estimate",
"customer.drawer.action.new_payment": "New payment", "customer.drawer.action.new_payment": "New Payment",
"customer.drawer.action.new_receipt": "New receipt", "customer.drawer.action.new_receipt": "New Receipt",
"customer.drawer.action.new_transaction": "New transaction", "customer.drawer.action.new_transaction": "New Transaction",
"customer.drawer.action.edit_opening_balance": "Edit Opening Balance", "customer.drawer.action.edit_opening_balance": "Edit Opening Balance",
"customer.drawer.action.edit": "Edit", "customer.drawer.action.edit": "Edit",
"customer.drawer.label.outstanding_receivable": "Outstanding receivable", "customer.drawer.label.outstanding_receivable": "Outstanding receivable",
@@ -1351,9 +1323,9 @@
"vendor.drawer.label.note": "Note", "vendor.drawer.label.note": "Note",
"vendor.drawer.action.edit_vendor": "Edit vendor", "vendor.drawer.action.edit_vendor": "Edit vendor",
"vendor.drawer.action.delete": "Delete", "vendor.drawer.action.delete": "Delete",
"vendor.drawer.action.new_transaction": "New transaction", "vendor.drawer.action.new_transaction": "New Transaction",
"vendor.drawer.action.new_payment": "New payment", "vendor.drawer.action.new_payment": "New Payment",
"vendor.drawer.action.new_invoice": "New purchase invoice", "vendor.drawer.action.new_invoice": "New Purchase Invoice",
"vendor.drawer.action.edit": "Edit", "vendor.drawer.action.edit": "Edit",
"vendor.drawer.action.edit_opening_balance": "Edit Opening Balance", "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.", "manual_journals.empty_status.description": "Manual journals can be used to record financial transactions manually, used by accountants to work with the ledger.",
@@ -1365,7 +1337,6 @@
"item.field.sell_account.hint": "Enter price which you goint to sell this item.", "item.field.sell_account.hint": "Enter price which you goint to sell this item.",
"item_entries.products_services.hint": "Enter products or services you sell or buy to keep tracking what your sold or purchased.", "item_entries.products_services.hint": "Enter products or services you sell or buy to keep tracking what your sold or purchased.",
"item_entries.landed.hint": "This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.", "item_entries.landed.hint": "This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.",
"item_entries.remove_row": "Remove line",
"invoice.auto_increment.auto": "Your invoice numbers are set on auto-increment mode. Are you sure changing this setting?", "invoice.auto_increment.auto": "Your invoice numbers are set on auto-increment mode. Are you sure changing this setting?",
"invoice.auto_increment.manually": "Your invoice numbers are set on manual mode. Are you sure chaning this settings?", "invoice.auto_increment.manually": "Your invoice numbers are set on manual mode. Are you sure chaning this settings?",
"manual_journals.auto_increment.auto": "Your Jouranl numbers are set on auto-increment mode. Are you sure changing this setting?", "manual_journals.auto_increment.auto": "Your Jouranl numbers are set on auto-increment mode. Are you sure changing this setting?",
@@ -1468,7 +1439,6 @@
"AP_aging_summary.filter_options.label": "Filter vendors", "AP_aging_summary.filter_options.label": "Filter vendors",
"item.error.type_cannot_change_with_item_has_transactions": "Cannot change item type to inventory with item has associated transactions.", "item.error.type_cannot_change_with_item_has_transactions": "Cannot change item type to inventory with item has associated transactions.",
"item.error.cannot_change_inventory_account": "Cannot change item inventory account while the item has transactions.", "item.error.cannot_change_inventory_account": "Cannot change item inventory account while the item has transactions.",
"item.error.you_could_not_delete_item_has_associated": "You could not delete item that has associated transactions",
"customer.link.customer_details": "Customer details ({amount})", "customer.link.customer_details": "Customer details ({amount})",
"bad_debt.dialog.written_off_amount": "Written-off amount", "bad_debt.dialog.written_off_amount": "Written-off amount",
"bad_debt.dialog.bad_debt": "Bad debt", "bad_debt.dialog.bad_debt": "Bad debt",
@@ -1553,10 +1523,10 @@
"credit_note.label_credit_note": "Credit Note #", "credit_note.label_credit_note": "Credit Note #",
"credit_note.label_amount_to_credit": "Amount to credit", "credit_note.label_amount_to_credit": "Amount to credit",
"credit_note.label_credit_note_details": "Credit Note details", "credit_note.label_credit_note_details": "Credit Note details",
"credit_note.label_customer_note": "Customer Note", "credit_note.label_customer_note": "Customer note",
"credit_note.label_terms_conditions": "Terms & Conditions", "credit_note.label_terms_conditions": "Terms conditions",
"credit_note.label_customer_note.placeholder": "This message will be displayed on the credit note.", "credit_note.label_customer_note.placeholder": "Thanks for your business and have a great day!",
"credit_note.label_terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed on the credit note.", "credit_note.label_terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"credit_note.label_total": "TOTAL", "credit_note.label_total": "TOTAL",
"credit_note.label_subtotal": "Subtotal", "credit_note.label_subtotal": "Subtotal",
"credit_note.once_delete_this_credit_note": "Once you delete this credit note, you won't be able to restore it later. Are you sure you want to delete this credit note?", "credit_note.once_delete_this_credit_note": "Once you delete this credit note, you won't be able to restore it later. Are you sure you want to delete this credit note?",
@@ -1612,6 +1582,9 @@
"refund": "Refund", "refund": "Refund",
"landed_cost.dialog.label_select_transaction": "Select transaction", "landed_cost.dialog.label_select_transaction": "Select transaction",
"landed_cost.dialog.label_select_transaction_entry": "Select transaction entry", "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.label": "Refund Credit Note",
"refund_credit_note.dialog.success_message": "The customer credit note refund has been created successfully.", "refund_credit_note.dialog.success_message": "The customer credit note refund has been created successfully.",
"refund_credit_note.dialog.refund_date": "Refund date", "refund_credit_note.dialog.refund_date": "Refund date",
@@ -1783,7 +1756,6 @@
"payment_made.drawer.subtitle": "Branch: {value}", "payment_made.drawer.subtitle": "Branch: {value}",
"manual_journal.drawer.title": "Manual journal details ({number})", "manual_journal.drawer.title": "Manual journal details ({number})",
"expense.drawer.title": "Expense details", "expense.drawer.title": "Expense details",
"expense.drawer.subtitle": "Branch: {value}",
"global_error.you_dont_have_permissions": "You do not have permissions to access this page.", "global_error.you_dont_have_permissions": "You do not have permissions to access this page.",
"global_error.transactions_locked": "Transactions before {lockedToDate} has been locked. Hence action cannot be performed.", "global_error.transactions_locked": "Transactions before {lockedToDate} has been locked. Hence action cannot be performed.",
"global_error.authorized_user_inactive": "The authorized user is inactive.", "global_error.authorized_user_inactive": "The authorized user is inactive.",
@@ -1805,10 +1777,13 @@
"profit_loss_sheet.percentage_of_row": "% of Row", "profit_loss_sheet.percentage_of_row": "% of Row",
"profit_loss_sheet.percentage_of_expense": "% of Expense", "profit_loss_sheet.percentage_of_expense": "% of Expense",
"profit_loss_sheet.percentage_of_income": "% of Income", "profit_loss_sheet.percentage_of_income": "% of Income",
"report.balance_sheet_comparison.title": "Balance Sheet Comparison", "report.balance_sheet_comparison.title": "Balance Sheet Comparison",
"report.balance_sheet_comparison.desc": "Reports a company's assets, liabilities and shareholders' equity compared to previous year.", "report.balance_sheet_comparison.desc": "Reports a company's assets, liabilities and shareholders' equity compared to previous year.",
"report.profit_loss_sheet_comparison.title": "Profit/Loss Comparison", "report.profit_loss_sheet_comparison.title": "Profit/Loss Comparison",
"report.profit_loss_sheet_comparison.desc": "Reports the revenues, costs and expenses incurred at a specific point and compared to previous year.", "report.profit_loss_sheet_comparison.desc": "Reports the revenues, costs and expenses incurred at a specific point and compared to previous year.",
"the_vendor_has_been_inactivated_successfully": "The contact has been inactivated successfully.", "the_vendor_has_been_inactivated_successfully": "The contact has been inactivated successfully.",
"vendor.alert.activated_message": "The vendor has been activated successfully.", "vendor.alert.activated_message": "The vendor has been activated successfully.",
"vendor.alert.are_you_sure_want_to_inactivate_this_vendor": "Are you sure want to inactivate this vendor? You will to able to activate it later.", "vendor.alert.are_you_sure_want_to_inactivate_this_vendor": "Are you sure want to inactivate this vendor? You will to able to activate it later.",
@@ -1820,6 +1795,7 @@
"customer.alert.are_you_sure_want_to_inactivate_this_customer": "Are you sure want to inactivate this customer? You will to able to activate it later.", "customer.alert.are_you_sure_want_to_inactivate_this_customer": "Are you sure want to inactivate this customer? You will to able to activate it later.",
"credit_note_preview.dialog.title": "Credit Note PDF Preview", "credit_note_preview.dialog.title": "Credit Note PDF Preview",
"payment_receive_preview.dialog.title": "Payment Receive PDF Preview", "payment_receive_preview.dialog.title": "Payment Receive PDF Preview",
"warehouses.label": "Warehouses", "warehouses.label": "Warehouses",
"warehouses.label.new_warehouse": "New Warehouse", "warehouses.label.new_warehouse": "New Warehouse",
"warehouse.dialog.label.new_warehouse": "New Warehouse", "warehouse.dialog.label.new_warehouse": "New Warehouse",
@@ -1966,53 +1942,49 @@
"payment_made.error.withdrawal_account_currency_invalid": "The withdrawal account currency should be same vendor currency or organization base currency.", "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_customer_details": "View Customer Details",
"view_vendor_details": "View Vendor 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", "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", "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", "make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
"estimate_form.label.total": "TOTAL", "estimate_form.label.total": "TOTAL",
"estimate_form.label.subtotal": "Subtotal", "estimate_form.label.subtotal": "Subtotal",
"estimate_form.label.customer_note": "Customer Note", "estimate_form.label.customer_note": "Customer Note",
"estimate_form.label.terms_conditions": "Terms & Conditions", "estimate_form.label.terms_conditions": "Terms conditions",
"estimate_form.customer_note.placeholder": "This message will be displayed on the estimate.", "estimate_form.customer_note.placeholder": "Thanks for your business and have a great day!",
"estimate_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed on the estimate.", "estimate_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"invoice_form.label.total": "TOTAL", "invoice_form.label.total": "TOTAL",
"invoice_form.label.subtotal": "Subtotal", "invoice_form.label.subtotal": "Subtotal",
"invoice_form.label.due_amount": "Due amount", "invoice_form.label.due_amount": "Due amount",
"invoice_form.label.payment_amount": "Payment amount", "invoice_form.label.payment_amount": "Payment amount",
"invoice_form.label.invoice_message": "Invoice Message", "invoice_form.label.invoice_message": "Invoice Message",
"invoice_form.label.terms_conditions": "Terms & Conditions", "invoice_form.invoice_message.placeholder": "Thanks for your business and have a great day!",
"invoice_form.invoice_message.placeholder": "This message will be displayed on the invoice.", "invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed on the invoice.",
"receipt_form.label.total": "TOTAL", "receipt_form.label.total": "TOTAL",
"receipt_form.label.subtotal": "Subtotal", "receipt_form.label.subtotal": "Subtotal",
"receipt_form.label.due_amount": "Due amount", "receipt_form.label.due_amount": "Due amount",
"receipt_form.label.payment_amount": "Payment amount", "receipt_form.label.payment_amount": "Payment amount",
"receipt_form.label.receipt_message": "Receipt Message", "receipt_form.label.receipt_message": "Receipt Message",
"receipt_form.receipt_message.placeholder": "This message will be displayed on the receipt.", "receipt_form.receipt_message.placeholder": "Thanks for your business and have a great day!",
"receipt_form.label.terms_conditions": "Terms & Conditions", "receipt_form.label.statement": "Statement",
"receipt_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed on the receipt.", "receipt_form.statement.placeholder": "Thanks for your business and have a great day!",
"payment_receive_form.label.note": "Note", "payment_receive_form.label.statement": "Statement",
"payment_receive_form.internal_note.placeholder": "Internal notes (Not visible to the customer).", "payment_receive_form.statement.placeholder": "Thanks for your business and have a great day!",
"payment_receive_form.message.label": "Payment Message",
"payment_receive_form.message.placeholder": "This message will be displayed on the payment receipt.",
"payment_receive_form.label.subtotal": "Subtotal", "payment_receive_form.label.subtotal": "Subtotal",
"payment_receive_form.label.total": "TOTAL", "payment_receive_form.label.total": "TOTAL",
"bill_form.label.note": "Note", "bill_form.label.note": "Note",
"bill_form.label.note.placeholder": "Internal note (Not visible to the vendor).", "bill_form.label.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"bill_form.label.subtotal": "Subtotal", "bill_form.label.subtotal": "Subtotal",
"bill_form.label.total": "TOTAL", "bill_form.label.total": "TOTAL",
"bill_form.label.due_amount": "Due amount", "bill_form.label.due_amount": "Due amount",
"bill_form.label.payment_amount": "Payment amount", "bill_form.label.payment_amount": "Payment amount",
"vendor_credit_form.label.note": "Note", "vendor_credit_form.label.note": "Note",
"vendor_credit_form.note.placeholder": "Internal note (Not visible to the vendor).", "vendor_credit_form.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
"vendor_credit_form.label.subtotal": "Subtotal", "vendor_credit_form.label.subtotal": "Subtotal",
"vendor_credit_form.label.total": "TOTAL", "vendor_credit_form.label.total": "TOTAL",
"payment_made_form.label.statement": "Statement", "payment_made_form.label.statement": "Statement",
"payment_made_form.statement.placeholder": "Thanks for your business and have a great day!", "payment_made_form.statement.placeholder": "Thanks for your business and have a great day!",
"payment_made_form.label.subtotal": "Subtotal", "payment_made_form.label.subtotal": "Subtotal",
"payment_made_form.label.total": "TOTAL", "payment_made_form.label.total": "TOTAL",
"payment_made.form.internal_note.label": "Note",
"payment_made.form.internal_note.placeholder": "Internal note (Not visible to the vendor).",
"make_journal.label.subtotal": "Subtotal", "make_journal.label.subtotal": "Subtotal",
"make_journal.label.total": "TOTAL", "make_journal.label.total": "TOTAL",
"expense.label.subtotal": "Subtotal", "expense.label.subtotal": "Subtotal",
@@ -2031,16 +2003,6 @@
"estimate.warehouse_button.label": "Warehouse: {label}", "estimate.warehouse_button.label": "Warehouse: {label}",
"receipt.branch_button.label": "Branch: {label}", "receipt.branch_button.label": "Branch: {label}",
"receipt.warehouse_button.label": "Warehouse: {label}", "receipt.warehouse_button.label": "Warehouse: {label}",
"warehouse_transfer.empty_status.title": "Manage transfer orders between warehouses.", "warehouse_transfer.empty_status.title": "",
"warehouse_transfer.empty_status.description": "Business with multiply warehouses often transfers items from on warehouse to another when they are in immediate need of vendors.", "warehouse_transfer.empty_status.description": ""
"warehouse_transfer.form.reason.label": "Reason",
"warehouse_transfer.form.reason.placeholder": "Enter the reason behind the transfer order.",
"warehouse_transfer.quantity_cannot_be_zero_or_empty": "Quantity cannot be zero or empty.",
"invoice.validation.due_date": "{path} field must be later than {min}",
"estimate.validation.expiration_date": "{path} field must be later than {min}",
"make_journal.entries.remove_row": "Remove line",
"expense.entries.remove_row": "Remove line",
"warehouse_transfer.entries.remove_row": "Remove line",
"item.details.inactive": "Inactive",
"bill.validation.due_date": "{path} field must be later than {min}"
} }

View File

@@ -2,6 +2,7 @@ import { createReducer } from '@reduxjs/toolkit';
import intl from 'react-intl-universal'; import intl from 'react-intl-universal';
import t from 'store/types'; import t from 'store/types';
const getSubscriptionPeriods = () => [ const getSubscriptionPeriods = () => [
{ {
slug: 'month', slug: 'month',
@@ -14,110 +15,79 @@ const getSubscriptionPeriods = () => [
]; ];
const getSubscriptionPlans = () => [ 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'), name: intl.get('plan.essential.title'),
slug: 'essentials', slug: 'essentials',
description: [ description: [
intl.get('plan.feature.all_capital_plus'), intl.get('plan.feature.sale_purchase_invoice'),
intl.get('plan.feature.sales_purchases_order'), intl.get('plan.feature.receivable_payable_accounts'),
intl.get('plan.feature.purchase_invoices'), intl.get('plan.feature.expenses_tracking'),
intl.get('plan.feature.inventory_tracking'), intl.get('plan.feature.manual_journal'),
intl.get('plan.feature.custom_roles'), intl.get('plan.feature.financial_reports'),
intl.get('plan.feature.multiply_currency_transcations'), intl.get('plan.feature.one_user_with_accountant'),
intl.get('plan.feature.inventory_reports'),
intl.get('plan.feature.landed_cost'),
], ],
price: '95', price: '100',
periods: [ periods: [
{ {
slug: 'month', slug: 'month',
label: intl.get('plan.monthly'), label: intl.get('plan.monthly'),
price: '95', price: '100'
}, },
{ {
slug: 'year', slug: 'year',
label: intl.get('plan.yearly'), label: intl.get('plan.yearly'),
price: '995', price: '1,200',
}, },
], ],
currencyCode: 'LYD', currencyCode: 'LYD',
}, },
{ {
name: intl.get('plan.capital_enterprise.title'), name: intl.get('plan.professional.title'),
slug: 'enterprise', slug: 'plus',
description: [ description: [
intl.get('plan.feature.all_capital_essential'), intl.get('plan.feature.all_capital_essential'),
intl.get('plan.feature.multiply_branches'), intl.get('plan.feature.multi_currency'),
intl.get('plan.feature.multiply_warehouses'), intl.get('plan.feature.purchase_sell_orders'),
intl.get('plan.feature.accounting_dimensions'), intl.get('plan.feature.multi_inventory_managment'),
intl.get('plan.feature.warehouses_reports'), intl.get('plan.feature.three_users'),
intl.get('plan.feature.branches_reports'), intl.get('plan.feature.advanced_financial_reports'),
], ],
price: '120', price: '200',
currencyCode: 'LYD', currencyCode: 'LYD',
periods: [ periods: [
{ {
slug: 'month', slug: 'month',
label: intl.get('plan.monthly'), label: intl.get('plan.monthly'),
price: '120', price: '200'
}, },
{ {
slug: 'year', slug: 'year',
label: intl.get('plan.yearly'), 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

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