mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: excluded bank transactions
This commit is contained in:
@@ -29,6 +29,7 @@ export class RecognizedBankTransaction extends TenantModel {
|
||||
static get relationMappings() {
|
||||
const UncategorizedCashflowTransaction = require('./UncategorizedCashflowTransaction');
|
||||
const Account = require('./Account');
|
||||
const { BankRule } = require('./BankRule');
|
||||
|
||||
return {
|
||||
/**
|
||||
@@ -54,6 +55,18 @@ export class RecognizedBankTransaction extends TenantModel {
|
||||
to: 'accounts.id',
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* Recognized bank transaction may belongs to bank rule.
|
||||
*/
|
||||
bankRule: {
|
||||
relation: Model.BelongsToOneRelation,
|
||||
modelClass: BankRule,
|
||||
join: {
|
||||
from: 'recognized_bank_transactions.bankRuleId',
|
||||
to: 'bank_rules.id',
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user