Skip to content

Commit b575811

Browse files
authored
Merge pull request #2536 from alberto-art3ch/fix/client_charge_edition
WEB-229: Edit Client charge was broken
2 parents 6dc4283 + add9223 commit b575811

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/app/products/charges/create-charge/create-charge.component.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<div
2525
*ngIf="chargeForm.controls.chargeAppliesTo.value"
26-
class="flex-fill layout-row-wrap gap-2percent responsive-column"
26+
class="layout-row-wrap gap-2percent layout-lt-md-column form-section"
2727
>
2828
<mat-form-field class="flex-48">
2929
<mat-label>{{ 'labels.inputs.Charge Name' | translate }}</mat-label>
@@ -216,20 +216,6 @@
216216
</mat-error>
217217
</mat-form-field>
218218

219-
<div class="flex-48 layout-row gap-2percent layout-lt-md-column">
220-
<div class="flex-50 active-wrapper">
221-
<mat-checkbox labelPosition="before" formControlName="active">
222-
{{ 'labels.status.Active' | translate }}
223-
</mat-checkbox>
224-
</div>
225-
226-
<div class="flex-50 penalty-wrapper">
227-
<mat-checkbox labelPosition="before" formControlName="penalty">
228-
{{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }}
229-
</mat-checkbox>
230-
</div>
231-
</div>
232-
233219
<mifosx-gl-account-selector
234220
class="flex-48"
235221
*ngIf="chargeForm.controls.chargeAppliesTo.value === 3"
@@ -247,6 +233,20 @@
247233
</mat-option>
248234
</mat-select>
249235
</mat-form-field>
236+
237+
<div class="flex-48 layout-row gap-2percent layout-lt-md-column">
238+
<div class="flex-50 active-wrapper">
239+
<mat-checkbox labelPosition="before" formControlName="active">
240+
{{ 'labels.status.Active' | translate }}
241+
</mat-checkbox>
242+
</div>
243+
244+
<div class="flex-50 penalty-wrapper">
245+
<mat-checkbox labelPosition="before" formControlName="penalty">
246+
{{ 'labels.commons.Is' | translate }} {{ 'labels.inputs.Penalty' | translate }}
247+
</mat-checkbox>
248+
</div>
249+
</div>
250250
</div>
251251
</div>
252252
</mat-card-content>

src/app/products/charges/edit-charge/edit-charge.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class EditChargeComponent implements OnInit {
161161
this.addFeeFrequency = false;
162162
this.chargeForm.addControl(
163163
'incomeAccountId',
164-
this.formBuilder.control(this.chargeData.incomeOrLiabilityAccount.id, Validators.required)
164+
this.formBuilder.control(this.chargeData.incomeOrLiabilityAccount?.id, Validators.required)
165165
);
166166
break;
167167
}

0 commit comments

Comments
 (0)