Compare commits

...

9 Commits

Author SHA1 Message Date
Ahmed Bouhuolia
97b223e8ba fix(webapp): adjustment type options do not show up 2023-06-15 19:58:17 +02:00
Ahmed Bouhuolia
e5d0f16096 feat(webapp): add Inventory Adjustment option to the item drawer 2023-06-15 19:49:23 +02:00
Ahmed Bouhuolia
01c27b56ef Merge pull request #155 from bigcapitalhq/abouhuolia/big-19-delete-expense-transaction-does-not-work
fix(server): the expense transaction journal entries
2023-06-14 13:05:34 +02:00
Ahmed Bouhuolia
0d8fb8cf25 fix(server): the expense transaction journal entries 2023-06-14 13:00:26 +02:00
Ahmed Bouhuolia
6562e3ab8c chore: update CHANGELOG.md 2023-06-14 12:10:35 +02:00
Ahmed Bouhuolia
c93650ffd3 Merge pull request #139 from bigcapitalhq/change-onboarding-footer-links
chore(webapp): change the footer links of onboarding pages
2023-06-13 23:45:16 +02:00
Ahmed Bouhuolia
e6a2825065 chore(webapp): change the footer links of onboarding pages 2023-06-13 20:30:29 +02:00
Ahmed Bouhuolia
0c2a0b0010 Update README.md 2023-06-12 22:55:57 +02:00
Ahmed Bouhuolia
a332c51249 chore: change the default SIGNUP_DISABLED env variable 2023-06-12 21:15:27 +02:00
14 changed files with 161 additions and 38 deletions

View File

@@ -44,6 +44,6 @@ AGENDASH_AUTH_USER=agendash
AGENDASH_AUTH_PASSWORD=123123
# Sign-up restrictions
SIGNUP_DISABLED=true
SIGNUP_DISABLED=false
SIGNUP_ALLOWED_DOMAINS=
SIGNUP_ALLOWED_EMAILS=

View File

@@ -2,6 +2,46 @@
All notable changes to Bigcapital server-side will be in this file.
## [0.9.6] - 12-06-2023
`@bigcapital/webapp`
* fix: remove duplicated form submitting by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/138
* feat: add monorepo version on the application sidebar by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/136
## [0.9.5] - 11-06-2023
`@bigcapital/server`
* fix: filter ledger entries that effect contact balance to AR/AP accounts only by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/132
`@bigcapital/webapp`
* fix: catch journal error when create a journal with accounts have different currency by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/135
* fix: add duplicate icon to context menu of customers and vendors table by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/133
* fix: customer/vendor opening balance with exchange rate by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/134
## [0.9.4] - 08-06-2023
`@bigcapital/monorepo`
- fixed: docker-compose line-ending issue on Windows by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/130
`@bigcapital/server`
- fixed: Disable Webpack minification for JS class name reading.
## [0.9.3] -04-06-2023
`@bigcapital/monorepo`
* Added: Add env variable to customize the proxy public ports by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/125
* Added: Migrate the server database to MariaDB by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/128
## [0.9.2] - 31-05-2023
`@bigcapital/webapp`
- fixed: move `packaeg-lock.json` inside docker container.
- fixed: remove Sentry from the web client.
## [0.9.1] - 28-05-2023
`@bigcapital/server`

View File

