Save Bill Works

This commit is contained in:
Amritanshu
2019-07-13 21:32:18 +05:30
parent bcad4cdae3
commit 7d06a2f961
43 changed files with 660 additions and 349 deletions

View File

@ -1,6 +1,8 @@
import {Component, OnInit} from '@angular/core';
import {Subject} from 'rxjs';
import {AuthService} from '../../auth/auth.service';
import { Component, OnInit } from '@angular/core';
import { Subject } from 'rxjs';
import { AuthService } from '../../auth/auth.service';
import { BillService } from '../bill.service';
import { ActivatedRoute } from "@angular/router";
@Component({
selector: 'app-sales-home',
@ -10,7 +12,7 @@ import {AuthService} from '../../auth/auth.service';
export class SalesHomeComponent implements OnInit {
public nameObject = new Subject<string>();
constructor(private auth: AuthService) {
constructor(private route: ActivatedRoute, private auth: AuthService, private bs: BillService) {
}
ngOnInit() {
@ -22,4 +24,16 @@ export class SalesHomeComponent implements OnInit {
}
});
}
printKot() {
let guestBookId = null;
if (this.route.snapshot.queryParamMap.has("guest")) {
guestBookId = this.route.snapshot.queryParamMap.get("guest");
}
this.bs.printKot(guestBookId);
}
printBill() {
this.bs.printBill();
}
}