Files
bigcapital/server/src/database/migrations/20200715193633_create_sale_invoices_table.js
a.bouhuolia 3a3d881f67 feat(sales): currency code associated from invoice customer.
feat(purchases): currency code associated from vendor customer.
2021-03-08 09:47:04 +02:00

29 lines
796 B
JavaScript

exports.up = function(knex) {
return knex.schema.createTable('sales_invoices', table => {
table.increments();
table.integer('customer_id').unsigned().index().references('id').inTable('contacts')
table.date('invoice_date').index();
table.date('due_date');
table.string('invoice_no').index();
table.string('reference_no');
table.text('invoice_message');
table.text('terms_conditions');
table.decimal('balance', 13, 3);
table.decimal('payment_amount', 13, 3);
table.string('currency_code', 3);
table.string('inv_lot_number').index();
table.date('delivered_at').index();
table.integer('user_id').unsigned();
table.timestamps();
});
};
exports.down = function(knex) {
return knex.schema.dropTableIfExists('sales_invoices');
};