fix: issues in inventory adjustments service.

This commit is contained in:
a.bouhuolia
2021-01-10 13:37:02 +02:00
parent 36f2068474
commit 097b9fdb3a
7 changed files with 172 additions and 58 deletions

View File

@@ -4,9 +4,12 @@ exports.up = function(knex) {
table.increments();
table.date('date').index();
table.string('type').index();
table.integer('adjustment_account_id').unsigned().references('id').inTable('accounts');
table.string('reason');
table.string('reference_no').index();
table.string('description');
table.integer('user_id').unsigned();
table.timestamps();
});
};

View File

@@ -5,8 +5,9 @@ exports.up = function(knex) {
table.integer('adjustment_id').unsigned().index().references('id').inTable('inventory_adjustments');
table.integer('index').unsigned();
table.integer('item_id').unsigned().index().references('id').inTable('items');
table.decimal('new_quantity').unsigned();
table.decimal('new_cost').unsigned();
table.integer('quantity');
table.decimal('cost').unsigned();
table.decimal('value').unsigned();
});
};