feat: rename item sku to code.

feat: fix sidebar current tab issue.
This commit is contained in:
Ahmed Bouhuolia
2020-11-24 11:30:27 +02:00
parent a7e5401b7d
commit 0321f29442
20 changed files with 75 additions and 50 deletions

View File

@@ -81,7 +81,7 @@ export default class ItemsController extends BaseController {
check('name').exists(),
check('type').exists().trim().escape()
.isIn(['service', 'non-inventory', 'inventory']),
check('sku').optional({ nullable: true }).trim().escape(),
check('code').optional({ nullable: true }).trim().escape(),
// Purchase attributes.
check('purchasable').optional().isBoolean().toBoolean(),
check('cost_price')

View File

@@ -4,7 +4,7 @@ exports.up = function (knex) {
table.increments();
table.string('name').index();
table.string('type').index();
table.string('sku');
table.string('code');
table.boolean('sellable').index();
table.boolean('purchasable').index();
table.decimal('sell_price', 13, 3).unsigned();

View File

@@ -8,7 +8,7 @@ exports.up = function(knex) {
table.decimal('amount', 13, 3).defaultTo(0);
table.string('reference_no').index();
table.integer('deposit_account_id').unsigned().references('id').inTable('accounts');
table.string('payment_receive_no');
table.string('payment_receive_no').nullable();
table.text('description');
table.integer('user_id').unsigned().index();
table.timestamps();

View File

@@ -4,7 +4,7 @@ exports.up = function(knex) {
table.increments();
table.integer('payment_receive_id').unsigned().index().references('id').inTable('payment_receives');
table.integer('invoice_id').unsigned().index().references('id').inTable('sales_invoices');
table.decimal('payment_amount').unsigned();
table.decimal('payment_amount', 13, 3).unsigned();
})
};

View File

@@ -5,7 +5,7 @@ exports.up = function(knex) {
table.integer('vendor_id').unsigned().index().references('id').inTable('contacts');
table.decimal('amount', 13, 3).defaultTo(0);
table.integer('payment_account_id').unsigned().references('id').inTable('accounts');
table.string('payment_number').index();
table.string('payment_number').nullable().index();
table.date('payment_date').index();
table.string('payment_method');
table.string('reference');

View File

@@ -4,7 +4,7 @@ export interface IItem{
id: number,
name: string,
type: string,
sku: string,
code: string,
sellable: boolean,
purchasable: boolean,
@@ -33,7 +33,7 @@ export interface IItem{
export interface IItemDTO {
name: string,
type: string,
sku: string,
code: string,
sellable: boolean,
purchasable: boolean,