diff --git a/ng6-seed/sineedge_prod_270119.zip b/ng6-seed/sineedge_prod_270119.zip new file mode 100644 index 000000000..e92de0121 Binary files /dev/null and b/ng6-seed/sineedge_prod_270119.zip differ diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts index d48972ff1..3b82ab9cd 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/add-pd/add-pd.component.ts @@ -413,7 +413,6 @@ export class AddPdComponent implements OnInit, OnDestroy { // common function for both draft and process pd submitPdDetails(formValue: any, status:string) { - if(this._PDtriggerForm.invalid) { this.validateAllFormFields(this._PDtriggerForm); this.notifier.notify('warning', 'Please Fill All Mandatory Fields.!'); @@ -458,7 +457,7 @@ export class AddPdComponent implements OnInit, OnDestroy { "addressline1":formValue.addressline1, "fk_city":formValue.fk_city, "fk_state":formValue.fk_state, - "pincode":formValue.pincode , + "pincode":formValue.pincode, "other_pincode":formValue.other_pincode , "remarks":formValue.remarks, "pd_status": status, @@ -509,6 +508,7 @@ export class AddPdComponent implements OnInit, OnDestroy { if(pd_applicant_details.length>0){ pd_form.append("pd_applicant_details",JSON.stringify(pd_applicant_details)) } + pd_form.append("pd_document_titles",JSON.stringify(AllFilesObj)) if(formValue.addtional_requirements.length > 0){ pd_form.append("addtional_requirements",JSON.stringify(formValue.addtional_requirements)) diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts index 94fadf60c..881ab4dd7 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-applicant/edit-pd-applicant.component.ts @@ -55,10 +55,16 @@ export class EditPdApplicantComponent implements OnInit { } loadApplicantFormData() { - console.log('loadApplicantFormData',this.mainApplicantData[0].landline); - let stdcodesearch = this.mainApplicantData[0].landline.search("-"); - let stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch) ; - let landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8) ; + let stdcode; + let landline; + if(this.mainApplicantData[0].landline != null){ + let stdcodesearch = this.mainApplicantData[0].landline.search("-"); + stdcode = this.mainApplicantData[0].landline.substr(0,stdcodesearch) ; + landline = this.mainApplicantData[0].landline.substr(+stdcodesearch + 1,8) ; + }else{ + stdcode = ''; + landline = ''; + } this._EditApplicantForm = this._fb.group({ fk_applicant_primary_id: [this.mainApplicantData[0].pd_co_applicant_id], @@ -86,12 +92,12 @@ export class EditPdApplicantComponent implements OnInit { let stdcode; let landline; if(listData.landline != null){ - let stdcodesearch = listData.landline.search("-"); - stdcode = listData.landline.substr(0,stdcodesearch); - landline = listData.landline.substr(+stdcodesearch + 1,8);} + let stdcodesearch = listData.landline.search("-"); + stdcode = listData.landline.substr(0,stdcodesearch); + landline = listData.landline.substr(+stdcodesearch + 1,8);} else{ - stdcode = ''; - landline = ''; + stdcode = ''; + landline = ''; } return this._fb.group({ label: ['Co Applicant'], diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts index 734c88988..d38eb1f45 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/edit-pd-master/edit-pd-master.component.ts @@ -149,7 +149,10 @@ export class EditPdMasterComponent implements OnInit { } this.getCityList(this.data.records.fk_state); - + // let getpincodeid = this.data.records.pincode != '' ? this.data.records.pincode != null ? (this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id) + // : this.data.records.pincode + // : this.data.records.pincode; + this._EditPDtriggerForm = this._fb.group({ pd_id: [this.data.records.pd_id], fk_lender_id: [this.data.records.fk_lender_id, Validators.compose([Validators.required])], @@ -170,7 +173,12 @@ export class EditPdMasterComponent implements OnInit {   pincode : [this.data.records.pincode],/** Validators.compose([Validators.minLength(6),Validators.maxLength(6),Validators.pattern('^[0-9]*$')])], */ other_pincode:[this.data.records.other_pincode], remarks: [this.data.records.remarks], - }); + }); + console.log('this.pincodeList.filter(data => data.pincode == formValue.pincode).pincode_id',this.pincodeList.filter(data => data.pincode == this.data.records.pincode).pincode_id); + console.log('this.pincodeList.filter(data => data.pincode == formValue.pincode)',this.pincodeList.filter(data => data.pincode == this.data.records.pincode)); + console.log('this',this.pincodeList); + console.log(this.data.records.pincode); + this._EditPDtriggerForm.controls.pincode.setValue(1); } get pdMain() { return this._EditPDtriggerForm.controls; } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts index e6af8783d..9eb3c9d30 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/address/address.component.ts @@ -133,9 +133,8 @@ export class AddressComponent implements OnInit { this.addressForm.controls.address.setValue(data.records.address); this.addressForm.controls.pd_location.setValue(data.records.pd_location); this.addressForm.controls.address_type.setValue(data.records.address_type); - let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type); - this.selectedAddressType(selectedAddressType); - + let selectedAddressType = this.addressData.filter(element =>element.address_type_id == data.records.address_type)[0]; + this.selectedAddressType(selectedAddressType.address_type); if(data.records.address_type == 1) { this.addressForm.controls.address_type_others.setValue(data.records.address_type_others); this.selectedAddressType(data.records.address_type_others); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts index 8fe05e19e..7080d93b6 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info-group/business-info-group.component.ts @@ -38,7 +38,7 @@ export class BusinessInfoGroupComponent implements OnInit { getCompanyListForBusiness(): void{ this._pd.getCompaniesListsForBusiness(this.pdid).subscribe(data=>{ if(data.dataStatus){ - this.existCompanyList = data.records.filter(val =>val.is_active && val.is_company_applicant===true); + this.existCompanyList = data.records.filter(val =>val.is_active == 1); this.waitLoading = true; } else { diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html index 68b144034..c0ec7fa7d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.html @@ -100,6 +100,16 @@ + + Title + + + + {{title.name}} + + + + Name @@ -115,7 +125,7 @@ - {{member.name | titlecase}} + {{member.name + ' of' | titlecase}} @@ -193,7 +203,7 @@ Manufacturing Details - + @@ -402,18 +412,23 @@ - Description of {{manufacturing.value.main_products}} + Description of {{manufacturing.value.main_products}} manufacturing process - + +
+ +
- + @@ -421,7 +436,7 @@ Retail Trading Details - + @@ -633,9 +648,14 @@ - Description of {{retail.value.main_products}} + Description of {{retail.value.main_products}} Retailing process +
+ +
@@ -652,7 +672,7 @@ Wholesale Trade Details - + @@ -862,18 +882,23 @@ - Description of {{wholesale.value.main_products}} + Description of {{wholesale.value.main_products}} Wholesale process - + +
+ +
- +
@@ -881,7 +906,7 @@ Service Provider Details - + @@ -1087,9 +1112,14 @@ - Description of {{serviceprovider.value.main_products}} + Description of {{serviceprovider.value.main_products}} Service Process - + +
+ +
@@ -1106,21 +1136,26 @@ Other Details - + +
+ +
- +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts index 775d8015c..fe11894ba 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/business-info/business-info.component.ts @@ -37,6 +37,7 @@ export class BusinessInfoComponent implements OnInit { form_id: number; pageTitle: string ="About Business"; relationData: any = []; + titleData: any = []; companyRelationShipList: any =[]; //industryData: any = []; activityData: any = []; @@ -60,7 +61,7 @@ export class BusinessInfoComponent implements OnInit { maxDate:any; // InvestedAmountInWords:any; public relationSource= new MatTableDataSource(); - displayedColumns = ['family_member_name','relation','relation_to','relationship_with_company','started_business']; + displayedColumns = ['title','family_member_name','relation','relation_to','relationship_with_company','started_business']; generalExistEntityType:string; generalExistEntityType_other:string; generalExistBusinessYear:Number; @@ -1039,6 +1040,17 @@ export class BusinessInfoComponent implements OnInit { }) }); } + // get title master + getTitle() { + let master_name = 'TITLES'; + this._pd.getAllMasterDatas(master_name).subscribe(data => { + data.records.forEach(val => { + if (val.isactive == 1) { + this.titleData.push(val); + } + }) + }); + } getCompanyRelation() { let master_name = 'COMPANYRELATIONSHIPS'; @@ -1122,6 +1134,7 @@ export class BusinessInfoComponent implements OnInit { createPersonRelationhip(details: any):FormGroup { return this.fb.group({ other_family_relationship_id: [details.other_family_relationship_id,Validators.required], + family_member_salutation:[details.family_member_salutation], family_member_name: [details.family_member_name,Validators.required], relationship_with_company_id: [details.relationship_with_company_id,Validators.required], relation_to_id: [details.relation_to_id,Validators.required], @@ -1166,28 +1179,56 @@ export class BusinessInfoComponent implements OnInit { addMoreManufacturing() { let manufacturingControl = this.businessForm.controls['manufacturing_activity_details']; manufacturingControl.push(this.createActivity()); + } + deleteManufacturing(findex){ + let manufacturingControl = this.businessForm.controls['manufacturing_activity_details']; + manufacturingControl.removeAt(findex); } // add more retail details addMoreRetail() { let retailControl = this.businessForm.controls['retail_trading_activity_details']; retailControl.push(this.createActivity()); - } + } + + deleteRetail(index) { + let retailControl = this.businessForm.controls['retail_trading_activity_details']; + retailControl.removeAt(index); + } + // add more retail details addMoreWholesale() { let wholesaleControl = this.businessForm.controls['wholesale_trading_activity_details']; wholesaleControl.push(this.createActivity()); - } + } + + deleteWholesale(index) { + let wholesaleControl = this.businessForm.controls['wholesale_trading_activity_details']; + wholesaleControl.removeAt(index); + } + + // add more service provider details addMoreServiceprovider() { let serviceControl = this.businessForm.controls['service_provider_activity_details']; serviceControl.push(this.createServiceActivity()); } + + deleteServiceprovider(index) { + let serviceControl = this.businessForm.controls['service_provider_activity_details']; + serviceControl.removeAt(index); + } + // add more others details addMoreOthersActivity() { let othersControl = this.businessForm.controls['others_activity_details']; othersControl.push(this.createOthersActivity()); } + deleteOthersActivity(index) { + let othersControl = this.businessForm.controls['others_activity_details']; + othersControl.removeAt(index); + } + // update partner group other form control changePartnerGroup(value,key) { let control: any = this.businessForm.get('partners') as FormArray; @@ -1362,7 +1403,7 @@ export class BusinessInfoComponent implements OnInit { otherFamilyMemberDialogue() { let relationControl = this.businessForm.controls['persons_with_relationships']; - let other_family_member: any= {'other_family_relationship_id':'','other_family_relationship_name':'','family_member_name':'','relationship_with_company_id':'','relationship_with_company':'','started_business':'','currently_active_status':''}; + let other_family_member: any= {'other_family_relationship_id':'','other_family_relationship_name':'','family_member_salutation':'','family_member_name':'','relationship_with_company_id':'','relationship_with_company':'','started_business':'','currently_active_status':''}; relationControl.push(this.createPersonRelationhip(other_family_member)); } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html index 0121cf50f..420ea59ce 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.html @@ -205,7 +205,7 @@ - + {{"₹"}} {{AV_SalesInwords[i]}} Only @@ -238,7 +238,7 @@ - {{"₹"}} {{details.get('estimate_profit_margin').value}} ( {{AV_marginProfitAmtInwords[i]}} Only ) + {{"₹"}} {{AV_marginProfitAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_profit_margin').value}} )
@@ -250,8 +250,8 @@ - ( {{details.get('estimate_net_profit_percent').value }} % ) - + {{"₹"}} {{AV_netProfitAmtInwords[i]}} Only ( {{details.get('estimate_net_profit_percent').value }} % ) +
@@ -260,15 +260,15 @@
- + - + - {{"₹"}} {{details.get('estimate_Loss_margin').value}} - + {{"₹"}} {{AV_marginLossAmtInwords[i]}} Only ( {{"₹"}} {{details.get('estimate_loss_margin').value}} ) +
@@ -280,8 +280,8 @@ - ( {{details.get('estimate_net_loss_percent').value }} % ) - + {{"₹"}} {{AV_netLossAmtInwords[i]}} Only ( {{details.get('estimate_net_loss_percent').value }} % ) +
diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts index 8e83efa89..913a7dd77 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/financial-info/financial-info.component.ts @@ -152,11 +152,11 @@ export class FinancialInfoComponent implements OnInit { // this.AV_annualSalesInwords[index] = this._pd.convertNumberToWords(val.estimate_annual_sale); // this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_profit); // this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.estimate_net_loss); - this.AV_SalesInwords = this._pd.convertNumberToWords(+val.estimate_sales_average); - this.AV_marginProfitAmtInwords = this._pd.convertNumberToWords(+val.estimate_profit_margin); - this.AV_netProfitAmtInwords = this._pd.convertNumberToWords(+val.estimate_net_profit); - this.AV_marginLossAmtInwords = this._pd.convertNumberToWords(+val.estimate_loss_margin); - this.AV_netLossAmtInwords = this._pd.convertNumberToWords(+val.estimate_net_loss); + this.AV_SalesInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_sales_average)); + this.AV_marginProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_profit_margin)); + this.AV_netProfitAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_profit)); + this.AV_marginLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_loss_margin)); + this.AV_netLossAmtInwords[index] = this._pd.convertNumberToWords(Math.round(val.estimate_net_loss)); estimated_val.push(this.createValue('')); }); retriveData.estimated_value = result_val; @@ -853,13 +853,13 @@ export class FinancialInfoComponent implements OnInit { if(lower > higer){ details.controls.estimate_sales_average.setValue(higer.toFixed(2)); - this.AV_SalesInwords[i] = this._pd.convertNumberToWords(higer); + this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(higer)); } else{ details.controls.estimate_sales_average.setValue(lower.toFixed(2)); - this.AV_SalesInwords[i] = this._pd.convertNumberToWords(lower); + this.AV_SalesInwords[i] = this._pd.convertNumberToWords(Math.round(lower)); } } @@ -882,7 +882,7 @@ export class FinancialInfoComponent implements OnInit { let Profit_Average = (profit_percent*sales_average)/100; details.controls.estimate_profit_margin.setValue(Math.round(Profit_Average)); - details.controls.estimate_profit_margin_percent.setValue(profit_percent); + details.controls.estimate_profit_margin_percent.setValue(profit_percent.toFixed(2)); this.AV_marginProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(Profit_Average)); @@ -905,7 +905,7 @@ export class FinancialInfoComponent implements OnInit { let Profit_percent = (profit_amount/sales_average)*100; details.controls.estimate_net_profit.setValue(Math.round(profit_amount)); - details.controls.estimate_net_profit_percent.setValue(Profit_percent); + details.controls.estimate_net_profit_percent.setValue(Profit_percent.toFixed(2)); this.AV_netProfitAmtInwords[i] = this._pd.convertNumberToWords(Math.round(profit_amount)); @@ -938,7 +938,7 @@ export class FinancialInfoComponent implements OnInit { let loss_Average = (loss_percent*sales_average)/100; details.controls.estimate_loss_margin.setValue(Math.round(loss_Average)); - details.controls.estimate_loss_margin_percent.setValue(loss_percent); + details.controls.estimate_loss_margin_percent.setValue(loss_percent.toFixed(2)); this.AV_marginLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_Average)); @@ -960,8 +960,8 @@ export class FinancialInfoComponent implements OnInit { let loss_amount = (estimate_net_loss_to + estimate_net_loss_from)/2; let loss_percent = (loss_amount/sales_average)*100; - details.controls.estimate_net_profit.setValue(Math.round(loss_amount)); - details.controls.estimate_net_profit_percent.setValue(loss_percent); + details.controls.estimate_net_loss.setValue(Math.round(loss_amount)); + details.controls.estimate_net_loss_percent.setValue(loss_percent.toFixed(2)); this.AV_netLossAmtInwords[i] = this._pd.convertNumberToWords(Math.round(loss_amount)); diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html index e64e6747a..7e290c02d 100755 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/view-pd/view-pd.component.html @@ -20,7 +20,7 @@ {{master.pd_status | titlecase}} QC Completed    - +
{{master.pd_allocated_to | titlecase}}