|
|
@ -260,6 +260,17 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
|
|
|
this.activityForm.controls['currency'].setValue(currency);
|
|
|
|
this.activityForm.controls['currency'].setValue(currency);
|
|
|
|
this.activityForm.controls['currencyOfFee'].setValue(currency);
|
|
|
|
this.activityForm.controls['currencyOfFee'].setValue(currency);
|
|
|
|
this.activityForm.controls['currencyOfUnitPrice'].setValue(currency);
|
|
|
|
this.activityForm.controls['currencyOfUnitPrice'].setValue(currency);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (['FEE', 'INTEREST'].includes(type)) {
|
|
|
|
|
|
|
|
if (this.activityForm.controls['accountId'].value) {
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].enable();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].disable();
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].setValue(
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -374,8 +385,15 @@ export class CreateOrUpdateActivityDialog implements OnDestroy {
|
|
|
|
this.activityForm.controls['unitPriceInCustomCurrency'].setValue(0);
|
|
|
|
this.activityForm.controls['unitPriceInCustomCurrency'].setValue(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].disable();
|
|
|
|
if (
|
|
|
|
this.activityForm.controls['updateAccountBalance'].setValue(false);
|
|
|
|
['FEE', 'INTEREST'].includes(type) &&
|
|
|
|
|
|
|
|
this.activityForm.controls['accountId'].value
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].enable();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].disable();
|
|
|
|
|
|
|
|
this.activityForm.controls['updateAccountBalance'].setValue(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.activityForm.controls['accountId'].setValidators(
|
|
|
|
this.activityForm.controls['accountId'].setValidators(
|
|
|
|
Validators.required
|
|
|
|
Validators.required
|
|
|
|