@@ -7,6 +7,24 @@
<p align="center">
Simple, smart online accounting software for small and medium businesses.
</p>
<p align="center">
<a href="https://github.com/bigcapitalhq/bigcapital/commits/develop">
<img src="https://img.shields.io/github/commit-activity/m/bigcapitalhq/bigcapital/develop" />
</a>
<a href="https://discord.com/invite/c8nPBJafeb">
<img src="https://img.shields.io/discord/1066514716752625725?label=Discord" alt="" />
</a>
<a href="https://github.com/bigcapitalhq/bigcapital/graphs/contributors">
<img src="https://img.shields.io/github/contributors/bigcapitalhq/bigcapital" alt="" />
</a>
<a href="https://github.com/bigcapitalhq/bigcapital/blob/develop/LICENSE">
<img src="https://img.shields.io/github/license/bigcapitalhq/bigcapital" alt="" />
</a>
<a href="https://twitter.com/bigcapitalhq">
<img src="https://img.shields.io/twitter/follow/bigcapitalhq?style=social" alt="twitter" />
</a>
</p>
</p>
# What's Bigcapital?
@@ -22,9 +40,9 @@ Bigcapital is a smart and open-source accounting and inventory software, Bigcapi
# Resources
- [Documentation](https://docs.bigcapital.ly/) - Learn how to use.
- [Contribution](https://github.com/bigcapitalhq/bigcapital/blob/develop/CONTRIBUTING.md) - Welcome to any contributions.
- [Discord](https://discord.com/invite/c8nPBJafeb) - Ask for help.
- [Bug Tracker](https://github.com/bigcapitalhq/bigcapital/issues) - Notify us new bugs.
- [Source Code](https://github.com/bigcapitalhq/bigcapital) - Github repo.
# Changelog

View File

@@ -9,7 +9,6 @@ import events from '@/subscribers/events';
import UnitOfWork from '@/services/UnitOfWork';
import { EventPublisher } from '@/lib/EventPublisher/EventPublisher';
import { CommandExpenseValidator } from './CommandExpenseValidator';
import { ExpenseCategory } from 'models';
import HasTenancyService from '@/services/Tenancy/TenancyService';
@Service()
@@ -37,7 +36,7 @@ export class DeleteExpense {
expenseId: number,
authorizedUser: ISystemUser
): Promise<void> => {
const { Expense } = this.tenancy.models(tenantId);
const { Expense, ExpenseCategory } = this.tenancy.models(tenantId);
// Retrieves the expense transaction with associated entries or
// throw not found error.
@@ -60,7 +59,7 @@ export class DeleteExpense {
} as IExpenseDeletingPayload);
// Deletes expense associated entries.
await ExpenseCategory.query(trx).findById(expenseId).delete();
await ExpenseCategory.query(trx).where('expenseId', expenseId).delete();
// Deletes expense transactions.
await Expense.query(trx).findById(expenseId).delete();

View File

@@ -46,7 +46,7 @@ export class ExpenseGLEntries {
...commonEntry,
credit: expense.localAmount,
accountId: expense.paymentAccountId,
accountNormal: AccountNormal.CREDIT,
accountNormal: AccountNormal.DEBIT,
index: 1,
};
};

View File

@@ -1,7 +0,0 @@
// @ts-nocheck
import intl from 'react-intl-universal';
export default [
{ name: intl.get('decrement'), value: 'decrement' },
{ name: intl.get('increment'), value: 'increment' },
]

View File

@@ -4,30 +4,22 @@ import intl from 'react-intl-universal';
export const getFooterLinks = () => [
{
title: intl.get('blog'),
link: '#',
link: 'https://docs.bigcapital.ly/blog',
},
{
title: intl.get('community'),
link: 'https://discord.com/invite/c8nPBJafeb',
},
{
title: intl.get('support'),
link: '#',
},
{
title: intl.get('service_status'),
link: '#',
},
{
title: intl.get('pricing'),
link: '#',
},
{
title: intl.get('reseller_partner'),
link: '#',
link: 'https://discord.com/invite/c8nPBJafeb',
},
{
title: intl.get('docs'),
link: '#',
link: 'https://docs.bigcapital.ly',
},
{
title: 'Bigcapital',
link: 'http://bigcapital.ly',
}
]
},
];

View File

@@ -4,7 +4,6 @@ export * from './tableStyle';
export * from './features';
export * from './cellTypes';
export * from './classes';
export * from './adjustmentType';
export * from './cashflowOptions';
export const Align = { Left: 'left', Right: 'right', Center: 'center' };

View File

@@ -34,16 +34,17 @@ import {
toSafeNumber,
} from '@/utils';
import { Features, CLASSES } from '@/constants';
import adjustmentType from '@/constants/adjustmentType';
import { useInventoryAdjContext } from './InventoryAdjustmentFormProvider';
import { useFeatureCan } from '@/hooks/state';
import InventoryAdjustmentQuantityFields from './InventoryAdjustmentQuantityFields';
import {
diffQuantity,
useSetPrimaryBranchToForm,
useSetPrimaryWarehouseToForm,
useGetAdjustmentTypeOptions,
} from './utils';
import { useFeatureCan } from '@/hooks/state';
import InventoryAdjustmentQuantityFields from './InventoryAdjustmentQuantityFields';
/**
* Inventory adjustment form dialogs fields.
@@ -52,6 +53,9 @@ export default function InventoryAdjustmentFormDialogFields() {
// Features guard.
const { featureCan } = useFeatureCan();
// Retrieves memorized adjustment types options.
const adjustmentTypes = useGetAdjustmentTypeOptions();
const dateFieldRef = useAutofocus();
// Inventory adjustment dialog context.
@@ -149,7 +153,7 @@ export default function InventoryAdjustmentFormDialogFields() {
className={classNames(CLASSES.FILL, 'form-group--type')}
>
<ListSelect
items={adjustmentType}
items={adjustmentTypes}
onItemSelect={(type) => {
const result = diffQuantity(
toSafeNumber(values.quantity),

View File

@@ -1,5 +1,6 @@
// @ts-nocheck
import React from 'react';
import React, { useMemo } from 'react';
import intl from 'react-intl-universal';
import { useFormikContext } from 'formik';
import { useInventoryAdjContext } from './InventoryAdjustmentFormProvider';
import { first } from 'lodash';
@@ -48,3 +49,12 @@ export const useSetPrimaryBranchToForm = () => {
}
}, [isBranchesSuccess, setFieldValue, branches]);
};
export const getAdjustmentTypeOptions = () => [
{ name: intl.get('decrement'), value: 'decrement' },
{ name: intl.get('increment'), value: 'increment' },
];
export const useGetAdjustmentTypeOptions = () => {
return useMemo(() => getAdjustmentTypeOptions(), []);
};

View File

@@ -21,6 +21,7 @@ import {
FormattedMessage as T,
Can,
} from '@/components';
import { ItemDetailActionsMoreBtn } from './ItemDetailActionsMoreBtn';
import { compose } from '@/utils';
@@ -71,6 +72,7 @@ function ItemDetailActionsBar({
onClick={handleDeleteItem}
/>
</Can>
<ItemDetailActionsMoreBtn />
</NavbarGroup>
</DashboardActionsBar>
);

View File

@@ -0,0 +1,64 @@
// @ts-nocheck
import React from 'react';
import * as R from 'ramda';
import { Can, Icon, T } from '@/components';
import {
Button,
Menu,
MenuItem,
Popover,
PopoverInteractionKind,
Position,
} from '@blueprintjs/core';
import {
AbilitySubject,
InventoryAdjustmentAction,
} from '@/constants/abilityOption';
import { useItemDetailDrawerContext } from './ItemDetailDrawerProvider';
import withDialogActions from '@/containers/Dialog/withDialogActions';
/**
* Invoice details more actions menu.
* @returns {React.JSX}
*/
export const ItemDetailActionsMoreBtn = R.compose(withDialogActions)(
({
//#withDialogActions,
openDialog,
}) => {
const { itemId, item } = useItemDetailDrawerContext();
// Cannot continue if the item type is not inventory.
if (item.type !== 'inventory') return null;
const handleInventoryAdjustment = () => {
openDialog('inventory-adjustment', { itemId });
};
return (
<Popover
minimal={true}
interactionKind={PopoverInteractionKind.CLICK}
position={Position.BOTTOM_LEFT}
modifiers={{
offset: { offset: '0, 4' },
}}
content={
<Menu>
<Can
I={InventoryAdjustmentAction.Edit}
a={AbilitySubject.InventoryAdjustment}
>
<MenuItem
text={<T id={'item.view_drawer.make_adjustment'} />}
onClick={handleInventoryAdjustment}
/>
</Can>
</Menu>
}
>
<Button icon={<Icon icon="more-vert" iconSize={16} />} minimal={true} />
</Popover>
);
},
);

View File

@@ -1101,6 +1101,7 @@
"something_went_wrong": "Something went wrong!",
"blog": "Blog",
"support": "Support",
"community": "Community",
"service_status": "Service Status",
"pricing": "Pricing",
"reseller_partner": "Reseller Partner",

View File

@@ -1,5 +1,6 @@
// @ts-nocheck
export default {
INVENTORY_ADJUSTMENTS_TABLE_STATE_SET: 'INVENTORY_ADJUSTMENTS/TABLE_STATE_SET',
};
INVENTORY_ADJUSTMENTS_TABLE_STATE_SET:
'INVENTORY_ADJUSTMENTS/TABLE_STATE_SET',
};