mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix: Graph fetch relations with sales & purchases models.
feat: Inventory tracker algorithm lots with FIFO or LIFO cost method.
This commit is contained in:
@@ -3,16 +3,16 @@ exports.up = function(knex) {
|
||||
return knex.schema.createTable('inventory_transactions', table => {
|
||||
table.increments('id');
|
||||
table.date('date');
|
||||
|
||||
table.string('direction');
|
||||
|
||||
table.integer('item_id');
|
||||
table.integer('quantity');
|
||||
table.decimal('rate', 13, 3);
|
||||
table.integer('remaining');
|
||||
|
||||
|
||||
table.string('transaction_type');
|
||||
table.integer('transaction_id');
|
||||
|
||||
table.integer('inventory_transaction_id');
|
||||
table.timestamps();
|
||||
});
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('inventory_cost_lot_tracker', table => {
|
||||
table.increments();
|
||||
table.date('date');
|
||||
|
||||
table.string('direction');
|
||||
|
||||
table.integer('item_id');
|
||||
table.decimal('rate', 13, 3);
|
||||
table.integer('remaining');
|
||||
|
||||
table.string('transaction_type');
|
||||
table.integer('transaction_id');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex) {
|
||||
return knex.schema.dropTableIfExists('inventory_cost_lot_tracker');
|
||||
};
|
||||
Reference in New Issue
Block a user