feat: rewrite repositories with base entity repository class.

feat: sales and purchases status.
feat: sales and purchases auto-increment number.
fix: settings find query with extra columns.
This commit is contained in:
Ahmed Bouhuolia
2020-12-13 19:50:59 +02:00
parent e9e4ddaee0
commit 188e411f02
78 changed files with 1634 additions and 869 deletions

View File

@@ -1,3 +1,4 @@
const { default: TrialBalanceSheet } = require("services/FinancialStatements/TrialBalanceSheet/TrialBalanceSheet");
exports.up = function(knex) {
return knex.schema.createTable('sales_estimates', (table) => {
@@ -11,7 +12,13 @@ exports.up = function(knex) {
table.text('note');
table.text('terms_conditions');
table.text('send_to_email');
table.date('delivered_at').index();
table.integer('user_id').unsigned().index();
table.integer('converted_to_invoice_id').unsigned();
table.date('converted_to_invoice_at');
table.timestamps();
});
};

View File

@@ -7,7 +7,6 @@ exports.up = function(knex) {
table.date('due_date');
table.string('invoice_no').index();
table.string('reference_no');
table.string('status').index();
table.text('invoice_message');
table.text('terms_conditions');
@@ -16,6 +15,8 @@ exports.up = function(knex) {
table.decimal('payment_amount', 13, 3);
table.string('inv_lot_number').index();
table.date('delivered_at').index();
table.timestamps();
});
};

View File

@@ -12,6 +12,7 @@ exports.up = function(knex) {
table.decimal('amount', 13, 3).defaultTo(0);
table.decimal('payment_amount', 13, 3).defaultTo(0);
table.string('inv_lot_number').index();
table.date('opened_at').index();
table.integer('user_id').unsigned();
table.timestamps();
});