feat: compute items cost of inventory adjustments transcations.

This commit is contained in:
a.bouhuolia
2021-01-10 17:41:32 +02:00
parent 097b9fdb3a
commit 8491d44118
20 changed files with 433 additions and 180 deletions

View File

@@ -18,10 +18,6 @@ exports.up = function (knex) {
table.text('purchase_description').nullable();
table.integer('quantity_on_hand');
table.integer('opening_quantity');
table.decimal('opening_cost', 13, 3);
table.date('opening_date');
table.text('note').nullable();
table.boolean('active');
table.integer('category_id').unsigned().index().references('id').inTable('items_categories');

View File

@@ -10,7 +10,8 @@ exports.up = function(knex) {
table.integer('quantity').unsigned();
table.decimal('rate', 13, 3).unsigned();
table.string('lot_number').index();
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();