changes : ps
This commit is contained in:
parent
3f0a91c208
commit
7fcc111147
@ -280,9 +280,9 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||||
address_control.controls[index]['controls'].isactive.setValue(0);
|
address_control.controls[index]['controls'].isactive.setValue(0);
|
||||||
this.addressesDeactivited[index] = false;
|
this.addressesDeactivited[index] = false;
|
||||||
console.log('address_control',address_control);
|
// console.log('address_control',address_control);
|
||||||
console.log('address_control.controls[index]',address_control.controls[index]);
|
// console.log('address_control.controls[index]',address_control.controls[index]);
|
||||||
console.log('address_control.controls[index][controls]',address_control.controls[index]['controls']);
|
// console.log('address_control.controls[index][controls]',address_control.controls[index]['controls']);
|
||||||
|
|
||||||
// address_control.controls[index]['controls'].showHide();
|
// address_control.controls[index]['controls'].showHide();
|
||||||
// isactive.setValue(0);
|
// isactive.setValue(0);
|
||||||
@ -417,7 +417,7 @@ export class EditPdMasterComponent implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log('my_array.addresses',my_array.addresses);
|
// console.log('my_array.addresses',my_array.addresses);
|
||||||
let filteredAddressesdata = my_array.addresses.filter(item => item.isactive == 1);
|
let filteredAddressesdata = my_array.addresses.filter(item => item.isactive == 1);
|
||||||
let lenderMasterArray = {
|
let lenderMasterArray = {
|
||||||
"pd_id": my_array.pd_id,
|
"pd_id": my_array.pd_id,
|
||||||
|
|||||||
@ -113,8 +113,8 @@ export class AddressComponent implements OnInit {
|
|||||||
this._pd.retriveForm(params).subscribe(data => {
|
this._pd.retriveForm(params).subscribe(data => {
|
||||||
const control = <FormArray>this.addressForm.controls['addresses'];
|
const control = <FormArray>this.addressForm.controls['addresses'];
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
console.log('data.records',data.records);
|
// console.log('data.records',data.records);
|
||||||
console.log('data.records.addresses',data.records.addresses);
|
// console.log('data.records.addresses',data.records.addresses);
|
||||||
if (data.records.addresses.length == 0) {
|
if (data.records.addresses.length == 0) {
|
||||||
control.push(this.createAddresses(null));
|
control.push(this.createAddresses(null));
|
||||||
// this.loadPDAddressesDetails();
|
// this.loadPDAddressesDetails();
|
||||||
|
|||||||
@ -186,23 +186,23 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
loadaddresses(){
|
loadaddresses(){
|
||||||
console.log('function inside loaded');
|
// console.log('function inside loaded');
|
||||||
let params: any = {};
|
let params: any = {};
|
||||||
params.pd_id = this.pdid;
|
params.pd_id = this.pdid;
|
||||||
params.pd_form_id = '5';
|
params.pd_form_id = '5';
|
||||||
|
|
||||||
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
this.pdTrigerService.retriveForm(params).subscribe(data => {
|
||||||
console.log('response',data);
|
// console.log('response',data);
|
||||||
if (data.status == 200) {
|
if (data.status == 200) {
|
||||||
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
|
let dataOfAddress = data.records.addresses.filter(item => item.isactive == 1);
|
||||||
console.log(data.records);
|
// console.log(data.records);
|
||||||
console.log(data.records.addresses);
|
// console.log(data.records.addresses);
|
||||||
console.log(dataOfAddress);
|
// console.log(dataOfAddress);
|
||||||
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
// // const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
|
||||||
if(data.records.addresses.length > 0){
|
if(data.records.addresses.length > 0){
|
||||||
data.records.addresses.forEach((data,inx)=>{
|
data.records.addresses.forEach((data,inx)=>{
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
|
|
||||||
this.addressLabel[inx] = '';
|
this.addressLabel[inx] = '';
|
||||||
|
|
||||||
@ -787,8 +787,8 @@ export class BusinessAssetsInfoComponent implements OnInit {
|
|||||||
/** To Convert Month into Year */
|
/** To Convert Month into Year */
|
||||||
ConvertMonthintoYear(e,i) {
|
ConvertMonthintoYear(e,i) {
|
||||||
// const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
// const address_control = <FormArray>this._EditPDtriggerForm.controls['addresses'];
|
||||||
console.log(e);
|
// console.log(e);
|
||||||
console.log(i);
|
// console.log(i);
|
||||||
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
const control = <FormArray>this._businessAssetsQuesFrom.controls['business_assets_for_address'];
|
||||||
|
|
||||||
// control.controls[i]['controls'].isactive.setValue(0);
|
// control.controls[i]['controls'].isactive.setValue(0);
|
||||||
|
|||||||
@ -184,10 +184,10 @@ export class CurrentLoanComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
this._pd.getAssetsWithLoanFromBusiness(this.pdid).subscribe(data=>{
|
||||||
console.log('data',data);
|
// console.log('data',data);
|
||||||
|
|
||||||
if(data.dataStatus == true){
|
if(data.dataStatus == true){
|
||||||
console.log('data',data.record);
|
// console.log('data',data.record);
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
let AssetData = data.record;
|
let AssetData = data.record;
|
||||||
|
|||||||
@ -94,7 +94,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
this.customer_segment_abbr = this.pd_all_details.pdmaster_details.customer_segment_abbr;
|
||||||
let x = this.customer_segment_abbr.split("-");
|
let x = this.customer_segment_abbr.split("-");
|
||||||
this.CustSegAbbr = x[1];
|
this.CustSegAbbr = x[1];
|
||||||
console.log('this.CustSegAbbr',this.CustSegAbbr);
|
// console.log('this.CustSegAbbr',this.CustSegAbbr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ViewerOption For Docs Display
|
//ViewerOption For Docs Display
|
||||||
@ -932,9 +932,9 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('val.financial_margin_of_profit',val.financial_margin_of_profit);
|
// console.log('val.financial_margin_of_profit',val.financial_margin_of_profit);
|
||||||
console.log('profit_margin',profit_margin);
|
// console.log('profit_margin',profit_margin);
|
||||||
console.log('childArray.controls.financial_margin_of_loss',childArray.controls.financial_margin_of_loss.value);
|
// console.log('childArray.controls.financial_margin_of_loss',childArray.controls.financial_margin_of_loss.value);
|
||||||
// prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
|
// prev_profit_margin[index] = val.financial_margin_of_profit != '' ? val.financial_margin_of_profit: 0;
|
||||||
// prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
|
// prev_loss_margin[index] = val.financial_margin_of_loss !='' ? val.financial_margin_of_loss : 0 ;
|
||||||
prev_profit_margin[index] = profit_margin != '' ? profit_margin : 0;
|
prev_profit_margin[index] = profit_margin != '' ? profit_margin : 0;
|
||||||
@ -960,20 +960,20 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
if ((profit_margin != '' || loss_margin != '') && index != 0) {
|
||||||
|
|
||||||
|
|
||||||
console.log('temp_prev_losses',prev_loss_margin);
|
// console.log('temp_prev_losses',prev_loss_margin);
|
||||||
console.log('temp_prev_profits',prev_profit_margin);
|
// console.log('temp_prev_profits',prev_profit_margin);
|
||||||
|
|
||||||
console.log('curr index',index);
|
// console.log('curr index',index);
|
||||||
|
|
||||||
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
loss_margin = loss_margin !== undefined ? loss_margin : 0;
|
||||||
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
profit_margin = profit_margin !== undefined ? profit_margin:0;
|
||||||
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
|
let temp_prev_loss_margin = prev_loss_margin[index-1] !== undefined ? prev_loss_margin[index-1] : 0 ;
|
||||||
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
|
let temp_prev_profit_margin = prev_profit_margin[index-1] !== undefined ? prev_profit_margin[index-1] : 0 ;
|
||||||
|
|
||||||
console.log('profit_margin',profit_margin);
|
// console.log('profit_margin',profit_margin);
|
||||||
console.log('pre year loss_margin',temp_prev_loss_margin);
|
// console.log('pre year loss_margin',temp_prev_loss_margin);
|
||||||
console.log('loss_margin',loss_margin);
|
// console.log('loss_margin',loss_margin);
|
||||||
console.log('pre year profit_margin',temp_prev_profit_margin);
|
// console.log('pre year profit_margin',temp_prev_profit_margin);
|
||||||
|
|
||||||
|
|
||||||
if(annual_sale != ''){
|
if(annual_sale != ''){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user