Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
5cdfd3f352
@ -0,0 +1,12 @@
|
|||||||
|
<h2 mat-dialog-title>{{dialoge_title_content}}</h2>
|
||||||
|
<mat-dialog-content>
|
||||||
|
<div fxFlex="100" align="center">
|
||||||
|
<p>
|
||||||
|
{{dialoge_content}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</mat-dialog-content>
|
||||||
|
<mat-dialog-actions align="end">
|
||||||
|
<button mat-raised-button color="primary" (click)="changePDStatus()"><strong>Yes</strong></button>
|
||||||
|
<button mat-raised-button mat-dialog-close><strong>No</strong></button>
|
||||||
|
</mat-dialog-actions>
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { PdStatusChangeDialogueComponent } from './pd-status-change-dialogue.component';
|
||||||
|
|
||||||
|
describe('PdStatusChangeDialogueComponent', () => {
|
||||||
|
let component: PdStatusChangeDialogueComponent;
|
||||||
|
let fixture: ComponentFixture<PdStatusChangeDialogueComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ PdStatusChangeDialogueComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(PdStatusChangeDialogueComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,46 @@
|
|||||||
|
import { Component, OnInit, ViewChild , Input, Inject} from '@angular/core';
|
||||||
|
import { NotifierService } from "angular-notifier";
|
||||||
|
import {MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
import { PdTrigerService } from '../../../pd-service/pd-triger.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-pd-status-change-dialogue',
|
||||||
|
templateUrl: './pd-status-change-dialogue.component.html',
|
||||||
|
styleUrls: ['./pd-status-change-dialogue.component.scss']
|
||||||
|
})
|
||||||
|
export class PdStatusChangeDialogueComponent implements OnInit {
|
||||||
|
|
||||||
|
conformation: Boolean = false;
|
||||||
|
private notifier: NotifierService;
|
||||||
|
dialoge_title_content: string;
|
||||||
|
dialoge_content: string;
|
||||||
|
|
||||||
|
constructor(notifier: NotifierService , private pd: PdTrigerService,private dialogRef: MatDialogRef<PdStatusChangeDialogueComponent>,@Inject(MAT_DIALOG_DATA) public data: any)
|
||||||
|
{
|
||||||
|
this.notifier = notifier;
|
||||||
|
this.dialoge_title_content = this.data.pd_status=='INPROGRESS' ? 'Start Discussions' : this.data.pd_status=='COMPLETED' ? 'Complete Discussions' : 'Change Discussions';
|
||||||
|
this.dialoge_content =this.data.pd_status=='INPROGRESS' ? 'Are you starting the Discussions ?' : this.data.pd_status=='COMPLETED' ? 'Please confirm you are completing the Discussions and forwarding for Quality Check ?' : 'Change Discussions';
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
changePDStatus(): void {
|
||||||
|
let update_status = {
|
||||||
|
"pd_id":this.data.pdid,
|
||||||
|
};
|
||||||
|
this.pd.editPdMasterDetails(update_status, this.data.pd_status).subscribe(result => {
|
||||||
|
if (result.status == 200) {
|
||||||
|
this.dialogRef.close({update_status:true});
|
||||||
|
this.notifier.notify('success', this.data.pd_status=='INPROGRESS' ? 'Discussions Started Successfully' : this.data.pd_status=='COMPLETED' ? 'Discussions Completed Successfully ?' : 'Discussions Updated Successfully');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.dialogRef.close({update_status:false});
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
this.dialogRef.close({update_status:false});
|
||||||
|
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -58,8 +58,15 @@
|
|||||||
|
|
||||||
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
<div *ngIf="addressForm.controls.locality.value == 1" fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<input matInput placeholder="Specify Locality"
|
<input matInput placeholder="Specify Locality" formControlName="locality_others" autocomplete="off">
|
||||||
formControlName="locality_others" autocomplete="off">
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div *ngIf="addressForm.controls.locality.value == 5" fxFlex="33">
|
||||||
|
<mat-form-field style="width: 80%;">
|
||||||
|
<input matInput placeholder="Specify the MixUse"
|
||||||
|
formControlName="locality_mixuse" autocomplete="off">
|
||||||
|
<mat-error>requried</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -224,6 +224,7 @@ export class AddressComponent implements OnInit {
|
|||||||
address_type_others: [''],
|
address_type_others: [''],
|
||||||
locality: ['', Validators.compose([Validators.required])],
|
locality: ['', Validators.compose([Validators.required])],
|
||||||
locality_others: [''],
|
locality_others: [''],
|
||||||
|
locality_mixuse:[''],
|
||||||
pd_location: ['', Validators.compose([Validators.required])],
|
pd_location: ['', Validators.compose([Validators.required])],
|
||||||
comment_locality: ['', Validators.compose([Validators.required])],
|
comment_locality: ['', Validators.compose([Validators.required])],
|
||||||
other_comment_locality : [''],
|
other_comment_locality : [''],
|
||||||
@ -368,6 +369,19 @@ export class AddressComponent implements OnInit {
|
|||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
|
||||||
|
if (this.addressForm.controls.address_type.value == 1) {
|
||||||
|
this.addressForm.controls['address_type_others'].setValidators([Validators.required]);
|
||||||
|
this.addressForm.controls['address_type_others'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if (this.addressForm.controls.locality.value == 1) {
|
||||||
|
this.addressForm.controls['locality_others'].setValidators([Validators.required]);
|
||||||
|
this.addressForm.controls['locality_others'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
if (this.addressForm.controls.locality.value == 5) {
|
||||||
|
this.addressForm.controls['locality_mixuse'].setValidators([Validators.required]);
|
||||||
|
this.addressForm.controls['locality_mixuse'].updateValueAndValidity();
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.addressForm.valid) {
|
if (!this.addressForm.valid) {
|
||||||
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!');
|
||||||
return;
|
return;
|
||||||
@ -389,6 +403,9 @@ export class AddressComponent implements OnInit {
|
|||||||
if (this.locality.value == 1) {
|
if (this.locality.value == 1) {
|
||||||
records.locality_others = this.addressForm.controls.locality_others.value;
|
records.locality_others = this.addressForm.controls.locality_others.value;
|
||||||
}
|
}
|
||||||
|
if(this.locality.value == 5){
|
||||||
|
records.locality_mixuse = this.addressForm.controls.locality_mixuse.value;
|
||||||
|
}
|
||||||
records.pd_location = this.pdLocation.value;
|
records.pd_location = this.pdLocation.value;
|
||||||
records.comment_locality = this.commentlocality.value;
|
records.comment_locality = this.commentlocality.value;
|
||||||
records.other_comment_locality = this.other_comment_locality.value;
|
records.other_comment_locality = this.other_comment_locality.value;
|
||||||
@ -446,6 +463,8 @@ export class AddressComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ConvertMonthintoYear(e){
|
ConvertMonthintoYear(e){
|
||||||
|
|
||||||
let business_year = this.addressForm.controls.business_years.value;
|
let business_year = this.addressForm.controls.business_years.value;
|
||||||
|
|||||||
@ -17,87 +17,155 @@
|
|||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
|
<!-- this is for sales revenue -->
|
||||||
<mat-nav-list>
|
<mat-nav-list>
|
||||||
|
|
||||||
<mat-list-item (click)='matgroup.selectedIndex = 1'>
|
<mat-list-item (click)='matgroup.selectedIndex = 1'>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> a) Cost of Goods Sold </p>
|
<p matLine> a) Cost of Goods Sold </p>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{sales_value}} </p>
|
<p matLine> {{sumary_details.sales_revenue !='' && sumary_details.sales_revenue!=null ? sumary_details.sales_revenue : '0'}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
<mat-list-item *ngFor="let subDetails of sumary_details.sales_revenue_details">
|
||||||
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
|
<p matLine> {{subDetails.sales_item}} </p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
|
<p matLine> {{subDetails.annual_sale_value !='' && subDetails.annual_sale_value!=null ? subDetails.annual_sale_value : '0'}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
|
||||||
|
<!-- this is for purchase -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item (click)='matgroup.selectedIndex = 2'>
|
<mat-list-item (click)='matgroup.selectedIndex = 2'>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> b) Purchases </p>
|
<p matLine> b) Purchases </p>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{purchase_value}} </p>
|
<p matLine> {{sumary_details.purchase !='' && sumary_details.purchase!=null ? sumary_details.purchase : '0'}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
<mat-list-item *ngFor="let subDetails of sumary_details.purchase_details">
|
||||||
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
|
<p matLine> {{subDetails.purchase_item}} </p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
|
<p matLine> {{subDetails.annual_purchase_value !='' && subDetails.annual_purchase_value!=null ? subDetails.annual_purchase_value : '0'}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
<!-- gross profit -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> c) Gross Profit (a-b) </p>
|
<p matLine> c) Gross Profit (a-b) </p>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{gross_profit_value}} </p>
|
<p matLine> {{sumary_details.gross_profit}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
|
||||||
|
<!-- other income -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item (click)='matgroup.selectedIndex = 5'>
|
<mat-list-item (click)='matgroup.selectedIndex = 5'>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> d) Other Income </p>
|
<p matLine> d) Other Income </p>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{other_income_value}}</p>
|
<p matLine> {{sumary_details.other_business_income !='' && sumary_details.other_business_income !=null ? sumary_details.other_business_income : '0' }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
<mat-list-item *ngFor="let subDetails of sumary_details.other_business_income_details">
|
||||||
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
|
<p matLine> {{subDetails.business_income_item}} </p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
|
<p matLine> {{subDetails.annual_income_value !='' && subDetails.annual_income_value!=null ? subDetails.annual_income_value : '0'}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
<!-- this is expense -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item (click)='matgroup.selectedIndex = 3'>
|
<mat-list-item (click)='matgroup.selectedIndex = 3'>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> e) Other Expenses </p>
|
<p matLine> e) Other Expenses </p>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{other_expense_value}} </p>
|
<p matLine> {{sumary_details.business_expense !='' && sumary_details.business_expense !=null ? sumary_details.business_expense : '0'}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
<mat-list-item *ngFor="let subDetails of sumary_details.business_expense_details">
|
||||||
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
|
<p matLine> {{subDetails.expense_item}} </p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
|
<p matLine> {{subDetails.annual_expenses_value !='' && subDetails.annual_expenses_value!=null ? subDetails.annual_expenses_value : '0'}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
<!-- this is for net profit -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> f) Net Profit (c+d-e) </p>
|
<p matLine> f) Net Profit (c+d-e) </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{net_profit_value}} </p>
|
<p matLine> {{sumary_details.net_profit_value!='' && sumary_details.net_profit_value!=null ? sumary_details.net_profit_value : '0'}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
|
||||||
|
<!-- house hold -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item (click)='matgroup.selectedIndex = 4'>
|
<mat-list-item (click)='matgroup.selectedIndex = 4'>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60">
|
||||||
<p matLine> g) Household Expenses </p>
|
<p matLine> g) Household Expenses </p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{house_hold_value}} </p>
|
<p matLine> {{sumary_details.household_expenses}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
<mat-list-item *ngFor="let subDetails of sumary_details.house_hold_expense_details">
|
||||||
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
|
<p matLine> {{subDetails.expense_item}} </p>
|
||||||
|
</div>
|
||||||
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
|
<p matLine> {{subDetails.annual_expense_value !='' && subDetails.annual_expense_value!=null ? subDetails.annual_expense_value : '0'}} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</mat-list-item>
|
||||||
|
</mat-nav-list>
|
||||||
|
<!-- disposal value -->
|
||||||
|
<mat-nav-list>
|
||||||
<mat-list-item>
|
<mat-list-item>
|
||||||
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="50" fxFlex.lg="40" fxFlex.xl="40">
|
<div fxFlex.xs="70" fxFlex.sm="70" fxFlex.md="60" fxFlex.lg="60" fxFlex.xl="60" class="sub_item">
|
||||||
<p matLine> h) Net Disposable Income (f-g) </p>
|
<p matLine> h) Net Disposable Income (f-g) </p>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="20" fxFlex.lg="25" fxFlex.xl="25" class="mat_list_center_div">
|
<div fxFlex.xs="30" fxFlex.sm="30" fxFlex.md="40" fxFlex.lg="40" fxFlex.xl="40" class="mat_list_center_div">
|
||||||
<p matLine> {{net_disable_income_value}} </p>
|
<p matLine> {{sumary_details.net_disable_income_value !='' && sumary_details.net_disable_income_value !=null ? sumary_details.net_disable_income_value : 0}} </p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</mat-list-item>
|
</mat-list-item>
|
||||||
|
|
||||||
|
|
||||||
</mat-nav-list>
|
</mat-nav-list>
|
||||||
|
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|
||||||
|
|||||||
@ -120,20 +120,34 @@
|
|||||||
border:1px solid rgba(0, 0, 0, 0.12);
|
border:1px solid rgba(0, 0, 0, 0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
mat-list-item:nth-child(3) {
|
// mat-list-item:nth-child(3) {
|
||||||
background-color: #f5f5f5;
|
// background-color: #f5f5f5;
|
||||||
|
// }
|
||||||
|
// mat-list-item:nth-child(6) {
|
||||||
|
// background-color: #f5f5f5;
|
||||||
|
// }
|
||||||
|
// mat-list-item:nth-child(8) {
|
||||||
|
// background-color: #f5f5f5;
|
||||||
|
// }
|
||||||
|
mat-list-item:not(:first-child) {
|
||||||
|
cursor: auto;
|
||||||
|
.sub_item{
|
||||||
|
margin-left: 35% !important;
|
||||||
}
|
}
|
||||||
mat-list-item:nth-child(6) {
|
p{
|
||||||
background-color: #f5f5f5;
|
font-size: 1rem !important;
|
||||||
}
|
}
|
||||||
mat-list-item:nth-child(8) {
|
|
||||||
background-color: #f5f5f5;
|
|
||||||
}
|
}
|
||||||
|
mat-list-item:first-child {
|
||||||
|
background-color: papayawhip;
|
||||||
|
}
|
||||||
|
|
||||||
.mat_list_right_div {
|
.mat_list_right_div {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.mat_list_center_div {
|
.mat_list_center_div {
|
||||||
text-align: center;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,15 +21,8 @@ export class AssessedIncomeComponent implements OnInit {
|
|||||||
// @Input() form_id: number;
|
// @Input() form_id: number;
|
||||||
pdid: number;
|
pdid: number;
|
||||||
form_id: number;
|
form_id: number;
|
||||||
displayedColumns = ['sno','list','amount'];
|
sumary_details:any={"sales_revenue":0,"sales_revenue_details":[],"purchase":0,"purchase_details":[],"gross_profit":0,"other_business_income":0,"other_business_income_details":[]
|
||||||
sales_value: number;
|
,"business_expense":0,"business_expense_details":[],"net_profit_value":0,"household_expenses":0,"house_hold_expense_details":[],"net_disable_income_value":0};
|
||||||
purchase_value: number;
|
|
||||||
gross_profit_value: number;
|
|
||||||
other_income_value: number;
|
|
||||||
other_expense_value: number;
|
|
||||||
net_profit_value: number;
|
|
||||||
house_hold_value: number;
|
|
||||||
net_disable_income_value: number;
|
|
||||||
public salesCaluatedItem:any= [];
|
public salesCaluatedItem:any= [];
|
||||||
public salesItemMonthWise:any= [];
|
public salesItemMonthWise:any= [];
|
||||||
public purchaseDetails:any= [];
|
public purchaseDetails:any= [];
|
||||||
@ -65,14 +58,6 @@ public getCustomValues:any = { UOMList: this.UOMList,frequencyList: this.frequen
|
|||||||
this.getAIMaster('BUSINESSEXPENSES',3);
|
this.getAIMaster('BUSINESSEXPENSES',3);
|
||||||
this.getAIMaster('BUSINESSINCOME',4);
|
this.getAIMaster('BUSINESSINCOME',4);
|
||||||
this.getCustomValues.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
this.getCustomValues.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||||
this.sales_value=0;
|
|
||||||
this.purchase_value=0;
|
|
||||||
this.gross_profit_value=0;
|
|
||||||
this.other_income_value=0;
|
|
||||||
this.other_expense_value=0;
|
|
||||||
this.net_profit_value=0;
|
|
||||||
this.house_hold_value=0;
|
|
||||||
this.net_disable_income_value=0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public viewerOptions: any = {
|
public viewerOptions: any = {
|
||||||
@ -117,35 +102,6 @@ public viewerOptions: any = {
|
|||||||
}
|
}
|
||||||
if(value.records.sales_items_by_monthwise){
|
if(value.records.sales_items_by_monthwise){
|
||||||
this.salesItemMonthWise = value.records.sales_items_by_monthwise;
|
this.salesItemMonthWise = value.records.sales_items_by_monthwise;
|
||||||
// hide table format start
|
|
||||||
|
|
||||||
// this.salesItemMonthWise.forEach((itemElement, itemIndex) => {
|
|
||||||
// this.salesItemMonthWiseBody= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] }));
|
|
||||||
// let combineTableColumn = Object.keys(itemElement.items).map(key => (itemElement.items[key]));
|
|
||||||
// let sumItems: any=[];
|
|
||||||
// combineTableColumn.forEach((sumValue, sumIndex) => {
|
|
||||||
// let calculateItems = sumValue.reduce((acc, calculate) => acc + Number(calculate.sales_value), 0);
|
|
||||||
// sumItems.push({bodyElement:sumValue, bodyElementTotal:calculateItems});
|
|
||||||
// })
|
|
||||||
// let calculateAllItemsTotal:number=sumItems.reduce((racc, rcalculate) => racc + Number(rcalculate.bodyElementTotal), 0);
|
|
||||||
// let convertYear : number = 12 / sumItems.length;
|
|
||||||
// let tableFooterMessage: any=[];
|
|
||||||
// tableFooterMessage.push({
|
|
||||||
// message: sumItems.length + ' Months ' + itemElement.sales_item + ' Sales ',
|
|
||||||
// value:calculateAllItemsTotal,
|
|
||||||
// cols_span_length:sumItems.length * 2 -1,
|
|
||||||
// })
|
|
||||||
// tableFooterMessage.push({
|
|
||||||
// message: ' Yearly ' + itemElement.sales_item + ' Sales Arrived',
|
|
||||||
// value: calculateAllItemsTotal * convertYear,
|
|
||||||
// cols_span_length:sumItems.length * 2 -1 ,
|
|
||||||
// })
|
|
||||||
// this.salesMonthWiseTable.push({salesItem:itemElement.sales_item,headerElement:this.salesItemMonthWiseBody, bodyElements:sumItems, parentTableFooter:tableFooterMessage});
|
|
||||||
// //console.log(this.salesMonthWiseTable)
|
|
||||||
// });
|
|
||||||
// hide table format end
|
|
||||||
|
|
||||||
|
|
||||||
this.salesItemMonthWise.forEach((itemElement, itemIndex) => {
|
this.salesItemMonthWise.forEach((itemElement, itemIndex) => {
|
||||||
let expandBodyContent= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] }));
|
let expandBodyContent= Object.keys(itemElement.items).map(key => ({ header:key, value: itemElement.items[key] }));
|
||||||
let listItems: any=[];
|
let listItems: any=[];
|
||||||
@ -185,26 +141,26 @@ public viewerOptions: any = {
|
|||||||
|
|
||||||
if(value.records.final_data.length >0){
|
if(value.records.final_data.length >0){
|
||||||
// this.finalData = value.records.final_data[0];
|
// this.finalData = value.records.final_data[0];
|
||||||
|
this.sumary_details = value.records.final_data[0];
|
||||||
this.sales_value = value.records.final_data[0].income.sales_revenue !='' && value.records.final_data[0].income.sales_revenue !=null ? value.records.final_data[0].income.sales_revenue : 0;
|
this.sumary_details["sales_revenue"] = value.records.final_data[0].sales_revenue;
|
||||||
this.purchase_value = value.records.final_data[0].expense.purchase !='' && value.records.final_data[0].expense.purchase !=null ? value.records.final_data[0].expense.purchase : 0;
|
this.sumary_details["sales_revenue_details"] = value.records.final_data[0].sales_revenue_details;
|
||||||
this.gross_profit_value = value.records.final_data[0].gross_profit !='' && value.records.final_data[0].gross_profit !=null ? value.records.final_data[0].gross_profit : 0;
|
this.sumary_details["purchase"] = value.records.final_data[0].purchase;
|
||||||
this.other_income_value = value.records.final_data[0].income.other_business_income !='' && value.records.final_data[0].income.other_business_income !=null ? value.records.final_data[0].income.other_business_income : 0;
|
this.sumary_details["purchase_details"] = value.records.final_data[0].purchase_details;
|
||||||
this.other_expense_value = value.records.final_data[0].expense.business_expense !='' && value.records.final_data[0].expense.business_expense !=null ? value.records.final_data[0].expense.business_expense : 0;
|
this.sumary_details["gross_profit"] = value.records.final_data[0].gross_profit;
|
||||||
this.net_profit_value = value.records.final_data[0].expense.net_profit !='' && value.records.final_data[0].expense.net_profit !=null ? value.records.final_data[0].expense.net_profit : 0;
|
this.sumary_details["other_business_income"] = value.records.final_data[0].other_business_income;
|
||||||
this.house_hold_value = 0;
|
this.sumary_details["other_business_income_details"] = value.records.final_data[0].other_business_income_details;
|
||||||
this.net_disable_income_value = this.net_profit_value-this.house_hold_value;
|
this.sumary_details["business_expense"] = value.records.final_data[0].business_expense;
|
||||||
|
this.sumary_details["business_expense_details"] = value.records.final_data[0].business_expense_details;
|
||||||
|
this.sumary_details["net_profit_value"] = value.records.final_data[0].net_profit_value !='' && value.records.final_data[0].net_profit_value!=null ? value.records.final_data[0].net_profit_value : 0;
|
||||||
|
this.sumary_details["household_expenses"] = value.records.final_data[0].household_expenses;
|
||||||
|
this.sumary_details["house_hold_expense_details"] = value.records.final_data[0].house_hold_expense_details !='' && value.records.final_data[0].house_hold_expense_details !=null ? value.records.final_data[0].house_hold_expense_details : 0;
|
||||||
|
this.sumary_details["net_disable_income_value"] = Number(this.sumary_details.net_profit_value) - Number(this.sumary_details.household_expenses);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// get total cost
|
|
||||||
getTotalCost(getItems:any) {
|
|
||||||
return getItems.map(t => t.sales_value).reduce((acc, value) => acc + Number(value), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// get common drop down list
|
// get common drop down list
|
||||||
getAIMaster(table:string, type:Number):void {
|
getAIMaster(table:string, type:Number):void {
|
||||||
this._pd.getAllMasterDatas(table).subscribe(
|
this._pd.getAllMasterDatas(table).subscribe(
|
||||||
|
|||||||
@ -176,7 +176,8 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
|
||||||
<mat-form-field style="width:40%">
|
|
||||||
|
<mat-form-field style="width:40%" *ngIf="detail.get('investments_type').value == 1 || detail.get('investments_type').value == 2 || detail.get('investments_type').value == 3">
|
||||||
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
|
<input matInput placeholder="Bank Name" formControlName="bank_name" autocomplete="off">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
<mat-dialog-actions align="end">
|
<mat-dialog-actions align="end">
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()" *ngIf="!EditFlag" ><mat-icon>add</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Add More" matTooltipPosition="above" (click)="addMoreApplicant()"><mat-icon>add</mat-icon></button>
|
||||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Save" matTooltipPosition="above" (click)="saveApplicant(_OtherForm.value)"><mat-icon>save</mat-icon></button>
|
||||||
</mat-dialog-actions>
|
</mat-dialog-actions>
|
||||||
|
|
||||||
|
|||||||
@ -15,30 +15,22 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
|||||||
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
|
applicantInfo:any={'pd_co_applicant_id':"0",'applicant_name':'','is_applicant':false,'is_person_met':false, applicant_title_name:'',age:'', qualification:'',course_name:''};
|
||||||
titleList: any=[];
|
titleList: any=[];
|
||||||
qualificationList: any=[];
|
qualificationList: any=[];
|
||||||
EditGeneralFormData: any=[];
|
//EditGeneralFormData: any=[];
|
||||||
EditFlag: boolean = false;
|
//EditFlag: boolean = false;
|
||||||
|
|
||||||
constructor(private _fb: FormBuilder,
|
constructor(private _fb: FormBuilder,
|
||||||
private _pd: PdTrigerService,
|
private _pd: PdTrigerService,
|
||||||
@Inject(MAT_DIALOG_DATA) public generalFormData : any,
|
@Inject(MAT_DIALOG_DATA) public generalFormData : any,
|
||||||
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
|
private dialogRef: MatDialogRef<OtherApplicantDetailsComponent>) {
|
||||||
if(generalFormData != ''){
|
// if(generalFormData != ''){
|
||||||
this.EditGeneralFormData = generalFormData.value;
|
// this.EditGeneralFormData = generalFormData.value;
|
||||||
this.EditFlag = true;
|
// this.EditFlag = true;
|
||||||
}
|
// }
|
||||||
console.log(this.EditGeneralFormData);
|
// console.log(this.EditGeneralFormData);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
||||||
if(!this.EditFlag){
|
|
||||||
console.log('init if',this.EditGeneralFormData);
|
|
||||||
this.initFormDetails(null);
|
this.initFormDetails(null);
|
||||||
}
|
|
||||||
else{
|
|
||||||
console.log('init else',this.EditGeneralFormData);
|
|
||||||
this.initFormDetails(this.EditGeneralFormData);
|
|
||||||
}
|
|
||||||
this.getMasterDetails('TITLES',1);
|
this.getMasterDetails('TITLES',1);
|
||||||
this.getMasterDetails('EDUQUALIFICATION',2);
|
this.getMasterDetails('EDUQUALIFICATION',2);
|
||||||
}
|
}
|
||||||
@ -60,24 +52,15 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
// init form
|
// init form
|
||||||
initFormDetails(data : any) {
|
initFormDetails(data : any) {
|
||||||
console.log('data',data);
|
|
||||||
if(data == null){
|
if(data == null){
|
||||||
console.log('if data',data);
|
|
||||||
this._OtherForm = this._fb.group({
|
this._OtherForm = this._fb.group({
|
||||||
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
applicant_list: this._fb.array([this.createApplicant(this.applicantInfo)]),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
console.log('else data',data);
|
|
||||||
this._OtherForm = this._fb.group({
|
|
||||||
applicant_list: this._fb.array([this.updateApplicant(this.EditGeneralFormData)]),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// create applicant form array
|
// create applicant form array
|
||||||
createApplicant(elementValue:any){
|
createApplicant(elementValue:any){
|
||||||
console.log("create applicants",elementValue);
|
|
||||||
return this._fb.group({
|
return this._fb.group({
|
||||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
||||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
||||||
@ -90,20 +73,6 @@ createApplicant(elementValue:any){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
updateApplicant(elementValue:any){
|
|
||||||
console.log("update applicants",elementValue);
|
|
||||||
return this._fb.group({
|
|
||||||
pd_co_applicant_id: [elementValue.pd_co_applicant_id],
|
|
||||||
applicant_title_name: [elementValue.applicant_title_name, Validators.required],
|
|
||||||
applicant_name:[elementValue.applicant_name,Validators.required],
|
|
||||||
is_applicant:[elementValue.is_applicant ? true : false],
|
|
||||||
is_person_met:[elementValue.is_person_met ? true : false],
|
|
||||||
age:[elementValue.age || ''],
|
|
||||||
qualification: [elementValue.qualification || ''],
|
|
||||||
course_name:[elementValue.course_name || '']
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// add more
|
// add more
|
||||||
addMoreApplicant(){
|
addMoreApplicant(){
|
||||||
if (this._OtherForm.invalid) {
|
if (this._OtherForm.invalid) {
|
||||||
|
|||||||
@ -361,7 +361,7 @@
|
|||||||
<div formArrayName="family_members_details">
|
<div formArrayName="family_members_details">
|
||||||
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last " [formGroupName]="i">
|
<div *ngFor="let item of sup.controls.family_members_details['controls']; let i=index; let last=last " [formGroupName]="i">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<h5>Address Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
<h5>Family Details of {{FamilyMemberAsLabel[ix]}}</h5>
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput placeholder="Name" formControlName="family_member_name" required>
|
<input matInput placeholder="Name" formControlName="family_member_name" required>
|
||||||
|
|||||||
@ -241,10 +241,10 @@
|
|||||||
</mat-form-field> -->
|
</mat-form-field> -->
|
||||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 1 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Net Profit From" formControlName="estimate_profit_range_from" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
<input matInput autocomplete="off" placeholder="Net Profit % From" formControlName="estimate_profit_range_from" type="number" min='0' max='100' (change)="calculateMarginProfit( i, details);">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Net Profit To" formControlName="estimate_profit_range_to" type="number" (change)="calculateMarginProfit( i, details);" readonly>
|
<input matInput autocomplete="off" placeholder="Net Profit % To" formControlName="estimate_profit_range_to" type="number" min='0' max='100' (change)="calculateMarginProfit( i, details);">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Margin Profit %" formControlName="estimate_profit_margin_percent" type="number" readonly>
|
||||||
@ -272,10 +272,10 @@
|
|||||||
<!-- <span *ngIf="details.get('estimate_profit_or_loss').value == 2 "> -->
|
<!-- <span *ngIf="details.get('estimate_profit_or_loss').value == 2 "> -->
|
||||||
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
<div style="width:100%" *ngIf="details.get('estimate_profit_or_loss').value == 2 && details.get('estimate_net_margin_availablity').value == 'yes' ">
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Net Loss From" formControlName="estimate_loss_range_from" type="number" (change)="calculateMarginLoss( i, details);">
|
<input matInput autocomplete="off" placeholder="Net Loss % From" formControlName="estimate_loss_range_from" min='0' max='100' type="number" (change)="calculateMarginLoss( i, details);">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Net Loss To" formControlName="estimate_loss_range_to" type="number" (change)="calculateMarginLoss( i, details);">
|
<input matInput autocomplete="off" placeholder="Net Loss % To" formControlName="estimate_loss_range_to" min='0' max='100' type="number" (change)="calculateMarginLoss( i, details);">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width:25%">
|
<mat-form-field style="width:25%">
|
||||||
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
<input matInput autocomplete="off" placeholder="Considered Margin Loss %" formControlName="estimate_loss_margin_percent" type="number" readonly>
|
||||||
|
|||||||
@ -205,9 +205,6 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** CREATING financial Statement ( financial_year AutoGenerate ) */
|
/** CREATING financial Statement ( financial_year AutoGenerate ) */
|
||||||
createDate(date) {
|
createDate(date) {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
@ -418,7 +415,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
let array = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||||
let prev_annual_sale = array.value[index-1].financial_annual_sale;
|
let prev_annual_sale = array.value[index-1].financial_annual_sale;
|
||||||
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||||
detail.controls.financial_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
detail.controls.financial_annualsales_variation.setValue(annual_sale_variation!= Infinity ? annual_sale_variation.toFixed(2):0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -429,7 +426,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let array = <FormArray>this.financialForm.controls['estimated_value'];
|
let array = <FormArray>this.financialForm.controls['estimated_value'];
|
||||||
let prev_annual_sale = array.value[index-1].estimate_annual_sale;
|
let prev_annual_sale = array.value[index-1].estimate_annual_sale;
|
||||||
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
let annual_sale_variation = (( annual_sale - prev_annual_sale)/prev_annual_sale) * 100 ;
|
||||||
detail.controls.estimate_annualsales_variation.setValue(annual_sale_variation.toFixed(2));
|
detail.controls.estimate_annualsales_variation.setValue(annual_sale_variation!= Infinity ? annual_sale_variation.toFixed(2):0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +461,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
let variation = (((profit != '' ? profit : loss ) - (prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||||
|
|
||||||
detail.controls.financial_variation.setValue(variation.toFixed(2));
|
detail.controls.financial_variation.setValue(variation!= Infinity ? variation.toFixed(2):0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -508,7 +505,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
profit_margin = (profit / salary) * 100;
|
profit_margin = (profit / salary) * 100;
|
||||||
detail.controls.financial_margin_of_profit.setValue(profit_margin.toFixed(2));
|
detail.controls.financial_margin_of_profit.setValue(profit_margin!= Infinity ? profit_margin.toFixed(2):0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -528,7 +525,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
loss_margin = (loss / salary) * 100 * (-1);
|
loss_margin = (loss / salary) * 100 * (-1);
|
||||||
detail.controls.financial_margin_of_loss.setValue(loss_margin.toFixed(2));
|
detail.controls.financial_margin_of_loss.setValue(loss_margin != Infinity ? loss_margin.toFixed(2): 0);
|
||||||
// detail.controls.financial_margin.disable()
|
// detail.controls.financial_margin.disable()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -582,7 +579,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
let variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
let variation = (((profit != '' ? profit : loss ) - ( prev_profit != '' ? prev_profit : prev_loss ))/ (prev_profit != '' ? Math.abs(prev_profit) : Math.abs(prev_loss))) * 100;
|
||||||
|
|
||||||
detail.controls.estimate_variation.setValue(variation.toFixed(2));
|
detail.controls.estimate_variation.setValue(variation!= Infinity ? variation.toFixed(2) : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -598,7 +595,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
if (salary != '' && profit != '') {
|
if (salary != '' && profit != '') {
|
||||||
let margin = profit / salary * 100;
|
let margin = profit / salary * 100;
|
||||||
detail.controls.estimate_margin_of_profit.setValue(margin.toFixed(2));
|
detail.controls.estimate_margin_of_profit.setValue(margin!= Infinity ? margin.toFixed(2):0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (detail.value.estimate_profit_or_loss == 2){
|
else if (detail.value.estimate_profit_or_loss == 2){
|
||||||
@ -606,7 +603,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let loss = detail.value.estimate_net_loss;
|
let loss = detail.value.estimate_net_loss;
|
||||||
if (salary != '' && loss != '') {
|
if (salary != '' && loss != '') {
|
||||||
let margin = (loss / salary) * 100 * (-1);
|
let margin = (loss / salary) * 100 * (-1);
|
||||||
detail.controls.estimate_margin_of_loss.setValue(margin.toFixed(2));
|
detail.controls.estimate_margin_of_loss.setValue(margin!= Infinity ? margin.toFixed(2):0);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -619,7 +616,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let margin_profit = detail.value.estimate_margin_of_profit;
|
let margin_profit = detail.value.estimate_margin_of_profit;
|
||||||
if (salary != '' && margin_profit != '') {
|
if (salary != '' && margin_profit != '') {
|
||||||
let profit = (margin_profit/100)*salary;
|
let profit = (margin_profit/100)*salary;
|
||||||
detail.controls.estimate_net_profit.setValue(profit.toFixed(2));
|
detail.controls.estimate_net_profit.setValue(profit!= Infinity ? profit.toFixed(2):0);
|
||||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(profit);
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(profit);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -628,7 +625,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let margin_loss = detail.value.estimate_margin_of_loss;
|
let margin_loss = detail.value.estimate_margin_of_loss;
|
||||||
if (salary != '' && margin_loss != '') {
|
if (salary != '' && margin_loss != '') {
|
||||||
let loss = (margin_loss/100)*salary*(-1);
|
let loss = (margin_loss/100)*salary*(-1);
|
||||||
detail.controls.estimate_net_loss.setValue(loss.toFixed(2));
|
detail.controls.estimate_net_loss.setValue(loss!= Infinity ? loss.toFixed(2):0);
|
||||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(loss);
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(loss);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -641,6 +638,13 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
if (estimate_sales_from != null && estimate_sales_to != null){
|
if (estimate_sales_from != null && estimate_sales_to != null){
|
||||||
|
|
||||||
|
if(+estimate_sales_from>+estimate_sales_to){
|
||||||
|
alert("Given To value is lower than From Value");
|
||||||
|
details.controls.estimate_sales_to.setValue('');
|
||||||
|
details.controls.estimate_sales_average.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let C = (estimate_sales_to - estimate_sales_from)
|
let C = (estimate_sales_to - estimate_sales_from)
|
||||||
let D = (C / estimate_sales_from) * 100;
|
let D = (C / estimate_sales_from) * 100;
|
||||||
|
|
||||||
@ -648,46 +652,46 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
if(D >= 20){
|
if(D >= 20){
|
||||||
var r = confirm("Given Sales Range is greater than 20%");
|
var r = confirm("Given Sales Range is greater than 20%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}else{
|
}else{
|
||||||
details.controls.estimate_sales_to.setValue('');
|
details.controls.estimate_sales_to.setValue('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(estimate_sales_from > 5000000 || estimate_sales_from <= 10000000){
|
else if(estimate_sales_from > 5000000 || estimate_sales_from <= 10000000){
|
||||||
if(D >= 15){
|
if(D >= 15){
|
||||||
var r = confirm("Given Sales Range is greater than 15%");
|
var r = confirm("Given Sales Range is greater than 15%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}else{
|
}else{
|
||||||
details.controls.estimate_sales_to.setValue('');
|
details.controls.estimate_sales_to.setValue('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(estimate_sales_from > 10000000){
|
else if(estimate_sales_from > 10000000){
|
||||||
if(D >= 10){
|
if(D >= 10){
|
||||||
var r = confirm("Given Sales Range is greater than 10%");
|
var r = confirm("Given Sales Range is greater than 10%");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}else{
|
}else{
|
||||||
details.controls.estimate_sales_to.setValue('');
|
details.controls.estimate_sales_to.setValue('');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
details.controls.estimate_sales_to.setValue(estimate_sales_to);
|
details.controls.estimate_sales_to.setValue(estimate_sales_to!= Infinity ? estimate_sales_to:0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(D >= 30){
|
// if(D >= 30){
|
||||||
@ -719,11 +723,11 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
let higer = ((+estimate_sales_to + +estimate_sales_from) / 2);
|
let higer = ((+estimate_sales_to + +estimate_sales_from) / 2);
|
||||||
|
|
||||||
if(lower > higer){
|
if(lower > higer){
|
||||||
details.controls.estimate_sales_average.setValue(higer.toFixed(2));
|
details.controls.estimate_sales_average.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
details.controls.estimate_sales_average.setValue(lower.toFixed(2));
|
details.controls.estimate_sales_average.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,19 +741,55 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
calculateMarginProfit( i, details){
|
calculateMarginProfit( i, details){
|
||||||
|
|
||||||
let sales_average = details.value.estimate_sales_average;
|
let sales_average = details.value.estimate_sales_average;
|
||||||
|
if(sales_average == ''){
|
||||||
|
alert("Considered Sales Average is Empty");
|
||||||
|
details.controls.estimate_profit_range_from.setValue('');
|
||||||
|
details.controls.estimate_profit_range_to.setValue('');
|
||||||
|
details.controls.estimate_profit_margin.setValue('');
|
||||||
|
details.controls.estimate_profit_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
let estimate_profit_range_from = details.value.estimate_profit_range_from;
|
let estimate_profit_range_from = details.value.estimate_profit_range_from;
|
||||||
|
if(+estimate_profit_range_from > 100){
|
||||||
|
alert('Given Profit percent is More Than 100');
|
||||||
|
details.controls.estimate_profit_range_from.setValue('');
|
||||||
|
details.controls.estimate_profit_range_to.setValue('');
|
||||||
|
details.controls.estimate_profit_margin.setValue('');
|
||||||
|
details.controls.estimate_profit_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
let estimate_profit_range_to = details.value.estimate_profit_range_to;
|
let estimate_profit_range_to = details.value.estimate_profit_range_to;
|
||||||
|
|
||||||
|
if(+estimate_profit_range_to > 100){
|
||||||
|
alert('Given Profit percent is More Than 100');
|
||||||
|
details.controls.estimate_profit_range_to.setValue('');
|
||||||
|
details.controls.estimate_profit_margin.setValue('');
|
||||||
|
details.controls.estimate_profit_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (sales_average != '' && estimate_profit_range_from != '' && estimate_profit_range_to != ''){
|
if (sales_average != '' && estimate_profit_range_from != '' && estimate_profit_range_to != ''){
|
||||||
|
if(+estimate_profit_range_from>+estimate_profit_range_to){
|
||||||
|
alert("Given To value is lower than From Value");
|
||||||
|
details.controls.estimate_profit_range_to.setValue('');
|
||||||
|
details.controls.estimate_profit_margin.setValue('');
|
||||||
|
details.controls.estimate_profit_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
let profit_percent = (estimate_profit_range_to + estimate_profit_range_from)/2;
|
let profit_percent = (estimate_profit_range_to + estimate_profit_range_from)/2;
|
||||||
let Profit_Average = (profit_percent*sales_average)/100;
|
let Profit_Average = (profit_percent*sales_average)/100;
|
||||||
|
let difference = (estimate_profit_range_to - estimate_profit_range_from);
|
||||||
|
|
||||||
if(Profit_Average >= 3){
|
if(difference > 3){
|
||||||
var r = confirm("Given Profit Range is greater than 3%");
|
var r = confirm("Given Profit Percent Range is greater than 3");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
|
||||||
details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0);
|
||||||
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||||
}else{
|
}else{
|
||||||
details.controls.estimate_profit_range_to.setValue('');
|
details.controls.estimate_profit_range_to.setValue('');
|
||||||
@ -758,10 +798,10 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
alert('else part');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
details.controls.estimate_profit_margin.setValue(Profit_Average!= Infinity ? Math.round(Profit_Average):0);
|
||||||
|
details.controls.estimate_profit_margin_percent.setValue(profit_percent!= Infinity ? profit_percent.toFixed(2):0);
|
||||||
|
this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average));
|
||||||
// details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
// details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average));
|
||||||
// details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
// details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2));
|
||||||
|
|
||||||
@ -774,38 +814,149 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
calculateProfitAmount( i, details){
|
calculateProfitAmount( i, details){
|
||||||
|
|
||||||
let sales_average = details.value.estimate_sales_average;
|
let sales_average = details.value.estimate_sales_average;
|
||||||
|
if(sales_average == ''){
|
||||||
let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
alert("Considered Sales Average is Empty");
|
||||||
let estimate_net_profit_to = details.value.estimate_net_profit_to;
|
details.controls.estimate_net_profit_from.setValue('');
|
||||||
|
|
||||||
if (sales_average != '' && estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
|
||||||
|
|
||||||
let profit_amount = (estimate_net_profit_to + estimate_net_profit_from)/2;
|
|
||||||
let Profit_percent = (profit_amount/sales_average)*100;
|
|
||||||
|
|
||||||
// details.controls.estimate_net_profit.setValue(Math.round(profit_amount));
|
|
||||||
// details.controls.estimate_net_profit_percent.setValue(Profit_percent.toFixed(2));
|
|
||||||
|
|
||||||
// this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(profit_amount));
|
|
||||||
if(Profit_percent >= 3){
|
|
||||||
var r = confirm("Given Profit Percentage is greater than 3%");
|
|
||||||
if (r == true) {
|
|
||||||
|
|
||||||
details.controls.estimate_net_profit.setValue(Math.round(profit_amount));
|
|
||||||
details.controls.estimate_net_profit_percent.setValue(Profit_percent.toFixed(2));
|
|
||||||
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(profit_amount));
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
details.controls.estimate_net_profit_to.setValue('');
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
details.controls.estimate_net_profit.setValue('');
|
details.controls.estimate_net_profit.setValue('');
|
||||||
details.controls.estimate_net_profit_percent.setValue('');
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
||||||
|
let estimate_net_profit_to = details.value.estimate_net_profit_to;
|
||||||
|
|
||||||
|
if(+estimate_net_profit_to>+sales_average){
|
||||||
|
|
||||||
|
alert("Given Profit is Greater than Sales");
|
||||||
|
details.controls.estimate_net_profit_from.setValue('');
|
||||||
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
|
details.controls.estimate_net_profit.setValue('');
|
||||||
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (sales_average != '' && estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
||||||
|
if(+estimate_net_profit_from>+estimate_net_profit_to){
|
||||||
|
alert("Given To value is lower than From Value");
|
||||||
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
|
details.controls.estimate_net_profit.setValue('');
|
||||||
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let C = (estimate_net_profit_to - estimate_net_profit_from)
|
||||||
|
let D = (C / estimate_net_profit_from) * 100;
|
||||||
|
|
||||||
|
let range1 = +estimate_net_profit_from/10;
|
||||||
|
|
||||||
|
let lower = (+estimate_net_profit_from)+range1;
|
||||||
|
let higer = ((+estimate_net_profit_to + +estimate_net_profit_from) / 2);
|
||||||
|
|
||||||
|
if(estimate_net_profit_from <= 5000000){
|
||||||
|
if(D >= 20){
|
||||||
|
var r = confirm("Given Profit Range is greater than 20%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
|
details.controls.estimate_net_profit.setValue('');
|
||||||
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert('else part');
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let Profit_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let Profit_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(estimate_net_profit_from > 5000000 || estimate_net_profit_from <= 10000000){
|
||||||
|
if(D >= 15){
|
||||||
|
var r = confirm("Given Sales Range is greater than 15%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
|
details.controls.estimate_net_profit.setValue('');
|
||||||
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let Profit_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let Profit_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(estimate_net_profit_from > 10000000){
|
||||||
|
if(D >= 10){
|
||||||
|
var r = confirm("Given Sales Range is greater than 10%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue('');
|
||||||
|
details.controls.estimate_net_profit.setValue('');
|
||||||
|
details.controls.estimate_net_profit_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let Profit_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let Profit_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit_to.setValue(estimate_net_profit_to!= Infinity ? estimate_net_profit_to:0);
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_profit.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let Profit_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_profit.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let Profit_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(Profit_percent!= Infinity ? Profit_percent.toFixed(2):0);
|
||||||
|
this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -815,24 +966,62 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
calculateMarginLoss( i, details){
|
calculateMarginLoss( i, details){
|
||||||
|
|
||||||
let sales_average = details.value.estimate_sales_average;
|
let sales_average = details.value.estimate_sales_average;
|
||||||
|
if(sales_average == ''){
|
||||||
|
alert("Considered Sales Average is Empty");
|
||||||
|
details.controls.estimate_loss_range_from.setValue('');
|
||||||
|
details.controls.estimate_loss_range_to.setValue('');
|
||||||
|
details.controls.estimate_loss_margin.setValue('');
|
||||||
|
details.controls.estimate_loss_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// else{
|
||||||
let estimate_loss_range_from = details.value.estimate_loss_range_from;
|
let estimate_loss_range_from = details.value.estimate_loss_range_from;
|
||||||
|
if(+estimate_loss_range_from > 100){
|
||||||
|
alert('Given Loss Percent is more than 100');
|
||||||
|
details.controls.estimate_loss_range_from.setValue('');
|
||||||
|
details.controls.estimate_loss_range_to.setValue('');
|
||||||
|
details.controls.estimate_loss_margin.setValue('');
|
||||||
|
details.controls.estimate_loss_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
let estimate_loss_range_to = details.value.estimate_loss_range_to;
|
let estimate_loss_range_to = details.value.estimate_loss_range_to;
|
||||||
|
if(+estimate_loss_range_to > 100){
|
||||||
|
alert('Given Loss Percent is more than 100');
|
||||||
|
details.controls.estimate_loss_range_from.setValue('');
|
||||||
|
details.controls.estimate_loss_range_to.setValue('');
|
||||||
|
details.controls.estimate_loss_margin.setValue('');
|
||||||
|
details.controls.estimate_loss_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (sales_average != '' && estimate_loss_range_from != '' && estimate_loss_range_to != ''){
|
if (sales_average != '' && estimate_loss_range_from != '' && estimate_loss_range_to != ''){
|
||||||
|
|
||||||
|
if(+estimate_loss_range_from>+estimate_loss_range_to){
|
||||||
|
alert("Given To value is lower than From Value");
|
||||||
|
details.controls.estimate_loss_range_to.setValue('');
|
||||||
|
details.controls.estimate_loss_margin.setValue('');
|
||||||
|
details.controls.estimate_loss_margin_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let loss_percent = (estimate_loss_range_to + estimate_loss_range_from)/2;
|
let loss_percent = (estimate_loss_range_to + estimate_loss_range_from)/2;
|
||||||
let loss_Average = (loss_percent*sales_average)/100;
|
let loss_Average = (loss_percent*sales_average)/100;
|
||||||
|
let difference = (estimate_loss_range_to - estimate_loss_range_from)
|
||||||
|
|
||||||
// details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
|
// details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
|
||||||
// details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
|
// details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
|
||||||
|
|
||||||
// this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
// this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||||
|
|
||||||
if(loss_Average >= 3){
|
if(difference > 3){
|
||||||
var r = confirm("Given Profit Range is greater than 3%");
|
var r = confirm("Given Loss Percent Range is greater than 3");
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
details.controls.estimate_loss_margin.setValue(Math.round(loss_Average));
|
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
|
||||||
details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2));
|
details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
|
||||||
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||||
}else{
|
}else{
|
||||||
@ -842,70 +1031,234 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
alert('else part');
|
details.controls.estimate_loss_margin.setValue(loss_Average!= Infinity ? Math.round(loss_Average):0);
|
||||||
|
details.controls.estimate_loss_margin_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
calculateLossAmount( i, details){
|
calculateLossAmount( i, details){
|
||||||
|
|
||||||
let sales_average = details.value.estimate_sales_average;
|
let sales_average = details.value.estimate_sales_average;
|
||||||
|
if(sales_average == ''){
|
||||||
let estimate_net_loss_from = details.value.estimate_net_loss_from;
|
alert("Considered Sales Average is Empty");
|
||||||
let estimate_net_loss_to = details.value.estimate_net_loss_to;
|
details.controls.estimate_net_loss_from.setValue('');
|
||||||
|
|
||||||
if (sales_average != '' && estimate_net_loss_from != '' && estimate_net_loss_to != ''){
|
|
||||||
|
|
||||||
// let profit_percent = (estimate_net_profit_to - estimate_net_profit_from)/estimate_net_profit_from * 100;
|
|
||||||
// let Profit_Average = (profit_percent*sales_average)/100;
|
|
||||||
let loss_amount = (estimate_net_loss_to + estimate_net_loss_from)/2;
|
|
||||||
let loss_percent = (loss_amount/sales_average)*100;
|
|
||||||
|
|
||||||
// details.controls.estimate_net_loss.setValue(Math.round(loss_amount));
|
|
||||||
// details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2));
|
|
||||||
|
|
||||||
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
|
||||||
if(loss_percent >= 3){
|
|
||||||
var r = confirm("Given Loss Percentage is greater than 3%");
|
|
||||||
if (r == true) {
|
|
||||||
|
|
||||||
details.controls.estimate_net_loss.setValue(Math.round(loss_amount));
|
|
||||||
details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2));
|
|
||||||
|
|
||||||
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
details.controls.estimate_net_loss_to.setValue('');
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
details.controls.estimate_net_loss.setValue('');
|
details.controls.estimate_net_loss.setValue('');
|
||||||
details.controls.estimate_net_loss_percent.setValue('');
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let estimate_net_loss_from = details.value.estimate_net_loss_from;
|
||||||
|
let estimate_net_loss_to = details.value.estimate_net_loss_to;
|
||||||
|
|
||||||
|
if(+estimate_net_loss_to > +sales_average){
|
||||||
|
|
||||||
|
alert("Given Loss is Greater than Sales");
|
||||||
|
details.controls.estimate_net_loss_from.setValue('');
|
||||||
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
details.controls.estimate_net_loss.setValue('');
|
||||||
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (sales_average != '' && estimate_net_loss_from != '' && estimate_net_loss_to != ''){
|
||||||
|
if(+estimate_net_loss_from > +estimate_net_loss_to){
|
||||||
|
alert("Given To value is Lower than From Value");
|
||||||
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
details.controls.estimate_net_loss.setValue('');
|
||||||
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// if(+estimate_net_loss_to > +estimate_net_loss_from){
|
||||||
|
// alert("loss is greater than sales");
|
||||||
|
// details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
// details.controls.estimate_net_loss.setValue('');
|
||||||
|
// details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
let C = (estimate_net_loss_to - estimate_net_loss_from)
|
||||||
|
let D = (C / estimate_net_loss_from) * 100;
|
||||||
|
|
||||||
|
let range1 = +estimate_net_loss_from/10;
|
||||||
|
|
||||||
|
let lower = (+estimate_net_loss_from)+range1;
|
||||||
|
let higer = ((+estimate_net_loss_to + +estimate_net_loss_from) / 2);
|
||||||
|
|
||||||
|
if(estimate_net_loss_from <= 5000000){
|
||||||
|
if(D >= 20){
|
||||||
|
var r = confirm("Given Profit Range is greater than 20%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
details.controls.estimate_net_loss.setValue('');
|
||||||
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
alert('else part');
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let loss_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let loss_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(estimate_net_loss_from > 5000000 || estimate_net_loss_from <= 10000000){
|
||||||
|
if(D >= 15){
|
||||||
|
var r = confirm("Given Sales Range is greater than 15%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
details.controls.estimate_net_loss.setValue('');
|
||||||
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let loss_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let loss_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_profit_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(estimate_net_loss_from > 10000000){
|
||||||
|
if(D >= 10){
|
||||||
|
var r = confirm("Given Sales Range is greater than 10%");
|
||||||
|
if (r == true) {
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
}else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
details.controls.estimate_net_loss.setValue('');
|
||||||
|
details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
|
||||||
|
}
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let loss_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let loss_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss_to.setValue(estimate_net_loss_to!= Infinity ? estimate_net_loss_to:0);
|
||||||
|
if(lower > higer){
|
||||||
|
details.controls.estimate_net_loss.setValue(higer!= Infinity ? higer.toFixed(2):0);
|
||||||
|
let loss_percent = (higer/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(higer));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
details.controls.estimate_net_loss.setValue(lower!= Infinity ? lower.toFixed(2):0);
|
||||||
|
let loss_percent = (lower/sales_average)*100;
|
||||||
|
details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(lower));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
}
|
||||||
// let estimate_net_profit_to = details.value.estimate_net_profit_to;
|
// calculateLossAmount( i, details){
|
||||||
|
|
||||||
// if (estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
// let sales_average = details.value.estimate_sales_average;
|
||||||
// let AB = (estimate_net_profit_to + estimate_net_profit_from)/2;
|
|
||||||
// let C = (estimate_net_profit_to - estimate_net_profit_from);
|
|
||||||
// let D = (C / estimate_net_profit_from);
|
|
||||||
// let E = D*100;
|
|
||||||
|
|
||||||
// details.controls.estimate_net_profit_percent.setValue(E);
|
// let estimate_net_loss_from = details.value.estimate_net_loss_from;
|
||||||
// details.controls.estimate_net_profit.setValue(AB);
|
// let estimate_net_loss_to = details.value.estimate_net_loss_to;
|
||||||
|
|
||||||
|
// if (sales_average != '' && estimate_net_loss_from != '' && estimate_net_loss_to != ''){
|
||||||
|
|
||||||
|
// // let profit_percent = (estimate_net_profit_to - estimate_net_profit_from)/estimate_net_profit_from * 100;
|
||||||
|
// // let Profit_Average = (profit_percent*sales_average)/100;
|
||||||
|
// let loss_amount = (estimate_net_loss_to + estimate_net_loss_from)/2;
|
||||||
|
// let loss_percent = (loss_amount/sales_average)*100;
|
||||||
|
|
||||||
|
// // details.controls.estimate_net_loss.setValue(Math.round(loss_amount));
|
||||||
|
// // details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2));
|
||||||
|
|
||||||
|
// // this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
||||||
|
// if(loss_percent >= 3){
|
||||||
|
// var r = confirm("Given Loss Percentage is greater than 3%");
|
||||||
|
// if (r == true) {
|
||||||
|
|
||||||
|
// details.controls.estimate_net_loss.setValue(loss_amount!= Infinity ? Math.round(loss_amount):0);
|
||||||
|
// details.controls.estimate_net_loss_percent.setValue(loss_percent!= Infinity ? loss_percent.toFixed(2):0);
|
||||||
|
|
||||||
|
// this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount));
|
||||||
|
|
||||||
|
// }else{
|
||||||
|
|
||||||
|
// details.controls.estimate_net_loss_to.setValue('');
|
||||||
|
// details.controls.estimate_net_loss.setValue('');
|
||||||
|
// details.controls.estimate_net_loss_percent.setValue('');
|
||||||
|
// return;
|
||||||
|
|
||||||
// }
|
// }
|
||||||
}
|
// }
|
||||||
|
// else{
|
||||||
|
// alert('else part');
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // let estimate_net_profit_from = details.value.estimate_net_profit_from;
|
||||||
|
// // let estimate_net_profit_to = details.value.estimate_net_profit_to;
|
||||||
|
|
||||||
|
// // if (estimate_net_profit_from != '' && estimate_net_profit_to != ''){
|
||||||
|
// // let AB = (estimate_net_profit_to + estimate_net_profit_from)/2;
|
||||||
|
// // let C = (estimate_net_profit_to - estimate_net_profit_from);
|
||||||
|
// // let D = (C / estimate_net_profit_from);
|
||||||
|
// // let E = D*100;
|
||||||
|
|
||||||
|
// // details.controls.estimate_net_profit_percent.setValue(E);
|
||||||
|
// // details.controls.estimate_net_profit.setValue(AB);
|
||||||
|
|
||||||
|
// // }
|
||||||
|
// }
|
||||||
|
|
||||||
submitDetails() {
|
submitDetails() {
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,8 @@
|
|||||||
<ng-container matColumnDef="applicant_name">
|
<ng-container matColumnDef="applicant_name">
|
||||||
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
<mat-cell *matCellDef="let details;let i = index;" [formGroupName]="i">
|
||||||
{{details.value.applicant_name | titlecase}}
|
<input matInput placeholder="ApplicantName" formControlName="applicant_name" autocomplete="off">
|
||||||
|
<!-- {{details.value.applicant_name | titlecase}} -->
|
||||||
</mat-cell>
|
</mat-cell>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container matColumnDef="is_person_met">
|
<ng-container matColumnDef="is_person_met">
|
||||||
@ -61,11 +62,11 @@
|
|||||||
<ng-container matColumnDef="actions">
|
<ng-container matColumnDef="actions">
|
||||||
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
<mat-header-cell *matHeaderCellDef> </mat-header-cell>
|
||||||
<mat-cell *matCellDef="let details;let i =index;">
|
<mat-cell *matCellDef="let details;let i =index;">
|
||||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
<!-- <button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="editIndividuals(details)"
|
||||||
matTooltip="Edit " matTooltipPosition="below">
|
matTooltip="Edit " matTooltipPosition="below">
|
||||||
<mat-icon>edit</mat-icon>
|
<mat-icon>edit</mat-icon>
|
||||||
</button>
|
</button> -->
|
||||||
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i)"
|
<button type="button" class="mr-1 mb-1 hover-icon" mat-raised-button mat-icon-button (click)="removeIndividuals(i,details)"
|
||||||
matTooltip="Remove Individuals" matTooltipPosition="below">
|
matTooltip="Remove Individuals" matTooltipPosition="below">
|
||||||
<mat-icon>delete</mat-icon>
|
<mat-icon>delete</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
@ -257,7 +258,8 @@
|
|||||||
<mat-card-actions align="center">
|
<mat-card-actions align="center">
|
||||||
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()"
|
<button type="button" mat-flat-button (click)="addCompanyRelationshipDialogue()"
|
||||||
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
matTooltip="Add More" matTooltipPosition="left" color="primary">
|
||||||
<strong>Add Company Relationship</strong>
|
<span *ngIf="_generalForm.controls.company_with_relationships['controls'].length>0"><strong>Add Company Relationship</strong></span>
|
||||||
|
<span *ngIf="_generalForm.controls.company_with_relationships['controls'].length>1"><strong>Add More Company Relationship</strong></span>
|
||||||
</button>
|
</button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
|
|||||||
@ -455,26 +455,24 @@ export class GeneralInfoComponent implements OnInit {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Popup for EDIT Individuals */
|
// remove individuals
|
||||||
editIndividuals(arr) {
|
// removeIndividuals(findex){
|
||||||
|
// let control = <FormArray>this._generalForm.controls['individuals'];
|
||||||
|
// control.removeAt(findex);
|
||||||
|
// }
|
||||||
|
|
||||||
console.log(arr);
|
|
||||||
|
|
||||||
const dialogRef = this.dialog.open(OtherApplicantDetailsComponent, {
|
|
||||||
data: arr,
|
|
||||||
width:'40%',
|
|
||||||
disableClose: true
|
|
||||||
});
|
|
||||||
|
|
||||||
dialogRef.afterClosed()
|
|
||||||
.subscribe(dataresult => {
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove individuals
|
// remove individuals
|
||||||
removeIndividuals(findex){
|
removeIndividuals(findex,details){
|
||||||
|
|
||||||
let control = <FormArray>this._generalForm.controls['individuals'];
|
let control = <FormArray>this._generalForm.controls['individuals'];
|
||||||
control.removeAt(findex);
|
control.removeAt(findex);
|
||||||
|
|
||||||
|
let controls = <FormArray>this._generalForm.controls['persons_with_relationships'];
|
||||||
|
let name = details.value.applicant_name;
|
||||||
|
let index1 = controls.value.map(data => data.applicant_name).indexOf(name);
|
||||||
|
controls.removeAt(index1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// update personal relation
|
// update personal relation
|
||||||
|
|||||||
@ -138,7 +138,6 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
return {id:element.company_order_id.toString(),name:element.company_name,group_id:1};
|
||||||
});
|
});
|
||||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:modifyCompanyList})
|
||||||
this.mergeCompanyApplicant.push({groupName:'COMPANIES',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let modifyApplicantList: any=[];
|
let modifyApplicantList: any=[];
|
||||||
@ -150,6 +149,7 @@ export class LoanDetailsComponent implements OnInit {
|
|||||||
|
|
||||||
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
// this.listOfLanguagues.splice(this.listOfLanguagues.indexOf(languague), 1);
|
||||||
}
|
}
|
||||||
|
this.mergeCompanyApplicant.push({groupName:'OTHERS',groupValues:[{id:0,name:'Not Yet Finalised',group_id:2}]})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
<mat-card-actions align="end">
|
<mat-card-actions align="end">
|
||||||
<button matTooltip="Complete Question" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="changePDStatus(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
<button matTooltip="Complete Question" matTooltipPosition="above" [disabled]="actualQuestions==0 || actualQuestions!=answeredQuestions || currentPDStatus===false" mat-raised-button color="primary" (click)="pdStatusDialogue(pdStatusCheck.COMPLETED);"><span>{{currentPDStatus === true ? 'COMPLETE':'COMPLETED' }}</span></button>
|
||||||
</mat-card-actions>
|
</mat-card-actions>
|
||||||
</mat-card>
|
</mat-card>
|
||||||
<notifier-container></notifier-container>
|
<notifier-container></notifier-container>
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import {NeighbourHoodComponent} from './forms/neighbour-hood/neighbour-hood.comp
|
|||||||
import {FinalRemarksComponent} from './forms/final-remarks/final-remarks.component';
|
import {FinalRemarksComponent} from './forms/final-remarks/final-remarks.component';
|
||||||
import { BusinessInfoGroupComponent } from './forms/business-info-group/business-info-group.component';
|
import { BusinessInfoGroupComponent } from './forms/business-info-group/business-info-group.component';
|
||||||
import { BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component';
|
import { BusinessAssetsInfoComponent } from './forms/business-assets-info/business-assets-info.component';
|
||||||
|
import { PdStatusChangeDialogueComponent } from './../pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-start-pd',
|
selector: 'app-start-pd',
|
||||||
templateUrl: './start-pd.component.html',
|
templateUrl: './start-pd.component.html',
|
||||||
@ -83,13 +83,8 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemSidebar, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
// Ps.initialize(elemContent, { wheelSpeed: 2, suppressScrollX: true });
|
||||||
}
|
}
|
||||||
|
this.loadTemplates(this.startPD,1);
|
||||||
this.loadTemplates(this.startPD);
|
|
||||||
}
|
}
|
||||||
// start
|
|
||||||
|
|
||||||
|
|
||||||
// end
|
|
||||||
|
|
||||||
isMac(): boolean {
|
isMac(): boolean {
|
||||||
let bool = false;
|
let bool = false;
|
||||||
@ -103,7 +98,9 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
return window.matchMedia(`(max-width: 960px)`).matches;
|
return window.matchMedia(`(max-width: 960px)`).matches;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadTemplates(startID:string){
|
|
||||||
|
// load templates details
|
||||||
|
loadTemplates(startID:string,type:number){
|
||||||
this._pd.loadPDTemplates(startID).subscribe(
|
this._pd.loadPDTemplates(startID).subscribe(
|
||||||
data => {
|
data => {
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
@ -117,9 +114,10 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
this.actualQuestions = this.categoryFormButtons.length;
|
this.actualQuestions = this.categoryFormButtons.length;
|
||||||
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
let getAnsweredFormsCount = this.categoryFormButtons.filter(item=>item.isAnswered===true);
|
||||||
this.answeredQuestions = getAnsweredFormsCount.length;
|
this.answeredQuestions = getAnsweredFormsCount.length;
|
||||||
this.pdFullDetails = data.records
|
this.pdFullDetails = data.records;
|
||||||
|
if(type==1 && data.records.pdmaster_details.pd_status=='SCHEDULED') {
|
||||||
|
this.pdStatusDialogue(this.pdStatusCheck.INPROGRESS)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.pdMasterList = "";
|
this.pdMasterList = "";
|
||||||
@ -132,26 +130,22 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// load pd status change dialogue
|
||||||
|
pdStatusDialogue(status: string): void {
|
||||||
//change pd status
|
const dialogRef = this.dialog.open(PdStatusChangeDialogueComponent, {
|
||||||
changePDStatus(status: string) {
|
data: { pdid: this.startPD, pd_status: status },
|
||||||
|
disableClose: true,
|
||||||
let update_array = {
|
minWidth:'30%',
|
||||||
"pd_id": this.startPD
|
maxWidth:'40%',
|
||||||
}
|
|
||||||
this._pd.editPdMasterDetails(update_array, status).subscribe(result => {
|
|
||||||
if (result.status == 200) {
|
|
||||||
this.currentPDStatus = false;
|
|
||||||
this.notifier.notify('success', 'PD Completed.');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
this.notifier.notify('warning', 'Something Wents Wrong Try Again.!');
|
|
||||||
});
|
});
|
||||||
|
dialogRef.afterClosed()
|
||||||
|
.subscribe(dataresult => {
|
||||||
|
if(dataresult.update_status==true){
|
||||||
|
this.loadTemplates(this.startPD,2);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// start
|
// start
|
||||||
// direct form based questions
|
// direct form based questions
|
||||||
OnSelectDirectForms(details: any) {
|
OnSelectDirectForms(details: any) {
|
||||||
@ -171,7 +165,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==2){
|
if(this.selectedFormsCategory.form_id==2){
|
||||||
@ -187,7 +181,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==3){
|
if(this.selectedFormsCategory.form_id==3){
|
||||||
@ -203,7 +197,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==4){
|
if(this.selectedFormsCategory.form_id==4){
|
||||||
@ -219,7 +213,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==5){
|
if(this.selectedFormsCategory.form_id==5){
|
||||||
@ -235,7 +229,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==6){
|
if(this.selectedFormsCategory.form_id==6){
|
||||||
@ -251,7 +245,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==7){
|
if(this.selectedFormsCategory.form_id==7){
|
||||||
@ -267,7 +261,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -284,7 +278,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -301,7 +295,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==10){
|
if(this.selectedFormsCategory.form_id==10){
|
||||||
@ -317,7 +311,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==11){
|
if(this.selectedFormsCategory.form_id==11){
|
||||||
@ -333,7 +327,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==12){
|
if(this.selectedFormsCategory.form_id==12){
|
||||||
@ -349,7 +343,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==13){
|
if(this.selectedFormsCategory.form_id==13){
|
||||||
@ -365,7 +359,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==14){
|
if(this.selectedFormsCategory.form_id==14){
|
||||||
@ -381,7 +375,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==15){
|
if(this.selectedFormsCategory.form_id==15){
|
||||||
@ -397,7 +391,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -414,7 +408,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==17){
|
if(this.selectedFormsCategory.form_id==17){
|
||||||
@ -430,7 +424,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==18){
|
else if(this.selectedFormsCategory.form_id==18){
|
||||||
@ -446,7 +440,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if(this.selectedFormsCategory.form_id==19){
|
else if(this.selectedFormsCategory.form_id==19){
|
||||||
@ -462,7 +456,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else if(this.selectedFormsCategory.form_id==20){
|
}else if(this.selectedFormsCategory.form_id==20){
|
||||||
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
const generaldialogRef = this.dialog.open(FinalRemarksComponent, {
|
||||||
@ -477,7 +471,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
generaldialogRef.afterClosed()
|
generaldialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}else
|
}else
|
||||||
if(this.selectedFormsCategory.form_id==22){
|
if(this.selectedFormsCategory.form_id==22){
|
||||||
@ -493,7 +487,7 @@ export class StartPdComponent implements OnInit, OnDestroy {
|
|||||||
dialogRef.afterClosed()
|
dialogRef.afterClosed()
|
||||||
.subscribe(dataresult => {
|
.subscribe(dataresult => {
|
||||||
// this.notifier.notify('success', 'Successfully allocated.!');
|
// this.notifier.notify('success', 'Successfully allocated.!');
|
||||||
this.loadTemplates(this.startPD);
|
this.loadTemplates(this.startPD,2);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -93,9 +93,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div fxLayout="row">
|
<div fxLayout="row">
|
||||||
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100" class="profile-center">
|
||||||
<div fxFlex="10">
|
<div fxFlex="10" appPdLocatedMapView [value]="master">
|
||||||
<!-- <span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> -->
|
<!-- <span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span> -->
|
||||||
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;" (click)="Maponclick(master)" matTooltip="Map View" matTooltipPosition="left"></i></span>
|
<span><i class="fa-1x fa fa-map-marker" style="width: 37px;padding: 8px 9px 8px 9px;border-bottom: 2px solid red;"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<div fxFlex="90">
|
<div fxFlex="90">
|
||||||
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode_id == 1 ? master.other_pincode : master.pincode }} </span>
|
<span *ngIf="master.state_name" class="hover-icon"> {{master.addressline1}},<br> {{master.city_name}},<br>{{master.state_name}}-{{master.pincode_id == 1 ? master.other_pincode : master.pincode }} </span>
|
||||||
|
|||||||
@ -108,6 +108,10 @@ import { ManageHouseHoldComponent } from './list-pd/start-pd/forms/assessed-inco
|
|||||||
import { ManageOtherBusinessIncomeComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-other-business-income/manage-other-business-income.component';
|
import { ManageOtherBusinessIncomeComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-other-business-income/manage-other-business-income.component';
|
||||||
import { GrossProfitCalculationComponent } from './list-pd/start-pd/forms/assessed-income/gross-profit-calculation/gross-profit-calculation.component';
|
import { GrossProfitCalculationComponent } from './list-pd/start-pd/forms/assessed-income/gross-profit-calculation/gross-profit-calculation.component';
|
||||||
import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component';
|
import { ManageDailySalesComponent } from './list-pd/start-pd/forms/assessed-income/AI-diologue/manage-daily-sales/manage-daily-sales.component';
|
||||||
|
import { PdStatusChangeDialogueComponent } from './list-pd/pd-status-change-dialogue/pd-status-change-dialogue.component';
|
||||||
|
import { PdLocatedMapViewDirective } from './../pd-directive/pd-located-map-view.directive';
|
||||||
|
import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Custom angular notifier options
|
* Custom angular notifier options
|
||||||
*/
|
*/
|
||||||
@ -153,142 +157,7 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
// <<<<<<< HEAD
|
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, PdLocatedMapViewDirective, ViewLocationComponent],
|
||||||
// imports: [
|
|
||||||
// CommonModule,
|
|
||||||
// ManagePdRoutingModule,
|
|
||||||
// NotifierModule.withConfig(pdCustomNotifierOptions),
|
|
||||||
// MatCardModule,
|
|
||||||
// MatIconModule,
|
|
||||||
// MatInputModule,
|
|
||||||
// MatRadioModule,
|
|
||||||
// MatTableModule,
|
|
||||||
// MatPaginatorModule,
|
|
||||||
// MatButtonModule,
|
|
||||||
// MatProgressBarModule,
|
|
||||||
// MatToolbarModule,
|
|
||||||
// FlexLayoutModule,
|
|
||||||
// NgxDatatableModule,
|
|
||||||
// FormsModule,MatSlideToggleModule,
|
|
||||||
// MatSelectModule, MatListModule,MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule,MatStepperModule,MatSidenavModule ,MatMenuModule, MatButtonToggleModule,
|
|
||||||
// ReactiveFormsModule,
|
|
||||||
// FileUploadModule,
|
|
||||||
// TreeModule,
|
|
||||||
// MatDatepickerModule,
|
|
||||||
// MatDialogModule,MatSortModule,
|
|
||||||
// NgxMatSelectSearchModule,MatTooltipModule, MatExpansionModule,
|
|
||||||
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule,
|
|
||||||
// OwlNativeDateTimeModule,
|
|
||||||
// ],
|
|
||||||
// declarations: [RentalInfoComponent,
|
|
||||||
// TelePdAllocationComponent,
|
|
||||||
// FinancialInfoComponent,
|
|
||||||
// BusinessInfoComponent,
|
|
||||||
// EmploymentInfoComponent,
|
|
||||||
// StockComponent,
|
|
||||||
// BankingDetailsComponent,
|
|
||||||
// ListPdComponent,
|
|
||||||
// FamilyDetailsComponent,
|
|
||||||
// AddressComponent,
|
|
||||||
// ManagePdComponent,
|
|
||||||
// MapPdViewComponent,
|
|
||||||
// AddPdComponent,
|
|
||||||
// ViewPdComponent,
|
|
||||||
// PdAllocationComponent,
|
|
||||||
// SmartPdAllocationComponent,
|
|
||||||
// SchedulePdComponent,
|
|
||||||
// EditPdApplicantComponent,
|
|
||||||
// EditPdMasterComponent,
|
|
||||||
// StartPdComponent,
|
|
||||||
// InprogressPdComponent,
|
|
||||||
// AllPdComponent,
|
|
||||||
// ScheduledPdComponent,
|
|
||||||
// CompletedPdComponent,
|
|
||||||
// QcCompletedPdComponent,
|
|
||||||
// ClientInfoComponent,
|
|
||||||
// CurrentLoanComponent,
|
|
||||||
// AssetsInfoComponent,
|
|
||||||
// LoanDetailsComponent,
|
|
||||||
// OtherIncomeComponent,
|
|
||||||
// SupplierInfoComponent,
|
|
||||||
// PersonalInfoComponent,
|
|
||||||
// LenderRepresentativeComponent,
|
|
||||||
// PdReportComponent,
|
|
||||||
// AssessedIncomeComponent,
|
|
||||||
// AllocationViewMoreComponent],
|
|
||||||
|
|
||||||
// exports: [PdAllocationComponent,
|
|
||||||
// SmartPdAllocationComponent,
|
|
||||||
// TelePdAllocationComponent,
|
|
||||||
// SchedulePdComponent,
|
|
||||||
// EditPdApplicantComponent,
|
|
||||||
// EditPdMasterComponent,
|
|
||||||
// StartPdComponent,
|
|
||||||
// CompletedPdComponent,
|
|
||||||
// QcCompletedPdComponent,
|
|
||||||
// AllocationViewMoreComponent],
|
|
||||||
|
|
||||||
// providers: [PdTrigerService,
|
|
||||||
// GetGeometricLocationService],
|
|
||||||
|
|
||||||
// entryComponents: [PdAllocationComponent,
|
|
||||||
// SmartPdAllocationComponent,
|
|
||||||
// SchedulePdComponent,
|
|
||||||
// EditPdApplicantComponent,
|
|
||||||
// EditPdMasterComponent,
|
|
||||||
// TelePdAllocationComponent,
|
|
||||||
// AllocationViewMoreComponent,
|
|
||||||
|
|
||||||
// PersonalInfoComponent,
|
|
||||||
// ClientInfoComponent,
|
|
||||||
// SupplierInfoComponent,
|
|
||||||
// CurrentLoanComponent,
|
|
||||||
// LoanDetailsComponent,
|
|
||||||
// OtherIncomeComponent,
|
|
||||||
// AssetsInfoComponent,
|
|
||||||
// AddressComponent,
|
|
||||||
// FamilyDetailsComponent,
|
|
||||||
// BankingDetailsComponent,
|
|
||||||
// StockComponent,
|
|
||||||
// EmploymentInfoComponent,
|
|
||||||
// BusinessInfoComponent,
|
|
||||||
// FinancialInfoComponent,
|
|
||||||
// LenderRepresentativeComponent,
|
|
||||||
// RentalInfoComponent,
|
|
||||||
// AssessedIncomeComponent],
|
|
||||||
// =======
|
|
||||||
// imports: [
|
|
||||||
// CommonModule,
|
|
||||||
// ManagePdRoutingModule,
|
|
||||||
// NotifierModule.withConfig(pdCustomNotifierOptions),
|
|
||||||
// MatCardModule,
|
|
||||||
// MatIconModule,
|
|
||||||
// MatInputModule,
|
|
||||||
// MatRadioModule,
|
|
||||||
// MatTableModule,
|
|
||||||
// MatPaginatorModule,
|
|
||||||
// MatButtonModule,
|
|
||||||
// MatProgressBarModule,
|
|
||||||
// MatAutocompleteModule,
|
|
||||||
// MatToolbarModule,
|
|
||||||
// FlexLayoutModule,
|
|
||||||
// NgxDatatableModule,
|
|
||||||
// FormsModule,
|
|
||||||
// MatSlideToggleModule,
|
|
||||||
// MatSelectModule, MatListModule, MatGridListModule, MatTabsModule, MatBadgeModule, MatCheckboxModule, MatStepperModule, MatSidenavModule, MatMenuModule, MatButtonToggleModule,
|
|
||||||
// ReactiveFormsModule,
|
|
||||||
// FileUploadModule,
|
|
||||||
// TreeModule,
|
|
||||||
// MatDialogModule, MatSortModule,
|
|
||||||
// NgxMatSelectSearchModule, MatTooltipModule, MatExpansionModule,
|
|
||||||
// AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}), OwlDateTimeModule,
|
|
||||||
// OwlNativeDateTimeModule,
|
|
||||||
// ],
|
|
||||||
declarations: [RentalInfoComponent, TelePdAllocationComponent, FinancialInfoComponent, BusinessInfoComponent, EmploymentInfoComponent, StockComponent, BankingDetailsComponent, ListPdComponent, FamilyDetailsComponent, AddressComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, CurrentLoanComponent, AssetsInfoComponent, LoanDetailsComponent, OtherIncomeComponent, SupplierInfoComponent, PersonalInfoComponent, LenderRepresentativeComponent, PdReportComponent, AssessedIncomeComponent, AllocationViewMoreComponent, PdRequirementComponent, GeneralInfoComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent, SearchRelationPipe, DeleteRecordsCountPipe, BusinessAssetsInfoComponent, BusinessBankingDetailsComponent, SalesDetailsComponent, DailySalesDetailsComponent, SalesCalculationComponent, ManageSalesComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent],
|
|
||||||
|
|
||||||
// exports: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent],
|
|
||||||
// providers: [PdTrigerService, GetGeometricLocationService],
|
|
||||||
// entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent],
|
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
ManagePdRoutingModule,
|
ManagePdRoutingModule,
|
||||||
@ -321,14 +190,13 @@ const pdCustomNotifierOptions: NotifierOptions = {
|
|||||||
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule,
|
AgmCoreModule.forRoot({apiKey: 'AIzaSyBtdO5k6CRntAMJCF-H5uZjTCoSGX95cdk'}),OwlDateTimeModule,
|
||||||
OwlNativeDateTimeModule,
|
OwlNativeDateTimeModule,
|
||||||
],
|
],
|
||||||
// declarations: [ListPdComponent, ManagePdComponent, MapPdViewComponent, AddPdComponent, ViewPdComponent, PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, InprogressPdComponent, AllPdComponent, ScheduledPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, AssetsInfoComponent],
|
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent, PdStatusChangeDialogueComponent, ViewLocationComponent],
|
||||||
exports: [PdAllocationComponent, SmartPdAllocationComponent, TelePdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, StartPdComponent, CompletedPdComponent, QcCompletedPdComponent, ClientInfoComponent, SupplierInfoComponent, PersonalInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, AllocationViewMoreComponent, GeneralInfoComponent, PdRequirementComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, BusinessOtherFamilyMemberComponent, BusinessInfoGroupComponent,DailySalesDetailsComponent, SalesCalculationComponent, PurchaseDetailsComponent, BusinessExpenseDetailsComponent, HouseHoldDetailsComponent, OtherBusinessIncomeDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, GrossProfitCalculationComponent, ManageDailySalesComponent],
|
|
||||||
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
providers: [PdTrigerService, GetGeometricLocationService,{provide: MAT_DATE_LOCALE, useValue: 'en-GB'},
|
||||||
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
{provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]},
|
||||||
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}],
|
{provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS}, PdLocatedMapViewDirective],
|
||||||
|
|
||||||
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
|
entryComponents: [PdAllocationComponent, SmartPdAllocationComponent, SchedulePdComponent, EditPdApplicantComponent, EditPdMasterComponent, TelePdAllocationComponent, AllocationViewMoreComponent, PersonalInfoComponent,BusinessAssetsInfoComponent,
|
||||||
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent],
|
ClientInfoComponent, SupplierInfoComponent, CurrentLoanComponent, LoanDetailsComponent, OtherIncomeComponent, AssetsInfoComponent, AddressComponent, FamilyDetailsComponent, BankingDetailsComponent, StockComponent, EmploymentInfoComponent, BusinessInfoComponent, FinancialInfoComponent, LenderRepresentativeComponent,RentalInfoComponent, AssessedIncomeComponent, GeneralInfoComponent, PdRequirementComponent, ModelEditPdReportComponent, OtherApplicantDetailsComponent, NeighbourHoodComponent, DialogChangeCurrentVenrsion, FinalRemarksComponent, BusinessOtherFamilyMemberComponent, QcReviewComponent, BusinessInfoGroupComponent,BusinessBankingDetailsComponent, ManageSalesComponent, ManagePurchaseComponent, ManageBusinesExpenseComponent, ManageHouseHoldComponent, ManageOtherBusinessIncomeComponent, ManageDailySalesComponent,PdStatusChangeDialogueComponent, ViewLocationComponent],
|
||||||
|
|
||||||
})
|
})
|
||||||
export class ManagePdModule {
|
export class ManagePdModule {
|
||||||
|
|||||||
@ -0,0 +1,48 @@
|
|||||||
|
import { Directive, OnInit, ElementRef, Renderer2 ,HostListener,HostBinding,Input} from '@angular/core';
|
||||||
|
import { MatDialog,MatDialogRef,MAT_DIALOG_DATA } from '@angular/material';
|
||||||
|
import { GetGeometricLocationService } from './../location-service/get-geometric-location.service';
|
||||||
|
import { ViewLocationComponent } from './../pd-directive/view-location/view-location.component';
|
||||||
|
|
||||||
|
@Directive({
|
||||||
|
selector: '[appPdLocatedMapView]'
|
||||||
|
})
|
||||||
|
export class PdLocatedMapViewDirective {
|
||||||
|
|
||||||
|
@Input() value:any;
|
||||||
|
@HostBinding('style.cursor') evPoint : string = 'none';
|
||||||
|
lat : String;
|
||||||
|
lang: String;
|
||||||
|
constructor(private elm : ElementRef , private render:Renderer2,private dialog: MatDialog, private _geolocation: GetGeometricLocationService) { }
|
||||||
|
ngOnInit()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@HostListener('mouseenter') mouseover(event: Event){
|
||||||
|
this.evPoint = 'pointer';
|
||||||
|
}
|
||||||
|
|
||||||
|
@HostListener('click') onclick(event: Event)
|
||||||
|
{
|
||||||
|
if(this.value.addressline1 && this.value.pincode && this.value.state_name && this.value.city_name){
|
||||||
|
this._geolocation.findLocations(this.value.addressline1,this.value.pincode,this.value.state_name,this.value.city_name)
|
||||||
|
.subscribe(response => {
|
||||||
|
if (response.status == 'OK') {
|
||||||
|
this.lat = response.results[0].geometry.location.lat;
|
||||||
|
this.lang = response.results[0].geometry.location.lng;
|
||||||
|
const dialogRef = this.dialog.open(ViewLocationComponent, {
|
||||||
|
data: {"lat": this.lat, "lang":this.lang},
|
||||||
|
disableClose: false,
|
||||||
|
minWidth:'30%',
|
||||||
|
maxWidth:'30%',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
@HostListener('mouseleave') mouseleave(event: Event)
|
||||||
|
{
|
||||||
|
this.evPoint = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
<h2 mat-dialog-title>
|
||||||
|
<div fxFlex="70" align="left">
|
||||||
|
PD Location
|
||||||
|
</div>
|
||||||
|
<div fxFlex="30" align="end">
|
||||||
|
<button class="mr-1 mb-1" mat-mini-fab color="primary" type="button" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||||
|
</div>
|
||||||
|
</h2>
|
||||||
|
<mat-dialog-content>
|
||||||
|
<div fxLayout="row wrap">
|
||||||
|
<div fxFlex.xs="100" fxFlex.sm="100" fxFlex.md="100" fxFlex.lg="100" fxFlex.xl="100">
|
||||||
|
<mat-card>
|
||||||
|
<mat-card-content>
|
||||||
|
<agm-map [latitude]="data.lat" [longitude]="data.lang">
|
||||||
|
<agm-marker [latitude]="data.lat" [longitude]="data.lang"></agm-marker>
|
||||||
|
</agm-map>
|
||||||
|
</mat-card-content>
|
||||||
|
</mat-card>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</mat-dialog-content>
|
||||||
|
<!-- <mat-dialog-actions align="end">
|
||||||
|
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" type="button" matTooltip="Close" matTooltipPosition="above" mat-dialog-close><mat-icon>close</mat-icon></button>
|
||||||
|
</mat-dialog-actions> -->
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
@import "../../../../assets/styles/scss/material.variables";
|
||||||
|
|
||||||
|
:host {
|
||||||
|
margin-left: -5px;
|
||||||
|
margin-right: -5px;
|
||||||
|
margin-top: -5px;
|
||||||
|
display: block;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.sebm-google-map-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 350px;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
$mat-toolbar-height-desktop: 64px !default;
|
||||||
|
$mat-toolbar-height-mobile-portrait: 56px !default;
|
||||||
|
$mat-toolbar-height-mobile-landscape: 48px !default;
|
||||||
|
|
||||||
|
.mat-card-top {
|
||||||
|
margin-top: -($mat-toolbar-height-desktop);
|
||||||
|
}
|
||||||
|
::ng-deep .mat-dialog-container{
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media ($mat-xsmall) and (orientation: portrait) {
|
||||||
|
.mat-card-top {
|
||||||
|
margin-top: -($mat-toolbar-height-mobile-portrait);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media ($mat-small) and (orientation: landscape) {
|
||||||
|
.mat-card-top {
|
||||||
|
margin-top: -($mat-toolbar-height-mobile-landscape);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 0px; /* remove scrollbar space */
|
||||||
|
background: transparent; /* optional: just make scrollbar invisible */
|
||||||
|
}
|
||||||
|
/* optional: show position indicator in red */
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: #FF0000;
|
||||||
|
}
|
||||||
|
::ng-deep .body-container{
|
||||||
|
padding:0px !important;
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { ViewLocationComponent } from './view-location.component';
|
||||||
|
|
||||||
|
describe('ViewLocationComponent', () => {
|
||||||
|
let component: ViewLocationComponent;
|
||||||
|
let fixture: ComponentFixture<ViewLocationComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ ViewLocationComponent ]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ViewLocationComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
import { Component, OnInit, Input, Output, Inject } from '@angular/core';
|
||||||
|
import { MatDialog, MatDialogRef, MAT_DIALOG_DATA , DialogPosition} from '@angular/material';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-view-location',
|
||||||
|
templateUrl: './view-location.component.html',
|
||||||
|
styleUrls: ['./view-location.component.scss']
|
||||||
|
})
|
||||||
|
export class ViewLocationComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor(@Inject(MAT_DIALOG_DATA) public data: any, private dialogRef: MatDialogRef<ViewLocationComponent>) { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user