Breaking: Discount is applicable on sale category and not on menu category
Fix the import, etc on this. While entering discount in sale, it checks the max allowed.
This commit is contained in:
@ -4,7 +4,6 @@ import { Product } from './product';
|
||||
export class MenuCategory {
|
||||
id: string | undefined;
|
||||
name: string;
|
||||
discountLimit: number;
|
||||
isActive: boolean;
|
||||
isFixture: boolean;
|
||||
sortOrder: number;
|
||||
@ -14,7 +13,6 @@ export class MenuCategory {
|
||||
public constructor(init?: Partial<MenuCategory>) {
|
||||
this.id = undefined;
|
||||
this.name = '';
|
||||
this.discountLimit = 0;
|
||||
this.isActive = true;
|
||||
this.isFixture = false;
|
||||
this.sortOrder = 0;
|
||||
|
||||
@ -8,8 +8,8 @@ export class Product {
|
||||
code: number;
|
||||
name: string;
|
||||
units: string;
|
||||
menuCategory: MenuCategory;
|
||||
saleCategory: SaleCategory;
|
||||
menuCategory?: MenuCategory;
|
||||
saleCategory?: SaleCategory;
|
||||
price: number;
|
||||
hasHappyHour: boolean;
|
||||
isNotAvailable: boolean;
|
||||
@ -25,8 +25,6 @@ export class Product {
|
||||
this.code = 0;
|
||||
this.name = '';
|
||||
this.units = '';
|
||||
this.menuCategory = new MenuCategory();
|
||||
this.saleCategory = new SaleCategory();
|
||||
this.price = 0;
|
||||
this.hasHappyHour = false;
|
||||
this.isNotAvailable = false;
|
||||
|
||||
@ -3,12 +3,13 @@ import { Tax } from './tax';
|
||||
export class SaleCategory {
|
||||
id: string | undefined;
|
||||
name: string;
|
||||
tax: Tax;
|
||||
discountLimit: number;
|
||||
tax?: Tax;
|
||||
|
||||
public constructor(init?: Partial<SaleCategory>) {
|
||||
this.id = undefined;
|
||||
this.name = '';
|
||||
this.tax = new Tax();
|
||||
this.discountLimit = 1;
|
||||
Object.assign(this, init);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user