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
08d7ec6d
Commit
08d7ec6d
authored
Nov 26, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
profit loss
parent
1bb99888
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
207 additions
and
24 deletions
+207
-24
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+5
-5
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+202
-19
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
08d7ec6d
...
...
@@ -289,7 +289,7 @@ export default class ProfitLoss extends Component {
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
//
console.log(resp)
console
.
log
(
resp
)
if
(
err
)
{
// console.log(err);
}
...
...
@@ -329,7 +329,7 @@ export default class ProfitLoss extends Component {
report_id
:
this
.
props
.
report_id
,
profit_loss
:
payload
}
// console.log(body
)
console
.
log
(
isi
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
});
...
...
@@ -338,7 +338,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
})
...
...
@@ -549,7 +549,7 @@ export default class ProfitLoss extends Component {
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]
))
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
String
(
item
[
data
.
columnIndex
]).
includes
(
'-'
)?
Number
(
String
(
item
[
data
.
columnIndex
]).
substr
(
1
,
String
(
item
[
data
.
columnIndex
]).
length
))
*
-
1
:
Number
(
item
[
data
.
columnIndex
])
))
}
})
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
data
.
rowIndex
][
2
])
...
...
@@ -616,7 +616,7 @@ export default class ProfitLoss extends Component {
}
else
if
(
opt
==
"bagi"
)
{
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
Number
(
total
)
/
Number
(
item
)
}
else
{
total
+=
item
total
+=
Number
(
item
)
}
}
})
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
08d7ec6d
This diff is collapsed.
Click to expand it.
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