Choose / Edit / Create customers during billing.
This commit is contained in:
@ -6,11 +6,13 @@ import { map, switchMap } from 'rxjs/operators';
|
||||
|
||||
import { AuthService } from '../../auth/auth.service';
|
||||
import { BillViewItem } from '../../core/bill-view-item';
|
||||
import { Customer } from '../../core/customer';
|
||||
import { Table } from '../../core/table';
|
||||
import { ToasterService } from '../../core/toaster.service';
|
||||
import { ConfirmDialogComponent } from '../../shared/confirm-dialog/confirm-dialog.component';
|
||||
import { TableService } from '../../tables/table.service';
|
||||
import { BillService } from '../bill.service';
|
||||
import { ChooseCustomerComponent } from '../choose-customer/choose-customer.component';
|
||||
import { PaxComponent } from '../pax/pax.component';
|
||||
import { QuantityComponent } from '../quantity/quantity.component';
|
||||
import { TablesDialogComponent } from '../tables-dialog/tables-dialog.component';
|
||||
@ -72,6 +74,20 @@ export class BillsComponent implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
chooseCustomer() {
|
||||
const dialogRef = this.dialog.open(ChooseCustomerComponent, {
|
||||
// width: '750px',
|
||||
data: this.bs.bill.customer?.id,
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe((result: boolean | Customer) => {
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
this.bs.bill.customer = result as Customer;
|
||||
});
|
||||
}
|
||||
|
||||
isAllSelected(kotView: BillViewItem): boolean {
|
||||
const kot = this.bs.bill.kots.find((k) => k.id === kotView.kotId) as Kot;
|
||||
return kot.inventories.reduce(
|
||||
|
||||
Reference in New Issue
Block a user