mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eff8b41720 | ||
|
|
632cc3d72e | ||
|
|
3e437a041c | ||
|
|
e783cfeafa | ||
|
|
5dde7f5584 | ||
|
|
8e0911ec85 | ||
|
|
7b4afd3859 | ||
|
|
590715037b |
@@ -84,7 +84,7 @@ LEMONSQUEEZY_STORE_ID=
|
|||||||
LEMONSQUEEZY_WEBHOOK_SECRET=
|
LEMONSQUEEZY_WEBHOOK_SECRET=
|
||||||
|
|
||||||
# S3 documents and attachments
|
# S3 documents and attachments
|
||||||
S3_REGION=
|
S3_REGION=US
|
||||||
S3_ACCESS_KEY_ID=
|
S3_ACCESS_KEY_ID=
|
||||||
S3_SECRET_ACCESS_KEY=
|
S3_SECRET_ACCESS_KEY=
|
||||||
S3_ENDPOINT=
|
S3_ENDPOINT=
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
|
|
||||||
All notable changes to Bigcapital server-side will be in this file.
|
All notable changes to Bigcapital server-side will be in this file.
|
||||||
|
|
||||||
|
## [v0.17.5] - 17-06-2024
|
||||||
|
|
||||||
|
* fix: Balance sheet and P/L nested accounts by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/501
|
||||||
|
* fix: add space between buttons on floating actions bar by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/508
|
||||||
|
* feat: Migrating to Envoy proxy instead of Nginx by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/509
|
||||||
|
* fix: Disable email confirmation does not work with invited users by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/497
|
||||||
|
* feat: Setting up the date format in the whole system dates by @abouolia in https://github.com/bigcapitalhq/bigcapital/pull/506
|
||||||
|
|
||||||
## [0.17.0] - 04-06-2024
|
## [0.17.0] - 04-06-2024
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
exports.up = function (knex) {
|
||||||
|
return knex.schema.table('settings', (table) => {
|
||||||
|
table.text('value').alter();
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = (knex) => {
|
||||||
|
return knex.schema.table('settings', (table) => {
|
||||||
|
table.string('value').alter();
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -50,8 +50,8 @@ export class JournalSheetTable extends R.compose(
|
|||||||
{ key: 'description', accessor: 'entry.note' },
|
{ key: 'description', accessor: 'entry.note' },
|
||||||
{ key: 'account_code', accessor: 'entry.accountCode' },
|
{ key: 'account_code', accessor: 'entry.accountCode' },
|
||||||
{ key: 'account_name', accessor: 'entry.accountName' },
|
{ key: 'account_name', accessor: 'entry.accountName' },
|
||||||
{ key: 'credit', accessor: 'entry.formattedCredit' },
|
|
||||||
{ key: 'debit', accessor: 'entry.formattedDebit' },
|
{ key: 'debit', accessor: 'entry.formattedDebit' },
|
||||||
|
{ key: 'credit', accessor: 'entry.formattedCredit' },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@ export class JournalSheetTable extends R.compose(
|
|||||||
{ key: 'description', accessor: 'note' },
|
{ key: 'description', accessor: 'note' },
|
||||||
{ key: 'account_code', accessor: 'accountCode' },
|
{ key: 'account_code', accessor: 'accountCode' },
|
||||||
{ key: 'account_name', accessor: 'accountName' },
|
{ key: 'account_name', accessor: 'accountName' },
|
||||||
{ key: 'credit', accessor: 'formattedCredit' },
|
|
||||||
{ key: 'debit', accessor: 'formattedDebit' },
|
{ key: 'debit', accessor: 'formattedDebit' },
|
||||||
|
{ key: 'credit', accessor: 'formattedCredit' },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -84,8 +84,8 @@ export class JournalSheetTable extends R.compose(
|
|||||||
{ key: 'description', accessor: '_empty_' },
|
{ key: 'description', accessor: '_empty_' },
|
||||||
{ key: 'account_code', accessor: '_empty_' },
|
{ key: 'account_code', accessor: '_empty_' },
|
||||||
{ key: 'account_name', accessor: '_empty_' },
|
{ key: 'account_name', accessor: '_empty_' },
|
||||||
{ key: 'credit', accessor: 'formattedCredit' },
|
|
||||||
{ key: 'debit', accessor: 'formattedDebit' },
|
{ key: 'debit', accessor: 'formattedDebit' },
|
||||||
|
{ key: 'credit', accessor: 'formattedCredit' },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -101,8 +101,8 @@ export class JournalSheetTable extends R.compose(
|
|||||||
{ key: 'description', value: '' },
|
{ key: 'description', value: '' },
|
||||||
{ key: 'account_code', value: '' },
|
{ key: 'account_code', value: '' },
|
||||||
{ key: 'account_name', value: '' },
|
{ key: 'account_name', value: '' },
|
||||||
{ key: 'credit', value: '' },
|
|
||||||
{ key: 'debit', value: '' },
|
{ key: 'debit', value: '' },
|
||||||
|
{ key: 'credit', value: '' },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -118,8 +118,8 @@ export class JournalSheetTable extends R.compose(
|
|||||||
{ key: 'description', label: 'Description' },
|
{ key: 'description', label: 'Description' },
|
||||||
{ key: 'account_code', label: 'Acc. Code' },
|
{ key: 'account_code', label: 'Acc. Code' },
|
||||||
{ key: 'account_name', label: 'Account' },
|
{ key: 'account_name', label: 'Account' },
|
||||||
{ key: 'credit', label: 'Credit' },
|
|
||||||
{ key: 'debit', label: 'Debit' },
|
{ key: 'debit', label: 'Debit' },
|
||||||
|
{ key: 'credit', label: 'Credit' },
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,16 +111,16 @@ export const useJournalTableEntriesColumns = () => {
|
|||||||
fieldProps: { allowCreate: true },
|
fieldProps: { allowCreate: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: CreditHeaderCell,
|
Header: DebitHeaderCell,
|
||||||
accessor: 'credit',
|
accessor: 'debit',
|
||||||
Cell: MoneyFieldCell,
|
Cell: MoneyFieldCell,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
align: Align.Right,
|
align: Align.Right,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Header: DebitHeaderCell,
|
Header: CreditHeaderCell,
|
||||||
accessor: 'debit',
|
accessor: 'credit',
|
||||||
Cell: MoneyFieldCell,
|
Cell: MoneyFieldCell,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
width: 100,
|
width: 100,
|
||||||
|
|||||||
@@ -26,6 +26,14 @@ export const useAccountReadEntriesColumns = () => {
|
|||||||
width: 100,
|
width: 100,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Header: intl.get('debit'),
|
||||||
|
accessor: isFCYCurrencyType ? 'formatted_fc_debit' : 'formatted_debit',
|
||||||
|
width: 80,
|
||||||
|
className: 'debit',
|
||||||
|
align: 'right',
|
||||||
|
textOverview: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Header: intl.get('credit'),
|
Header: intl.get('credit'),
|
||||||
accessor: isFCYCurrencyType
|
accessor: isFCYCurrencyType
|
||||||
@@ -36,14 +44,6 @@ export const useAccountReadEntriesColumns = () => {
|
|||||||
align: 'right',
|
align: 'right',
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Header: intl.get('debit'),
|
|
||||||
accessor: isFCYCurrencyType ? 'formatted_fc_debit' : 'formatted_debit',
|
|
||||||
width: 80,
|
|
||||||
className: 'debit',
|
|
||||||
align: 'right',
|
|
||||||
textOverview: true,
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
[isFCYCurrencyType],
|
[isFCYCurrencyType],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -82,20 +82,6 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
: []),
|
: []),
|
||||||
{
|
|
||||||
Header: intl.get('credit'),
|
|
||||||
accessor: 'credit',
|
|
||||||
Cell: FormatNumberCell,
|
|
||||||
width: getColumnWidth(entries, 'credit', {
|
|
||||||
minWidth: 60,
|
|
||||||
magicSpacing: 5,
|
|
||||||
}),
|
|
||||||
disableResizable: true,
|
|
||||||
disableSortBy: true,
|
|
||||||
textOverview: true,
|
|
||||||
formatNumber: { noZero: true },
|
|
||||||
align: 'right',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Header: intl.get('debit'),
|
Header: intl.get('debit'),
|
||||||
accessor: 'debit',
|
accessor: 'debit',
|
||||||
@@ -110,6 +96,20 @@ export const useManualJournalEntriesColumns = () => {
|
|||||||
formatNumber: { noZero: true },
|
formatNumber: { noZero: true },
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Header: intl.get('credit'),
|
||||||
|
accessor: 'credit',
|
||||||
|
Cell: FormatNumberCell,
|
||||||
|
width: getColumnWidth(entries, 'credit', {
|
||||||
|
minWidth: 60,
|
||||||
|
magicSpacing: 5,
|
||||||
|
}),
|
||||||
|
disableResizable: true,
|
||||||
|
disableSortBy: true,
|
||||||
|
textOverview: true,
|
||||||
|
formatNumber: { noZero: true },
|
||||||
|
align: 'right',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,14 +25,6 @@ export const useGLEntriesTableColumns = () => {
|
|||||||
width: 140,
|
width: 140,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
Header: intl.get('credit'),
|
|
||||||
accessor: ({ credit }) => credit.formatted_amount,
|
|
||||||
width: 100,
|
|
||||||
className: 'credit',
|
|
||||||
align: 'right',
|
|
||||||
textOverview: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Header: intl.get('debit'),
|
Header: intl.get('debit'),
|
||||||
accessor: ({ debit }) => debit.formatted_amount,
|
accessor: ({ debit }) => debit.formatted_amount,
|
||||||
@@ -41,6 +33,14 @@ export const useGLEntriesTableColumns = () => {
|
|||||||
textOverview: true,
|
textOverview: true,
|
||||||
align: 'right',
|
align: 'right',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Header: intl.get('credit'),
|
||||||
|
accessor: ({ credit }) => credit.formatted_amount,
|
||||||
|
width: 100,
|
||||||
|
className: 'credit',
|
||||||
|
align: 'right',
|
||||||
|
textOverview: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -70,6 +70,17 @@ export const defaultInvoice = {
|
|||||||
attachments: [],
|
attachments: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Invoice entry request schema.
|
||||||
|
export const defaultReqInvoiceEntry = {
|
||||||
|
index: 0,
|
||||||
|
item_id: '',
|
||||||
|
rate: '',
|
||||||
|
discount: '',
|
||||||
|
quantity: '',
|
||||||
|
description: '',
|
||||||
|
tax_rate_id: '',
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transform invoice to initial values in edit mode.
|
* Transform invoice to initial values in edit mode.
|
||||||
*/
|
*/
|
||||||
@@ -175,13 +186,27 @@ export const ITEMS_FILTER_ROLES_QUERY = JSON.stringify([
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transformes bill entries to submit request.
|
||||||
|
*/
|
||||||
|
const transformEntriesToRequest = (entries) => {
|
||||||
|
return R.compose(
|
||||||
|
R.map(R.compose(R.curry(transformToForm)(R.__, defaultReqInvoiceEntry))),
|
||||||
|
filterNonZeroEntries,
|
||||||
|
)(entries);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filters the givne non-zero entries.
|
||||||
|
*/
|
||||||
|
const filterNonZeroEntries = (entries) => {
|
||||||
|
return entries.filter((item) => item.item_id && item.quantity);
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transformes the form values to request body values.
|
* Transformes the form values to request body values.
|
||||||
*/
|
*/
|
||||||
export function transformValueToRequest(values) {
|
export function transformValueToRequest(values) {
|
||||||
const entries = values.entries.filter(
|
|
||||||
(item) => item.item_id && item.quantity,
|
|
||||||
);
|
|
||||||
return {
|
return {
|
||||||
...omit(values, [
|
...omit(values, [
|
||||||
'invoice_no',
|
'invoice_no',
|
||||||
@@ -194,9 +219,7 @@ export function transformValueToRequest(values) {
|
|||||||
invoice_no: values.invoice_no,
|
invoice_no: values.invoice_no,
|
||||||
}),
|
}),
|
||||||
is_inclusive_tax: values.inclusive_exclusive_tax === TaxType.Inclusive,
|
is_inclusive_tax: values.inclusive_exclusive_tax === TaxType.Inclusive,
|
||||||
entries: entries.map((entry) => ({
|
entries: transformEntriesToRequest(values.entries),
|
||||||
...omit(entry, ['amount', 'tax_amount', 'tax_rate']),
|
|
||||||
})),
|
|
||||||
delivered: false,
|
delivered: false,
|
||||||
attachments: transformAttachmentsToRequest(values),
|
attachments: transformAttachmentsToRequest(values),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user