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
b053abcf
Commit
b053abcf
authored
Nov 26, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into deni-
parents
710caf29
161a2e6c
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
215 additions
and
36 deletions
+215
-36
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+12
-16
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+202
-19
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+1
-1
No files found.
src/container/BudgetTahunan/ProfitLoss.js
View file @
b053abcf
...
@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component {
...
@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component {
fileHandler
=
(
event
)
=>
{
fileHandler
=
(
event
)
=>
{
let
fileObj
=
event
let
fileObj
=
event
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
ExcelRenderer
(
fileObj
,
(
err
,
resp
)
=>
{
//
console.log(resp)
console
.
log
(
resp
)
if
(
err
)
{
if
(
err
)
{
// console.log(err);
// console.log(err);
}
}
...
@@ -330,7 +330,7 @@ export default class ProfitLoss extends Component {
...
@@ -330,7 +330,7 @@ export default class ProfitLoss extends Component {
report_id
:
this
.
props
.
report_id
,
report_id
:
this
.
props
.
report_id
,
profit_loss
:
payload
profit_loss
:
payload
}
}
// console.log(body
)
console
.
log
(
isi
)
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
this
.
setState
({
payload
:
body
,
judul
:
resp
.
rows
[
1
][
0
],
judulColumn
:
resp
.
rows
[
2
]
})
}
}
});
});
...
@@ -548,19 +548,15 @@ export default class ProfitLoss extends Component {
...
@@ -548,19 +548,15 @@ export default class ProfitLoss extends Component {
}
}
const
handleValue
=
(
value
,
data
)
=>
{
const
handleValue
=
(
value
,
data
)
=>
{
let
total
=
0
let
total
=
0
if
(
this
.
state
.
fromUpload
)
{
dataTable2
.
map
((
item
,
index
)
=>
{
return
value
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
}
else
{
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
])))
dataTable2
.
map
((
item
,
index
)
=>
{
}
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
})
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
data
.
rowIndex
][
2
])
}
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
]
=
Number
(
total
)
})
// console.log(indexParent);
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
data
.
rowIndex
][
2
])
return
a
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
]
=
Number
(
total
)
// console.log(indexParent);
return
a
}
}
}
const
handleFormula
=
(
data
,
tableMeta
,
month
)
=>
{
const
handleFormula
=
(
data
,
tableMeta
,
month
)
=>
{
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
...
@@ -621,7 +617,7 @@ export default class ProfitLoss extends Component {
...
@@ -621,7 +617,7 @@ export default class ProfitLoss extends Component {
}
else
if
(
opt
==
"bagi"
)
{
}
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'
:
Number
(
total
)
/
Number
(
item
)
}
else
{
}
else
{
total
+=
item
total
+=
Number
(
item
)
}
}
}
}
})
})
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
b053abcf
This diff is collapsed.
Click to expand it.
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
b053abcf
...
@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
...
@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
this
.
setState
({
uploadStatus
:
'idle'
,
percentage
:
'0'
})
}}
}}
onUpload
=
{()
=>
{
onUpload
=
{()
=>
{
this
.
state
.
judul
===
"OUTLOOK PA - BALANCE SHEET"
?
String
(
this
.
state
.
judul
).
includes
(
'OUTLOOK PA - BALANCE'
)
?
this
.
checkUpload
()
:
this
.
checkUpload
()
:
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
}}
...
...
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