mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
Compare commits
60 Commits
BIG-237-va
...
v0.7.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
682b296f7c | ||
|
|
e662bf7af9 | ||
|
|
a829ceb709 | ||
|
|
cdce00187b | ||
|
|
91a38b34cc | ||
|
|
1b97a162e8 | ||
|
|
e8e12e63ea | ||
|
|
80feba6005 | ||
|
|
cc457e1e43 | ||
|
|
2ced5dc013 | ||
|
|
dd86c2993e | ||
|
|
bd05a4a188 | ||
|
|
8160cbe402 | ||
|
|
0ef6bebfb8 | ||
|
|
91ff3fdccb | ||
|
|
edd37fff78 | ||
|
|
679f7ce96c | ||
|
|
79b3ab9ec7 | ||
|
|
e7158b7ba7 | ||
|
|
569bc1c4a4 | ||
|
|
b880732087 | ||
|
|
b1e7720bd9 | ||
|
|
5eb9968095 | ||
|
|
b0cf8f723f | ||
|
|
b0a826e62a | ||
|
|
6daa9f09a5 | ||
|
|
f828d85880 | ||
|
|
46d895bef9 | ||
|
|
1fa26c7cb7 | ||
|
|
41d2fc63cb | ||
|
|
4814a40fa9 | ||
|
|
b903aa3eb2 | ||
|
|
872b98fb0d | ||
|
|
b849bfaa95 | ||
|
|
756af3c4d3 | ||
|
|
b935d13918 | ||
|
|
4aea9cb19b | ||
|
|
d22212e6e3 | ||
|
|
6a6ff16c48 | ||
|
|
d08894820d | ||
|
|
2db32b8ee8 | ||
|
|
86c6de361b | ||
|
|
9bd13b0d46 | ||
|
|
30b17d697f | ||
|
|
ce674466fe | ||
|
|
373a695c4c | ||
|
|
5c601fcf2d | ||
|
|
df4c4a832b | ||
|
|
98a02396a9 | ||
|
|
96635ffa84 | ||
|
|
68c0678dc3 | ||
|
|
da699a766a | ||
|
|
f1899e1ce1 | ||
|
|
11851d114d | ||
|
|
21779007be | ||
|
|
4fc1ecdc2d | ||
|
|
c9b5cecf7a | ||
|
|
c31e9dcd29 | ||
|
|
430ab95dc3 | ||
|
|
8100a57195 |
34
CHANGELOG.md
34
CHANGELOG.md
@@ -2,6 +2,40 @@
|
||||
|
||||
All notable changes to Bigcapital server-side will be in this file.
|
||||
|
||||
## [1.7.3-rc.2] - 15-04-2022
|
||||
|
||||
### Fixed
|
||||
- `BIG-372` Activate branches and warehouses dialog reloading once activating.
|
||||
- `BIG-373` Issue general ledger report select specific account.
|
||||
- `BIG-377` Make readonly details entries as oneline with tooltip for more details.
|
||||
|
||||
## [1.7.2-rc.2] - 04-04-2022
|
||||
|
||||
### Fixed
|
||||
- Add the missing Arabic localization.
|
||||
- Subscription plans modifications.
|
||||
|
||||
## [1.7.1-rc.2] - 30-03-2022
|
||||
|
||||
## Added
|
||||
- `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
|
||||
|
||||
@@ -85,6 +85,9 @@ function getClientEnvironment(publicUrl) {
|
||||
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
|
||||
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
|
||||
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
|
||||
|
||||
// Application version.
|
||||
VERSION: paths.appVersion
|
||||
}
|
||||
);
|
||||
// Stringify all values so we can feed into webpack DefinePlugin
|
||||
|
||||
@@ -48,6 +48,8 @@ const resolveModule = (resolveFn, filePath) => {
|
||||
return resolveFn(`${filePath}.js`);
|
||||
};
|
||||
|
||||
const appVersion = require(resolveApp('package.json')).version;
|
||||
|
||||
// config after eject: we're in ./config/
|
||||
module.exports = {
|
||||
dotenv: resolveApp('.env'),
|
||||
@@ -65,6 +67,7 @@ module.exports = {
|
||||
proxySetup: resolveApp('src/setupProxy.js'),
|
||||
appNodeModules: resolveApp('node_modules'),
|
||||
publicUrlOrPath,
|
||||
appVersion
|
||||
};
|
||||
|
||||
|
||||
|
||||
42
package-lock.json
generated
42
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bigcapital-client",
|
||||
"version": "1.5.8",
|
||||
"version": "1.7.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -1043,17 +1043,6 @@
|
||||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@blueprintjs-formik/core": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/@blueprintjs-formik/core/-/core-0.1.5.tgz",
|
||||
"integrity": "sha512-H0aXiNMYC8RwhWR1F2O77dcRcRITijUX5we51G4AK2Vmp1yXCmNb0piN9ftsjL5vVIvIsMKWg+dfbwREmB5VWg==",
|
||||
"requires": {
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.keyby": "^4.6.0",
|
||||
"styled-components": "^5.3.3",
|
||||
"web-vitals": "^2.1.4"
|
||||
}
|
||||
},
|
||||
"@blueprintjs-formik/select": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@blueprintjs-formik/select/-/select-0.1.4.tgz",
|
||||
@@ -1980,6 +1969,16 @@
|
||||
"integrity": "sha512-MUc6zSmU3tEVnkQ78q0peeEjKWPUADMlC/t++2bI8WnAG2tvYRPIgHG8lWkXwqc8MsUF6Z2MOf+Mh5sazOmhiQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/hoist-non-react-statics": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
|
||||
"integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/react": "*",
|
||||
"hoist-non-react-statics": "^3.3.0"
|
||||
}
|
||||
},
|
||||
"@types/http-proxy": {
|
||||
"version": "1.17.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.3.tgz",
|
||||
@@ -2240,6 +2239,25 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
|
||||
"integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw=="
|
||||
},
|
||||
"@types/styled-components": {
|
||||
"version": "5.1.25",
|
||||
"resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.25.tgz",
|
||||
"integrity": "sha512-fgwl+0Pa8pdkwXRoVPP9JbqF0Ivo9llnmsm+7TCI330kbPIFd9qv1Lrhr37shf4tnxCOSu+/IgqM7uJXLWZZNQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/hoist-non-react-statics": "*",
|
||||
"@types/react": "*",
|
||||
"csstype": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"csstype": {
|
||||
"version": "3.0.11",
|
||||
"resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz",
|
||||
"integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/testing-library__dom": {
|
||||
"version": "6.12.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/testing-library__dom/-/testing-library__dom-6.12.1.tgz",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bigcapital-client",
|
||||
"version": "1.6.3",
|
||||
"version": "1.7.1",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@babel/core": "7.8.4",
|
||||
@@ -150,6 +150,7 @@
|
||||
"@types/react": "^17.0.0",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@types/react-router-dom": "^5.1.8",
|
||||
"@types/styled-components": "^5.1.25",
|
||||
"@types/yup": "^0.29.13",
|
||||
"@welldone-software/why-did-you-render": "^6.0.0-rc.1",
|
||||
"compression-webpack-plugin": "^6.1.0",
|
||||
|
||||
@@ -11,7 +11,7 @@ export const CommercialDocHeader = styled.div`
|
||||
`;
|
||||
|
||||
export const CommercialDocTopHeader = styled.div`
|
||||
margin-bottom: 25px;
|
||||
margin-bottom: 30px;
|
||||
`;
|
||||
|
||||
export const CommercialDocEntriesTable = styled(DataTable)`
|
||||
|
||||
27
src/components/DataTableCells/TextOverviewTooltipCell.js
Normal file
27
src/components/DataTableCells/TextOverviewTooltipCell.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import { Tooltip, Position } from '@blueprintjs/core';
|
||||
|
||||
/**
|
||||
* Text overview tooltip cell.
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export function TextOverviewTooltipCell({ cell: { value } }) {
|
||||
const SUBMENU_POPOVER_MODIFIERS = {
|
||||
flip: { boundariesElement: 'viewport', padding: 20 },
|
||||
offset: { offset: '0, 10' },
|
||||
preventOverflow: { boundariesElement: 'viewport', padding: 40 },
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
content={value}
|
||||
position={Position.BOTTOM_LEFT}
|
||||
boundary={'viewport'}
|
||||
minimal={true}
|
||||
modifiers={SUBMENU_POPOVER_MODIFIERS}
|
||||
targetClassName={'table-tooltip-overview-target'}
|
||||
>
|
||||
{value}
|
||||
</Tooltip>
|
||||
);
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import CheckBoxFieldCell from './CheckBoxFieldCell';
|
||||
import SwitchFieldCell from './SwitchFieldCell';
|
||||
import TextAreaCell from './TextAreaCell';
|
||||
import BranchesListFieldCell from './BranchesListFieldCell';
|
||||
import { TextOverviewTooltipCell } from './TextOverviewTooltipCell';
|
||||
|
||||
export {
|
||||
AccountsListFieldCell,
|
||||
@@ -25,4 +26,5 @@ export {
|
||||
SwitchFieldCell,
|
||||
TextAreaCell,
|
||||
BranchesListFieldCell,
|
||||
TextOverviewTooltipCell,
|
||||
};
|
||||
|
||||
16
src/components/FlexGrid/Flex.style.tsx
Normal file
16
src/components/FlexGrid/Flex.style.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import styled from 'styled-components';
|
||||
import { FlexProps } from './interfaces';
|
||||
|
||||
export const FlexStyled = styled.div<FlexProps>`
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
align-items: ${({ align }) => align || 'center'};
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
max-width: ${({ col, gap = 1 }) =>
|
||||
col && col < 12 ? `${(100 * col) / 12 - gap}%` : '100%'};
|
||||
width: 100%;
|
||||
}
|
||||
`;
|
||||
26
src/components/FlexGrid/Flex.tsx
Normal file
26
src/components/FlexGrid/Flex.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
import { FlexProps } from './interfaces';
|
||||
import { FlexItem } from './FlexItem';
|
||||
import { FlexStyled } from './Flex.style';
|
||||
|
||||
export function Flex({
|
||||
children,
|
||||
col = 12,
|
||||
gap,
|
||||
align,
|
||||
className,
|
||||
style,
|
||||
}: FlexProps) {
|
||||
return (
|
||||
<FlexStyled
|
||||
col={col}
|
||||
gap={gap}
|
||||
align={align}
|
||||
className={className}
|
||||
style={style}
|
||||
>
|
||||
{children}
|
||||
<FlexItem col={col} gap={gap} />
|
||||
</FlexStyled>
|
||||
);
|
||||
}
|
||||
19
src/components/FlexGrid/FlexItem.style.tsx
Normal file
19
src/components/FlexGrid/FlexItem.style.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import styled from 'styled-components';
|
||||
import { ItemProps } from './interfaces';
|
||||
|
||||
export const FlexItem = styled.div<ItemProps>`
|
||||
width: 100%;
|
||||
max-width: ${({ col, gap = 1 }) =>
|
||||
col && col < 12 ? `${(100 * col) / 12 - gap}%` : '100%'};
|
||||
${({ marginBottom }) =>
|
||||
marginBottom &&
|
||||
`
|
||||
margin-bottom: ${marginBottom}px;
|
||||
`}
|
||||
${({ stretch }) =>
|
||||
stretch &&
|
||||
`
|
||||
display: flex;
|
||||
align-self: stretch;
|
||||
`}
|
||||
`;
|
||||
1
src/components/FlexGrid/FlexItem.tsx
Normal file
1
src/components/FlexGrid/FlexItem.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export * from './FlexItem.style';
|
||||
4
src/components/FlexGrid/index.ts
Normal file
4
src/components/FlexGrid/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export * from './Flex.style';
|
||||
export * from './Flex';
|
||||
export * from './FlexItem.style';
|
||||
export * from './interfaces';
|
||||
22
src/components/FlexGrid/interfaces.ts
Normal file
22
src/components/FlexGrid/interfaces.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { HTMLAttributes, Component, StyleHTMLAttributes } from 'react';
|
||||
|
||||
export type Range = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
||||
|
||||
export interface ItemProps extends HTMLAttributes<HTMLDivElement> {
|
||||
gap?: number;
|
||||
col: Range;
|
||||
marginBottom?: number;
|
||||
stretch?: boolean;
|
||||
as?: string | Component;
|
||||
className?: string;
|
||||
style?: StyleHTMLAttributes<HTMLDivElement>;
|
||||
}
|
||||
|
||||
export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
|
||||
gap?: number;
|
||||
align?: 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
|
||||
col?: Range;
|
||||
className?: string;
|
||||
style?: StyleHTMLAttributes<HTMLDivElement>;
|
||||
as?: string | Component;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ export default function Sidebar({ dashboardContentRef }) {
|
||||
* @returns {React.JSX}
|
||||
*/
|
||||
function SidebarFooterVersion() {
|
||||
const { REACT_APP_VERSION: VERSION } = process.env;
|
||||
const { VERSION } = process.env;
|
||||
|
||||
if (!VERSION) {
|
||||
return null;
|
||||
|
||||
@@ -49,7 +49,6 @@ import DrawerHeaderContent from './Drawer/DrawerHeaderContent';
|
||||
import Postbox from './Postbox';
|
||||
import AccountsSuggestField from './AccountsSuggestField';
|
||||
import MaterialProgressBar from './MaterialProgressBar';
|
||||
import { MoneyFieldCell } from './DataTableCells';
|
||||
import AvaterCell from './AvaterCell';
|
||||
|
||||
import { ItemsMultiSelect } from './Items';
|
||||
@@ -102,9 +101,11 @@ export * from './ExchangeRate';
|
||||
export * from './Branches';
|
||||
export * from './Warehouses';
|
||||
export * from './Currencies';
|
||||
export * from './FormTopbar'
|
||||
export * from './FormTopbar';
|
||||
export * from './Paper';
|
||||
export * from './Accounts'
|
||||
export * from './Accounts';
|
||||
export * from './DataTableCells';
|
||||
export * from './FlexGrid';
|
||||
|
||||
const Hint = FieldHint;
|
||||
|
||||
@@ -167,7 +168,6 @@ export {
|
||||
Postbox,
|
||||
AccountsSuggestField,
|
||||
MaterialProgressBar,
|
||||
MoneyFieldCell,
|
||||
ItemsMultiSelect,
|
||||
AvaterCell,
|
||||
MoreMenuItems,
|
||||
|
||||
45
src/config/interfaces.tsx
Normal file
45
src/config/interfaces.tsx
Normal file
@@ -0,0 +1,45 @@
|
||||
export enum ISidebarMenuItemType {
|
||||
Label = 'label',
|
||||
Link = 'link',
|
||||
Group = 'group',
|
||||
Overlay = 'overlay'
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemOverlay extends ISidebarMenuItemCommon {
|
||||
type: ISidebarMenuItemType.Overlay;
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemLink extends ISidebarMenuItemCommon {
|
||||
text: string | JSX.Element;
|
||||
href: string;
|
||||
type: ISidebarMenuItemType.Link;
|
||||
matchExact?: boolean;
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemLabel extends ISidebarMenuItemCommon {
|
||||
text?: string;
|
||||
type: ISidebarMenuItemType.Label;
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemGroup extends ISidebarMenuItemCommon {
|
||||
type: ISidebarMenuItemType.Group;
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemPermission {
|
||||
subject: string;
|
||||
ability: string;
|
||||
}
|
||||
|
||||
export interface ISidebarMenuItemCommon {
|
||||
ability?: ISidebarMenuItemPermission | ISidebarMenuItemPermission[];
|
||||
feature?: string;
|
||||
disabled?: boolean;
|
||||
children?: ISidebarMenuItem[];
|
||||
onlySubscriptionExpired?: boolean;
|
||||
}
|
||||
|
||||
export type ISidebarMenuItem =
|
||||
| ISidebarMenuItemLink
|
||||
| ISidebarMenuItemLabel
|
||||
| ISidebarMenuItemGroup
|
||||
| ISidebarMenuItemOverlay;
|
||||
@@ -4,7 +4,12 @@ import { Popover2 } from '@blueprintjs/popover2';
|
||||
import { useFormikContext } from 'formik';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import { ExchangeRateInputGroup, Icon, Hint, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
ExchangeRateInputGroup,
|
||||
Icon,
|
||||
Hint,
|
||||
FormattedMessage as T,
|
||||
} from 'components';
|
||||
import {
|
||||
AccountsListFieldCell,
|
||||
MoneyFieldCell,
|
||||
@@ -63,7 +68,10 @@ export const ActionsCellRenderer = ({
|
||||
};
|
||||
const exampleMenu = (
|
||||
<Menu>
|
||||
<MenuItem onClick={handleClickRemoveRole} text="Remove line" />
|
||||
<MenuItem
|
||||
onClick={handleClickRemoveRole}
|
||||
text={intl.get('make_journal.entries.remove_row')}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
return (
|
||||
|
||||
@@ -57,9 +57,7 @@ function BillTransactionDeleteAlert({
|
||||
loading={isLoading}
|
||||
>
|
||||
<p>
|
||||
<T
|
||||
id={`Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?`}
|
||||
/>
|
||||
<T id={`landed_cost.once_your_delete_this_located_landed_cost`} />
|
||||
</p>
|
||||
</Alert>
|
||||
);
|
||||
|
||||
@@ -79,6 +79,10 @@ export const handleCashFlowTransactionType = (reference, openDrawer) => {
|
||||
return openDrawer('refund-vendor-detail-drawer', {
|
||||
refundTransactionId: reference.reference_id,
|
||||
});
|
||||
case 'InventoryAdjustment':
|
||||
return openDrawer('inventory-adjustment-drawer', {
|
||||
inventoryId: reference.reference_id,
|
||||
});
|
||||
|
||||
default:
|
||||
return openDrawer('cashflow-transaction-drawer', {
|
||||
|
||||
@@ -37,7 +37,7 @@ function AllocateLandedCostFloatingActions({
|
||||
<DialogFooterActions alignment={'left'}>
|
||||
{costTransactionEntry && (
|
||||
<UnallocatedAmount>
|
||||
Unallocated cost Amount:{' '}
|
||||
<T id={'landed_cost.dialog.label_unallocated_cost_amount'}/>
|
||||
<strong>{formattedUnallocatedCostAmount}</strong>
|
||||
</UnallocatedAmount>
|
||||
)}
|
||||
|
||||
@@ -42,7 +42,10 @@ function AllocateLandedCostForm({
|
||||
.map((entry) => transformToForm(entry, defaultInitialValues.items[0]));
|
||||
|
||||
if (entries.length <= 0) {
|
||||
AppToaster.show({ message: 'Something wrong!', intent: Intent.DANGER });
|
||||
AppToaster.show({
|
||||
message: intl.get('something_wrong'),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
return;
|
||||
}
|
||||
const form = {
|
||||
@@ -69,13 +72,14 @@ function AllocateLandedCostForm({
|
||||
)
|
||||
) {
|
||||
AppToaster.show({
|
||||
message:
|
||||
'The total located cost is bigger than the transaction line.',
|
||||
message: intl.get(
|
||||
'landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line',
|
||||
),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
} else {
|
||||
AppToaster.show({
|
||||
message: 'Something went wrong!',
|
||||
message: intl.get('something_went_wrong'),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ const BranchActivateContext = React.createContext();
|
||||
* Branch activate form provider.
|
||||
*/
|
||||
function BranchActivateFormProvider({ dialogName, ...props }) {
|
||||
const { mutateAsync: activateBranches, isLoading } = useActivateBranches();
|
||||
const { mutateAsync: activateBranches } = useActivateBranches();
|
||||
|
||||
// State provider.
|
||||
const provider = {
|
||||
@@ -18,7 +18,7 @@ function BranchActivateFormProvider({ dialogName, ...props }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogContent isLoading={isLoading}>
|
||||
<DialogContent>
|
||||
<BranchActivateContext.Provider value={provider} {...props} />
|
||||
</DialogContent>
|
||||
);
|
||||
|
||||
@@ -36,7 +36,7 @@ function PaymentViaLicenseDialogContent({
|
||||
setSubmitting(true);
|
||||
|
||||
const mutateValues = {
|
||||
plan_slug: `${values.plan_slug}-${values.period}ly`,
|
||||
plan_slug: `essentials-monthly`,
|
||||
license_code: values.license_code,
|
||||
};
|
||||
// Payment via voucher mutate.
|
||||
|
||||
@@ -9,8 +9,7 @@ const WarehouseActivateContext = React.createContext();
|
||||
* warehouse activate form provider.
|
||||
*/
|
||||
function WarehouseActivateFormProvider({ dialogName, ...props }) {
|
||||
const { mutateAsync: activateWarehouses, isLoading } =
|
||||
useActivateWarehouses();
|
||||
const { mutateAsync: activateWarehouses } = useActivateWarehouses();
|
||||
|
||||
// State provider.
|
||||
const provider = {
|
||||
@@ -19,7 +18,7 @@ function WarehouseActivateFormProvider({ dialogName, ...props }) {
|
||||
};
|
||||
|
||||
return (
|
||||
<DialogContent isLoading={isLoading}>
|
||||
<DialogContent>
|
||||
<WarehouseActivateContext.Provider value={provider} {...props} />
|
||||
</DialogContent>
|
||||
);
|
||||
|
||||
@@ -13,57 +13,81 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import {
|
||||
FormatNumberCell,
|
||||
TextOverviewTooltipCell,
|
||||
FormattedMessage as T,
|
||||
Choose,
|
||||
Icon,
|
||||
} from '../../../components';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { useBillDrawerContext } from './BillDrawerProvider';
|
||||
|
||||
/**
|
||||
* Retrieve bill readonly details entries table columns.
|
||||
*/
|
||||
export const useBillReadonlyEntriesTableColumns = () =>
|
||||
React.useMemo(
|
||||
export const useBillReadonlyEntriesTableColumns = () => {
|
||||
const {
|
||||
bill: { entries },
|
||||
} = useBillDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 150,
|
||||
className: 'item',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Bill details status.
|
||||
|
||||
@@ -10,56 +10,81 @@ import {
|
||||
Tag,
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import {
|
||||
Icon,
|
||||
FormattedMessage as T,
|
||||
TextOverviewTooltipCell,
|
||||
FormatNumberCell,
|
||||
Choose,
|
||||
} from '../../../components';
|
||||
import { useCreditNoteDetailDrawerContext } from './CreditNoteDetailDrawerProvider';
|
||||
|
||||
export const useCreditNoteReadOnlyEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const useCreditNoteReadOnlyEntriesColumns = () => {
|
||||
// credit note details drawer context.
|
||||
const {
|
||||
creditNote: { entries },
|
||||
} = useCreditNoteDetailDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 150,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Credit note more actions mneu.
|
||||
|
||||
@@ -1,47 +1,74 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { useEstimateDetailDrawerContext } from './EstimateDetailDrawerProvider';
|
||||
|
||||
/**
|
||||
* Retrieve table columns of estimate readonly entries details.
|
||||
*/
|
||||
export const useEstimateReadonlyEntriesColumns = () =>
|
||||
React.useMemo(() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
width: 150,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
},
|
||||
], []);
|
||||
export const useEstimateReadonlyEntriesColumns = () => {
|
||||
// estimate details drawer context.
|
||||
const {
|
||||
estimate: { entries },
|
||||
} = useEstimateDetailDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 150,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
Col,
|
||||
DetailItem,
|
||||
DetailsMenu,
|
||||
FormatDate,
|
||||
ExchangeRateDetailItem,
|
||||
FormattedMessage as T,
|
||||
} from 'components';
|
||||
@@ -64,10 +65,12 @@ export default function ExpenseDrawerHeader() {
|
||||
minLabelSize={'180px'}
|
||||
>
|
||||
<DetailItem label={<T id={'published_at'} />}>
|
||||
{moment(expense.published_at).format('YYYY MMM DD')}
|
||||
<FormatDate value={expense.published_at} />
|
||||
</DetailItem>
|
||||
|
||||
<DetailItem label={<T id={'created_at'} />}>2021 Aug 24</DetailItem>
|
||||
<DetailItem label={<T id={'created_at'} />}>
|
||||
<FormatDate value={expense.created_at} />
|
||||
</DetailItem>
|
||||
</DetailsMenu>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { useExpense } from 'hooks/query';
|
||||
import { DrawerLoading } from 'components';
|
||||
import { DrawerHeaderContent, DrawerLoading } from 'components';
|
||||
import { Features } from 'common';
|
||||
import { useFeatureCan } from 'hooks/state';
|
||||
|
||||
const ExpenseDrawerDrawerContext = React.createContext();
|
||||
|
||||
@@ -8,6 +11,9 @@ const ExpenseDrawerDrawerContext = React.createContext();
|
||||
* Expense drawer provider.
|
||||
*/
|
||||
function ExpenseDrawerProvider({ expenseId, ...props }) {
|
||||
// Features guard.
|
||||
const { featureCan } = useFeatureCan();
|
||||
|
||||
// Fetch the expense details.
|
||||
const {
|
||||
data: expense,
|
||||
@@ -28,6 +34,17 @@ function ExpenseDrawerProvider({ expenseId, ...props }) {
|
||||
|
||||
return (
|
||||
<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} />
|
||||
</DrawerLoading>
|
||||
);
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import React, { lazy } from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import { Drawer, DrawerSuspense } from 'components';
|
||||
import withDrawers from 'containers/Drawer/withDrawers';
|
||||
|
||||
@@ -22,7 +20,6 @@ function ExpenseDrawer({
|
||||
<Drawer
|
||||
isOpen={isOpen}
|
||||
name={name}
|
||||
title={intl.get('expense.drawer.title')}
|
||||
size={'65%'}
|
||||
style={{ minWidth: '700px', maxWidth: '900px' }}
|
||||
>
|
||||
|
||||
@@ -1,33 +1,46 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
|
||||
import { useExpenseDrawerContext } from './ExpenseDrawerProvider';
|
||||
import { getColumnWidth } from 'utils';
|
||||
|
||||
/**
|
||||
* Retrieve expense readonly details entries table columns.
|
||||
*/
|
||||
export const useExpenseReadEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const useExpenseReadEntriesColumns = () => {
|
||||
// Expense drawer context.
|
||||
const {
|
||||
expense: { categories },
|
||||
} = useExpenseDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('expense_account'),
|
||||
accessor: 'expense_account.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 110,
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
className: 'account',
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
width: 110,
|
||||
disableSortBy: true,
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(categories, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableSortBy: true,
|
||||
className: 'amount',
|
||||
align: 'right',
|
||||
@@ -35,3 +48,4 @@ export const useExpenseReadEntriesColumns = () =>
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,37 +1,60 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { TextOverviewTooltipCell } from 'components';
|
||||
import { useInventoryAdjustmentDrawerContext } from './InventoryAdjustmentDrawerProvider';
|
||||
|
||||
export const useInventoryAdjustmentEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const useInventoryAdjustmentEntriesColumns = () => {
|
||||
// Inventory adjustment details drawer context.
|
||||
const {
|
||||
inventoryAdjustment: { entries },
|
||||
} = useInventoryAdjustmentDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('inventory_adjustment.column.product'),
|
||||
accessor: 'item.name',
|
||||
width: 150,
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 100,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('cost'),
|
||||
accessor: 'cost',
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'cost', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('value'),
|
||||
accessor: 'value',
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'value', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -11,12 +11,14 @@ import {
|
||||
Intent,
|
||||
Tag,
|
||||
} from '@blueprintjs/core';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import {
|
||||
FormatNumberCell,
|
||||
Icon,
|
||||
FormattedMessage as T,
|
||||
Choose,
|
||||
Can,
|
||||
TextOverviewTooltipCell,
|
||||
} from 'components';
|
||||
import {
|
||||
SaleInvoiceAction,
|
||||
@@ -27,49 +29,69 @@ import { useInvoiceDetailDrawerContext } from './InvoiceDetailDrawerProvider';
|
||||
/**
|
||||
* Retrieve invoice readonly details table columns.
|
||||
*/
|
||||
export const useInvoiceReadonlyEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const useInvoiceReadonlyEntriesColumns = () => {
|
||||
// Invoice details drawer context.
|
||||
const {
|
||||
invoice: { entries },
|
||||
} = useInvoiceDetailDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
width: 150,
|
||||
className: 'name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
className: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Invoice details more actions menu.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import { DrawerHeaderContent, DrawerLoading } from 'components';
|
||||
import { useItem } from 'hooks/query';
|
||||
import { inactiveStatus } from './utlis';
|
||||
|
||||
const ItemDetailDrawerContext = React.createContext();
|
||||
|
||||
@@ -27,7 +28,10 @@ function ItemDetailDrawerProvider({ itemId, ...props }) {
|
||||
|
||||
return (
|
||||
<DrawerLoading loading={isItemLoading}>
|
||||
<DrawerHeaderContent name="item-detail-drawer" title={item?.name} />
|
||||
<DrawerHeaderContent
|
||||
name="item-detail-drawer"
|
||||
title={inactiveStatus(item)}
|
||||
/>
|
||||
<ItemDetailDrawerContext.Provider value={provider} {...props} />
|
||||
</DrawerLoading>
|
||||
);
|
||||
|
||||
27
src/containers/Drawers/ItemDetailDrawer/utlis.js
Normal file
27
src/containers/Drawers/ItemDetailDrawer/utlis.js
Normal file
@@ -0,0 +1,27 @@
|
||||
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;
|
||||
`;
|
||||
@@ -10,7 +10,10 @@ import { TableStyle } from '../../../common';
|
||||
* Manual journal drawer table.
|
||||
*/
|
||||
export default function ManualJournalDrawerTable() {
|
||||
// Retrieves the readonly manual journal entries columns.
|
||||
const columns = useManualJournalEntriesColumns();
|
||||
|
||||
// Manual journal drawer context.
|
||||
const { manualJournal } = useManualJournalDrawerContext();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
import intl from 'react-intl-universal';
|
||||
import React from 'react';
|
||||
import { Tag, Intent, Classes, Tooltip, Position } from '@blueprintjs/core';
|
||||
import { Tag, Intent } from '@blueprintjs/core';
|
||||
|
||||
import { T, Choose, FormatNumberCell, If, Icon } from '../../../components';
|
||||
|
||||
/**
|
||||
* Note column accessor.
|
||||
*/
|
||||
export function NoteAccessor(row) {
|
||||
return (
|
||||
<If condition={row.note}>
|
||||
<Tooltip
|
||||
className={Classes.TOOLTIP_INDICATOR}
|
||||
content={row.note}
|
||||
position={Position.LEFT_TOP}
|
||||
hoverOpenDelay={50}
|
||||
>
|
||||
<Icon icon={'file-alt'} iconSize={16} />
|
||||
</Tooltip>
|
||||
</If>
|
||||
);
|
||||
}
|
||||
import {
|
||||
T,
|
||||
Choose,
|
||||
FormatNumberCell,
|
||||
TextOverviewTooltipCell,
|
||||
} from '../../../components';
|
||||
import { Features } from 'common';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { useFeatureCan } from 'hooks/state';
|
||||
import { useManualJournalDrawerContext } from './ManualJournalDrawerProvider';
|
||||
|
||||
/**
|
||||
* Publish column accessor.
|
||||
@@ -46,52 +37,79 @@ export function ManualJournalDetailsStatus({ manualJournal }) {
|
||||
/**
|
||||
* Retrieve read-only manual journal entries columns.
|
||||
*/
|
||||
export const useManualJournalEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const useManualJournalEntriesColumns = () => {
|
||||
const { featureCan } = useFeatureCan();
|
||||
|
||||
// manual journal details drawer context.
|
||||
const {
|
||||
manualJournal: { entries },
|
||||
} = useManualJournalDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('account_name'),
|
||||
Cell: TextOverviewTooltipCell,
|
||||
accessor: 'account.name',
|
||||
width: 130,
|
||||
disableSortBy: true,
|
||||
className: 'account',
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('contact'),
|
||||
accessor: 'contact.display_name',
|
||||
width: 130,
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 100,
|
||||
disableSortBy: true,
|
||||
className: 'contact',
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('note'),
|
||||
accessor: NoteAccessor,
|
||||
width: 80,
|
||||
accessor: 'note',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
disableSortBy: true,
|
||||
className: 'note',
|
||||
textOverview: true,
|
||||
width: 100,
|
||||
},
|
||||
...(featureCan(Features.Branches)
|
||||
? [
|
||||
{
|
||||
Header: intl.get('branch'),
|
||||
width: 100,
|
||||
accessor: 'branch.name',
|
||||
disableSortBy: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
Header: intl.get('credit'),
|
||||
accessor: 'credit',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'credit', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableResizable: true,
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
formatNumber: { noZero: true },
|
||||
className: 'credit',
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
Header: intl.get('debit'),
|
||||
accessor: 'debit',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'debit', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableResizable: true,
|
||||
textOverview: true,
|
||||
disableSortBy: true,
|
||||
formatNumber: { noZero: true },
|
||||
className: 'debit',
|
||||
align: 'right',
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -3,43 +3,65 @@ import intl from 'react-intl-universal';
|
||||
import moment from 'moment';
|
||||
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { usePaymentMadeDetailContext } from './PaymentMadeDetailProvider';
|
||||
|
||||
export const usePaymentMadeEntriesColumns = () =>
|
||||
React.useMemo(() => [
|
||||
{
|
||||
Header: intl.get('date'),
|
||||
accessor: (row) => moment(row.date).format('YYYY MMM DD'),
|
||||
width: 100,
|
||||
disableSortBy: true,
|
||||
className: 'date',
|
||||
},
|
||||
{
|
||||
Header: intl.get('bill_number'),
|
||||
accessor: 'bill_no',
|
||||
width: 150,
|
||||
disableSortBy: true,
|
||||
className: 'bill_number',
|
||||
},
|
||||
{
|
||||
Header: intl.get('bill_amount'),
|
||||
accessor: 'bill.amount',
|
||||
Cell: FormatNumberCell,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
Header: intl.get('due_amount'),
|
||||
accessor: 'bill.due_amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
disableSortBy: true,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
Header: intl.get('payment_amount'),
|
||||
accessor: 'payment_amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
disableSortBy: true,
|
||||
align: 'right',
|
||||
},
|
||||
], []);
|
||||
export const usePaymentMadeEntriesColumns = () => {
|
||||
// Payment made details context.
|
||||
const {
|
||||
paymentMade: { entries },
|
||||
} = usePaymentMadeDetailContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('date'),
|
||||
accessor: (row) => moment(row.date).format('YYYY MMM DD'),
|
||||
width: 100,
|
||||
disableSortBy: true,
|
||||
className: 'date',
|
||||
},
|
||||
{
|
||||
Header: intl.get('bill_number'),
|
||||
accessor: 'bill_no',
|
||||
width: 150,
|
||||
disableSortBy: true,
|
||||
className: 'bill_number',
|
||||
},
|
||||
{
|
||||
Header: intl.get('bill_amount'),
|
||||
accessor: 'bill.amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'bill.amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
Header: intl.get('due_amount'),
|
||||
accessor: 'bill.due_amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'bill.due_amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableSortBy: true,
|
||||
align: 'right',
|
||||
},
|
||||
{
|
||||
Header: intl.get('payment_amount'),
|
||||
accessor: 'payment_amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'payment_amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
align: 'right',
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -2,12 +2,18 @@ import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import moment from 'moment';
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { usePaymentReceiveDetailContext } from './PaymentReceiveDetailProvider';
|
||||
|
||||
/**
|
||||
* Retrieve payment entries table columns.
|
||||
*/
|
||||
export const usePaymentReceiveEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
export const usePaymentReceiveEntriesColumns = () => {
|
||||
const {
|
||||
paymentReceive: { entries },
|
||||
} = usePaymentReceiveDetailContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('date'),
|
||||
@@ -27,24 +33,38 @@ export const usePaymentReceiveEntriesColumns = () =>
|
||||
Header: intl.get('invoice_amount'),
|
||||
accessor: 'invoice.balance',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'invoice.balance', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount_due'),
|
||||
accessor: 'invoice.due_amount',
|
||||
Cell: FormatNumberCell,
|
||||
align: 'right',
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'invoice.due_amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('payment_amount'),
|
||||
accessor: 'invoice.payment_amount',
|
||||
Cell: FormatNumberCell,
|
||||
align: 'right',
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'invoice.payment_amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,44 +1,69 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { FormatNumberCell } from '../../../components';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { FormatNumberCell, TextOverviewTooltipCell } from '../../../components';
|
||||
import { useReceiptDetailDrawerContext } from './ReceiptDetailDrawerProvider.js';
|
||||
|
||||
export const useReceiptReadonlyEntriesTableColumns = () => React.useMemo(() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
width: 150,
|
||||
className: 'name',
|
||||
disableSortBy: true
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
className: 'description',
|
||||
disableSortBy: true
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
align: 'right',
|
||||
disableSortBy: true
|
||||
},
|
||||
], []);
|
||||
|
||||
export const useReceiptReadonlyEntriesTableColumns = () => {
|
||||
// Receipt details drawer context.
|
||||
const {
|
||||
receipt: { entries },
|
||||
} = useReceiptDetailDrawerContext();
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 150,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
@@ -10,59 +10,82 @@ import {
|
||||
Tag,
|
||||
Intent,
|
||||
} from '@blueprintjs/core';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import {
|
||||
Icon,
|
||||
FormattedMessage as T,
|
||||
TextOverviewTooltipCell,
|
||||
FormatNumberCell,
|
||||
Choose,
|
||||
} from '../../../components';
|
||||
import { useVendorCreditDetailDrawerContext } from './VendorCreditDetailDrawerProvider';
|
||||
|
||||
/**
|
||||
* Retrieve vendor credit readonly details entries table columns.
|
||||
*/
|
||||
export const useVendorCreditReadonlyEntriesTableColumns = () =>
|
||||
React.useMemo(
|
||||
export const useVendorCreditReadonlyEntriesTableColumns = () => {
|
||||
const {
|
||||
vendorCredit: { entries },
|
||||
} = useVendorCreditDetailDrawerContext();
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('product_and_service'),
|
||||
accessor: 'item.name',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 150,
|
||||
className: 'item',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('rate'),
|
||||
accessor: 'rate',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'rate', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('amount'),
|
||||
accessor: 'amount',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'amount', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Vendor note more actions menu.
|
||||
|
||||
@@ -1,40 +1,58 @@
|
||||
import React from 'react';
|
||||
import intl from 'react-intl-universal';
|
||||
import { Intent, Tag } from '@blueprintjs/core';
|
||||
import { getColumnWidth } from 'utils';
|
||||
import { useWarehouseDetailDrawerContext } from './WarehouseTransferDetailDrawerProvider';
|
||||
|
||||
import {
|
||||
FormattedMessage as T,
|
||||
FormatNumberCell,
|
||||
TextOverviewTooltipCell,
|
||||
Choose,
|
||||
} from '../../../components';
|
||||
|
||||
export const useWarehouseTransferReadOnlyEntriesColumns = () =>
|
||||
React.useMemo(
|
||||
/**
|
||||
* Retrieves the readonly warehouse transfer entries columns.
|
||||
*/
|
||||
export const useWarehouseTransferReadOnlyEntriesColumns = () => {
|
||||
const {
|
||||
warehouseTransfer: { entries },
|
||||
} = useWarehouseDetailDrawerContext();
|
||||
|
||||
return React.useMemo(
|
||||
() => [
|
||||
{
|
||||
Header: intl.get('warehouse_transfer.column.item_name'),
|
||||
accessor: 'item.name',
|
||||
width: 150,
|
||||
Cell: TextOverviewTooltipCell,
|
||||
width: 100,
|
||||
className: 'name',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('warehouse_transfer.column.description'),
|
||||
accessor: 'description',
|
||||
Cell: TextOverviewTooltipCell,
|
||||
className: 'description',
|
||||
disableSortBy: true,
|
||||
textOverview: true,
|
||||
},
|
||||
{
|
||||
Header: intl.get('warehouse_transfer.column.transfer_quantity'),
|
||||
accessor: 'quantity',
|
||||
Cell: FormatNumberCell,
|
||||
width: 100,
|
||||
width: getColumnWidth(entries, 'quantity', {
|
||||
minWidth: 60,
|
||||
magicSpacing: 5,
|
||||
}),
|
||||
align: 'right',
|
||||
disableSortBy: true,
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Warehouses transfer details status.
|
||||
|
||||
@@ -43,7 +43,10 @@ export function ActionsCellRenderer({
|
||||
|
||||
const exampleMenu = (
|
||||
<Menu>
|
||||
<MenuItem onClick={onRemoveRole} text="Remove line" />
|
||||
<MenuItem
|
||||
onClick={onRemoveRole}
|
||||
text={<T id={'item_entries.remove_row'} />}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ const ActionsCellRenderer = ({
|
||||
};
|
||||
const exampleMenu = (
|
||||
<Menu>
|
||||
<MenuItem onClick={handleClickRemoveRole} text="Remove line" />
|
||||
<MenuItem
|
||||
onClick={handleClickRemoveRole}
|
||||
text={intl.get('expense.entries.remove_row')}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
return (
|
||||
@@ -163,4 +166,4 @@ export function ExpensesExchangeRateInputField({ ...props }) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
ExpensesExchangeRateInputField.cellType = CellType.Field;
|
||||
ExpensesExchangeRateInputField.cellType = CellType.Field;
|
||||
|
||||
@@ -4,7 +4,7 @@ import { FastField, Field } from 'formik';
|
||||
import { FormGroup, Checkbox } from '@blueprintjs/core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { Row, Col, FieldHint, FormattedMessage as T } from 'components';
|
||||
import { Flex, FlexItem, FieldHint, FormattedMessage as T } from 'components';
|
||||
import {
|
||||
handlePreviousYearCheckBoxChange,
|
||||
handlePreviousYearChangeCheckboxChange,
|
||||
@@ -15,11 +15,11 @@ import {
|
||||
} from './utils';
|
||||
|
||||
/**
|
||||
* Balance sheet header - Comparison panal.
|
||||
* Balance sheet header - Comparison panal - Comparisons fields.
|
||||
*/
|
||||
export default function BalanceSheetHeaderComparisonPanal() {
|
||||
function BalanceSheetHeaderComparisonPanalFields() {
|
||||
return (
|
||||
<BalanceSheetComparisonWrap>
|
||||
<>
|
||||
{/**----------- Previous Year -----------*/}
|
||||
<Field name={'previousYear'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
@@ -33,8 +33,9 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</Field>
|
||||
<Row>
|
||||
<Col xs={3}>
|
||||
|
||||
<FlexSubFields align={'left'}>
|
||||
<FlexItem col={6}>
|
||||
<Field name={'previousYearAmountChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -48,8 +49,9 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</Field>
|
||||
</Col>
|
||||
<Col xs={3}>
|
||||
</FlexItem>
|
||||
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousYearPercentageChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -62,8 +64,9 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
</Row>
|
||||
</FlexItem>
|
||||
</FlexSubFields>
|
||||
|
||||
{/*------------ Previous Period -----------*/}
|
||||
<FastField name={'previousPeriod'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
@@ -78,8 +81,9 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
<Row>
|
||||
<Col xs={3}>
|
||||
|
||||
<FlexSubFields>
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousPeriodAmountChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -93,8 +97,9 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
<Col xs={3}>
|
||||
</FlexItem>
|
||||
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousPeriodPercentageChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -107,8 +112,8 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
</Row>
|
||||
</FlexItem>
|
||||
</FlexSubFields>
|
||||
|
||||
{/**----------- % of Column -----------*/}
|
||||
<FastField name={'percentageOfColumn'} type={'checkbox'}>
|
||||
@@ -137,19 +142,33 @@ export default function BalanceSheetHeaderComparisonPanal() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Balance sheet header - Comparison panal.
|
||||
*/
|
||||
export default function BalanceSheetHeaderComparisonPanal() {
|
||||
return (
|
||||
<BalanceSheetComparisonWrap>
|
||||
<BalanceSheetComparisonFieldsWrap>
|
||||
<BalanceSheetHeaderComparisonPanalFields />
|
||||
</BalanceSheetComparisonFieldsWrap>
|
||||
</BalanceSheetComparisonWrap>
|
||||
);
|
||||
}
|
||||
|
||||
const BalanceSheetComparisonWrap = styled.div`
|
||||
.row {
|
||||
margin-left: 0.15rem;
|
||||
.col {
|
||||
min-width: 150px !important;
|
||||
max-width: 190px !important;
|
||||
}
|
||||
}
|
||||
.bp3-form-group {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
`;
|
||||
|
||||
const FlexSubFields = styled(Flex)`
|
||||
padding-left: 20px;
|
||||
`;
|
||||
|
||||
const BalanceSheetComparisonFieldsWrap = styled.div`
|
||||
width: 400px;
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormGroup, Classes } from '@blueprintjs/core';
|
||||
import { Classes } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { AccountMultiSelect, Row, Col } from 'components';
|
||||
import { FFormGroup } from '../../../components/Forms';
|
||||
@@ -47,10 +46,10 @@ function GLHeaderGeneralPaneContent() {
|
||||
<Col xs={4}>
|
||||
<FFormGroup
|
||||
label={<T id={'specific_accounts'} />}
|
||||
name={'accounts'}
|
||||
name={'accountsIds'}
|
||||
className={Classes.FILL}
|
||||
>
|
||||
<AccountMultiSelect name="accounts" accounts={accounts} />
|
||||
<AccountMultiSelect name="accountsIds" accounts={accounts} />
|
||||
</FFormGroup>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -32,7 +32,7 @@ export const getDefaultGeneralLedgerQuery = () => {
|
||||
basis: 'accural',
|
||||
filterByOption: 'with-transactions',
|
||||
branchesIds: [],
|
||||
accounts: [],
|
||||
accountsIds: [],
|
||||
};
|
||||
};
|
||||
|
||||
@@ -49,8 +49,9 @@ const parseGeneralLedgerQuery = (locationQuery) => {
|
||||
return {
|
||||
...transformed,
|
||||
|
||||
// Ensures the branches ids is always array.
|
||||
// Ensures the branches, accounts ids is always array.
|
||||
branchesIds: castArray(transformed.branchesIds),
|
||||
accountsIds: castArray(transformed.accountsIds),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React from 'react';
|
||||
import { FastField, Field } from 'formik';
|
||||
import { FastField } from 'formik';
|
||||
import { FormGroup, Checkbox } from '@blueprintjs/core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import { Flex, FlexItem, FormattedMessage as T } from 'components';
|
||||
|
||||
import { Row, Col, FieldHint } from '../../../components';
|
||||
import { FieldHint } from '../../../components';
|
||||
import {
|
||||
handlePreviousYearCheckBoxChange,
|
||||
handlePreviousPeriodCheckBoxChange,
|
||||
@@ -16,11 +16,12 @@ import {
|
||||
} from './utils';
|
||||
|
||||
/**
|
||||
* ProfitLoss sheet header -comparison panel.
|
||||
* Profit/loss comparisons panel fields.
|
||||
* @returns {JSX.Element}
|
||||
*/
|
||||
export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
function ProfitLossComaprsionPanelFields() {
|
||||
return (
|
||||
<ProfitLossSheetComparisonWrap>
|
||||
<>
|
||||
{/**----------- Previous Year -----------*/}
|
||||
<FastField name={'previousYear'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
@@ -35,8 +36,9 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
<Row>
|
||||
<Col xs={3}>
|
||||
|
||||
<FlexSubFields>
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousYearAmountChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -50,8 +52,8 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
<Col xs={3}>
|
||||
</FlexItem>
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousYearPercentageChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -65,8 +67,9 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
</Row>
|
||||
</FlexItem>
|
||||
</FlexSubFields>
|
||||
|
||||
{/**----------- Previous Period (PP) -----------*/}
|
||||
<FastField name={'previousPeriod'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
@@ -81,8 +84,9 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
<Row>
|
||||
<Col xs={3}>
|
||||
|
||||
<FlexSubFields>
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousPeriodAmountChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -96,8 +100,8 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
<Col xs={3}>
|
||||
</FlexItem>
|
||||
<FlexItem col={6}>
|
||||
<FastField name={'previousPeriodPercentageChange'} type={'checkbox'}>
|
||||
{({ form, field }) => (
|
||||
<FormGroup labelInfo={<FieldHint />}>
|
||||
@@ -111,8 +115,9 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</Col>
|
||||
</Row>
|
||||
</FlexItem>
|
||||
</FlexSubFields>
|
||||
|
||||
{/**----------- % of Column -----------*/}
|
||||
<FastField name={'percentageColumn'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
@@ -126,6 +131,7 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
{/**----------- % of Row -----------*/}
|
||||
<FastField name={'percentageRow'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
@@ -139,6 +145,7 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
{/**----------- % of Expense -----------*/}
|
||||
<FastField name={'percentageExpense'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
@@ -152,6 +159,7 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
|
||||
{/**----------- % of Income -----------*/}
|
||||
<FastField name={'percentageIncome'} type={'checkbox'}>
|
||||
{({ field }) => (
|
||||
@@ -165,19 +173,33 @@ export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
</FormGroup>
|
||||
)}
|
||||
</FastField>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* ProfitLoss sheet header -comparison panel.
|
||||
*/
|
||||
export default function ProfitLossSheetHeaderComparisonPanel() {
|
||||
return (
|
||||
<ProfitLossSheetComparisonWrap>
|
||||
<ProfitLossComaprsionFieldsWrap>
|
||||
<ProfitLossComaprsionPanelFields />
|
||||
</ProfitLossComaprsionFieldsWrap>
|
||||
</ProfitLossSheetComparisonWrap>
|
||||
);
|
||||
}
|
||||
|
||||
const ProfitLossSheetComparisonWrap = styled.div`
|
||||
.row {
|
||||
margin-left: 0.15rem;
|
||||
.col {
|
||||
min-width: 150px !important;
|
||||
max-width: 190px !important;
|
||||
}
|
||||
}
|
||||
.bp3-form-group {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
`;
|
||||
|
||||
const FlexSubFields = styled(Flex)`
|
||||
padding-left: 20px;
|
||||
`;
|
||||
|
||||
const ProfitLossComaprsionFieldsWrap = styled.div`
|
||||
max-width: 400px;
|
||||
`;
|
||||
|
||||
@@ -12,7 +12,6 @@ function VendorsBalanceSummaryProvider({ filter, ...props }) {
|
||||
const query = React.useMemo(() => transformFilterFormToQuery(filter), [
|
||||
filter,
|
||||
]);
|
||||
|
||||
// Fetching vendors balance summary report based on the given query.
|
||||
const {
|
||||
data: VendorBalanceSummary,
|
||||
|
||||
@@ -50,7 +50,7 @@ function ItemsCategoryTable({
|
||||
loading={isCategoriesLoading}
|
||||
headerLoading={isCategoriesLoading}
|
||||
progressBarLoading={isCategoriesFetching}
|
||||
expandable={true}
|
||||
expandable={false}
|
||||
sticky={true}
|
||||
selectionColumn={true}
|
||||
TableLoadingRenderer={TableSkeletonRows}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
import * as Yup from 'yup';
|
||||
import moment from 'moment';
|
||||
import intl from 'react-intl-universal';
|
||||
import { DATATYPES_LENGTH } from 'common/dataTypes';
|
||||
import { isBlank } from 'utils';
|
||||
|
||||
const BillFormSchema = Yup.object().shape({
|
||||
vendor_id: Yup.number()
|
||||
.required()
|
||||
.label(intl.get('vendor_name_')),
|
||||
bill_date: Yup.date()
|
||||
.required()
|
||||
.label(intl.get('bill_date_')),
|
||||
vendor_id: Yup.number().required().label(intl.get('vendor_name_')),
|
||||
bill_date: Yup.date().required().label(intl.get('bill_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()
|
||||
.label(intl.get('due_date_')),
|
||||
bill_number: Yup.string()
|
||||
@@ -25,7 +28,7 @@ const BillFormSchema = Yup.object().shape({
|
||||
open: Yup.boolean(),
|
||||
branch_id: Yup.string(),
|
||||
warehouse_id: Yup.string(),
|
||||
exchange_rate:Yup.number(),
|
||||
exchange_rate: Yup.number(),
|
||||
entries: Yup.array().of(
|
||||
Yup.object().shape({
|
||||
quantity: Yup.number()
|
||||
|
||||
@@ -2,16 +2,19 @@ import * as Yup from 'yup';
|
||||
import intl from 'react-intl-universal';
|
||||
import { DATATYPES_LENGTH } from 'common/dataTypes';
|
||||
import { isBlank } from 'utils';
|
||||
import moment from 'moment';
|
||||
|
||||
const Schema = Yup.object().shape({
|
||||
customer_id: Yup.number()
|
||||
.label(intl.get('customer_name_'))
|
||||
.required(),
|
||||
estimate_date: Yup.date()
|
||||
.required()
|
||||
.label(intl.get('estimate_date_')),
|
||||
customer_id: Yup.number().label(intl.get('customer_name_')).required(),
|
||||
estimate_date: Yup.date().required().label(intl.get('estimate_date_')),
|
||||
expiration_date: Yup.date()
|
||||
.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_')),
|
||||
estimate_number: Yup.string()
|
||||
.max(DATATYPES_LENGTH.STRING)
|
||||
|
||||
@@ -147,7 +147,7 @@ function InvoiceFormHeaderFields({
|
||||
</FastField>
|
||||
</Col>
|
||||
|
||||
<Col className={'col--due-date'}>
|
||||
<Col xs={6}>
|
||||
{/* ----------- Due date ----------- */}
|
||||
<FastField name={'due_date'}>
|
||||
{({ form, field: { value }, meta: { error, touched } }) => (
|
||||
|
||||
@@ -72,18 +72,6 @@ function WarehouseTransferForm({
|
||||
// Handles form submit.
|
||||
const handleSubmit = (values, { setSubmitting, setErrors, resetForm }) => {
|
||||
setSubmitting(true);
|
||||
const totalQuantity = sumBy(values.entries, 'quantity');
|
||||
|
||||
if (totalQuantity <= 0) {
|
||||
AppToaster.show({
|
||||
message: intl.get(
|
||||
'warehouse_transfer.quantity_cannot_be_zero_or_empty',
|
||||
),
|
||||
intent: Intent.DANGER,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// Transformes the values of the form to request.
|
||||
const form = {
|
||||
...transformValueToRequest(values),
|
||||
|
||||
@@ -20,7 +20,7 @@ const Schema = Yup.object().shape({
|
||||
Yup.object().shape({
|
||||
item_id: Yup.number().nullable(),
|
||||
description: Yup.string().nullable().max(DATATYPES_LENGTH.TEXT),
|
||||
quantity: Yup.number().nullable().max(DATATYPES_LENGTH.INT_10),
|
||||
quantity: Yup.number().min(1).max(DATATYPES_LENGTH.INT_10),
|
||||
}),
|
||||
),
|
||||
});
|
||||
|
||||
@@ -45,7 +45,7 @@ export default function WarehouseTransferFormEntriesTable({
|
||||
item_id: newRowMeta.itemId,
|
||||
warehouses: newRowMeta.warehouses,
|
||||
description: '',
|
||||
quantity: 0,
|
||||
quantity: '',
|
||||
};
|
||||
const newRows = mutateTableRow(newRowMeta.rowIndex, newRow, entries);
|
||||
|
||||
|
||||
@@ -21,7 +21,10 @@ export function ActionsCellRenderer({
|
||||
|
||||
const exampleMenu = (
|
||||
<Menu>
|
||||
<MenuItem onClick={onRemoveRole} text="Remove line" />
|
||||
<MenuItem
|
||||
onClick={onRemoveRole}
|
||||
text={intl.get('warehouse_transfer.entries.remove_row')}
|
||||
/>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
|
||||
@@ -1173,7 +1173,6 @@
|
||||
"From transaction": "من معاملة",
|
||||
"Landed": "Landed",
|
||||
"This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.": "يتيح لك هذا الخيار إمكانية إضافة تكلفة إضافية على سبيل المثال اضافة تكلفة الشحن ومن ثم تخصيص التكلفة لفواتير الشراء.",
|
||||
"Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?": "بمجرد حذف معاملة تحميل التكلفة ، لن تتمكن من استعادتها لاحقًا ، هل أنت متأكد من أنك تريد حذف هذه المعاملة؟",
|
||||
"journal_entries": "القيود",
|
||||
"contact": "جهة الاتصال",
|
||||
"invoice_details": "تفاصيل الفاتورة",
|
||||
@@ -1390,7 +1389,7 @@
|
||||
"filter.value": "قيمة",
|
||||
"payment_made.empty_status.title": "المنشأة لم تدفع اي اموال إلي الموردين ، إلي حد الأن!.",
|
||||
"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_all_items.hint": "جميع الاصناف ، بما في ذلك تلك الاصناف لديها رصيد صفر.",
|
||||
"items.option_with_transactions": "الاصناف مع معاملات",
|
||||
@@ -1594,6 +1593,9 @@
|
||||
"refund": "استرجاع",
|
||||
"landed_cost.dialog.label_select_transaction": "حدد المعاملة ",
|
||||
"landed_cost.dialog.label_select_transaction_entry": "حدد سطر المعاملة ",
|
||||
"landed_cost.dialog.label_unallocated_cost_amount":"قيمة التكلفة غير المحملة:",
|
||||
"landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line":"إجمالي قيمة التكلفة المحملة أكبر من قيمة سطر المعاملة.",
|
||||
"landed_cost.once_your_delete_this_located_landed_cost": "بمجرد حذف معاملة تحميل التكلفة ، لن تتمكن من استعادتها لاحقًا ، هل أنت متأكد من أنك تريد حذف هذه المعاملة؟",
|
||||
"refund_credit_note.dialog.label": "استرجاع اموال",
|
||||
"refund_credit_note.dialog.success_message": "تم انشاء معاملة استرجاع الاموال لإشعار الدائن بنجاح.",
|
||||
"refund_credit_note.dialog.refund_date": "تاريخ الاسترجاع",
|
||||
@@ -1916,7 +1918,7 @@
|
||||
"branches_multi_select.placeholder": "تصفية حسب الفروع…",
|
||||
"warehouses_multi_select.label": "مخازن",
|
||||
"warehouses_multi_select.placeholder": "تصفية حسب المخازن…",
|
||||
"dimensions": "Dimensions",
|
||||
"dimensions": "الأبعاد",
|
||||
"warehouse_transfer.save_initiate_transfer": "حفظ وبدء النقل",
|
||||
"warehouse_transfer.save_mark_as_transferred": "حفظ وتم النقل",
|
||||
"warehouse_transfer.label.transfer_initiated": "بدء النقل",
|
||||
@@ -1945,7 +1947,7 @@
|
||||
"view_customer_details": "عرض تفاصيل العميل ",
|
||||
"view_vendor_details": "عرض تفاصيل المورد ",
|
||||
"thanks_for_your_business_and_have_a_great_day": "Thanks for your business and have a great day!",
|
||||
"terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
|
||||
"expenses.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
|
||||
"make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
|
||||
"estimate_form.label.total": "إجمالي",
|
||||
@@ -1953,14 +1955,15 @@
|
||||
"estimate_form.label.customer_note": "ملاحظة الزبون",
|
||||
"estimate_form.label.terms_conditions": "الشروط والأحكام",
|
||||
"estimate_form.customer_note.placeholder": "Thanks for your business and have a great day!",
|
||||
"estimate_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"estimate_form.terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
|
||||
"invoice_form.label.total": "إجمالي",
|
||||
"invoice_form.label.subtotal": "المجموع",
|
||||
"invoice_form.label.due_amount": "مبلغ المستحق",
|
||||
"invoice_form.label.payment_amount": "مبلغ المدفوع",
|
||||
"invoice_form.label.invoice_message": "رسالة الفاتورة",
|
||||
"invoice_form.invoice_message.placeholder": "Thanks for your business and have a great day!",
|
||||
"invoice_form.terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"invoice_form.label.terms_conditions": "الشروط والأحكام",
|
||||
"invoice_form.terms_and_conditions.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
|
||||
"receipt_form.label.total": "إجمالي",
|
||||
"receipt_form.label.subtotal": "المجموع",
|
||||
"receipt_form.label.due_amount": "مبلغ المستحق",
|
||||
@@ -1974,13 +1977,13 @@
|
||||
"payment_receive_form.label.subtotal": "المجموع",
|
||||
"payment_receive_form.label.total": "إجمالي",
|
||||
"bill_form.label.note": "ملاحظة",
|
||||
"bill_form.label.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"bill_form.label.note.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
|
||||
"bill_form.label.subtotal": "المجموع",
|
||||
"bill_form.label.total": "إجمالي",
|
||||
"bill_form.label.due_amount": "مبلغ المستحق",
|
||||
"bill_form.label.payment_amount": "مبلغ المدفوع",
|
||||
"vendor_credit_form.label.note": "ملاحظة",
|
||||
"vendor_credit_form.note.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"vendor_credit_form.note.placeholder": "أدخل شروط وأحكام عملك ليتم عرضها في المعاملة.",
|
||||
"vendor_credit_form.label.subtotal": "المجموع",
|
||||
"vendor_credit_form.label.total": "إجمالي",
|
||||
"payment_made_form.label.statement": "بيان",
|
||||
@@ -2005,9 +2008,17 @@
|
||||
"estimate.warehouse_button.label": "المخزن: {label}",
|
||||
"receipt.branch_button.label": "الفرع: {label}",
|
||||
"receipt.warehouse_button.label": "المخزن: {label}",
|
||||
"warehouse_transfer.empty_status.title": "إدارة عمليات النقل بين المستودعات",
|
||||
"warehouse_transfer.empty_status.description": "غالبًا ماتحتاج الاعمال ذات مستودعات متعددة لطلبات نقل البضائع من مستودع إلى آخر عندما تكون في حاجة ماسة إلى البائعين.",
|
||||
"warehouse_transfer.empty_status.title": "إدارة عمليات النقل بين المخازن",
|
||||
"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}"
|
||||
"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}"
|
||||
}
|
||||
@@ -1147,7 +1147,6 @@
|
||||
"From transaction": "From transaction",
|
||||
"landed": "Landed",
|
||||
"This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.": "This options allows you to be able to add additional cost eg. freight then allocate cost to the items in your bills.",
|
||||
"Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?": "Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?",
|
||||
"journal_entries": "Journal Entries",
|
||||
"contact": "Contact",
|
||||
"invoice_details": "Invoice details",
|
||||
@@ -1259,12 +1258,41 @@
|
||||
"setup.initializing.please_refresh_the_page": "Please refresh the page",
|
||||
"setup.organization.title": "Let’s Get Started",
|
||||
"setup.organization.description": "Tell the system a little bit about your organization.",
|
||||
"plan.capital_basic.title": "Capital Basic",
|
||||
"plan.feature.sales_invoices": "Sales Invoices.",
|
||||
"plan.feature.sales_estimates": "Sales Estimates.",
|
||||
"plan.feature.customers": "Customers.",
|
||||
"plan.feature.credit_notes": "Credit notes.",
|
||||
"plan.feature.manual_journals": "Manual Journals.",
|
||||
"plan.feature.expenses_tracking": "Expenses Tracking",
|
||||
"plan.feature.basic_financial_reports": "Basic Financial Reports.",
|
||||
"plan.capital_plus.title": "Capital Plus",
|
||||
"plan.feature.all_capital_basic": "All Capital Basic features.",
|
||||
"plan.feature.predefined_user_roles": "Predefined User Roles.",
|
||||
"plan.feature.custom_tables_views": "Custom Tables Views.",
|
||||
"plan.feature.transactions_locking": "Transactions Locking.",
|
||||
"plan.feature.plus_financial_reports": "Plus Financial Reports.",
|
||||
"plan.feature.custom_fields_resources": "Custom Fields & Resources.",
|
||||
"plan.essential.title": "Capital Essential",
|
||||
"plan.feature.all_capital_plus": "All Capital Basic features.",
|
||||
"plan.feature.sales_purchases_order": "Sales & Purchases Order.",
|
||||
"plan.feature.purchase_invoices": "Purchase Invoices.",
|
||||
"plan.feature.inventory_tracking": "Inventory Tracking.",
|
||||
"plan.feature.custom_roles": "Custom Roles.",
|
||||
"plan.feature.multiply_currency_transcations": "Multiply Currency Transcations.",
|
||||
"plan.feature.inventory_reports": "Inventory Reports.",
|
||||
"plan.feature.landed_cost": "Landed cost.",
|
||||
"plan.capital_enterprise.title": "Capital Enterprise",
|
||||
"plan.feature.all_capital_essential": "All Capital Essential features.",
|
||||
"plan.feature.multiply_branches": "Multiply Branches.",
|
||||
"plan.feature.multiply_warehouses": "Multiply Warehouses.",
|
||||
"plan.feature.accounting_dimensions": "Accounting Dimensions.",
|
||||
"plan.feature.warehouses_reports": "Warehouses Reports.",
|
||||
"plan.feature.branches_reports": "Branches Reports.",
|
||||
"plan.professional.title": "Pro",
|
||||
"plan.essential.title": "Essential",
|
||||
"plan.plus.title": "Plus+",
|
||||
"plan.feature.sale_purchase_invoice": "Sale and purchase invoices.",
|
||||
"plan.feature.receivable_payable_accounts": "Customers/vendors accounts.",
|
||||
"plan.feature.expenses_tracking": "Expenses tracking",
|
||||
"plan.feature.manual_journal": "Manual journals.",
|
||||
"plan.feature.financial_reports": "Financial reports.",
|
||||
"plan.feature.one_user_with_accountant": "For one user and accountant",
|
||||
@@ -1275,9 +1303,7 @@
|
||||
"plan.feature.three_users": "Three users with your accountant",
|
||||
"plan.feature.advanced_financial_reports": "Advanced financial reports",
|
||||
"plan.feature.tracking_multi_locations": "Track multi-branches and locations",
|
||||
"plan.feature.all_capital_essential": "All Capital Essential features.",
|
||||
"plan.feature.projects_accounting": "Projects accounting and timesheets",
|
||||
"plan.feature.accounting_dimensions": "Accounting dimensions.",
|
||||
"plan.monthly": "Monthly",
|
||||
"plan.yearly": "Yearly",
|
||||
"payment_via_voucher.success_message": "Payment has been done successfully.",
|
||||
@@ -1293,11 +1319,11 @@
|
||||
"inventory_adjustment.details_drawer.title": "Inventory adjustment details",
|
||||
"setup.organization.location": "Location",
|
||||
"preferences.general.success_message": "The general preferences has been saved.",
|
||||
"customer.drawer.action.new_invoice": "New invoice",
|
||||
"customer.drawer.action.new_estimate": "New estimate",
|
||||
"customer.drawer.action.new_payment": "New payment",
|
||||
"customer.drawer.action.new_receipt": "New receipt",
|
||||
"customer.drawer.action.new_transaction": "New transaction",
|
||||
"customer.drawer.action.new_invoice": "New Invoice",
|
||||
"customer.drawer.action.new_estimate": "New Estimate",
|
||||
"customer.drawer.action.new_payment": "New Payment",
|
||||
"customer.drawer.action.new_receipt": "New Receipt",
|
||||
"customer.drawer.action.new_transaction": "New Transaction",
|
||||
"customer.drawer.action.edit_opening_balance": "Edit Opening Balance",
|
||||
"customer.drawer.action.edit": "Edit",
|
||||
"customer.drawer.label.outstanding_receivable": "Outstanding receivable",
|
||||
@@ -1324,9 +1350,9 @@
|
||||
"vendor.drawer.label.note": "Note",
|
||||
"vendor.drawer.action.edit_vendor": "Edit vendor",
|
||||
"vendor.drawer.action.delete": "Delete",
|
||||
"vendor.drawer.action.new_transaction": "New transaction",
|
||||
"vendor.drawer.action.new_payment": "New payment",
|
||||
"vendor.drawer.action.new_invoice": "New purchase invoice",
|
||||
"vendor.drawer.action.new_transaction": "New Transaction",
|
||||
"vendor.drawer.action.new_payment": "New Payment",
|
||||
"vendor.drawer.action.new_invoice": "New Purchase Invoice",
|
||||
"vendor.drawer.action.edit": "Edit",
|
||||
"vendor.drawer.action.edit_opening_balance": "Edit Opening Balance",
|
||||
"manual_journals.empty_status.description": "Manual journals can be used to record financial transactions manually, used by accountants to work with the ledger.",
|
||||
@@ -1585,6 +1611,9 @@
|
||||
"refund": "Refund",
|
||||
"landed_cost.dialog.label_select_transaction": "Select transaction",
|
||||
"landed_cost.dialog.label_select_transaction_entry": "Select transaction entry",
|
||||
"landed_cost.dialog.label_unallocated_cost_amount": "Unallocated cost Amount:",
|
||||
"landed_cost.error.the_total_located_cost_is_bigger_than_the_transaction_line": "The total located cost is bigger than the transaction line.",
|
||||
"landed_cost.once_your_delete_this_located_landed_cost": "Once your delete this located landed cost, you won't be able to restore it later, Are your sure you want to delete this transaction?",
|
||||
"refund_credit_note.dialog.label": "Refund Credit Note",
|
||||
"refund_credit_note.dialog.success_message": "The customer credit note refund has been created successfully.",
|
||||
"refund_credit_note.dialog.refund_date": "Refund date",
|
||||
@@ -1756,6 +1785,7 @@
|
||||
"payment_made.drawer.subtitle": "Branch: {value}",
|
||||
"manual_journal.drawer.title": "Manual journal details ({number})",
|
||||
"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.transactions_locked": "Transactions before {lockedToDate} has been locked. Hence action cannot be performed.",
|
||||
"global_error.authorized_user_inactive": "The authorized user is inactive.",
|
||||
@@ -1938,7 +1968,6 @@
|
||||
"payment_made.error.withdrawal_account_currency_invalid": "The withdrawal account currency should be same vendor currency or organization base currency.",
|
||||
"view_customer_details": "View Customer Details",
|
||||
"view_vendor_details": "View Vendor Details",
|
||||
"thanks_for_your_business_and_have_a_great_day": "Thanks for your business and have a great day!",
|
||||
"terms_and_conditions.placeholder": "Enter the terms and conditions of your business to be displayed in your transaction",
|
||||
"expenses.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
|
||||
"make_jorunal.decscrption.placeholder": "Enter the description of your business to be displayed in your transaction",
|
||||
@@ -2009,5 +2038,11 @@
|
||||
"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}"
|
||||
"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}"
|
||||
}
|
||||
@@ -2,7 +2,6 @@ import { createReducer } from '@reduxjs/toolkit';
|
||||
import intl from 'react-intl-universal';
|
||||
import t from 'store/types';
|
||||
|
||||
|
||||
const getSubscriptionPeriods = () => [
|
||||
{
|
||||
slug: 'month',
|
||||
@@ -15,79 +14,110 @@ const getSubscriptionPeriods = () => [
|
||||
];
|
||||
|
||||
const getSubscriptionPlans = () => [
|
||||
{
|
||||
name: intl.get('plan.capital_basic.title'),
|
||||
slug: 'capital_basic',
|
||||
description: [
|
||||
intl.get('plan.feature.sales_invoices'),
|
||||
intl.get('plan.feature.sales_estimates'),
|
||||
intl.get('plan.feature.customers'),
|
||||
intl.get('plan.feature.credit_notes'),
|
||||
intl.get('plan.feature.manual_journals'),
|
||||
intl.get('plan.feature.expenses_tracking'),
|
||||
intl.get('plan.feature.basic_financial_reports'),
|
||||
],
|
||||
price: '55',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '55',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '595',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.capital_plus.title'),
|
||||
slug: 'capital_plus',
|
||||
description: [
|
||||
intl.get('plan.feature.all_capital_basic'),
|
||||
intl.get('plan.feature.predefined_user_roles'),
|
||||
intl.get('plan.feature.custom_tables_views'),
|
||||
intl.get('plan.feature.transactions_locking'),
|
||||
intl.get('plan.feature.plus_financial_reports'),
|
||||
intl.get('plan.feature.custom_fields_resources'),
|
||||
],
|
||||
price: '75',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '75',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '795',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.essential.title'),
|
||||
slug: 'essentials',
|
||||
description: [
|
||||
intl.get('plan.feature.sale_purchase_invoice'),
|
||||
intl.get('plan.feature.receivable_payable_accounts'),
|
||||
intl.get('plan.feature.expenses_tracking'),
|
||||
intl.get('plan.feature.manual_journal'),
|
||||
intl.get('plan.feature.financial_reports'),
|
||||
intl.get('plan.feature.one_user_with_accountant'),
|
||||
intl.get('plan.feature.all_capital_plus'),
|
||||
intl.get('plan.feature.sales_purchases_order'),
|
||||
intl.get('plan.feature.purchase_invoices'),
|
||||
intl.get('plan.feature.inventory_tracking'),
|
||||
intl.get('plan.feature.custom_roles'),
|
||||
intl.get('plan.feature.multiply_currency_transcations'),
|
||||
intl.get('plan.feature.inventory_reports'),
|
||||
intl.get('plan.feature.landed_cost'),
|
||||
],
|
||||
price: '100',
|
||||
price: '95',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '100'
|
||||
price: '95',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '1,200',
|
||||
price: '995',
|
||||
},
|
||||
],
|
||||
currencyCode: 'LYD',
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.professional.title'),
|
||||
slug: 'plus',
|
||||
description: [
|
||||
intl.get('plan.feature.all_capital_essential'),
|
||||
intl.get('plan.feature.multi_currency'),
|
||||
intl.get('plan.feature.purchase_sell_orders'),
|
||||
intl.get('plan.feature.multi_inventory_managment'),
|
||||
intl.get('plan.feature.three_users'),
|
||||
intl.get('plan.feature.advanced_financial_reports'),
|
||||
],
|
||||
price: '200',
|
||||
currencyCode: 'LYD',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '200'
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '1,200',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: intl.get('plan.plus.title'),
|
||||
name: intl.get('plan.capital_enterprise.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.all_capital_essential'),
|
||||
intl.get('plan.feature.multiply_branches'),
|
||||
intl.get('plan.feature.multiply_warehouses'),
|
||||
intl.get('plan.feature.accounting_dimensions'),
|
||||
intl.get('plan.feature.warehouses_reports'),
|
||||
intl.get('plan.feature.branches_reports'),
|
||||
],
|
||||
price: '300',
|
||||
price: '120',
|
||||
currencyCode: 'LYD',
|
||||
periods: [
|
||||
{
|
||||
slug: 'month',
|
||||
label: intl.get('plan.monthly'),
|
||||
price: '300'
|
||||
price: '120',
|
||||
},
|
||||
{
|
||||
slug: 'year',
|
||||
label: intl.get('plan.yearly'),
|
||||
price: '1,200',
|
||||
price: '1,195',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -290,3 +290,8 @@ html[lang^='ar'] {
|
||||
.font-bold {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
span.table-tooltip-overview-target{
|
||||
display: inline;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
.billing-plans{
|
||||
|
||||
max-width: 753px;
|
||||
.paragraph{
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user