Customer discount with prefill discount in sales.
This commit is contained in:
12
bookie/src/app/core/customer-discount.ts
Normal file
12
bookie/src/app/core/customer-discount.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export class CustomerDiscount {
|
||||
id: string;
|
||||
name: string;
|
||||
discount: number;
|
||||
|
||||
public constructor(init?: Partial<CustomerDiscount>) {
|
||||
this.id = '';
|
||||
this.name = '';
|
||||
this.discount = 0;
|
||||
Object.assign(this, init);
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,18 @@
|
||||
import { CustomerDiscount } from './customer-discount';
|
||||
|
||||
export class Customer {
|
||||
id: string;
|
||||
name: string;
|
||||
phone: string;
|
||||
address: string;
|
||||
discounts: CustomerDiscount[];
|
||||
|
||||
public constructor(init?: Partial<Customer>) {
|
||||
this.id = '';
|
||||
this.name = '';
|
||||
this.phone = '';
|
||||
this.address = '';
|
||||
this.discounts = [];
|
||||
Object.assign(this, init);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user