mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
fix: inventory adjustment cost out of range.
This commit is contained in:
@@ -83,7 +83,7 @@ export function useCustomersTableColumns() {
|
|||||||
Header: '',
|
Header: '',
|
||||||
accessor: AvatarCell,
|
accessor: AvatarCell,
|
||||||
className: 'avatar',
|
className: 'avatar',
|
||||||
width: 50,
|
width: 45,
|
||||||
disableResizing: true,
|
disableResizing: true,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import { FormattedMessage as T } from 'components';
|
|||||||
import withDialogActions from 'containers/Dialog/withDialogActions';
|
import withDialogActions from 'containers/Dialog/withDialogActions';
|
||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Currency dialog form footer action.
|
||||||
|
*/
|
||||||
function CurrencyFormFooter({
|
function CurrencyFormFooter({
|
||||||
// #withDialogActions
|
// #withDialogActions
|
||||||
closeDialog,
|
closeDialog,
|
||||||
@@ -23,10 +26,10 @@ function CurrencyFormFooter({
|
|||||||
return (
|
return (
|
||||||
<div className={Classes.DIALOG_FOOTER}>
|
<div className={Classes.DIALOG_FOOTER}>
|
||||||
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
<div className={Classes.DIALOG_FOOTER_ACTIONS}>
|
||||||
<Button onClick={handleClose}>
|
<Button onClick={handleClose} disabled={isSubmitting}>
|
||||||
<T id={'cancel'} />
|
<T id={'cancel'} />
|
||||||
</Button>
|
</Button>
|
||||||
<Button intent={Intent.PRIMARY} type="submit" disabled={isSubmitting}>
|
<Button intent={Intent.PRIMARY} type="submit" loading={isSubmitting}>
|
||||||
{!isEditMode ? <T id={'submit'} /> : <T id={'edit'} />}
|
{!isEditMode ? <T id={'submit'} /> : <T id={'edit'} />}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const accountNameMapper = (column) => ({
|
|||||||
accessor: 'cells[0].value',
|
accessor: 'cells[0].value',
|
||||||
className: 'account_name',
|
className: 'account_name',
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
width: 240,
|
width: 400,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -25,7 +25,10 @@ const dateRangeMapper = (data, index, column) => ({
|
|||||||
Header: column.label,
|
Header: column.label,
|
||||||
key: column.key,
|
key: column.key,
|
||||||
accessor: `cells[${index}].value`,
|
accessor: `cells[${index}].value`,
|
||||||
width: getColumnWidth(data, `cells.${index}.value`, { minWidth: 100 }),
|
width: getColumnWidth(data, `cells.${index}.value`, {
|
||||||
|
magicSpacing: 10,
|
||||||
|
minWidth: 100,
|
||||||
|
}),
|
||||||
className: `date-period ${column.key}`,
|
className: `date-period ${column.key}`,
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
@@ -41,7 +44,10 @@ const totalMapper = (data, index, column) => ({
|
|||||||
className: 'total',
|
className: 'total',
|
||||||
textOverview: true,
|
textOverview: true,
|
||||||
Cell: CellTextSpan,
|
Cell: CellTextSpan,
|
||||||
width: getColumnWidth(data, `cells[${index}].value`, { minWidth: 100 }),
|
width: getColumnWidth(data, `cells[${index}].value`, {
|
||||||
|
magicSpacing: 10,
|
||||||
|
minWidth: 100,
|
||||||
|
}),
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,22 @@
|
|||||||
|
|
||||||
exports.up = function (knex) {
|
exports.up = function (knex) {
|
||||||
return knex.schema.createTable('inventory_adjustments_entries', table => {
|
return knex.schema.createTable('inventory_adjustments_entries', (table) => {
|
||||||
table.increments();
|
table.increments();
|
||||||
table.integer('adjustment_id').unsigned().index().references('id').inTable('inventory_adjustments');
|
table
|
||||||
|
.integer('adjustment_id')
|
||||||
|
.unsigned()
|
||||||
|
.index()
|
||||||
|
.references('id')
|
||||||
|
.inTable('inventory_adjustments');
|
||||||
table.integer('index').unsigned();
|
table.integer('index').unsigned();
|
||||||
table.integer('item_id').unsigned().index().references('id').inTable('items');
|
table
|
||||||
|
.integer('item_id')
|
||||||
|
.unsigned()
|
||||||
|
.index()
|
||||||
|
.references('id')
|
||||||
|
.inTable('items');
|
||||||
table.integer('quantity');
|
table.integer('quantity');
|
||||||
table.decimal('cost').unsigned();
|
table.decimal('cost', 13, 3).unsigned();
|
||||||
table.decimal('value').unsigned();
|
table.decimal('value', 13, 3).unsigned();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user