Issues Fixes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-03 17:56:06 +05:30
parent a6a8e434ac
commit 8e2e82d3ac
4 changed files with 113 additions and 80 deletions

View File

@ -150,9 +150,13 @@ export class EditPdApplicantComponent implements OnInit {
// console.log(itemElement.coapplicant_landline);
let concat_landline
if(itemElement.coapplicant_stdcode != null && itemElement.coapplicant_landline != null){
let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode;
let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
concat_landline = std+'-'+landline;
if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){
concat_landline = null;
}else{
let std = itemElement.coapplicant_stdcode == '' ? '' : itemElement.coapplicant_stdcode;
let landline = itemElement.coapplicant_landline == '' ? '' : itemElement.coapplicant_landline;
concat_landline = std+'-'+landline;
}
}else if(itemElement.coapplicant_stdcode == '' && itemElement.coapplicant_landline == ''){
concat_landline = null;
}else{

View File

@ -26,7 +26,7 @@
<div style="width:100%">
<mat-form-field style="width:35%">
<mat-label>Starting Financial Year</mat-label>
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="staring_financial_year" (keypress)="keyPress($event)">
<input matInput autocomplete="off" placeholder="YYYY eg.2018" formControlName="staring_financial_year" (keypress)="keyPress($event)" [readonly]="isReadOnly">
<mat-error> Invalid year format</mat-error>
</mat-form-field>
<!-- <mat-form-field hintLabel="Max 10 characters">

View File

@ -97,6 +97,7 @@ export class FinancialInfoComponent implements OnInit {
return value.records.estimated_value[key];
});
if (result.length > 0) {
this.customerCommentsFlag = result.length == 1 ? false : true;
result.forEach((val,index) => {
//financial_date.push(this.createDate());
this.FY_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);

View File

@ -17,27 +17,30 @@
<div fxLayout="row wrap">
<div fxFlex="100">
<mat-card *ngIf="manufacturingForm">
<mat-card-header>
<!-- <mat-card-header>
<mat-card-title class="highlight"> Manufacturing Details </mat-card-title>
</mat-card-header>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Manufacturing Details</h5>
<div formArrayName="manufacturing_details">
<div *ngFor="let md of stockForms.controls.manufacturing_details['controls']; let i=index" [formGroupName]="i">
<div formArrayName="manufacturing_raw_materials">
<div *ngFor="let mrm of md.controls.manufacturing_raw_materials['controls']; let a=index" [formGroupName]="a">
<mat-label class="highlight"> <i> <p>{{a+1}} . Raw Material </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Raw Material #{{a+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="raw_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<!-- <mat-select placeholder="is the Stock is Observed ?" formControlName="stock_observed" > -->
<mat-select placeholder="Stock" formControlName="stock_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mrm.get('stock_observed').value == 'no'" >
<span *ngIf="mrm.get('stock_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="raw_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="Unit of Mearsurement"
@ -62,38 +65,43 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mrm.get('is_sufficiant_raw').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
</mat-form-field>
</span>
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials(1)"
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="a==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="a>0">
<mat-icon>delete</mat-icon>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials(1)"
matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="a==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteRawMaterials(a,1)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="a>0">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
<div formArrayName="manufacturing_finished_goods">
<div *ngFor="let mfg of md.controls.manufacturing_finished_goods['controls']; let b=index" [formGroupName]="b">
<mat-label class="highlight"> <i> <p> {{b+1}} Finished Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Finished Goods #{{b+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<!-- <mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" > -->
<mat-select placeholder="Finished Goods" formControlName="goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mfg.get('goods_observed').value == 'no'" >
<span *ngIf="mfg.get('goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,2)" >
@ -113,7 +121,7 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addGoods(1)"
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="b==0">
<mat-icon>add</mat-icon>
@ -122,26 +130,29 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="b>0">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
<div formArrayName="manufacturing_traded_goods">
<div *ngFor="let mtg of md.controls.manufacturing_traded_goods['controls']; let c=index" [formGroupName]="c">
<mat-label class="highlight"> <i> <p>{{c+1}} Traded Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Traded Goods #{{c+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<mat-select placeholder="Traded Goods" formControlName="traded_goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="mtg.get('traded_goods_observed').value == 'no'" >
<span *ngIf="mtg.get('traded_goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)" >
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3)" >
@ -158,11 +169,11 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="mtg.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(1)"
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="c==0">
<mat-icon>add</mat-icon>
@ -171,7 +182,9 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="c>0">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
@ -179,29 +192,31 @@
</mat-card>
<mat-card *ngIf="retailForm">
<mat-card-header>
<mat-card-title><p>Retail Details</p></mat-card-title>
</mat-card-header>
<!-- <mat-card-header>
<mat-card-title class="highlight"><p>Retail Details</p></mat-card-title>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Retail Details</h5>
<div formArrayName="retail_details">
<div *ngFor="let rd of stockForms.controls.retail_details['controls']; let j=index" [formGroupName]="j">
<div formArrayName="retail_finished_goods">
<div *ngFor="let retailfg of rd.controls.retail_finished_goods['controls']; let d=index" [formGroupName]="d">
<mat-label class="highlight"> <i> <p>{{d+1}} Finished Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Finished Goods #{{d+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<mat-select placeholder="Finished Goods" formControlName="goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No stock observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="retailfg.get('goods_observed').value == 'no'" >
<span *ngIf="retailfg.get('goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,4)" >
@ -218,7 +233,7 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="retailfg.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
@ -227,30 +242,33 @@
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="d==0">
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteGoods(d,2)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="d>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</mat-card>
</div>
</div>
<div formArrayName="retail_traded_goods">
<div *ngFor="let item of rd.controls.retail_traded_goods['controls']; let e=index" [formGroupName]="e">
<mat-label class="highlight"> <i> <p>{{e+1}} Traded Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Traded Goods #{{e+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<mat-select placeholder="Traded Goods" formControlName="traded_goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="item.get('traded_goods_observed').value == 'no'" >
<span *ngIf="item.get('traded_goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,5)" >
@ -267,11 +285,11 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="item.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(2)"
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="e==0">
<mat-icon>add</mat-icon>
@ -280,7 +298,9 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="e>0">
<mat-icon>delete</mat-icon>
</button>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
@ -290,28 +310,30 @@
<mat-card *ngIf="tradingForm">
<mat-card-header>
<mat-card-title><p>Trading Details</p></mat-card-title>
</mat-card-header>
<!-- <mat-card-header>
<mat-card-title class="highlight"><p>Trading Details</p></mat-card-title>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Trading Details</h5>
<div formArrayName="trade_details">
<div *ngFor="let td of stockForms.controls.trade_details['controls']; let k=index" [formGroupName]="k">
<div formArrayName="trading_finished_goods">
<div *ngFor="let tradesubdetail of td.controls.trading_finished_goods['controls']; let f=index" [formGroupName]="f">
<mat-label class="highlight"> <i> <p>{{f+1}} Finished Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Finished Goods #{{f+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Goods is Observed ?" formControlName="goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<mat-select placeholder="Finished Goods" formControlName="goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No Stock Observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="tradesubdetail.get('goods_observed').value == 'no'" >
<span *ngIf="tradesubdetail.get('goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" >
@ -328,11 +350,12 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="tradesubdetail.get('is_sufficiant_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the finished goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field>
</span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addGoods(3)"
matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="f==0">
<mat-icon>add</mat-icon>
@ -341,27 +364,30 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="f>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
<div formArrayName="trading_traded_goods">
<div *ngFor="let tradetg of td.controls.trading_traded_goods['controls']; let g=index" [formGroupName]="g">
<mat-label class="highlight"> <i> <p>{{g+1}} Traded Goods </p> </i> </mat-label>
<mat-card style="margin: 12px;">
<mat-label class="highlight"> <i>Traded Goods #{{g+1}} </i> </mat-label>
<mat-card-content class="matcard">
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Name" formControlName="traded_goods_name" >
</mat-form-field>
<mat-form-field style="width:30%">
<mat-select placeholder="is the Traded Goods is Observed ?" formControlName="traded_goods_observed" >
<mat-option value="yes" >Yes</mat-option>
<mat-option value="no" >No</mat-option>
<mat-select placeholder="Traded Goods" formControlName="traded_goods_observed" >
<mat-option value="yes">Add Stock Details</mat-option>
<mat-option value="no">No stock observed</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="tradetg.get('traded_goods_observed').value == 'no'" >
<span *ngIf="tradetg.get('traded_goods_observed').value == 'yes'" >
<mat-form-field style="width:30%">
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" >
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)">
</mat-form-field>
<mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" >
@ -378,21 +404,22 @@
</mat-select>
</mat-form-field>
<mat-form-field *ngIf="tradetg.get('is_sufficiant_traded_goods').value == 'no'" appearance="outline" style="width: 90%">
<mat-label class="highlight"> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<mat-label> <i>Please comment on the Traded Goods stock level observed?</i> </mat-label>
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field>
</span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(3)"
matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="g==0">
<mat-icon>add</mat-icon>
<mat-icon>add</mat-icon>
</button>
<button type="button" mat-raised-button mat-icon-button (click)="deleteTradedGoods(g,3)"
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="g>0">
<mat-icon>delete</mat-icon>
</button>
</mat-card-content>
</div>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
@ -401,9 +428,10 @@
</mat-card>
<mat-card *ngIf="serviceProviderForm">
<mat-card-header>
<!-- <mat-card-header>
<p>Service Provider</p>
</mat-card-header>
</mat-card-header> -->
<h5 class="highlight" style="margin: 12px;">Service Provider</h5>
<div style="text-align: center; margin: 12px;">Service Provider Details Not applicable here !!</div>
</mat-card>