summaryrefslogtreecommitdiff
path: root/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'src/services')
-rw-r--r--src/services/transfers/TransferForm.tsx1
-rw-r--r--src/services/types.ts1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/services/transfers/TransferForm.tsx b/src/services/transfers/TransferForm.tsx
index a10630a..6092aa8 100644
--- a/src/services/transfers/TransferForm.tsx
+++ b/src/services/transfers/TransferForm.tsx
@@ -16,6 +16,7 @@ const TransferForm: React.FC<FormikProps<Transfer>> = ({ setFieldValue, values }
if (!values.date) setFieldValue('date', moment().format('YYYY-MM-DD'));
if (!values.contractorId && contractors?.length) setFieldValue('contractorId', contractors[0]._id);
+ if (!values.accountId && accounts?.length) setFieldValue('accountId', accounts[0]._id);
return (
<Form id="form">
diff --git a/src/services/types.ts b/src/services/types.ts
index 228bc4d..5c0ba55 100644
--- a/src/services/types.ts
+++ b/src/services/types.ts
@@ -28,6 +28,7 @@ export interface Transfer extends BaseModel {
date: string;
operation: 'in' | 'out';
contractorId: string;
+ accountId: string;
amount: number;
contractor?: Contractor;
}