mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat(ManualJournals): Auto-increment.
fix(BillPayment): Validate the opened payment bills. fix(redux): presist redux state. fix(useRequestQuery): hook.
This commit is contained in:
@@ -104,7 +104,7 @@ export default class ManualJournalsController extends BaseController {
|
||||
return [
|
||||
check('date').exists().isISO8601(),
|
||||
check('journal_number')
|
||||
.exists()
|
||||
.optional()
|
||||
.isString()
|
||||
.trim()
|
||||
.escape()
|
||||
@@ -470,6 +470,15 @@ export default class ManualJournalsController extends BaseController {
|
||||
errors: [{ type: 'MANUAL_JOURNAL_ALREADY_PUBLISHED', code: 900 }],
|
||||
});
|
||||
}
|
||||
if (error.errorType === 'MANUAL_JOURNAL_NO_REQUIRED') {
|
||||
return res.boom.badRequest('', {
|
||||
errors: [{
|
||||
type: 'MANUAL_JOURNAL_NO_REQUIRED',
|
||||
message: 'The manual journal number required.',
|
||||
code: 1000
|
||||
}],
|
||||
});
|
||||
}
|
||||
}
|
||||
next(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user