mathi!2002

This commit is contained in:
venbatechnologies@gmail.com 2019-02-28 10:36:11 +05:30
parent 96333ce5bb
commit 6e33ad94d2
5 changed files with 617 additions and 606 deletions

Binary file not shown.

View File

@ -136,22 +136,47 @@ export class CurrentLoanComponent implements OnInit {
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
if (value.status == 200) {
console.log('value.records',value.records);
this.currentLoanForm.controls['existing_loan'].setValue(value.records.existing_loan);
this.currentLoanForm.controls['currentloan_remarks'].setValue(value.records.currentloan_remarks);
if (value.records.existing_loan == 'Yes') {
var result = Object.keys(value.records.loan_details).map(function (key) {
return value.records.loan_details[key];
console.log('value.records.loan_details',);
let loandetails = value.records.loan_details
var result = Object.keys(loandetails).map(function (key) {
return loandetails[key];
});
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
if (result.length > 0) {
result.forEach((val,index) => {
this.amtInwords[index] = this._pd.convertNumberToWords(val.loan_amount);
this.emiAmtInwords[index] = this._pd.convertNumberToWords(val.emi);
this.selectedfrequency(val.frequency,index);
//this.selectedLoanTakenBy(val.loan_taken_by,index);
let objs = {
'label': val.loan_amount,
'loan_amount': val.loan_amount,
'frequency':val.frequency,
'other_frequency':val.other_frequency,
'emi': val.emi,
'loan_type': val.loan_type,
'others_loan_type': val.others_loan_type,
'loan_taken_by':val.loan_taken_by,
'others_loan_taken':val.others_loan_taken,
'lender': val.lender,
'others_lender':val.others_lender,
'original_tenure': val.original_tenure,
'current_balance_tenure': val.current_balance_tenure,
'elapsed_tenure':val.elapsed_tenure
}
control.push(this.createLoanDetail(objs));
});
this.currentLoanForm.controls['loan_details'].setValue(result);
// this.currentLoanForm.controls['loan_details'].setValue(result_data);
} else {
// control.push(this.createLoanDetail());
}
@ -424,19 +449,19 @@ export class CurrentLoanComponent implements OnInit {
createLoanDetail(data) {
return this.fb.group({
label: data == null ? [''] : [data.label],
loan_amount: [''],
frequency:[''],
other_frequency:[''],
emi: [''],
loan_type: [''],
others_loan_type: [''],
loan_taken_by:[''],
others_loan_taken:[''],
lender: [''],
others_lender:[''],
original_tenure: [''],
current_balance_tenure: [''],
elapsed_tenure:['']
loan_amount: null ? [''] : [data.loan_amount],
frequency:null ? [''] : [data.frequency],
other_frequency:null ? [''] : [data.other_frequency],
emi: null ? [''] : [data.emi],
loan_type: null ? [''] : [data.loan_type],
others_loan_type: null ? [''] : [data.others_loan_type],
loan_taken_by:null ? [''] : [data.loan_taken_by],
others_loan_taken:null ? [''] : [data.others_loan_taken],
lender: null ? [''] : [data.lender],
others_lender:null ? [''] : [data.others_lender],
original_tenure: null ? [''] : [data.original_tenure],
current_balance_tenure: null ? [''] : [data.current_balance_tenure],
elapsed_tenure:null ? [''] : [data.elapsed_tenure]
});
}

View File

@ -211,6 +211,18 @@ export class FinancialInfoComponent implements OnInit {
financial_no_of_year : [''],
financial_reason: [''],
financial_customer:[''],
// estimate_receive_the_money_in_days:[value.estimate_receive_the_money_in_days],
// estimate_pay_the_money_in_days:[value.estimate_pay_the_money_in_days],
// estimate_unsold_stock_lies_in_days:[value.estimate_unsold_stock_lies_in_days],
// is_there_working_capital_available:[value.is_there_working_capital_available],
// estimate_working_capital_facilities_availed:[value.estimate_working_capital_facilities_availed],
// reason_for_working_capital_facilities_availed:[value.reason_for_working_capital_facilities_availed]
receive_the_money_in_days:[''],
pay_the_money_in_days:[''],
unsold_stock_lies_in_days:[''],
is_there_working_capital_available:[''],
working_capital_facilities_availed:[''],
reason_for_working_capital_facilities_availed:[''],
// same_as_financial_statements:[''],
date_per_financial: this.fb.array([]),
estimated_value: this.fb.array([])
@ -310,12 +322,6 @@ export class FinancialInfoComponent implements OnInit {
estimate_net_loss_percent:[value.estimate_net_loss_percent],
estimate_net_loss:[value.estimate_net_loss],
estimate_reason_for_loss:[value.estimate_reason_for_loss],
estimate_receive_the_money_in_days:[value.estimate_receive_the_money_in_days],
estimate_pay_the_money_in_days:[value.estimate_pay_the_money_in_days],
estimate_unsold_stock_lies_in_days:[value.estimate_unsold_stock_lies_in_days],
is_there_working_capital_available:[value.is_there_working_capital_available],
estimate_working_capital_facilities_availed:[value.estimate_working_capital_facilities_availed],
reason_for_working_capital_facilities_availed:[value.reason_for_working_capital_facilities_availed]
});
}
@ -388,7 +394,6 @@ export class FinancialInfoComponent implements OnInit {
this.isDisplay = false;
this.financialForm.controls['is_financial_customer'].setValue('no');
this.selectedFinancialCustomer('no');
const statementControl = <FormArray>this.financialForm.controls['date_per_financial'];

View File

@ -249,7 +249,7 @@ export class NeighbourHoodComponent implements OnInit {
// neighbourhoodControl.controls['do_know'].setValidators([Validators.required]);
// neighbourhoodControl.controls['do_know'].updateValueAndValidity();
return;
// return;
}