Bump to version 3.0.0
Printing done on: Cashier Report Discount Report Sale Report
This commit is contained in:
@@ -3,10 +3,12 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
|
||||
import { ToasterService } from '../core/toaster.service';
|
||||
import { ToCsvService } from '../shared/to-csv.service';
|
||||
|
||||
import { DiscountReport } from './discount-report';
|
||||
import { DiscountReportDataSource } from './discount-report-datasource';
|
||||
import { DiscountReportService } from './discount-report.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-discount-report',
|
||||
@@ -26,6 +28,8 @@ export class DiscountReportComponent implements OnInit {
|
||||
private router: Router,
|
||||
private fb: FormBuilder,
|
||||
private toCsv: ToCsvService,
|
||||
private toaster: ToasterService,
|
||||
private ser: DiscountReportService,
|
||||
) {
|
||||
this.createForm();
|
||||
}
|
||||
@@ -67,6 +71,17 @@ export class DiscountReportComponent implements OnInit {
|
||||
};
|
||||
}
|
||||
|
||||
print() {
|
||||
this.ser.print(this.info.startDate, this.info.finishDate).subscribe(
|
||||
() => {
|
||||
this.toaster.show('', 'Successfully Printed');
|
||||
},
|
||||
(error) => {
|
||||
this.toaster.show('Error', error.error);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
exportCsv() {
|
||||
const headers = {
|
||||
Name: 'name',
|
||||
|
||||
Reference in New Issue
Block a user