feat: Receivable and payable aging summary financial statement.

This commit is contained in:
Ahmed Bouhuolia
2020-06-11 22:05:34 +02:00
parent 55a4319827
commit 4d1dd14f8d
36 changed files with 1435 additions and 195 deletions

View File

@@ -3,6 +3,7 @@ exports.up = (knex) => {
return knex.schema.createTable('account_types', (table) => {
table.increments();
table.string('name');
table.string('key');
table.string('normal');
table.string('root_type');
table.boolean('balance_sheet');

View File

@@ -7,6 +7,7 @@ exports.up = function (knex) {
table.integer('resource_id').unsigned().references('id').inTable('resources');
table.boolean('favourite');
table.string('roles_logic_expression');
table.timestamps();
}).raw('ALTER TABLE `VIEWS` AUTO_INCREMENT = 1000').then(() => {
return knex.seed.run({
specific: 'seed_views.js',

View File

@@ -8,6 +8,8 @@ exports.up = function(knex) {
table.string('reference_type');
table.integer('reference_id');
table.integer('account_id').unsigned();
table.string('contact_type').nullable();
table.integer('contact_id').unsigned().nullable();
table.string('note');
table.boolean('draft').defaultTo(false);
table.integer('user_id').unsigned();

View File

@@ -4,6 +4,7 @@ exports.up = function(knex) {
table.increments();
table.string('currency_name');
table.string('currency_code', 4);
table.timestamps();
}).raw('ALTER TABLE `CURRENCIES` AUTO_INCREMENT = 1000');
};

View File

@@ -5,6 +5,7 @@ exports.up = function(knex) {
table.string('currency_code', 4);
table.decimal('exchange_rate');
table.date('date');
table.timestamps();
}).raw('ALTER TABLE `EXCHANGE_RATES` AUTO_INCREMENT = 1000');
};

View File

@@ -34,6 +34,7 @@ exports.up = function(knex) {
table.text('note');
table.boolean('active').defaultTo(true);
table.timestamps();
});
};

View File

@@ -34,6 +34,8 @@ exports.up = function(knex) {
table.text('note');
table.boolean('active').defaultTo(true);
table.timestamps();
});
};