issues fixed : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-07-08 20:20:42 +05:30
parent 5bb486805f
commit 8100012549

View File

@ -659,20 +659,16 @@ export class FinancialInfoComponent implements OnInit {
} }
/** fin customer data from Fin statement*/ /** fin customer data from Fin statement*/
selectedFinancialCustomer(e: any): void { selectedFinancialCustomer(e: any): void {
if(e == 'yes'){
const control = <FormArray>this.financialForm.controls['estimated_value']; const control = <FormArray>this.financialForm.controls['estimated_value'];
if(e == 'yes'){
while (control.length !== 0) { while (control.length !== 0) {
control.removeAt(0); control.removeAt(0);
} }
} }
else if (e == 'no'){ else if (e == 'no' && control.length === 0){
const control = <FormArray>this.financialForm.controls['estimated_value'];
if(control.length === 0){
control.push(this.createValue('')); control.push(this.createValue(''));
} }
} }
}
/** old code Without foreach loop /** old code Without foreach loop
* calculating Annual Sale for financial Statement * calculating Annual Sale for financial Statement