Feature: Tax Regimes are added so that different bills with different series can be printed for Different regimes such as VAT and GST
Chore: Model relationships updated to make them simpler Chore: Bill printing majorly refactored for it Due to the sheer depth of the changes. There can be showstoppers. Please test it carefully
This commit is contained in:
@ -12,8 +12,8 @@ export class ProductSaleReportResolver implements Resolve<ProductSaleReport> {
|
||||
constructor(private ser: ProductSaleReportService) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot): Observable<ProductSaleReport> {
|
||||
const startDate = route.queryParamMap.get('startDate') || null;
|
||||
const finishDate = route.queryParamMap.get('finishDate') || null;
|
||||
const startDate = route.queryParamMap.get('startDate') ?? null;
|
||||
const finishDate = route.queryParamMap.get('finishDate') ?? null;
|
||||
return this.ser.get(startDate, finishDate);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import * as moment from 'moment';
|
||||
|
||||
@ -18,7 +18,10 @@ import { ProductSaleReportService } from './product-sale-report.service';
|
||||
export class ProductSaleReportComponent implements OnInit {
|
||||
info: ProductSaleReport = new ProductSaleReport();
|
||||
dataSource: ProductSaleReportDataSource = new ProductSaleReportDataSource(this.info.amounts);
|
||||
form: UntypedFormGroup;
|
||||
form: FormGroup<{
|
||||
startDate: FormControl<Date>;
|
||||
finishDate: FormControl<Date>;
|
||||
}>;
|
||||
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns = ['name', 'unbilled', 'sale', 'noCharge', 'staff', 'void'];
|
||||
@ -26,15 +29,14 @@ export class ProductSaleReportComponent implements OnInit {
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private fb: UntypedFormBuilder,
|
||||
private toCsv: ToCsvService,
|
||||
private toaster: ToasterService,
|
||||
private ser: ProductSaleReportService,
|
||||
) {
|
||||
// Create form
|
||||
this.form = this.fb.group({
|
||||
startDate: '',
|
||||
finishDate: '',
|
||||
this.form = new FormGroup({
|
||||
startDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
finishDate: new FormControl(new Date(), { nonNullable: true }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user