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:
2023-03-05 23:50:41 +05:30
parent 802eded568
commit e46fe7f90e
141 changed files with 2197 additions and 892 deletions

View File

@ -1,5 +1,5 @@
import { Component, Inject, OnInit } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { FormControl, FormGroup } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@Component({
@ -8,16 +8,17 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
styleUrls: ['./pax.component.css'],
})
export class PaxComponent implements OnInit {
form: UntypedFormGroup;
form: FormGroup<{
pax: FormControl<number>;
}>;
constructor(
public dialogRef: MatDialogRef<PaxComponent>,
@Inject(MAT_DIALOG_DATA) public data: number,
private fb: UntypedFormBuilder,
) {
// Create form
this.form = this.fb.group({
pax: '',
this.form = new FormGroup({
pax: new FormControl<number>(0, { nonNullable: true }),
});
}
@ -28,7 +29,7 @@ export class PaxComponent implements OnInit {
}
accept(): void {
const pax = +this.form.value.pax;
const pax = this.form.value.pax ?? 0;
this.dialogRef.close(pax);
}
}