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
6959a419
Commit
6959a419
authored
Nov 30, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issue
parent
10c98a66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+6
-8
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
6959a419
...
...
@@ -343,7 +343,7 @@ export default class ProfitLoss extends Component {
checkUpload
()
{
api
.
create
().
checkUploadMB
(
this
.
state
.
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
//
console.log(response)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
visibleUpload
:
false
,
visibleProfitLoss
:
false
,
loading
:
true
})
...
...
@@ -385,6 +385,7 @@ export default class ProfitLoss extends Component {
})
// console.log(this.state.buttonError)
})
}
}
})
...
...
@@ -539,12 +540,9 @@ export default class ProfitLoss extends Component {
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
])
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
value
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
value
}
else
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"total man power"
)
{
console
.
log
(
"masuk"
);
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
20
]);
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
19
]);
let
totalTMP
=
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
return
totalTMP
}
else
if
(
indexParent
!==
-
1
&&
String
(
dataTable2
[
indexParent
][
5
]).
toLocaleUpperCase
()
==
"GROSS PROFIT MARGIN (% OF REVENUE)"
)
{
...
...
@@ -635,13 +633,13 @@ export default class ProfitLoss extends Component {
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
item
)
}
else
if
(
opt
==
"bagi"
)
{
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
Number
(
total
)
/
Number
(
item
)
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
Infinity
)
?
'0'
:
Number
(
total
)
/
Number
(
item
)
}
else
{
total
+=
Number
(
item
)
}
}
})
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
R
.
equals
(
total
,
Infinity
)
?
"0.0"
:
total
// if (tableMeta.rowData[1] === 20092) {
// console.log(total);
// console.log(arrayJumlah);
...
...
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