Compare commits

..

15 Commits

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

View File

@@ -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

View File

@@ -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
};

View File

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

View File

@@ -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;

View File

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

View File

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

View File

@@ -57,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>
);

View File

@@ -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', {

View File

@@ -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>
)}

View File

@@ -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,
});
}

View File

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

View File

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

View File

@@ -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": "تاريخ الاسترجاع",
@@ -1989,7 +1991,6 @@
"payment_made_form.label.total": "إجمالي",
"make_journal.label.subtotal": "المجموع",
"make_journal.label.total": "إجمالي",
"make_journal.label.select_journal_type":"حدد نوع القيد",
"expense.label.subtotal": "المجموع",
"expense.label.total": "إجمالي",
"expense.branch_button.label": "الفرع: {label}",

View File

@@ -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",
@@ -1293,11 +1292,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 +1323,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 +1584,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",
@@ -1989,7 +1991,6 @@
"payment_made.form.internal_note.placeholder": "Internal note (Not visible to the vendor).",
"make_journal.label.subtotal": "Subtotal",
"make_journal.label.total": "TOTAL",
"make_journal.label.select_journal_type":"Select Journal Type",
"expense.label.subtotal": "Subtotal",
"expense.label.total": "TOTAL",
"expense.branch_button.label": "Branch: {label}",