Stock Changes : ps

This commit is contained in:
venbatechnologies@gmail.com 2019-01-03 23:41:38 +05:30
parent 4693b676e6
commit 683777c7e1
4 changed files with 161 additions and 94 deletions

View File

@ -31,7 +31,7 @@
</mat-form-field> </mat-form-field>
<!-- <mat-form-field hintLabel="Max 10 characters"> <!-- <mat-form-field hintLabel="Max 10 characters">
<input matInput #input maxlength="10" placeholder="Enter some input"> <input matInput #input maxlength="10" placeholder="Enter some input">
<mat-hint align="end">{{input.value?.length || 0}}/10</mat-hint> <mat-hint align="start" style="font-size:70%">{{input.value?.length || 0}}/10</mat-hint>
</mat-form-field> --> </mat-form-field> -->
<mat-form-field style="width:35%"> <mat-form-field style="width:35%">
@ -60,7 +60,7 @@
<span *ngIf="i != 0"> <span *ngIf="i != 0">
<mat-form-field style="width:60%"> <mat-form-field style="width:60%">
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="financial_annualsales_variation" (keypress)="keyPress($event)">
<mat-hint align="end" *ngIf="details.get('financial_annualsales_variation').value != '' " > <mat-hint align="start" style="font-size:70%" *ngIf="details.get('financial_annualsales_variation').value != '' " >
<span *ngIf="details.get('financial_annualsales_variation').value == 0"> <span *ngIf="details.get('financial_annualsales_variation').value == 0">
No differents in Sales in FY <i> {{details.get('financial_year').value}} </i> over Sales in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i> No differents in Sales in FY <i> {{details.get('financial_year').value}} </i> over Sales in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
</span> </span>
@ -109,7 +109,7 @@
<span *ngIf="i != 0"> <span *ngIf="i != 0">
<mat-form-field style="width:65%"> <mat-form-field style="width:65%">
<input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)"> <input matInput autocomplete="off" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Profit Variation from Previous Year in %" formControlName="financial_variation" (keypress)="keyPress($event)">
<mat-hint align="end" *ngIf="i != 0 && details.get('financial_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" > <mat-hint align="start" style="font-size:70%" *ngIf="i != 0 && details.get('financial_variation').value != '' " [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >
<span *ngIf="details.get('financial_variation').value == 0"> <span *ngIf="details.get('financial_variation').value == 0">
No differents in Profit in FY <i> {{details.get('financial_year').value}} </i> over Profit in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i> No differents in Profit in FY <i> {{details.get('financial_year').value}} </i> over Profit in FY <i> {{financialForm.controls.date_per_financial['controls'][i-1].get('financial_year').value}} </i>
</span> </span>
@ -121,7 +121,7 @@
</span> </span>
</mat-hint> </mat-hint>
<!-- “Increase in Sales in FY 2017-2018 over sales in FY 2016-2017 is 11.11%” --> <!-- “Increase in Sales in FY 2017-2018 over sales in FY 2016-2017 is 11.11%” -->
<!-- <mat-hint align="end" *ngIf="i != 0" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >{{SalesStatement[i]}}</mat-hint> --> <!-- <mat-hint align="start" style="font-size:70%" *ngIf="i != 0" [ngClass]="{'highlight': (details.controls['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" >{{SalesStatement[i]}}</mat-hint> -->
</mat-form-field> </mat-form-field>
</span> </span>
@ -181,7 +181,7 @@
<span *ngIf="i != 0"> <span *ngIf="i != 0">
<mat-form-field style="width:60%"> <mat-form-field style="width:60%">
<input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="estimate_annualsales_variation" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Sale Variation from Previous Year in %" formControlName="estimate_annualsales_variation" (keypress)="keyPress($event)">
<mat-hint align="end" *ngIf="details.get('estimate_annualsales_variation').value != '' " > <mat-hint align="start" style="font-size:70%" *ngIf="details.get('estimate_annualsales_variation').value != '' " >
<span *ngIf="details.get('estimate_annualsales_variation').value == 0"> <span *ngIf="details.get('estimate_annualsales_variation').value == 0">
No differents in Sales in FY <i> {{details.get('estimate_year').value}} </i> over Sales in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i> No differents in Sales in FY <i> {{details.get('estimate_year').value}} </i> over Sales in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i>
</span> </span>
@ -225,7 +225,7 @@
</div> </div>
<mat-form-field *ngIf="i != 0" style="width:65%"> <mat-form-field *ngIf="i != 0" style="width:65%">
<input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year in %" formControlName="estimate_variation" (keypress)="keyPress($event)"> <input matInput autocomplete="off" [ngClass]="{'highlight': details.controls['estimate_variation'].value >= 40 || details.controls['estimate_variation'].value >= -40}" placeholder="Variation from Previous Year in %" formControlName="estimate_variation" (keypress)="keyPress($event)">
<mat-hint align="end" [ngClass]="{'highlight': (details.controls['estimate_variation'].value >= 40) || (details.controls['estimate_variation'].value < -40)}" > <mat-hint align="start" style="font-size:70%" [ngClass]="{'highlight': (details.controls['estimate_variation'].value >= 40) || (details.controls['estimate_variation'].value < -40)}" >
<span *ngIf="details.get('estimate_variation').value == 0"> <span *ngIf="details.get('estimate_variation').value == 0">
No differents in Profit in FY <i> {{details.get('estimate_year').value}} </i> over Profit in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i> No differents in Profit in FY <i> {{details.get('estimate_year').value}} </i> over Profit in FY <i> {{financialForm.controls.estimated_value['controls'][i-1].get('estimate_year').value}} </i>
</span> </span>

View File

@ -21,7 +21,7 @@
<div fxFlex="33"> <div fxFlex="33">
<mat-form-field style="width: 80%"> <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="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{loanAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
</div> </div>
<div fxFlex="33"> <div fxFlex="33">
@ -66,7 +66,7 @@
<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: 60%"> <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="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{balTxrfAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:30%"> <mat-form-field style="width:30%">
<mat-select placeholder="Is there a Top Up" <mat-select placeholder="Is there a Top Up"
@ -88,7 +88,7 @@
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 60%"> <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="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['topup_amount'].value != ''">{{"&#8377;"}} {{topUpAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 30%"> <mat-form-field *ngIf="loanDetailsForm.controls['is_topup'].value == 'yes' && loanDetailsForm.controls['is_topup'].value != '' " style="width: 30%">
@ -99,7 +99,7 @@
<mat-form-field style="width: 30%"> <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="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['own_contribution'].value != ''">{{"&#8377;"}} {{ownContributionInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width: 30%"> <mat-form-field style="width: 30%">
@ -135,7 +135,7 @@
<mat-form-field style="width: 60%"> <mat-form-field style="width: 60%">
<input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" required autocomplete="off"> <input matInput placeholder="EMI Amount Comfortable Paying" formControlName="emi_level" (keypress)="keyPress($event)" (keyup)="inWords($event,6)" required autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"&#8377;"}} {{emiAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['emi_level'].value != ''">{{"&#8377;"}} {{emiAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> --> <!-- <div *ngIf="productAbbr === 'HL' || productAbbr === 'LL' || productAbbr === 'LAP' "> -->
<mat-card *ngIf="mortageCardAccess"> <mat-card *ngIf="mortageCardAccess">
@ -200,12 +200,12 @@
<mat-form-field> <mat-form-field>
<input matInput placeholder="Estimate Market Value as Per Customer" <input matInput placeholder="Estimate Market Value as Per Customer"
formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" required autocomplete="off"> formControlName="emv_per_customer" (keypress)="keyPress($event)" (keyup)="inWords($event,7)" required autocomplete="off">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}} {{emvAmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['emv_per_customer'].value != ''">{{"&#8377;"}} {{emvAmtInWords}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<!-- <mat-form-field> <!-- <mat-form-field>
<input matInput placeholder="Value as Per Agreement" <input matInput placeholder="Value as Per Agreement"
formControlName="value_per_agreement" (keypress)="keyPress($event)" required (keyup)="inWords($event,3)"> formControlName="value_per_agreement" (keypress)="keyPress($event)" required (keyup)="inWords($event,3)">
<mat-hint align="end" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="loanDetailsForm.controls['loan_amount'].value != ''">{{"&#8377;"}} {{valAsPerAgmtInWords}} Only</mat-hint>
</mat-form-field> --> </mat-form-field> -->
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>

View File

@ -52,11 +52,12 @@
<input matInput autocomplete="off" placeholder="Specify Other UOM" formControlName="other_uom" > <input matInput autocomplete="off" placeholder="Specify Other UOM" formControlName="other_uom" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event,1)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="raw_value" (keypress)="keyPress($event)" (keyup)="inWords($event,1,a)" >
<mat-hint align="end" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('raw_value').value != ''">{{"&#8377;"}} {{M_rawValueInWords[a]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of raw materials as per latest financial Statements" formControlName="rawmaterial_value" (keypress)="keyPress($event)" (keyup)="inWords($event,8,a)">
<mat-hint align="start" style="font-size:70%" *ngIf="mrm.get('rawmaterial_value').value != ''">{{"&#8377;"}} {{M_financialRawValueInWords[a]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw" > <mat-select placeholder="Is the stock of Raw Materials observed, sufficient considering the size of operations" formControlName="is_sufficiant_raw" >
@ -69,7 +70,6 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the stock level observed" formControlName="rawmaterial_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials(1)" <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"> matTooltip="Add More Raw Materials" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="a==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
@ -78,7 +78,6 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="a>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="a>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
@ -104,11 +103,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,2,b)" >
<mat-hint align="end" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('goods_value').value != ''">{{"&#8377;"}} {{M_goodsValueInWords[b]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,9,b)">
<mat-hint align="start" style="font-size:70%" *ngIf="mfg.get('finished_goods_value').value != ''">{{"&#8377;"}} {{M_financialGoodsValueInWords[b]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > <mat-select placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" >
@ -121,7 +121,7 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the finished goods observed" formControlName="finishedgoods_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addGoods(1)" <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"> matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="b==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
@ -130,7 +130,7 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="b>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="b>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
@ -155,11 +155,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)" >
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,3,c)" >
<mat-hint align="end" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{M_tradedGoodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="mtg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{M_tradedGoodsValueInWords[c]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,10,c)">
<mat-hint align="start" style="font-size:70%" *ngIf="mtg.get('traded_goods_value').value != ''">{{"&#8377;"}} {{M_financialTradedGoodsValueInWords[c]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > --> <!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > -->
@ -173,7 +174,7 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(1)" <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"> matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="c==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
@ -182,7 +183,7 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="c>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="c>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>
@ -219,11 +220,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,4,d)" >
<mat-hint align="end" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{R_goodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="retailfg.get('goods_value').value != ''">{{"&#8377;"}} {{R_goodsValueInWords[d]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,11,d)">
<mat-hint align="start" style="font-size:70%" *ngIf="retailfg.get('finished_goods_value').value != ''">{{"&#8377;"}} {{R_financialGoodsValueInWords[d]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
@ -271,11 +273,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,5,e)" >
<mat-hint align="end" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="item.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{R_tradedGoodsValueInWords[e]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,12,e)">
<mat-hint align="start" style="font-size:70%" *ngIf="item.get('traded_goods_value').value != ''">{{"&#8377;"}} {{R_financialTradedGoodsValueInWords[e]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
@ -289,7 +292,7 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(2)" <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"> matTooltip="Add More Traded Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="e==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
@ -298,7 +301,7 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="e>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="e>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
@ -336,11 +339,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="goods_quantity" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,6,f)" >
<mat-hint align="end" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{T_goodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="tradesubdetail.get('goods_value').value != ''">{{"&#8377;"}} {{T_goodsValueInWords[f]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of finished goods as per latest financial statements" formControlName="finished_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,13,f)">
<mat-hint align="start" style="font-size:70%" *ngIf="tradesubdetail.get('finished_goods_value').value != ''">{{"&#8377;"}} {{T_financialGoodsValueInWords[f]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
@ -355,7 +359,7 @@
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addGoods(3)" <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"> matTooltip="Add More Finished Goods" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" color="primary" *ngIf="f==0">
<mat-icon>add</mat-icon> <mat-icon>add</mat-icon>
@ -364,7 +368,7 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="f>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="f>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
@ -390,11 +394,12 @@
<input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)"> <input matInput autocomplete="off" placeholder="Estimated Quantity" formControlName="traded_goods_quantity" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <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)" > <input matInput autocomplete="off" placeholder="Estimated Value of Stock Observed" formControlName="estimated_traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,7,g)">
<mat-hint align="end" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords}} Only</mat-hint> <mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('estimated_traded_goods_value').value != ''">{{"&#8377;"}} {{T_tradedGoodsValueInWords[g]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" > <input matInput autocomplete="off" placeholder="Value of traded goods as per latest financial statements" formControlName="traded_goods_value" (keypress)="keyPress($event)" (keyup)="inWords($event,14,g)">
<mat-hint align="start" style="font-size:70%" *ngIf="tradetg.get('traded_goods_value').value != ''">{{"&#8377;"}} {{T_financialTradedGoodsValueInWords[g]}} Only</mat-hint>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:90%"> <mat-form-field style="width:90%">
<!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > --> <!-- <input matInput autocomplete="off" placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" > -->
@ -408,7 +413,7 @@
<textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea> <textarea matInput autocomplete="off" placeholder="Please comment on the traded goods stock level observed" formControlName="traded_goods_remarks"></textarea>
</mat-form-field> </mat-form-field>
</span> </span>
<div align="end">
<button type="button" mat-raised-button mat-icon-button (click)="addTradedGoods(3)" <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"> 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>
@ -417,7 +422,7 @@
matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="g>0"> matTooltip="Delete" matTooltipPosition="above" class="mr-1 mb-1 hover-icon" *ngIf="g>0">
<mat-icon>delete</mat-icon> <mat-icon>delete</mat-icon>
</button> </button>
</div>
</mat-card-content> </mat-card-content>
</mat-card> </mat-card>
</div> </div>

View File

@ -28,15 +28,24 @@ export class StockComponent implements OnInit {
rawmaterial : any; rawmaterial : any;
M_rawValueInWords : any; M_rawValueInWords : any = [];
M_financialRawValueInWords : any = [];
M_goodsValueInWords : any;
R_goodsValueInWords : any;
T_goodsValueInWords : any;
M_tradedGoodsValueInWords : any; M_goodsValueInWords : any = [];
R_tradedGoodsValueInWords : any; R_goodsValueInWords : any = [];
T_tradedGoodsValueInWords : any; T_goodsValueInWords : any = [];
M_financialGoodsValueInWords : any = [];
R_financialGoodsValueInWords : any = [];
T_financialGoodsValueInWords : any = [];
M_tradedGoodsValueInWords : any = [];
R_tradedGoodsValueInWords : any = [];
T_tradedGoodsValueInWords : any = [];
M_financialTradedGoodsValueInWords : any = [];
R_financialTradedGoodsValueInWords : any = [];
T_financialTradedGoodsValueInWords : any = [];
rawMaterialAccess: boolean; rawMaterialAccess: boolean;
finishedGoodsAccess: boolean; finishedGoodsAccess: boolean;
@ -44,6 +53,7 @@ export class StockComponent implements OnInit {
public submitted = false; public submitted = false;
noRecordsFound: Boolean = false; noRecordsFound: Boolean = false;
serviceProviderForm: Boolean = false; serviceProviderForm: Boolean = false;
suppliers_raw_materials : any = [];
constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute, constructor(notifier: NotifierService, private fb: FormBuilder, private route: ActivatedRoute,
private router: Router, private router: Router,
@ -113,12 +123,9 @@ export class StockComponent implements OnInit {
let params: any = {}; let params: any = {};
params.pd_id = this.pdid; params.pd_id = this.pdid;
params.pd_form_id = this.form_id; params.pd_form_id = this.form_id;
this._pd.retriveForm(params).subscribe(value => { this._pd.retriveForm(params).subscribe(value => {
if (value.status == 200) { if (value.status == 200) {
let dataForm = value.records; let dataForm = value.records;
if(dataForm !== undefined) { if(dataForm !== undefined) {
console.log(dataForm); console.log(dataForm);
this.stockForms = this.fb.group({ this.stockForms = this.fb.group({
@ -133,6 +140,24 @@ export class StockComponent implements OnInit {
let arr = record.filter(data => data.type_of_activity_id == 1); let arr = record.filter(data => data.type_of_activity_id == 1);
console.log(133,arr.length); console.log(133,arr.length);
if(arr.length > 0) { if(arr.length > 0) {
this._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
console.log('136',value);
if(value.status == 200){
this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
let manufacturing_temparr = [];
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
manufacturing_temparr['manufacturing_traded_goods'] = dataForm.manufacturing_details[0].manufacturing_traded_goods;
this.initManufacturingDetails(manufacturing_temparr);
}
else{
let manufacturing_temparr = [];
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
manufacturing_temparr['manufacturing_traded_goods'] = dataForm.manufacturing_details[0].manufacturing_traded_goods;
this.initManufacturingDetails(manufacturing_temparr);
}
});
// console.log(1,dataForm); // console.log(1,dataForm);
// console.log(164,dataForm.manufacturing_details); // console.log(164,dataForm.manufacturing_details);
// console.log(2,dataForm.retail_details); // console.log(2,dataForm.retail_details);
@ -169,14 +194,7 @@ export class StockComponent implements OnInit {
// console.log(163,dataForm.manufacturing_details.manufacturing_raw_materials); // console.log(163,dataForm.manufacturing_details.manufacturing_raw_materials);
// console.log(164,dataForm.manufacturing_details[0]); // console.log(164,dataForm.manufacturing_details[0]);
// console.log(164,dataForm.manufacturing_details[0].manufacturing_raw_materials); // console.log(164,dataForm.manufacturing_details[0].manufacturing_raw_materials);
let manufacturing_temparr = [];
manufacturing_temparr['manufacturing_raw_materials'] = dataForm.manufacturing_details[0].manufacturing_raw_materials;
manufacturing_temparr['manufacturing_finished_goods'] = dataForm.manufacturing_details[0].manufacturing_finished_goods;
manufacturing_temparr['manufacturing_traded_goods'] = dataForm.manufacturing_details[0].manufacturing_traded_goods;
this.initManufacturingDetails(manufacturing_temparr);
//this.initManufacturingDetails(dataForm); //this.initManufacturingDetails(dataForm);
} }
@ -264,7 +282,16 @@ export class StockComponent implements OnInit {
}); });
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._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
if(value.status == 200){
this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
this.initManufacturingDetails(null);
}
else{
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) {
@ -292,7 +319,16 @@ export class StockComponent implements OnInit {
}); });
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._pd.retriveForm({pd_id:this.pdid,pd_form_id:1}).subscribe(value => {
if(value.status == 200){
this.suppliers_raw_materials = value.records.manufacturing_details[0].main_raw_materials;
this.initManufacturingDetails(null);
}
else{
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) {
@ -378,14 +414,27 @@ tradingFormCreation(val) {
const rawMaterial = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials']; const rawMaterial = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_raw_materials'];
const finishedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods']; const finishedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_finished_goods'];
const tradedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods']; const tradedGoods = <FormArray>this.stockForms.controls['manufacturing_details']['controls'][0].controls['manufacturing_traded_goods'];
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'); if(this.suppliers_raw_materials.length > 0){
for (let val of this.suppliers_raw_materials) {
let Ref_RawMaterials : any = {'raw_name': val.manufacturing_raw_material_name,
'stock_observed':'',
'raw_quantity': '',
'raw_uom': '',
'other_uom': '',
'raw_value': '',
'rawmaterial_value': '',
'is_sufficiant_raw': '',
'rawmaterial_remarks':''};
rawMaterial.push(this.createRawmaterial(Ref_RawMaterials));
}
}
else{
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')
// console.log(377,datas); // console.log(377,datas);
@ -395,6 +444,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.raw_value){ if(val.raw_value){
this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value); this.M_rawValueInWords = this._pd.convertNumberToWords(val.raw_value);
this.M_financialRawValueInWords = this._pd.convertNumberToWords(val.rawmaterial_value);
} }
rawMaterial.push(this.createRawmaterial(val)); rawMaterial.push(this.createRawmaterial(val));
} }
@ -407,6 +457,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.goods_value){ if(val.goods_value){
this.M_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); this.M_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
this.M_financialGoodsValueInWords = this._pd.convertNumberToWords(val.finished_goods_value);
} }
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
@ -420,6 +471,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.estimated_traded_goods_value){ if(val.estimated_traded_goods_value){
this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
this.M_financialTradedGoodsValueInWords = this._pd.convertNumberToWords(val.traded_goods_value);
} }
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
@ -432,21 +484,6 @@ tradingFormCreation(val) {
} }
} }
createRawmaterial2() {
return this.fb.group({
raw_name: ['', Validators.compose([Validators.required])],
stock_observed:['', Validators.compose([Validators.required])],
raw_quantity: [''],
raw_uom: [''],
other_uom : [''],
raw_value: [''],
rawmaterial_value: [''],
is_sufficiant_raw: [''],
rawmaterial_remarks:['']
});
}
createRawmaterial(records) { createRawmaterial(records) {
// console.log(330,'function in'); // console.log(330,'function in');
if(records === null) { if(records === null) {
@ -497,6 +534,7 @@ tradingFormCreation(val) {
if(val.goods_value){ if(val.goods_value){
this.R_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); this.R_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
this.R_financialGoodsValueInWords =this._pd.convertNumberToWords(val.finished_goods_value);
} }
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
@ -512,6 +550,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.estimated_traded_goods_value){ if(val.estimated_traded_goods_value){
this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
this.R_financialTradedGoodsValueInWords =this._pd.convertNumberToWords(val.traded_goods_value);
} }
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
@ -596,6 +635,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.goods_value){ if(val.goods_value){
this.T_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value); this.T_goodsValueInWords = this._pd.convertNumberToWords(val.goods_value);
this.T_financialGoodsValueInWords = this._pd.convertNumberToWords(val.finished_goods_value);
} }
finishedGoods.push(this.createGoods(val)); finishedGoods.push(this.createGoods(val));
@ -610,6 +650,7 @@ tradingFormCreation(val) {
// console.log(val); // console.log(val);
if(val.estimated_traded_goods_value){ if(val.estimated_traded_goods_value){
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value); this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(val.estimated_traded_goods_value);
this.T_financialTradedGoodsValueInWords =this._pd.convertNumberToWords(val.traded_goods_value);
} }
tradedGoods.push(this.createTradedGoods(val)); tradedGoods.push(this.createTradedGoods(val));
} }
@ -833,29 +874,50 @@ tradingFormCreation(val) {
} }
/** To Convert Amount into Words */ /** To Convert Amount into Words */
inWords(e,flag:number){ inWords(e,flag:number,i){
switch(flag){ switch(flag){
case 1 : case 1 :
this.M_rawValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_rawValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 2 : case 2 :
this.M_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_goodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 3 : case 3 :
this.M_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.M_tradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 4 : case 4 :
this.R_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.R_goodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 5 : case 5 :
this.R_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.R_tradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 6 : case 6 :
this.T_goodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.T_goodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
case 7 : case 7 :
this.T_tradedGoodsValueInWords = this._pd.convertNumberToWords(e.target.value); this.T_tradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 8 :
this.M_financialRawValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 9 :
this.M_financialGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 10 :
this.M_financialTradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 11 :
this.R_financialGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 12 :
this.R_financialTradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 13 :
this.T_financialGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break;
case 14 :
this.T_financialTradedGoodsValueInWords[i] = this._pd.convertNumberToWords(e.target.value);
break; break;
default: default:
break; break;