Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
b082fe19
Commit
b082fe19
authored
Jan 09, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zz
parent
f54623bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
30 deletions
+37
-30
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+37
-30
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
b082fe19
...
@@ -182,15 +182,15 @@ export default class BalanceSheetMR extends Component {
...
@@ -182,15 +182,15 @@ export default class BalanceSheetMR extends Component {
const
handlePushChild
=
(
item
)
=>
{
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
balance_sheet
.
mtd_vs_previous_month
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_previous_month
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_previous_month
)
>
this
.
state
.
maxValue
)
{
//
if (item.balance_sheet.mtd_vs_previous_month == "" && Number(item.balance_sheet.percent_act_vs_previous_month) < this.state.minValue || Number(item.balance_sheet.percent_act_vs_previous_month) > this.state.maxValue) {
err
=
true
//
err = true
}
//
}
if
(
item
.
balance_sheet
.
mtd_vs_mb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
if
(
item
.
balance_sheet
.
mtd_vs_mb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
err
=
true
err
=
true
}
}
if
(
item
.
balance_sheet
.
mtd_vs_rb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_rb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_rb
)
>
this
.
state
.
maxValue
)
{
//
if (item.balance_sheet.mtd_vs_rb == "" && Number(item.balance_sheet.percent_act_vs_rb) < this.state.minValue || Number(item.balance_sheet.percent_act_vs_rb) > this.state.maxValue) {
err
=
true
//
err = true
}
//
}
}
}
if
(
indexIDzz
===
-
1
)
{
if
(
indexIDzz
===
-
1
)
{
dataTable
.
push
([
dataTable
.
push
([
...
@@ -230,15 +230,15 @@ export default class BalanceSheetMR extends Component {
...
@@ -230,15 +230,15 @@ export default class BalanceSheetMR extends Component {
}
}
res
.
map
((
item
,
index
)
=>
{
res
.
map
((
item
,
index
)
=>
{
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
balance_sheet
.
mtd_vs_previous_month
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_previous_month
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_previous_month
)
>
this
.
state
.
maxValue
)
{
//
if (item.balance_sheet.mtd_vs_previous_month == "" && Number(item.balance_sheet.percent_act_vs_previous_month) < this.state.minValue || Number(item.balance_sheet.percent_act_vs_previous_month) > this.state.maxValue) {
err
=
true
//
err = true
}
//
}
if
(
item
.
balance_sheet
.
mtd_vs_mb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
if
(
item
.
balance_sheet
.
mtd_vs_mb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
err
=
true
err
=
true
}
}
if
(
item
.
balance_sheet
.
mtd_vs_rb
==
""
&&
Number
(
item
.
balance_sheet
.
percent_act_vs_rb
)
<
this
.
state
.
minValue
||
Number
(
item
.
balance_sheet
.
percent_act_vs_rb
)
>
this
.
state
.
maxValue
)
{
//
if (item.balance_sheet.mtd_vs_rb == "" && Number(item.balance_sheet.percent_act_vs_rb) < this.state.minValue || Number(item.balance_sheet.percent_act_vs_rb) > this.state.maxValue) {
err
=
true
//
err = true
}
//
}
}
}
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
...
@@ -367,7 +367,13 @@ export default class BalanceSheetMR extends Component {
...
@@ -367,7 +367,13 @@ export default class BalanceSheetMR extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleBSMR
:
false
,
loading
:
true
})
this
.
setState
({
visibleUpload
:
false
,
visibleBSMR
:
false
,
loading
:
true
})
let
err
=
false
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
let
dataTable
=
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
type_report_id
===
3
)
{
if
(
item
.
mtd_vs_mb
==
""
&&
Number
(
item
.
percent_act_vs_mb
)
<
this
.
state
.
minValue
||
Number
(
item
.
percent_act_vs_mb
)
>
this
.
state
.
maxValue
)
{
err
=
true
}
}
return
[
return
[
item
.
type_report_id
,
item
.
type_report_id
,
item
.
item_report_id
,
item
.
item_report_id
,
...
@@ -379,19 +385,19 @@ export default class BalanceSheetMR extends Component {
...
@@ -379,19 +385,19 @@ export default class BalanceSheetMR extends Component {
item
.
master_budget
===
""
?
""
:
item
.
master_budget
,
item
.
master_budget
===
""
?
""
:
item
.
master_budget
,
item
.
rolling_budget
===
""
?
""
:
item
.
rolling_budget
,
item
.
rolling_budget
===
""
?
""
:
item
.
rolling_budget
,
item
.
actual
===
""
?
""
:
item
.
actual
,
item
.
actual
===
""
?
""
:
item
.
actual
,
item
.
actual_previous_month
===
null
?
"
"
:
item
.
actual_previous_month
===
""
?
"
"
:
item
.
actual_previous_month
,
item
.
actual_previous_month
===
null
?
"
0.0"
:
item
.
actual_previous_month
===
""
?
"0.0
"
:
item
.
actual_previous_month
,
// item.amount_act_vs_previous_month === "" ? "
" : item.amount_act_vs_previous_month,
item
.
amount_act_vs_previous_month
===
""
?
"0.0
"
:
item
.
amount_act_vs_previous_month
,
// item.percent_act_vs_previous_month === "" ? "
" : item.percent_act_vs_previous_month,
item
.
percent_act_vs_previous_month
===
""
?
"0.0
"
:
item
.
percent_act_vs_previous_month
,
// item.amount_act_vs_mb === "" ? "
" : item.amount_act_vs_mb,
item
.
amount_act_vs_mb
===
""
?
"0.0
"
:
item
.
amount_act_vs_mb
,
// item.percent_act_vs_mb === "" ? "9
.0" : item.percent_act_vs_mb,
item
.
percent_act_vs_mb
===
""
?
"0
.0"
:
item
.
percent_act_vs_mb
,
// item.amount_act_vs_rb === "" ? "1
" : item.amount_act_vs_rb,
item
.
amount_act_vs_rb
===
""
?
"0.0
"
:
item
.
amount_act_vs_rb
,
// item.percent_act_vs_rb === "" ? "
" : item.percent_act_vs_rb,
item
.
percent_act_vs_rb
===
""
?
"0.0
"
:
item
.
percent_act_vs_rb
,
0
,
//
0,
0
,
//
0,
0
,
//
0,
0
,
//
0,
0
,
//
0,
0
,
//
0,
item
.
mtd_vs_previous_month
,
item
.
mtd_vs_previous_month
,
item
.
mtd_vs_mb
,
item
.
mtd_vs_mb
,
item
.
mtd_vs_rb
,
item
.
mtd_vs_rb
,
...
@@ -533,11 +539,12 @@ export default class BalanceSheetMR extends Component {
...
@@ -533,11 +539,12 @@ export default class BalanceSheetMR extends Component {
dataTable
.
map
((
i
,
index
)
=>
{
dataTable
.
map
((
i
,
index
)
=>
{
if
(
i
[
0
]
===
3
)
{
if
(
i
[
0
]
===
3
)
{
// console.log(i);
// console.log(i);
if
(
i
[
17
]
===
""
&&
(
Number
(
i
[
12
])
<
this
.
state
.
minValue
||
Number
(
i
[
12
])
>
this
.
state
.
maxValue
))
{
// if ( i[17] === "" && (Number(i[12]) < this.state.minValue || Number(i[12]) > this.state.maxValue)) {
console
.
log
(
'msk 1'
);
// console.log('msk 1');
// console.log(i);
// // console.log(i);
err
=
true
// err = true
}
else
if
(
i
[
18
]
===
""
&&
(
Number
(
i
[
14
])
<
this
.
state
.
minValue
||
Number
(
i
[
14
])
>
this
.
state
.
maxValue
))
{
// } else
if
(
i
[
18
]
===
""
&&
(
Number
(
i
[
14
])
<
this
.
state
.
minValue
||
Number
(
i
[
14
])
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 2'
);
console
.
log
(
'msk 2'
);
err
=
true
err
=
true
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment