mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 12:20:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import * as Yup from 'yup';
|
||||
import intl from 'react-intl-universal';
|
||||
import { DATATYPES_LENGTH } from 'common/dataTypes';
|
||||
|
||||
const Schema = Yup.object().shape({
|
||||
date: Yup.date().required().label(intl.get('date')),
|
||||
type: Yup.string().required(),
|
||||
adjustment_account_id: Yup.string()
|
||||
.required()
|
||||
.label(intl.get('adjustment_account')),
|
||||
item_id: Yup.number().required(),
|
||||
reason: Yup.string()
|
||||
.required()
|
||||
.min(3)
|
||||
.max(DATATYPES_LENGTH.TEXT)
|
||||
.label(intl.get('reason')),
|
||||
quantity_on_hand: Yup.number().required().label(intl.get('qty')),
|
||||
quantity: Yup.number().integer().min(1).required(),
|
||||
cost: Yup.number().when(['type'], {
|
||||
is: (type) => type === 'increment',
|
||||
then: Yup.number().required(),
|
||||
}),
|
||||
reference_no: Yup.string(),
|
||||
new_quantity: Yup.number().required(),
|
||||
publish: Yup.boolean(),
|
||||
});
|
||||
|
||||
export const CreateInventoryAdjustmentFormSchema = Schema;
|
||||
Reference in New Issue
Block a user