merge : kms

This commit is contained in:
gandhimathi 2018-12-21 18:34:22 +05:30
parent 15caf265b1
commit 551690e1f2
13 changed files with 240 additions and 157 deletions

View File

@ -19,26 +19,29 @@
<mat-card> <mat-card>
<!-- <mat-card-title>Address Details</mat-card-title> --> <!-- <mat-card-title>Address Details</mat-card-title> -->
<mat-card-content> <mat-card-content>
<div fxLayout="row wrap">
<div fxFlex="33">
<mat-form-field> <mat-form-field style="width: 80%;">
<!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> --> <!-- <input matInput placeholder="Name" formControlName="name_ans" type="text" required> -->
<input matInput placeholder="Address" formControlName="address" required autocomplete="off"> <input matInput placeholder="Address" formControlName="address" required autocomplete="off">
</mat-form-field> </mat-form-field>
</div>
<mat-form-field> <div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Address Type" formControlName="address_type" required> <mat-select placeholder="Address Type" formControlName="address_type" required>
<mat-option value="{{m_addressType.address_type_id}}" <mat-option value="{{m_addressType.address_type_id}}"
*ngFor="let m_addressType of addressData">{{m_addressType.address_type}} *ngFor="let m_addressType of addressData">{{m_addressType.address_type}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_type'].value == 12" style="width: 80%;">
<mat-form-field *ngIf="addressForm.controls['address_type'].value == 12">
<input matInput placeholder="Address Type Others" formControlName="address_type_others" autocomplete="off"> <input matInput placeholder="Address Type Others" formControlName="address_type_others" autocomplete="off">
</mat-form-field> </mat-form-field>
</div>
<mat-form-field> <div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Locality" formControlName="locality" required> <mat-select placeholder="Locality" formControlName="locality" required>
<mat-option value="{{m_locality.locality_id}}" <mat-option value="{{m_locality.locality_id}}"
*ngFor="let m_locality of localityData">{{m_locality.locality_name}} *ngFor="let m_locality of localityData">{{m_locality.locality_name}}
@ -46,27 +49,65 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'"> <mat-form-field *ngIf="addressForm.controls.locality.value == 'Others'" 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> </mat-form-field>
</div>
<mat-form-field style="width: 30%">
</div>
<div fxLayout="row wrap">
<div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Approach to PD Location" formControlName="pd_location" required> <mat-select placeholder="Approach to PD Location" formControlName="pd_location" required>
<mat-option value="{{data.pd_location_approach_id}}" <mat-option value="{{data.pd_location_approach_id}}"
*ngFor="let data of locationdata">{{data.description}} *ngFor="let data of locationdata">{{data.description}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
<mat-form-field style="width: 30%"> <div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Comment on Locality" formControlName="comment_locality" required> <mat-select placeholder="Comment on Locality" formControlName="comment_locality" required>
<mat-option value="{{data.comments_on_locality_id}}" <mat-option value="{{data.comments_on_locality_id}}"
*ngFor="let data of commentData">{{data.rating}} *ngFor="let data of commentData">{{data.rating}}
</mat-option> </mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
<div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Ownership" formControlName="address_ownership">
<mat-option value="{{ownerShip.id}}"
*ngFor="let ownerShip of ownerShipData">
{{ownerShip.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 80%;">
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership" autocomplete="off">
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 80%;">
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
</mat-form-field>
</div>
</div>
<div fxLayout="row wrap">
<div fxFlex="33">
<mat-form-field style="width: 80%;">
<mat-select placeholder="Is there any business activity is being run?"
formControlName="bussiness_activity" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
</div>
</div>
<!-- Don't Remove To replace atlast of the PD Completion and creating new form (Customer Behaviour 221118 review doc : s.no 3.e ) <!-- Don't Remove To replace atlast of the PD Completion and creating new form (Customer Behaviour 221118 review doc : s.no 3.e )
<mat-form-field> <mat-form-field>
<mat-select placeholder="Customer Behaviour" <mat-select placeholder="Customer Behaviour"
@ -77,30 +118,8 @@
</mat-select> </mat-select>
</mat-form-field>--(Customer Behaviour)--> </mat-form-field>--(Customer Behaviour)-->
<mat-form-field>
<mat-select placeholder="Ownership" formControlName="address_ownership">
<mat-option value="{{ownerShip.id}}"
*ngFor="let ownerShip of ownerShipData">
{{ownerShip.name}}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 4 " style="width: 38%">
<input matInput placeholder="Specify Other Ownership" formControlName="other_ownership" autocomplete="off">
</mat-form-field>
<mat-form-field *ngIf="addressForm.controls['address_ownership'].value == 3 " style="width: 38%">
<input matInput placeholder="What is the monthly rent paid?" formControlName="rent_amt" autocomplete="off">
</mat-form-field>
<mat-form-field style="width: 42%">
<mat-select placeholder="Is there any business activity is being run?"
formControlName="bussiness_activity" required>
<mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option>
</mat-select>
</mat-form-field>
<!-- <mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%"> --> <!-- <mat-form-field *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%"> -->
<!-- <mat-select placeholder="Bussiness Type" formControlName="bussiness_address_type"> <!-- <mat-select placeholder="Bussiness Type" formControlName="bussiness_address_type">
@ -157,7 +176,7 @@
<mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;"> <mat-form-field *ngIf="item.get('premises_ownership').value == 3" style="width: 40%;">
<input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off"> <input matInput placeholder="What is the monthly rent paid?" formControlName="premises_rent_amt" autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field style="width: 40%">
<input matInput placeholder="Remarks" <input matInput placeholder="Remarks"
formControlName="premises_remarks" style="width: 65%;" autocomplete="off"> formControlName="premises_remarks" style="width: 65%;" autocomplete="off">
</mat-form-field> </mat-form-field>

View File

@ -146,11 +146,11 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
<!-- <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 "> --> <div fxFlex="33" *ngIf="detail.get('investments_type').value == 6 ">
<mat-form-field> <mat-form-field>
<input matInput placeholder="Specify Other Type" formControlName="other_investments_type" autocomplete="off"> <input matInput placeholder="Specify Other Type" formControlName="other_investments_type" autocomplete="off">
</mat-form-field> </mat-form-field>
<!-- </div> --> </div>
<div fxFlex="33" > <div fxFlex="33" >
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off"> <input matInput placeholder="Amount of Investment" formControlName="amount_of_invest" required (keypress)="keyPress($event)" autocomplete="off">

View File

@ -31,6 +31,7 @@ export class AssetsInfoComponent implements OnInit {
pageTitle: string ="Assets Details"; pageTitle: string ="Assets Details";
//@Input() pdid: number; //@Input() pdid: number;
pdid:string; pdid:string;
businessProfessionName :string;
public _assetsQuesFrom: FormGroup; public _assetsQuesFrom: FormGroup;
public submitted = false; public submitted = false;
@ -198,6 +199,7 @@ public m_investmentType = [];
ngOnInit() { ngOnInit() {
this.getPdSupplierFormDetails(); this.getPdSupplierFormDetails();
this.getOwnerName();
this.getM_Assets_Type(); this.getM_Assets_Type();
this.getM_PropertyType(); this.getM_PropertyType();
@ -208,6 +210,11 @@ public m_investmentType = [];
} }
// ====================== // ======================
getOwnerName(){
this.pdTrigerService.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => {
this.businessProfessionName = (data.status == 200) ? data.records.profession_name : '' ;
});
}
getM_Assets_Type() { getM_Assets_Type() {
this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe( this.pdTrigerService.getAllMasterDatas('ASSETTYPE').subscribe(
@ -361,7 +368,7 @@ public m_investmentType = [];
business_assets_mode: ['', Validators.compose([Validators.required])], business_assets_mode: ['', Validators.compose([Validators.required])],
business_details: this._formBuilder.array([]), business_details: this._formBuilder.array([]),
business_approximate_market_value: ['', Validators.compose([])], business_approximate_market_value: ['', Validators.compose([])],
business_name_of_the_owner: ['', Validators.compose([])], business_name_of_the_owner: [this.businessProfessionName, Validators.compose([])],
// other_owner:[''], // other_owner:[''],
// relation:[''], // relation:[''],
// purchase_year: ['', Validators.compose([])], // purchase_year: ['', Validators.compose([])],
@ -556,7 +563,7 @@ public m_investmentType = [];
loadInvestDescriptionWithData(data) { loadInvestDescriptionWithData(data) {
return this._formBuilder.group({ return this._formBuilder.group({
investments_type: [data.investments_type, Validators.compose([Validators.required])], investments_type: [data.investments_type, Validators.compose([Validators.required])],
other_investment_type : [data.other_investment_type], other_investments_type : [data.other_investments_type],
amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])], amount_of_invest: [data.amount_of_invest, Validators.compose([Validators.required])],
bank_name: [data.bank_name, Validators.compose([Validators.required])] bank_name: [data.bank_name, Validators.compose([Validators.required])]
}); });

View File

@ -33,8 +33,7 @@
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.profession_name.value=='Others'"> <mat-form-field style="width: 45%;" *ngIf="businessForm.controls.profession_name.value=='Others'">
<input matInput placeholder="Other Name in Which The Business is Run" formControlName="profession_name_other" required> <input matInput placeholder="Other Name in Which The Business is Run" formControlName="profession_name_other" required>
</mat-form-field> </mat-form-field>
</div>
<div flexLayout="row wrap">
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 45%;">
<mat-select placeholder="Business Entity Type" <mat-select placeholder="Business Entity Type"
formControlName="business_entity_type" required> formControlName="business_entity_type" required>
@ -44,6 +43,12 @@
<mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value=='Others'"> <mat-form-field style="width: 45%;" *ngIf="businessForm.controls.business_entity_type.value=='Others'">
<input matInput placeholder="Other Business Entity Type" formControlName="business_entity_type_other" required> <input matInput placeholder="Other Business Entity Type" formControlName="business_entity_type_other" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 45%">
<mat-select placeholder="Industry"
formControlName="industry">
<mat-option value="{{list.industry_classification_id}}" *ngFor="let list of industryData">{{list.name}}</mat-option>
</mat-select>
</mat-form-field>
</div> </div>
<!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <!-- <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>
@ -54,12 +59,7 @@
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<mat-form-field style="width: 45%">
<mat-select placeholder="Industry"
formControlName="industry">
<mat-option value="{{list.industry_classification_id}}" *ngFor="let list of industryData">{{list.name}}</mat-option>
</mat-select>
</mat-form-field>
<!--<mat-card> <!--<mat-card>
@ -242,7 +242,7 @@
<mat-card-content formArrayName="manufacturing_activity_details"> <mat-card-content formArrayName="manufacturing_activity_details">
<mat-card *ngFor="let manufacturing of businessForm.controls.manufacturing_activity_details['controls']; let m=index" [formGroupName]="m"> <mat-card *ngFor="let manufacturing of businessForm.controls.manufacturing_activity_details['controls']; let m=index" [formGroupName]="m">
<mat-card-content> <mat-card-content>
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 35%;">
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required> <input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 45%;">
@ -418,7 +418,7 @@
<mat-card-content formArrayName="wholesale_trading_activity_details"> <mat-card-content formArrayName="wholesale_trading_activity_details">
<mat-card *ngFor="let wholesale of businessForm.controls.wholesale_trading_activity_details['controls']; let w=index" [formGroupName]="w"> <mat-card *ngFor="let wholesale of businessForm.controls.wholesale_trading_activity_details['controls']; let w=index" [formGroupName]="w">
<mat-card-content> <mat-card-content>
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 35%;">
<input matInput type="text" placeholder="Main Product" formControlName="main_products" required> <input matInput type="text" placeholder="Main Product" formControlName="main_products" required>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 45%;"> <mat-form-field style="width: 45%;">

View File

@ -46,7 +46,7 @@
<mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option> <mat-option *ngFor="let freq of frequencyData" value="{{freq.frequency_id}}">{{freq.name}}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field *ngIf="details.get('frequency').value != ''" >
<input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required> <input matInput [placeholder]="placeholderName[i] != '' ? placeholderName[i] : 'Instalment Amount' " formControlName="emi" (keypress)="keyPress($event)" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>

View File

@ -103,7 +103,8 @@ export class CurrentLoanComponent implements OnInit {
} }
} }
} else { } else {
control.push(this.createLoanDetail()); // console.log('overall else');
// control.push(this.createLoanDetail());
} }
}) })
} }
@ -116,10 +117,13 @@ export class CurrentLoanComponent implements OnInit {
} }
selectedLoanChanges(e): void { selectedLoanChanges(e): void {
console.log(e);
if (e.value == 'Yes') { if (e.value == 'Yes') {
// console.log('if()');
const control = <FormArray>this.currentLoanForm.controls['loan_details']; const control = <FormArray>this.currentLoanForm.controls['loan_details'];
control.push(this.createLoanDetail()); control.push(this.createLoanDetail());
} else if (e.value == 'No') { } else if (e.value == 'No') {
// console.log('else()');
const arr = <FormArray>this.currentLoanForm.controls.loan_details; const arr = <FormArray>this.currentLoanForm.controls.loan_details;
arr.removeAt(0); arr.removeAt(0);
} }

View File

@ -135,7 +135,7 @@
<input matInput placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" required> <input matInput placeholder="Net Loss" formControlName="estimate_net_loss" (change)="calMarginVal( i, details); calVariation( i, details)" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount( i, details); calVariation( i, details)" required> <input matInput disabled placeholder="Margin" formControlName="estimate_margin_of_loss" (keypress)="keyPress($event)" (change)="calAmount(i, details); calVariation( i, details)" required>
</mat-form-field> </mat-form-field>
</span> </span>
<mat-form-field *ngIf="i != 0" style="width:65%"> <mat-form-field *ngIf="i != 0" style="width:65%">

View File

@ -17,11 +17,15 @@
<div fxLayout="row wrap"> <div fxLayout="row wrap">
<div fxFlex="100"> <div fxFlex="100">
<mat-card> <mat-card>
<mat-form-field style="width: 25%"> <div fxLayout="row wrap">
<div fxFlex="33">
<mat-form-field style="width: 80%">
<input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" required autocomplete="off"> <input matInput placeholder="Loan Amount Applied for ? " formControlName="loan_amount" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" (change)="loanCalc()" required autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint> <mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 25%"> </div>
<div fxFlex="33">
<mat-form-field style="width: 80%">
<mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" required> <mat-select multiple (selectionChange)="endUserChange($event.value)" placeholder="What is the end use" formControlName="end_use" required>
<mat-option *ngFor="let enduse of m_endUseofLoad" [value]="enduse.subproduct_id">{{ enduse.name }}</mat-option> <mat-option *ngFor="let enduse of m_endUseofLoad" [value]="enduse.subproduct_id">{{ enduse.name }}</mat-option>
</mat-select> </mat-select>
@ -37,52 +41,64 @@
<mat-option value="other">Other purpose</mat-option> <mat-option value="other">Other purpose</mat-option>
</mat-select>--> </mat-select>-->
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="isOtherPurpose" style="width: 25%"> </div>
<div fxFlex="33">
<mat-form-field *ngIf="isOtherPurpose" style="width: 80%">
<input matInput placeholder="Specify End Use" formControlName="end_use_other" autocomplete="off"> <input matInput placeholder="Specify End Use" formControlName="end_use_other" autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 30%"> </div>
</div>
<div fxLayout="row wrap">
<div fxFlex="33">
<mat-form-field style="width: 80%">
<mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)" <mat-select placeholder="Is there a balance transfer ? " (selectionChange)="selectedBalancesTransferChanges($event)"
formControlName="is_transfer" required > formControlName="is_transfer" required >
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option> <mat-option value="no">No</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div>
</div>
<div *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''"> <div *ngIf="loanDetailsForm.controls['is_transfer'].value == 'yes' && loanDetailsForm.controls['is_transfer'].value != ''">
<mat-form-field style="width: 50%"> <mat-form-field style="width: 60%">
<input matInput placeholder="What is the amount required for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off"> <input matInput placeholder="What is the amount required for Balance Transfer ? " (keypress)="keyPress($event)" formControlName="balance_transfer_amount" (keyup)="inWords($event,2)" (change)="loanCalc()" autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{balTxrfAmtInWords}} Only</mat-hint> <mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{balTxrfAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:20%"> <mat-form-field style="width:30%">
<mat-select placeholder="Is there a Top Up" <mat-select placeholder="Is there a Top Up"
formControlName="is_topup" required> formControlName="is_topup" required>
<mat-option value="yes">Yes</mat-option> <mat-option value="yes">Yes</mat-option>
<mat-option value="no">No</mat-option> <mat-option value="no">No</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 50%"> <mat-form-field style="width: 60%">
<mat-select placeholder="Lender from where balance transfer done" <mat-select placeholder="Lender from where balance transfer done"
formControlName="lender"> formControlName="lender">
<mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option> <mat-option *ngFor="let btLen of m_btLenderList" [value]="btLen.bt_lender_list_id">{{ btLen.lender_name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 3" style="width: 25%"> <mat-form-field *ngIf="loanDetailsForm.controls['lender'].value == 3" style="width: 30%">
<input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender" autocomplete="off"> <input matInput placeholder="Specify Others Lender" formControlName="other_bt_lender" autocomplete="off">
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 20%"> <mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 60%">
<input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off"> <input matInput placeholder="Top Up Amount" (keypress)="keyPress($event)" formControlName="topup_amount" (keyup)="inWords($event,5)" autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint> <mat-hint align="end" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' "> <div *ngIf="loanDetailsForm.controls['is_transfer'].value != 'yes' && loanDetailsForm.controls['is_transfer'].value != '' ">
<mat-form-field style="width: 35%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)" autocomplete="off"> <input matInput placeholder="Amount of Own Contribution" formControlName="own_contribution" (keypress)="keyPress($event)" required (keyup)="inWords($event,4)" autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}} {{ownContributionInWords}} Only</mat-hint> <mat-hint align="end" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}} {{ownContributionInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 35%"> <mat-form-field style="width: 30%">
<mat-select placeholder="Source" formControlName="source" required> <mat-select placeholder="Source" formControlName="source" required>
<mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option> <mat-option *ngFor="let sour of m_sourceofamount" [value]="sour.id">{{ sour.name }}</mat-option>
</mat-select> </mat-select>
@ -102,7 +118,7 @@
</div> </div>
<mat-form-field style="width: 50%"> <mat-form-field style="width: 30%">
<input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required autocomplete="off"> <input matInput placeholder="EMI Comfort Level" formControlName="emi_level" (keypress)="keyPress($event)" required autocomplete="off">
</mat-form-field> </mat-form-field>
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> --> <!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->

View File

@ -50,7 +50,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{rawValueInWords}} Only</mat-hint> (keyup)="inWords($event,1)" --> <mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords}} Only</mat-hint> (keyup)="inWords($event,1)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" required>
@ -97,7 +97,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,2)" --> <mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,2)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -145,7 +145,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)" --> <mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{M_tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -205,7 +205,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,2)" --> <mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{R_goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,4)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -254,7 +254,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,3)" --> <mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,5)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -315,7 +315,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,2)" --> <mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{T_goodsValueInWords}} Only</mat-hint>(keyup)="inWords($event,6)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" required>
@ -365,7 +365,7 @@
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" required>
<!-- <mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{tradedGoodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,3)" --> <mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords}} Only</mat-hint> (keyup)="inWords($event,7)"
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" required>
@ -400,6 +400,13 @@
</mat-card> </mat-card>
<mat-card *ngIf="serviceProviderForm">
<mat-card-header>
<p>Service Provider</p>
</mat-card-header>
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
</mat-card>
</div> </div>
</div> </div>
</ng-template> </ng-template>

