feat(server): wip tax rate on sale invoice service

This commit is contained in:
Ahmed Bouhuolia
2023-08-14 14:59:10 +02:00
parent a7644e6481
commit d1121f0b81
18 changed files with 514 additions and 74 deletions

View File

@@ -11,14 +11,25 @@ exports.up = (knex) => {
table.timestamps();
})
.table('items_entries', (table) => {
table.boolean(['is_tax_exclusive']);
table.boolean('is_tax_exclusive');
table.string('tax_code');
table.decimal('tax_rate');
table.decimal('tax_amount_withheld')
})
.table('sales_invoices', (table) => {
table.boolean(['is_tax_exclusive']);
table.decimal('tax_amount_withheld')
table.boolean('is_tax_exclusive');
table.decimal('tax_amount_withheld');
})
.createTable('tax_rate_transactions', (table) => {
table.increments('id');
table.string('tax_name');
table.string('tax_code');
table.string('reference_type');
table.integer('reference_id');
table.decimal('tax_amount');
table.integer('tax_account_id').unsigned();
});
};