mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: Receivable and payable aging summary financial statement.
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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');
|
||||
};
|
||||
|
||||
|
||||
@@ -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');
|
||||
};
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ exports.up = function(knex) {
|
||||
|
||||
table.text('note');
|
||||
table.boolean('active').defaultTo(true);
|
||||
table.timestamps();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ exports.up = function(knex) {
|
||||
|
||||
table.text('note');
|
||||
table.boolean('active').defaultTo(true);
|
||||
|
||||
table.timestamps();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 1,
|
||||
name: 'Fixed Asset',
|
||||
key: 'fixed_asset',
|
||||
normal: 'debit',
|
||||
root_type: 'asset',
|
||||
balance_sheet: true,
|
||||
@@ -16,6 +17,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 2,
|
||||
name: 'Current Asset',
|
||||
key: 'current_asset',
|
||||
normal: 'debit',
|
||||
root_type: 'asset',
|
||||
balance_sheet: true,
|
||||
@@ -24,6 +26,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 3,
|
||||
name: 'Long Term Liability',
|
||||
key: 'long_term_liability',
|
||||
normal: 'credit',
|
||||
root_type: 'liability',
|
||||
balance_sheet: false,
|
||||
@@ -32,6 +35,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 4,
|
||||
name: 'Current Liability',
|
||||
key: 'current_liability',
|
||||
normal: 'credit',
|
||||
root_type: 'liability',
|
||||
balance_sheet: false,
|
||||
@@ -40,6 +44,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 5,
|
||||
name: 'Equity',
|
||||
key: 'equity',
|
||||
normal: 'credit',
|
||||
root_type: 'equity',
|
||||
balance_sheet: true,
|
||||
@@ -48,6 +53,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 6,
|
||||
name: 'Expense',
|
||||
key: 'expense',
|
||||
normal: 'debit',
|
||||
root_type: 'expense',
|
||||
balance_sheet: false,
|
||||
@@ -56,6 +62,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 7,
|
||||
name: 'Income',
|
||||
key: 'income',
|
||||
normal: 'credit',
|
||||
root_type: 'income',
|
||||
balance_sheet: false,
|
||||
@@ -64,6 +71,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 8,
|
||||
name: 'Accounts Receivable',
|
||||
key: 'accounts_receivable',
|
||||
normal: 'debit',
|
||||
root_type: 'asset',
|
||||
balance_sheet: true,
|
||||
@@ -72,6 +80,7 @@ exports.seed = (knex) => {
|
||||
{
|
||||
id: 9,
|
||||
name: 'Accounts Payable',
|
||||
key: 'accounts_payable',
|
||||
normal: 'credit',
|
||||
root_type: 'liability',
|
||||
balance_sheet: true,
|
||||
|
||||
@@ -103,7 +103,29 @@ exports.seed = (knex) => {
|
||||
active: 1,
|
||||
index: 1,
|
||||
predefined: 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: 'Accounts Receivable',
|
||||
account_type_id: 8,
|
||||
parent_account_id: null,
|
||||
code: '1000',
|
||||
description: '',
|
||||
active: 1,
|
||||
index: 1,
|
||||
predefined: 1,
|
||||
},
|
||||
{
|
||||
id: 11,
|
||||
name: 'Accounts Payable',
|
||||
account_type_id: 9,
|
||||
parent_account_id: null,
|
||||
code: '1000',
|
||||
description: '',
|
||||
active: 1,
|
||||
index: 1,
|
||||
predefined: 1,
|
||||
},
|
||||
]);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user