mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: rename item sku to code.
feat: fix sidebar current tab issue.
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user