merge : kms
This commit is contained in:
parent
80ad486e43
commit
d0792f3482
@ -178,7 +178,8 @@
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 24%" *ngIf="pdMain.pincode.value == 1" >
|
||||
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" type="number">
|
||||
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" (keypress)="keyPress($event)">
|
||||
<mat-error *ngIf="pdMain.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-card-content>
|
||||
|
||||
@ -95,7 +95,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
fk_city: [null],
|
||||
fk_state: [null],
|
||||
pincode : [null],/** ,Validators.compose([Validators.minLength(6),Validators.maxLength(6)]) */
|
||||
other_pincode:[null],
|
||||
other_pincode:[null,Validators.compose([Validators.minLength(6),Validators.maxLength(6)])],
|
||||
remarks:[null],
|
||||
// allocation_type: [null],
|
||||
// sub_allocation_type: [null],
|
||||
@ -168,6 +168,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.subProductList= this.productList.filter(item => item.product_id == productID);
|
||||
this.subProductList=this.subProductList[0].subproducts;
|
||||
this.subProductList = this.subProductList.filter(item => item.is_others == 0);
|
||||
}
|
||||
|
||||
// get city list details based on state id
|
||||
@ -209,8 +210,9 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
data => {
|
||||
if (data.status == 200) {
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
let index1 = this.titleList.map(data => data.name).indexOf("Master");
|
||||
this.titleList.splice(index1, 1);
|
||||
// console.log(this.titleList);
|
||||
// let index1 = this.titleList.map(data => data.name).indexOf("Master");
|
||||
// this.titleList.splice(index1, 1);
|
||||
}
|
||||
}, error => this.errorMessage = <any> error);
|
||||
|
||||
@ -413,7 +415,6 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
|
||||
// common function for both draft and process pd
|
||||
submitPdDetails(formValue: any, status:string) {
|
||||
|
||||
if(this._PDtriggerForm.invalid) {
|
||||
this.validateAllFormFields(this._PDtriggerForm);
|
||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||
@ -428,6 +429,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
this.disableAfterSubmit=true;
|
||||
|
||||
let concat_landline
|
||||
let concat_landline1
|
||||
if(formValue.lender_stdcode != null || formValue.lender_landline != null){
|
||||
concat_landline = formValue.lender_stdcode +'-'+formValue.lender_landline;
|
||||
}
|
||||
@ -435,6 +437,13 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
concat_landline = null;
|
||||
}
|
||||
|
||||
if(formValue.applicant_stdcode != null || formValue.applicant_landline != null){
|
||||
concat_landline1 = formValue.applicant_stdcode +'-'+formValue.applicant_landline;
|
||||
}
|
||||
else{
|
||||
concat_landline1 = null;
|
||||
}
|
||||
|
||||
let pd_details:any={
|
||||
"fk_lender_id":formValue.fk_lender_id,
|
||||
"lender_applicant_id":formValue.lender_applicant_id,
|
||||
@ -450,7 +459,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"addressline1":formValue.addressline1,
|
||||
"fk_city":formValue.fk_city,
|
||||
"fk_state":formValue.fk_state,
|
||||
"pincode":formValue.pincode ,
|
||||
"pincode":formValue.pincode,
|
||||
"other_pincode":formValue.other_pincode ,
|
||||
"remarks":formValue.remarks,
|
||||
"pd_status": status,
|
||||
@ -463,7 +472,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
"applicant_title_name":formValue.applicant_title_name,
|
||||
"company_name":formValue.company_name,
|
||||
"mobile_no":formValue.mobile_no,
|
||||
"landline":formValue.applicant_stdcode +'-'+formValue.applicant_landline,
|
||||
"landline":concat_landline1 ,
|
||||
"applicant_type":1,
|
||||
"relation":"",
|
||||
});
|
||||
@ -501,6 +510,7 @@ export class AddPdComponent implements OnInit, OnDestroy {
|
||||
if(pd_applicant_details.length>0){
|
||||
pd_form.append("pd_applicant_details",JSON.stringify(pd_applicant_details))
|
||||
}
|
||||
|
||||
pd_form.append("pd_document_titles",JSON.stringify(AllFilesObj))
|
||||
if(formValue.addtional_requirements.length > 0){
|
||||
pd_form.append("addtional_requirements",JSON.stringify(formValue.addtional_requirements))
|
||||
|
||||
@ -55,9 +55,17 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
}
|
||||
|
||||
loadApplicantFormData() {
|
||||
let stdcode;
|
||||
let landline;
|
||||
if(this.mainApplicantData[0].landline != null){
|
||||
let stdcodesearch = this.mainApplicantData[0].landline.search("-");
|
||||
let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch);
|
||||
let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8);
|
||||
stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch) ;
|
||||
landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8) ;
|
||||
}else{
|
||||
stdcode = '';
|
||||
landline = '';
|
||||
}
|
||||
|
||||
this._EditApplicantForm = this._fb.group({
|
||||
fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id],
|
||||
applicant_name: [this.mainApplicantData[0].applicant_name, Validators.compose([Validators.required])],
|
||||
@ -79,17 +87,17 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
|
||||
}
|
||||
createItem(listData): FormGroup {
|
||||
console.log('listData',listData);
|
||||
if(listData){
|
||||
let stdcode;
|
||||
let landline;
|
||||
if(listData.landline != null){
|
||||
let stdcodesearch = listData.landline.search("-");
|
||||
stdcode = listData.landline.substr(0,stdcodesearch);
|
||||
//console.log(stdcode);
|
||||
landline = listData.landline.substr(+stdcodesearch + 1,8);}
|
||||
else{
|
||||
stdcode = null;
|
||||
landline = null;
|
||||
stdcode = '';
|
||||
landline = '';
|
||||
}
|
||||
return this._fb.group({
|
||||
label: ['Co Applicant'],
|
||||
@ -139,22 +147,37 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if((formValue.mobile_no == '') || (formValue.stdcode == '' && formValue.landline == '')){
|
||||
if((formValue.mobile_no == '') && (formValue.stdcode == '' || formValue.landline == '')){
|
||||
this.notifier.notify('warning', 'Either Mobile or Landline Need.!');
|
||||
return;
|
||||
}
|
||||
else{
|
||||
let concat_landline1
|
||||
if(formValue.stdcode != null && formValue.landline != null){
|
||||
if(formValue.stdcode == '' && formValue.landline == ''){
|
||||
concat_landline1 = null;
|
||||
}else {
|
||||
let std = formValue.stdcode == '' ? '' : formValue.stdcode;
|
||||
let landline = formValue.landline == '' ? '' : formValue.landline;
|
||||
concat_landline1 = std+'-'+landline;
|
||||
}
|
||||
}
|
||||
else if(formValue.stdcode == '' && formValue.landline == ''){
|
||||
concat_landline1 = null;
|
||||
}else{
|
||||
concat_landline1 = null;
|
||||
}
|
||||
|
||||
let pd_applicant_details : any=[{
|
||||
"fk_pd_id": this.data.pdID,
|
||||
"pd_co_applicant_id": formValue.fk_applicant_primary_id,
|
||||
"applicant_name":formValue.applicant_name,
|
||||
"company_name":formValue.company_name,
|
||||
"mobile_no":formValue.mobile_no,
|
||||
"landline":formValue.stdcode+'-'+formValue.landline,
|
||||
"landline":concat_landline1,
|
||||
"applicant_type":formValue.applicant_type,
|
||||
"relation":formValue.relationship,
|
||||
"applicant_title_name": formValue.applicant_title_name,
|
||||
|
||||
"isactive":1
|
||||
}];
|
||||
formValue.coApplicantItems.forEach((itemElement, itemIndex) => {
|
||||
@ -189,19 +212,19 @@ export class EditPdApplicantComponent implements OnInit {
|
||||
}
|
||||
pd_applicant_details.push(obj1)
|
||||
});
|
||||
|
||||
// this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
||||
// if (result.status == 200) {
|
||||
// this.notifier.notify('success', 'PD Details Updated.');
|
||||
// this.dialogRef.close();
|
||||
// }
|
||||
// else {
|
||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
// }
|
||||
// }, error => {
|
||||
// this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
// });
|
||||
}}
|
||||
this._pd.updatePdApplicant(pd_applicant_details).subscribe(result => {
|
||||
if (result.status == 200) {
|
||||
this.notifier.notify('success', 'PD Details Updated.');
|
||||
this.dialogRef.close();
|
||||
}
|
||||
else {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
}
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// get relation master details
|
||||
|
||||
@ -151,6 +151,11 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 24%" *ngIf="pdMain.pincode.value == 1" >
|
||||
<input matInput autocomplete="off" placeholder="Specify Pincode" formControlName="other_pincode" (keypress)="keyPress($event)">
|
||||
<mat-error *ngIf="pdMain.other_pincode.hasError('pattern') || pdMain.other_pincode.hasError('maxlength') || pdMain.other_pincode.hasError('minlength')">Enter Valid Pincode. </mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
|
||||
@ -134,6 +134,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
|
||||
loadFormData() {
|
||||
console.log('this.data.record',this.data.records);
|
||||
console.log('this.reocrds',this.data.records.pincode_id);
|
||||
let stdcode;
|
||||
let landline;
|
||||
if(this.data.records.pd_contact_landline){
|
||||
@ -149,6 +150,9 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
|
||||
this.getCityList(this.data.records.fk_state);
|
||||
// let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id)
|
||||
// : this.data.records.pincode
|
||||
// : this.data.records.pincode;
|
||||
|
||||
this._EditPDtriggerForm = this._fb.group({
|
||||
pd_id: [this.data.records.pd_id],
|
||||
@ -167,7 +171,8 @@ export class EditPdMasterComponent implements OnInit {
|
||||
addressline1: [this.data.records.addressline1],
|
||||
fk_city: [this.data.records.fk_city],
|
||||
fk_state: [this.data.records.fk_state],
|
||||
pincode : [this.data.records.pincode],/** Validators.compose([Validators.minLength(6),Validators.maxLength(6),Validators.pattern('^[0-9]*$')])], */
|
||||
pincode : [this.data.records.pincode_id],
|
||||
other_pincode:[this.data.records.other_pincode,Validators.compose([Validators.minLength(6),Validators.maxLength(6),Validators.pattern('^[0-9]*$')])],
|
||||
remarks: [this.data.records.remarks],
|
||||
});
|
||||
}
|
||||
@ -206,7 +211,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
}
|
||||
//trigger pd
|
||||
triggerPD(formValue: any, status:any){
|
||||
|
||||
console.log('triggerPD',formValue);
|
||||
// this._EditPDtriggerForm.controls['fk_lender_id'].setValidators([Validators.required]);
|
||||
// this._EditPDtriggerForm.controls['fk_lender_id'].updateValueAndValidity();
|
||||
|
||||
@ -333,6 +338,7 @@ export class EditPdMasterComponent implements OnInit {
|
||||
"fk_city": my_array.fk_city,
|
||||
"fk_state": my_array.fk_state,
|
||||
"pincode": my_array.pincode,
|
||||
"other_pincode":my_array.other_pincode,
|
||||
"remarks": my_array.remarks,
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
<mat-form-field style="width: 80%;">
|
||||
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
|
||||
<input matInput placeholder="Address" formControlName="address" required autocomplete="off">
|
||||
<input matInput placeholder="Address" formControlName="address" oninput="this.value = this.value.toUpperCase()" required autocomplete="off">
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-form-field style="width: 100%;">
|
||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
|
||||
@ -133,9 +133,8 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.address.setValue(data.records.address);
|
||||
this.addressForm.controls.pd_location.setValue(data.records.pd_location);
|
||||
this.addressForm.controls.address_type.setValue(data.records.address_type);
|
||||
let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type);
|
||||
this.selectedAddressType(selectedAddressType);
|
||||
|
||||
let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type)[0];
|
||||
this.selectedAddressType(selectedAddressType.address_type);
|
||||
if(data.records.address_type == 1) {
|
||||
this.addressForm.controls.address_type_others.setValue(data.records.address_type_others);
|
||||
this.selectedAddressType(data.records.address_type_others);
|
||||
@ -160,7 +159,7 @@ export class AddressComponent implements OnInit {
|
||||
// }
|
||||
this.addressForm.controls.other_premises_bussiness_activity.setValue(data.records.other_premises_bussiness_activity);
|
||||
if(data.records.other_premises_bussiness_activity != '' && data.records.other_premises_bussiness_activity !=null) {
|
||||
this.addressForm.controls.bussiness_activity_remark.setValue(data.records.other_premises_bussiness_activity);
|
||||
this.addressForm.controls.bussiness_activity_remark.setValue(data.records.bussiness_activity_remark);
|
||||
}
|
||||
else{
|
||||
this.addressForm.controls.bussiness_activity_remark.setValue('');
|
||||
|
||||
@ -260,7 +260,7 @@
|
||||
|
||||
<mat-form-field style="width:40%">
|
||||
|
||||
<mat-label>Vintage</mat-label>
|
||||
<mat-label>Age of Asset in Years</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="vintage_personal" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,3)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
|
||||
@ -295,6 +295,12 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeAssetsDetails(i,1)"
|
||||
matTooltip="Delete Other Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="_assetsQuesFrom.controls.assets_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addAssetDetails($event,1); false"
|
||||
matTooltip="Add More" matTooltipPosition="above" color="primary" *ngIf="last">
|
||||
@ -305,12 +311,6 @@
|
||||
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last">
|
||||
<strong>Delete Other Assets </strong>
|
||||
</button> -->
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeAssetsDetails(i,1)"
|
||||
matTooltip="Delete Other Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" >
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 3">
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 1">
|
||||
<input matInput placeholder="Specify Bank Name"
|
||||
formControlName="other_bank" autocomplete="off">
|
||||
</mat-form-field>
|
||||
@ -166,6 +166,12 @@
|
||||
<strong>Add More Banking Details</strong>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details" matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="bankingForm.controls.itemRows.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<!-- <button type="button" mat-button (click)="deleteBankdetails(i)" color="warn"
|
||||
matTooltip="Delete"matTooltipPosition="left" *ngIf="!last">
|
||||
<strong>Delete Banking Details</strong>
|
||||
@ -175,11 +181,6 @@
|
||||
<button mat-button color="primary" (click)="nextStep()">End</button> -->
|
||||
|
||||
<!-- ngIf="i > 0" -->
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Banking Details" matTooltipPosition="above" (click)="deleteBankdetails(i)" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</mat-action-row>
|
||||
</mat-expansion-panel>
|
||||
|
||||
@ -29,7 +29,7 @@ import {ActivatedRoute, Router} from "@angular/router";
|
||||
})
|
||||
export class BankingDetailsComponent implements OnInit {
|
||||
pdid: number;
|
||||
pageTitle: string ="Banking Information";
|
||||
pageTitle: string ="Banking Details of Individuals";
|
||||
public bankingForm: FormGroup;
|
||||
step: number;
|
||||
private notifier: NotifierService;
|
||||
@ -91,13 +91,13 @@ export class BankingDetailsComponent implements OnInit {
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
}
|
||||
// let modifyCompanyList : any=[];
|
||||
// if(this.existCompanyList.length>0){
|
||||
// modifyCompanyList = this.existCompanyList.map(element => {
|
||||
// return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
// });
|
||||
// this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
// }
|
||||
|
||||
});
|
||||
let modifyApplicantList: any=[];
|
||||
|
||||
33
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
Normal file → Executable file
33
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.html
Normal file → Executable file
@ -35,7 +35,7 @@
|
||||
<div formArrayName="business_details" class="example-full-width">
|
||||
|
||||
<!--Property-->
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 2 ">
|
||||
<div *ngIf="sup.get('business_assets_mode').value == 2">
|
||||
<div *ngFor="let detail of sup['controls'].business_details['controls']; let s = index">
|
||||
<div [formGroupName]="s">
|
||||
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -45,10 +45,18 @@
|
||||
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name | titlecase }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:40%" *ngIf="detail.get('property_type').value == 5">
|
||||
<mat-form-field style="width:40%" *ngIf="detail.get('property_type').value == 1">
|
||||
<input matInput placeholder="Other Property Type" formControlName="other_property_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%" *ngIf="detail.get('property_type').value != ''">
|
||||
<mat-select placeholder="Ownership Type" formControlName="properties_ownership_type" (selectionChange)="selectedPropertyOwnedType($event.value,s,i)">
|
||||
<mat-option value="owned">Owned</mat-option>
|
||||
<mat-option value="rented">Rented</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:40%" *ngIf="detail.get('properties_ownership_type').value == 'rented'">
|
||||
<input matInput autocomplete="off" placeholder="Monthly Rented Amount" formControlName="properties_monthly_rented_amt" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -200,12 +208,12 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<!-- <mat-form-field *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 5" style="width:45%"> -->
|
||||
<mat-form-field *ngIf="sup.get('business_assets_mode').value == 2" style="width:45%">
|
||||
<mat-form-field *ngIf="(sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i])" style="width:45%">
|
||||
<input matInput placeholder="Approximate Market Value" formControlName="business_approximate_market_value" (keypress)="keyPress($event)" autocomplete="off" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('business_approximate_market_value').value != ''">{{"₹"}} {{appxMarketAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4" style="width:45%">
|
||||
<mat-form-field *ngIf="sup.get('business_assets_mode').value == 1 || (sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i])|| sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4" style="width:45%">
|
||||
<mat-select placeholder="Asset Owned by"
|
||||
formControlName="business_name_of_the_owner" [compareWith]="compareObjects" required>
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
@ -229,11 +237,9 @@
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<span *ngIf="sup.get('business_assets_mode').value == 1 || sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3">
|
||||
<span *ngIf="sup.get('business_assets_mode').value == 1 || (sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i]) || sup.get('business_assets_mode').value == 3">
|
||||
<mat-form-field style="width:45%">
|
||||
<mat-label>Vintage</mat-label>
|
||||
<mat-label>Approx Vintage</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="eg.999" formControlName="business_vintage" minlength="1" maxlength="3" (keypress)="keyPress($event)" (keyup)="calculateVintagePurchase($event.target.value,i,1)">
|
||||
<!-- <mat-error> Invalid format</mat-error> -->
|
||||
</mat-form-field>
|
||||
@ -245,8 +251,8 @@
|
||||
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<!-- <span *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4 || sup.get('business_assets_mode').value == 5 || sup.get('business_assets_mode').value == 6"> -->
|
||||
<span *ngIf="sup.get('business_assets_mode').value == 2 || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4">
|
||||
|
||||
<span *ngIf="(sup.get('business_assets_mode').value == 2 && PropertyOwnedType[i]) || sup.get('business_assets_mode').value == 3 || sup.get('business_assets_mode').value == 4">
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
|
||||
<mat-form-field style="width:95%">
|
||||
@ -257,13 +263,12 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeAssetsDetails(i)"
|
||||
matTooltip="Delete Business Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last" >
|
||||
<button type="button" mat-raised-button mat-icon-button *ngIf="_businessAssetsQuesFrom.controls.business_assets_details.controls.length > 1" (click)="removeAssetsDetails(i)"
|
||||
matTooltip="Delete Business Assets" matTooltipPosition="above" class="mr-1 mb-1 hover-icon">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
9
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss
Normal file → Executable file
9
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.scss
Normal file → Executable file
@ -15,9 +15,14 @@
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
mat-form-field {
|
||||
.matcard mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
}
|
||||
|
||||
mat-form-field {
|
||||
margin: 0 2%;
|
||||
}
|
||||
|
||||
$base-card-box-shadow:1.5px 2.6px 24px 0 rgba(0, 35, 136, 0.08) !important;
|
||||
$product-bg-color-hover: rgba(103, 58, 183, 0.7);
|
||||
.p-list-main {
|
||||
|
||||
30
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts
Normal file → Executable file
30
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-assets-info/business-assets-info.component.ts
Normal file → Executable file
@ -16,7 +16,7 @@ import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
})
|
||||
export class BusinessAssetsInfoComponent implements OnInit {
|
||||
|
||||
pageTitle: string ="Business Assets";
|
||||
pageTitle: string ="Assets used for Business";
|
||||
pdid:string;
|
||||
|
||||
public _businessAssetsQuesFrom: FormGroup;
|
||||
@ -36,6 +36,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
AssetValueInwords: any = [];
|
||||
// B_emiAmtInwords: any = [];
|
||||
public m_propertyType = [];
|
||||
PropertyOwnedType : any = [];
|
||||
// public m_investmentType = [];
|
||||
// public m_freqOfPurchase = [];
|
||||
private notifier: NotifierService;
|
||||
@ -76,6 +77,7 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.company_id =this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
}
|
||||
|
||||
|
||||
@ -228,7 +230,22 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
business_emi: [''],
|
||||
});
|
||||
}
|
||||
selectedPropertyOwnedType(e,s,i){
|
||||
|
||||
// const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(i).get('business_details') as FormArray ;
|
||||
if(e == "owned"){
|
||||
// console.log('e o',e);
|
||||
// console.log('s o',s);
|
||||
// console.log('i o',i);
|
||||
this.PropertyOwnedType[i] = true;
|
||||
}
|
||||
else{
|
||||
// console.log('e r',e);
|
||||
// console.log('s r',s);
|
||||
// console.log('i r',i);
|
||||
this.PropertyOwnedType[i] = false;
|
||||
}
|
||||
}
|
||||
show: boolean;
|
||||
selectedAssetsType(e: any, i: any): void {
|
||||
let val = i;
|
||||
@ -287,7 +304,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
loadProperty() {
|
||||
return this._formBuilder.group({
|
||||
property_type: [''],
|
||||
other_property_type: ['']
|
||||
other_property_type: [''],
|
||||
properties_ownership_type : [''],
|
||||
properties_monthly_rented_amt:['']
|
||||
});
|
||||
}
|
||||
|
||||
@ -352,7 +371,9 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
loadPropertyWithData(data) {
|
||||
return this._formBuilder.group({
|
||||
property_type: [data.property_type],
|
||||
other_property_type: [data.other_property_type]
|
||||
other_property_type: [data.other_property_type],
|
||||
properties_ownership_type : [data.properties_ownership_type],
|
||||
properties_monthly_rented_amt:[data.properties_monthly_rented_amt]
|
||||
//property_type:['']
|
||||
});
|
||||
}
|
||||
@ -477,7 +498,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
||||
case '2': {
|
||||
let business_property_datas : any;
|
||||
data.forEach((datas,i) => {
|
||||
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type };
|
||||
business_property_datas = { 'property_type':datas.property_type,'other_property_type':datas.other_property_type,'properties_ownership_type':datas.properties_ownership_type,'properties_monthly_rented_amt':datas.properties_monthly_rented_amt };
|
||||
this.selectedPropertyOwnedType(datas.properties_ownership_type,i,val);
|
||||
});
|
||||
const control = (<FormArray>this._businessAssetsQuesFrom.controls['business_assets_details']).at(val).get('business_details') as FormArray ;
|
||||
control.push(this.loadPropertyWithData(business_property_datas));
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 3">
|
||||
<mat-form-field *ngIf="itemrow.get('bank_name').value == 1">
|
||||
<input matInput placeholder="Specify Bank Name"
|
||||
formControlName="other_bank" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
@ -61,6 +61,7 @@ export class BusinessBankingDetailsComponent implements OnInit {
|
||||
this.applicants.push({'pd_co_applicant_id':'0','applicant_name':'Others'});
|
||||
this.notifier = notifier;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.html
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.scss
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.scss
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.spec.ts
Normal file → Executable file
2
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts
Normal file → Executable file
2
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts
Normal file → Executable file
@ -38,7 +38,7 @@ export class BusinessInfoGroupComponent implements OnInit {
|
||||
getCompanyListForBusiness(): void{
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active && val.is_company_applicant===true);
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active == 1);
|
||||
this.waitLoading = true;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" class="state-margin">
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
<mat-form-field style="width: 45%;" *ngIf="generalExistEntityType!='4' && generalExistEntityType!='9' && generalExistEntityType.value!=''">
|
||||
<input matInput placeholder="Share of Profit / Shareholding (%)" (keypress)="keyPress($event)"
|
||||
formControlName="shareholding">
|
||||
@ -57,11 +57,12 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<p style="margin-left: 2% !important">No of Years in Current Business</p>
|
||||
<div fxLayout="row nowrap" class="state-margin">
|
||||
<p style="margin-left: 2% !important" *ngIf='!EntityTypeFlag'>No of Years in Current Business </p>
|
||||
|
||||
<div fxLayout="row nowrap" class="state-margin" *ngIf='!EntityTypeFlag'>
|
||||
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i)" >
|
||||
<input matInput placeholder="Year" formControlName="current_business_experiance_year" (keyup)="getWorkExperience(members.value,i)" required autocomplete="off" (keypress)="keyPress($event)" (change)="checkWithExistBusinessYear($event.target.value,i,members)" >
|
||||
<mat-hint style="color: red;">{{errorMessage[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 21%;">
|
||||
@ -69,20 +70,22 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput placeholder="Total Work Experience"
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required>
|
||||
formControlName="total_business_experiance" (keypress)="keyPress($event)" (keyup)="getWorkExperience(members.value,i)" autocomplete="off" required (change)="checkWithExistTotalWorkExperience($event.target.value,i,members)">
|
||||
<mat-hint style="color: red;">{{errorMessageForExistTotalWorkExperience[i]}}</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined">
|
||||
<div fxLayout="row nowrap" *ngIf="members.value.total_business_previous_experience!=undefined && !EntityTypeFlag">
|
||||
<mat-form-field style="width: 82%;">
|
||||
<input matInput placeholder="Previous Work Experience Details"
|
||||
formControlName="total_business_previous_experience" required>
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<mat-card-actions align="center" *ngIf='!EntityTypeFlag'>
|
||||
<button type="button" mat-flat-button (click)="addPartnerDetails()"
|
||||
matTooltip="Add More" matTooltipPosition="above" color="primary">
|
||||
<strong>Add More {{businessEntityTypeList.section_label}}</strong>
|
||||
@ -100,6 +103,16 @@
|
||||
|
||||
<mat-table [dataSource]="relationSource" *ngIf="businessForm.controls.persons_with_relationships['controls'].length>0" formArrayName="persons_with_relationships">
|
||||
|
||||
<ng-container matColumnDef="title">
|
||||
<mat-header-cell *matHeaderCellDef> Title </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-form-field style="width: 90%;">
|
||||
<mat-select formControlName="family_member_salutation">
|
||||
<mat-option [value]="title.title_id" *ngFor="let title of titleData">{{title.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="family_member_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
@ -115,7 +128,7 @@
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-form-field style="width: 90%;">
|
||||
<mat-select formControlName="other_family_relationship_id">
|
||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationData">{{member.name | titlecase}}</mat-option>
|
||||
<mat-option [value]="member.relationship_id" *ngFor="let member of relationData">{{member.name + ' of' | titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
@ -193,13 +206,13 @@
|
||||
<mat-card-title>Manufacturing Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="manufacturing_activity_details">
|
||||
<mat-card *ngFor="let manufacturing of businessForm.controls.manufacturing_activity_details['controls']; let m=index" [formGroupName]="m">
|
||||
<mat-card *ngFor="let manufacturing of businessForm.controls.manufacturing_activity_details['controls']; let m=index;let mlast = last" [formGroupName]="m">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m);CheckExport($event.value,1);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -260,7 +273,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
|
||||
<mat-label>Cities Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
|
||||
<mat-label>Countries Where Max Sales Done for {{manufacturing.value.main_products}}</mat-label>
|
||||
<mat-select multiple placeholder="Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name,manufacturing.get('india_where_sale_done').value)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
@ -273,9 +286,9 @@
|
||||
|
||||
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done ==undefined">
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<div fxLayout="row wrap" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Countries Where The Export Is Being Done for {{manufacturing.value.main_products}}</mat-label>
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
<mat-select placeholder="Countries" formControlName="country_name">
|
||||
@ -284,8 +297,10 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
<!-- <input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Approx % of Sale' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required> -->
|
||||
<!-- <input matInput [placeholder]=" 'Out of Total Export Sales what % of Sales is done in ' getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required> -->
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -368,8 +383,8 @@
|
||||
</div>
|
||||
<p>Export</p>
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:55%;">
|
||||
<div fxLayout="row wrap" class="tab_class" *ngFor="let countryList of manufacturing.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Countries Where The Export Is Being Done for {{manufacturing.value.main_products}}</mat-label>
|
||||
<mat-select placeholder="Countries" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
@ -377,8 +392,9 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<!-- <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> -->
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -402,17 +418,23 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<mat-form-field style="width: 92%">
|
||||
<mat-label>Description of {{manufacturing.value.main_products}}</mat-label>
|
||||
<mat-label>Description of {{manufacturing.value.main_products}} manufacturing process</mat-label>
|
||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Products" matTooltipPosition="above" (click)="deleteManufacturing(m)"
|
||||
*ngIf="businessForm.controls.manufacturing_activity_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreManufacturing()"
|
||||
matTooltip="Add More Manufacturing Details" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Manufacturing Details</strong>
|
||||
matTooltip="Add More Products" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Products</strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@ -421,13 +443,13 @@
|
||||
<mat-card-title>Retail Trading Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="retail_trading_activity_details">
|
||||
<mat-card *ngFor="let retail of businessForm.controls.retail_trading_activity_details['controls']; let r=index" [formGroupName]="r">
|
||||
<mat-card *ngFor="let retail of businessForm.controls.retail_trading_activity_details['controls']; let r=index;let rlast = last" [formGroupName]="r">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r);CheckExport($event.value,2);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -499,9 +521,9 @@
|
||||
|
||||
<ng-container *ngIf="retail.value.india_where_sale_done ==undefined && retail.value.countries_where_export_done !=undefined">
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<div fxLayout="row wrap" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
|
||||
<mat-form-field style="width:55%;">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Countries Where Export Is Being Done for {{retail.value.main_products}}</mat-label>
|
||||
|
||||
<!-- <input matInput placeholder="Countries Where The Export Is Being Done" formControlName="country_name" > -->
|
||||
@ -511,8 +533,9 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<!-- <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> -->
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeRetailState(r,c,'2')" *ngIf="c>0"
|
||||
@ -596,8 +619,8 @@
|
||||
</div>
|
||||
<p>Export</p>
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:55%;">
|
||||
<div fxLayout="row wrap" class="tab_class" *ngFor="let countryList of retail.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Countries Where The Export Is Being Done for {{retail.value.main_products}}</mat-label>
|
||||
|
||||
<mat-select placeholder="Countries Where The Export Is Being Done" formControlName="country_name">
|
||||
@ -606,8 +629,9 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<!-- <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> -->
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -633,17 +657,23 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<mat-form-field style="width: 92%">
|
||||
<mat-label>Description of {{retail.value.main_products}}</mat-label>
|
||||
<mat-label>Description of {{retail.value.main_products}} Retailing process</mat-label>
|
||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Products" matTooltipPosition="above" (click)="deleteRetail(c)"
|
||||
*ngIf="businessForm.controls.retail_trading_activity_details.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreRetail()"
|
||||
matTooltip="Add More Retail Details" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Retail Details</strong>
|
||||
matTooltip="Add More Products" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Products</strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@ -652,13 +682,13 @@
|
||||
<mat-card-title>Wholesale Trade Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="wholesale_trading_activity_details">
|
||||
<mat-card *ngFor="let wholesale of businessForm.controls.wholesale_trading_activity_details['controls']; let w=index" [formGroupName]="w">
|
||||
<mat-card *ngFor="let wholesale of businessForm.controls.wholesale_trading_activity_details['controls']; let w=index;let wlast = last" [formGroupName]="w">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w);CheckExport($event.value,3);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -730,9 +760,9 @@
|
||||
|
||||
<ng-container *ngIf="wholesale.value.india_where_sale_done ==undefined && wholesale.value.countries_where_export_done !=undefined">
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<div fxLayout="row wrap" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
|
||||
<mat-form-field style="width:55%;">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Countries Where The Export Is Being Done for {{wholesale.value.main_products}}</mat-label>
|
||||
<mat-select placeholder="Countries" formControlName="country_name">
|
||||
<mat-option *ngFor="let CL of countryDataList" [value]="CL.country_id">
|
||||
@ -740,8 +770,9 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<!-- <input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required> -->
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeWholesaleState(w,c,'2')" *ngIf="c>0"
|
||||
@ -825,8 +856,8 @@
|
||||
</div>
|
||||
<p>Export</p>
|
||||
<div formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:55%;">
|
||||
<div fxLayout="row wrap" class="tab_class" *ngFor="let countryList of wholesale.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
<mat-form-field style="width:70%;">
|
||||
<mat-label>Cities Where Max Sales Done for {{wholesale.value.main_products}}</mat-label>
|
||||
|
||||
<mat-label>Countries Where The Export Is Being Done for {{wholesale.value.main_products}}</mat-label>
|
||||
@ -836,8 +867,9 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<mat-form-field style="width:70%;">
|
||||
<!-- <input matInput placeholder="Approx % of Sale" c -->
|
||||
<input matInput [placeholder]="countryList.get('country_name').value == '' ? 'Out of Total Export Sales what % of Sales is done in' : getPlaceHolderName(countryList.get('country_name').value)" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
@ -862,17 +894,23 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<mat-form-field style="width: 92%">
|
||||
<mat-label>Description of {{wholesale.value.main_products}}</mat-label>
|
||||
<mat-label>Description of {{wholesale.value.main_products}} Wholesale process </mat-label>
|
||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Products" matTooltipPosition="above" (click)="deleteWholesale(w)"
|
||||
*ngIf="businessForm.controls.wholesale_trading_activity_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreWholesale()"
|
||||
matTooltip="Add More Wholesale Details" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Wholesale Details</strong>
|
||||
matTooltip="Add More Products" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Products</strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@ -881,13 +919,13 @@
|
||||
<mat-card-title>Service Provider Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="service_provider_activity_details">
|
||||
<mat-card *ngFor="let serviceprovider of businessForm.controls.service_provider_activity_details['controls']; let sp=index" [formGroupName]="sp">
|
||||
<mat-card *ngFor="let serviceprovider of businessForm.controls.service_provider_activity_details['controls']; let sp=index;let splast = last" [formGroupName]="sp">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 35%;">
|
||||
<input matInput type="text" placeholder="Services Provided" formControlName="main_products" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp)" required>
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp);CheckExport($event.value,4);" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
@ -1087,17 +1125,23 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<mat-form-field style="width: 92%">
|
||||
<mat-label>Description of {{serviceprovider.value.main_products}}</mat-label>
|
||||
<mat-label>Description of {{serviceprovider.value.main_products}} Service Process</mat-label>
|
||||
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
||||
</mat-form-field>
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Service" matTooltipPosition="above" (click)="deleteServiceprovider(sp)"
|
||||
*ngIf="businessForm.controls.service_provider_activity_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreServiceprovider()"
|
||||
matTooltip="Add More Service Provider Details" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Service Provider Details</strong>
|
||||
matTooltip="Add More Service " matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Service </strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
@ -1106,24 +1150,30 @@
|
||||
<mat-card-title>Other Details</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="others_activity_details">
|
||||
<mat-card *ngFor="let others of businessForm.controls.others_activity_details['controls']; let o=index" [formGroupName]="o">
|
||||
<mat-card *ngFor="let others of businessForm.controls.others_activity_details['controls']; let o=index;let olast = last" [formGroupName]="o">
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:92%;">
|
||||
<textarea matInput placeholder="Other Details" formControlName="others_details" required></textarea>
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
<div align="right">
|
||||
<button mat-raised-button mat-icon-button matTooltip="Delete Products" matTooltipPosition="above" (click)="deleteOthersActivity(o)"
|
||||
*ngIf="businessForm.controls.others_activity_details.controls.length > 1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</mat-card>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addMoreOthersActivity()"
|
||||
matTooltip="Add More Details" matTooltipPosition="left" color="primary">
|
||||
Add More Details
|
||||
matTooltip="Add More Products" matTooltipPosition="left" color="primary">
|
||||
Add More Products
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card *ngIf="ExportFlag">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Export Sale As a % Total Sales</mat-card-title>
|
||||
</mat-card-header>
|
||||
@ -1206,6 +1256,7 @@
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<div fxLayout="row nowrap">
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Total"
|
||||
formControlName="employees_total" required>
|
||||
@ -1218,6 +1269,13 @@
|
||||
<input matInput placeholder="Temporary" (change)="checkTotalEmployee(businessForm)"
|
||||
formControlName="employees_temporary" required>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-form-field style="width:62%">
|
||||
<input matInput placeholder="Approximate total monthly salary paid to employees" (keyup)="inWords($event,1)"
|
||||
formControlName="employees_appx_salary" required type="number">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="businessForm.controls['employees_appx_salary'].value != ''">{{"₹"}} {{appxSalaryAmtInwords}} Only</mat-hint>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
|
||||
@ -37,6 +37,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
form_id: number;
|
||||
pageTitle: string ="About Business";
|
||||
relationData: any = [];
|
||||
titleData: any = [];
|
||||
companyRelationShipList: any =[];
|
||||
//industryData: any = [];
|
||||
activityData: any = [];
|
||||
@ -45,6 +46,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
relativeNames: any;
|
||||
applicants: any;
|
||||
EntityTypeFlag : boolean = false;
|
||||
public businessForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
// businessEntityTypeList: any=["Private Limited Company","Proprietorship","Partnership","Limited Liability Partnership (LLP)","One Person Company (OPC)","Hindu Undivided Family (HUF)","Society","Cooperative","Trust","Public Ltd Company","Others"]
|
||||
@ -60,12 +62,15 @@ export class BusinessInfoComponent implements OnInit {
|
||||
maxDate:any;
|
||||
// InvestedAmountInWords:any;
|
||||
public relationSource= new MatTableDataSource();
|
||||
displayedColumns = ['family_member_name','relation','relation_to','relationship_with_company','started_business'];
|
||||
displayedColumns = ['title','family_member_name','relation','relation_to','relationship_with_company','started_business'];
|
||||
generalExistEntityType:string;
|
||||
generalExistEntityType_other:string;
|
||||
generalExistBusinessYear:Number;
|
||||
generalExistBusinessMonth:Number;
|
||||
errorMessage: any = [];
|
||||
errorMessageForExistTotalWorkExperience:any = [];
|
||||
ExportFlag: boolean = false;
|
||||
appxSalaryAmtInwords: any;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
@ -77,7 +82,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.company_name = this.pd_all_details.company_name;
|
||||
this.pageTitle = this.pd_all_details.company_name;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
this.applicants = this.pd_all_details.pdapplicants_detials;
|
||||
this.form_id = 13;
|
||||
this.notifier = notifier;
|
||||
@ -116,6 +121,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.getCountryDataList();
|
||||
this.initBusinessForm();
|
||||
this.getCompanyRelation();
|
||||
this.getTitle();
|
||||
// const Desgn = <FormArray>this.businessForm.controls['designation'];
|
||||
// const Partnr = <FormArray>this.businessForm.controls['partners'];
|
||||
// const otherDoc = <FormArray>this.businessForm.controls['documents'];
|
||||
@ -573,7 +579,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:[''],
|
||||
//month_of_business_run : [''],
|
||||
// peak_period_of_business : [''],
|
||||
//designation: this.fb.array([]),
|
||||
@ -581,6 +587,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
employees_total: ['', Validators.compose([Validators.required])],
|
||||
employees_permanent: ['', Validators.compose([Validators.required])],
|
||||
employees_temporary: ['', Validators.compose([Validators.required])],
|
||||
employees_appx_salary:['', Validators.compose([Validators.required])],
|
||||
officer_total: ['', Validators.compose([Validators.required])],
|
||||
// officer_permanent: ['', Validators.compose([Validators.required])],
|
||||
// officer_temporary: ['', Validators.compose([Validators.required])],
|
||||
@ -684,14 +691,12 @@ export class BusinessInfoComponent implements OnInit {
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Export"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Both") {
|
||||
@ -786,7 +791,6 @@ export class BusinessInfoComponent implements OnInit {
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
|
||||
}
|
||||
else if(getDetails.value.area_of_sale=="Export"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
@ -1039,6 +1043,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
})
|
||||
});
|
||||
}
|
||||
// get title master
|
||||
getTitle() {
|
||||
let master_name = 'TITLES';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.titleData.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
getCompanyRelation() {
|
||||
let master_name = 'COMPANYRELATIONSHIPS';
|
||||
@ -1076,7 +1091,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.businessEntityTypeList.business_entity_type_name = filterList[0].business_entity_type_id!=1 ? filterList[0].business_entity_type_name : this.generalExistEntityType_other;
|
||||
this.businessEntityTypeList.section_label = filterList[0].business_entity_type_id!=1 ? filterList[0].section_label : this.generalExistEntityType_other;
|
||||
|
||||
// console.log(this.businessEntityTypeList.business_entity_type_id+' , '+this.businessEntityTypeList.business_entity_type_name+' , '+this.businessEntityTypeList.section_label);
|
||||
// console.log(this.businessForm.controls.partners['controls']);
|
||||
// console.log(this.businessForm.controls.partners['controls'].length);
|
||||
// if(this.businessForm.controls.partners['controls'].length > 1)
|
||||
// {
|
||||
// console.log('asd');
|
||||
// }
|
||||
|
||||
if(this.businessEntityTypeList.business_entity_type_name == 'OPC (One Person Company)' || this.businessEntityTypeList.business_entity_type_name == 'Sole proprietorship'){
|
||||
this.EntityTypeFlag = true;
|
||||
}
|
||||
// data.records.forEach(val => {
|
||||
// this.businessEntityTypeList.push(val);
|
||||
// this.sourceNames[val.business_entity_type_id] = val.section_label
|
||||
@ -1122,6 +1147,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
createPersonRelationhip(details: any):FormGroup {
|
||||
return this.fb.group({
|
||||
other_family_relationship_id: [details.other_family_relationship_id,Validators.required],
|
||||
family_member_salutation:[details.family_member_salutation],
|
||||
family_member_name: [details.family_member_name,Validators.required],
|
||||
relationship_with_company_id: [details.relationship_with_company_id,Validators.required],
|
||||
relation_to_id: [details.relation_to_id,Validators.required],
|
||||
@ -1166,33 +1192,71 @@ export class BusinessInfoComponent implements OnInit {
|
||||
addMoreManufacturing() {
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
manufacturingControl.push(this.createActivity());
|
||||
}
|
||||
deleteManufacturing(findex){
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
manufacturingControl.removeAt(findex);
|
||||
}
|
||||
// add more retail details
|
||||
addMoreRetail() {
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
retailControl.push(this.createActivity());
|
||||
}
|
||||
|
||||
deleteRetail(index) {
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
retailControl.removeAt(index);
|
||||
}
|
||||
|
||||
// add more retail details
|
||||
addMoreWholesale() {
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
wholesaleControl.push(this.createActivity());
|
||||
}
|
||||
|
||||
deleteWholesale(index) {
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
wholesaleControl.removeAt(index);
|
||||
}
|
||||
|
||||
|
||||
// add more service provider details
|
||||
addMoreServiceprovider() {
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
serviceControl.push(this.createServiceActivity());
|
||||
}
|
||||
|
||||
deleteServiceprovider(index) {
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
serviceControl.removeAt(index);
|
||||
}
|
||||
|
||||
// add more others details
|
||||
addMoreOthersActivity() {
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.push(this.createOthersActivity());
|
||||
}
|
||||
|
||||
deleteOthersActivity(index) {
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.removeAt(index);
|
||||
}
|
||||
|
||||
// update partner group other form control
|
||||
changePartnerGroup(value,key) {
|
||||
let control: any = this.businessForm.get('partners') as FormArray;
|
||||
value=='Others' ? control.controls[key].addControl('partner_other_name', new FormControl('', Validators.required)) : control.controls[key].removeControl('partner_other_name');
|
||||
}
|
||||
|
||||
// Out of Total Export Sales what % of Sales is done in Albania?
|
||||
getPlaceHolderName(id){
|
||||
let name = this.countryDataList.filter(value=>value.country_id == id);
|
||||
// console.log(name);
|
||||
// console.log(name[0].country_name);
|
||||
// console.log(id);
|
||||
return 'Out of Total Export Sales what % of Sales is done in '+ name[0].country_name +' ?';
|
||||
// return name[0].country_name +'?';
|
||||
}
|
||||
// get work experience based on create form control
|
||||
getWorkExperience(event, key) {
|
||||
let current_experience = event.current_business_experiance_year=='' ? 0 : parseInt(event.current_business_experiance_year);
|
||||
@ -1247,12 +1311,48 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// let family: any = [];
|
||||
// console.log(this.businessForm.value);
|
||||
|
||||
|
||||
if(this.EntityTypeFlag == true){
|
||||
let control: any = <FormArray>this.businessForm.controls['partners'];
|
||||
let control2:any = <FormArray>control.controls[0];
|
||||
|
||||
control2.controls['shareholding'].clearValidators();
|
||||
control2.controls['shareholding'].updateValueAndValidity();
|
||||
control2.controls['shareholding'].setValue('100');
|
||||
|
||||
|
||||
// control.controls[0].removeControl('shareholding');
|
||||
// control.controls[0].removeControl('started_business');
|
||||
// control.controls[0].removeControl('current_business_experiance_year');
|
||||
// control.controls[0].removeControl('current_business_experiance_month');
|
||||
// control.controls[0].removeControl('total_business_experiance');
|
||||
|
||||
control2.controls['started_business'].setValue('');
|
||||
|
||||
control2.controls['current_business_experiance_year'].clearValidators();
|
||||
control2.controls['current_business_experiance_year'].updateValueAndValidity();
|
||||
control2.controls['current_business_experiance_year'].setValue('');
|
||||
|
||||
control2.controls['current_business_experiance_month'].setValue('');
|
||||
|
||||
control2.controls['total_business_experiance'].clearValidators();
|
||||
control2.controls['total_business_experiance'].updateValueAndValidity();
|
||||
control2.controls['total_business_experiance'].setValue('');
|
||||
// if(control2.controls['total_business_previous_experience'].value !=undefined){
|
||||
// control2.controls['total_business_previous_experience'].clearValidators();
|
||||
// control2.controls['total_business_previous_experience'].updateValueAndValidity();
|
||||
// control2.controls['total_business_previous_experience'].setValue('0');
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
if (!this.businessForm.valid) {
|
||||
this.notifier.notify('warning',"Please Check All Manatory Fields..");
|
||||
return;
|
||||
}
|
||||
// let design: any;
|
||||
let records = this.businessForm.value;
|
||||
// console.log(records);
|
||||
|
||||
//to check the Appx. sale validation.
|
||||
// this.validateAppxSales(records);
|
||||
@ -1269,6 +1369,22 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
|
||||
let validationFlag : number = 0;
|
||||
// let shareHoldValidationFlag : number = 0;
|
||||
// console.log(records.partners.length);
|
||||
console.log(records.partners);
|
||||
|
||||
if(records.partners.length > 0){
|
||||
let total = records.partners.map(shares => shares.shareholding).reduce((a, b) => a + +b, 0);
|
||||
if(total > 100){
|
||||
this.notifier.notify('warning',"Shareholding is greater than 100%");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('as');
|
||||
// return;
|
||||
// if(if(parseInt(datas.total_business_experiance) > parseInt(datas.current_business_experiance_year)) {)
|
||||
// return;
|
||||
|
||||
//type 1: Checking manufacturing_activity_details
|
||||
if(records.manufacturing_activity_details.length > 0){
|
||||
@ -1280,7 +1396,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
});
|
||||
let total = ManufacturingArray.reduce((sum, item) => sum + +item.approx_sale, 0);
|
||||
if(total > 100 || total < 100){
|
||||
validationFlag++;
|
||||
this.notifier.notify('warning',"Approximate sales doesn't add upto 100%");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -1362,7 +1478,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
otherFamilyMemberDialogue() {
|
||||
|
||||
let relationControl = <FormArray>this.businessForm.controls['persons_with_relationships'];
|
||||
let other_family_member: any= {'other_family_relationship_id':'','other_family_relationship_name':'','family_member_name':'','relationship_with_company_id':'','relationship_with_company':'','started_business':'','currently_active_status':''};
|
||||
let other_family_member: any= {'other_family_relationship_id':'','other_family_relationship_name':'','family_member_salutation':'','family_member_name':'','relationship_with_company_id':'','relationship_with_company':'','started_business':'','currently_active_status':''};
|
||||
relationControl.push(this.createPersonRelationhip(other_family_member));
|
||||
}
|
||||
|
||||
@ -1457,13 +1573,87 @@ export class BusinessInfoComponent implements OnInit {
|
||||
checkTotalEmployee(FormData){
|
||||
this.businessForm.controls['employees_total'].setValue((+FormData.value.employees_permanent ||0)+(+FormData.value.employees_temporary||0));
|
||||
}
|
||||
checkWithExistBusinessYear(e,i){
|
||||
if(e > this.generalExistBusinessYear){
|
||||
checkWithExistBusinessYear(e,i,members){
|
||||
|
||||
if(+e > this.generalExistBusinessYear){
|
||||
this.errorMessage[i] = "Higher than Business Vintage";
|
||||
members.controls.current_business_experiance_year.setValue('');
|
||||
}
|
||||
else{
|
||||
this.errorMessage[i] = '';
|
||||
}
|
||||
}
|
||||
|
||||
checkWithExistTotalWorkExperience(e,i,members){
|
||||
|
||||
if(+members.value.current_business_experiance_year > +e){
|
||||
this.errorMessageForExistTotalWorkExperience[i] = "Total Experience is Lower Than Experience in The Current Company";
|
||||
members.controls.total_business_experiance.setValue('');
|
||||
}
|
||||
else{
|
||||
this.errorMessageForExistTotalWorkExperience[i] = '';
|
||||
}
|
||||
}
|
||||
// flag: number = 0;
|
||||
// CheckExport(e,val){
|
||||
// console.log(e);
|
||||
// console.log(val);
|
||||
// console.log(this.)
|
||||
// if(val == 1){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 2){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 3){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(val == 4){
|
||||
// e != "Within India" ?
|
||||
// this.flag++ :this.flag--;
|
||||
// }
|
||||
// if(this.flag > 0){
|
||||
// this.ExportFlag = true;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
CheckExport(e,val){
|
||||
console.log(e);
|
||||
console.log(val);
|
||||
let flag: number = 0;
|
||||
if(val == 1){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 2){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 3){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(val == 4){
|
||||
e != "Within India" ?
|
||||
flag++ :flag--;
|
||||
}
|
||||
if(flag > 0){
|
||||
this.ExportFlag = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
inWords(e,flag){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.appxSalaryAmtInwords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -47,19 +47,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="manufacturing_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -68,8 +74,17 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="manufacturing_credit_days">
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt</mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
@ -134,19 +149,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -156,8 +177,17 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="trade_product_credit_days">
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
@ -176,7 +206,7 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 80%">
|
||||
<input matInput placeholder="% of Total Trading Product Credit Values" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
<input matInput placeholder="What % of Total Trade is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
@ -222,19 +252,25 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Client Contact Person Mobile Number" formControlName="service_provider_product_contact_person_mobile_number">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Client Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -243,8 +279,17 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No. of Days of Credit Given for Payment Receipt" formControlName="service_provider_product_credit_days">
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('service_provider_product_payment_type').value == 3">
|
||||
<mat-label>No. of Days of Credit Given for Payment Receipt </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="service_provider_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="service_provider_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div align="end">
|
||||
@ -263,7 +308,7 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 80%">
|
||||
<input matInput placeholder="What % of Total Services Provided Are on Credit?" formControlName="service_products_total_payments_percent_on_credit"
|
||||
<input matInput placeholder="What % of Total Services Provided is done on Credit?" formControlName="service_products_total_payments_percent_on_credit"
|
||||
type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -81,6 +81,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
this.form_id = 2;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
}
|
||||
public viewerOptions: any = {
|
||||
navbar: false,
|
||||
@ -356,6 +357,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -369,6 +371,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -393,11 +396,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [''],
|
||||
trade_product_frequency_of_purchase: [''],
|
||||
trade_product_credit_days: [''],
|
||||
trade_product_credit_days_from: [''],
|
||||
trade_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -407,11 +412,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
trade_product_payment_type: [records.trade_product_payment_type],
|
||||
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
|
||||
trade_product_credit_days: [records.trade_product_credit_days],
|
||||
trade_product_credit_days_from: [records.trade_product_credit_days_from],
|
||||
trade_product_credit_days_to: [records.trade_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -436,11 +443,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
service_provider_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [''],
|
||||
service_provider_product_frequency_of_purchase: [''],
|
||||
service_provider_product_credit_days: [''],
|
||||
service_provider_product_credit_days_from: [''],
|
||||
service_provider_product_credit_days_to: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
@ -450,11 +459,13 @@ export class ClientInfoComponent implements OnInit {
|
||||
service_provider_product_contact_person_mobile_number: [records.service_provider_product_contact_person_mobile_number,Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
service_provider_product_payment_type: [records.service_provider_product_payment_type],
|
||||
service_provider_product_frequency_of_purchase: [records.service_provider_product_frequency_of_purchase],
|
||||
service_provider_product_credit_days: [records.service_provider_product_credit_days],
|
||||
service_provider_product_credit_days_from: [records.service_provider_product_credit_days_from],
|
||||
service_provider_product_credit_days_to: [records.service_provider_product_credit_days_to],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_designation || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
other_person_designation:[records.other_person_designation || null],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -528,8 +539,7 @@ export class ClientInfoComponent implements OnInit {
|
||||
data => {
|
||||
if (data.dataStatus) {
|
||||
if(type==1){
|
||||
this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
|
||||
|
||||
this.companyRelationShipList=data.records;// .filter(item => item.name != 'Others');
|
||||
}
|
||||
if(type==2){
|
||||
this.titleList=data.records.filter(val=>val.isactive==1);
|
||||
|
||||
@ -39,28 +39,28 @@
|
||||
<!-- {{frequencyData | json}} -->
|
||||
<!-- Loan type, Loan amount, Lender, Loan Taken By, Instalment Frequency, Instalment Amount, Original Tenure, Balance Tenure -->
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Loan Type" formControlName="loan_type" >
|
||||
<mat-option value="{{types.existing_loan_type_id}}" *ngFor="let types of loanTypeData">{{types.loan_type_name}}</mat-option>
|
||||
</mat-select>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Loan Type" formControlName="loan_type" > -->
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('loan_type').value == 1 ">
|
||||
<mat-form-field *ngIf="details.get('loan_type').value == 1 " style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Specify Loan Type" formControlName="others_loan_type">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Loan Amount" formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint my-mat-hint align="start" style="font-size:90%" *ngIf="details.get('loan_amount').value != ''">{{"₹"}} {{amtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Lender" formControlName="lender" >
|
||||
<mat-option *ngFor="let btLen of lenderData" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="details.get('lender').value == 3">
|
||||
<mat-form-field *ngIf="details.get('lender').value == 3" style="width:45%;">
|
||||
<input matInput autocomplete="off" placeholder="Specify Lender" formControlName="others_lender" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<!-- <mat-select placeholder="Loan Taken By" formControlName="loan_taken_by" (selectionChange)="selectedBorrower($event.value,i)">
|
||||
<mat-option value="{{owner.pd_co_applicant_id}}" *ngFor="let owner of applicants">{{owner.applicant_name}}</mat-option>
|
||||
<!-- <mat-option value= 0 >Others</mat-option> ->
|
||||
@ -75,12 +75,12 @@
|
||||
</mat-form-field>
|
||||
<!-- {{details.get('loan_taken_by').value}} -->
|
||||
<!-- <mat-form-field *ngIf="details.get('loan_taken_by').value == 0"> -->
|
||||
<mat-form-field *ngIf="checkOthers(details.get('loan_taken_by').value)===true" style="width:45%">
|
||||
<mat-form-field style="width:45%;" *ngIf="checkOthers(details.get('loan_taken_by').value)===true">
|
||||
<input matInput autocomplete="off" placeholder="Specify Borrower" formControlName="others_loan_taken">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Frequency" (selectionChange)="selectedfrequency($event.value,i)"
|
||||
<mat-select placeholder="Instalment Frequency" (selectionChange)="selectedfrequency($event.value,i)"
|
||||
formControlName="frequency" >
|
||||
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
|
||||
</mat-select>
|
||||
@ -121,7 +121,7 @@
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button *ngIf="!last" type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<button *ngIf="currentLoanForm.controls.loan_details.controls.length > 1" type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button matTooltip="Delete" matTooltipPosition="above" (click)="deleteLoanDetails(i)">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -89,7 +89,61 @@ export class CurrentLoanComponent implements OnInit {
|
||||
this.getMasterDetails('FREQUENCY',2);
|
||||
this.getMasterDetails('EXISTINGLOANTYPES',3);
|
||||
this.initCurrentloanForm();
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
// console.log('value', value);
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (value.status == 200) {
|
||||
// console.log(value.status);
|
||||
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];
|
||||
});
|
||||
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);
|
||||
control.push(this.createLoanDetail(null));
|
||||
this.selectedfrequency(val.frequency,index);
|
||||
//this.selectedLoanTakenBy(val.loan_taken_by,index);
|
||||
});
|
||||
this.currentLoanForm.controls['loan_details'].setValue(result);
|
||||
} else {
|
||||
// control.push(this.createLoanDetail());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log('else part',value.status);
|
||||
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||
// console.log(data);
|
||||
|
||||
@ -161,64 +215,6 @@ export class CurrentLoanComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{
|
||||
if(data.dataStatus){
|
||||
this.existCompanyList = data.records.filter(val =>val.is_active===true);
|
||||
}
|
||||
|
||||
let modifyCompanyList : any=[];
|
||||
if(this.existCompanyList.length>0){
|
||||
modifyCompanyList = this.existCompanyList.map(element => {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
let params: any = {};
|
||||
params.pd_id = this.pdid;
|
||||
params.pd_form_id = this.form_id;
|
||||
|
||||
this._pd.retriveForm(params).subscribe(value => {
|
||||
// console.log('value', value);
|
||||
const control = <FormArray>this.currentLoanForm.controls['loan_details'];
|
||||
if (value.status == 200) {
|
||||
|
||||
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];
|
||||
});
|
||||
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);
|
||||
control.push(this.createLoanDetail(null));
|
||||
this.selectedfrequency(val.frequency,index);
|
||||
//this.selectedLoanTakenBy(val.loan_taken_by,index);
|
||||
});
|
||||
this.currentLoanForm.controls['loan_details'].setValue(result);
|
||||
} else {
|
||||
// control.push(this.createLoanDetail());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// console.log('overall else');
|
||||
|
||||
// control.push(this.createLoanDetail());
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@ -22,13 +22,16 @@
|
||||
<input matInput placeholder="Name" formControlName="applicant_name" type="text" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
<input matInput placeholder="Age" formControlName="age" minlength="1" maxlength="3" (keypress)="keyPress($event)" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%">
|
||||
<mat-select placeholder="Qualification" formControlName="qualification" style="width: 75%;">
|
||||
<mat-option *ngFor="let qual of qualificationList" [value]="qual.qualification_id">{{qual.qualification_name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 60%" [style.visibility]="applicant.get('qualification').value == '' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex.xs="100%" fxFlex.sm="100%" fxFlex="45%">
|
||||
@ -50,7 +53,7 @@
|
||||
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()"><mat-icon>add</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add List" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()" *ngIf="!EditFlag" ><mat-icon>add</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import { Component, OnInit, Input, Output, Inject } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators, FormControl, FormArray } from '@angular/forms';
|
||||
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
|
||||
import { PdTrigerService } from './../../../../../../pd-service/pd-triger.service';
|
||||
import { bool } from 'aws-sdk/clients/signer';
|
||||
|
||||
@Component({
|
||||
selector: 'app-other-applicant-details',
|
||||
@ -11,14 +12,33 @@ import { PdTrigerService } from './../../../../../../pd-service/pd-triger.servic
|
||||
export class OtherApplicantDetailsComponent implements OnInit {
|
||||
pageTitle: string ="Add Name of Person(s) Met and Individual Loan Applicant(s) ";
|
||||
public _OtherForm: FormGroup;
|
||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:''};
|
||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
|
||||
titleList: any=[];
|
||||
qualificationList: any=[];
|
||||
EditGeneralFormData: any=[];
|
||||
EditFlag: boolean = false;
|
||||
|
||||
constructor(private _fb: FormBuilder, private _pd: PdTrigerService, @Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) { }
|
||||
constructor(private _fb: FormBuilder,
|
||||
private _pd: PdTrigerService,
|
||||
@Inject(MAT_DIALOG_DATA) public generalFormData : any,
|
||||
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
|
||||
if(generalFormData != ''){
|
||||
this.EditGeneralFormData = generalFormData.value;
|
||||
this.EditFlag = true;
|
||||
}
|
||||
console.log(this.EditGeneralFormData);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initFormDetails();
|
||||
|
||||
if(!this.EditFlag){
|
||||
console.log('init if',this.EditGeneralFormData);
|
||||
this.initFormDetails(null);
|
||||
}
|
||||
else{
|
||||
console.log('init else',this.EditGeneralFormData);
|
||||
this.initFormDetails(this.EditGeneralFormData);
|
||||
}
|
||||
this.getMasterDetails('TITLES',1);
|
||||
this.getMasterDetails('EDUQUALIFICATION',2);
|
||||
}
|
||||
@ -39,14 +59,25 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
// init form
|
||||
initFormDetails() {
|
||||
initFormDetails(data : any) {
|
||||
console.log('data',data);
|
||||
if(data == null){
|
||||
console.log('if data',data);
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
||||
});
|
||||
}
|
||||
}
|
||||
else{
|
||||
console.log('else data',data);
|
||||
this._OtherForm = this._fb.group({
|
||||
applicant_list: this._fb.array([this.updateApplicant(this.EditGeneralFormData)]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// create applicant form array
|
||||
createApplicant(elementValue:any){
|
||||
console.log("create applicants",elementValue);
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||
@ -54,7 +85,22 @@ createApplicant(elementValue:any){
|
||||
is_applicant:[false],
|
||||
is_person_met:[false],
|
||||
age:[''],
|
||||
qualification: ['']
|
||||
qualification: [''],
|
||||
course_name:['']
|
||||
});
|
||||
}
|
||||
|
||||
updateApplicant(elementValue:any){
|
||||
console.log("update applicants",elementValue);
|
||||
return this._fb.group({
|
||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||
applicant_name:[elementValue.applicant_name,Validators.required],
|
||||
is_applicant:[elementValue.is_applicant ? true : false],
|
||||
is_person_met:[elementValue.is_person_met ? true : false],
|
||||
age:[elementValue.age || ''],
|
||||
qualification: [elementValue.qualification || ''],
|
||||
course_name:[elementValue.course_name || '']
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@
|
||||
<mat-card-content>
|
||||
|
||||
<div>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Select a person" formControlName="selected_person" (selectionChange)="selectedPerson($event.value,ix)" required>
|
||||
<mat-option value="{{person.pd_co_applicant_id}}" *ngFor="let person of selectPerson">
|
||||
{{person.applicant_name}}
|
||||
@ -291,30 +291,33 @@
|
||||
</div>
|
||||
<div>
|
||||
<h5>Residence Details</h5>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="State" formControlName="residence_state" required (selectionChange)="getCity($event.value,ix)" >
|
||||
<mat-option value="{{s.state_id}}" *ngFor="let s of stateData">
|
||||
{{s.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="City" formControlName="residence_city" required>
|
||||
<mat-option *ngFor="let c of cityData[ix]" [value]="c.city_id" >
|
||||
{{c.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Place" formControlName="residence_place" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select matInput placeholder="Pin" formControlName="residence_pin" required>
|
||||
<mat-option *ngFor="let p of pincodeData[ix]" [value]="p.pincode_id">
|
||||
{{p.pincode}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="sup.get('residence_pin').value == 1" style="width:45%;">
|
||||
<input matInput placeholder="Specify PinCode" formControlName="residence_other_pincode">
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field>
|
||||
<input matInput placeholder="City" formControlName="residence_city" required>
|
||||
@ -327,7 +330,7 @@
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" type="number" required>
|
||||
<input matInput placeholder="Number of yrs" formControlName="residence_No_of_years" (keypress)="keyPress($event)" required>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
@ -342,8 +345,9 @@
|
||||
<input matInput placeholder="Please specify" formControlName="ownershipOther">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3">
|
||||
<input matInput placeholder="Rent Amount" formControlName="rent">
|
||||
<mat-form-field *ngIf="sup.get('residence_ownership').value == 3" style="width:43%;">
|
||||
<input matInput placeholder="Rent Amount" formControlName="rent" (keypress)="keyPress($event)" (keyup)="inWords($event,1,i)">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="sup.get('rent').value != ''">{{"₹"}} {{RentAmount[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <div>
|
||||
@ -382,23 +386,24 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="item.get('family_member_earning_status').value == 1">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<mat-select placeholder="Segment" formControlName="earning_segment" required>
|
||||
<mat-option value="{{earn.earning_member_status_id}}" *ngFor="let earn of earningData">
|
||||
{{earn.earning_member_status}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('earning_segment').value==1">
|
||||
<mat-form-field style="width:45%;" *ngIf="item.get('earning_segment').value==1">
|
||||
<input matInput placeholder="Specify Others" formControlName="earning_if_others_segment">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" required>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Income Per Month" formControlName="earning_gross_income_per_month" (keypress)="keyPress($event)" (keyup)="inWords($event,2,i)" required>
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="item.get('earning_gross_income_per_month').value != ''">{{"₹"}} {{IncomePerMonth[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Name of the Employer/Business" formControlName="earning_name_of_the_employer_or_business" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="No. of years in Employer/Business" formControlName="earning_number_of_years_in_employment_or_business"
|
||||
required>
|
||||
</mat-form-field>
|
||||
@ -423,18 +428,18 @@
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addFamilyMembers(i)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Family Members </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="removeFamilyMembers(i)"
|
||||
matTooltip="Delete Family Members" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addFamilyMembers(i)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Family Members </strong>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
|
||||
@ -295,6 +295,8 @@ import { ActivatedRoute, Router } from "@angular/router";
|
||||
styleUrls: ['./family-details.component.scss']
|
||||
})
|
||||
export class FamilyDetailsComponent implements OnInit {
|
||||
IncomePerMonth: any =[];
|
||||
RentAmount: any = [];
|
||||
//@Input() pdid: number;
|
||||
pageTitle: string = "Family Details";
|
||||
pdid: string;
|
||||
@ -551,6 +553,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
residence_city: ['', Validators.compose([])],
|
||||
residence_state: ['', Validators.compose([])],
|
||||
residence_pin: ['', Validators.compose([])],
|
||||
residence_other_pincode:[''],
|
||||
residence_No_of_years: ['', Validators.compose([])],
|
||||
residence_ownership: ['', Validators.compose([])],
|
||||
ownershipOther: [''],
|
||||
@ -562,6 +565,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
control.push(formData);
|
||||
} else {
|
||||
records.forEach((val,index) => {
|
||||
this.RentAmount[index] = this._pd.convertNumberToWords(val.rent);
|
||||
//for (let val of records)
|
||||
this.getCity(val.residence_state,index);
|
||||
let formData: FormGroup = this.fb.group({
|
||||
@ -570,6 +574,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
residence_city: [val.residence_city, Validators.compose([])],
|
||||
residence_state: [val.residence_state, Validators.compose([])],
|
||||
residence_pin: [val.residence_pin, Validators.compose([])],
|
||||
residence_other_pincode:[val.residence_other_pincode],
|
||||
residence_No_of_years: [val.residence_No_of_years, Validators.compose([])],
|
||||
residence_ownership: [val.residence_ownership, Validators.compose([])],
|
||||
ownershipOther: [val.ownershipOther || null],
|
||||
@ -590,7 +595,9 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
|
||||
addFamilyMemberDetailsWithData(inx, val): void {
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
for (let vals of val) {
|
||||
val.forEach((vals,index) => {
|
||||
// for (let vals of val) {
|
||||
this.IncomePerMonth[index] = this._pd.convertNumberToWords(vals.earning_gross_income_per_month);
|
||||
let datas = this.fb.group({
|
||||
family_member_name: [vals.family_member_name || null, Validators.compose([])],
|
||||
family_member_relationship: [vals.family_member_relationship || null, Validators.compose([])],
|
||||
@ -607,7 +614,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
non_earning_if_schoolorcollege: [vals.non_earning_if_schoolorcollege || null],
|
||||
});
|
||||
control.push(datas);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
addFamilyMemberDetails() {
|
||||
@ -659,6 +666,7 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
}
|
||||
|
||||
addFamilyMembers(inx) {
|
||||
console.log(inx);
|
||||
const control = <FormArray>this.familyForm.controls['family_details']['controls'][inx].controls.family_members_details;
|
||||
control.push(this.generateFamilyMembersDetailsGet());
|
||||
}
|
||||
@ -796,14 +804,28 @@ removeFamilyMembers(index) {
|
||||
// });
|
||||
// }
|
||||
|
||||
// /** On Key Press Event For Age */
|
||||
// keyPress(event: any) {
|
||||
// const pattern = /[0-9]/;
|
||||
/** On Key Press Event For Age */
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9]/;
|
||||
|
||||
// let inputChar = String.fromCharCode(event.charCode);
|
||||
// if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
// event.preventDefault();
|
||||
// }
|
||||
// }
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,flag:number,i){
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.RentAmount[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 2 :
|
||||
this.IncomePerMonth[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -34,6 +34,27 @@
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width:40%;">
|
||||
<mat-select placeholder="PD Officers Recommendation:" formControlName="pd_officers_recommendation" required>
|
||||
<mat-option value=2>Positive</mat-option>
|
||||
<mat-option value=3>Negative</mat-option>
|
||||
<mat-option value=4>Refer to Credit</mat-option>
|
||||
<mat-option value=1>Others</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 3">
|
||||
<input matInput autocomplete="off" placeholder="Enter reason for Negative" formControlName="enter_reason_for_negative">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Others" formControlName="others_pd_officers_recommendation">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%;" *ngIf="_finalRemarkForm.controls['pd_officers_recommendation'].value == 4">
|
||||
<input matInput autocomplete="off" placeholder="Enter reason for Refer to Credit" formControlName="enter_reason_for_refer_to_credit">
|
||||
</mat-form-field>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<div fxFlex="60" class="pb-0 text-sm-left" align="left">
|
||||
@ -48,3 +69,4 @@
|
||||
</mat-dialog-actions>
|
||||
</form>
|
||||
</div>
|
||||
<notifier-container></notifier-container>
|
||||
@ -58,6 +58,10 @@ export class FinalRemarksComponent implements OnInit {
|
||||
final_custormer_remark_type : [],
|
||||
final_other_customer_behaviour:[],
|
||||
is_service_provided: ['', Validators.required],
|
||||
pd_officers_recommendation:['', Validators.required],
|
||||
others_pd_officers_recommendation:[''],
|
||||
enter_reason_for_negative:[''],
|
||||
enter_reason_for_refer_to_credit:[''],
|
||||
final_form_remarks: ['',Validators.required]
|
||||
});
|
||||
this.getM_Type();
|
||||
@ -88,6 +92,10 @@ export class FinalRemarksComponent implements OnInit {
|
||||
if(data.dataStatus){
|
||||
this._finalRemarkForm.controls.final_custormer_remark_type.setValue(data.records.final_custormer_remark_type);
|
||||
this._finalRemarkForm.controls.final_other_customer_behaviour.setValue(data.records.final_other_customer_behaviour);
|
||||
this._finalRemarkForm.controls.pd_officers_recommendation.setValue(data.records.pd_officers_recommendation);
|
||||
this._finalRemarkForm.controls.others_pd_officers_recommendation.setValue(data.records.others_pd_officers_recommendation);
|
||||
this._finalRemarkForm.controls.enter_reason_for_negative.setValue(data.records.enter_reason_for_negative);
|
||||
this._finalRemarkForm.controls.enter_reason_for_refer_to_credit.setValue(data.records.enter_reason_for_refer_to_credit);
|
||||
this._finalRemarkForm.controls.is_service_provided.setValue(data.records.is_service_provided);
|
||||
this._finalRemarkForm.controls.final_form_remarks.setValue(data.records.final_form_remarks);
|
||||
this.noRecordsFound = true;
|
||||
|
||||
@ -27,16 +27,17 @@
|
||||
</mat-card-header>
|
||||
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:25%">
|
||||
<mat-form-field style="width:31%">
|
||||
|
||||
<mat-select placeholder="Financial Statements ?" formControlName="is_financial_statements" (selectionChange)="selectedStatement($event)">
|
||||
<mat-select placeholder="Financial Statements Available ?" formControlName="is_financial_statements" (selectionChange)="selectedStatement($event)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<span *ngIf="isDisplay">
|
||||
<div *ngIf="isDisplay">
|
||||
<mat-form-field style="width:37%">
|
||||
<mat-label>Enter year from which financials provided</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="financial_starting_year" (keypress)="keyPress($event)" [readonly]="isReadOnly">
|
||||
@ -50,9 +51,9 @@
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Number of Financial Years" formControlName="financial_no_of_year" (change)="dynamicalFinYear($event)" (keypress)="keyPress($event)" [readonly]="isReadOnly">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div *ngIf="financial_no_of_year != ''" formArrayName="date_per_financial">
|
||||
<!-- <div formArrayName="date_per_financial"> -->
|
||||
<div *ngFor="let details of financialForm.controls.date_per_financial['controls']; let i=index" [formGroupName]="i">
|
||||
@ -72,7 +73,7 @@
|
||||
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:60%">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' " >
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value == 0">
|
||||
No difference in Sales in FY <i> {{details.get('financial_year').value}} </i> over Sales in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
@ -92,8 +93,7 @@
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:30%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" > -->
|
||||
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="finanical_profit_or_loss" >
|
||||
<!-- (selectionChange)="selectedProfitOrLossType($event,1)> -->
|
||||
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="finanical_profit_or_loss" (selectionChange)="selectedProfitOrLossType($event,details)">
|
||||
<mat-option value="1" >Net Profit</mat-option>
|
||||
<mat-option value="2" >Net Loss</mat-option>
|
||||
</mat-select>
|
||||
@ -105,7 +105,7 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_profit').value != ''">{{"₹"}} {{FY_netProfitAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" readonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
@ -115,14 +115,14 @@
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_net_loss').value != ''">{{"₹"}} {{FY_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales in %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" reaonly>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >
|
||||
<span *ngIf="details.get('financial_variation').value == 0">
|
||||
No difference in Profit in FY <i> {{details.get('financial_year').value}} </i> over Profit in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
@ -140,7 +140,7 @@
|
||||
|
||||
<mat-form-field style="width:45%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" placeholder="Variation of Profit % over sales" formControlName="financial_profit_to_sale_variation" (keypress)="keyPress($event)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_profit_to_sale_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_profit_to_sale_variation'].value > 40) || (details.controls['financial_profit_to_sale_variation'].value < -40)}" readonly>
|
||||
<span *ngIf="details.get('financial_profit_to_sale_variation').value == 0">
|
||||
No difference in Profit sales % in FY <i> {{details.get('financial_year').value}} </i> over Profit sales % in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
|
||||
</span>
|
||||
@ -160,7 +160,7 @@
|
||||
</div>
|
||||
<span *ngIf="isDisplay">
|
||||
<mat-form-field *ngIf="financial_no_of_year != '' && customerCommentsFlag" style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Customer Comments on Financials" formControlName="financial_reason" >
|
||||
<input matInput autocomplete="off" placeholder="Comments on Financials" formControlName="financial_reason" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</mat-card>
|
||||
@ -176,7 +176,7 @@
|
||||
</mat-card-header>
|
||||
|
||||
<mat-form-field *ngIf="isDisplay" style="width:35%">
|
||||
<mat-select placeholder="Same as Financial Statements?" formControlName="is_financial_customer" (selectionChange)="selectedFinancialCustomer($event)">
|
||||
<mat-select placeholder="Same as Financial Statements ?" formControlName="is_financial_customer" (selectionChange)="selectedFinancialCustomer($event)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
@ -196,31 +196,41 @@
|
||||
<!-- <br> -->
|
||||
<!-- <span style="width:10%;padding-left:2%"><p>Sales</p></span> -->
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Sales From" formControlName="estimate_sales_from" (change)="calculateSalesAverage(i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales From" formControlName="estimate_sales_from" (change)="calculateSalesAverage(i, details);" (keyup)="inWords($event,i,11)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_from').value != ''">{{"₹"}} {{AV_SalesFrmInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <span style="width:10%;padding-left:2%"><p>to</p></span> -->
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Sales To" formControlName="estimate_sales_to" (change)="confirmAlert(i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sales To" formControlName="estimate_sales_to" (change)="confirmAlert(i, details);" (keyup)="inWords($event,i,12)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_to').value != ''">{{"₹"}} {{AV_SalesToInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <span style="width:10%;padding-left:2%"><p>Average</p></span> -->
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Sales Average" formControlName="estimate_sales_average">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_average').value != ''"></mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Considered Sales Average" formControlName="estimate_sales_average" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_sales_average').value != ''">{{"₹"}} {{AV_SalesInwords[i]}} Only</mat-hint>
|
||||
<!-- //{{"₹"}} {{AV_SalesInwords[i]}} Only -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-form-field style="width:39%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" > -->
|
||||
<mat-select placeholder="Is there Net Profit or Net Loss?" formControlName="estimate_profit_or_loss" >
|
||||
<mat-select placeholder="Was there Net Profit or Net Loss?" formControlName="estimate_profit_or_loss" >
|
||||
<!-- (selectionChange)="selectedProfitOrLossType($event.value,2)"> -->
|
||||
<mat-option value="1" >Net Profit</mat-option>
|
||||
<mat-option value="2" >Net Loss</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="details.get('estimate_profit_or_loss').value == 1 ">
|
||||
|
||||
<mat-form-field style="width:40%" *ngIf="details.get('estimate_profit_or_loss').value != '' ">
|
||||
<mat-select placeholder="Is there Net Margin information Available?" formControlName="estimate_net_margin_availablity" >
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <span *ngIf="details.get('estimate_profit_or_loss').value == 1 "> -->
|
||||
|
||||
<!-- <mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" (keyup)="inWords($event,i,5)">
|
||||
@ -229,62 +239,71 @@
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales in %" formControlName="estimate_margin_of_profit" (change)="calProfitAndLossVal(i,details); calVariation( i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field> -->
|
||||
<div style="width:100%">
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit From" formControlName="estimate_profit_range_from" type="number" (change)="calculateMarginProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit From" formControlName="estimate_profit_range_from" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit To" formControlName="estimate_profit_range_to" type="number" (change)="calculateMarginProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit To" formControlName="estimate_profit_range_to" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_profit_margin').value != ''">{{"₹"}} {{details.get('estimate_profit_margin').value}} ( {{AV_marginProfitAmtInwords[i]}} Only ) </mat-hint>
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" 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>
|
||||
</div>
|
||||
<div style="width:100%">
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount From" formControlName="estimate_net_profit_from" type="number" (change)="calculateProfitAmount(i, details);">
|
||||
<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="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_from').value != ''">{{"₹"}} {{AV_netProfitAmtFrmInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount To" formControlName="estimate_net_profit_to" type="number" (change)="calculateProfitAmount(i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount To" formControlName="estimate_net_profit_to" type="number" (change)="calculateProfitAmount(i, details);" (keyup)="inWords($event,i,8)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit_to').value != ''">{{"₹"}} {{AV_netProfitAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">( {{details.get('estimate_net_profit_percent').value }} % )</mat-hint>
|
||||
<!-- //{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only -->
|
||||
<input matInput autocomplete="off" placeholder="Considered Profit Amount" formControlName="estimate_net_profit" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{AV_netProfitAmtInwords[i]}} Only ( {{details.get('estimate_net_profit_percent').value }} % )</mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</span>
|
||||
<!-- </span> -->
|
||||
|
||||
|
||||
<span *ngIf="details.get('estimate_profit_or_loss').value == 2 ">
|
||||
<div style="width:100%">
|
||||
<!-- <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 style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss From" formControlName="estimate_loss_range_from" type="number" (change)="calculateLossProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss From" formControlName="estimate_loss_range_from" type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss To" formControlName="estimate_loss_range_to" type="number" (change)="calculateLossProfit( i, details);">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss To" formControlName="estimate_loss_range_to" type="number" (change)="calculateMarginLoss( i, details);">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_loss_margin').value != ''">{{"₹"}} {{details.get('estimate_Loss_margin').value}} </mat-hint>
|
||||
<!-- //( {{AV_marginLossAmtInwords[i]}} Only ) -->
|
||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" 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>
|
||||
</div>
|
||||
<div style="width:100%">
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'no' ">
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount From" formControlName="estimate_net_loss_from" type="number" (change)="calculateLossAmount(i, details);">
|
||||
<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="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_from').value != ''">{{"₹"}} {{AV_netLossAmtFrmInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount To" formControlName="estimate_net_loss_to" type="number" (change)="calculateLossAmount(i, details);">
|
||||
<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="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss_to').value != ''">{{"₹"}} {{AV_netLossAmtToInwords[i]}} Only </mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:25%">
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''"> ( {{details.get('estimate_net_loss_percent').value }} % )</mat-hint>
|
||||
<!-- //{{"₹"}} {{AV_netLossAmtInwords[i]}} Only -->
|
||||
<input matInput autocomplete="off" placeholder="Considered Loss Amount" formControlName="estimate_net_loss" type="number" readonly>
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}} {{AV_netLossAmtInwords[i]}} Only ( {{details.get('estimate_net_loss_percent').value }} % )</mat-hint>
|
||||
<!-- // -->
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2">
|
||||
<mat-form-field style="width:83%">
|
||||
<input matInput autocomplete="off" placeholder="What is the reason for the Loss?" formControlName="estimate_reason_for_loss">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- <mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" (keyup)="inWords($event,i,6)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_loss').value != ''">{{"₹"}} {{AV_netLossAmtInwords[i]}} Only</mat-hint>
|
||||
@ -292,7 +311,7 @@
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calProfitAndLossVal(i,details); calVariation( i, details)" >
|
||||
</mat-form-field> -->
|
||||
</span>
|
||||
<!-- </span> -->
|
||||
</div>
|
||||
<!-- <mat-form-field *ngIf="i != 0" style="width:65%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year in %" formControlName="estimate_variation" (keypress)="keyPress($event)">
|
||||
|
||||
@ -39,11 +39,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
public financialForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
|
||||
// SalesStatement : any = [];
|
||||
// marginVal: any = [] ;
|
||||
// placeholderName : any = [];
|
||||
// setmargin: AbstractControl;
|
||||
|
||||
customerCommentsFlag :boolean;
|
||||
|
||||
//Array for Amount Inwords
|
||||
@ -60,6 +55,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
//isreadonly for edit(no of year Fields and Starting Years )
|
||||
isReadOnly : boolean = false;
|
||||
isDisplay : boolean ;
|
||||
AV_netProfitAmtFrmInwords: any = [];
|
||||
AV_netProfitAmtToInwords: any = [];
|
||||
AV_netLossAmtFrmInwords: any = [];
|
||||
AV_netLossAmtToInwords: any = [];
|
||||
AV_SalesFrmInwords: any = [];
|
||||
AV_SalesToInwords: any = [];
|
||||
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
@ -72,6 +74,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
this.form_id = 14;
|
||||
this.company_id =this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
}
|
||||
|
||||
//ViewerOption For Docs Display
|
||||
@ -110,7 +113,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if (value.status == 200) {
|
||||
let retriveData = value.records;
|
||||
// this.isReadOnly = true;
|
||||
|
||||
if(value.records.is_financial_statements == 'yes'){
|
||||
/** Backend Data of Asper Statement */
|
||||
@ -141,22 +143,17 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if (result_val.length > 0) {
|
||||
result_val.forEach((val,index) => {
|
||||
// console.log(val);
|
||||
// console.log('val.estimate_sales_average',val.estimate_sales_average);
|
||||
// if(isNaN(val.estimate_sales_average)){
|
||||
// alert(val.estimate_sales_average + " is not a number <br/>");
|
||||
// }else{
|
||||
// alert(val.estimate_sales_average + " is a number <br/>");
|
||||
// }
|
||||
//console.log('dedrf',val.estimate_annual_sale);
|
||||
// this.AV_annualSalesInwords[index] = this._pd.convertNumberToWords(val.estimate_annual_sale);
|
||||
// this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_profit);
|
||||
// this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_loss);
|
||||
this.AV_SalesInwords = this._pd.convertNumberToWords(+val.estimate_sales_average);
|
||||
this.AV_marginProfitAmtInwords = this._pd.convertNumberToWords(+val.estimate_profit_margin);
|
||||
this.AV_netProfitAmtInwords = this._pd.convertNumberToWords(+val.estimate_net_profit);
|
||||
this.AV_marginLossAmtInwords = this._pd.convertNumberToWords(+val.estimate_loss_margin);
|
||||
this.AV_netLossAmtInwords = this._pd.convertNumberToWords(+val.estimate_net_loss);
|
||||
this.AV_SalesInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_average));
|
||||
this.AV_SalesFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_from));
|
||||
this.AV_SalesToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_to));
|
||||
this.AV_marginProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_profit));
|
||||
this.AV_marginLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_loss_margin));
|
||||
this.AV_netLossAmtFrmInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netLossAmtToInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin));
|
||||
this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_loss));
|
||||
estimated_val.push(this.createValue(''));
|
||||
});
|
||||
retriveData.estimated_value = result_val;
|
||||
@ -208,6 +205,9 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/** CREATING financial Statement ( financial_year AutoGenerate ) */
|
||||
createDate(date) {
|
||||
return this.fb.group({
|
||||
@ -227,26 +227,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
/** CREATING financial Customer ( financial_year AutoGenerate ) */
|
||||
createValue(date) {
|
||||
return this.fb.group({
|
||||
// estimate_year: [date, Validators.compose([Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
||||
// estimate_annual_sale: ['', Validators.compose([Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||
// estimate_sales_from: [''],
|
||||
// estimate_sales_to: [''],
|
||||
// estimate_sales_average: [''],
|
||||
// estimate_profit_or_loss:[''],
|
||||
// estimate_net_profit: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// estimate_net_loss: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// //estimate_margin: [''],
|
||||
// estimate_margin_of_profit: [''],
|
||||
// estimate_margin_of_loss: [''],
|
||||
// estimate_variation: [''],
|
||||
// estimate_annualsales_variation : [''],
|
||||
// estimate_reason: [''],
|
||||
|
||||
// estimate_year: ['', Validators.compose([Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
||||
estimate_sales_from: [''],
|
||||
estimate_sales_to: [''],
|
||||
estimate_sales_average: [''],
|
||||
estimate_profit_or_loss:[''],
|
||||
estimate_net_margin_availablity:[''],
|
||||
estimate_profit_range_from:[''],
|
||||
estimate_profit_range_to:[''],
|
||||
estimate_profit_margin_percent:[''],
|
||||
@ -263,15 +250,8 @@ export class FinancialInfoComponent implements OnInit {
|
||||
estimate_net_loss_to:[''],
|
||||
estimate_net_loss_percent:[''],
|
||||
estimate_net_loss:[''],
|
||||
estimate_reason_for_loss:['']
|
||||
|
||||
// estimate_net_profit: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// estimate_net_loss: ['', Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// estimate_margin: [''],
|
||||
// estimate_margin_of_profit: [''],
|
||||
// estimate_margin_of_loss: [''],
|
||||
// estimate_variation: [''],
|
||||
// estimate_annualsales_variation : [''],
|
||||
// estimate_reason: [''],
|
||||
});
|
||||
}
|
||||
|
||||
@ -284,6 +264,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
estimate_sales_to: [value.estimate_sales_to],
|
||||
estimate_sales_average: [value.estimate_sales_average],
|
||||
estimate_profit_or_loss:[value.estimate_profit_or_loss],
|
||||
estimate_net_margin_availablity:[value.estimate_net_margin_availablity],
|
||||
estimate_profit_range_from:[value.estimate_profit_range_from],
|
||||
estimate_profit_range_to:[value.estimate_profit_range_to],
|
||||
estimate_profit_margin_percent:[value.estimate_profit_margin_percent],
|
||||
@ -300,19 +281,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
estimate_net_loss_to:[value.estimate_net_loss_to],
|
||||
estimate_net_loss_percent:[value.estimate_net_loss_percent],
|
||||
estimate_net_loss:[value.estimate_net_loss],
|
||||
// estimate_annual_sale: [value.estimate_annual_sale, Validators.compose([ Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||
// estimate_sales_from: [''],
|
||||
// estimate_sales_to: [''],
|
||||
// estimate_sales_average: [''],
|
||||
// estimate_profit_or_loss:[value.estimate_profit_or_loss],
|
||||
// estimate_net_loss: [value.estimate_net_loss, Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// estimate_net_profit: [value.estimate_net_profit, Validators.compose([ Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||
// //estimate_margin: [value.],
|
||||
// estimate_margin_of_profit: [value.estimate_margin_of_profit],
|
||||
// estimate_margin_of_loss: [value.estimate_margin_of_loss],
|
||||
// estimate_variation: [value.estimate_variation],
|
||||
// estimate_annualsales_variation : [value.estimate_annualsales_variation],
|
||||
// estimate_reason: [''],
|
||||
estimate_reason_for_loss:[value.estimate_reason_for_loss],
|
||||
});
|
||||
}
|
||||
|
||||
@ -334,11 +303,21 @@ export class FinancialInfoComponent implements OnInit {
|
||||
control.removeAt(index);
|
||||
}
|
||||
|
||||
selectedProfitOrLossType(e,detail){
|
||||
console.log(e);
|
||||
if(e.value == 1){
|
||||
detail.controls.financial_net_loss.setValue('');
|
||||
detail.controls.financial_margin_of_loss.setValue('');
|
||||
}
|
||||
else if(e.value == 2){
|
||||
detail.controls.financial_net_profit.setValue('');
|
||||
detail.controls.financial_margin_of_profit.setValue('');
|
||||
}
|
||||
}
|
||||
|
||||
/** For Auto-generating FinYear */
|
||||
dynamicalFinYear($event){
|
||||
|
||||
//console.log(this.financialForm.controls['financial_no_of_year'].value);
|
||||
//console.log('data',$event.target.value);
|
||||
let e = $event.target.value;
|
||||
if(e == 1){
|
||||
this.customerCommentsFlag = false;
|
||||
@ -359,7 +338,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
for(let i = 1 ; i<= e ; i++ ){
|
||||
let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
|
||||
control.push(this.createDate(Year));
|
||||
//console.log(this.financialForm.controls['financial_starting_year'].value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -380,8 +358,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
else if (e.value == 'no'){
|
||||
|
||||
this.isDisplay = false;
|
||||
// let startingYear = this.financialForm.controls['financial_starting_year'].value;
|
||||
// let totalFinYear = this.financialForm.controls['financial_no_of_year'].value;
|
||||
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
@ -417,105 +393,24 @@ export class FinancialInfoComponent implements OnInit {
|
||||
control.removeAt(0);
|
||||
}
|
||||
}
|
||||
// if(e.value == 'yes'){
|
||||
// let startingYear = this.financialForm.controls['financial_starting_year'].value;
|
||||
|
||||
// const control = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
// while (control.length !== 0) {
|
||||
// control.removeAt(0);
|
||||
// }
|
||||
|
||||
// if(e > 0 ){
|
||||
// for(let i = 1 ; i<= e ; i++ ){
|
||||
// let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
|
||||
// control.push(this.createDate(Year));
|
||||
// //console.log(this.financialForm.controls['financial_starting_year'].value);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(e.value == 'yes'){
|
||||
// let startingYear = this.financialForm.controls['financial_starting_year'].value;
|
||||
// let totalFinYear = this.financialForm.controls['financial_no_of_year'].value;
|
||||
|
||||
// const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
// while (control.length !== 0) {
|
||||
// control.removeAt(0);
|
||||
// }
|
||||
|
||||
// if(totalFinYear > 0 ){
|
||||
// for(let i = 1 ; i<= totalFinYear ; i++ ){
|
||||
// let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
|
||||
// control.push(this.createValue(Year));
|
||||
// //console.log(this.financialForm.controls['financial_starting_year'].value);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(array.length > 0 ){
|
||||
|
||||
// array.value.forEach((val,index)=>{
|
||||
// let vals = {
|
||||
// estimate_year: val.financial_year,
|
||||
// estimate_sales_from: '',
|
||||
// estimate_sales_to: '',
|
||||
// estimate_sales_average: '',
|
||||
// // estimate_annual_sale: val.financial_annual_sale,
|
||||
// estimate_profit_or_loss:val.finanical_profit_or_loss,
|
||||
// estimate_net_loss: val.financial_net_loss,
|
||||
// estimate_net_profit: val.financial_net_profit,
|
||||
// estimate_margin_of_profit: val.financial_margin_of_profit,
|
||||
// estimate_margin_of_loss: val.financial_margin_of_loss,
|
||||
// estimate_variation: val.financial_variation,
|
||||
// estimate_annualsales_variation : val.financial_annualsales_variation,
|
||||
// };
|
||||
// this.AV_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);
|
||||
// this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_profit);
|
||||
// this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_loss);
|
||||
// control.push(this.createValuewithData(vals));
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
//control.controls[0].get('raw_quantity').setValidators([Validators.required]);
|
||||
//control.push(this.createValue(YearParam));
|
||||
|
||||
// }
|
||||
else if (e.value == 'no'){
|
||||
|
||||
// let startingYear = this.financialForm.controls['financial_starting_year'].value;
|
||||
// let totalFinYear = this.financialForm.controls['financial_no_of_year'].value;
|
||||
|
||||
const control = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
|
||||
// alert((new Date()).getFullYear());
|
||||
let year1 = (new Date()).getFullYear();
|
||||
let year2 = ((new Date()).getFullYear() - 1);
|
||||
|
||||
let Year = year2 +'-'+ year1;
|
||||
// alert(Year);
|
||||
|
||||
control.push(this.createValue(Year));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// calYearVariation(index, detail) {
|
||||
// let profit = detail.value.financial_net_profit;
|
||||
// if ( profit != '' && index != 0) {
|
||||
// console.log('value')
|
||||
// let array = <FormArray>this.financialForm.controls['date_per_financial']
|
||||
// let prev_profit = array.value[index - 1].financial_net_profit;
|
||||
// let variation = ((profit - prev_profit)/ prev_profit) * 100;
|
||||
// detail.controls.financial_variation.setValue(variation.toFixed(2))
|
||||
// // detail.controls.financial_variation.disable()
|
||||
// }
|
||||
// }
|
||||
|
||||
/**calculating Annual Sale for financial Statement */
|
||||
calFinAnnualSale(index,detail){
|
||||
let annual_sale = detail.value.financial_annual_sale;
|
||||
@ -544,21 +439,33 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
let profit = detail.value.financial_net_profit;
|
||||
let loss = detail.value.financial_net_loss;
|
||||
|
||||
let salary = detail.value.financial_annual_sale;
|
||||
console.log('current profit',profit);
|
||||
console.log('current loss',loss);
|
||||
if ( (profit != '' || loss != '') && index != 0) {
|
||||
if(+profit > +salary){
|
||||
|
||||
detail.controls.financial_margin_of_profit.setValue('');
|
||||
}
|
||||
else{
|
||||
|
||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
let prev_profit = array.value[index - 1].financial_net_profit != '' ? array.value[index - 1].financial_net_profit : 0;
|
||||
let prev_loss = array.value[index - 1].financial_net_loss !='' ? array.value[index - 1].financial_net_loss : 0 ;
|
||||
|
||||
console.log('prev_profit',prev_profit);
|
||||
console.log('prev_loss',prev_loss);
|
||||
|
||||
loss = loss != 0 ? loss * (-1) : loss;
|
||||
console.log('-1',loss);
|
||||
prev_loss = prev_loss != 0 ? prev_loss * (-1) : prev_loss ;
|
||||
console.log('prev_loss',prev_loss);
|
||||
|
||||
let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||
|
||||
detail.controls.financial_variation.setValue(variation.toFixed(2));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -579,27 +486,30 @@ export class FinancialInfoComponent implements OnInit {
|
||||
* And calculating Variation over sales
|
||||
*/
|
||||
calMargin(index, detail) {
|
||||
|
||||
// In financial details section please add the following validation: Net profit/loss can not be > sales.
|
||||
let salary = detail.value.financial_annual_sale;
|
||||
let profit_margin;
|
||||
let loss_margin;
|
||||
// let prev_annual_sale = array.value[index-1].financial_annual_sale;
|
||||
// let annual_sale_variation = ((prev_annual_sale - salary)/salary ) * 100 ;
|
||||
|
||||
if(detail.value.finanical_profit_or_loss == 1){
|
||||
|
||||
loss_margin = '';
|
||||
detail.controls.financial_margin_of_loss.setValue('');
|
||||
|
||||
let profit = detail.value.financial_net_profit;
|
||||
|
||||
if (salary != '' && profit != '') {
|
||||
// if(salary < profit){
|
||||
// detail.controls.financial_margin_of_profit.setValue('');
|
||||
// }
|
||||
// else{
|
||||
if(+profit>+salary){
|
||||
alert("profit is greater than salary");
|
||||
detail.controls.financial_net_profit.setValue('');
|
||||
detail.controls.financial_margin_of_profit.setValue('');
|
||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||
detail.controls.financial_variation.setValue('');
|
||||
}
|
||||
else{
|
||||
profit_margin = (profit / salary) * 100;
|
||||
detail.controls.financial_margin_of_profit.setValue(profit_margin.toFixed(2));
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -609,55 +519,53 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let loss = detail.value.financial_net_loss;
|
||||
|
||||
if (salary != '' && loss != '') {
|
||||
|
||||
if(+loss>+salary){
|
||||
alert("Loss is greater than salary");
|
||||
detail.controls.financial_net_loss.setValue('');
|
||||
detail.controls.financial_margin_of_loss.setValue('');
|
||||
detail.controls.financial_profit_to_sale_variation.setValue('');
|
||||
detail.controls.financial_variation.setValue('');
|
||||
}
|
||||
else{
|
||||
loss_margin = (loss / salary) * 100 * (-1);
|
||||
detail.controls.financial_margin_of_loss.setValue(loss_margin.toFixed(2));
|
||||
// detail.controls.financial_margin.disable()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
||||
if (((profit_margin != '' || profit_margin !== undefined) || (loss_margin != '' || loss_margin !== undefined) ) && index != 0) {
|
||||
|
||||
// console.log('profit_margin',profit_margin);
|
||||
// console.log('loss_margin',loss_margin);
|
||||
// console.log('index',index);
|
||||
console.log('Current profit_margin',profit_margin);
|
||||
|
||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
// console.log('array',array);
|
||||
let prev_profit_margin = array.value[index - 1].financial__margin_of_profit != '' ? array.value[index - 1].financial_margin_of_profit : 0;
|
||||
let prev_loss_margin = array.value[index - 1].financial__margin_of_loss !='' ? array.value[index - 1].financial_margin_of_loss : 0 ;
|
||||
|
||||
// console.log('preprofit_margin',prev_profit_margin);
|
||||
// console.log('preloss_margin',prev_profit_margin);
|
||||
console.log('pre profit_margin',prev_profit_margin);
|
||||
|
||||
loss_margin = loss_margin != 0 ? loss_margin * (-1) : loss_margin;
|
||||
prev_loss_margin = prev_loss_margin != 0 ? prev_loss_margin * (-1) : prev_loss_margin ;
|
||||
|
||||
loss_margin = loss_margin != 0 ? loss_margin : loss_margin;
|
||||
prev_loss_margin = prev_loss_margin != 0 ? prev_loss_margin : prev_loss_margin ;
|
||||
|
||||
console.log('Current loss_margin',loss_margin);
|
||||
|
||||
console.log('pre loss_margin',prev_loss_margin);
|
||||
|
||||
let variation_percent = (((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100;
|
||||
|
||||
console.log((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ));
|
||||
console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))));
|
||||
console.log((((profit_margin != '' ? profit_margin : loss_margin ) - (prev_profit_margin != '' ? prev_profit_margin : prev_loss_margin ))/ (prev_profit_margin != '' ? Math.abs(prev_profit_margin) : Math.abs(prev_loss_margin))) * 100);
|
||||
detail.controls.financial_profit_to_sale_variation.setValue(variation_percent.toFixed(2));
|
||||
|
||||
}
|
||||
//detail.controls.financial_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
||||
}
|
||||
|
||||
/** For Financial Customer
|
||||
* Calculating Yearwise Variation
|
||||
*/
|
||||
calVariation(index, detail) {
|
||||
// console.log('CalVar In');
|
||||
// let profit = detail.value.estimate_net_profit;
|
||||
// let curr_year = detail.value.financial_year;
|
||||
// if ( profit != '' && index != 0) {
|
||||
// let array = <FormArray>this.financialForm.controls['estimated_value']
|
||||
// let prev_profit = array.value[index - 1].estimate_net_profit;
|
||||
// let variation = ((profit - prev_profit) / prev_profit) * 100;
|
||||
// detail.controls.estimate_variation.setValue(variation.toFixed(2))
|
||||
// let prev_year = array.value[index - 1].financial_year;
|
||||
// // detail.controls.estimate_variation.disable()
|
||||
// }
|
||||
|
||||
let profit = detail.value.estimate_net_profit;
|
||||
let loss = detail.value.estimate_net_loss;
|
||||
@ -674,13 +582,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
prev_loss = prev_loss != 0 ? prev_loss * (-1) : prev_loss ;
|
||||
|
||||
let variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||
// let variation ;
|
||||
// if(profit != ''){
|
||||
// variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? prev_profit : prev_loss)) * 100 ;
|
||||
// }
|
||||
// else if(loss != ''){
|
||||
// variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? prev_profit : prev_loss)) * 100 * (profit != '' ? (1) : (-1));
|
||||
// }
|
||||
|
||||
detail.controls.estimate_variation.setValue(variation.toFixed(2));
|
||||
}
|
||||
@ -692,12 +593,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
calMarginVal(index, detail) {
|
||||
let salary = detail.value.estimate_annual_sale;
|
||||
|
||||
// if (salary != '' && profit != '') {
|
||||
// let margin = profit / salary * 100;
|
||||
// detail.controls.estimate_margin.setValue(margin.toFixed(2))
|
||||
// // detail.controls.estimate_margin.disable()
|
||||
// }
|
||||
|
||||
if(detail.value.estimate_profit_or_loss == 1){
|
||||
|
||||
let profit = detail.value.estimate_net_profit;
|
||||
@ -719,34 +614,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
// selectedProfitOrLossType($event,index,flag){
|
||||
// if(flag == 1){
|
||||
// let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
// if($event == 1){
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// }
|
||||
// else if($event == 2){
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// }
|
||||
// }
|
||||
// else if(flag == 2){
|
||||
|
||||
// let array = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
|
||||
// if($event == 1){
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// }
|
||||
// else if($event == 2){
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
calProfitAndLossVal( i, detail) {
|
||||
let salary = detail.value.estimate_annual_sale;
|
||||
if(detail.value.estimate_profit_or_loss == 1){
|
||||
@ -768,46 +635,6 @@ export class FinancialInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
// calAmount(i, detail) {
|
||||
|
||||
// console.log(detail);
|
||||
|
||||
// let salary = detail.value.estimate_annual_sale;
|
||||
|
||||
// if(detail.value.estimate_profit_or_loss == 1){
|
||||
|
||||
// // let profit = detail.value.estimate_net_profit;
|
||||
// let margin_profit = detail.value.estimate_margin_of_profit;
|
||||
|
||||
// if (salary != '' && margin_profit != '') {
|
||||
|
||||
|
||||
// //let margin = profit / salary * 100;
|
||||
// let profit = margin_profit / salary * 100;
|
||||
|
||||
// console.log('margin',margin_profit);
|
||||
// console.log('profit',profit);
|
||||
// //detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
||||
// detail.controls.estimate_net_profit.setValue(profit.toFixed(2));
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
// else if (detail.value.estimate_profit_or_loss == 2){
|
||||
|
||||
// let loss = detail.value.estimate_net_profit;
|
||||
// console.log('else if Margin loss',loss);
|
||||
// if (salary != '' && loss != '') {
|
||||
// console.log('elseif if Margin Estimate salary',salary);
|
||||
// console.log('alseif if Margin loss',loss);
|
||||
// let margin = (loss / salary) * 100;
|
||||
// detail.controls.estimate_margin_of_loss.setValue(margin.toFixed(2));
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
confirmAlert(i, details){
|
||||
|
||||
let estimate_sales_from = +details.value.estimate_sales_from;
|
||||
@ -817,10 +644,10 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
let C = (estimate_sales_to - estimate_sales_from)
|
||||
let D = (C / estimate_sales_from) * 100;
|
||||
// % Decrease = Decrease ÷ Original Number × 100
|
||||
|
||||
if(D >= 30){
|
||||
var r = confirm("Given Sales Range is greater than 30%");
|
||||
if(estimate_sales_from <= 5000000){
|
||||
if(D >= 20){
|
||||
var r = confirm("Given Sales Range is greater than 20%");
|
||||
if (r == true) {
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}else{
|
||||
@ -831,6 +658,51 @@ export class FinancialInfoComponent implements OnInit {
|
||||
else{
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}
|
||||
}
|
||||
else if(estimate_sales_from > 5000000 || estimate_sales_from <= 10000000){
|
||||
if(D >= 15){
|
||||
var r = confirm("Given Sales Range is greater than 15%");
|
||||
if (r == true) {
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}else{
|
||||
details.controls.estimate_sales_to.setValue('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}
|
||||
}
|
||||
else if(estimate_sales_from > 10000000){
|
||||
if(D >= 10){
|
||||
var r = confirm("Given Sales Range is greater than 10%");
|
||||
if (r == true) {
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}else{
|
||||
details.controls.estimate_sales_to.setValue('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
}
|
||||
|
||||
// if(D >= 30){
|
||||
// var r = confirm("Given Sales Range is greater than 30%");
|
||||
// if (r == true) {
|
||||
// details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
// }else{
|
||||
// details.controls.estimate_sales_to.setValue('');
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
// else{
|
||||
// details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
||||
// }
|
||||
}
|
||||
this.calculateSalesAverage(i, details);
|
||||
}
|
||||
@ -844,27 +716,20 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
let range1 = +estimate_sales_from/10;
|
||||
|
||||
// console.log('range1',range1);
|
||||
|
||||
let lower = (+estimate_sales_from)+range1;
|
||||
let higer = ((+estimate_sales_to + +estimate_sales_from) / 2);
|
||||
// console.log(lower);
|
||||
// console.log(higer);
|
||||
|
||||
if(lower > higer){
|
||||
details.controls.estimate_sales_average.setValue(higer.toFixed(2));
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(higer);
|
||||
|
||||
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||
}
|
||||
else{
|
||||
details.controls.estimate_sales_average.setValue(lower.toFixed(2));
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(lower);
|
||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
// alert('Check Both Sales Range Fields');
|
||||
details.controls.estimate_sales_average.setValue('');
|
||||
}
|
||||
|
||||
@ -881,10 +746,27 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let profit_percent = (estimate_profit_range_to + estimate_profit_range_from)/2;
|
||||
let Profit_Average = (profit_percent*sales_average)/100;
|
||||
|
||||
if(Profit_Average >= 3){
|
||||
var r = confirm("Given Profit Range is greater than 3%");
|
||||
if (r == true) {
|
||||
details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
||||
details.controls.estimate_profit_margin_percent.setValue(profit_percent);
|
||||
|
||||
details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
||||
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||
}else{
|
||||
details.controls.estimate_profit_range_to.setValue('');
|
||||
details.controls.estimate_profit_margin.setValue('');
|
||||
details.controls.estimate_profit_margin_percent.setValue('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('else part');
|
||||
}
|
||||
|
||||
// details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
||||
// details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -899,31 +781,36 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if (sales_average != '' && estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
||||
|
||||
// let profit_percent = (estimate_net_profit_to - estimate_net_profit_from)/estimate_net_profit_from * 100;
|
||||
// let Profit_Average = (profit_percent*sales_average)/100;
|
||||
let profit_amount = (estimate_net_profit_to + estimate_net_profit_from)/2;
|
||||
let Profit_percent = (profit_amount/sales_average)*100;
|
||||
|
||||
details.controls.estimate_net_profit.setValue(Math.round(profit_amount));
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent);
|
||||
// details.controls.estimate_net_profit.setValue(Math.round(profit_amount));
|
||||
// details.controls.estimate_net_profit_percent.setValue(Profit_percent.toFixed(2));
|
||||
|
||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(profit_amount));
|
||||
if(Profit_percent >= 3){
|
||||
var r = confirm("Given Profit Percentage is greater than 3%");
|
||||
if (r == true) {
|
||||
|
||||
details.controls.estimate_net_profit.setValue(Math.round(profit_amount));
|
||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent.toFixed(2));
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(profit_amount));
|
||||
|
||||
}else{
|
||||
|
||||
details.controls.estimate_net_profit_to.setValue('');
|
||||
details.controls.estimate_net_profit.setValue('');
|
||||
details.controls.estimate_net_profit_percent.setValue('');
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('else part');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
||||
// let estimate_net_profit_to = details.value.estimate_net_profit_to;
|
||||
|
||||
// if (estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
||||
// let AB = (estimate_net_profit_to + estimate_net_profit_from)/2;
|
||||
// let C = (estimate_net_profit_to - estimate_net_profit_from);
|
||||
// let D = (C / estimate_net_profit_from);
|
||||
// let E = D*100;
|
||||
|
||||
// details.controls.estimate_net_profit_percent.setValue(E);
|
||||
// details.controls.estimate_net_profit.setValue(AB);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
calculateMarginLoss( i, details){
|
||||
@ -937,10 +824,28 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let loss_percent = (estimate_loss_range_to + estimate_loss_range_from)/2;
|
||||
let loss_Average = (loss_percent*sales_average)/100;
|
||||
|
||||
// details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
|
||||
// details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
|
||||
|
||||
// this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
|
||||
if(loss_Average >= 3){
|
||||
var r = confirm("Given Profit Range is greater than 3%");
|
||||
if (r == true) {
|
||||
details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
|
||||
details.controls.estimate_loss_margin_percent.setValue(loss_percent);
|
||||
details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
|
||||
|
||||
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||
}else{
|
||||
details.controls.estimate_loss_range_to.setValue('');
|
||||
details.controls.estimate_loss_margin.setValue('');
|
||||
details.controls.estimate_loss_margin_percent.setValue('');
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('else part');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -960,11 +865,32 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let loss_amount = (estimate_net_loss_to + estimate_net_loss_from)/2;
|
||||
let loss_percent = (loss_amount/sales_average)*100;
|
||||
|
||||
details.controls.estimate_net_profit.setValue(Math.round(loss_amount));
|
||||
details.controls.estimate_net_profit_percent.setValue(loss_percent);
|
||||
// details.controls.estimate_net_loss.setValue(Math.round(loss_amount));
|
||||
// details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2));
|
||||
|
||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
||||
if(loss_percent >= 3){
|
||||
var r = confirm("Given Loss Percentage is greater than 3%");
|
||||
if (r == true) {
|
||||
|
||||
details.controls.estimate_net_loss.setValue(Math.round(loss_amount));
|
||||
details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2));
|
||||
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
||||
|
||||
}else{
|
||||
|
||||
details.controls.estimate_net_loss_to.setValue('');
|
||||
details.controls.estimate_net_loss.setValue('');
|
||||
details.controls.estimate_net_loss_percent.setValue('');
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert('else part');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
||||
@ -1081,6 +1007,24 @@ export class FinancialInfoComponent implements OnInit {
|
||||
case 6 :
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7 :
|
||||
this.AV_netProfitAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 8 :
|
||||
this.AV_netProfitAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 9 :
|
||||
this.AV_netLossAmtFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 10 :
|
||||
this.AV_netLossAmtToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 11 :
|
||||
this.AV_SalesFrmInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 12 :
|
||||
this.AV_SalesToInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
21
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
Normal file → Executable file
21
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.html
Normal file → Executable file
@ -52,6 +52,25 @@
|
||||
</mat-select>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="course_name">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i" [style.visibility]="_generalForm.controls.individuals.value[i].qualification == '' ? 'hidden':'visible'">
|
||||
<input matInput placeholder="Specify Qualification" formControlName="course_name" autocomplete="off">
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i =index;">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||
matTooltip="Edit " matTooltipPosition="below">
|
||||
<mat-icon>edit</mat-icon>
|
||||
</button>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i)"
|
||||
matTooltip="Remove Individuals" matTooltipPosition="below">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
|
||||
<mat-row *matRowDef="let row; columns: displayedColumns;">
|
||||
</mat-row>
|
||||
@ -238,7 +257,7 @@
|
||||
<mat-card-actions align="center">
|
||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||
<strong>Add More Company Relationship</strong>
|
||||
<strong>Add Company Relationship</strong>
|
||||
</button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.scss
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.spec.ts
Normal file → Executable file
32
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
Normal file → Executable file
32
ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/general-info/general-info.component.ts
Normal file → Executable file
@ -24,7 +24,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
count : number = 1;
|
||||
private notifier: NotifierService;
|
||||
public _generalForm: FormGroup;
|
||||
displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification'];
|
||||
displayedColumns = ['applicant_name','is_person_met','is_applicant','age','qualification','course_name','actions'];
|
||||
public individualsSource= new MatTableDataSource();
|
||||
public relationSource= new MatTableDataSource();
|
||||
public CompanySource = new MatTableDataSource();
|
||||
@ -231,6 +231,7 @@ export class GeneralInfoComponent implements OnInit {
|
||||
element.individuals_order_id = key+1;
|
||||
element.age = '',
|
||||
element.qualification = '',
|
||||
element.course_name = '',
|
||||
individualsControl.push(this.createIndividulas(element));
|
||||
personsWithRelationshipsControl.push(this.createPersonsWithRelationships(element));
|
||||
//let relationControl = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
@ -268,7 +269,8 @@ export class GeneralInfoComponent implements OnInit {
|
||||
is_new:[elementValue.is_new],
|
||||
individuals_order_id: [elementValue.individuals_order_id],
|
||||
age: [elementValue.age],
|
||||
qualification: [elementValue.qualification]
|
||||
qualification: [elementValue.qualification],
|
||||
course_name:[elementValue.course_name]
|
||||
});
|
||||
}
|
||||
createPersonsWithRelationships(elementValue:any){
|
||||
@ -347,7 +349,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
// remove companies
|
||||
removeCompanies(indexValues) {
|
||||
this.count = this.count-1;
|
||||
// console.log('removed Count',this.count);
|
||||
let control: any = this._generalForm.get('companies') as FormArray;
|
||||
control.controls[indexValues].controls.is_active.setValue(false);
|
||||
control.controls[indexValues].controls.company_name.clearValidators();
|
||||
@ -447,13 +448,6 @@ export class GeneralInfoComponent implements OnInit {
|
||||
let applicant_details: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'relationship':'','relation_to':'','individuals_order_id':element.individuals_order_id};
|
||||
relationControl.push(this.createPersonsWithRelationships(applicant_details));
|
||||
|
||||
// let relationControl2 = <FormArray>this._generalForm.controls['applicant_relation'];
|
||||
// let applicant_details2: any= {'pd_co_applicant_id':element.pd_co_applicant_id,'applicant_name':element.applicant_name,'applicant_relation_to':'','relation':'','other_relation':'','company_name':'','company_relation':'','company_other_relation':'','individuals_order_id':element.individuals_order_id};
|
||||
// relationControl2.push(this.createApplicantRelation(applicant_details2));
|
||||
// let mulRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_relation');
|
||||
// mulRelationControl.push(this.createMultipleRelation(applicant_details))
|
||||
// let mulCmyRelationControl = <FormArray> relationControl.controls[relationControl.controls.length-1].get('multiple_company_relation');
|
||||
// mulCmyRelationControl.push(this.createMultipleCompanyRelation(applicant_details))
|
||||
});
|
||||
|
||||
}
|
||||
@ -461,8 +455,24 @@ export class GeneralInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
/** Popup for EDIT Individuals */
|
||||
editIndividuals(arr) {
|
||||
|
||||
console.log(arr);
|
||||
|
||||
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
|
||||
data: arr,
|
||||
width:'40%',
|
||||
disableClose: true
|
||||
});
|
||||
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
});
|
||||
}
|
||||
|
||||
// remove individuals
|
||||
removeIndividuals(findex,order_id){
|
||||
removeIndividuals(findex){
|
||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||
control.removeAt(findex);
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" autocomplete="off">
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"₹"}} {{loanAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 28%">
|
||||
<mat-form-field style="width: 64%">
|
||||
<mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" >
|
||||
<mat-option *ngFor="let enduse of m_endUseForLoan" [value]="enduse.enduse_of_loan_id">{{ enduse.enduse_of_loan}}</mat-option>
|
||||
</mat-select>
|
||||
@ -58,7 +58,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 3" style="width: 28%">
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 1" style="width: 28%">
|
||||
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
@ -67,9 +67,22 @@
|
||||
<mat-hint align="start" style="font-size:90%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"₹"}} {{topUpAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<!-- <mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 28%">
|
||||
<input matInput placeholder="End Use of Top Up" formControlName="end_use_topup" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width:64%" *ngIf="loanDetailsForm.controls['topup_amount'].value > 0 " >
|
||||
<mat-select placeholder="What is the End Use of the Top Up?"
|
||||
formControlName="end_use_topup" >
|
||||
<mat-option value=2>Business Use.</mat-option>
|
||||
<mat-option value=3>Child’s Marriage.</mat-option>
|
||||
<mat-option value=4>Furniture & Finishing of House Property.</mat-option>
|
||||
<mat-option value=5>Medical Expenses.</mat-option>
|
||||
<mat-option value=6>Paying Off Existing Loans.</mat-option>
|
||||
<mat-option value=1>Others.</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['end_use_topup'].value == 1" style="width: 28%">
|
||||
<input matInput placeholder="Specify End Use of Top Up" formControlName="other_end_use_topup" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||
|
||||
@ -84,9 +97,9 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isPLSource" style="width: 28%">
|
||||
<!-- <mat-form-field *ngIf="isPLSource" style="width: 28%">
|
||||
<input matInput placeholder="Specify Personal Loan" formControlName="personal_loan_source" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field *ngIf="isOtherSource" style="width: 28%">
|
||||
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
|
||||
@ -105,17 +118,17 @@
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
<mat-card-header><p>Details of Property being Mortgaged</p></mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Type of Property" formControlName="property_type" (selectionChange)="mortage_type($event.value)" >
|
||||
<mat-option *ngFor="let typeprop of m_mortageTypeProperty" [value]="typeprop.mortage_property_id">{{ typeprop.property_name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="mortageAccess">
|
||||
<mat-form-field *ngIf="mortageAccess" style="width:50%;">
|
||||
<input matInput placeholder="Specify Type of Property" formControlName="property_type_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select multiple placeholder="Name of the Owner"
|
||||
formControlName="owner_name" [compareWith]="compareObjects" required>
|
||||
<mat-optgroup *ngFor="let group of mergeCompanyApplicant" [label]="group.groupName">
|
||||
@ -149,7 +162,7 @@
|
||||
<input matInput placeholder="Specify Other Owner Name" formControlName="other_owners_name" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:50%;">
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status" >
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
@ -18,6 +18,12 @@
|
||||
margin: 0 2%;
|
||||
width:26%;
|
||||
}
|
||||
|
||||
// ::ng-deep .mat-option{
|
||||
// word-wrap: break-word !important;
|
||||
// white-space: pre-wrap !important;
|
||||
// }
|
||||
|
||||
.address .button {
|
||||
float: right;
|
||||
width: 10px;
|
||||
|
||||
@ -138,13 +138,16 @@ export class LoanDetailsComponent implements OnInit {
|
||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
||||
}
|
||||
|
||||
let modifyApplicantList: any=[];
|
||||
if(this.applicants.length > 0){
|
||||
modifyApplicantList = this.applicants.map(element => {
|
||||
return {id:element.pd_co_applicant_id,name:element.applicant_name,group_id:2};
|
||||
});
|
||||
this.mergeCompanyApplicant.push({groupName:'APPLICANTS',groupValues:modifyApplicantList})
|
||||
|
||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||
}
|
||||
})
|
||||
@ -204,9 +207,14 @@ export class LoanDetailsComponent implements OnInit {
|
||||
if (value.records.topup_amount) {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
if(value.records.topup_amount > 0){
|
||||
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
if (value.records.end_use_topup == 1) {
|
||||
this.loanDetailsForm.controls['other_end_use_topup'].setValue(value.records.other_end_use_topup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
|
||||
if (value.records.lender) {
|
||||
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
|
||||
@ -237,10 +245,10 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['other_source'].setValue(value.records.other_source);
|
||||
}
|
||||
|
||||
if(value.records.personal_loan_source) {
|
||||
// this.isPLSource = true;
|
||||
this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
|
||||
}
|
||||
// if(value.records.personal_loan_source) {
|
||||
// // this.isPLSource = true;
|
||||
// this.loanDetailsForm.controls['personal_loan_source'].setValue(value.records.personal_loan_source);
|
||||
// }
|
||||
}
|
||||
|
||||
// if (value.records.lender_name_type) {
|
||||
@ -359,7 +367,8 @@ getM_sourceofamount() {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
this.m_mortageTypeProperty
|
||||
// mortage_property_id">{{ typeprop.property_name
|
||||
console.log(this.m_mortageTypeProperty);
|
||||
}
|
||||
},
|
||||
@ -429,13 +438,14 @@ getM_sourceofamount() {
|
||||
//is_topup: [''],
|
||||
balance_transfer_amount: [''],
|
||||
topup_amount: [''],
|
||||
// end_use_topup:[''],
|
||||
end_use_topup:[''],
|
||||
other_end_use_topup:[''],
|
||||
lender: [''],
|
||||
other_bt_lender : [''],
|
||||
own_contribution: [''],
|
||||
source: [''],
|
||||
other_source:[''],
|
||||
personal_loan_source:[''],
|
||||
// personal_loan_source:[''],
|
||||
//lender_name_type: [''],
|
||||
emi_level: [''],
|
||||
property_type: [''],
|
||||
@ -465,9 +475,9 @@ getM_sourceofamount() {
|
||||
event.forEach(option => {
|
||||
// let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
||||
let othersData = this.m_endUseForLoan.filter(sub=>sub.enduse_of_loan_id==option)[0];
|
||||
// console.log(othersData);
|
||||
// console.log('1',othersData);
|
||||
OthersAvaliable = othersData.enduse_of_loan.substr(0,6).toLowerCase();
|
||||
// console.log(OthersAvaliable);
|
||||
// console.log('1',OthersAvaliable);
|
||||
this.endUserList.push({ end_use: option });
|
||||
});
|
||||
|
||||
@ -488,8 +498,8 @@ getM_sourceofamount() {
|
||||
// this.isOtherSource = (evt.some(e => e == 4) == true) ? true : false ;
|
||||
// this.isPLSource = (evt.some(e => e == 3) == true) ? true : false ;
|
||||
|
||||
this.isOtherSource = evt.some(e => e == 4) // this return true or false Only;
|
||||
this.isPLSource = evt.some(e => e == 3) // this return true or false Only;
|
||||
this.isOtherSource = evt.some(e => e == 1) // this return true or false Only;
|
||||
// this.isPLSource = evt.some(e => e == 3) // this return true or false Only;
|
||||
|
||||
this.sourceList = [];
|
||||
|
||||
@ -565,7 +575,15 @@ getM_sourceofamount() {
|
||||
// if (this.loanDetailsForm.controls['is_topup'].value == 'yes') {
|
||||
records.topup_amount = this.loanDetailsForm.controls['topup_amount'].value;
|
||||
// }
|
||||
// records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||
|
||||
if(records.topup_amount > 0){
|
||||
records.end_use_topup = this.loanDetailsForm.controls['end_use_topup'].value;
|
||||
if(records.end_use_topup == 1){
|
||||
records.other_end_use_topup = this.loanDetailsForm.controls['other_end_use_topup'].value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') { //this.loanDetailsForm.controls['is_topup'].value == 'yes' ||
|
||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||
@ -603,9 +621,9 @@ getM_sourceofamount() {
|
||||
records.other_source = this.loanDetailsForm.controls['other_source'].value;
|
||||
}else{ records.other_source = ''; }
|
||||
|
||||
if(this.isPLSource){
|
||||
records.personal_loan_source = this.loanDetailsForm.controls['personal_loan_source'].value;
|
||||
}else{ records.personal_loan_source = ''; }
|
||||
// if(this.isPLSource){
|
||||
// records.personal_loan_source = this.loanDetailsForm.controls['personal_loan_source'].value;
|
||||
// }else{ records.personal_loan_source = ''; }
|
||||
|
||||
|
||||
//records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||
|
||||
@ -85,7 +85,6 @@
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 12%">
|
||||
<input matInput autocomplete="off" placeholder=" STD " formControlName="std_code" type="text" (keypress)="keyPress($event)">
|
||||
<span matPrefix>+91</span>
|
||||
<mat-error *ngIf="reference['controls'].std_code.hasError('maxlength') || reference['controls'].std_code.hasError('minlength')">Enter Valid STD Code. </mat-error>
|
||||
</mat-form-field> <span>-</span>
|
||||
<mat-form-field style="width: 20%">
|
||||
@ -104,7 +103,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%" *ngIf="reference.controls.relationship_with.value==5">
|
||||
<mat-form-field style="width: 30%" *ngIf="reference.controls.relationship_with.value==1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Business Relation" formControlName="others" type="text">
|
||||
</mat-form-field>
|
||||
<p #period_paragraph>Period of Relationship</p>
|
||||
@ -126,7 +125,7 @@
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%" *ngIf="reference.controls.business_volume_unit.value==8">
|
||||
<mat-form-field style="width: 30%" *ngIf="reference.controls.business_volume_unit.value==1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Unit" formControlName="others_unit" type="text">
|
||||
</mat-form-field>
|
||||
<span style="width:100%">
|
||||
|
||||
@ -10,12 +10,12 @@ import { parse } from 'url';
|
||||
styleUrls: ['./neighbour-hood.component.scss']
|
||||
})
|
||||
export class NeighbourHoodComponent implements OnInit {
|
||||
pageTitle: string ="Neighbourhood / Reference Check";
|
||||
pageTitle: string ="Neighbourhood Check / Reference Check";
|
||||
public _neighbourhoodForm: FormGroup;
|
||||
pdid : string;
|
||||
form_id:number;
|
||||
private notifier: NotifierService;
|
||||
check_type:any=[{'id':0,'type_name':'Neighbourhood'},{'id':1,'type_name':'Reference Check'}]
|
||||
check_type:any=[{'id':0,'type_name':'Neighbourhood Check'},{'id':1,'type_name':'Reference Check'}]
|
||||
default_reference_details: any= {'reference_name':'','mobile':'','landline':'-','location':'','relationship_with':'','year_relation_applicant':'','months_relation_applicant':'','business_volume_amount':'','business_volume_unit':'','reference_final_remarks':'','positive_remark':'','negative_remark':'','insufficient_info_remark':''};
|
||||
default_neighbourhood_details: any= {'neighbourhood_name':'','do_know':'','how_long_do_know_in_year':'','how_long_do_know_in_month':'','is_applicant_owner':''};
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width:45%" *ngIf="details.get('source').value == 5">
|
||||
<mat-form-field style="width:45%" *ngIf="details.get('source').value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Source"
|
||||
formControlName="others_source">
|
||||
</mat-form-field>
|
||||
@ -80,7 +80,7 @@
|
||||
|
||||
<!-- {{otherIncomeForm.controls.frequency.value}} -->
|
||||
|
||||
<mat-form-field style="width:45%" *ngIf="details.get('frequency').value == 8">
|
||||
<mat-form-field style="width:45%" *ngIf="details.get('frequency').value == 1">
|
||||
<input matInput autocomplete="off" placeholder="Specify Frequency"
|
||||
formControlName="others_frequency">
|
||||
</mat-form-field>
|
||||
|
||||
@ -19,18 +19,18 @@
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:80%;">
|
||||
<input matInput placeholder="Person Met / Shown the Property(if he is not applicant or co-applicant)" formControlName="person_met">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="Property Owner" formControlName="property_own">
|
||||
<mat-option value="applicant">Applicant</mat-option>
|
||||
<mat-option value="co_applicant">co-applicant</mat-option>
|
||||
<mat-option value="parental">Parental</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="Nature of the let out property" formControlName="nature_property">
|
||||
<mat-option value="residentail/commercial">Residential/commercial</mat-option>
|
||||
<mat-option value="other">other</mat-option>
|
||||
@ -182,14 +182,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</mat-card>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="Photogaraphs of the Property"
|
||||
formControlName="property_photographs">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Third party check of prevailing rent in the neighbour hood (TPC with whom, how much rent quoted)"
|
||||
formControlName="third_party_check">
|
||||
</mat-form-field>
|
||||
|
||||
@ -20,11 +20,11 @@
|
||||
<!-- <mat-card-header>
|
||||
<mat-card-title class="highlight"> Manufacturing Details </mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<h5 class="highlight" style="margin: 12px;">Manufacturing Details</h5>
|
||||
<div formArrayName="manufacturing_details">
|
||||
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
|
||||
<div formArrayName="manufacturing_raw_materials">
|
||||
<div *ngFor="let mrm of md.controls.manufacturing_raw_materials['controls']; let a=index; let last=last" [formGroupName]="a">
|
||||
<h5 class="highlight" style="margin: 12px;">Manufacturing Stock Details</h5>
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Raw Material #{{a+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
@ -72,18 +72,19 @@
|
||||
</span>
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
|
||||
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="md.controls.manufacturing_raw_materials.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addRawMaterials(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Raw Materials </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
|
||||
matTooltip="Delete Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -148,6 +149,12 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(b,1)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="md.controls.manufacturing_finished_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
@ -158,88 +165,6 @@
|
||||
matTooltip="Delete"matTooltipPosition="left" color="primary" *ngIf="!last" align="center">
|
||||
<strong>Delete Finished Goods </strong>
|
||||
</button> -->
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(b,1)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div formArrayName="manufacturing_traded_goods">
|
||||
<div *ngFor="let mtg of md.controls.manufacturing_traded_goods['controls']; let c=index;let last = last" [formGroupName]="c">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{c+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="traded_goods_observed" >
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="mtg.get('traded_goods_observed').value == 'yes'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Mearsurement"
|
||||
formControlName="traded_goods_uom" >
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="mtg.get('traded_goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="traded_goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3,c)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"₹"}} {{M_tradedGoodsValueInWords[c]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width:76%">
|
||||
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,10,c)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="mtg.get('traded_goods_value').value != ''">{{"₹"}} {{M_financialTradedGoodsValueInWords[c]}} Only</mat-hint>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:90%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > -->
|
||||
<mat-select placeholder="Is the stock of Traded goods observed ?" formControlName="is_sufficiant_traded_goods" >
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="mtg.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(1)"
|
||||
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="c==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(c,1)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="c>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button> -->
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(1)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(c,1)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
@ -252,89 +177,16 @@
|
||||
<!-- <mat-card-header>
|
||||
<mat-card-title class="highlight"><p>Retail Details</p></mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<h5 class="highlight" style="margin: 12px;">Retail Details</h5>
|
||||
|
||||
|
||||
<div formArrayName="retail_details">
|
||||
<div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index" [formGroupName]="j">
|
||||
|
||||
<div formArrayName="retail_finished_goods">
|
||||
<div *ngFor="let retailfg of rd.controls.retail_finished_goods['controls']; let d=index;let last =last" [formGroupName]="d">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Finished Goods #{{d+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed" >
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No stock observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="retailfg.get('goods_observed').value == 'yes'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Mearsurement"
|
||||
formControlName="goods_uom" >
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="retailfg.get('goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,4,d)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="retailfg.get('goods_value').value != ''">{{"₹"}} {{R_goodsValueInWords[d]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width:76%">
|
||||
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,11,d)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="retailfg.get('finished_goods_value').value != ''">{{"₹"}} {{R_financialGoodsValueInWords[d]}} Only</mat-hint>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:90%">
|
||||
|
||||
<mat-select placeholder="Is the stock of Finished Goods Observed sufficient considering the size of operations?" formControlName="is_sufficiant_goods" >
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="retailfg.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods(2)"
|
||||
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="d==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(d,2)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="d>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button> -->
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(2)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(d,2)"
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div formArrayName="retail_traded_goods">
|
||||
<div *ngFor="let item of rd.controls.retail_traded_goods['controls']; let e=index;let last =last" [formGroupName]="e">
|
||||
<h5 class="highlight" style="margin: 12px;">Retail Trading Details</h5>
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{e+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
@ -392,18 +244,18 @@
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(e,2)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="rd.controls.retail_traded_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addTradedGoods(2)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Traded Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(e,2)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
|
||||
@ -418,89 +270,13 @@
|
||||
<!-- <mat-card-header>
|
||||
<mat-card-title class="highlight"><p>Trading Details</p></mat-card-title>
|
||||
</mat-card-header> -->
|
||||
<h5 class="highlight" style="margin: 12px;">Trading Details</h5>
|
||||
|
||||
|
||||
<div formArrayName="trade_details">
|
||||
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k">
|
||||
<div formArrayName="trading_finished_goods">
|
||||
<div *ngFor="let tradesubdetail of td.controls.trading_finished_goods['controls']; let f=index;let last =last" [formGroupName]="f">
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Finished Goods #{{f+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Stock" formControlName="goods_observed" >
|
||||
<mat-option value="yes">Add Stock Details</mat-option>
|
||||
<mat-option value="no">No Stock Observed</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<span *ngIf="tradesubdetail.get('goods_observed').value == 'yes'" >
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:30%">
|
||||
<mat-select placeholder="Unit of Mearsurement"
|
||||
formControlName="goods_uom" >
|
||||
<mat-option value="{{uom.uom_id}}" *ngFor="let uom of uomData">{{uom.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tradesubdetail.get('goods_uom').value == 1" style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Specify UOM" formControlName="goods_other_uom" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:90%">
|
||||
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,6,f)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"₹"}} {{T_goodsValueInWords[f]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field style="width:76%">
|
||||
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,13,f)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="tradesubdetail.get('finished_goods_value').value != ''">{{"₹"}} {{T_financialGoodsValueInWords[f]}} Only</mat-hint>
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:90%">
|
||||
|
||||
<mat-select placeholder="Is the stock of Finished Goods Observed sufficient considering the size of operations?" formControlName="is_sufficiant_goods" >
|
||||
<mat-option value="yes" >Yes</mat-option>
|
||||
<mat-option value="no" >No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="tradesubdetail.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
|
||||
<mat-label> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
|
||||
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods(3)"
|
||||
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="f==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button>
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(f,3)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="f>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button> -->
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
<div align="center">
|
||||
<button type="button" mat-flat-button (click)="addGoods(3)"
|
||||
matTooltip="Add More" matTooltipPosition="left" color="primary" *ngIf="last">
|
||||
<strong>Add More Finished Goods </strong>
|
||||
</button>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(f,3)"
|
||||
matTooltip="Delete Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div formArrayName="trading_traded_goods">
|
||||
<div *ngFor="let tradetg of td.controls.trading_traded_goods['controls']; let g=index;let last = last" [formGroupName]="g">
|
||||
<h5 class="highlight" style="margin: 12px;">Wholesale Trading Details</h5>
|
||||
<mat-card style="margin: 12px;">
|
||||
<mat-label class="highlight"> <i>Traded Goods #{{g+1}} </i> </mat-label>
|
||||
<mat-card-content class="matcard">
|
||||
@ -566,7 +342,7 @@
|
||||
</div>
|
||||
<div align="right">
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(g,3)"
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="!last">
|
||||
matTooltip="Delete Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="td.controls.trading_traded_goods.controls.length>1">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@ -48,10 +48,10 @@ export class StockComponent implements OnInit {
|
||||
// R_financialTradedGoodsValueInWords : any = [];
|
||||
// T_financialTradedGoodsValueInWords : any = [];
|
||||
|
||||
rawMaterialAccess: boolean;
|
||||
finishedGoodsAccess: boolean;
|
||||
tradeConcernAccess: boolean;
|
||||
|
||||
rawMaterialAccess: Boolean = false;
|
||||
finishedGoodsAccess: Boolean = false;
|
||||
tradeConcernAccess: Boolean = false;
|
||||
serviceAccess: Boolean = false;
|
||||
public submitted = false;
|
||||
noRecordsFound: Boolean = false;
|
||||
serviceProviderForm: Boolean = false;
|
||||
@ -68,6 +68,7 @@ export class StockComponent implements OnInit {
|
||||
this.form_id = 11;
|
||||
this.company_id = this.pd_all_details.company_id;
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
}
|
||||
|
||||
public viewerOptions: any = {
|
||||
@ -92,77 +93,11 @@ export class StockComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
// this._pd.stockFormsAccess({pd_id:this.pdid}).subscribe(data => {
|
||||
// if(data.status == 200){
|
||||
// this.initstockForms(data.record.type_of_activity);
|
||||
// }
|
||||
// }, err => {
|
||||
// this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!');
|
||||
// })
|
||||
// "Manufacturing"
|
||||
// products
|
||||
// :
|
||||
// (2) ["Rwas1", "123"]
|
||||
// type_of_activity_id
|
||||
// :
|
||||
// 2
|
||||
//this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(
|
||||
// console.log(this.pdid);
|
||||
// console.log(this.company_id);
|
||||
|
||||
this._pd.stockFormAccess(this.pdid,this.company_id).subscribe(data => {
|
||||
console.log(data);
|
||||
console.log(data.record);
|
||||
// return;
|
||||
if(data.dataStatus == true){
|
||||
let tempcount = 0;
|
||||
|
||||
let datas = data.record;
|
||||
let api = Object.keys(datas).map(function (key) {
|
||||
return datas[key];
|
||||
});
|
||||
console.log(api);
|
||||
if(api.length > 0){
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
this.suppliers_raw_materials = val.products;
|
||||
this.initstockForms(data.record);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.suppliers_finished_goods = val.products;
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.suppliers_trade_details = val.products;
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
this.suppliers_service_product = val.products;
|
||||
}
|
||||
console.log(this.suppliers_service_product);
|
||||
}
|
||||
tempcount++;
|
||||
});
|
||||
// console.log('tempcount',tempcount);
|
||||
if(tempcount>0){
|
||||
this.initstockForms(datas);
|
||||
}
|
||||
else{
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID '+ this.company_id );
|
||||
this.noRecordsFound = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID '+ this.company_id );
|
||||
this.noRecordsFound = false;
|
||||
}
|
||||
}else if(data.dataStatus == false)
|
||||
else if(data.dataStatus == false)
|
||||
{
|
||||
this.notifier.notify('warning', 'Fill Business Form First! / No Company Found at this ID '+ this.company_id );
|
||||
this.noRecordsFound = false;
|
||||
@ -182,18 +117,10 @@ export class StockComponent implements OnInit {
|
||||
}
|
||||
|
||||
public initstockForms(record){
|
||||
// console.log(record);
|
||||
// {: 2, name: "Manufacturing", products: Array(2)}
|
||||
// 1
|
||||
// :
|
||||
// {type_of_activity_id: 3, name: "Retail trading", products: Array(1)}
|
||||
// 2
|
||||
// :
|
||||
// {type_of_activity_id: 4, name: "Wholesale Trade", products: Array(1)}
|
||||
// 3
|
||||
// :
|
||||
// {type_of_activity_id: 5, name: "Service Provider", products: Array(1)}
|
||||
|
||||
let api = Object.keys(record).map(function (key) {
|
||||
return record[key];
|
||||
});
|
||||
|
||||
|
||||
let params: any = {};
|
||||
@ -209,43 +136,49 @@ export class StockComponent implements OnInit {
|
||||
formid: [this.form_id],
|
||||
company_id: [this.company_id],
|
||||
stock_remarks: [''],
|
||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(record)]),
|
||||
retail_details : this.fb.array([this.retailFormCreation(record)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(record)]),
|
||||
manufacturing_details: this.fb.array([this.manufacturingFormCreation(api)]),
|
||||
retail_details : this.fb.array([this.retailFormCreation(api)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(api)]),
|
||||
});
|
||||
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
|
||||
if(api.length > 0){
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
let manufacturing_temparr = [];
|
||||
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
|
||||
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
|
||||
manufacturing_temparr['manufacturing_traded_goods'] = dataForm.manufacturing_details[0].manufacturing_traded_goods;
|
||||
this.initManufacturingDetails(manufacturing_temparr);
|
||||
}
|
||||
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||
if(arr1.length > 0) {
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
let retail_temparr = [];
|
||||
retail_temparr['retail_traded_goods'] = dataForm.retail_details[0].retail_traded_goods;
|
||||
retail_temparr['retail_finished_goods'] = dataForm.retail_details[0].retail_finished_goods;
|
||||
this.initRetailDetails(retail_temparr);
|
||||
}
|
||||
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||
if(arr2.length > 0) {
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
let trading_temparr = [];
|
||||
trading_temparr['trading_finished_goods'] = dataForm.trade_details[0].trading_finished_goods;
|
||||
trading_temparr['trading_traded_goods'] = dataForm.trade_details[0].trading_traded_goods;
|
||||
this.initTradingDetails(trading_temparr);
|
||||
}
|
||||
let arr3 = record.filter(data => data.type_of_activity_id == 5);
|
||||
if(arr3.length > 0) {
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
// console.log('dataForm',dataForm);
|
||||
|
||||
this.stockForms = this.fb.group({
|
||||
pdid: [this.pdid],
|
||||
formid: [this.form_id],
|
||||
@ -255,36 +188,40 @@ export class StockComponent implements OnInit {
|
||||
retail_details : this.fb.array([this.retailFormCreation(record)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
|
||||
if(api.length > 0){
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
this.suppliers_raw_materials = val.products;
|
||||
this.initManufacturingDetails(null);
|
||||
}
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||
if(arr1.length > 0) {
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.initRetailDetails(null);
|
||||
}
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||
if(arr2.length > 0) {
|
||||
this.initTradingDetails(null);
|
||||
// this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
|
||||
// if(value.status == 200){
|
||||
// // this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
|
||||
// // this.suppliers_finished_goods
|
||||
// this.suppliers_trade_details = value.records.trade_details[0].trading_products;
|
||||
// this.initTradingDetails(null);
|
||||
// }
|
||||
// else{
|
||||
// this.initTradingDetails(null);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
let arr3 = record.filter(data => data.type_of_activity_id == 5);
|
||||
if(arr3.length > 0) {
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.suppliers_trade_details = val.products;
|
||||
this.initTradingDetails(null);
|
||||
}
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
this.suppliers_service_product = val.products;
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.stockForms = this.fb.group({
|
||||
pdid: [this.pdid],
|
||||
@ -295,59 +232,40 @@ export class StockComponent implements OnInit {
|
||||
retail_details : this.fb.array([this.retailFormCreation(record)]),
|
||||
trade_details: this.fb.array([this.tradingFormCreation(record)]),
|
||||
});
|
||||
let arr = record.filter(data => data.type_of_activity_id == 2);
|
||||
if(arr.length > 0) {
|
||||
// this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
|
||||
// if(value.status == 200){
|
||||
// this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
|
||||
// this.initManufacturingDetails(null);
|
||||
// }
|
||||
// else{
|
||||
if(api.length > 0){
|
||||
api.forEach(val => {
|
||||
if (val.type_of_activity_id == 2) {
|
||||
if(val.products){
|
||||
this.suppliers_raw_materials = val.products;
|
||||
this.initManufacturingDetails(null);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
let arr1 = record.filter(data => data.type_of_activity_id == 3);
|
||||
if(arr1.length > 0) {
|
||||
// this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
|
||||
// if(value.status == 200){
|
||||
// this.suppliers_finished_goods = value.records.trade_details[0].trading_products;
|
||||
// // value.records.manufacturing_details[0].main_raw_materials;
|
||||
// this.initRetailDetails(null);
|
||||
// }
|
||||
// else{
|
||||
}
|
||||
if (val.type_of_activity_id == 3) {
|
||||
if(val.products){
|
||||
this.suppliers_finished_goods = val.products;
|
||||
this.initRetailDetails(null);
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
let arr2 = record.filter(data => data.type_of_activity_id == 4);
|
||||
if(arr2.length > 0) {
|
||||
// this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
|
||||
// if(value.status == 200){
|
||||
// this.suppliers_trade_details = value.records.trade_details[0].trading_products;
|
||||
|
||||
// }
|
||||
// else{
|
||||
}
|
||||
if (val.type_of_activity_id == 4) {
|
||||
if(val.products){
|
||||
this.suppliers_trade_details = val.products;
|
||||
this.initTradingDetails(null);
|
||||
// }
|
||||
|
||||
// this.initTradingDetails(null);
|
||||
}
|
||||
let arr3 = record.filter(data => data.type_of_activity_id == 5);
|
||||
if(arr3.length > 0) {
|
||||
}
|
||||
if (val.type_of_activity_id == 5) {
|
||||
if(val.products){
|
||||
this.suppliers_service_product = val.products;
|
||||
this.serviceProviderForm = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
this.noRecordsFound = true;
|
||||
}
|
||||
})
|
||||
|
||||
// this.stockForms = this.fb.group({
|
||||
// stock_remarks: [''],
|
||||
// raw_materials: this.fb.array([]),
|
||||
// finished_goods: this.fb.array([]),
|
||||
// traded_goods: this.fb.array([])
|
||||
// });
|
||||
}
|
||||
|
||||
manufacturingForm: Boolean = false;
|
||||
@ -358,9 +276,7 @@ export class StockComponent implements OnInit {
|
||||
return this.fb.group({
|
||||
manufacturing_raw_materials: this.fb.array([]),
|
||||
manufacturing_finished_goods: this.fb.array([]),
|
||||
manufacturing_traded_goods: this.fb.array([])
|
||||
})
|
||||
// }
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
@ -373,7 +289,6 @@ retailFormCreation(val) {
|
||||
if (arr.length > 0) {
|
||||
this.retailForm = true;
|
||||
return this.fb.group({
|
||||
retail_finished_goods: this.fb.array([]),
|
||||
retail_traded_goods: this.fb.array([])
|
||||
})
|
||||
// }
|
||||
@ -388,7 +303,6 @@ tradingFormCreation(val) {
|
||||
if (arr.length > 0) {
|
||||
this.tradingForm = true;
|
||||
return this.fb.group({
|
||||
trading_finished_goods: this.fb.array([]),
|
||||
trading_traded_goods: this.fb.array([])
|
||||
});
|
||||
} else {
|
||||
@ -406,11 +320,10 @@ tradingFormCreation(val) {
|
||||
|
||||
const rawMaterial = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
|
||||
const finishedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials'];
|
||||
if(datas === null){
|
||||
console.log('sdzsgfasdfasddfasdf');
|
||||
console.log(this.suppliers_raw_materials);
|
||||
|
||||
|
||||
if(this.suppliers_raw_materials.length > 0){
|
||||
this.suppliers_raw_materials.forEach(val => {
|
||||
let Ref_RawMaterials : any = {'raw_name': val,
|
||||
@ -446,32 +359,11 @@ tradingFormCreation(val) {
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
if(this.suppliers_trade_details.length > 0){
|
||||
this.suppliers_trade_details.forEach(val => {
|
||||
let Ref_Trade_Goods : any = {
|
||||
'traded_goods_name': val,
|
||||
'traded_goods_observed': '',
|
||||
'traded_goods_quantity': '',
|
||||
'traded_goods_uom': '',
|
||||
'traded_goods_other_uom': '',
|
||||
'estimated_traded_goods_value': '',
|
||||
'is_sufficiant_traded_goods': '',
|
||||
'traded_goods_remarks':''};
|
||||
tradedGoods.push(this.createTradedGoods(Ref_Trade_Goods));
|
||||
});
|
||||
}
|
||||
else{
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
|
||||
} else {
|
||||
// console.log(305,'else')
|
||||
// console.log(377,datas);
|
||||
// console.log(datas.manufacturing_raw_materials);
|
||||
|
||||
if(datas.manufacturing_raw_materials != undefined){
|
||||
for (let val of datas.manufacturing_raw_materials) {
|
||||
|
||||
// console.log(val);
|
||||
if(val.raw_value){
|
||||
this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value);
|
||||
// this.M_financialRawValueInWords = this._pd.convertNumberToWords(val.rawmaterial_value);
|
||||
@ -484,7 +376,6 @@ tradingFormCreation(val) {
|
||||
}
|
||||
if(datas.manufacturing_finished_goods != undefined){
|
||||
for (let val of datas.manufacturing_finished_goods) {
|
||||
// console.log(val);
|
||||
if(val.goods_value){
|
||||
this.M_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
|
||||
// this.M_financialGoodsValueInWords = this._pd.convertNumberToWords(val.finished_goods_value);
|
||||
@ -496,28 +387,13 @@ tradingFormCreation(val) {
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
if(datas.manufacturing_traded_goods !== undefined){
|
||||
for (let val of datas.manufacturing_traded_goods) {
|
||||
// console.log(val);
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
|
||||
// this.M_financialTradedGoodsValueInWords = this._pd.convertNumberToWords(val.traded_goods_value);
|
||||
}
|
||||
tradedGoods.push(this.createTradedGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
tradedGoods.push(this.createTradedGoods(null));
|
||||
}
|
||||
// console.log(310,rawMaterial);
|
||||
}
|
||||
}
|
||||
|
||||
createRawmaterial(records) {
|
||||
// console.log(330,'function in');
|
||||
|
||||
if(records === null) {
|
||||
// console.log(331,'fif');
|
||||
|
||||
return this.fb.group({
|
||||
raw_name: [''],
|
||||
stock_observed:[''],
|
||||
@ -530,7 +406,7 @@ tradingFormCreation(val) {
|
||||
rawmaterial_remarks:['']
|
||||
})
|
||||
} else {
|
||||
// console.log(343,'else');
|
||||
|
||||
return this.fb.group({
|
||||
manufacturing_raw_material_name: [records.manufacturing_raw_material_name || null],
|
||||
raw_name: [records.raw_name],
|
||||
@ -548,32 +424,13 @@ tradingFormCreation(val) {
|
||||
|
||||
initRetailDetails(datas) {
|
||||
|
||||
const finishedGoods = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_finished_goods'];
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_traded_goods'];
|
||||
|
||||
if(datas === null){
|
||||
|
||||
// finishedGoods.push(this.createGoods(null));
|
||||
if(this.suppliers_finished_goods.length > 0){
|
||||
// for (let val of this.suppliers_finished_goods) {
|
||||
this.suppliers_finished_goods.forEach(val => {
|
||||
let Ref_Finished_Goods : any = {'goods_name': val,
|
||||
'goods_observed': '',
|
||||
'goods_quantity': '',
|
||||
'goods_uom': '',
|
||||
'goods_other_uom': '',
|
||||
'goods_value': '',
|
||||
'is_sufficiant_goods': '',
|
||||
'finishedgoods_remarks':''};
|
||||
finishedGoods.push(this.createGoods(Ref_Finished_Goods));
|
||||
});
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
if(this.suppliers_trade_details.length > 0){
|
||||
console.log(this.suppliers_trade_details);
|
||||
this.rawMaterialAccess = true;
|
||||
|
||||
this.suppliers_trade_details.forEach(val => {
|
||||
let Ref_Trade_Goods : any = {
|
||||
'traded_goods_name': val,
|
||||
@ -592,27 +449,9 @@ tradingFormCreation(val) {
|
||||
}
|
||||
|
||||
} else {
|
||||
//console.log(479,datas.retail_finished_goods);
|
||||
if(datas.retail_finished_goods != undefined){
|
||||
for (let val of datas.retail_finished_goods) {
|
||||
// console.log(val);
|
||||
|
||||
if(val.goods_value){
|
||||
this.R_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
|
||||
// this.R_financialGoodsValueInWords =this._pd.convertNumberToWords(val.finished_goods_value);
|
||||
}
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
//console.log(495,datas.retail_traded_goods);
|
||||
if(datas.retail_traded_goods !== undefined){
|
||||
for (let val of datas.retail_traded_goods) {
|
||||
// console.log(val);
|
||||
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
|
||||
// this.R_financialTradedGoodsValueInWords =this._pd.convertNumberToWords(val.traded_goods_value);
|
||||
@ -684,31 +523,9 @@ tradingFormCreation(val) {
|
||||
}
|
||||
|
||||
initTradingDetails(datas) {
|
||||
|
||||
const finishedGoods = <FormArray>this.stockForms.controls['trade_details']['controls'][0].controls['trading_finished_goods'];
|
||||
const tradedGoods = <FormArray>this.stockForms.controls['trade_details']['controls'][0].controls['trading_traded_goods'];
|
||||
|
||||
if(datas === null){
|
||||
|
||||
// finishedGoods.push(this.createGoods(null));
|
||||
// tradedGoods.push(this.createTradedGoods(null));
|
||||
if(this.suppliers_finished_goods.length > 0){
|
||||
// for (let val of this.suppliers_finished_goods) {
|
||||
this.suppliers_finished_goods.forEach(val => {
|
||||
let Ref_Finished_Goods : any = {'goods_name': val,
|
||||
'goods_observed': '',
|
||||
'goods_quantity': '',
|
||||
'goods_uom': '',
|
||||
'goods_other_uom': '',
|
||||
'goods_value': '',
|
||||
'is_sufficiant_goods': '',
|
||||
'finishedgoods_remarks':''};
|
||||
finishedGoods.push(this.createGoods(Ref_Finished_Goods));
|
||||
});
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
|
||||
if(this.suppliers_trade_details.length > 0){
|
||||
// for (let val of this.suppliers_trade_details) {
|
||||
@ -730,31 +547,10 @@ tradingFormCreation(val) {
|
||||
}
|
||||
|
||||
} else {
|
||||
// for (let val of datas) {
|
||||
|
||||
// finishedGoods.push(this.createGoods(val.trading_finished_goods));
|
||||
// tradedGoods.push(this.createTradedGoods(val.trading_traded_goods));
|
||||
|
||||
// }
|
||||
if(datas.trading_finished_goods !==undefined)
|
||||
{
|
||||
for (let val of datas.trading_finished_goods) {
|
||||
// console.log(val);
|
||||
if(val.goods_value){
|
||||
this.T_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
|
||||
// this.T_financialGoodsValueInWords = this._pd.convertNumberToWords(val.finished_goods_value);
|
||||
}
|
||||
finishedGoods.push(this.createGoods(val));
|
||||
|
||||
}
|
||||
}
|
||||
else{
|
||||
finishedGoods.push(this.createGoods(null));
|
||||
}
|
||||
if(datas.trading_traded_goods !==undefined)
|
||||
{
|
||||
for (let val of datas.trading_traded_goods) {
|
||||
// console.log(val);
|
||||
|
||||
if(val.estimated_traded_goods_value){
|
||||
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
|
||||
// this.T_financialTradedGoodsValueInWords =this._pd.convertNumberToWords(val.traded_goods_value);
|
||||
@ -827,13 +623,9 @@ tradingFormCreation(val) {
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
const control = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_finished_goods'];
|
||||
control.push(this.createGoods(null));
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
const control = <FormArray>this.stockForms.controls['trade_details']['controls'][0].controls['trading_finished_goods'];
|
||||
control.push(this.createGoods(null));
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -849,13 +641,9 @@ tradingFormCreation(val) {
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
const control = <FormArray>this.stockForms.controls['retail_details']['controls'][0].controls['retail_finished_goods'];
|
||||
control.removeAt(index);
|
||||
break;
|
||||
}
|
||||
case 3: {
|
||||
const control = <FormArray>this.stockForms.controls['trade_details']['controls'][0].controls['trading_finished_goods'];
|
||||
control.removeAt(index);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
@ -868,14 +656,8 @@ tradingFormCreation(val) {
|
||||
}
|
||||
|
||||
addTradedGoods(flag) {
|
||||
// const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
|
||||
// //const control = <FormArray>this.stockForms.controls['traded_goods'];
|
||||
|
||||
// control.push(this.createTradedGoods(null));
|
||||
switch(flag){
|
||||
case 1: {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
|
||||
control.push(this.createTradedGoods(null));
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
@ -895,9 +677,7 @@ tradingFormCreation(val) {
|
||||
}
|
||||
deleteTradedGoods(index,flag) {
|
||||
switch(flag){
|
||||
case 1: {
|
||||
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
|
||||
control.removeAt(index);
|
||||
case 1:{
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
@ -915,7 +695,6 @@ tradingFormCreation(val) {
|
||||
}
|
||||
}
|
||||
|
||||
//const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
|
||||
//const control = <FormArray>this.stockForms.controls['traded_goods'];
|
||||
|
||||
}
|
||||
@ -930,8 +709,7 @@ tradingFormCreation(val) {
|
||||
// return;
|
||||
// } else {
|
||||
var answerFormValues = this.stockForms.value;
|
||||
console.log(answerFormValues);
|
||||
// return;
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(answerFormValues).forEach((key) => (answerFormValues[key] == null) && delete answerFormValues[key]);
|
||||
|
||||
|
||||
@ -42,30 +42,43 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="manufacturing_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10">
|
||||
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 45%">
|
||||
<mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<!-- //(selectionChange)="selectedPM($event)" -->
|
||||
<mat-select placeholder="Payment Type" formControlName="manufacturing_payment_type">
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<input matInput placeholder="No.of days of Credit Provided by Supplier" formControlName="manufacturing_credit_days">
|
||||
</div>
|
||||
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('manufacturing_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="manufacturing_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="manufacturing_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -126,20 +139,26 @@
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">
|
||||
{{comrelShip.name}}
|
||||
</mat-option>
|
||||
<mat-option value="1" > Not Applicable </mat-option>
|
||||
<!-- <mat-option value="1" > Not Applicable </mat-option> -->
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 35%" *ngIf="items.get('person_designation').value == 1">
|
||||
<input matInput placeholder="Specify Person Designation" formControlName="other_person_designation">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput placeholder="Contact Person Mobile Number" autocomplete="off" formControlName="trade_product_contact_person_mobile_number" (keypress)="keyPress($event)" maxlength="10">
|
||||
<mat-error>Enter Valid Mobile Number.</mat-error>
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 15%">
|
||||
<input matInput autocomplete="off" placeholder="STD Code" formControlName="person_stdcode" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid STD Code Number.</mat-error>
|
||||
</mat-form-field> -
|
||||
<mat-form-field style="width: 35%">
|
||||
<input matInput autocomplete="off" placeholder="Contact Person Landline Number" formControlName="person_landline" type="text" (keypress)="keyPress($event)">
|
||||
<mat-error>Enter Valid LandLine Number.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row nowrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
@ -148,10 +167,20 @@
|
||||
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
</div>
|
||||
<!-- <mat-form-field style="width: 45%" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<input matInput placeholder="No.of Days of Credit Provided by Supplier" autocomplete="off" formControlName="trade_product_credit_days" (keypress)="keyPress($event)">
|
||||
</mat-form-field> -->
|
||||
<div fxLayout="row nowrap" *ngIf="items.get('trade_product_payment_type').value == 3">
|
||||
<mat-label>No.of days of Credit Provided by Supplier </mat-label>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days From" formControlName="trade_product_credit_days_from" type="number">
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%" >
|
||||
<input matInput placeholder="Days To" formControlName="trade_product_credit_days_to" type="number">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div align="end">
|
||||
<span *ngIf="item.controls.trading_products.controls.length > 1" (click)="removeTradingProduct(l)">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" color="primary" matTooltip="Delete" matTooltipPosition="above"><mat-icon>delete</mat-icon></button>
|
||||
@ -168,7 +197,7 @@
|
||||
</div>
|
||||
<div fxlayout="row">
|
||||
<mat-form-field style="width: 90%">
|
||||
<input matInput placeholder="% of Total Trading Product Credit Values" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
<input matInput placeholder="What % of Total Trade is done on Credit?" formControlName="trading_products_total_payments_percent_on_credit"
|
||||
type="number" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
@ -54,6 +54,7 @@ export class SupplierInfoComponent implements OnInit {
|
||||
this.form_id = 1;
|
||||
this.company_id = this.pd_all_details.company_id
|
||||
this.notifier = notifier;
|
||||
this.pageTitle = this.pd_all_details.company_name + ' - ' +this.pageTitle ;
|
||||
|
||||
}
|
||||
public viewerOptions: any = {
|
||||
@ -266,10 +267,12 @@ export class SupplierInfoComponent implements OnInit {
|
||||
manufacturing_supplier_name: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[''],
|
||||
other_person_designation:[''],
|
||||
manufacturing_contact_person_name: [''],
|
||||
manufacturing_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
manufacturing_payment_type: [''],
|
||||
manufacturing_credit_days: [''],
|
||||
manufacturing_credit_days_from: [''],
|
||||
manufacturing_credit_days_to:[''],
|
||||
manufacturing_frequency_of_purchase: [''],
|
||||
person_stdcode:['', Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:['', Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
@ -281,10 +284,12 @@ export class SupplierInfoComponent implements OnInit {
|
||||
manufacturing_supplier_name: [records.manufacturing_supplier_name || null],
|
||||
person_title_name:[records.person_title_name || null],
|
||||
person_designation:[records.person_title_name || 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)])],
|
||||
manufacturing_payment_type: [records.manufacturing_payment_type || null],
|
||||
manufacturing_credit_days: [records.manufacturing_credit_days || null],
|
||||
manufacturing_credit_days_from: [records.manufacturing_credit_days_from || null],
|
||||
manufacturing_credit_days_to:[records.manufacturing_credit_days_to || null],
|
||||
manufacturing_frequency_of_purchase: [records.manufacturing_frequency_of_purchase || null],
|
||||
person_stdcode:[records.person_stdcode || null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[records.person_landline || null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
@ -309,20 +314,23 @@ export class SupplierInfoComponent implements OnInit {
|
||||
trade_product_name: [''],
|
||||
trade_supplier_name: [''],
|
||||
person_title_name:[''],
|
||||
person_designation:[],
|
||||
person_designation:[''],
|
||||
other_person_designation:[''],
|
||||
trade_product_contact_person_name: [''],
|
||||
trade_product_contact_person_mobile_number: ['',Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
person_stdcode:[null, Validators.compose([Validators.minLength(3),Validators.maxLength(5),Validators.pattern('^[0-9]*$')])],
|
||||
person_landline:[null, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_payment_type: [''],
|
||||
trade_product_frequency_of_purchase: [''],
|
||||
trade_product_credit_days: [''],
|
||||
trade_product_credit_days_from: [''],
|
||||
trade_product_credit_days_to: [''],
|
||||
})
|
||||
} else {
|
||||
return this._formBuilder.group({
|
||||
trade_product_name: [records.trade_product_name],
|
||||
person_title_name:[records.person_title_name],
|
||||
person_designation:[records.person_designation],
|
||||
other_person_designation:[records.other_person_designation],
|
||||
trade_supplier_name: [records.trade_supplier_name],
|
||||
trade_product_contact_person_name: [records.trade_product_contact_person_name],
|
||||
trade_product_contact_person_mobile_number: [records.trade_product_contact_person_mobile_number, Validators.compose([Validators.minLength(10),Validators.maxLength(10)])],
|
||||
@ -330,7 +338,8 @@ export class SupplierInfoComponent implements OnInit {
|
||||
person_landline:[records.person_landline, Validators.compose([Validators.minLength(6),Validators.maxLength(8),Validators.pattern('^[0-9]*$')])],
|
||||
trade_product_payment_type: [records.trade_product_payment_type],
|
||||
trade_product_frequency_of_purchase: [records.trade_product_frequency_of_purchase],
|
||||
trade_product_credit_days: [records.trade_product_credit_days],
|
||||
trade_product_credit_days_from: [records.trade_product_credit_days_from],
|
||||
trade_product_credit_days_to: [records.trade_product_credit_days_to],
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -365,7 +374,8 @@ export class SupplierInfoComponent implements OnInit {
|
||||
data => {
|
||||
if (data.dataStatus) {
|
||||
if(type==1){
|
||||
this.companyRelationShipList=data.records.filter(item => item.name != 'Others');
|
||||
this.companyRelationShipList=data.records;
|
||||
// .filter(item => item.name != 'Others');
|
||||
|
||||
}
|
||||
if(type==2){
|
||||
|
||||
@ -33,3 +33,4 @@
|
||||
<button matTooltip="Complete Question" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
||||
</mat-card-actions>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
<span *ngIf="master.pd_status!=pdStatusCheck.SCHEDULED && master.pd_status!=pdStatusCheck.QC_COMPLETED " style="text-align:left">{{master.pd_status | titlecase}}</span>
|
||||
<span *ngIf="master.pd_status==pdStatusCheck.QC_COMPLETED " style="text-align:left">QC Completed</span>
|
||||
</button>
|
||||
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Draft" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
||||
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master)"><mat-icon>flash_on</mat-icon></button>
|
||||
<!-- <button *ngIf="currentPDStatus==pdStatusCheck.DRAFT && mandatoryFieldsValidations.length==0" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Trigger" matTooltipPosition="above" (click)="directTriggerPD(mandatoryFieldsValidations,master.pd_id)"><mat-icon>flash_on</mat-icon></button> -->
|
||||
<br>
|
||||
<small *ngIf="master.pd_allocated_to && master.fk_pd_type==1" style="text-align:left" matTooltip="PD Officer" matTooltipPosition="above">{{master.pd_allocated_to | titlecase}}</small>
|
||||
@ -98,7 +98,7 @@
|
||||
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;" (click)="Maponclick(master)" matTooltip="Map View" matTooltipPosition="left"></i></span>
|
||||
</div>
|
||||
<div fxFlex="90">
|
||||
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode}} </span>
|
||||
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode_id == 1 ? master.other_pincode : master.pincode }} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -134,6 +134,7 @@ export class ViewPdComponent implements OnInit, OnDestroy {
|
||||
if (data.status == 200) {
|
||||
let masterData: any = data.records.pd_master_details;
|
||||
this.pdMasterData.push(masterData[0]);
|
||||
console.log('this.pdMasterData',this.pdMasterData);
|
||||
this.mandatoryFieldsValidations = masterData[1].mandatory_fields;
|
||||
this.pd_QC_Rating = Number(this.pdMasterData.qc_rating);
|
||||
this.pdApplicantData= data.records.applicants_details;
|
||||
|
||||
0
ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.spec.ts
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.ts
Normal file → Executable file
0
ng6-seed/src/app/personal-discussion/pd-pipes/search-relation.pipe.ts
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html
Normal file → Executable file
0
ng6-seed/src/app/settings/entity/entity-edit/entity-edit-tat/entity-edit-list-tat.component.html
Normal file → Executable file
Loading…
Reference in New Issue
Block a user