Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
1d19984eda
@ -142,7 +142,7 @@
|
||||
</div>
|
||||
<div fxFlex="30" align="end">
|
||||
<button *ngIf="currentPDStatus==pdStatusCheck.DRAFT || currentPDStatus==pdStatusCheck.TRIGGERED" mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" (click)="saveDraftPD(this._EditPDtriggerForm.value,pdStatusCheck.DRAFT)" type="button" matTooltip="Save As Draft" matTooltipPosition="above"><mat-icon>insert_drive_file</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="PD Process" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button>
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Trigger PD" matTooltipPosition="above" type="button" (click)="triggerPD(_EditPDtriggerForm.value, pdStatusCheck.TRIGGERED)"><mat-icon>save</mat-icon></button>
|
||||
</div>
|
||||
</mat-dialog-actions>
|
||||
|
||||
|
||||
@ -19,105 +19,118 @@
|
||||
<mat-card>
|
||||
<!-- <mat-card-title>Address Details</mat-card-title> -->
|
||||
<mat-card-content>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="33">
|
||||
<div fxLayout="row wrap">
|
||||
|
||||
<div fxFlex="33">
|
||||
|
||||
<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">
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Address Type" formControlName="address_type" required>
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="addressForm.controls['address_type'].value == 12" style="width: 80%;">
|
||||
<input matInput placeholder="Address Type Others" formControlName="address_type_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<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">
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Address Type" formControlName="address_type" required>
|
||||
<mat-option value="{{m_addressType.address_type_id}}"
|
||||
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_type'].value == 12" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Address Type" formControlName="address_type_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Locality" formControlName="locality" required>
|
||||
<mat-option value="{{m_locality.locality_id}}"
|
||||
*ngFor="let m_locality of localityData">{{m_locality.locality_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'" style="width: 80%;">
|
||||
<input matInput placeholder="Specify Locality"
|
||||
formControlName="locality_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
||||
<mat-option value="{{data.pd_location_approach_id}}"
|
||||
*ngFor="let data of locationdata">{{data.description}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
||||
<mat-option value="{{data.comments_on_locality_id}}"
|
||||
*ngFor="let data of commentData">{{data.rating}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
||||
<mat-option value="{{ownerShip.id}}"
|
||||
*ngFor="let ownerShip of ownerShipData">
|
||||
{{ownerShip.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 80%;">
|
||||
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<div *ngIf="addressForm.controls.locality.value == 7" fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Locality"
|
||||
formControlName="locality_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 80%;">
|
||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
|
||||
<mat-option value="{{data.pd_location_approach_id}}"
|
||||
*ngFor="let data of locationdata">{{data.description}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Is there any business activity is being run?"
|
||||
formControlName="bussiness_activity" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
|
||||
<div fxFlex="100">
|
||||
<label>How long has business been operated from this premise?</label>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Year(s)" formControlName="business_years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
|
||||
<mat-option value="{{data.comments_on_locality_id}}"
|
||||
*ngFor="let data of commentData">{{data.rating}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Ownership" formControlName="address_ownership">
|
||||
<mat-option value="{{ownerShip.id}}"
|
||||
*ngFor="let ownerShip of ownerShipData">
|
||||
{{ownerShip.name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_ownership'].value == 4 " fxFlex="33">
|
||||
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="Specify Ownership" formControlName="other_ownership" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="addressForm.controls['address_ownership'].value == 3 " fxFlex="33">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div fxLayout="row wrap">
|
||||
<div fxFlex="100">
|
||||
<label>How long has business been operated from this premise?</label>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Year(s)" formControlName="business_years">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="100">
|
||||
<mat-form-field style="width: 80%;">
|
||||
<mat-select placeholder="Is there any other premises from which business activity is being run?"
|
||||
formControlName="bussiness_activity" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Don't Remove To replace atlast of the PD Completion and creating new form (Customer Behaviour 221118 review doc : s.no 3.e )
|
||||
@ -151,9 +164,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
||||
<input matInput placeholder="Specify Other Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field *ngIf="PremisesOtherFlag == true" style="width: 40%">
|
||||
<input matInput placeholder="Specify Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||
</mat-form-field> -->
|
||||
<span *ngIf="PremisesOtherFlag == true">
|
||||
<br>
|
||||
<mat-form-field style="width: 40%">
|
||||
<input matInput placeholder="Specify Premises Type" formControlName="bussiness_address_type_others" (change)="otherValueset()" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
|
||||
<span formArrayName="additional_premises">
|
||||
<div
|
||||
*ngFor="let item of addressForm.controls.additional_premises['controls']; let i = index;" [formGroupName]="i">
|
||||
@ -184,7 +205,7 @@
|
||||
|
||||
<!-- <mat-form-field *ngIf="addressForm.controls['premises_ownership'].value == 4 "> -->
|
||||
<mat-form-field *ngIf="item.get('premises_ownership').value == 4" style="width: 40%;">
|
||||
<input matInput placeholder="Specify Other Ownership" formControlName="premises_ownership_others" autocomplete="off">
|
||||
<input matInput placeholder="Specify Ownership" formControlName="premises_ownership_others" autocomplete="off">
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;">
|
||||
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off">
|
||||
@ -383,10 +404,4 @@
|
||||
</mat-dialog-actions>
|
||||
|
||||
</form>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<notifier-container></notifier-container>
|
||||
@ -125,61 +125,15 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.comment_locality.setValue(data.records.comment_locality);
|
||||
// this.addressForm.controls.customer_behaviour.setValue(data.records.customer_behaviour);
|
||||
this.addressForm.controls.locality.setValue(data.records.locality);
|
||||
if(data.records.locality == 7 ){
|
||||
this.addressForm.controls.locality_others.setValue(data.records.locality_others);
|
||||
}
|
||||
this.addressForm.controls.address_form_remark.setValue(data.records.address_form_remark);
|
||||
this.addressForm.controls.address_ownership.setValue(data.records.address_ownership);
|
||||
this.addressForm.controls.other_ownership.setValue(data.records.other_ownership);
|
||||
this.addressForm.controls.rent_amt.setValue(data.records.rent_amt);
|
||||
this.addressForm.controls.bussiness_activity.setValue(data.records.bussiness_activity);
|
||||
|
||||
// if(data.records.bussiness_activity == 'yes') {
|
||||
|
||||
// this.bussiness_address_type = [];
|
||||
|
||||
// this.bussiness_address_type = (Object.keys(data.records.bussiness_address_type).map(function(key)
|
||||
// {
|
||||
// return data.records.bussiness_address_type[key].premises_types;
|
||||
// }))
|
||||
|
||||
// // console.log(bussiness_address_type);
|
||||
|
||||
|
||||
// let selectedPremisesDBData = Object.keys(data.records.bussiness_address_type).map(function (key) {
|
||||
// return data.records.bussiness_address_type[key];
|
||||
// });
|
||||
|
||||
// let enduse: any = [];
|
||||
// let existPremises: any =[];
|
||||
|
||||
// selectedPremisesDBData.forEach(val => {
|
||||
// enduse.push(val.premises_types);
|
||||
// existPremises.push(val);
|
||||
// });
|
||||
|
||||
// this.formPremisesArray = existPremises;
|
||||
|
||||
|
||||
// this.addressForm.controls.bussiness_address_type.setValue(enduse);
|
||||
|
||||
// var additionalPremisesResult = Object.keys(data.records.additional_premises).map(function (key) {
|
||||
// return data.records.additional_premises[key];
|
||||
// });
|
||||
|
||||
// this.additional_premises = additionalPremisesResult;
|
||||
|
||||
// if (additionalPremisesResult.length == 0) {
|
||||
// additionalPremisesControl.push(this.createPremises());
|
||||
// } else {
|
||||
// additionalPremisesResult.forEach(datas => {
|
||||
// additionalPremisesControl.push(this.createPremises());
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
// if(data.records.bussiness_address_type == 12) {
|
||||
// this.addressForm.controls.bussiness_address_type_others.setValue(data.records.bussiness_address_type_others);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(data.records.bussiness_activity == 'yes' && data.records.bussiness_address_type !=null) {
|
||||
this.addressForm.controls.business_years.setValue(data.records.business_years);
|
||||
this.addressForm.controls.business_month.setValue(data.records.business_month);
|
||||
@ -198,8 +152,6 @@ export class AddressComponent implements OnInit {
|
||||
})
|
||||
|
||||
}
|
||||
// console.log(this.bussiness_address_type);
|
||||
// console.log(this.additional_premises);
|
||||
|
||||
this.selectedValue(this.bussiness_address_type,this.additional_premises);
|
||||
if (data.records.locality_others) {
|
||||
@ -333,8 +285,9 @@ export class AddressComponent implements OnInit {
|
||||
control.removeAt(index);
|
||||
}*/
|
||||
onSubmit() {
|
||||
//console.log('form data', this.addressForm.value);
|
||||
|
||||
if (!this.addressForm.valid) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -345,7 +298,7 @@ export class AddressComponent implements OnInit {
|
||||
records.address_type_others = this.addressForm.controls.address_type_others.value;
|
||||
}
|
||||
records.locality = this.locality.value;
|
||||
if (this.locality.value == 'Others') {
|
||||
if (this.locality.value == 7) {
|
||||
records.locality_others = this.addressForm.controls.locality_others.value;
|
||||
}
|
||||
records.pd_location = this.pdLocation.value;
|
||||
@ -369,16 +322,16 @@ export class AddressComponent implements OnInit {
|
||||
records.bussiness_address_type_others = this.addressForm.controls.bussiness_address_type_others.value;
|
||||
}
|
||||
}
|
||||
console.log('this.addressForm.controls.additional_premises.value',this.addressForm.controls.additional_premises.value);
|
||||
this.addressForm.controls.additional_premises.value.forEach((val,index)=>
|
||||
{
|
||||
//console.log(val);
|
||||
|
||||
if(val.premises_city != ''){
|
||||
{
|
||||
|
||||
console.log('val.premises_city',val.premises_city);
|
||||
if(val.premises_city != '' && val.premises_city != null){
|
||||
this.formPremisesCityArray = [];
|
||||
val.premises_city.forEach(option => {
|
||||
this.formPremisesCityArray.push({additional_premises_city: option});
|
||||
this.addressForm.controls.additional_premises.value[index].premises_city = this.formPremisesCityArray;
|
||||
// console.log(val);
|
||||
});
|
||||
}
|
||||
else{
|
||||
@ -390,15 +343,14 @@ export class AddressComponent implements OnInit {
|
||||
});
|
||||
|
||||
records.additional_premises = this.addressForm.controls.additional_premises.value;
|
||||
// console.log(this.formPremisesCityArray);
|
||||
// console.log(this.addressForm.controls.premises.value);
|
||||
|
||||
records.pdid = this.pdid;
|
||||
records.formid = '5';
|
||||
// records.fk_createdby = '250';
|
||||
console.log('params', records);
|
||||
|
||||
|
||||
this._pd.saveForm(records).subscribe(data => {
|
||||
//console.log('data', data);
|
||||
|
||||
this.notifier.notify('success', 'Saved Successfully.');
|
||||
}, error => {
|
||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||
@ -414,22 +366,22 @@ export class AddressComponent implements OnInit {
|
||||
SelectedPremises($event){
|
||||
|
||||
let premisesData = $event.source.value;
|
||||
//console.log(premisesData);
|
||||
|
||||
|
||||
if($event.checked === true ){
|
||||
|
||||
//this.formPremisesArray.push({member: $event.source.value});
|
||||
//this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
//console.log('true',premisesData);
|
||||
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
|
||||
this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
let array = this.addressData.filter(data => data.address_type_id == premisesData)[0];
|
||||
//console.log(array);
|
||||
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = true;
|
||||
// this.PremisesLabel[this.z] = this.pdQuestionAddress.get('bussiness_address_type_others').value;
|
||||
@ -455,7 +407,7 @@ export class AddressComponent implements OnInit {
|
||||
if(premisesData == 12){
|
||||
this.PremisesOtherFlag = false;
|
||||
}
|
||||
//console.log(this.formPremisesArray);
|
||||
|
||||
let index = this.formPremisesArray.findIndex(form=>form.premises_types== $event.source.value);
|
||||
//console.log(index);
|
||||
const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
@ -481,78 +433,9 @@ export class AddressComponent implements OnInit {
|
||||
let z = this.z;
|
||||
this.PremisesLabel[z-1] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
}
|
||||
// checkaddress(value)
|
||||
// {
|
||||
// // console.log(value);
|
||||
// if(value=="OTHERS")
|
||||
// {
|
||||
// this.addressRemarksAccess = true;
|
||||
// }else
|
||||
// {
|
||||
// this.addressRemarksAccess = false;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// SelectedPremises($event){
|
||||
// console.log('event',$event);
|
||||
|
||||
// let premisesData = $event.source.value;
|
||||
|
||||
|
||||
// if($event.source._selected === true ){
|
||||
|
||||
// //this.formPremisesArray.push({member: $event.source.value});
|
||||
// //this.selectedSegmentDatas.push(CustomerSegmentName.name);
|
||||
// //console.log('true',premisesData);
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// this.formPremisesArray.push({premises_types: $event.source.value});
|
||||
|
||||
// //console.log(this.formPremisesArray);
|
||||
|
||||
// let array = this.addressData.filter(data => data.address_type_id == premisesData);
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = true;
|
||||
// this.PremisesLabel[this.z] = this.addressForm.get('bussiness_address_type_others').value;
|
||||
// }
|
||||
// else{
|
||||
// this.PremisesLabel[this.z] = array[0].address_type;
|
||||
// }
|
||||
// this.z++;
|
||||
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.push(this.createPremises());
|
||||
|
||||
|
||||
|
||||
// }
|
||||
// else if($event.source._selected === false ){
|
||||
|
||||
// console.log('false',premisesData);
|
||||
|
||||
|
||||
// if(premisesData == 12){
|
||||
// this.PremisesOtherFlag = false;
|
||||
// }
|
||||
|
||||
// const control = <FormArray>this.addressForm.controls['additional_premises'];
|
||||
// control.removeAt(this.z);
|
||||
// this.z--;
|
||||
// //let index = this.selectedSegmentDatas.indexOf(CustomerSegmentName.name);
|
||||
// //this.selectedSegmentDatas.splice(index,1);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
selectedValue(e,data)
|
||||
{
|
||||
// console.log('501 function',);
|
||||
// console.log('inside function in bussiness_address_type,',e);
|
||||
// console.log('inside function in this.additional_premises,',data);
|
||||
|
||||
let premisesData = e ;
|
||||
this.tempArr = [];
|
||||
@ -562,12 +445,12 @@ export class AddressComponent implements OnInit {
|
||||
that.addressData[key].status = 0;
|
||||
return that.addressData[key];
|
||||
})
|
||||
//console.log(this.addressData);
|
||||
|
||||
premisesData.forEach((val,index)=>
|
||||
{
|
||||
//console.log(val);
|
||||
|
||||
this.z++;
|
||||
// console.log(this.addressTypes);
|
||||
|
||||
this.formPremisesArray.push({premises_types: val});
|
||||
|
||||
this.tempArr.push(this.addressData.filter(add=>add.address_type_id==val)[0]);
|
||||
@ -579,6 +462,7 @@ export class AddressComponent implements OnInit {
|
||||
{
|
||||
return data[index].premises_city[key].additional_premises_city;
|
||||
});
|
||||
//data[index].premises_city = data[index].premises_city.additional_premises_city;
|
||||
}
|
||||
this.addressData.forEach(data=>
|
||||
{
|
||||
@ -621,7 +505,5 @@ export class AddressComponent implements OnInit {
|
||||
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -19,7 +19,7 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>About Business</p>
|
||||
<mat-card-title>About Business</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<div flexLayout="row wrap">
|
||||
@ -31,24 +31,24 @@
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.profession_name.value=='Others'">
|
||||
<input matInput placeholder="Other Name in Which The Business is Run" formControlName="profession_name_other" required>
|
||||
<input matInput placeholder="Name in Which The Business is Run" formControlName="profession_name_other" required>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field style="width: 45%;">
|
||||
<mat-select placeholder="Business Entity Type"
|
||||
formControlName="business_entity_type" required>
|
||||
<mat-option value="{{entity}}" *ngFor="let entity of businessEntityTypeList">{{entity | titlecase}}</mat-option>
|
||||
<mat-option [value]="entity.business_entity_type_id" *ngFor="let entity of businessEntityTypeList">{{entity.business_entity_type_name | titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value=='Others'">
|
||||
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value=='11'">
|
||||
<input matInput placeholder="Other Business Entity Type" formControlName="business_entity_type_other" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 45%">
|
||||
<!-- <mat-form-field style="width: 45%">
|
||||
<mat-select placeholder="Industry"
|
||||
formControlName="industry">
|
||||
<mat-option value="{{list.industry_classification_id}}" *ngFor="let list of industryData">{{list.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-form-field> -->
|
||||
</div>
|
||||
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||
<mat-form-field>
|
||||
@ -95,7 +95,7 @@
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>{{businessForm.controls.business_entity_type.value =='Others' ? businessForm.controls.business_entity_type_other.value : sourceNames[businessForm.controls.business_entity_type.value]}}</p>
|
||||
<mat-card-title>{{businessForm.controls.business_entity_type.value =='11' ? businessForm.controls.business_entity_type_other.value : sourceNames[businessForm.controls.business_entity_type.value]}}</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content formArrayName="partners">
|
||||
<mat-card *ngFor="let members of businessForm.controls.partners['controls']; let i=index"
|
||||
@ -136,7 +136,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Number of Years For Which The Business Has Been Running</p>
|
||||
<mat-card-title>Number of Years For Which The Business Has Been Running</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<mat-form-field style="width: 20%;">
|
||||
@ -145,8 +145,8 @@
|
||||
<mat-form-field style="width: 20%;">
|
||||
<input matInput type="number" placeholder="Month" formControlName="business_month" required min='0' max='12'>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width: 30%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object" placeholder="Choose a date">
|
||||
<mat-form-field style="width: 40%;">
|
||||
<input matInput [max]="maxDate" [matDatepicker]="picker" formControlName="business_date_object" placeholder="Enter Date of Formation, If Available">
|
||||
<mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
|
||||
<mat-datepicker touchUi #picker></mat-datepicker>
|
||||
</mat-form-field>
|
||||
@ -155,7 +155,7 @@
|
||||
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>List of Persons With Relationships</p>
|
||||
<mat-card-title>Add Other Family Members Involved In Business</mat-card-title>
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
@ -166,51 +166,67 @@
|
||||
<ng-container matColumnDef="family_member_name">
|
||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
{{details.value.family_member_name | titlecase}} ( {{ details.value.other_family_relationship_name | titlecase}})
|
||||
</mat-cell>
|
||||
|
||||
<!-- {{details.value.family_member_name | titlecase}} ( {{ details.value.other_family_relationship_name | titlecase}}) -->
|
||||
<mat-form-field style="width: 90%;">
|
||||
<input matInput formControlName="family_member_name" type="text">
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation">
|
||||
<mat-header-cell *matHeaderCellDef> Relation </mat-header-cell>
|
||||
<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-select>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relation_to">
|
||||
<mat-header-cell *matHeaderCellDef> Relationship To </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
{{details.value.relation_to | titlecase}}
|
||||
<mat-form-field style="width: 90%;">
|
||||
<mat-select
|
||||
formControlName="relation_to_id" style="width: 90%;">
|
||||
<mat-option *ngFor="let appc of applicants" [value]="appc.pd_co_applicant_id">{{appc.applicant_name | titlecase}}</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="relationship">
|
||||
<ng-container matColumnDef="relationship_with_company">
|
||||
<mat-header-cell *matHeaderCellDef> Relationship With Company </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
{{details.value.relationship_with_company | titlecase}}
|
||||
<mat-form-field style="width: 90%;">
|
||||
<mat-select formControlName="relationship_with_company_id">
|
||||
<mat-option *ngFor="let comrelShip of companyRelationShipList" [value]="comrelShip.company_relationship_id">{{comrelShip.name}}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="started_business">
|
||||
<mat-header-cell *matHeaderCellDef class="mat-header-color"> Started Business </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-form-field>
|
||||
<mat-form-field style="width: 75%;">
|
||||
<mat-select formControlName="started_business">
|
||||
<mat-option value="">Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</mat-cell>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="currently_active_status">
|
||||
<mat-header-cell *matHeaderCellDef class="mat-header-color"> Currently Actively Involved In Running The Business </mat-header-cell>
|
||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||
<mat-form-field>
|
||||
<mat-select formControlName="currently_active_status">
|
||||
<mat-option value="">Select</mat-option>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeFamilyMember(i)"
|
||||
matTooltip="Remove Family Member" 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>
|
||||
</mat-table>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions align="end">
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="otherFamilyMemberDialogue()"
|
||||
@ -221,7 +237,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Type of Business Activity</p>
|
||||
<mat-card-title>Type of Business Activity</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<!-- <mat-select placeholder="Type of Activity"
|
||||
@ -237,7 +253,7 @@
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.manufacturing_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<p>Manufacturing Details</p>
|
||||
<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">
|
||||
@ -245,17 +261,26 @@
|
||||
<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: 45%;">
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeManufacturingAreaSale(manufacturing,m)" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="manufacturing.value.india_where_sale_done !=undefined && manufacturing.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of manufacturing.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
|
||||
<!-- this is under manufacture -->
|
||||
<mat-form-field style="width: 20%;" *ngIf="manufacturing.value.pan_india_options !=undefined && manufacturing.value.area_of_sale =='Within India'">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(1,m,manufacturing.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="manufacturing.value.india_where_sale_done !=undefined && manufacturing.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of manufacturing.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<!-- this is for other than pan india -->
|
||||
<div fxFlex="100" *ngIf="manufacturing.value.pan_india_options=='No'">
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="State" formControlName="state_name" required>
|
||||
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
||||
@ -269,8 +294,7 @@
|
||||
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addMoreState(m,'1')" *ngIf="s==0"
|
||||
matTooltip="Add More State" matTooltipPosition="right" color="primary">
|
||||
<mat-icon>add</mat-icon>
|
||||
@ -279,9 +303,28 @@
|
||||
matTooltip="Remove State" matTooltipPosition="right">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<div *ngIf="manufacturing.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of manufacturing.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,manufacturing.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done ==undefined">
|
||||
<div formArrayName="countries_where_export_done">
|
||||
@ -306,11 +349,19 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="manufacturing.value.countries_where_export_done !=undefined && manufacturing.value.india_where_sale_done !=undefined">
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Within India" formArrayName="india_where_sale_done">
|
||||
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let saleList of manufacturing.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Within India">
|
||||
<div fxLayout="row nowrap" class="tab_class">
|
||||
<mat-form-field style="width: 35%;" *ngIf="manufacturing.value.pan_india_options !=undefined">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(1,m,manufacturing.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of manufacturing.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="State" formControlName="state_name" required>
|
||||
<mat-option *ngFor="let SL of stateList" [value]="SL.state_id">
|
||||
@ -334,6 +385,25 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of manufacturing.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of manufacturing.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,manufacturing.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="manufacturing.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
<mat-tab label="Export" 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">
|
||||
@ -355,8 +425,12 @@
|
||||
</div>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
|
||||
</ng-container>
|
||||
<div fxLayout="row">
|
||||
<mat-form-field style="width:84%;">
|
||||
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
</mat-card-content>
|
||||
<mat-card-actions>
|
||||
@ -377,21 +451,28 @@
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.retail_trading_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<p>Retail Trading</p>
|
||||
<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-content>
|
||||
<mat-form-field style="width: 45%;">
|
||||
<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: 45%;">
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeRetailAreaSale(retail,r)" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- this is under Retail -->
|
||||
<mat-form-field style="width: 20%;" *ngIf="retail.value.pan_india_options !=undefined && retail.value.area_of_sale =='Within India'">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(2,r,retail.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="retail.value.india_where_sale_done !=undefined && retail.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of retail.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
@ -421,6 +502,24 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="retail.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of retail.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,retail.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="retail.value.india_where_sale_done ==undefined && retail.value.countries_where_export_done !=undefined">
|
||||
@ -449,8 +548,16 @@
|
||||
<ng-container *ngIf="retail.value.countries_where_export_done !=undefined && retail.value.india_where_sale_done !=undefined">
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Within India" formArrayName="india_where_sale_done">
|
||||
|
||||
<mat-tab label="Within India">
|
||||
<div fxLayout="row nowrap" class="tab_class">
|
||||
<mat-form-field style="width: 35%;" *ngIf="retail.value.pan_india_options !=undefined">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(2,r,retail.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let saleList of retail.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="State" formControlName="state_name" required>
|
||||
@ -475,6 +582,26 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of retail.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of retail.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,retail.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="retail.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-tab>
|
||||
<mat-tab label="Export" 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">
|
||||
@ -496,6 +623,11 @@
|
||||
</div>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<div fxLayout="row">
|
||||
<mat-form-field style="width:84%;">
|
||||
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
|
||||
@ -518,7 +650,7 @@
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.wholesale_trading_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<p>Wholesale Trade</p>
|
||||
<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">
|
||||
@ -526,13 +658,20 @@
|
||||
<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: 45%;">
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Sale" (selectionChange)="changeWholesaleAreaSale(wholesale,w)" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- this is under whole sale -->
|
||||
<mat-form-field style="width: 20%;" *ngIf="wholesale.value.pan_india_options !=undefined && wholesale.value.area_of_sale =='Within India'">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(3,w,wholesale.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="wholesale.value.india_where_sale_done !=undefined && wholesale.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of wholesale.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
@ -562,6 +701,24 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="wholesale.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of wholesale.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,wholesale.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="wholesale.value.india_where_sale_done ==undefined && wholesale.value.countries_where_export_done !=undefined">
|
||||
@ -589,8 +746,16 @@
|
||||
<ng-container *ngIf="wholesale.value.countries_where_export_done !=undefined && wholesale.value.india_where_sale_done !=undefined">
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Within India" formArrayName="india_where_sale_done">
|
||||
|
||||
<mat-tab label="Within India">
|
||||
<div fxLayout="row nowrap" class="tab_class">
|
||||
<mat-form-field style="width: 35%;" *ngIf="wholesale.value.pan_india_options !=undefined">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(3,w,wholesale.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let saleList of wholesale.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="State" formControlName="state_name" required>
|
||||
@ -615,6 +780,25 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of wholesale.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of wholesale.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,wholesale.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="wholesale.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Max Sales Done In Which Cities" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</mat-tab>
|
||||
<mat-tab label="Export" 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">
|
||||
@ -636,6 +820,11 @@
|
||||
</div>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<div fxLayout="row">
|
||||
<mat-form-field style="width:84%;">
|
||||
<input matInput placeholder="Export Sale As A % of Total Sales" formControlName="export_sale_of_total_sales">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
|
||||
@ -658,21 +847,28 @@
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.service_provider_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<p>Service Provider Details</p>
|
||||
<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-content>
|
||||
<mat-form-field style="width: 45%;">
|
||||
<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: 45%;">
|
||||
<mat-form-field style="width: 30%;">
|
||||
<mat-select formControlName="area_of_sale" placeholder="Area of Service" (selectionChange)="changeServiceArea(serviceprovider,sp)" required>
|
||||
<mat-option value="Within India">Within India</mat-option>
|
||||
<mat-option value="Export">Export</mat-option>
|
||||
<mat-option value="Both">Both</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<!-- this is under service -->
|
||||
<mat-form-field style="width: 20%;" *ngIf="serviceprovider.value.pan_india_options !=undefined && serviceprovider.value.area_of_sale =='Within India'">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(4,sp,serviceprovider.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<ng-container *ngIf="serviceprovider.value.india_where_sale_done !=undefined && serviceprovider.value.countries_where_export_done ==undefined">
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" *ngFor="let saleList of serviceprovider.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
@ -702,6 +898,24 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="serviceprovider.value.max_sale_state_name !=undefined" formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of serviceprovider.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,serviceprovider.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Where Is The Maximum Service Provided" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="serviceprovider.value.countries_where_export_done !=undefined && serviceprovider.value.india_where_sale_done ==undefined">
|
||||
@ -712,7 +926,7 @@
|
||||
<input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'2')" *ngIf="c==0"
|
||||
@ -729,8 +943,16 @@
|
||||
<ng-container *ngIf="serviceprovider.value.countries_where_export_done !=undefined && serviceprovider.value.india_where_sale_done !=undefined">
|
||||
|
||||
<mat-tab-group>
|
||||
<mat-tab label="Within India" formArrayName="india_where_sale_done">
|
||||
|
||||
<mat-tab label="Within India">
|
||||
<div fxLayout="row nowrap" class="tab_class">
|
||||
<mat-form-field style="width: 35%;" *ngIf="serviceprovider.value.pan_india_options !=undefined">
|
||||
<mat-select formControlName="pan_india_options" placeholder="Is PAN India" (selectionChange)="changePanIndiaOptions(4,sp,serviceprovider.value.pan_india_options)" required>
|
||||
<mat-option value="Yes">Yes</mat-option>
|
||||
<mat-option value="No">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div formArrayName="india_where_sale_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let saleList of serviceprovider.get('india_where_sale_done').controls; let s = index" [formGroupName]="s">
|
||||
<mat-form-field style="width:35%;">
|
||||
<mat-select placeholder="Where, In India, Is The Service Provided" formControlName="state_name" required>
|
||||
@ -756,6 +978,26 @@
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div formArrayName="max_sale_state_name">
|
||||
<div fxLayout="row nowrap" *ngFor="let maxStateList of serviceprovider.get('max_sale_state_name').controls; let mx = index" [formGroupName]="mx">
|
||||
<mat-form-field style="width:84%;">
|
||||
<mat-select multiple placeholder="Max Revenue From Services From Which States" formControlName="state_name">
|
||||
<mat-option *ngFor="let MSL of serviceprovider.value.pan_india_options=='Yes' ? stateList : filterMaxSaleState(stateList,serviceprovider.value.india_where_sale_done)" [value]="MSL.state_id">
|
||||
{{MSL.state_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:84%;" *ngIf="serviceprovider.value.pan_india_options=='No'">
|
||||
<mat-select multiple placeholder="Where Is The Maximum Service Provided" formControlName="city_name">
|
||||
<mat-option *ngFor="let MCL of filterMaxSaleCities(stateList,maxStateList.value.state_name)" [value]="MCL.city_id">
|
||||
{{MCL.city_name}}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</mat-tab>
|
||||
<mat-tab label="Export" formArrayName="countries_where_export_done">
|
||||
<div fxLayout="row nowrap" class="tab_class" *ngFor="let countryList of serviceprovider.get('countries_where_export_done').controls; let c = index" [formGroupName]="c">
|
||||
@ -763,7 +1005,7 @@
|
||||
<input matInput placeholder="Countries Where Services Are Being Exported" formControlName="country_name" >
|
||||
</mat-form-field>
|
||||
<mat-form-field style="width:45%;">
|
||||
<input matInput placeholder="Approx % of Sale" formControlName="approx_sale" required>
|
||||
<input matInput placeholder="Approx % of Revenue From Service" formControlName="approx_sale" required>
|
||||
</mat-form-field>
|
||||
|
||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="addServiceMoreState(sp,'2')" *ngIf="c==0"
|
||||
@ -777,6 +1019,11 @@
|
||||
</div>
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<div fxLayout="row">
|
||||
<mat-form-field style="width:84%;">
|
||||
<input matInput placeholder="Export Revenue As A % of Total Revenue" formControlName="export_sale_of_total_sales">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
</ng-container>
|
||||
|
||||
@ -799,7 +1046,7 @@
|
||||
</mat-card>
|
||||
<mat-card *ngIf="businessForm.controls.others_activity_details['controls'].length>0">
|
||||
<mat-card-header>
|
||||
<p>Other Details</p>
|
||||
<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">
|
||||
@ -898,8 +1145,8 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Employees As Per Applicant
|
||||
</p>
|
||||
<mat-card-title>Employees As Per Applicant </mat-card-title>
|
||||
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -918,8 +1165,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>No of Employees Sighted Ny PD Officer During His Visit
|
||||
</p>
|
||||
<mat-card-title>No of Employees Sighted Ny PD Officer During His Visit </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -938,8 +1184,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Investment In Business By Applicants
|
||||
</p>
|
||||
<mat-card-title>Investment In Business By Applicants </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -954,8 +1199,7 @@
|
||||
</mat-card>
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Location
|
||||
</p>
|
||||
<mat-card-title>Location </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcards">
|
||||
<mat-form-field>
|
||||
@ -996,8 +1240,7 @@
|
||||
</mat-card> -->
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Documents Sighted
|
||||
</p>
|
||||
<mat-card-title>Documents Sighted </mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
@ -1005,6 +1248,7 @@
|
||||
formControlName="shop_eat_act_cert" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1012,6 +1256,7 @@
|
||||
formControlName="gst_Regn_cert" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1019,6 +1264,7 @@
|
||||
formControlName="export_import_cert" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1026,6 +1272,7 @@
|
||||
formControlName="factory_cert" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1033,6 +1280,7 @@
|
||||
formControlName="practice_cert" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1040,6 +1288,7 @@
|
||||
formControlName="pf_regn" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
@ -1047,6 +1296,7 @@
|
||||
formControlName="esic_regn" required>
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
<mat-option value="not applicable">Not Applicable</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
|
||||
@ -23,7 +23,6 @@ import {
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {DatePipe } from '@angular/common';
|
||||
import { BusinessOtherFamilyMemberComponent } from './../dialogue/business-other-family-member/business-other-family-member.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-business-info',
|
||||
@ -36,7 +35,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
form_id: number;
|
||||
pageTitle: string ="Business Details";
|
||||
relationData: any = [];
|
||||
industryData: any = [];
|
||||
companyRelationShipList: any =[];
|
||||
//industryData: any = [];
|
||||
activityData: any = [];
|
||||
stateList: any = [];
|
||||
relativeNames: any;
|
||||
@ -44,12 +44,14 @@ export class BusinessInfoComponent implements OnInit {
|
||||
public businessForm: FormGroup;
|
||||
private notifier: NotifierService;
|
||||
existCompanyList: any = [];
|
||||
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"]
|
||||
// this is for automatic bind entitity name for display
|
||||
sourceNames: any = {"Private Limited Company": 'Director / Shareholder Details',"Proprietorship": 'Proprietor Details', "Sole Proprietorship": 'Proprietor Details',"Partnership": 'Partner Details',"Limited Liability Partnership (LLP)": 'Partner Details',"One Person Company (OPC)": 'Director Details',"Hindu Undivided Family (HUF)": 'Karta Details',"Society": 'Member Details',"Cooperative": 'Member Details',"Trust": 'Trustee Details',"Public Ltd Company": 'Director / Shareholder Details','Individual':'Self',"Others": 'Other Enitity Details'};
|
||||
// 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"]
|
||||
businessEntityTypeList: any =[];
|
||||
// this is for automatic bind entitity name for display
|
||||
//sourceNames: any = {"Private Limited Company": 'Director / Shareholder Details',"Proprietorship": 'Proprietor Details', "Sole Proprietorship": 'Proprietor Details',"Partnership": 'Partner Details',"Limited Liability Partnership (LLP)": 'Partner Details',"One Person Company (OPC)": 'Director Details',"Hindu Undivided Family (HUF)": 'Karta Details',"Society": 'Member Details',"Cooperative": 'Member Details',"Trust": 'Trustee Details',"Public Ltd Company": 'Director / Shareholder Details','Individual':'Self',"Others": 'Other Enitity Details'};
|
||||
sourceNames: {[k: string]: any} = {};
|
||||
maxDate:any;
|
||||
public relationSource= new MatTableDataSource();
|
||||
displayedColumns = ['family_member_name','relation_to','relationship','started_business','currently_active_status'];
|
||||
displayedColumns = ['family_member_name','relation','relation_to','relationship_with_company','started_business'];
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
@ -85,11 +87,13 @@ export class BusinessInfoComponent implements OnInit {
|
||||
ngOnInit() {
|
||||
let get_max_date = this.pd_all_details.pdmaster_details.pd_date_of_initiation.split('/').reverse().join("/");
|
||||
this.maxDate = new Date(get_max_date);
|
||||
this.getBusinessEntity();
|
||||
this.getRelation();
|
||||
this.getIndustry();
|
||||
//this.getIndustry();
|
||||
this.getActivity();
|
||||
this.getStateCityList();
|
||||
this.initBusinessForm();
|
||||
this.getCompanyRelation();
|
||||
// const Desgn = <FormArray>this.businessForm.controls['designation'];
|
||||
// const Partnr = <FormArray>this.businessForm.controls['partners'];
|
||||
// const otherDoc = <FormArray>this.businessForm.controls['documents'];
|
||||
@ -217,7 +221,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
this.businessForm.addControl('profession_name_other', new FormControl('', Validators.required));
|
||||
}
|
||||
|
||||
if(data.records.business_entity_type.toUpperCase()=='OTHERS'){
|
||||
if(data.records.business_entity_type.toUpperCase()=='11'){
|
||||
this.businessForm.addControl('business_entity_type_other', new FormControl('', Validators.required));
|
||||
}
|
||||
if(data.records.seasonality.toUpperCase()=='YES'){
|
||||
@ -235,10 +239,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
manufacturingControl.push(this.createActivity());
|
||||
if(element.area_of_sale=='Within India'){
|
||||
manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
manufacturingControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = manufacturingControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
manufacturingControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = manufacturingControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
|
||||
}
|
||||
else if(element.area_of_sale=='Export'){
|
||||
manufacturingControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
@ -249,10 +260,19 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
else if(element.area_of_sale=='Both'){
|
||||
manufacturingControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
manufacturingControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
manufacturingControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
manufacturingControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = manufacturingControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = manufacturingControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
|
||||
manufacturingControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
element.countries_where_export_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = manufacturingControl.controls[index].get('countries_where_export_done') as FormArray;
|
||||
@ -281,10 +301,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
retailControl.push(this.createActivity());
|
||||
if(element.area_of_sale=='Within India'){
|
||||
retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
retailControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = retailControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
|
||||
retailControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = retailControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
}
|
||||
else if(element.area_of_sale=='Export'){
|
||||
retailControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
@ -295,10 +322,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
else if(element.area_of_sale=='Both'){
|
||||
retailControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
retailControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
retailControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
retailControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = retailControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = retailControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
retailControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
element.countries_where_export_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = retailControl.controls[index].get('countries_where_export_done') as FormArray;
|
||||
@ -327,10 +361,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
wholesaleControl.push(this.createActivity());
|
||||
if(element.area_of_sale=='Within India'){
|
||||
wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
wholesaleControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = wholesaleControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
|
||||
wholesaleControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = wholesaleControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
}
|
||||
else if(element.area_of_sale=='Export'){
|
||||
wholesaleControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
@ -341,10 +382,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
else if(element.area_of_sale=='Both'){
|
||||
wholesaleControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
wholesaleControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
wholesaleControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
wholesaleControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = wholesaleControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = wholesaleControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
wholesaleControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
element.countries_where_export_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = wholesaleControl.controls[index].get('countries_where_export_done') as FormArray;
|
||||
@ -374,10 +422,17 @@ export class BusinessInfoComponent implements OnInit {
|
||||
serviceProviderControl.push(this.createServiceActivity());
|
||||
if(element.area_of_sale=='Within India'){
|
||||
serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
serviceProviderControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = serviceProviderControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
|
||||
serviceProviderControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = serviceProviderControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
}
|
||||
else if(element.area_of_sale=='Export'){
|
||||
serviceProviderControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
@ -388,15 +443,25 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
else if(element.area_of_sale=='Both'){
|
||||
serviceProviderControl.controls[index].addControl('india_where_sale_done', this.fb.array([]));
|
||||
serviceProviderControl.controls[index].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
serviceProviderControl.controls[index].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
serviceProviderControl.controls[index].addControl('max_sale_state_name',this.fb.array([]));
|
||||
element.india_where_sale_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = serviceProviderControl.controls[index].get('india_where_sale_done') as FormArray;
|
||||
innercontrol.push(this.createStateSale())
|
||||
});
|
||||
|
||||
element.max_sale_state_name.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = serviceProviderControl.controls[index].get('max_sale_state_name') as FormArray;
|
||||
innercontrol.push(this.createMaxSaleState())
|
||||
});
|
||||
serviceProviderControl.controls[index].addControl('countries_where_export_done', this.fb.array([]));
|
||||
element.countries_where_export_done.forEach((innerElement,innerIndex) => {
|
||||
let innercontrol:any = serviceProviderControl.controls[index].get('countries_where_export_done') as FormArray;
|
||||
innercontrol.push(this.createCountrySale())
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
businessVal.service_provider_activity_details=selectedService;
|
||||
@ -457,7 +522,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
val.toUpperCase()=='OTHERS' ? this.businessForm.addControl('profession_name_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('profession_name_other');
|
||||
});
|
||||
this.businessForm.controls['business_entity_type'].valueChanges.subscribe(val => {
|
||||
val.toUpperCase()=='OTHERS' ? this.businessForm.addControl('business_entity_type_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('business_entity_type_other');
|
||||
val.toUpperCase()=='11' ? this.businessForm.addControl('business_entity_type_other', new FormControl('', Validators.required)) : this.businessForm.removeControl('business_entity_type_other');
|
||||
});
|
||||
this.businessForm.controls['business_date_object'].valueChanges.subscribe(val=>{
|
||||
|
||||
@ -502,7 +567,7 @@ export class BusinessInfoComponent implements OnInit {
|
||||
business_years: ['', Validators.compose([Validators.required])],
|
||||
business_month: ['', Validators.compose([Validators.required])],
|
||||
business_date_object: [''],
|
||||
industry: [''],
|
||||
//industry: [''],
|
||||
seasonality: ['', Validators.compose([Validators.required])],
|
||||
//month_of_business_run : [''],
|
||||
// peak_period_of_business : [''],
|
||||
@ -549,13 +614,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
changeBusinessActivity(event: any){
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==1){
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
// manufacturingControl.controls = [];
|
||||
//manufacturingControl.setValue([]);
|
||||
manufacturingControl.controls.forEach((element,index) => {
|
||||
manufacturingControl.removeAt(index);
|
||||
});
|
||||
|
||||
|
||||
manufacturingControl.controls = [];
|
||||
manufacturingControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==1){
|
||||
let manufacturingControl = <FormArray>this.businessForm.controls['manufacturing_activity_details'];
|
||||
@ -563,10 +623,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==2){
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
//retailControl.controls = [];
|
||||
retailControl.controls.forEach((element,index) => {
|
||||
retailControl.removeAt(index);
|
||||
});
|
||||
retailControl.controls = [];
|
||||
retailControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==2){
|
||||
let retailControl = <FormArray>this.businessForm.controls['retail_trading_activity_details'];
|
||||
@ -574,10 +632,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==3){
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
//wholesaleControl.controls = [];
|
||||
wholesaleControl.controls.forEach((element,index) => {
|
||||
wholesaleControl.removeAt(index);
|
||||
});
|
||||
wholesaleControl.controls = [];
|
||||
wholesaleControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==3){
|
||||
let wholesaleControl = <FormArray>this.businessForm.controls['wholesale_trading_activity_details'];
|
||||
@ -585,10 +641,8 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==4){
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
//serviceControl.controls = [];
|
||||
serviceControl.controls.forEach((element,index) => {
|
||||
serviceControl.removeAt(index);
|
||||
});
|
||||
serviceControl.controls = [];
|
||||
serviceControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==4){
|
||||
let serviceControl = <FormArray>this.businessForm.controls['service_provider_activity_details'];
|
||||
@ -597,41 +651,51 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
if(event.value.exist_status==true && event.value.type_of_activity_id==5){
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
// othersControl.controls = [];
|
||||
othersControl.controls.forEach((element,index) => {
|
||||
othersControl.removeAt(index);
|
||||
});
|
||||
othersControl.controls = [];
|
||||
othersControl.setValue([]);
|
||||
}
|
||||
else if(event.value.exist_status==false && event.value.type_of_activity_id==5){
|
||||
let othersControl = <FormArray>this.businessForm.controls['others_activity_details'];
|
||||
othersControl.push(this.createOthersActivity());
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
// change area of sale options in manufacturing
|
||||
changeManufacturingAreaSale(getDetails: any, getIndex){
|
||||
let control: any = this.businessForm.get('manufacturing_activity_details') as FormArray;
|
||||
|
||||
if(getDetails.value.area_of_sale=="Within India"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].removeControl('export_sale_of_total_sales');
|
||||
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('export_sale_of_total_sales');
|
||||
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") {
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// change retail options
|
||||
changeRetailAreaSale(getDetails: any, getIndex){
|
||||
let control: any = this.businessForm.get('retail_trading_activity_details') as FormArray;
|
||||
@ -639,18 +703,33 @@ export class BusinessInfoComponent implements OnInit {
|
||||
if(getDetails.value.area_of_sale=="Within India"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].removeControl('export_sale_of_total_sales');
|
||||
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('india_where_sale_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('export_sale_of_total_sales');
|
||||
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"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
else if(getDetails.value.area_of_sale=="Both") {
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
}
|
||||
}
|
||||
|
||||
@ -661,18 +740,33 @@ export class BusinessInfoComponent implements OnInit {
|
||||
if(getDetails.value.area_of_sale=="Within India"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].removeControl('export_sale_of_total_sales');
|
||||
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('export_sale_of_total_sales');
|
||||
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"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
else if(getDetails.value.area_of_sale=="Both") {
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
}
|
||||
}
|
||||
// change service provider
|
||||
@ -682,18 +776,80 @@ export class BusinessInfoComponent implements OnInit {
|
||||
if(getDetails.value.area_of_sale=="Within India"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].removeControl('export_sale_of_total_sales');
|
||||
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('export_sale_of_total_sales');
|
||||
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"){
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
else if(getDetails.value.area_of_sale=="Both") {
|
||||
control.controls[getIndex].removeControl('india_where_sale_done');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[getIndex].removeControl('countries_where_export_done');
|
||||
control.controls[getIndex].removeControl('pan_india_options');
|
||||
control.controls[getIndex].removeControl('max_sale_state_name');
|
||||
control.controls[getIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[getIndex].addControl('pan_india_options',new FormControl('', Validators.required));
|
||||
control.controls[getIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()]));
|
||||
control.controls[getIndex].addControl('countries_where_export_done', this.fb.array([this.createCountrySale()]));
|
||||
control.controls[getIndex].addControl('export_sale_of_total_sales',new FormControl(''));
|
||||
}
|
||||
}
|
||||
// change pan india options
|
||||
changePanIndiaOptions(type,selectedIndex,value) {
|
||||
if(type==1){
|
||||
let control: any = this.businessForm.get('manufacturing_activity_details') as FormArray;
|
||||
control.controls[selectedIndex].removeControl('india_where_sale_done');
|
||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||
if(value=='Yes') {
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
else if(value=='No'){
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
}
|
||||
else if(type==2){
|
||||
let control: any = this.businessForm.get('retail_trading_activity_details') as FormArray;
|
||||
control.controls[selectedIndex].removeControl('india_where_sale_done');
|
||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||
if(value=='Yes') {
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
else if(value=='No'){
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
}
|
||||
else if(type==3){
|
||||
let control: any = this.businessForm.get('wholesale_trading_activity_details') as FormArray;
|
||||
control.controls[selectedIndex].removeControl('india_where_sale_done');
|
||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||
if(value=='Yes') {
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
else if(value=='No'){
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
}
|
||||
else if(type==4){
|
||||
let control: any = this.businessForm.get('service_provider_activity_details') as FormArray;
|
||||
control.controls[selectedIndex].removeControl('india_where_sale_done');
|
||||
control.controls[selectedIndex].removeControl('max_sale_state_name');
|
||||
if(value=='Yes') {
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
else if(value=='No'){
|
||||
control.controls[selectedIndex].addControl('india_where_sale_done', this.fb.array([this.createStateSale()]));
|
||||
control.controls[selectedIndex].addControl('max_sale_state_name',this.fb.array([this.createMaxSaleState()])); }
|
||||
}
|
||||
}
|
||||
|
||||
@ -717,14 +873,20 @@ export class BusinessInfoComponent implements OnInit {
|
||||
document: ['']
|
||||
});
|
||||
}
|
||||
|
||||
// create other than pan india state
|
||||
createStateSale() {
|
||||
return this.fb.group({
|
||||
state_name: ['', Validators.compose([Validators.required])],
|
||||
city_name: ['', Validators.compose([Validators.required])]
|
||||
city_name: ['', Validators.compose([Validators.required])],
|
||||
});
|
||||
}
|
||||
|
||||
// create max sale state
|
||||
createMaxSaleState() {
|
||||
return this.fb.group({
|
||||
state_name: [''],
|
||||
city_name: [''],
|
||||
});
|
||||
}
|
||||
createCountrySale() {
|
||||
return this.fb.group({
|
||||
country_name: ['',Validators.compose([Validators.required])],
|
||||
@ -874,22 +1036,45 @@ export class BusinessInfoComponent implements OnInit {
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
getCompanyRelation() {
|
||||
let master_name = 'COMPANYRELATIONSHIPS';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.companyRelationShipList.push(val);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
relationChanged(event) {
|
||||
this.relativeNames = [];
|
||||
event.value.forEach(option => {
|
||||
this.relativeNames.push({member: option});
|
||||
});
|
||||
}
|
||||
getIndustry() {
|
||||
let master_name = 'INDUSTRYCLASSIFICATION';
|
||||
// getIndustry() {
|
||||
// let master_name = 'INDUSTRYCLASSIFICATION';
|
||||
// this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
// data.records.forEach(val => {
|
||||
// if (val.isactive == 1) {
|
||||
// this.industryData.push(val);
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
// }
|
||||
|
||||
// get business entity type
|
||||
getBusinessEntity() {
|
||||
let master_name = 'BUSINESSENTITYTYPE';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
data.records.forEach(val => {
|
||||
if (val.isactive == 1) {
|
||||
this.industryData.push(val);
|
||||
}
|
||||
})
|
||||
this.businessEntityTypeList.push(val);
|
||||
this.sourceNames[val.business_entity_type_id] = val.section_label
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
getActivity() {
|
||||
let master_name = 'TYPEOFACTIVITY';
|
||||
this._pd.getAllMasterDatas(master_name).subscribe(data => {
|
||||
@ -915,15 +1100,11 @@ export class BusinessInfoComponent implements OnInit {
|
||||
// add and create person with relationship details
|
||||
createPersonRelationhip(details: any):FormGroup {
|
||||
return this.fb.group({
|
||||
other_family_relationship_id: [details.other_family_relationship_id],
|
||||
other_family_relationship_name: [details.other_family_relationship_name],
|
||||
family_member_name: [details.family_member_name],
|
||||
relationship_with_company_id: [details.relationship_with_company_id],
|
||||
relationship_with_company: [details.relationship_with_company],
|
||||
relation_to_id: [details.relation_to_id],
|
||||
relation_to: [details.relation_to],
|
||||
other_family_relationship_id: [details.other_family_relationship_id,Validators.required],
|
||||
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],
|
||||
started_business: [details.started_business],
|
||||
currently_active_status: [details.currently_active_status],
|
||||
});
|
||||
}
|
||||
|
||||
@ -986,11 +1167,11 @@ export class BusinessInfoComponent implements OnInit {
|
||||
othersControl.push(this.createOthersActivity());
|
||||
}
|
||||
submitDetails() {
|
||||
let family: any = [];
|
||||
// let family: any = [];
|
||||
if (!this.businessForm.valid) {
|
||||
return;
|
||||
}
|
||||
let design: any;
|
||||
// let design: any;
|
||||
let records = this.businessForm.value;
|
||||
if (records.other_documents == 'no') {
|
||||
delete records.documents;
|
||||
@ -1012,23 +1193,16 @@ export class BusinessInfoComponent implements OnInit {
|
||||
|
||||
// open other family family member details
|
||||
otherFamilyMemberDialogue() {
|
||||
const dialogRef = this.dialog.open(BusinessOtherFamilyMemberComponent, {
|
||||
data: this.pd_all_details,
|
||||
width:'60%',
|
||||
disableClose: true
|
||||
});
|
||||
dialogRef.afterClosed()
|
||||
.subscribe(dataresult => {
|
||||
if(dataresult.data.length>0){
|
||||
let relationControl = <FormArray>this.businessForm.controls['persons_with_relationships'];
|
||||
dataresult.data.forEach(element => {
|
||||
let other_family_member: any= {'other_family_relationship_id':element.family_members_involved.relationship_id,'other_family_relationship_name':element.family_members_involved.name,'family_member_name':element.name,'relationship_with_company_id':element.relationship_with_company.company_relationship_id,'relationship_with_company':element.relationship_with_company.name,'relation_to_id':element.relation_to.pd_co_applicant_id,'relation_to':element.relation_to.applicant_name,'started_business':'','currently_active_status':''};
|
||||
relationControl.push(this.createPersonRelationhip(other_family_member));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
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':''};
|
||||
relationControl.push(this.createPersonRelationhip(other_family_member));
|
||||
}
|
||||
|
||||
// remove other famil membre
|
||||
removeFamilyMember(findex){
|
||||
let relationControl = <FormArray>this.businessForm.controls['persons_with_relationships'];
|
||||
relationControl.removeAt(findex);
|
||||
}
|
||||
|
||||
validateAllFormFields(formGroup: FormGroup) {
|
||||
@ -1052,13 +1226,39 @@ export class BusinessInfoComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
// filter cities for other than pan india
|
||||
|
||||
filterCity(datasource: any,filterid:number) {
|
||||
if(filterid){
|
||||
let filter = datasource.filter(x=>x.state_id==filterid);
|
||||
return filter.length > 0 ? filter[0].cities : [];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// filter max sale options
|
||||
filterMaxSaleState(datasource: any,filterValues:any){
|
||||
if(filterValues){
|
||||
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
||||
let getStateValues = filterValues.filter(val =>val.state_name).map(mapVal => mapVal.state_name);
|
||||
let setStateFilter: any=[];
|
||||
setStateFilter = getStateValues.map(x => {
|
||||
let findIndex = getOriginalStateList.indexOf(x);
|
||||
return datasource[findIndex];
|
||||
});
|
||||
return setStateFilter.length > 0 ? setStateFilter : [];
|
||||
}
|
||||
}
|
||||
// filter max sale cities options
|
||||
filterMaxSaleCities(datasource: any,filterValues:any) {
|
||||
if(filterValues){
|
||||
let getOriginalStateList = datasource.map(dval => dval.state_id);
|
||||
let setCityFilter = filterValues.map(x => {
|
||||
let findIndex = getOriginalStateList.indexOf(x);
|
||||
findIndex = datasource[findIndex].cities;
|
||||
return findIndex;
|
||||
});
|
||||
let merged = [].concat.apply([], setCityFilter);
|
||||
return merged.length > 0 ? merged : [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,67 +20,110 @@
|
||||
<div fxFlex="100">
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Data as Per Financial Statements<p>
|
||||
<mat-card-title><p> Data as Per Financial Statements</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Starting Year Of Financial" formControlName="staring_financial_year" >
|
||||
<mat-error> Please provide Correct Year Format. Format Should Be (YYYY)</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Number of Year in Financial" formControlName="total_financial_year" (change)="dynamicalFinYear($event)">
|
||||
</mat-form-field>
|
||||
<div *ngIf="total_financial_year != ''" formArrayName="date_per_financial">
|
||||
<div style="width:100%">
|
||||
<mat-form-field style="width:35%">
|
||||
<mat-label>Starting Financial Year</mat-label>
|
||||
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="staring_financial_year" (keypress)="keyPress($event)">
|
||||
<mat-error> Invalid year format</mat-error>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field hintLabel="Max 10 characters">
|
||||
<input matInput #input maxlength="10" placeholder="Enter some input">
|
||||
<mat-hint align="end">{{input.value?.length || 0}}/10</mat-hint>
|
||||
</mat-form-field> -->
|
||||
|
||||
<mat-form-field style="width:35%">
|
||||
<input matInput autocomplete="off" placeholder="Number of Financial Years" formControlName="total_financial_year" (change)="dynamicalFinYear($event)" (keypress)="keyPress($event)" [readonly]="isReadOnly">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div *ngIf="total_financial_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">
|
||||
<mat-card-content class="matcard">
|
||||
<mat-form-field>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="financial_year" > -->
|
||||
<input matInput autocomplete="off" placeholder="Latest Financial Year" formControlName="financial_year" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" > -->
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<!-- <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" >
|
||||
<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('finanical_profit_or_loss').value == 1 ">
|
||||
<mat-form-field>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" > -->
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin_of_profit" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
|
||||
<mat-card-content class="matcard">
|
||||
<mat-label class="highlight"> <i>Financial Year : {{details.get('financial_year').value}} </i> </mat-label>
|
||||
<hr>
|
||||
|
||||
<div style="width:100%">
|
||||
<br>
|
||||
|
||||
<mat-form-field style="width:30%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calMargin(i, details)" type="number" > -->
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="financial_annual_sale" (change)="calFinAnnualSale(i, details)" (keypress)="keyPress($event)" (keyup)="inWords($event,i,1)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annual_sale').value != ''">{{"₹"}} {{FY_annualSalesInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
<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)" (change)="calFinAnnualSale( i, details);">
|
||||
<mat-hint align="end" *ngIf="details.get('financial_annualsales_variation').value != '' " >
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value == 0">
|
||||
No differents 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>
|
||||
</span>
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value > 0" class="greenhighlight">
|
||||
Increase 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> <b>{{details.get('financial_annualsales_variation').value}} % </b>
|
||||
</span>
|
||||
<span *ngIf="details.get('financial_annualsales_variation').value < 0" class="highlight">
|
||||
Decrease 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> <b>{{details.get('financial_annualsales_variation').value}} % </b>
|
||||
</span>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<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" >
|
||||
<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('finanical_profit_or_loss').value == 1 ">
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" (keyup)="inWords($event,i,2)">
|
||||
<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)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
|
||||
<mat-form-field style="width:28%">
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" (keyup)="inWords($event,i,3)">
|
||||
<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)">
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:65%">
|
||||
<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)">
|
||||
<mat-hint align="end" *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 differents 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>
|
||||
</span>
|
||||
<span *ngIf="details.get('financial_variation').value > 0" class="greenhighlight">
|
||||
Increase 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> <b> {{details.get('financial_variation').value}} % </b>
|
||||
</span>
|
||||
<span *ngIf="details.get('financial_variation').value < 0" class="highlight">
|
||||
Decrease 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> <b> {{details.get('financial_variation').value}} % </b>
|
||||
</span>
|
||||
</mat-hint>
|
||||
<!-- “Increase in Sales in FY 2017-2018 over sales in FY 2016-2017 is 11.11%” -->
|
||||
<!-- <mat-hint align="end" *ngIf="i != 0" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >{{SalesStatement[i]}}</mat-hint> -->
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="details.get('finanical_profit_or_loss').value == 2 ">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Loss Amount" formControlName="financial_net_loss" (change)="calMargin( i, details); calYearVariation( i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Loss to Sales %" formControlName="financial_margin_of_loss" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<mat-form-field *ngIf="i != 0" style="width:65%">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
|
||||
<!-- <mat-hint align="end" *ngIf="i != 0" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >{{SalesStatement[i]}}</mat-hint> -->
|
||||
<mat-hint align="start">
|
||||
|
||||
{{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY Over Sales in FY is % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||
<!-- {{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY {{details.get('financial_year').value}} Over Sales in FY' {{details.get('financial_year').value}} 'is' {{details.get('variation').value}} % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||
</mat-hint>
|
||||
|
||||
<!-- this.SalesStatement[index] = ( variation <= 0 ? 'Decreases ' : 'Increases ' ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="customerCommentsFlag" style="width:65%">
|
||||
<mat-form-field *ngIf="i != 0 && customerCommentsFlag" style="width:65%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="financial_reason" > -->
|
||||
<input matInput autocomplete="off" placeholder="Customer Comments on variances in Financials" formControlName="financial_reason" >
|
||||
</mat-form-field>
|
||||
@ -89,10 +132,10 @@
|
||||
matTooltip="Add More Financial Statements" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button> -->
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteDate(i)"
|
||||
<!-- <button align="end" type="button" mat-raised-button mat-icon-button (click)="deleteDate(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
@ -104,66 +147,105 @@
|
||||
<!-- start co applicant form details -->
|
||||
<mat-card>
|
||||
<mat-card-header>
|
||||
<p>Actual Values as per Customer<p>
|
||||
<mat-card-title><p> Actual Values as per Customer</p></mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-form-field *ngIf="total_financial_year != ''">
|
||||
|
||||
<mat-form-field *ngIf="total_financial_year != ''" style="width:35%">
|
||||
<mat-select placeholder="Same as Financial Statements?" formControlName="same_as_financial_statements" (selectionChange)="selectedType($event)">
|
||||
<mat-option value="yes">Yes</mat-option>
|
||||
<mat-option value="no">No</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<div formArrayName="estimated_value">
|
||||
<div *ngFor="let details of financialForm.controls.estimated_value['controls']; let i=index"
|
||||
[formGroupName]="i">
|
||||
<mat-card-content class="matcard">
|
||||
|
||||
<mat-form-field>
|
||||
<!-- <input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="estimate_year" > -->
|
||||
<input matInput autocomplete="off" placeholder="Year" formControlName="estimate_year" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<!-- <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-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>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit Amount" formControlName="estimate_net_profit" (change)="calMarginVal( i, details); calVariation( i, details)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin_of_profit" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_profit_or_loss').value == 2 ">
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount(i, details); calVariation( i, details)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<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" formControlName="estimate_variation" (keypress)="keyPress($event)">
|
||||
<mat-hint align="end" [ngClass]="{'highlight': (details.controls['estimate_variation'].value >= 40) || (details.controls['estimate_variation'].value < -40)}" > {{details.controls['estimate_variation'].value}} {{details.controls['estimate_year'].value}}
|
||||
<!-- 'details.controls['estimate_variation'].value <= 0' ? 'Decreases ' : 'Increases ' + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + {{details.controls['estimate_variation'].value}} + '%'; -->
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<!--<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="estimate_reason" >
|
||||
</mat-form-field>-->
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button> -->
|
||||
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(i)"
|
||||
<mat-label class="highlight"> <i>Financial Year : {{details.get('estimate_year').value}} </i> </mat-label>
|
||||
<hr>
|
||||
|
||||
|
||||
<div style="width:100%">
|
||||
<br>
|
||||
<!-- <mat-form-field style="width:25%">
|
||||
<!-- <input matInput autocomplete="off" placeholder="Year (format: 2015-16)" formControlName="estimate_year" > ->
|
||||
<input matInput autocomplete="off" placeholder="Year" formControlName="estimate_year" >
|
||||
</mat-form-field> -->
|
||||
<mat-form-field style="width:30%">
|
||||
<input matInput autocomplete="off" placeholder="Annual Sale" formControlName="estimate_annual_sale" (change)="calMarginVal( i, details)" (keypress)="keyPress($event)" (keyup)="inWords($event,i,4)" >
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_annual_sale').value != ''">{{"₹"}} {{AV_annualSalesInwords[i]}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<span *ngIf="i != 0">
|
||||
<mat-form-field style="width:60%">
|
||||
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="estimate_annualsales_variation" (keypress)="keyPress($event)" (change)="calEstAnnualSale( i,details);">
|
||||
<mat-hint align="end" *ngIf="details.get('estimate_annualsales_variation').value != '' " >
|
||||
<span *ngIf="details.get('estimate_annualsales_variation').value == 0">
|
||||
No differents in Sales in FY <i> {{details.get('estimate_year').value}} </i> over Sales in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_annualsales_variation').value > 0" class="greenhighlight">
|
||||
Increase in Sales in FY <i> {{details.get('estimate_year').value}} </i> over Sales in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i><b> {{details.get('estimate_annualsales_variation').value}} % </b>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_annualsales_variation').value < 0" class="highlight">
|
||||
Decrease in Sales in FY <i> {{details.get('estimate_year').value}} </i> over Sales in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i><b> {{details.get('estimate_annualsales_variation').value}} % </b>
|
||||
</span>
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
</span>
|
||||
</div>
|
||||
<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="estimate_profit_or_loss" >
|
||||
<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: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)">
|
||||
<mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_net_profit').value != ''">{{"₹"}} {{AV_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="estimate_margin_of_profit" (change)="calProfitAndLossVal(i,details); calVariation( i, details)" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_profit_or_loss').value == 2 ">
|
||||
<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>
|
||||
</mat-form-field>
|
||||
<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>
|
||||
</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)">
|
||||
<mat-hint align="end" [ngClass]="{'highlight': (details.controls['estimate_variation'].value >= 40) || (details.controls['estimate_variation'].value < -40)}" >
|
||||
<span *ngIf="details.get('estimate_variation').value == 0">
|
||||
No differents in Profit in FY <i> {{details.get('estimate_year').value}} </i> over Profit in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_variation').value > 0" class="greenhighlight">
|
||||
Increase in Profit in FY <i> {{details.get('estimate_year').value}} </i> over Profit in FY<i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i> <b>{{details.get('estimate_variation').value}} % </b>
|
||||
</span>
|
||||
<span *ngIf="details.get('estimate_variation').value < 0" class="highlight">
|
||||
Decrease in Profit in FY <i> {{details.get('estimate_year').value}} </i>over Profit in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i> <b>{{details.get('estimate_variation').value}} % </b>
|
||||
</span>
|
||||
<!-- {{details.controls[''].value}} {{details.controls[''].value}} -->
|
||||
<!-- 'details.controls['estimate_variation'].value <= 0' ? 'Decreases ' : 'Increases ' + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + {{details.controls['estimate_variation'].value}} + '%'; -->
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
<!--<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="estimate_reason" >
|
||||
</mat-form-field>-->
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
|
||||
matTooltip="Add More Estimated Value" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="i==0">
|
||||
<mat-icon>add</mat-icon>
|
||||
</button> -->
|
||||
<!-- <button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(i)"
|
||||
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="i>0">
|
||||
<mat-icon>delete</mat-icon>
|
||||
</button>
|
||||
</button> -->
|
||||
</mat-card-content>
|
||||
</div>
|
||||
</div>
|
||||
@ -313,10 +395,10 @@
|
||||
<input matInput autocomplete="off" placeholder="Net Profit / Loss" formControlName="financial_net_profit" (change)="calMargin( i, details); calYearVariation( i, details)" type="number" >
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales %" formControlName="financial_margin" (keypress)="keyPress($event)" >
|
||||
<input matInput autocomplete="off" placeholder="Net Profit to Sales" formControlName="financial_margin" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="i != 0">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" 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="Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)">
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="financial_reason" >
|
||||
@ -355,7 +437,7 @@
|
||||
<input matInput autocomplete="off" disabled placeholder="Margin" formControlName="estimate_margin" (keypress)="keyPress($event)" >
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="i != 0">
|
||||
<input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year" formControlName="estimate_variation" (keypress)="keyPress($event)">
|
||||
<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)">
|
||||
</mat-form-field>
|
||||
<!--<mat-form-field>
|
||||
<input matInput autocomplete="off" placeholder="Reason For Major Difference" formControlName="estimate_reason" >
|
||||
|
||||
@ -17,6 +17,15 @@
|
||||
// background: #62B013;
|
||||
// color: white;
|
||||
// }
|
||||
|
||||
.underline input {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.greenhighlight {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@ -22,6 +22,7 @@ import {
|
||||
/** Service */
|
||||
import { PdTrigerService } from '../../../../../pd-service/pd-triger.service';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
//import { Alert } from 'selenium-webdriver';
|
||||
|
||||
@Component({
|
||||
selector: 'app-financial-info',
|
||||
@ -39,6 +40,14 @@ export class FinancialInfoComponent implements OnInit {
|
||||
placeholderName : any = [];
|
||||
setmargin: AbstractControl;
|
||||
customerCommentsFlag :boolean;
|
||||
FY_annualSalesInwords : any = [];
|
||||
FY_netProfitAmtInwords : any = [];
|
||||
FY_netLossAmtInwords : any = [];
|
||||
AV_annualSalesInwords : any = [];
|
||||
AV_netProfitAmtInwords : any = [];
|
||||
AV_netLossAmtInwords : any = [];
|
||||
isReadOnly : boolean = false;
|
||||
|
||||
constructor(notifier: NotifierService,
|
||||
private fb: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
@ -80,6 +89,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
const estimated_val = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
if (value.status == 200) {
|
||||
let retriveData = value.records;
|
||||
this.isReadOnly = true;
|
||||
let result = Object.keys(value.records.date_per_financial).map(function(key) {
|
||||
return value.records.date_per_financial[key];
|
||||
});
|
||||
@ -87,9 +97,12 @@ export class FinancialInfoComponent implements OnInit {
|
||||
return value.records.estimated_value[key];
|
||||
});
|
||||
if (result.length > 0) {
|
||||
result.forEach(val => {
|
||||
result.forEach((val,index) => {
|
||||
//financial_date.push(this.createDate());
|
||||
financial_date.push(this.createDate(''));
|
||||
this.FY_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);
|
||||
this.FY_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_profit);
|
||||
this.FY_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_loss);
|
||||
financial_date.push(this.createDate(''));
|
||||
});
|
||||
retriveData.date_per_financial = result;
|
||||
} else {
|
||||
@ -97,7 +110,12 @@ export class FinancialInfoComponent implements OnInit {
|
||||
financial_date.push(this.createDate(''));
|
||||
}
|
||||
if (result_val.length > 0) {
|
||||
result_val.forEach(val => {
|
||||
console.log(result_val);
|
||||
result_val.forEach((val,index) => {
|
||||
//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);
|
||||
estimated_val.push(this.createValue(''));
|
||||
});
|
||||
retriveData.estimated_value = result_val;
|
||||
@ -147,6 +165,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
financial_margin_of_profit: [''],
|
||||
financial_margin_of_loss: [''],
|
||||
financial_variation: [''],
|
||||
financial_annualsales_variation : [''],
|
||||
financial_reason: [''],
|
||||
});
|
||||
}
|
||||
@ -161,6 +180,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
estimate_margin_of_profit: [''],
|
||||
estimate_margin_of_loss: [''],
|
||||
estimate_variation: [''],
|
||||
estimate_annualsales_variation : [''],
|
||||
// estimate_reason: [''],
|
||||
});
|
||||
}
|
||||
@ -176,6 +196,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
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: [''],
|
||||
});
|
||||
}
|
||||
@ -240,8 +261,8 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if(array.length > 0 ){
|
||||
console.log(array.length);
|
||||
|
||||
for (let val of array.value) {
|
||||
|
||||
array.value.forEach((val,index)=>{
|
||||
let vals = {
|
||||
estimate_year: val.financial_year,
|
||||
estimate_annual_sale: val.financial_annual_sale,
|
||||
@ -251,9 +272,13 @@ export class FinancialInfoComponent implements OnInit {
|
||||
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));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@ -299,31 +324,58 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// // detail.controls.financial_variation.disable()
|
||||
// }
|
||||
// }
|
||||
calFinAnnualSale(index,detail){
|
||||
let annual_sale = detail.value.financial_annual_sale;
|
||||
if (index != 0) {
|
||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
let prev_annual_sale = array.value[index-1].financial_annual_sale;
|
||||
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||
detail.controls.financial_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
||||
console.log('annual sales variation in %',annual_sale_variation);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
calEstAnnualSale(index,detail){
|
||||
let annual_sale = detail.value.estimate_annual_sale;
|
||||
if (index != 0) {
|
||||
let array = <FormArray>this.financialForm.controls['estimated_value'];
|
||||
let prev_annual_sale = array.value[index-1].estimate_annual_sale;
|
||||
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||
detail.controls.estimate_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
||||
console.log('estimate annual sales variation in %',annual_sale_variation);
|
||||
}
|
||||
}
|
||||
|
||||
calYearVariation(index, detail) {
|
||||
|
||||
|
||||
let annual_sale = detail.value.financial_annual_sale;
|
||||
let profit = detail.value.financial_net_profit;
|
||||
let loss = detail.value.financial_net_loss;
|
||||
let curr_year = detail.value.financial_year;
|
||||
|
||||
this.SalesStatement[0] = 0.00;
|
||||
|
||||
if ( (profit != '' || loss != '') && index != 0) {
|
||||
|
||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
console.log(array.value[index - 1].financial_net_profit);
|
||||
|
||||
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 ;
|
||||
|
||||
let prev_year = array.value[index - 1].financial_year;
|
||||
let prev_annual_sale = array.value[index-1].financial_annual_sale;
|
||||
|
||||
let variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? prev_profit : prev_loss)) * 100;
|
||||
// let annual_sale_variation = (annual_sale - prev_annual_sale) * 100 ;
|
||||
|
||||
detail.controls.financial_variation.setValue(variation.toFixed(2));
|
||||
|
||||
|
||||
//Increase in Sales in FY 2017-18 over sales in FY 2016-17 is 11.11%
|
||||
console.log('variation',variation);
|
||||
this.SalesStatement[index] = ( variation <= 0 ? 'Decreases ' : 'Increases ' ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%';
|
||||
console.log('this.SlesStatement',this.SalesStatement);
|
||||
console.log('variation in %',variation);
|
||||
|
||||
// this.SalesStatement[index] = ( variation <= 0 ? 'Decreases ' : 'Increases ' ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%';
|
||||
// console.log('this.SlesStatement',this.SalesStatement);
|
||||
|
||||
}
|
||||
|
||||
@ -360,17 +412,32 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// // detail.controls.financial_margin.disable()
|
||||
// }
|
||||
// }
|
||||
|
||||
calMargin(index, detail) {
|
||||
console.log('detail', detail);
|
||||
// let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
let salary = detail.value.financial_annual_sale;
|
||||
// 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){
|
||||
|
||||
let profit = detail.value.financial_net_profit;
|
||||
let profit = detail.value.financial_net_profit;
|
||||
|
||||
if (salary != '' && profit != '') {
|
||||
let margin = (profit / salary) * 100;
|
||||
detail.controls.financial_margin_of_profit.setValue(margin.toFixed(2))
|
||||
// if(salary < profit){
|
||||
// alert('if condition salary = '+salary);
|
||||
// alert('if condition Profit = '+profit);
|
||||
// detail.controls.financial_margin_of_profit.setValue('');
|
||||
// }
|
||||
// else{
|
||||
// alert('else condition salary = '+salary);
|
||||
// alert('else condition Profit = '+profit);
|
||||
let margin = (profit / salary) * 100;
|
||||
// alert(' '+margin);
|
||||
detail.controls.financial_margin_of_profit.setValue(margin.toFixed(2)+'%')
|
||||
// }
|
||||
// detail.controls.financial_margin.disable()
|
||||
|
||||
}
|
||||
@ -380,11 +447,14 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let loss = detail.value.financial_net_loss;
|
||||
|
||||
if (salary != '' && loss != '') {
|
||||
// alert('if condition salary = '+salary);
|
||||
// alert('if condition loss = '+loss);
|
||||
let margin = (loss / salary) * 100;
|
||||
detail.controls.financial_margin_of_loss.setValue(margin.toFixed(2));
|
||||
// detail.controls.financial_margin.disable()
|
||||
}
|
||||
}
|
||||
//detail.controls.financial_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
||||
}
|
||||
calVariation(index, detail) {
|
||||
// console.log('CalVar In');
|
||||
@ -401,7 +471,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
let profit = detail.value.estimate_net_profit;
|
||||
let loss = detail.value.estimate_net_loss;
|
||||
let curr_year = detail.value.estimate_year;
|
||||
//let curr_year = detail.value.estimate_year;
|
||||
|
||||
if ( (profit != '' || loss != '') && index != 0) {
|
||||
|
||||
@ -440,14 +510,12 @@ export class FinancialInfoComponent implements OnInit {
|
||||
let margin = profit / salary * 100;
|
||||
console.log('margin',margin);
|
||||
detail.controls.estimate_margin_of_profit.setValue(margin.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);
|
||||
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);
|
||||
@ -459,31 +527,53 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
|
||||
calAmount(i, detail) {
|
||||
|
||||
calProfitAndLossVal( 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 profit = (margin_profit/100)*salary;
|
||||
detail.controls.estimate_net_profit.setValue(profit.toFixed(2));
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(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 margin_loss = detail.value.estimate_margin_of_loss;
|
||||
if (salary != '' && margin_loss != '') {
|
||||
let loss = (margin_loss/100)*salary;
|
||||
detail.controls.estimate_net_loss.setValue(loss.toFixed(2));
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(loss);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 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;
|
||||
@ -497,7 +587,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
submitDetails() {
|
||||
|
||||
if(this.financialForm.value.date_per_financial['finanical_profit_or_loss'] == 1){
|
||||
@ -554,11 +644,47 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
/** On Key Press Event For Input Field */
|
||||
keyPress(event: any) {
|
||||
const pattern = /[0-9\-\.\ ]/;
|
||||
//const pattern = /[0-9\-\.\ ]/;
|
||||
const pattern = /[0-9\.]/;
|
||||
|
||||
let inputChar = String.fromCharCode(event.charCode);
|
||||
if (event.keyCode != 8 && !pattern.test(inputChar)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
/** To Convert Amount into Words */
|
||||
inWords(e,i,flag:number){
|
||||
|
||||
// console.log(e);
|
||||
// console.log(i);
|
||||
// console.log(flag);
|
||||
|
||||
switch(flag){
|
||||
case 1 :
|
||||
this.FY_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// this.placeholderName[i] = 'Weekly Instalment Amount'; break;
|
||||
break;
|
||||
case 2 :
|
||||
this.FY_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
//alert('Fin net Profit'+this.FY_netProfitAmtInwords[i]);
|
||||
break;
|
||||
case 3 :
|
||||
this.FY_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
// alert('Fin net Loss'+this.FY_netLossAmtInwords[i]);
|
||||
break;
|
||||
case 4 :
|
||||
this.AV_annualSalesInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 5 :
|
||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -90,6 +90,10 @@
|
||||
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off">
|
||||
<mat-hint align="end" *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: 30%">
|
||||
<input matInput placeholder="End Use of Top Up" formControlName="end_use_topup" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
|
||||
|
||||
@ -97,29 +101,41 @@
|
||||
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)" autocomplete="off">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"₹"}} {{ownContributionInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<mat-form-field style="width: 30%">
|
||||
<mat-select placeholder="Source" formControlName="source" required>
|
||||
<mat-select (selectionChange)="sourceChange($event.value)" placeholder="Source of Own Contribution" formControlName="source" required multiple>
|
||||
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<!--<mat-select placeholder="Source"
|
||||
<mat-form-field *ngIf="isPLSource" style="width: 30%">
|
||||
<input matInput placeholder="Specify Personal Loan" formControlName="personal_loan_source" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="isOtherSource" style="width: 30%">
|
||||
<input matInput placeholder="Specify Other Sources" formControlName="other_source" autocomplete="off">
|
||||
</mat-form-field>
|
||||
|
||||
|
||||
<!--<mat-form-field>
|
||||
<mat-select placeholder="Source"
|
||||
formControlName="source">
|
||||
<mat-option value="borrowed">Borrowed from Relatives & Friends</mat-option>
|
||||
<mat-option value="own_money">Own money</mat-option>
|
||||
<mat-option value="other">Loan from another lender</mat-option>
|
||||
</mat-select>-->
|
||||
|
||||
</mat-form-field>
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
|
||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type" autocomplete="off">
|
||||
</mat-form-field>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="loanDetailsForm.controls['source'].value =='other'" style="width: 35%">
|
||||
<input matInput placeholder="Specify Lender Name and Type" formControlName="lender_name_type" autocomplete="off">
|
||||
</mat-form-field>-->
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<mat-form-field style="width: 30%">
|
||||
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required autocomplete="off">
|
||||
<mat-form-field style="width: 60%">
|
||||
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" required autocomplete="off">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"₹"}} {{emiAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
|
||||
<mat-card *ngIf="mortageCardAccess">
|
||||
@ -165,7 +181,7 @@
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Status of Construction" formControlName="construction_status" required>
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }} {{status.id}}</mat-option>
|
||||
<mat-option *ngFor="let status of m_statusofCunstruction" [value]="status.id">{{ status.name }}</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
@ -183,7 +199,8 @@
|
||||
|
||||
<mat-form-field>
|
||||
<input matInput placeholder="Estimate Market Value as Per Customer"
|
||||
formControlName="emv_per_customer" (keypress)="keyPress($event)" required autocomplete="off">
|
||||
formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" required autocomplete="off">
|
||||
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"₹"}} {{emvAmtInWords}} Only</mat-hint>
|
||||
</mat-form-field>
|
||||
<!-- <mat-form-field>
|
||||
<input matInput placeholder="Value as Per Agreement"
|
||||
|
||||
@ -42,11 +42,13 @@ export class LoanDetailsComponent implements OnInit {
|
||||
subProductName: any;
|
||||
|
||||
isOtherPurpose: boolean = false;
|
||||
isSource: boolean = false;
|
||||
isOtherSource: boolean = false;
|
||||
isPLSource: boolean = false;
|
||||
mortageCheck : boolean = true;
|
||||
OtherOwnerFlag : boolean;
|
||||
|
||||
endUserList: any = [];
|
||||
sourceList : any = [];
|
||||
ownerNames: any = [];
|
||||
m_endUseofLoad = [];
|
||||
m_sourceofamount = [];
|
||||
@ -59,6 +61,8 @@ export class LoanDetailsComponent implements OnInit {
|
||||
valAsPerAgmtInWords : any;
|
||||
ownContributionInWords : any;
|
||||
topUpAmtInWords: any;
|
||||
emiAmtInWords : any;
|
||||
emvAmtInWords : any;
|
||||
pageTitle: string ="Loan Details";
|
||||
|
||||
mortageCardAccess: boolean;
|
||||
@ -159,6 +163,9 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['topup_amount'].setValue(value.records.topup_amount);
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(value.records.topup_amount);
|
||||
}
|
||||
|
||||
this.loanDetailsForm.controls['end_use_topup'].setValue(value.records.end_use_topup);
|
||||
|
||||
if (value.records.lender) {
|
||||
this.loanDetailsForm.controls['lender'].setValue(value.records.lender);
|
||||
}
|
||||
@ -166,17 +173,46 @@ export class LoanDetailsComponent implements OnInit {
|
||||
this.loanDetailsForm.controls['other_bt_lender'].setValue(value.records.other_bt_lender);
|
||||
}
|
||||
if(value.records.is_transfer != 'yes'){
|
||||
|
||||
let source = Object.keys(value.records.source_group).map(function(key) {
|
||||
return value.records.source_group[key];
|
||||
});
|
||||
|
||||
console.log(source);
|
||||
|
||||
let dbsourcelist : any = [];
|
||||
source.forEach(val => {
|
||||
dbsourcelist.push(val.sources);
|
||||
});
|
||||
|
||||
console.log('sources',dbsourcelist);
|
||||
|
||||
this.loanDetailsForm.controls['own_contribution'].setValue(value.records.own_contribution);
|
||||
if(value.records.own_contribution){ this.ownContributionInWords = this._pd.convertNumberToWords(value.records.own_contribution); }
|
||||
|
||||
this.loanDetailsForm.controls['source'].setValue(value.records.source);
|
||||
this.loanDetailsForm.controls['source'].setValue(dbsourcelist);
|
||||
this.sourceChange(dbsourcelist);
|
||||
|
||||
if(value.records.other_source) {
|
||||
// this.isOtherSource = true;
|
||||
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.lender_name_type) {
|
||||
this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||
// if (value.records.lender_name_type) {
|
||||
// this.loanDetailsForm.controls['lender_name_type'].setValue(value.records.lender_name_type);
|
||||
// }
|
||||
|
||||
if(value.records.emi_level){
|
||||
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(value.records.emi_level);
|
||||
}
|
||||
|
||||
this.loanDetailsForm.controls['emi_level'].setValue(value.records.emi_level);
|
||||
this.loanDetailsForm.controls['property_type'].setValue(value.records.property_type);
|
||||
this.propertyType = value.records.property_type;
|
||||
//console.log(value.records.property_type);
|
||||
@ -193,7 +229,11 @@ export class LoanDetailsComponent implements OnInit {
|
||||
else{
|
||||
this.loanDetailsForm.controls['percentage_of_construction'].setValue('');
|
||||
}
|
||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||
if(value.records.emv_per_customer != ''){
|
||||
this.loanDetailsForm.controls['emv_per_customer'].setValue(value.records.emv_per_customer);
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(value.records.emv_per_customer);
|
||||
}
|
||||
|
||||
// this.loanDetailsForm.controls['value_per_agreement'].setValue(value.records.value_per_agreement);
|
||||
// if(value.records.value_per_agreement){ this.valAsPerAgmtInWords = this._pd.convertNumberToWords(value.records.value_per_agreement); }
|
||||
this.loanDetailsForm.controls['loandetails_remarks'].setValue(value.records.loandetails_remarks);
|
||||
@ -314,11 +354,14 @@ getM_sourceofamount() {
|
||||
is_topup: [''],
|
||||
balance_transfer_amount: [''],
|
||||
topup_amount: [''],
|
||||
end_use_topup:[''],
|
||||
lender: [''],
|
||||
other_bt_lender : [''],
|
||||
own_contribution: [''],
|
||||
source: [''],
|
||||
lender_name_type: [''],
|
||||
other_source:[''],
|
||||
personal_loan_source:[''],
|
||||
//lender_name_type: [''],
|
||||
emi_level: ['', Validators.compose([Validators.required])],
|
||||
property_type: ['', Validators.compose([Validators.required])],
|
||||
property_type_others:[''],
|
||||
@ -343,24 +386,48 @@ getM_sourceofamount() {
|
||||
|
||||
endUserChange(event) {
|
||||
this.endUserList = [];
|
||||
let OthersAvaliable;
|
||||
event.forEach(option => {
|
||||
let othersData = this.m_endUseofLoad.filter(sub=>sub.subproduct_id==option)[0];
|
||||
othersData = othersData.name.substr(0,6).toLowerCase();
|
||||
OthersAvaliable = othersData.name.substr(0,6).toLowerCase();
|
||||
console.log('other',othersData);
|
||||
console.log('',OthersAvaliable);
|
||||
|
||||
this.endUserList.push({ end_use: option });
|
||||
if (othersData == 'others') {
|
||||
this.isOtherPurpose = true;
|
||||
return ;
|
||||
}else
|
||||
{
|
||||
this.isOtherPurpose = false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if (OthersAvaliable == 'others') {
|
||||
this.isOtherPurpose = true;
|
||||
}else
|
||||
{
|
||||
this.isOtherPurpose = false;
|
||||
}
|
||||
|
||||
console.log('e',event);
|
||||
|
||||
//this.isOtherPurpose = event.some(e => e == 'others') // this return true or false Only;
|
||||
}
|
||||
|
||||
|
||||
sourceChange(evt) {
|
||||
// console.log('source Changed Values',evt);
|
||||
|
||||
// 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.sourceList = [];
|
||||
|
||||
evt.forEach(option => {
|
||||
this.sourceList.push({source: option});
|
||||
});
|
||||
}
|
||||
|
||||
ownerNameChange(event) {
|
||||
let EventValue;
|
||||
|
||||
event.value.forEach(option => {
|
||||
EventValue = option;
|
||||
if(EventValue == 'Others'){
|
||||
@ -397,7 +464,7 @@ getM_sourceofamount() {
|
||||
|
||||
if (this.isOtherPurpose) {
|
||||
records.end_use_other = this.loanDetailsForm.controls['end_use_other'].value;
|
||||
}
|
||||
}else{ records.end_use_other = '' ;}
|
||||
records.is_transfer = this.loanDetailsForm.controls['is_transfer'].value;
|
||||
records.is_topup = this.loanDetailsForm.controls['is_topup'].value;
|
||||
if (this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||
@ -405,14 +472,27 @@ getM_sourceofamount() {
|
||||
}
|
||||
else if(this.loanDetailsForm.controls['is_transfer'].value == 'no') {
|
||||
records.own_contribution = this.loanDetailsForm.controls['own_contribution'].value;
|
||||
records.source = this.loanDetailsForm.controls['source'].value;
|
||||
if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||
records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
|
||||
}
|
||||
// records.source = this.loanDetailsForm.controls['source'].value;
|
||||
// if (this.loanDetailsForm.controls['source'].value == 'other') {
|
||||
// records.lender_name_type = this.loanDetailsForm.controls['lender_name_type'].value;
|
||||
// }
|
||||
// if (this.loanDetailsForm.controls['source'].value == 4) {
|
||||
// records.other_source = this.loanDetailsForm.controls['other_source'].value;
|
||||
// }
|
||||
|
||||
let dataSource_list = [];
|
||||
this.loanDetailsForm.controls['source'].value.forEach(element => {
|
||||
dataSource_list.push({sources: element})
|
||||
});
|
||||
records.source_group = dataSource_list;
|
||||
|
||||
|
||||
}
|
||||
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 (this.loanDetailsForm.controls['is_topup'].value == 'yes' || this.loanDetailsForm.controls['is_transfer'].value == 'yes') {
|
||||
records.lender = this.loanDetailsForm.controls['lender'].value;
|
||||
}
|
||||
@ -430,7 +510,19 @@ getM_sourceofamount() {
|
||||
dataOwner_name.push({owner_name: element})
|
||||
});
|
||||
records.owner_name_group = dataOwner_name;
|
||||
records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
|
||||
|
||||
if(this.OtherOwnerFlag){
|
||||
records.other_owners_name = this.loanDetailsForm.controls['other_owners_name'].value;
|
||||
}else{ records.other_owners_name = ''; }
|
||||
|
||||
if(this.isOtherSource){
|
||||
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 = ''; }
|
||||
|
||||
records.construction_status = this.loanDetailsForm.controls['construction_status'].value;
|
||||
records.percentage_of_construction = this.loanDetailsForm.controls['percentage_of_construction'].value;
|
||||
records.emv_per_customer = this.loanDetailsForm.controls['emv_per_customer'].value;
|
||||
@ -510,6 +602,12 @@ getM_sourceofamount() {
|
||||
case 5 :
|
||||
this.topUpAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 6 :
|
||||
this.emiAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
case 7:
|
||||
this.emvAmtInWords = this._pd.convertNumberToWords(e.target.value);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user