Feature: Added a column called print in bill to the table customer.
This will prevent printing all customer's names and phone numbers in the bill in case of simple walkins. This is a breaking change as there is schema changes in the database. It also bolds the customers who are to be printed in the bill in the running tables list.
This commit is contained in:
@ -34,6 +34,7 @@ export class CustomerDetailComponent implements OnInit, AfterViewInit {
|
||||
name: '',
|
||||
phone: '',
|
||||
address: '',
|
||||
printInBill: false,
|
||||
discounts: this.fb.array([]),
|
||||
});
|
||||
}
|
||||
@ -50,6 +51,7 @@ export class CustomerDetailComponent implements OnInit, AfterViewInit {
|
||||
(this.form.get('name') as AbstractControl).setValue(item.name);
|
||||
(this.form.get('phone') as AbstractControl).setValue(item.phone);
|
||||
(this.form.get('address') as AbstractControl).setValue(item.address);
|
||||
(this.form.get('printInBill') as AbstractControl).setValue(item.printInBill);
|
||||
this.form.setControl(
|
||||
'discounts',
|
||||
this.fb.array(
|
||||
@ -112,6 +114,7 @@ export class CustomerDetailComponent implements OnInit, AfterViewInit {
|
||||
this.item.name = formModel.name;
|
||||
this.item.phone = formModel.phone;
|
||||
this.item.address = formModel.address;
|
||||
this.item.printInBill = formModel.printInBill;
|
||||
const array = this.form.get('discounts') as FormArray;
|
||||
this.item.discounts.forEach((item, index) => {
|
||||
item.discount = Math.max(
|
||||
|
||||
Reference in New Issue
Block a user