Fix: Receipt component wouldn't replace the url adding to history when updating the url. Unlike the payment form.

UI: Added the shortcut in front of Vouchers in nav bar
This commit is contained in:
2025-09-27 08:21:40 +00:00
parent 12bddcd7cc
commit 608d1e6f13
2 changed files with 6 additions and 4 deletions

View File

@ -3,11 +3,11 @@
><a routerLink="/">{{ title }}</a></span
>
<mat-menu #voucherMenu="matMenu">
<a mat-menu-item routerLink="/journal">Journal</a>
<a mat-menu-item routerLink="/journal">Journal - F7</a>
<a mat-menu-item routerLink="/purchase">Purchase</a>
<a mat-menu-item routerLink="/purchase-return">Purchase Return</a>
<a mat-menu-item routerLink="/payment">Payment</a>
<a mat-menu-item routerLink="/receipt">Receipt</a>
<a mat-menu-item routerLink="/payment">Payment - F5</a>
<a mat-menu-item routerLink="/receipt">Receipt - F6</a>
<a mat-menu-item routerLink="/issue">Issue</a>
</mat-menu>
<button mat-button [matMenuTriggerFor]="voucherMenu">Voucher Entry</button>

View File

@ -160,7 +160,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit {
receiptAccounts: Account[] = [];
receiptJournal: Journal = new Journal();
voucher: Voucher = new Voucher();
account: Account | null = null;
account: Account | null;
accBal: AccountBalance | null = null;
displayedColumns = ['account', 'amount', 'action'];
@ -169,6 +169,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit {
tags: Observable<Tag[]>;
constructor() {
this.account = null;
this.form = new FormGroup({
date: new FormControl(moment(new Date()), { nonNullable: true }),
receiptAccount: new FormControl('', { nonNullable: true }),
@ -207,6 +208,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit {
this.router.navigate([], {
relativeTo: this.route,
queryParams: { a: x },
replaceUrl: true,
queryParamsHandling: 'merge',
}),
);