mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(Journals): sync posting datetime with jorunal entries.
This commit is contained in:
@@ -15,9 +15,12 @@ exports.up = function(knex) {
|
||||
table.integer('item_id').unsigned().nullable().index();
|
||||
table.string('note');
|
||||
table.integer('user_id').unsigned().index();
|
||||
table.integer('index').unsigned();
|
||||
|
||||
table.integer('index_group').unsigned().index();
|
||||
table.integer('index').unsigned().index();
|
||||
|
||||
table.date('date').index();
|
||||
table.timestamps();
|
||||
table.datetime('created_at').index();
|
||||
}).raw('ALTER TABLE `ACCOUNTS_TRANSACTIONS` AUTO_INCREMENT = 1000');
|
||||
};
|
||||
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
const { knexSnakeCaseMappers } = require("objection");
|
||||
const { knexSnakeCaseMappers } = require('objection');
|
||||
|
||||
exports.up = function(knex) {
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('payment_receives', (table) => {
|
||||
table.increments();
|
||||
table.integer('customer_id').unsigned().index().references('id').inTable('contacts');
|
||||
table
|
||||
.integer('customer_id')
|
||||
.unsigned()
|
||||
.index()
|
||||
.references('id')
|
||||
.inTable('contacts');
|
||||
table.date('payment_date').index();
|
||||
table.decimal('amount', 13, 3).defaultTo(0);
|
||||
table.string('currency_code', 3);
|
||||
table.string('reference_no').index();
|
||||
table.integer('deposit_account_id').unsigned().references('id').inTable('accounts');
|
||||
table
|
||||
.integer('deposit_account_id')
|
||||
.unsigned()
|
||||
.references('id')
|
||||
.inTable('accounts');
|
||||
table.string('payment_receive_no').nullable();
|
||||
table.text('statement');
|
||||
table.integer('user_id').unsigned().index();
|
||||
@@ -16,6 +25,6 @@ exports.up = function(knex) {
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
exports.down = function (knex) {
|
||||
return knex.schema.dropTableIfExists('payment_receives');
|
||||
};
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('inventory_transactions', table => {
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('inventory_transactions', (table) => {
|
||||
table.increments('id');
|
||||
table.date('date').index();
|
||||
|
||||
table.string('direction').index();
|
||||
|
||||
table.integer('item_id').unsigned().index().references('id').inTable('items');
|
||||
table
|
||||
.integer('item_id')
|
||||
.unsigned()
|
||||
.index()
|
||||
.references('id')
|
||||
.inTable('items');
|
||||
table.integer('quantity').unsigned();
|
||||
table.decimal('rate', 13, 3).unsigned();
|
||||
|
||||
table.integer('lot_number').index();
|
||||
table.integer('cost_account_id').unsigned().index().references('id').inTable('accounts');
|
||||
|
||||
table.string('transaction_type').index();
|
||||
table.integer('transaction_id').unsigned().index();
|
||||
|
||||
@@ -21,6 +20,4 @@ exports.up = function(knex) {
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
|
||||
};
|
||||
exports.down = function (knex) {};
|
||||
|
||||
@@ -11,6 +11,10 @@ exports.up = function(knex) {
|
||||
table.integer('discount').unsigned();
|
||||
table.integer('quantity').unsigned();
|
||||
table.integer('rate').unsigned();
|
||||
|
||||
table.integer('sell_account_id').unsigned().references('id').inTable('accounts');
|
||||
table.integer('cost_account_id').unsigned().references('id').inTable('accounts');
|
||||
|
||||
table.timestamps();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('inventory_cost_lot_tracker', table => {
|
||||
exports.up = function (knex) {
|
||||
return knex.schema.createTable('inventory_cost_lot_tracker', (table) => {
|
||||
table.increments();
|
||||
table.date('date').index();
|
||||
table.string('direction').index();
|
||||
@@ -10,14 +9,15 @@ exports.up = function(knex) {
|
||||
table.decimal('rate', 13, 3);
|
||||
table.integer('remaining');
|
||||
table.decimal('cost', 13, 3);
|
||||
table.integer('lot_number').index();
|
||||
|
||||
table.string('transaction_type').index();
|
||||
table.integer('transaction_id').unsigned().index();
|
||||
|
||||
table.integer('entry_id').unsigned().index();
|
||||
});
|
||||
table.datetime('created_at').index();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
exports.down = function (knex) {
|
||||
return knex.schema.dropTableIfExists('inventory_cost_lot_tracker');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user