Stock and asset forms

This commit is contained in:
saravanakumarkandasami 2018-11-28 18:36:57 +05:30
parent acc91fc8f4
commit 2a7206a530
3 changed files with 37 additions and 37 deletions

View File

@ -26,7 +26,7 @@
<div [formGroupName]="s"> <div [formGroupName]="s">
<div> <div>
<mat-form-field style="width:100%"> <mat-form-field style="width:100%">
<mat-select placeholder="Property" formControlName="property_type" required> <mat-select placeholder="Property Type" formControlName="property_type" required>
<mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option> <mat-option *ngFor="let prop of m_propertyType" [value]="prop.id">{{ prop.name }}</mat-option>
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
@ -97,13 +97,13 @@
<div *ngFor="let detail of sup['controls'].details['controls']; let s = index"> <div *ngFor="let detail of sup['controls'].details['controls']; let s = index">
<div [formGroupName]="s"> <div [formGroupName]="s">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33"> <!---- <div fxFlex="33">
<mat-form-field> <mat-form-field>
<mat-select placeholder="Type" formControlName="insurance_type" required> <mat-select placeholder="Type" formControlName="insurance_type" required>
<mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option> <mat-option *ngFor="let ins_type of m_insuranceType" [value]="ins_type.id">{{ ins_type.name }}</mat-option>
</mat-select> </mat-select>
</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="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)"> <input matInput placeholder="Premium Paid" formControlName="premium_paid" required (keypress)="keyPress($event)">
@ -116,13 +116,13 @@
</mat-select> </mat-select>
</mat-form-field> </mat-form-field>
</div> </div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<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="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)"> <input matInput placeholder="Sum Assured" formControlName="sum_assured" required (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
</div> </div>
</div>
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<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="Members Covered" formControlName="members_coverd" required> <input matInput placeholder="Members Covered" formControlName="members_coverd" required>
@ -194,7 +194,7 @@
</div> </div>
</div> </div>
</div> </div>
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5"> <!---- <div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 5">
<label>Year and Month of Purchase?</label> <label>Year and Month of Purchase?</label>
<div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row" fxLayoutGap="2px" fxLayoutAlign="start none">
<mat-form-field> <mat-form-field>
@ -204,12 +204,12 @@
<input matInput type="number" placeholder="Month" formControlName="purchase_month"> <input matInput type="number" placeholder="Month" formControlName="purchase_month">
</mat-form-field> </mat-form-field>
</div> </div>
</div> </div>-->
<div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5"> <div *ngIf="sup.get('assets_mode').value == 1 || sup.get('assets_mode').value == 2 || sup.get('assets_mode').value == 3 || sup.get('assets_mode').value == 4 || sup.get('assets_mode').value == 5">
<div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none"> <div fxLayout="row wrap" fxLayoutGap="2px" fxLayoutAlign="start none">
<div fxFlex="33"> <div fxFlex="33">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<mat-select placeholder="Is there a loan?" formControlName="emi"> <mat-select placeholder="Is there a loan existing against this asset?" formControlName="emi">
<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>
@ -217,7 +217,7 @@
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">
<mat-form-field class="ml-xs example-full-width"> <mat-form-field class="ml-xs example-full-width">
<input matInput placeholder="EMI Paid" formControlName="emi_paid" (keypress)="keyPress($event)"> <input matInput placeholder="Amount of EMI on this loan?" formControlName="emi_paid" (keypress)="keyPress($event)">
</mat-form-field> </mat-form-field>
</div> </div>
<div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33"> <div *ngIf="sup.get('emi').value === 'yes'" fxFlex="33">

View File

@ -90,7 +90,7 @@ public m_propertyType = [];
// } // }
// ]; // ];
public m_insuranceType = []; //public m_insuranceType = [];
// public m_insuranceType = [{ // public m_insuranceType = [{
// 'id': "1", // 'id': "1",
@ -175,7 +175,7 @@ public m_investmentType = [];
this.getM_PropertyType(); this.getM_PropertyType();
this.getM_InvestmentType(); this.getM_InvestmentType();
this.getM_FreqOfPurchase(); this.getM_FreqOfPurchase();
this.getM_InsuranceType(); //this.getM_InsuranceType();
} }
// ====================== // ======================
@ -228,17 +228,17 @@ public m_investmentType = [];
) )
} }
getM_InsuranceType() { // getM_InsuranceType() {
this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe( // this.pdTrigerService.getAllMasterDatas('INSURANCETYPE').subscribe(
data => { // data => {
this.m_insuranceType = data.records.filter(data => data.isactive == 1); // this.m_insuranceType = data.records.filter(data => data.isactive == 1);
}, // },
error => { // error => {
this.notifier.notify('warning', 'No Category Records Found.!'); // this.notifier.notify('warning', 'No Category Records Found.!');
// this.m_assets_type = "No Category Records Found."; // this.m_assets_type = "No Category Records Found.";
} // }
) // )
} //}
// ============================= // =============================
@ -299,8 +299,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]), details: this._formBuilder.array([]),
approximate_market_value: ['', Validators.compose([])], approximate_market_value: ['', Validators.compose([])],
name_of_the_owner: ['', Validators.compose([])], name_of_the_owner: ['', Validators.compose([])],
purchase_year: ['', Validators.compose([])], // purchase_year: ['', Validators.compose([])],
purchase_month: ['', Validators.compose([])], //purchase_month: ['', Validators.compose([])],
emi: [''], emi: [''],
emi_paid: [''], emi_paid: [''],
elapsed_tenure: [''], elapsed_tenure: [''],
@ -389,7 +389,7 @@ public m_investmentType = [];
loadInsuranceDescription() { loadInsuranceDescription() {
return this._formBuilder.group({ return this._formBuilder.group({
insurance_type: ['', Validators.compose([Validators.required])], //insurance_type: ['', Validators.compose([Validators.required])],
premium_paid: ['', Validators.compose([Validators.required])], premium_paid: ['', Validators.compose([Validators.required])],
frequency_mode: ['', Validators.compose([Validators.required])], frequency_mode: ['', Validators.compose([Validators.required])],
sum_assured: ['', Validators.compose([Validators.required])], sum_assured: ['', Validators.compose([Validators.required])],
@ -439,13 +439,13 @@ public m_investmentType = [];
otherAssetsDescriptionWithData(data) { otherAssetsDescriptionWithData(data) {
return this._formBuilder.group({ return this._formBuilder.group({
any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])] any_other_assets: [data.any_other_assets, Validators.compose([Validators.required])],
}); });
} }
loadInsuranceDescriptionWithData(data) { loadInsuranceDescriptionWithData(data) {
return this._formBuilder.group({ return this._formBuilder.group({
insurance_type: [data.insurance_type, Validators.compose([Validators.required])], //insurance_type: [data.insurance_type, Validators.compose([Validators.required])],
premium_paid: [data.premium_paid, Validators.compose([Validators.required])], premium_paid: [data.premium_paid, Validators.compose([Validators.required])],
frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])], frequency_mode: [data.frequency_mode, Validators.compose([Validators.required])],
sum_assured: [data.sum_assured, Validators.compose([Validators.required])], sum_assured: [data.sum_assured, Validators.compose([Validators.required])],
@ -481,8 +481,8 @@ public m_investmentType = [];
details: this._formBuilder.array([]), details: this._formBuilder.array([]),
approximate_market_value: [data.approximate_market_value, Validators.compose([])], approximate_market_value: [data.approximate_market_value, Validators.compose([])],
name_of_the_owner: [data.name_of_the_owner, Validators.compose([])], name_of_the_owner: [data.name_of_the_owner, Validators.compose([])],
purchase_year: [data.purchase_year, Validators.compose([])], // purchase_year: [data.purchase_year, Validators.compose([])],
purchase_month: [data.purchase_month, Validators.compose([])], // purchase_month: [data.purchase_month, Validators.compose([])],
emi: [data.emi || 0], emi: [data.emi || 0],
emi_paid: [data.emi_paid || ''], emi_paid: [data.emi_paid || ''],
elapsed_tenure: [data.elapsed_tenure || ''], elapsed_tenure: [data.elapsed_tenure || ''],
@ -500,8 +500,8 @@ public m_investmentType = [];
assets_mode: val.assets_mode, assets_mode: val.assets_mode,
approximate_market_value: val.approximate_market_value, approximate_market_value: val.approximate_market_value,
name_of_the_owner: val.name_of_the_owner, name_of_the_owner: val.name_of_the_owner,
purchase_year: val.purchase_year, // purchase_year: val.purchase_year,
purchase_month: val.purchase_month, // purchase_month: val.purchase_month,
emi: val.emi, emi: val.emi,
emi_paid: val.emi_paid, emi_paid: val.emi_paid,
elapsed_tenure: val.elapsed_tenure, elapsed_tenure: val.elapsed_tenure,

View File

@ -14,16 +14,16 @@
<input matInput placeholder="Name" formControlName="raw_name" required> <input matInput placeholder="Name" formControlName="raw_name" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Quantity" formControlName="raw_quantity" required> <input matInput placeholder="Estimated Quantity" formControlName="raw_quantity" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value" formControlName="raw_value" (keypress)="keyPress($event)" required>
</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 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>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of raw materials sufficient ?" formControlName="is_sufficiant_raw" required> <input matInput placeholder="Is the stock of raw materials observed ?" formControlName="is_sufficiant_raw" required>
</mat-form-field> </mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()" <button type="button" mat-raised-button mat-icon-button (click)="addRawMaterials()"
@ -50,16 +50,16 @@
<input matInput placeholder="Name" formControlName="goods_name" required> <input matInput placeholder="Name" formControlName="goods_name" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Quantity" formControlName="goods_quantity" required> <input matInput placeholder="Estimated Quantity" formControlName="goods_quantity" required>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required> <input matInput placeholder="Value" formControlName="goods_value" (keypress)="keyPress($event)" required>
</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 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>
</mat-form-field> </mat-form-field>
<mat-form-field style="width:76%"> <mat-form-field style="width:76%">
<input matInput placeholder="Is the stock of finished goods sufficient ?" formControlName="is_sufficiant_goods" required> <input matInput placeholder="Is the stock of finished goods observed ?" formControlName="is_sufficiant_goods" required>
</mat-form-field> </mat-form-field>
<button type="button" mat-raised-button mat-icon-button (click)="addGoods()" <button type="button" mat-raised-button mat-icon-button (click)="addGoods()"
@ -77,7 +77,7 @@
<div fxLayout="row"> <div fxLayout="row">
<div fxFlex="60" class="pb-0 text-sm-left"> <div fxFlex="60" class="pb-0 text-sm-left">
<mat-form-field appearance="outline" style="width: 100%"> <mat-form-field appearance="outline" style="width: 100%">
<mat-label>Remarks</mat-label> <mat-label>Please comment on the stock level observed?</mat-label>
<textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea> <textarea matInput placeholder="Remarks" formControlName="stock_remarks"></textarea>
</mat-form-field> </mat-form-field>
</div> </div>