A
This commit is contained in:
@@ -15,6 +15,7 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSelectModule } from '@angular/material/select';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatSnackBar, MatSnackBarModule } from '@angular/material/snack-bar';
|
||||
import { SponsorDDService } from '../sponsor-dd.service';
|
||||
|
||||
@@ -30,6 +31,7 @@ import { SponsorDDService } from '../sponsor-dd.service';
|
||||
MatInputModule,
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
MatSnackBarModule
|
||||
],
|
||||
template: `
|
||||
@@ -41,15 +43,25 @@ import { SponsorDDService } from '../sponsor-dd.service';
|
||||
</p>
|
||||
|
||||
<form [formGroup]="form" class="dialog-form" *ngIf="!loading">
|
||||
<!-- DD Payable GL Account -->
|
||||
<mat-form-field appearance="outline" class="full-width">
|
||||
<mat-label>Sponsor DD Payable GL Account *</mat-label>
|
||||
<mat-select formControlName="ddPayableGlAccountId" required placeholder="Select DD Payable Liability GL">
|
||||
<mat-option *ngFor="let acc of glAccounts" [value]="acc.id"> {{ acc.glCode }} · {{ acc.name }} </mat-option>
|
||||
</mat-select>
|
||||
<mat-hint>Credited for the DD Face Value</mat-hint>
|
||||
<mat-error *ngIf="form.get('ddPayableGlAccountId')?.hasError('required')">Required</mat-error>
|
||||
</mat-form-field>
|
||||
<!--
|
||||
DD Payable is no longer set here.
|
||||
|
||||
It belongs to the sponsor bank: a draft drawn on SBI is owed to SBI and one on HDFC to
|
||||
HDFC, and what is outstanding to either is the figure a settlement with that bank is
|
||||
reconciled against — which one shared account cannot answer. Everything remaining on this
|
||||
screen is the same whichever sponsor a draft is drawn on: this bank's own charges income,
|
||||
its GST, its cash and clearing accounts, and its DD policy.
|
||||
-->
|
||||
<div class="payable-moved-note">
|
||||
<mat-icon>account_balance</mat-icon>
|
||||
<div>
|
||||
<strong>DD Payable is now set per sponsor bank.</strong>
|
||||
<div class="payable-moved-sub">
|
||||
Each bank credits its own payable account, so what is owed to each can be settled separately. Set it in
|
||||
<em>Organization > Sponsor Banks</em>.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Charges Income GL Account -->
|
||||
<mat-form-field appearance="outline" class="full-width">
|
||||
@@ -131,6 +143,29 @@ import { SponsorDDService } from '../sponsor-dd.service';
|
||||
gap: 12px;
|
||||
padding-top: 8px;
|
||||
}
|
||||
.payable-moved-note {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 18px;
|
||||
padding: 11px 14px;
|
||||
background: #eff6ff;
|
||||
border: 1px solid #bfdbfe;
|
||||
border-left: 3px solid #1d4ed8;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
color: #334155;
|
||||
}
|
||||
.payable-moved-note mat-icon {
|
||||
color: #1d4ed8;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.payable-moved-sub {
|
||||
margin-top: 3px;
|
||||
font-size: 11.5px;
|
||||
line-height: 1.5;
|
||||
color: #64748b;
|
||||
}
|
||||
.full-width {
|
||||
width: 100%;
|
||||
}
|
||||
@@ -170,10 +205,10 @@ export class GlSettingsDialogComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.form = this.fb.group({
|
||||
ddPayableGlAccountId: [
|
||||
null,
|
||||
[Validators.required]
|
||||
],
|
||||
// No longer edited here — it lives on the sponsor bank. Kept in the form, unvalidated, so
|
||||
// saving this screen round-trips the stored value instead of clearing it: existing banks were
|
||||
// seeded from it on upgrade, and nothing should quietly erase what they were seeded from.
|
||||
ddPayableGlAccountId: [null],
|
||||
chargesIncomeGlAccountId: [
|
||||
null,
|
||||
[Validators.required]
|
||||
|
||||
Reference in New Issue
Block a user