mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 21:00:31 +00:00
feat: Manual journals.
This commit is contained in:
@@ -66,9 +66,11 @@ factory.define('manual_journal', 'manual_journals', async () => {
|
||||
const user = await factory.create('user');
|
||||
|
||||
return {
|
||||
reference: faker.random.number(),
|
||||
journal_number: faker.random.number(),
|
||||
transaction_type: '',
|
||||
amount: faker.random.number(),
|
||||
// date: faker.random,
|
||||
date: faker.date.future,
|
||||
status: 1,
|
||||
user_id: user.id,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('manual_journals', (table) => {
|
||||
table.increments();
|
||||
table.string('reference');
|
||||
table.string('journal_number');
|
||||
table.string('transaction_type');
|
||||
table.decimal('amount');
|
||||
table.date('date');
|
||||
table.boolean('status').defaultTo(false);
|
||||
table.string('note');
|
||||
table.integer('user_id').unsigned();
|
||||
table.timestamps();
|
||||
|
||||
@@ -8,6 +8,7 @@ exports.seed = (knex) => {
|
||||
{ id: 1, name: 'accounts' },
|
||||
{ id: 2, name: 'items' },
|
||||
{ id: 3, name: 'expenses' },
|
||||
{ id: 4, name: 'manual_journals' },
|
||||
]);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user