This commit is contained in:
Ahmed Bouhuolia
2020-03-16 00:06:15 +02:00
parent 56701951b7
commit 73711384f6
7925 changed files with 18478 additions and 959 deletions

View File

@@ -52,7 +52,10 @@ export default {
code: 'validation_error', ...validationErrors,
});
}
const form = { ...req.body };
const form = {
date: new Date(),
...req.body,
};
const errorReasons = [];
let totalCredit = 0;
let totalDebit = 0;
@@ -98,6 +101,7 @@ export default {
const account = accounts.find((a) => a.id === entry.account_id);
const jouranlEntry = new JournalEntry({
date: entry.date,
debit: entry.debit,
credit: entry.credit,
account: account.id,