point 6 done
This commit is contained in:
parent
b82fdfbb40
commit
883a2f82ee
@ -16,7 +16,7 @@
|
||||
<mat-tab label="Details">
|
||||
<ng-template matTabContent>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="100" *ngIf="financial != 'no'">
|
||||
<mat-card *ngIf="fk_pd_type != '3'">
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
@ -241,7 +241,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" *ngIf="CustSegAbbr != 'AI'">
|
||||
<div fxFlex="100">
|
||||
<div fxFlex="100" *ngIf="financial != 'no'">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
@ -824,7 +824,33 @@
|
||||
</mat-select>
|
||||
</mat-form-field> -->
|
||||
<div *ngIf="financialForm.controls.is_there_working_capital_available.value == 'yes'">
|
||||
|
||||
<div *ngIf="lender_short_name== 'CFPL'">
|
||||
<mat-card-subtitle>
|
||||
<p>Financial Data</p>
|
||||
</mat-card-subtitle>
|
||||
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Turnover in last completed Year"
|
||||
formControlName="turnover_lastcomplete_year" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="YTD turnover"
|
||||
formControlName="ytd_turnover" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall debtor collection period"
|
||||
formControlName="deptor_collection_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall Inventory holding period"
|
||||
formControlName="inventory_holding_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<input matInput autocomplete="off" placeholder="Overall creditor payment period"
|
||||
formControlName="creditor_payment_period" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<mat-card-subtitle>
|
||||
<p>Working Capital Facilities availed</p>
|
||||
</mat-card-subtitle>
|
||||
|
||||
@ -101,6 +101,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
},
|
||||
]
|
||||
fk_pd_type: any;
|
||||
financial: string;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
@ -119,6 +120,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
this.lender_short_name = this.pd_all_details.pdmaster_details.lender_short_name;
|
||||
if(this.lender_short_name=='CFPL')
|
||||
{
|
||||
this.financial='no';
|
||||
}
|
||||
this.product_abbr = this.pd_all_details.pdmaster_details.product_abbr;
|
||||
this.prod_catagory = this.pd_all_details.pdmaster_details.prod_catagory;
|
||||
this.subproduct_abbr = this.pd_all_details.pdmaster_details.subproduct_abbr;
|
||||
@ -154,7 +159,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
console.log(this.av);
|
||||
|
||||
this.initstockForm();
|
||||
if(this.lender_short_name == "IIB"){
|
||||
this.financialForm.addControl('tot_business_FY',new FormControl())
|
||||
@ -163,13 +168,22 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
if(this.lender_short_name == 'CFPL')
|
||||
{
|
||||
|
||||
/* for check box view based on cfpl */
|
||||
this.av.push({id:8,name:'Name of Lender'});
|
||||
this.av.push({id:9,name:'Loan amount'});
|
||||
this.av.push({id:10,name:'Loan Type'});
|
||||
this.av.push({id:11,name:'Loan Tenor'});
|
||||
this.av.push({id:12,name:'Loan start date'});
|
||||
this.av.push({id:13,name:'Monthly obligation-Interest/EMI'});
|
||||
/*--------------------------*/
|
||||
|
||||
/*for financial data */
|
||||
this.financialForm.addControl('turnover_lastcomplete_year',new FormControl())
|
||||
this.financialForm.addControl('ytd_turnover',new FormControl())
|
||||
this.financialForm.addControl('deptor_collection_period',new FormControl())
|
||||
this.financialForm.addControl('inventory_holding_period',new FormControl())
|
||||
this.financialForm.addControl('creditor_payment_period',new FormControl())
|
||||
/*--------------------------*/
|
||||
}
|
||||
if(this.customer_segment_abbr == "SE-DI"){
|
||||
this.financialForm.addControl('kuccha_records_shown',new FormControl())
|
||||
@ -2104,7 +2118,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
if(records.od_limit) delete records.od_limit;
|
||||
if(records.other_reason_for_working_capital_facilities_availed) delete records.other_reason_for_working_capital_facilities_availed ;
|
||||
if(records.reason_for_working_capital_facilities_availed) delete records.reason_for_working_capital_facilities_availed ;
|
||||
if(this.lender_short_name='CFPL')
|
||||
if(this.lender_short_name=='CFPL')
|
||||
{
|
||||
if(records.lender_name) delete records.lender_name ;
|
||||
if(records.loan_amount) delete records.loan_amount;
|
||||
@ -2112,7 +2126,15 @@ export class FinancialInfoComponent implements OnInit {
|
||||
if(records.loan_tenor) delete records.loan_tenor;
|
||||
if(records.loan_start_date) delete records.loan_start_date;
|
||||
if(records.monthly_emi) delete records.monthly_emi;
|
||||
}
|
||||
/* for remove control */
|
||||
if(records.turnover_lastcomplete_year) delete records.turnover_lastcomplete_year;
|
||||
if(records.ytd_turnover) delete records.ytd_turnover;
|
||||
if(records.deptor_collection_period) delete records.deptor_collection_period;
|
||||
if(records.inventory_holding_period) delete records.inventory_holding_period;
|
||||
if(records.creditor_payment_period) delete records.creditor_payment_period;
|
||||
/*-----------------------*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
|
||||
@ -406,7 +406,7 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%" *ngIf="peakseasons == 'yes'">
|
||||
<mat-select multiple placeholder="Months in which sales/service is low?"
|
||||
formControlName="peak_period_of_business" required>
|
||||
formControlName="sales_low_months" required>
|
||||
<mat-option value="1">January</mat-option>
|
||||
<mat-option value="2">February</mat-option>
|
||||
<mat-option value="3">March</mat-option>
|
||||
@ -421,14 +421,14 @@
|
||||
<mat-option value="12">December</mat-option>
|
||||
|
||||
</mat-select>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['peak_period_of_business'].hasError('required')">In Which Period Is Maximum Sale / Service Done Required</mat-error>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['sales_low_months'].hasError('required')">In Which Period Is Maximum Sale / Service Done Required</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="peakseasons == 'yes'">
|
||||
<mat-form-field style="width: 60%">
|
||||
<textarea matInput placeholder="Comments" formControlName="month_of_business_run"
|
||||
<textarea matInput placeholder="Comments" formControlName="peak_season_comment"
|
||||
required></textarea>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['month_of_business_run'].hasError('required')">Comments Required</mat-error>
|
||||
<mat-error *ngIf="loanDetailsForm.controls['peak_season_comment'].hasError('required')">Comments Required</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field>
|
||||
|
||||
@ -228,8 +228,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if(value.records.peakseasons_anchor=='yes')
|
||||
{
|
||||
this.peakseasons='yes';
|
||||
this.loanDetailsForm.controls['peak_period_of_business'].setValue(value.records.peak_period_of_business);
|
||||
this.loanDetailsForm.controls['month_of_business_run'].setValue(value.records.month_of_business_run);
|
||||
this.loanDetailsForm.controls['sales_low_months'].setValue(value.records.peak_period_of_business);
|
||||
this.loanDetailsForm.controls['peak_season_comment'].setValue(value.records.month_of_business_run);
|
||||
}
|
||||
|
||||
|
||||
@ -554,8 +554,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
// if(this.debitcredit_notes=='yes')
|
||||
// {
|
||||
this.loanDetailsForm.addControl('debitcredit_notes', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('peak_period_of_business', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('month_of_business_run', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('sales_low_months', new FormControl('', Validators.required));
|
||||
this.loanDetailsForm.addControl('peak_season_comment', new FormControl('', Validators.required));
|
||||
// }
|
||||
|
||||
this.loanDetailsForm.addControl('stock_related_anchor', new FormControl('', Validators.required));
|
||||
@ -578,13 +578,13 @@ export class LoanDetailsComponent implements OnInit {
|
||||
peakseasonsChanges(event: any) {
|
||||
// console.log(this.lenderShortName);
|
||||
if (event == 'no') {
|
||||
this.loanDetailsForm.removeControl('peak_period_of_business');
|
||||
this.loanDetailsForm.removeControl('month_of_business_run');
|
||||
this.loanDetailsForm.removeControl('sales_low_months');
|
||||
this.loanDetailsForm.removeControl('peak_season_comment');
|
||||
this.peakseasons='no';
|
||||
}
|
||||
else if (event == 'yes') {
|
||||
this.loanDetailsForm.addControl('peak_period_of_business', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('month_of_business_run', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('sales_low_months', new FormControl(''));
|
||||
this.loanDetailsForm.addControl('peak_season_comment', new FormControl(''));
|
||||
this.peakseasons='yes';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user