issues fixes : ps
This commit is contained in:
parent
0104afa10e
commit
af541a358d
@ -171,11 +171,11 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)"
|
||||
<input matInput autocomplete="off" placeholder="No of Years"
|
||||
formControlName="vintage_year" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)"
|
||||
<input matInput autocomplete="off" placeholder="No of Months"
|
||||
formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -128,7 +128,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<mat-label>Age of Asset in Year</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
|
||||
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
@ -329,7 +329,7 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<mat-label>Age of Asset in Year</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.99" formControlName="business_vintage"
|
||||
minlength="1" maxlength="2" OnlyNumber type="text" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
|
||||
@ -101,13 +101,13 @@
|
||||
<br>
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)"
|
||||
<input matInput autocomplete="off" placeholder="No of Years"
|
||||
formControlName="vintage_year" OnlyNumber type="text" (change)="checkWithExistBusinessYear(itemrow,$event.target.value,i)" required>
|
||||
<mat-hint style="color: red;">{{yearErrorMessage[i]}}</mat-hint>
|
||||
<mat-error *ngIf="itemrow.controls['vintage_year'].hasError('required')">Year Required</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)"
|
||||
<input matInput autocomplete="off" placeholder="No of Months"
|
||||
formControlName="vintage_month" OnlyNumber type="text" (change)="ConvertMonthintoYear(itemrow,$event.target.value,i)">
|
||||
<mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
<mat-hint style="color: red;">{{monthErrorMessage[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput placeholder="Total Work Experience" formControlName="total_business_experiance"
|
||||
<input matInput placeholder="Total Work Experience (in years)" formControlName="total_business_experiance"
|
||||
OnlyNumber type="text" (keyup)="getWorkExperience(members.value,i)"
|
||||
autocomplete="off" required (change)="checkWithExistTotalWorkExperience($event.target.value,i,members)">
|
||||
<mat-hint style="color: red;">{{errorMessageForExistTotalWorkExperience[i]}}</mat-hint>
|
||||
@ -1439,7 +1439,9 @@
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:84%;">
|
||||
<input matInput placeholder="Export Sale As a % of Total Sales" formControlName="export_sale_of_total_sales">
|
||||
<input autocomplete="off" matInput type="number" placeholder="Export Sale As a % of Total Sales" formControlName="export_sale_of_total_sales" min="0" max="100">
|
||||
<mat-error *ngIf="businessForm.controls['export_sale_of_total_sales'].hasError('min') ">Please enter a value between 0 and 100</mat-error>
|
||||
<mat-error *ngIf="businessForm.controls['export_sale_of_total_sales'].hasError('max') ">Please enter a value between 0 and 100</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
@ -1613,7 +1615,8 @@
|
||||
<mat-card-title>Documents Sighted </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<div fxLayout="row" fxLayoutAlign="space-between none" >
|
||||
|
||||
<div fxLayout="row">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Shop and Est Act Cert" formControlName="shop_eat_act_cert" (selectionChange)="radioChange($event,1)"
|
||||
required>
|
||||
@ -1623,15 +1626,21 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['shop_eat_act_cert'].hasError('required')">Shop and Est Act Cert Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right *ngIf="businessForm.controls['shop_eat_act_cert'].value == 'yes'">
|
||||
<!-- <div *ngIf="businessForm.controls['shop_eat_act_cert'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['shop_eat_act_cert_pic'] && businessForm.controls['shop_eat_act_cert_pic'].value!= '' " >
|
||||
<img src="{{businessForm.controls['shop_eat_act_cert_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer>
|
||||
<p style="text-align: center">Shop and Est Act Cert Image</p>
|
||||
<!-- <br> -->
|
||||
<p>Shop and Est Act Cert Image</p>
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['shop_eat_act_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['shop_eat_act_cert_pic'] && businessForm.controls['shop_eat_act_cert_pic'].value!= '' " >
|
||||
<img src="{{businessForm.controls['shop_eat_act_cert_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
|
||||
|
||||
<p class="carbon-text" > Shop and Est Act Cert Image </p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between none" >
|
||||
<div fxLayout="row">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="GST Regn Cert" formControlName="gst_Regn_cert" (selectionChange)="radioChange($event,2)"
|
||||
required>
|
||||
@ -1641,14 +1650,22 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['gst_Regn_cert'].hasError('required')">GST Regn Cert Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div fxLayoutAlign="none center" *ngIf="businessForm.controls['gst_Regn_cert'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['gst_Regn_cert_pic'] && businessForm.controls['gst_Regn_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['gst_Regn_cert_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer>
|
||||
<p style="text-align: center">GST Regn Cert Image </p>
|
||||
<span *ngIf="businessForm.controls['gst_Regn_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['gst_Regn_cert_pic'] && businessForm.controls['gst_Regn_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['gst_Regn_cert_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
|
||||
<!-- <p> Students and Teachers, save up to 60% on . </p> -->
|
||||
<p class="carbon-text" > GST Regn Cert Image </p>
|
||||
</span>
|
||||
</span>
|
||||
<!-- <span *ngIf="businessForm.controls['gst_Regn_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['gst_Regn_cert_pic'] && businessForm.controls['gst_Regn_cert_pic'].value != ''" >
|
||||
<img src="https://cdn4.buysellads.net/uu/1/41334/1550855401-cc_light.png" alt="" border="0" height="100" width="130" style="max-width: 130px;">
|
||||
<p> Students and Teachers, save up to 60% on . </p>
|
||||
</span>
|
||||
</span> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between" >
|
||||
|
||||
<div fxLayout="row" >
|
||||
<mat-form-field *ngIf="businessForm.controls['export_import_cert']">
|
||||
<mat-select placeholder="Export / Import cert" formControlName="export_import_cert" (selectionChange)="radioChange($event,3)"
|
||||
required>
|
||||
@ -1658,14 +1675,21 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['export_import_cert'].hasError('required')">Export / Import cert Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right fxLayoutAlign="none center" *ngIf="businessForm.controls['export_import_cert'] && businessForm.controls['export_import_cert'].value == 'yes'">
|
||||
<!-- <div fxLayoutAlign="none center" *ngIf="businessForm.controls['export_import_cert'] && businessForm.controls['export_import_cert'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['export_import_cert_pic'] && businessForm.controls['export_import_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['export_import_cert_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer >
|
||||
<p style="text-align: center">Export / Import cert Image</p>
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['export_import_cert'] && businessForm.controls['export_import_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['export_import_cert_pic'] && businessForm.controls['export_import_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['export_import_cert_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
|
||||
|
||||
<p class="carbon-text" > Export / Import cert Image </p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between" >
|
||||
<div fxLayout="row">
|
||||
<mat-form-field *ngIf="businessForm.controls['factory_cert']">
|
||||
<mat-select placeholder="Factory Cert" formControlName="factory_cert" required (selectionChange)="radioChange($event,4)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
@ -1674,15 +1698,22 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['factory_cert'].hasError('required')">Factory Cert Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right fxLayoutAlign="none center" *ngIf="businessForm.controls['factory_cert'] && businessForm.controls['factory_cert'].value == 'yes'">
|
||||
<!-- <div *ngIf="businessForm.controls['factory_cert'] && businessForm.controls['factory_cert'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['factory_cert_pic'] && businessForm.controls['factory_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['factory_cert_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer >
|
||||
<p style="text-align: center">Factory cert Image</p>
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['factory_cert'] && businessForm.controls['factory_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['factory_cert_pic'] && businessForm.controls['factory_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['factory_cert_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
|
||||
|
||||
<p class="carbon-text" > Factory cert Image </p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between" >
|
||||
|
||||
<div fxLayout="row">
|
||||
<mat-form-field *ngIf="businessForm.controls['practice_cert']">
|
||||
<mat-select placeholder="Cert of Practice" formControlName="practice_cert" (selectionChange)="radioChange($event,5)"
|
||||
required>
|
||||
@ -1692,15 +1723,22 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['practice_cert'].hasError('required')">Cert of Practice Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right fxLayoutAlign="none center" *ngIf="businessForm.controls['practice_cert'] && businessForm.controls['practice_cert'].value == 'yes'">
|
||||
<!-- <div fxLayoutAlign="none center" *ngIf="businessForm.controls['practice_cert'] && businessForm.controls['practice_cert'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['practice_cert_pic'] && businessForm.controls['practice_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['practice_cert_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer >
|
||||
<p style="text-align: center">Cert of Practice Image</p>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['practice_cert'] && businessForm.controls['practice_cert'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['practice_cert_pic'] && businessForm.controls['practice_cert_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['practice_cert_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer>
|
||||
|
||||
<p class="carbon-text" > Cert of Practice Image</p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between" >
|
||||
<div fxLayout="row">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="PF Regn" formControlName="pf_regn" required (selectionChange)="radioChange($event,6)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
@ -1709,15 +1747,22 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['pf_regn'].hasError('required')">PF Regn Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right fxLayoutAlign="none center" *ngIf="businessForm.controls['pf_regn'].value == 'yes'">
|
||||
<!-- <div fxLayoutAlign="none center" *ngIf="businessForm.controls['pf_regn'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['pf_regn_pic'] && businessForm.controls['pf_regn_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['pf_regn_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer >
|
||||
<p style="text-align: center">PF Regn Image</p>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['pf_regn'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['pf_regn_pic'] && businessForm.controls['pf_regn_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['pf_regn_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer >
|
||||
|
||||
<p class="carbon-text" > PF Regn Image </p>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" fxLayoutAlign="space-between" >
|
||||
<div fxLayout="row">
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="ESIC Regn" formControlName="esic_regn" (selectionChange)="radioChange($event,7)" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
@ -1726,12 +1771,20 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="businessForm.controls['esic_regn'].hasError('required')">ESIC Regn Required</mat-error>
|
||||
</mat-form-field>
|
||||
<div right fxLayoutAlign="none center" *ngIf="businessForm.controls['esic_regn'].value == 'yes'">
|
||||
<!-- <div fxLayoutAlign="none center" *ngIf="businessForm.controls['esic_regn'].value == 'yes'">
|
||||
<div *ngIf="businessForm.controls['esic_regn_pic'] && businessForm.controls['esic_regn_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['esic_regn_pic'].value}}" style ="width: 100px;height: 100px;" ngxViewer >
|
||||
<p style="text-align: center">ESIC Regn Image</p>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<span *ngIf="businessForm.controls['esic_regn'].value == 'yes'">
|
||||
<span class="carbon-wrap" *ngIf="businessForm.controls['esic_regn_pic'] && businessForm.controls['esic_regn_pic'].value != ''" >
|
||||
<img src="{{businessForm.controls['esic_regn_pic'].value}}" alt="" border="0" height="100" width="130" style="max-width: 130px;" ngxViewer (viewerReady)="onViewerReady($event)">
|
||||
|
||||
<p class="carbon-text" > ESIC Regn Image</p>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Do You Want to Add Other Documents?" formControlName="other_documents"
|
||||
|
||||
@ -141,3 +141,14 @@ mat-header-cell mat-cell {
|
||||
margin-left: 2%;
|
||||
}
|
||||
|
||||
.carbon-wrap{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;}
|
||||
.carbon-text {
|
||||
font-weight: 300;
|
||||
padding: 10px 0 5px 0;
|
||||
line-height: 1.2;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
@ -663,7 +663,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
fk_createdby: this.pdid,
|
||||
//industry: [''],
|
||||
seasonality: ['', Validators.compose([Validators.required])],
|
||||
export_sale_of_total_sales: [''],
|
||||
export_sale_of_total_sales:['',Validators.compose([Validators.max(100), Validators.min(0)])],
|
||||
//month_of_business_run : [''],
|
||||
// peak_period_of_business : [''],
|
||||
//designation: this.fb.array([]),
|
||||
@ -1493,6 +1493,10 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// }
|
||||
|
||||
|
||||
if(this.businessForm.controls['export_sale_of_total_sales'].invalid){
|
||||
this.notifier.notify('warning', "Please enter a value between 0 and 100 in export sale as a % total sales..");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.businessForm.valid) {
|
||||
this.notifier.notify('warning', "Please Check All Manatory Fields..");
|
||||
@ -1969,4 +1973,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
if(Flag == 7) {event.value =='yes' ? this.businessForm.addControl('esic_regn_pic', new FormControl('')) : this.businessForm.removeControl('esic_regn_pic');}
|
||||
if(Flag == 3) {event.value =='yes' ? this.businessForm.addControl('export_import_cert_pic', new FormControl('')) : this.businessForm.removeControl('export_import_cert_pic');}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
<form [formGroup]="_finalRemarkForm" (submit)="onSubmit()" novalidate>
|
||||
<h2 mat-dialog-title class="paragraph_change">
|
||||
<div fxFlex="70" align="left" style="padding: 10px !important;">
|
||||
<span>{{main_applicant}} ({{lender_applicant_id}}), {{customer_segment_abbr}} - {{subproduct_abbr}} </span><br>
|
||||
@ -10,13 +11,12 @@
|
||||
</button>
|
||||
</div>
|
||||
</h2>
|
||||
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Questions">
|
||||
<ng-template matTabContent>
|
||||
<div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;">
|
||||
<form [formGroup]="_finalRemarkForm" (submit)="onSubmit()" novalidate>
|
||||
<mat-dialog-content style="border-bottom: 2px solid #e2412f8f;">
|
||||
<mat-card>
|
||||
<!-- <div *ngIf="noRecordsFound" style="max-width: 100vw !important;width: 100% !important;height: 95% !important;"> -->
|
||||
<mat-card *ngIf="noRecordsFound">
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Customer Behaviour" formControlName="final_custormer_remark_type" required>
|
||||
<mat-option>Select</mat-option>
|
||||
@ -156,23 +156,7 @@
|
||||
<input matInput autocomplete="off" placeholder="Reasons for marking PD status as 'Refer to Credit" formControlName="reason_for_refer_to_credit">
|
||||
</mat-form-field> -->
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Other Remarks</mat-label>
|
||||
<textarea matInput placeholder="Other Remarks" formControlName="final_form_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
</mat-tab>
|
||||
<mat-tab label="Docs">
|
||||
@ -216,4 +200,20 @@
|
||||
|
||||
</mat-tab-group>
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
<mat-form-field appearance="outline" style="width: 100%">
|
||||
<mat-label>Other Remarks</mat-label>
|
||||
<textarea matInput placeholder="Other Remarks" formControlName="final_form_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="40" align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Save"
|
||||
matTooltipPosition="above" type="submit">
|
||||
<mat-icon>save</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
@ -483,7 +483,7 @@
|
||||
<input matInput autocomplete="off" placeholder="In case of Credit Purchase, what is the average no of days taken to pay the money?"
|
||||
formControlName="pay_the_money_in_days" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:92%">
|
||||
<mat-form-field style="width:92%" *ngIf="!ServiceDataAvailability">
|
||||
<input matInput autocomplete="off" placeholder="What is the average no of days for which stock lies unsold during the year?"
|
||||
formControlName="unsold_stock_lies_in_days" OnlyNumber type="text">
|
||||
</mat-form-field>
|
||||
|
||||
@ -41,7 +41,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
form_id: number;
|
||||
company_id: string;
|
||||
CustSegAbbr : any;
|
||||
|
||||
ServiceDataAvailability: boolean = false;
|
||||
public financialForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
|
||||
@ -124,6 +124,23 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.initstockForm();
|
||||
this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid, this.company_id).subscribe(data => {
|
||||
if (data.dataStatus) {
|
||||
if(data.records.type_of_activity.length == 1){
|
||||
let bussiness_service_datas = data.records.type_of_activity.filter(data => { if (data.type_of_activity_id == 5) { return data } }).map(data => [...data.prodcuts]);
|
||||
this.ServiceDataAvailability = bussiness_service_datas.length>0 ? true : false;
|
||||
if(this.ServiceDataAvailability == true){
|
||||
this.financialForm.controls['unsold_stock_lies_in_days'].setValue('NA');
|
||||
}
|
||||
else if(this.ServiceDataAvailability == false){
|
||||
this.financialForm.controls['unsold_stock_lies_in_days'].setValue('');
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.ServiceDataAvailability = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const workingCptlControl = <FormArray>this.financialForm.controls['select_working_capital_facilities_availed'];
|
||||
let params: any = {};
|
||||
@ -255,6 +272,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
retriveData.company_id = this.company_id;
|
||||
retriveData.fk_createdby = this.pdid;
|
||||
this.financialForm.setValue(retriveData);
|
||||
if(this.ServiceDataAvailability == false && retriveData.unsold_stock_lies_in_days == 'NA'){
|
||||
console.log('Data Required');
|
||||
this.financialForm.controls['unsold_stock_lies_in_days'].setValue('');
|
||||
}
|
||||
// this.financialForm.patchValue(retriveData);
|
||||
} else {
|
||||
let avData = this.av.map(item => ({ name: item.name, id: item.id }))
|
||||
@ -302,6 +323,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.documentsAndFilesList = [];
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
workingCptl(details: any): FormGroup {
|
||||
@ -1214,9 +1236,14 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if(annual_sale != ''){
|
||||
|
||||
let current_margin : number =(profit_margin != '' ? parseFloat(profit_margin.toFixed(2)) : loss_margin != '' ? parseFloat(loss_margin.toFixed(2)) : 0.00 );
|
||||
let pre_margin : number = (temp_prev_profit_margin != 0 ? parseFloat(temp_prev_profit_margin.toFixed(2)) : temp_prev_loss_margin != 0 ? parseFloat(temp_prev_loss_margin.toFixed(2)) : 0.00 );
|
||||
let absoulte_value_of_pre_margin : number = (temp_prev_profit_margin != 0 ? Math.abs(parseFloat(temp_prev_profit_margin.toFixed(2))) : temp_prev_loss_margin != 0 ? Math.abs(parseFloat(temp_prev_loss_margin.toFixed(2))) : 0.00 );
|
||||
|
||||
let a = (profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin);
|
||||
let b = a / (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin));
|
||||
let a: number = current_margin - pre_margin;
|
||||
let b: number = parseFloat(a.toFixed(2)) / absoulte_value_of_pre_margin;
|
||||
// let a = (profit_margin != '' ? profit_margin : loss_margin ) - (temp_prev_profit_margin != 0 ? temp_prev_profit_margin : temp_prev_loss_margin);
|
||||
// let b = a / (temp_prev_profit_margin != 0 ? Math.abs(temp_prev_profit_margin) : Math.abs(temp_prev_loss_margin));
|
||||
let c = b * 100;
|
||||
|
||||
let final_percent = c != Infinity ? !(Number.isNaN(c)) ? c != -Infinity ? c.toFixed(2) : 0 : 0 : 0 ;
|
||||
@ -1909,6 +1936,19 @@ export class FinancialInfoComponent implements OnInit {
|
||||
console.log('this.financialForm.value',this.financialForm.value);
|
||||
let records = this.financialForm.value;
|
||||
records.select_working_capital_facilities_availed = records.select_working_capital_facilities_availed.filter(value => value.exist_status == 1);
|
||||
records.select_working_capital_facilities_availed = records.select_working_capital_facilities_availed.filter(value => value.exist_status == 1);
|
||||
console.log(records.is_there_working_capital_available);
|
||||
if(records.is_there_working_capital_available == "no"){
|
||||
records.select_working_capital_facilities_availed = [];
|
||||
if(records.bank_guarantee) delete records.bank_guarantee ;
|
||||
if(records.cash_credit_limit) delete records.cash_credit_limit;
|
||||
if(records.factoring) delete records.factoring;
|
||||
if(records.forfaiting) delete records.forfaiting;
|
||||
if(records.letter_of_credit) delete records.letter_of_credit;
|
||||
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 ;
|
||||
}
|
||||
console.log('records',records);
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
|
||||
@ -351,7 +351,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
manufacturing_raw_material_name: [records.manufacturing_raw_material_name || null],
|
||||
manufacturing_supplier_name: [records.manufacturing_supplier_name || null],
|
||||
person_title_name: [records.person_title_name || null],
|
||||
person_designation: [records.person_title_name || null],
|
||||
person_designation: [records.person_designation || null],
|
||||
other_person_designation: [records.other_person_designation || null],
|
||||
manufacturing_contact_person_name: [records.manufacturing_contact_person_name || null],
|
||||
manufacturing_contact_person_mobile_number: [records.manufacturing_contact_person_mobile_number || null, Validators.compose([Validators.minLength(10), Validators.maxLength(10)])],
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
</mat-list-item>
|
||||
|
||||
<mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<div fxFlex="70" fxFlexOffset="30">
|
||||
<div fxFlex="70" fxFlexOffset="30" style="text-align:justify">
|
||||
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
|
||||
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> -->
|
||||
</div>
|
||||
|
||||
@ -70,6 +70,12 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</mat-list-item>
|
||||
<mat-list-item role="listitem" *ngIf="master.loan_amount">
|
||||
<div fxFlex="70" fxFlexOffset="30" style="text-align:justify">
|
||||
<div style="font-size:0.9rem !important;">{{master.loan_amount | numberToWords}} Only</div>
|
||||
<!-- <div style="font-size:0.9rem !important;">{{ 9999999999 | numberToWords}} Only</div> -->
|
||||
</div>
|
||||
</mat-list-item>
|
||||
</mat-list>
|
||||
<div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user