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
df1f8b97
Commit
df1f8b97
authored
Sep 14, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
pormula See merge request
!292
parents
6e7f33ef
fcf9d9b5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
6 deletions
+34
-6
BudgetTahunan.js
src/container/BudgetTahunan.js
+3
-2
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+31
-4
No files found.
src/container/BudgetTahunan.js
View file @
df1f8b97
...
@@ -318,11 +318,12 @@ export default class BudgetTahunan extends Component {
...
@@ -318,11 +318,12 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getReport
()
this
.
getReport
()
this
.
getSubmission
()
this
.
getSubmission
()
this
.
setState
({
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
loading
:
tru
e
})
this
.
setState
({
loading
:
fals
e
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
tru
e
})
this
.
setState
({
loading
:
fals
e
})
}
}
})
})
}
}
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
df1f8b97
...
@@ -65,6 +65,7 @@ export default class BalanceSheet extends Component {
...
@@ -65,6 +65,7 @@ export default class BalanceSheet extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
dataTable
=
[]
let
dataTable
=
[]
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
response
.
data
.
data
.
map
((
item
,
index
)
=>
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
dataTable
.
push
([
dataTable
.
push
([
item
.
type_report_id
,
item
.
type_report_id
,
...
@@ -779,6 +780,32 @@ export default class BalanceSheet extends Component {
...
@@ -779,6 +780,32 @@ export default class BalanceSheet extends Component {
// console.log(indexParent);
// console.log(indexParent);
return
a
return
a
}
}
const
handleFormula
=
(
data
,
tableMeta
,
column
)
=>
{
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
let
operator
=
[]
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
item
)
if
(
index
>
0
)
{
arrayJumlah
.
push
(
dataTable2
[
index
][
column
])
}
else
{
arrayJumlah
.
push
(
item
)
}
// if (indexs % 2 !== 0) {
// operator.push(item)
// }
})
let
a
=
arrayJumlah
.
join
(
""
)
console
.
log
(
arrayJumlah
);
// if (arrayJumlah.length > 0) {
// console.log(arrayJumlah);
// let a = Number(arrayJumlah[0]) + Number(arrayJumlah[1])
// return a
// } else {
// return 'Formula'
// }
}
const
columns
=
[{
const
columns
=
[{
name
:
""
,
name
:
""
,
options
:
{
options
:
{
...
@@ -879,7 +906,7 @@ export default class BalanceSheet extends Component {
...
@@ -879,7 +906,7 @@ export default class BalanceSheet extends Component {
<
span
>
Formula
<
/span
>
<
span
>
Formula
<
/span
>
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
<
span
>
Formula
Summary
<
/span
>
<
span
>
{
handleFormula
(
value
,
tableMeta
,
6
)}
<
/span
>
:
:
tableMeta
.
rowData
[
0
]
===
1
?
tableMeta
.
rowData
[
0
]
===
1
?
value
===
""
?
value
===
""
?
...
@@ -2004,14 +2031,14 @@ export default class BalanceSheet extends Component {
...
@@ -2004,14 +2031,14 @@ export default class BalanceSheet extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Balance
Sheet
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Budget
Tahunan
-
Balance
Sheet
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Periode
:
{
this
.
props
.
periode
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
width
:
'50%'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
div
style
=
{{
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
<
button
style
=
{{
style
=
{{
...
...
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