barker/bookie/src/app/sales/bills/bill.ts

50 lines
1.2 KiB
TypeScript

import { Table } from '../../core/table';
import { User } from '../../core/user';
import { GuestBook } from '../../guest-book/guest-book';
import { Kot } from './kot';
import { VoucherType } from './voucher-type';
export class Bill {
id: string | undefined;
date: string;
dateTip: string;
pax: number;
user: User;
creationDate: string;
creationDateTip: string;
lastEditDate: string;
lastEditDateTip: string;
kotId: string;
billId: string;
table: Table;
customer: { id: string; name: string } | null;
guest: GuestBook;
reason: string;
voucherType: VoucherType;
kots: Kot[];
public constructor(init?: Partial<Bill>) {
this.id = undefined;
this.date = '';
this.dateTip = '';
this.pax = 0;
this.user = new User();
this.creationDate = '';
this.creationDateTip = '';
this.lastEditDate = '';
this.lastEditDateTip = '';
this.billId = '';
this.kotId = '';
this.table = new Table();
this.customer = null;
this.guest = new GuestBook();
// this.settlements = [];
this.reason = '';
this.voucherType = VoucherType.Kot;
this.kots = [];
// this.reprints = [];
Object.assign(this, init);
}
}