Sale report now can be section wise

This commit is contained in:
2024-12-17 08:23:18 +05:30
parent b1407f339d
commit bbb7be8070
12 changed files with 85 additions and 59 deletions

View File

@ -92,7 +92,6 @@ export class DiscountComponent {
this.data.subscribe((list: DiscountItem[]) => {
this.list = list;
console.log(list);
this.form.controls.discounts.clear();
this.list.forEach((x) => {

View File

@ -1,7 +1,12 @@
<h2 mat-dialog-title>Receive Payment</h2>
<mat-dialog-content>
<form [formGroup]="form" class="flex flex-col">
<mat-table #table [dataSource]="dataSource" formArrayName="amounts" [style.visibility]="this.displayTable ? 'visible': 'hidden'">
<mat-table
#table
[dataSource]="dataSource"
formArrayName="amounts"
[style.visibility]="this.displayTable ? 'visible' : 'hidden'"
>
<!-- Name Column -->
<ng-container matColumnDef="name">
<mat-header-cell *matHeaderCellDef class="bold">Amount</mat-header-cell>
@ -24,7 +29,7 @@
<mat-row *matRowDef="let row; columns: displayedColumns"></mat-row>
<mat-footer-row *matFooterRowDef="displayedColumns"></mat-footer-row>
</mat-table>
<mat-form-field class="flex-auto" [style.visibility]="this.displayReason ? 'visible': 'hidden'">
<mat-form-field class="flex-auto" [style.visibility]="this.displayReason ? 'visible' : 'hidden'">
<mat-label>Reason</mat-label>
<input
type="text"

View File

@ -138,7 +138,6 @@ export class ReceivePaymentComponent {
}),
),
);
console.log('re', this.displayReason)
});
this.form.valueChanges.subscribe((x) => this.listenToAmountChange(x.amounts));
}