deleteIfPossible(rows: IdlObject[]) {
if (rows.length > 0) {
const code = rows[0].code();
- let can: boolean = true;
+ let can = true;
forkJoin([
this.pcrud.search('acqexr', { from_currency: code }, { limit: 1 }, { atomic: true }),
this.pcrud.search('acqexr', { to_currency: code }, { limit: 1 }, { atomic: true }),
@Input() currencyCode: string;
currency: IdlObject;
otherCurrencies: IdlObject[];
- existingRatios: {[toCurrency: string]: IdlObject} = {}
- existingInverseRatios: {[fromCurrency: string]: IdlObject} = {}
+ existingRatios: {[toCurrency: string]: IdlObject} = {};
+ existingInverseRatios: {[fromCurrency: string]: IdlObject} = {};
ratios: IdlObject[];
idlDef: any;
fieldOrder: any;
- canUpdate: boolean = false;
- doneLoading: boolean = false;
+ canUpdate = false;
+ doneLoading = false;
@ViewChild('successString', { static: true }) successString: StringComponent;
@ViewChild('updateFailedString', { static: false }) updateFailedString: StringComponent;
-
+
constructor(
private idl: IdlService,
private evt: EventService,
) {
super(modal);
}
-
+
ngOnInit() {
this.currency = null;
this.onOpen$.subscribe(() => this._initRecord());
const toCur = ratio.to_currency();
ratio.to_currency(ratio.from_currency());
ratio.from_currency(toCur);
- ratio.ratio(1.0/ratio.ratio());
+ ratio.ratio(1.0 / ratio.ratio());
this.ratios.push(ratio);
} else {
const ratio = this.idl.create('acqexr');