mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-14 20:00:33 +00:00
feat: auto recognize uncategorized transactions
This commit is contained in:
@@ -5,11 +5,19 @@ exports.up = function (knex) {
|
||||
table.string('name');
|
||||
table.integer('order').unsigned();
|
||||
|
||||
table.integer('apply_if_account_id').unsigned();
|
||||
table
|
||||
.integer('apply_if_account_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('accounts');
|
||||
table.string('apply_if_transaction_type');
|
||||
|
||||
table.string('assign_category');
|
||||
table.integer('assign_account_id').unsigned();
|
||||
table
|
||||
.integer('assign_account_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('accounts');
|
||||
table.string('assign_payee');
|
||||
table.string('assign_memo');
|
||||
|
||||
@@ -19,7 +27,11 @@ exports.up = function (knex) {
|
||||
})
|
||||
.createTable('bank_rule_conditions', (table) => {
|
||||
table.increments('id').primary();
|
||||
table.integer('rule_id').unsigned();
|
||||
table
|
||||
.integer('rule_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('bank_rules');
|
||||
table.string('field');
|
||||
table.string('comparator');
|
||||
table.string('value');
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('recognized_bank_transactions', (table) => {
|
||||
table.increments('id');
|
||||
table.integer('cashflow_transaction_id').unsigned();
|
||||
table.inteegr('bank_rule_id').unsigned();
|
||||
table
|
||||
.integer('cashflow_transaction_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('uncategorized_cashflow_transactions');
|
||||
table
|
||||
.integer('bank_rule_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('bank_rules');
|
||||
|
||||
table.string('assigned_category');
|
||||
table.integer('assigned_account_id').unsigned();
|
||||
table
|
||||
.integer('assigned_account_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('accounts');
|
||||
table.string('assigned_payee');
|
||||
table.string('assigned_memo');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user