mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
feat: validate the matched linked transacation on deleting.
This commit is contained in:
@@ -23,11 +23,9 @@ export class BankTransactionsMatchingController extends BaseController {
|
||||
'/:transactionId',
|
||||
[
|
||||
param('transactionId').exists(),
|
||||
|
||||
body('matchedTransactions').isArray({ min: 1 }),
|
||||
body('matchedTransactions.*.reference_type').exists(),
|
||||
body('matchedTransactions.*.reference_id').isNumeric().toInt(),
|
||||
body('matchedTransactions.*.amount').exists().isNumeric().toFloat(),
|
||||
],
|
||||
this.validationResult,
|
||||
this.matchBankTransaction.bind(this)
|
||||
|
||||
@@ -50,6 +50,8 @@ export class BankingRulesController extends BaseController {
|
||||
body('assign_account_id').isInt({ min: 0 }),
|
||||
body('assign_payee').isString().optional({ nullable: true }),
|
||||
body('assign_memo').isString().optional({ nullable: true }),
|
||||
|
||||
body('recognition').isBoolean().toBoolean().optional({ nullable: true }),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user