View File

@ -40,14 +40,23 @@ export class StockComponent implements OnInit {
public uomData : any = []; public uomData : any = [];
rawmaterial : any; rawmaterial : any;
goodsValueInWords : any;
rawValueInWords : any; M_rawValueInWords : any;
tradedGoodsValueInWords : any;
M_goodsValueInWords : any;
R_goodsValueInWords : any;
T_goodsValueInWords : any;
M_tradedGoodsValueInWords : any;
R_tradedGoodsValueInWords : any;
T_tradedGoodsValueInWords : any;
rawMaterialAccess: boolean; rawMaterialAccess: boolean;
finishedGoodsAccess: boolean; finishedGoodsAccess: boolean;
tradeConcernAccess: boolean; tradeConcernAccess: boolean;
public submitted = false; public submitted = false;
noRecordsFound: Boolean = false; noRecordsFound: Boolean = false;
serviceProviderForm: Boolean = false;
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private router: Router,
@ -85,37 +94,27 @@ export class StockComponent implements OnInit {
// this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); // this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!');
// }) // })
this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(data => { //this._pd.getTypeofActivityForSuppliedInfoForm(this.pdid).subscribe(
// if(data.dataStatus === undefined){ this._pd.stockFormAccess({pd_id:this.pdid}).subscribe(data => {
let datas = {
"profession_name": "Others",
"type_of_activity": [
{
"type_of_activity_id": 1,
"name": "Manufacturing Details"
},
{
"type_of_activity_id": 2,
"name": "Retail trading"
},
{
"type_of_activity_id": 3,
"name": "Trading Concern"
},
{
"type_of_activity_id": 4,
"name": "Service Provider"
}
]
};
this.initstockForms(datas.type_of_activity);
// }else {
// this.notifier.notify('warning', 'No Category Records Found.!');
// this.noRecordsFound = false;
// }
}, err => {
this.notifier.notify('warning', 'There is No Type Of Activity Please Check Bussiness Information.!'); if(data.dataStatus == true){
let datas = data.records;
if(datas.type_of_activity != undefined){
this.initstockForms(datas.type_of_activity)
}
else{
this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!');
}
}else if(data.dataStatus == false)
{
this.notifier.notify('warning', data.msg);
return;
}
else{
return;
}
}, err => {
this.notifier.notify('warning', 'Business Type Of Activity Not Available Please Check Business Information.!');
this.noRecordsFound = false; this.noRecordsFound = false;
}) })
@ -133,7 +132,7 @@ export class StockComponent implements OnInit {
let dataForm = value.records; let dataForm = value.records;
if(dataForm !== undefined) { if(dataForm !== undefined) {
console.log('dtaForm',dataForm);
this.stockForms = this.fb.group({ this.stockForms = this.fb.group({
pdid: [this.pdid], pdid: [this.pdid],
formid: [this.form_id], formid: [this.form_id],
@ -142,7 +141,12 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]), retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]),
}); });
let arr = record.filter(data => data.type_of_activity_id === 1);
let arr0 = Object.keys(record).map(function (key) {
return record[key];
});
let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) { if(arr.length > 0) {
let retail_finished_goods; let retail_finished_goods;
let manufacturing_raw_materials; let manufacturing_raw_materials;
@ -175,7 +179,7 @@ export class StockComponent implements OnInit {
manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials; manufacturing_temparr['manufacturing_traded_goods'] = manufacturing_traded_goods;manufacturing_temparr['manufacturing_finished_goods'] = manufacturing_finished_goods;manufacturing_temparr['manufacturing_raw_materials'] = manufacturing_raw_materials;
this.initManufacturingDetails(manufacturing_temparr); this.initManufacturingDetails(manufacturing_temparr);
} }
let arr1 = record.filter(data => data.type_of_activity_id === 2); let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) { if(arr1.length > 0) {
let retail_finished_goods; let retail_finished_goods;
let retail_traded_goods; let retail_traded_goods;
@ -199,7 +203,7 @@ export class StockComponent implements OnInit {
retail_temparr['retail_finished_goods'] = retail_finished_goods; retail_temparr['retail_finished_goods'] = retail_finished_goods;
this.initRetailDetails(retail_temparr); this.initRetailDetails(retail_temparr);
} }
let arr2 = record.filter(data => data.type_of_activity_id === 3); let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) { if(arr2.length > 0) {
let trading_finished_goods; let trading_finished_goods;
let trading_traded_goods; let trading_traded_goods;
@ -222,11 +226,15 @@ export class StockComponent implements OnInit {
trading_temparr['trading_finished_goods'] = trading_finished_goods; trading_temparr['trading_finished_goods'] = trading_finished_goods;
trading_temparr['trading_traded_goods'] = trading_traded_goods; trading_temparr['trading_traded_goods'] = trading_traded_goods;
this.initTradingDetails(trading_temparr); this.initTradingDetails(trading_temparr);
}
let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) {
this.serviceProviderForm = true;
} }
this.noRecordsFound = true; this.noRecordsFound = true;
} }
else{ else{
console.log('dataForm',dataForm); // console.log('dataForm',dataForm);
this.stockForms = this.fb.group({ this.stockForms = this.fb.group({
pdid: [this.pdid], pdid: [this.pdid],
formid: [this.form_id], formid: [this.form_id],
@ -235,21 +243,21 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]), retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]),
}); });
let arr = record.filter(data => data.type_of_activity_id === 1); let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) { if(arr.length > 0) {
this.initManufacturingDetails(null); this.initManufacturingDetails(null);
} }
let arr1 = record.filter(data => data.type_of_activity_id === 2); let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) { if(arr1.length > 0) {
this.initRetailDetails(null); this.initRetailDetails(null);
} }
let arr2 = record.filter(data => data.type_of_activity_id === 3); let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) { if(arr2.length > 0) {
this.initTradingDetails(null); this.initTradingDetails(null);
} }
let arr3 = record.filter(data => data.type_of_activity_id === 4); let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) { if(arr3.length > 0) {
//this.serviceProviderForm = true; this.serviceProviderForm = true;
} }
this.noRecordsFound = true; this.noRecordsFound = true;
} }
@ -263,21 +271,21 @@ export class StockComponent implements OnInit {
retail_details : this.fb.array([this.retailFormCreation(record)]), retail_details : this.fb.array([this.retailFormCreation(record)]),
trade_details: this.fb.array([this.tradingFormCreation(record)]), trade_details: this.fb.array([this.tradingFormCreation(record)]),
}); });
let arr = record.filter(data => data.type_of_activity_id === 1); let arr = record.filter(data => data.type_of_activity_id == 1);
if(arr.length > 0) { if(arr.length > 0) {
this.initManufacturingDetails(null); this.initManufacturingDetails(null);
} }
let arr1 = record.filter(data => data.type_of_activity_id === 2); let arr1 = record.filter(data => data.type_of_activity_id == 2);
if(arr1.length > 0) { if(arr1.length > 0) {
this.initRetailDetails(null); this.initRetailDetails(null);
} }
let arr2 = record.filter(data => data.type_of_activity_id === 3); let arr2 = record.filter(data => data.type_of_activity_id == 3);
if(arr2.length > 0) { if(arr2.length > 0) {
this.initTradingDetails(null); this.initTradingDetails(null);
} }
let arr3 = record.filter(data => data.type_of_activity_id === 4); let arr3 = record.filter(data => data.type_of_activity_id == 4);
if(arr3.length > 0) { if(arr3.length > 0) {
//this.serviceProviderForm = true; this.serviceProviderForm = true;
} }
this.noRecordsFound = true; this.noRecordsFound = true;
} }
@ -292,8 +300,8 @@ export class StockComponent implements OnInit {
} }
manufacturingForm: Boolean = false; manufacturingForm: Boolean = false;
manufacturingFormCreation(val) { manufacturingFormCreation(record) {
let arr = val.filter(data => data.type_of_activity_id === 1); let arr = record.filter(data => data.type_of_activity_id == 1);
if (arr.length > 0) { if (arr.length > 0) {
this.manufacturingForm = true; this.manufacturingForm = true;
return this.fb.group({ return this.fb.group({
@ -309,7 +317,8 @@ export class StockComponent implements OnInit {
retailForm: Boolean = false; retailForm: Boolean = false;
retailFormCreation(val) { retailFormCreation(val) {
let arr = val.filter(data => data.type_of_activity_id === 2);
let arr = val.filter(data => data.type_of_activity_id == 2);
if (arr.length > 0) { if (arr.length > 0) {
this.retailForm = true; this.retailForm = true;
return this.fb.group({ return this.fb.group({
@ -324,7 +333,7 @@ export class StockComponent implements OnInit {
tradingForm: Boolean = false; tradingForm: Boolean = false;
tradingFormCreation(val) { tradingFormCreation(val) {
let arr = val.filter(data => data.type_of_activity_id === 3); let arr = val.filter(data => data.type_of_activity_id == 3);
if (arr.length > 0) { if (arr.length > 0) {
this.tradingForm = true; this.tradingForm = true;
return this.fb.group({ return this.fb.group({
@ -350,32 +359,32 @@ export class StockComponent implements OnInit {
const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials']; const control = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['main_raw_materials'];
if(datas === null){ if(datas === null){
console.log(299,'if'); // console.log(299,'if');
// rawMaterial.push(this.createRawmaterial(null)); // rawMaterial.push(this.createRawmaterial(null));
// finishedGoods.push(this.createGoods(null)); // finishedGoods.push(this.createGoods(null));
// tradedGoods.push(this.createTradedGoods(null)); // tradedGoods.push(this.createTradedGoods(null));
} else { } else {
console.log(305,'else') // console.log(305,'else')
for (let val of datas.manufacturing_raw_materials) { for (let val of datas.manufacturing_raw_materials) {
console.log(val); // console.log(val);
rawMaterial.push(this.createRawmaterial(val)); rawMaterial.push(this.createRawmaterial(val));
} }
for (let val of datas.manufacturing_finished_goods) { for (let val of datas.manufacturing_finished_goods) {
console.log(val); // console.log(val);
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
} }
for (let val of datas.manufacturing_traded_goods) { for (let val of datas.manufacturing_traded_goods) {
console.log(val); // console.log(val);
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
} }
console.log(310,rawMaterial); // console.log(310,rawMaterial);
} }
} }
@ -439,13 +448,13 @@ export class StockComponent implements OnInit {
} else { } else {
for (let val of datas.retail_finished_goods) { for (let val of datas.retail_finished_goods) {
console.log(val); // console.log(val);
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
} }
for (let val of datas.retail_traded_goods) { for (let val of datas.retail_traded_goods) {
console.log(val); // console.log(val);
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
} }
@ -521,13 +530,13 @@ export class StockComponent implements OnInit {
// } // }
for (let val of datas.trading_finished_goods) { for (let val of datas.trading_finished_goods) {
console.log(val); // console.log(val);
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
} }
for (let val of datas.trading_traded_goods) { for (let val of datas.trading_traded_goods) {
console.log(val); // console.log(val);
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
} }
@ -751,13 +760,25 @@ export class StockComponent implements OnInit {
inWords(e,flag:number){ inWords(e,flag:number){
switch(flag){ switch(flag){
case 1 : case 1 :
this.rawValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value);
break; break;
case 2 : case 2 :
this.goodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break; break;
case 3 : case 3 :
this.tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 4 :
this.R_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 5 :
this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 6 :
this.T_goodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break;
case 7 :
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value);
break; break;
default: default:
break; break;

View File

@ -17,26 +17,26 @@
<mat-card style="margin: 12px;"> <mat-card style="margin: 12px;">
<h6 style="margin: 12px;">Raw Material #{{l+1}}</h6> <h6 style="margin: 12px;">Raw Material #{{l+1}}</h6>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Raw Material Name" formControlName="manufacturing_raw_material_name"> <input matInput placeholder="Raw Material Name" formControlName="manufacturing_raw_material_name">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Supplier Name" formControlName="manufacturing_supplier_name"> <input matInput placeholder="Supplier Name" formControlName="manufacturing_supplier_name">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Contact Person Name" formControlName="manufacturing_contact_person_name"> <input matInput placeholder="Contact Person Name" formControlName="manufacturing_contact_person_name">
</mat-form-field> </mat-form-field>
</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: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Contact Person Mobile Number" formControlName="manufacturing_contact_person_mobile_number"> <input matInput placeholder="Contact Person Mobile Number" formControlName="manufacturing_contact_person_mobile_number">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="manufacturing_payment_type"> <mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="manufacturing_payment_type">
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option> <mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%" *ngIf="items.get('manufacturing_payment_type').value == 3"> <mat-form-field style="width: 30%" *ngIf="items.get('manufacturing_payment_type').value == 3">
<input matInput placeholder="Number of days of credit provided" formControlName="manufacturing_credit_days"> <input matInput placeholder="Number of days of credit provided" formControlName="manufacturing_credit_days">
</mat-form-field> </mat-form-field>
</div> </div>
@ -70,26 +70,26 @@
<mat-card style="margin: 12px;"> <mat-card style="margin: 12px;">
<h6 style="margin: 12px;">Trading Product #{{l+1}}</h6> <h6 style="margin: 12px;">Trading Product #{{l+1}}</h6>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Trade Product Name" formControlName="trade_product_name"> <input matInput placeholder="Trade Product Name" formControlName="trade_product_name">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Supplier Name" formControlName="trade_supplier_name"> <input matInput placeholder="Supplier Name" formControlName="trade_supplier_name">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Contact Person Name" formControlName="trade_product_contact_person_name"> <input matInput placeholder="Contact Person Name" formControlName="trade_product_contact_person_name">
</mat-form-field> </mat-form-field>
</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: 100%"> <mat-form-field style="width: 30%">
<input matInput placeholder="Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number"> <input matInput placeholder="Contact Person Mobile Number" formControlName="trade_product_contact_person_mobile_number">
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%"> <mat-form-field style="width: 30%">
<mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="trade_product_payment_type"> <mat-select (selectionChange)="selectedPM($event)" placeholder="Payment Type" formControlName="trade_product_payment_type">
<mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option> <mat-option *ngFor="let pm of m_paymentModeType" [value]="pm.id">{{ pm.name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 100%" *ngIf="items.get('trade_product_payment_type').value == 3"> <mat-form-field style="width: 30%" *ngIf="items.get('trade_product_payment_type').value == 3">
<input matInput placeholder="Number of days of credit provided" formControlName="trade_product_credit_days"> <input matInput placeholder="Number of days of credit provided" formControlName="trade_product_credit_days">
</mat-form-field> </mat-form-field>
</div> </div>

View File

@ -83,9 +83,17 @@
<mat-list-item style="height:68px !important;"> <mat-list-item style="height:68px !important;">
<p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon"> <p><span *ngIf="applicant.applicant_name!=null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-user-o"></i> <i class="fa-1x fa fa-user-o"></i>
&nbsp;{{applicant.applicant_name}} </span> &nbsp;&nbsp;&nbsp;<span *ngIf="applicant.mobile_no!=''" class="mb-2 text-center hover-icon"> &nbsp;{{applicant.applicant_name}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.mobile_no != '' && applicant.mobile_no != null" class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i> <i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.mobile_no}} </span> <br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant </span> &nbsp;{{applicant.mobile_no}}
</span> &nbsp;&nbsp;&nbsp;
<span *ngIf="applicant.landline != '' && applicant.landline != 'null-null' && applicant.landline != null " class="mb-2 text-center hover-icon">
<i class="fa-1x fa fa-phone"></i>
&nbsp;{{applicant.landline}}
</span>
<br><span *ngIf="applicant.applicant_type=='1';else codetails" style="font-size:12px;">Main Applicant </span>
<ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template> <ng-template #codetails><span>{{applicant.relation_name}}</span></ng-template>
</p> </p>
</mat-list-item> </mat-list-item>

View File

@ -11,10 +11,10 @@ import { environment } from 'environments/environment';
/** Imported Service Files Are., */ /** Imported Service Files Are., */
import { AwsService } from '../../../AwsService/aws.service'; import { AwsService } from '../../../AwsService/aws.service';
/** Consant Value For Created Date And Updated Date */ /** Consant Value For Created Date And Updated Date */
const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' '); const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
}) })
@ -24,6 +24,7 @@ const currentdate = new Date().toJSON().slice(0, 19).replace('T', ' ');
* Kdk * Kdk
*/ */
export class EntityService { export class EntityService {
private apiUrl = environment.apiEndpoint; private apiUrl = environment.apiEndpoint;
private serviceUrl = 'https://jsonplaceholder.typicode.com/users'; private serviceUrl = 'https://jsonplaceholder.typicode.com/users';