Feature: Sale Analysis is working
Fix: Cashier Checkout multiple entries
This commit is contained in:
@ -11,7 +11,7 @@ import { Bill, Inventory, Kot, PrintType } from './bills/bill';
|
||||
import { VoucherService } from './bills/voucher.service';
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { Table } from '../core/table';
|
||||
import { SelectionModel } from "@angular/cdk/collections";
|
||||
import { SelectionModel } from '@angular/cdk/collections';
|
||||
|
||||
@Injectable()
|
||||
export class BillService {
|
||||
@ -184,7 +184,7 @@ export class BillService {
|
||||
printKot(guest_book_id: string): Observable<boolean> {
|
||||
const item = JSON.parse(JSON.stringify(this.bill));
|
||||
const newKot = this.getKot();
|
||||
if (newKot.inventories.length == 0) {
|
||||
if (newKot.inventories.length === 0) {
|
||||
this.toaster.show('Error', 'Cannot print a blank KOT\nPlease add some products!');
|
||||
}
|
||||
item.kots.push(newKot);
|
||||
@ -262,7 +262,7 @@ export class BillService {
|
||||
}
|
||||
|
||||
splitBill(table: Table): Observable<boolean> {
|
||||
const inventoriesToMove: string[] = this.selection.selected.map((x:any)=> x.id)
|
||||
const inventoriesToMove: string[] = this.selection.selected.map((x: any) => x.id);
|
||||
return this.ser.splitBill(this.bill.id, inventoriesToMove, table);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user