financial form changes ,filter rename to search
This commit is contained in:
parent
8579475b29
commit
ac9ab5e657
@ -4,7 +4,7 @@ import {
|
||||
Inject,
|
||||
Input
|
||||
} from '@angular/core';
|
||||
|
||||
|
||||
import {
|
||||
FormBuilder,
|
||||
FormGroup,
|
||||
@ -231,7 +231,8 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
if (value.status == 200) {
|
||||
let retriveData = value.records;
|
||||
|
||||
console.log(retriveData);
|
||||
console.log('test');
|
||||
let avData = this.av.map(item => ({ name: item.name, id: item.id }))
|
||||
let exist_av_data: any = [];
|
||||
|
||||
@ -328,12 +329,60 @@ export class FinancialInfoComponent implements OnInit {
|
||||
// this.FY_annualSalesInwords[index] = this._pd.convertNumberToWords(val.financial_annual_sale);
|
||||
// this.FY_netProfitAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_profit);
|
||||
// this.FY_netLossAmtInwords[index] = this._pd.convertNumberToWords(val.financial_net_loss);
|
||||
financial_date.push(this.createDate(''));
|
||||
});
|
||||
//financial_date.push(this.createDate(retriveData.financial_no_of_year));
|
||||
if(retriveData.financial_no_of_year != null && retriveData.financial_no_of_year != ''){
|
||||
|
||||
if(retriveData.financial_no_of_year == 1){
|
||||
this.customerCommentsFlag = false;
|
||||
}
|
||||
else{
|
||||
this.customerCommentsFlag = true;
|
||||
}
|
||||
|
||||
let startingYear = retriveData.financial_starting_year;
|
||||
|
||||
const control = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
|
||||
if(retriveData.financial_no_of_year > 0 ){
|
||||
for(let i = 1 ; i<= retriveData.financial_no_of_year ; i++ ){
|
||||
let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
|
||||
control.push(this.createDate(Year));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
retriveData.date_per_financial = result;
|
||||
} else {
|
||||
//financial_date.push(this.createDate());
|
||||
financial_date.push(this.createDate(''));
|
||||
//financial_date.push(this.createDate(retriveData.financial_no_of_year));
|
||||
if(retriveData.financial_no_of_year != null && retriveData.financial_no_of_year != ''){
|
||||
|
||||
if(retriveData.financial_no_of_year == 1){
|
||||
this.customerCommentsFlag = false;
|
||||
}
|
||||
else{
|
||||
this.customerCommentsFlag = true;
|
||||
}
|
||||
|
||||
let startingYear = retriveData.financial_starting_year;
|
||||
|
||||
const control = <FormArray>this.financialForm.controls['date_per_financial'];
|
||||
|
||||
while (control.length !== 0) {
|
||||
control.removeAt(0);
|
||||
}
|
||||
|
||||
if(retriveData.financial_no_of_year > 0 ){
|
||||
for(let i = 1 ; i<= retriveData.financial_no_of_year ; i++ ){
|
||||
let Year = (+startingYear+(i-1)) +'-'+ ((+startingYear)+(+i));
|
||||
control.push(this.createDate(Year));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -490,6 +539,7 @@ export class FinancialInfoComponent implements OnInit {
|
||||
|
||||
/** CREATING financial Statement ( financial_year AutoGenerate ) */
|
||||
createDate(date) {
|
||||
// alert(date);
|
||||
return this.fb.group({
|
||||
financial_year: [date],
|
||||
financial_annual_sale: ['', Validators.compose([Validators.pattern(/^[0-9\(\)]+$/)])],
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div fxLayout="row">
|
||||
<div fxFlex="50" class="pb-0 text-sm-left">
|
||||
<mat-form-field dividerColor="primary" style="width: 50%;">
|
||||
<input matInput [(ngModel)]="filterValue" placeholder="Filter">
|
||||
<input matInput [(ngModel)]="filterValue" placeholder="Search">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user