fix: Date format in sales/purchases APIs.

fix: Algorithm FIFO cost calculate method.
This commit is contained in:
Ahmed Bouhuolia
2020-08-19 00:13:53 +02:00
parent a202a21df5
commit 52d01b4ed8
21 changed files with 291 additions and 133 deletions

View File

@@ -0,0 +1,23 @@
exports.up = function(knex) {
return knex.schema.createTable('bills', (table) => {
table.increments();
table.integer('vendor_id').unsigned();
table.string('bill_number');
table.date('bill_date');
table.date('due_date');
table.string('reference_no');
table.string('status');
table.text('note');
table.decimal('amount', 13, 3).defaultTo(0);
table.decimal('payment_amount', 13, 3).defaultTo(0);
table.string('inv_lot_number');
table.timestamps();
});
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('bills');
};