mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
feat: checkbox show negative in red.
This commit is contained in:
@@ -115,6 +115,19 @@ export default function NumberFormatFields({
|
|||||||
</FormGroup>
|
</FormGroup>
|
||||||
)}
|
)}
|
||||||
</FastField>
|
</FastField>
|
||||||
|
{/*------------ show negative in red-----------*/}
|
||||||
|
<FastField name={'show_in_red'} type={'checkbox'}>
|
||||||
|
{({ field }) => (
|
||||||
|
<FormGroup inline={true}>
|
||||||
|
<Checkbox
|
||||||
|
inline={true}
|
||||||
|
label={<T id={'show_negative_in_red'} />}
|
||||||
|
name={'show_in_red'}
|
||||||
|
{...field}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
)}
|
||||||
|
</FastField>
|
||||||
{/*------------ Divide on 1000 -----------*/}
|
{/*------------ Divide on 1000 -----------*/}
|
||||||
<FastField name={'divide_on_1000'} type={'checkbox'}>
|
<FastField name={'divide_on_1000'} type={'checkbox'}>
|
||||||
{({ field }) => (
|
{({ field }) => (
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { defaultTo } from 'lodash';
|
|||||||
const Schema = Yup.object().shape({
|
const Schema = Yup.object().shape({
|
||||||
format_money: Yup.string(),
|
format_money: Yup.string(),
|
||||||
show_zero: Yup.boolean(),
|
show_zero: Yup.boolean(),
|
||||||
|
show_in_red: Yup.boolean(),
|
||||||
divide_on_1000: Yup.boolean(),
|
divide_on_1000: Yup.boolean(),
|
||||||
negative_format: Yup.string(),
|
negative_format: Yup.string(),
|
||||||
precision: Yup.string(),
|
precision: Yup.string(),
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ function NumberFormats() {
|
|||||||
() => ({
|
() => ({
|
||||||
format_money: '',
|
format_money: '',
|
||||||
show_zero: '',
|
show_zero: '',
|
||||||
|
show_in_red: '',
|
||||||
divide_on_1000: '',
|
divide_on_1000: '',
|
||||||
negative_format: '',
|
negative_format: '',
|
||||||
precision: '',
|
precision: '',
|
||||||
@@ -21,8 +22,7 @@ function NumberFormats() {
|
|||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
// Handle cancel button click.
|
// Handle cancel button click.
|
||||||
const handleCancelClick = useCallback(() => {
|
const handleCancelClick = useCallback(() => {}, []);
|
||||||
}, []);
|
|
||||||
|
|
||||||
// Handle form submit.
|
// Handle form submit.
|
||||||
const handleFormSubmit = (values, { setSubmitting }) => {
|
const handleFormSubmit = (values, { setSubmitting }) => {
|
||||||
|
|||||||
@@ -961,6 +961,7 @@ export default {
|
|||||||
qty: 'Quantity on hand',
|
qty: 'Quantity on hand',
|
||||||
money_format: 'Money format',
|
money_format: 'Money format',
|
||||||
show_zero: 'Show zero',
|
show_zero: 'Show zero',
|
||||||
|
show_negative_in_red: 'Show negative in red',
|
||||||
divide_on_1000: 'Divide on 1000',
|
divide_on_1000: 'Divide on 1000',
|
||||||
negative_format: 'Negative format',
|
negative_format: 'Negative format',
|
||||||
decimal_places: 'Decimal places',
|
decimal_places: 'Decimal places',
|
||||||
|
|||||||
Reference in New Issue
Block a user