Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
0f57f5c359
@ -97,27 +97,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div fxLayout="row wrap">
|
<div fxLayout="row wrap">
|
||||||
<div fxFlex="33">
|
<div fxFlex="33">
|
||||||
<mat-form-field style="width: 80%;">
|
<mat-form-field style="width: 80%;">
|
||||||
<mat-select placeholder="Is there any business activity is being run?"
|
<mat-select placeholder="Is there any business activity is being run?"
|
||||||
formControlName="bussiness_activity" required>
|
formControlName="bussiness_activity" 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 *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 60%">
|
</div>
|
||||||
|
<div fxLayout="row wrap" *ngIf="addressForm.controls['bussiness_activity'].value == 'yes'" style="width: 100%">
|
||||||
|
<div fxFlex="100">
|
||||||
<label>How long has business been operated from this premise?</label>
|
<label>How long has business been operated from this premise?</label>
|
||||||
<mat-form-field style="width: 40%">
|
<mat-form-field>
|
||||||
<input matInput placeholder="Year(s)" formControlName="business_years" min='0'>
|
<input matInput placeholder="Year(s)" formControlName="business_years">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field style="width: 40%">
|
<mat-form-field>
|
||||||
<input matInput placeholder="Month(s)" formControlName="business_month" min='0' max='12'>
|
<input matInput placeholder="Month(s)" formControlName="business_month" (change)="ConvertMonthintoYear($event.target.value)">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</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"
|
||||||
|
|||||||
@ -610,5 +610,18 @@ export class AddressComponent implements OnInit {
|
|||||||
this.validateAllFormFields(control);
|
this.validateAllFormFields(control);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
ConvertMonthintoYear(e){
|
||||||
|
|
||||||
|
let business_year = this.addressForm.controls.business_years.value;
|
||||||
|
|
||||||
|
let converted_month : number = e%12;
|
||||||
|
let converted_year : number = e/12;
|
||||||
|
|
||||||
|
this.addressForm.controls.business_years.setValue(+business_year + +Math.floor(converted_year));
|
||||||
|
this.addressForm.controls.business_month.setValue(Math.floor(converted_month));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,6 +24,7 @@
|
|||||||
</mat-card-header>
|
</mat-card-header>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input matInput autocomplete="off" placeholder="Starting Year Of Financial" formControlName="staring_financial_year" >
|
<input matInput autocomplete="off" placeholder="Starting Year Of Financial" formControlName="staring_financial_year" >
|
||||||
|
<mat-error> Please provide Correct Year Format. Format Should Be (YYYY)</mat-error>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
@ -69,6 +70,14 @@
|
|||||||
<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['financial_variation'].value > 40) || (details.controls['financial_variation'].value < -40)}" placeholder="Variation from Previous Year" 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="Variation from Previous Year" formControlName="financial_variation" (keypress)="keyPress($event)">
|
||||||
<!-- <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="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">
|
||||||
|
|
||||||
|
{{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY Over Sales in FY is % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||||
|
<!-- {{details.get('variation').value <= 0 ? 'Decreases ' : 'Increases '}} in Sales in FY {{details.get('financial_year').value}} Over Sales in FY' {{details.get('financial_year').value}} 'is' {{details.get('variation').value}} % <!-- variation <= 0 ? ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||||
|
</mat-hint>
|
||||||
|
|
||||||
|
<!-- this.SalesStatement[index] = ( variation <= 0 ? 'Decreases ' : 'Increases ' ) + 'in Sales in FY ' + curr_year + ' Over Sales in FY '+ prev_year + ' is ' + variation.toFixed(2) + '%'; -->
|
||||||
|
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field *ngIf="customerCommentsFlag" style="width:65%">
|
<mat-form-field *ngIf="customerCommentsFlag" style="width:65%">
|
||||||
|
|||||||
@ -120,7 +120,7 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
formid: this.form_id,
|
formid: this.form_id,
|
||||||
fk_createdby: this.pdid,
|
fk_createdby: this.pdid,
|
||||||
financial_remarks: [''],
|
financial_remarks: [''],
|
||||||
staring_financial_year : [''],
|
staring_financial_year : ['',Validators.compose([Validators.minLength(4),Validators.maxLength(4)])],
|
||||||
total_financial_year : [''],
|
total_financial_year : [''],
|
||||||
same_as_financial_statements:[''],
|
same_as_financial_statements:[''],
|
||||||
date_per_financial: this.fb.array([]),
|
date_per_financial: this.fb.array([]),
|
||||||
@ -129,9 +129,9 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
// createDate() {
|
// createDate() {
|
||||||
// return this.fb.group({
|
// return this.fb.group({
|
||||||
// financial_year: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
// financial_year: ['', Validators.compose([ Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
||||||
// financial_annual_sale: ['', Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
|
// financial_annual_sale: ['', Validators.compose([ Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||||
// financial_net_profit: ['', Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
// financial_net_profit: ['', Validators.compose([ Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
// financial_margin: [''],
|
// financial_margin: [''],
|
||||||
// financial_variation: [''],
|
// financial_variation: [''],
|
||||||
// financial_reason: [''],
|
// financial_reason: [''],
|
||||||
@ -167,11 +167,11 @@ export class FinancialInfoComponent implements OnInit {
|
|||||||
|
|
||||||
createValuewithData(value) {
|
createValuewithData(value) {
|
||||||
return this.fb.group({
|
return this.fb.group({
|
||||||
estimate_year: [value.estimate_year, Validators.compose([Validators.required, Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
estimate_year: [value.estimate_year, Validators.compose([ Validators.pattern(/^[0-9]{4}-[0-9]{2}$/)])],
|
||||||
estimate_annual_sale: [value.estimate_annual_sale, Validators.compose([Validators.required, Validators.pattern(/^[0-9\(\)]+$/)])],
|
estimate_annual_sale: [value.estimate_annual_sale, Validators.compose([ Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||||
estimate_profit_or_loss:[value.estimate_profit_or_loss],
|
estimate_profit_or_loss:[value.estimate_profit_or_loss],
|
||||||
estimate_net_loss: [value.estimate_net_loss, Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
estimate_net_loss: [value.estimate_net_loss, Validators.compose([Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
estimate_net_profit: [value.estimate_net_profit, Validators.compose([Validators.required, Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
estimate_net_profit: [value.estimate_net_profit, Validators.compose([ Validators.pattern(/^-?[1-9]\d*|0$/)])],
|
||||||
//estimate_margin: [value.],
|
//estimate_margin: [value.],
|
||||||
estimate_margin_of_profit: [value.estimate_margin_of_profit],
|
estimate_margin_of_profit: [value.estimate_margin_of_profit],
|
||||||
estimate_margin_of_loss: [value.estimate_margin_of_loss],
|
estimate_margin_of_loss: [value.estimate_margin_of_loss],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user