diff --git a/client/src/components/DataTableCells/CheckBoxFieldCell.js b/client/src/components/DataTableCells/CheckBoxFieldCell.js index 4cb58ffa1..15772baa2 100644 --- a/client/src/components/DataTableCells/CheckBoxFieldCell.js +++ b/client/src/components/DataTableCells/CheckBoxFieldCell.js @@ -11,7 +11,7 @@ const CheckboxEditableCell = ({ const [value, setValue] = React.useState(initialValue); const onChange = (e) => { - setValue(e.target.value); + setValue(e.target.checked); }; const onBlur = () => { payload.updateData(index, id, value); @@ -24,12 +24,13 @@ const CheckboxEditableCell = ({ return ( - category.amount && - category.index && - category.expense_account_id && - category.landed_cost, + category.amount && category.index && category.expense_account_id, ); const form = { diff --git a/client/src/containers/Expenses/ExpenseForm/utils.js b/client/src/containers/Expenses/ExpenseForm/utils.js index f9d8392c3..c926f9865 100644 --- a/client/src/containers/Expenses/ExpenseForm/utils.js +++ b/client/src/containers/Expenses/ExpenseForm/utils.js @@ -31,7 +31,7 @@ export const defaultExpenseEntry = { amount: '', expense_account_id: '', description: '', - landed_cost: false, + landed_cost: 0, }; export const defaultExpense = {