Feature: Sale Analysis is working

Fix: Cashier Checkout multiple entries
This commit is contained in:
Amritanshu
2019-08-20 23:02:17 +05:30
parent c6b907061e
commit 70d31fea5e
35 changed files with 650 additions and 138 deletions

View File

@ -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);
}
}