feat: Concurrency control items cost compute.

This commit is contained in:
Ahmed Bouhuolia
2020-08-23 23:38:42 +02:00
parent 45088b2d3b
commit ab6bc0517f
28 changed files with 463 additions and 341 deletions

View File

@@ -6,6 +6,12 @@ exports.up = function (knex) {
table.integer('parent_category_id').unsigned();
table.text('description');
table.integer('user_id').unsigned();
table.integer('cost_account_id').unsigned();
table.integer('sell_account_id').unsigned();
table.integer('inventory_account_id').unsigned();
table.string('cost_method');
table.timestamps();
});
};

View File

@@ -13,8 +13,9 @@ exports.up = function(knex) {
table.integer('lot_number');
table.string('transaction_type');
table.integer('transaction_id');
table.integer('transaction_id').unsigned();
table.integer('entry_id').unsigned();
table.timestamps();
});
};

View File

@@ -3,17 +3,18 @@ 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').unsigned();
table.integer('quantity').unsigned();
table.decimal('rate', 13, 3);
table.integer('remaining');
table.integer('cost');
table.integer('lot_number');
table.string('transaction_type');
table.integer('transaction_id');
table.integer('transaction_id').unsigned();
table.integer('entry_id').unsigned();
});
};