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
346c1b44
Commit
346c1b44
authored
Dec 29, 2020
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bs
parent
5a218f22
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+9
-7
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
346c1b44
...
...
@@ -140,6 +140,7 @@ export default class BalanceSheetMR extends Component {
"get_for"
:
this
.
state
.
get_for
}
api
.
create
().
getHierarkiMontlyReportBS
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
let
dataTable
=
[]
let
err
=
false
...
...
@@ -148,7 +149,7 @@ export default class BalanceSheetMR extends Component {
let
res
=
response
.
data
.
data
const
handlePushChild
=
(
item
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
item
.
type_report_id
===
3
&&
item
.
level
===
2
)
{
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
)
{
err
=
true
}
...
...
@@ -196,7 +197,7 @@ export default class BalanceSheetMR extends Component {
}
}
res
.
map
((
item
,
index
)
=>
{
if
(
item
.
type_report_id
===
3
&&
item
.
level
===
2
)
{
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
)
{
err
=
true
}
...
...
@@ -418,6 +419,7 @@ export default class BalanceSheetMR extends Component {
}
// console.log(JSON.stringify(body));
console
.
log
(
body
)
api
.
create
(
'UPLOAD'
).
uploadMonthlyReportBS
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
@@ -473,7 +475,7 @@ export default class BalanceSheetMR extends Component {
}
api
.
create
(
'UPLOAD'
).
createMonthlyReportBS
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
console
.
log
(
JSON
.
stringify
(
payload
))
//
console.log(JSON.stringify(payload))
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
...
...
@@ -492,8 +494,8 @@ export default class BalanceSheetMR extends Component {
let
data
=
[]
let
err
=
false
this
.
state
.
dataTable
.
map
((
i
,
index
)
=>
{
if
(
i
[
0
]
===
3
&&
i
[
4
]
===
2
)
{
console
.
log
(
i
);
if
(
i
[
0
]
===
3
)
{
//
console.log(i);
if
(
i
[
17
]
===
""
&&
(
Number
(
i
[
12
])
<
this
.
state
.
minValue
||
Number
(
i
[
12
])
>
this
.
state
.
maxValue
))
{
console
.
log
(
'msk 1'
);
// console.log(i);
...
...
@@ -524,7 +526,7 @@ export default class BalanceSheetMR extends Component {
"mtd_vs_rb"
:
i
[
19
]
})
})
console
.
log
(
JSON
.
stringify
(
data
));
//
console.log(JSON.stringify(data));
// data.map(i => {
// if (i.mtd_vs_previous_month === "" && (Number(i.percent_act_vs_previous_month) < this.state.minValue || Number(i.percent_act_vs_previous_month) > this.state.maxValue)) {
// console.log('msk 1');
...
...
@@ -556,7 +558,7 @@ export default class BalanceSheetMR extends Component {
"months"
:
this
.
props
.
month
.
month_id
,
"balance_sheet"
:
data
}
console
.
log
(
JSON
.
stringify
(
payload
));
//
console.log(JSON.stringify(payload));
console
.
log
(
this
.
state
.
dataTable
)
api
.
create
().
validateSubmitReportBS
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
...
...
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