Fairoj : Turnover validated section introduced in fin form for clix housing
This commit is contained in:
parent
8f02adb752
commit
a8dfb5ce73
@ -1 +1 @@
|
||||
{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
|
||||
{"version":3,"sources":["../../@angular/common/http (ignored)"],"names":[],"mappings":";;;;;AAAA,e","file":"0.js","sourcesContent":["/* (ignored) */\n\n\n//////////////////\n// WEBPACK FOOTER\n// @angular/common/http (ignored)\n// module id = 728\n// module chunks = 0"],"sourceRoot":""}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -388,6 +388,179 @@
|
||||
</div><br/>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-card *ngIf="lender_short_name == 'CHFPL'">
|
||||
<mat-card-header><mat-card-title>
|
||||
<h5>Turnover validated during PD</h5>
|
||||
</mat-card-title></mat-card-header>
|
||||
<mat-card-content>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Is Turnover validated?"formControlName="is_turnover_validated"
|
||||
(selectionChange)="turnoverValidatedValues($event.value)">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" *ngIf="financialForm.controls['is_turnover_validated'].hasError('required')">Is Turnover validated is required</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
<div formArrayName="turnover_values">
|
||||
<div *ngFor="let details of financialForm.controls.turnover_values['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Annual Sales From" formControlName="estimate_sales_from" (change)="calculateSalesAverage(i,details);AllCalculation(details,i)" (keyup)="inWords($event,i,11)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_sales_from').value != ''">{{"₹"}} {{AV_SalesFrmInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Annual Sales To" formControlName="estimate_sales_to" (change)="confirmAlert(i,details);AllCalculation(details,i)" (keyup)="inWords($event,i,12)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_sales_to').value != ''">{{"₹"}} {{AV_SalesToInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="number" placeholder="Consider Sales Average" formControlName="estimate_sales_average" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_sales_average').value != ''">{{"₹"}} {{AV_SalesInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Was there Net Profit or Net Loss?" formControlName="estimate_profit_or_loss">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="1">Net Profit</mat-option>
|
||||
<mat-option value="2">Net Loss</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-select class="select_large" placeholder="Is there Net Margin information Available?" formControlName="estimate_net_margin_availablity">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<div *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % From" formControlName="estimate_profit_range_from" type="number" min="0" max="100" (change)="calculateMarginProfit(i,details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % To" formControlName="estimate_profit_range_to" type="number" min='0' max='100' (change)="calculateMarginProfit( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % Considered" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
||||
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} ) </mat-hint> -->
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput placeholder="Net Profit Amount Considered" formControlName="estimate_profit_margin" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_profit_margin').value != ''"> {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount From" formControlName="estimate_net_profit_from" type="number" (change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,7)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"₹"}} {{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" type="number" placeholder="Net Profit Amount To" formControlName="estimate_net_profit_to" type="number" (change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,8)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Considered Net Profit" formControlName="estimate_net_profit_percent" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only </mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!--Temporary-->
|
||||
<!-- <div *ngIf="details.get('estimate_net_profit').value != ''">
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="what is the average no of days taken to receive the money?" formControlName="estimate_receive_the_money_in_days" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="what is the average no of days taken to pay the money?" formControlName="estimate_pay_the_money_in_days" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?" formControlName="estimate_unsold_stock_lies_in_days" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<mat-select placeholder="Is there Working Capital Facilities?" formControlName="is_there_working_capital_available">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('is_there_working_capital_available').value == 'yes'">
|
||||
<mat-select multiple formControlName="estimate_working_capital_facilities_availed" placeholder="Working Capital Facilities availed">
|
||||
<mat-option *ngFor="let a of av" [value]="a.id">{{a.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('estimate_working_capital_facilities_availed').value != ''">
|
||||
<input matInput autocomplete="off" placeholder="Specify The Reason" formControlName="reason_for_working_capital_facilities_availed">
|
||||
</mat-form-field>
|
||||
</div> -->
|
||||
|
||||
|
||||
<!-- <span *ngIf="details.get('estimate_profit_or_loss').value == 2 "> -->
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Loss % From" formControlName="estimate_loss_range_from" min='0' max='100' type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Loss % To" formControlName="estimate_loss_range_to" min='0' max='100' type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit % Considered" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
||||
<!-- <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_loss_margin').value}} ) </mat-hint> -->
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput placeholder="Net Loss Amount Considered" formControlName="estimate_loss_margin" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{AV_marginLossAmtInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount From" formControlName="estimate_net_loss_from" type="number" (change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,9)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_loss_from').value != ''">{{"₹"}} {{AV_netLossAmtFrmInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount To" formControlName="estimate_net_loss_to" type="number" (change)="calculateLossAmount(i, details);" (keyup)="inWords($event,i,10)">
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Considered Net Loss" formControlName="estimate_net_loss_percent" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field >
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number" readonly>
|
||||
<mat-hint align="end" style="font-size:11px" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}} {{AV_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="details.get('estimate_profit_or_loss').value == 2">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="What is the reason for the Loss?" formControlName="estimate_reason_for_loss">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="financialForm.value.is_turnover_validated == 'yes'">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 100%">
|
||||
<mat-select placeholder="How was the turnover validated" formControlName="how_turnover_validated">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option *ngFor="let val of turnover_validate_list" [value]="val.name">{{val.name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error align="end" *ngIf="financialForm.controls['how_turnover_validated'].hasError('required')">How was the Turnover validated is required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 100%" *ngIf="financialForm.value.how_turnover_validated == 'Others'">
|
||||
<input matInput type="text" autocomplete="off" placeholder="Please specify the turnover validated (Others)" formControlName="turnover_validated_others">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
<mat-card *ngIf="financialForm.controls['tot_business_FY']">
|
||||
<div >
|
||||
<mat-form-field>
|
||||
@ -403,6 +576,7 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</mat-card>
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<mat-card-title>
|
||||
|
||||
@ -75,7 +75,20 @@ export class PdQuestionFinancialInfoPage {
|
||||
@ViewChild(PdGeneralImagesPage) imagesValue
|
||||
prod_catagory: any;
|
||||
|
||||
|
||||
turnover_validate_list:any=[{
|
||||
id:2,
|
||||
name:'Validated from Bills/Records'
|
||||
},{
|
||||
id:3,
|
||||
name:'Validated from Business activities seen'
|
||||
},{
|
||||
id:4,
|
||||
name:'Validated from Stock/Inventory seen'
|
||||
},{
|
||||
id:1,
|
||||
name:'Others'
|
||||
},
|
||||
]
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams,public aws:AwsServiceProvider,
|
||||
public toast:ToastProvider, public qustCat:QuestionCategoryProvider,
|
||||
@ -109,6 +122,13 @@ export class PdQuestionFinancialInfoPage {
|
||||
this.financialForm.addControl('kuccha_bill_allowed',new FormControl())
|
||||
this.financialForm.addControl('customer_declared_turnover',new FormControl())
|
||||
}
|
||||
if(this.lender_short_name == 'CHFPL'){
|
||||
this.financialForm.addControl('is_turnover_validated',new FormControl('yes',Validators.compose([Validators.required])))
|
||||
this.financialForm.addControl('how_turnover_validated',new FormControl('',Validators.compose([Validators.required])))
|
||||
this.financialForm.addControl('turnover_validated_others',new FormControl(''))
|
||||
this.financialForm.addControl('turnover_values',this.fb.array([]))
|
||||
this.turnoverValidatedValues('yes')
|
||||
}
|
||||
this.qustCat.getTypeofActivityForSuppliedInfoForm(this.pdDetails.pd_id, this.company_id).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
if(data.records.type_of_activity.length == 1){
|
||||
@ -244,6 +264,20 @@ ionViewCanLeave(){
|
||||
control.push(this.createValue(''));
|
||||
}
|
||||
}
|
||||
turnoverValidatedValues(e:string){
|
||||
const control = <FormArray>this.financialForm.controls['turnover_values'];
|
||||
if(e == 'no'){
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
this.financialForm.controls['how_turnover_validated'].clearValidators()
|
||||
}
|
||||
else if (e == 'yes' && control.length === 0){
|
||||
control.push(this.createValue(''));
|
||||
this.financialForm.controls['how_turnover_validated'].setValidators(Validators.required)
|
||||
}
|
||||
this.financialForm.controls['how_turnover_validated'].updateValueAndValidity();
|
||||
}
|
||||
|
||||
selectedProfitOrLossType(e,detail){
|
||||
|
||||
@ -583,8 +617,11 @@ submitDetails(){
|
||||
retrieveData.hasOwnProperty('remarks_tot_business_FY') ? retrieveData.remarks_tot_business_FY : retrieveData.remarks_tot_business_FY=''
|
||||
retrieveData.hasOwnProperty('orders_hand_FY') ? retrieveData.orders_hand_FY : retrieveData.orders_hand_FY=''
|
||||
}
|
||||
if(this.lender_short_name == 'CHFPL'){
|
||||
this.turnoverValidatedValues(retrieveData.is_turnover_validated);
|
||||
}
|
||||
|
||||
this.financialForm.setValue(retrieveData)
|
||||
this.financialForm.patchValue(retrieveData)
|
||||
|
||||
if(this.ServiceDataAvailability == false && retrieveData.unsold_stock_lies_in_days == 'NA' ){
|
||||
this.financialForm.controls['unsold_stock_lies_in_days'].setValue('');
|
||||
|
||||
@ -33,7 +33,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
// let test='https://demo.pdgenie.com/sparqapi/api/'
|
||||
// LIVE ENVIRONMENT
|
||||
let production={
|
||||
url:'https://pdgenie.com/sparqprod/api/',
|
||||
url:'https://api.pdgenie.com/sparqprod/api/',
|
||||
environment_name:'production',
|
||||
authorization:'TnAwuc64pVpcB9xf',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_MlTee1O5V",
|
||||
@ -43,7 +43,8 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
}
|
||||
// DEVELOPMENT ENVIRONMENT
|
||||
let development={
|
||||
url:'https://demo.pdgenie.com/sparqapi/api/',
|
||||
// url:'https://demo.pdgenie.com/sparqapi/api/',
|
||||
url:'https://apitest.pdgenie.com/sparqapi/api/',
|
||||
environment_name:'development',
|
||||
authorization:'sparqvenba2018',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
|
||||
@ -54,7 +55,7 @@ public commonimage = "http://pdgenie.com/logo/avatar.jpg";
|
||||
}
|
||||
// TESTING ENVIRONMNET
|
||||
let testing={
|
||||
url:'https://demo.pdgenie.com/sparqtest/api/',
|
||||
url:'https://apitest.pdgenie.com/sparqtest/api/',
|
||||
environment_name:'testing',
|
||||
authorization:'sparqvenba2018',
|
||||
login_string: "cognito-idp.ap-south-1.amazonaws.com/ap-south-1_qQ85yQZJO",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user