Files
cbsnexora/src/app/shared/accounting/view-savings-accounting-details/view-savings-accounting-details.component.ts
T
Ralph HopmanandAdam Saghy 9034ce2847 build: Replace Codelyzer and TSLint with Angular ESLint
Migrate from the deprecated TSLint to Angluar ESLint. Also fix current
linting issues in the code, in particular:

- Use strict equals operators (=== and !==)
- Remove empty lifecycle methods (mostly ngOnInit)
- Output bindings including aliases should not be named as standard dom
  events (submit)
- Async pipe results should not be negated
2024-11-08 09:37:08 +01:00

36 lines
1.0 KiB
TypeScript

import { Component, Input } from '@angular/core';
import { Accounting } from 'app/core/utils/accounting';
import { OptionData } from 'app/shared/models/option-data.model';
@Component({
selector: 'mifosx-view-savings-accounting-details',
templateUrl: './view-savings-accounting-details.component.html',
styleUrls: ['./view-savings-accounting-details.component.scss']
})
export class ViewSavingsAccountingDetailsComponent {
@Input() accountingRule: OptionData;
@Input() accountingMappings: any[] = [];
constructor(private accounting: Accounting) { }
isCashOrAccrualAccounting(): boolean {
if (this.accountingRule) {
return this.accounting.isCashOrAccrualAccounting(this.accountingRule);
}
return false;
}
isAccrualAccounting(): boolean {
if (this.accountingRule) {
return this.accounting.isAccrualAccounting(this.accountingRule);
}
return false;
}
getAccountingRuleName(value: string): string {
return this.accounting.getAccountRuleName(value.toUpperCase());
}
}