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
21144e70
Commit
21144e70
authored
Sep 28, 2020
by
faisalhamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into faisal
parents
c87d4e0a
4dbd9fe1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
248 additions
and
195 deletions
+248
-195
BudgetTahunan.js
src/container/BudgetTahunan.js
+0
-1
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+118
-118
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+130
-76
No files found.
src/container/BudgetTahunan.js
View file @
21144e70
...
@@ -654,7 +654,6 @@ export default class BudgetTahunan extends Component {
...
@@ -654,7 +654,6 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)}
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
21144e70
...
@@ -553,7 +553,7 @@ export default class ProfitLoss extends Component {
...
@@ -553,7 +553,7 @@ export default class ProfitLoss extends Component {
"formula"
:
rilFormula
"formula"
:
rilFormula
}
}
api
.
create
().
countingFormula
(
body
).
then
(
response
=>
{
api
.
create
().
countingFormula
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
//
console.log(response);
})
})
}
else
{
}
else
{
let
body
=
{
let
body
=
{
...
@@ -934,15 +934,15 @@ export default class ProfitLoss extends Component {
...
@@ -934,15 +934,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
2
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1023,15 +1023,15 @@ export default class ProfitLoss extends Component {
...
@@ -1023,15 +1023,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
3
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1112,15 +1112,15 @@ export default class ProfitLoss extends Component {
...
@@ -1112,15 +1112,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
4
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1201,15 +1201,15 @@ export default class ProfitLoss extends Component {
...
@@ -1201,15 +1201,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
5
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1290,15 +1290,15 @@ export default class ProfitLoss extends Component {
...
@@ -1290,15 +1290,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
6
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1379,15 +1379,15 @@ export default class ProfitLoss extends Component {
...
@@ -1379,15 +1379,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
7
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1468,15 +1468,15 @@ export default class ProfitLoss extends Component {
...
@@ -1468,15 +1468,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
8
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1557,15 +1557,15 @@ export default class ProfitLoss extends Component {
...
@@ -1557,15 +1557,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
9
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1646,15 +1646,15 @@ export default class ProfitLoss extends Component {
...
@@ -1646,15 +1646,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
10
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1735,15 +1735,15 @@ export default class ProfitLoss extends Component {
...
@@ -1735,15 +1735,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
11
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1824,15 +1824,15 @@ export default class ProfitLoss extends Component {
...
@@ -1824,15 +1824,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// value={handleFormula(value, tableMeta
)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
12
)).
toFixed
(
1
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -1951,15 +1951,15 @@ export default class ProfitLoss extends Component {
...
@@ -1951,15 +1951,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// val
ue={handleFormula(value, tableMeta)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
13
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
@@ -2040,15 +2040,15 @@ export default class ProfitLoss extends Component {
...
@@ -2040,15 +2040,15 @@ export default class ProfitLoss extends Component {
null
null
:
:
tableMeta
.
rowData
[
0
]
===
6
?
tableMeta
.
rowData
[
0
]
===
6
?
//
<NumberFormat
<
NumberFormat
//
thousandSeparator={true}
thousandSeparator
=
{
true
}
//
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
//
type="text"
type
=
"text"
//
placeholder=""
placeholder
=
""
//
disabled={true}
disabled
=
{
true
}
// val
ue={handleFormula(value, tableMeta)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
14
)).
toFixed
(
1
)}
ue
=
{
handleFormula
(
value
,
tableMeta
)}
/
/ /
>
/
>
null
//
null
:
:
tableMeta
.
rowData
[
0
]
===
5
?
tableMeta
.
rowData
[
0
]
===
5
?
// <NumberFormat
// <NumberFormat
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
21144e70
...
@@ -103,7 +103,7 @@ export default class TaxPlanning extends Component {
...
@@ -103,7 +103,7 @@ export default class TaxPlanning extends Component {
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
id
,
item
.
id
,
item
.
parent
,
item
.
parent
,
item
.
formula
,
{
tbc
:
item
.
formula_tax
.
value_tbc
,
fcp
:
item
.
formula_tax
.
value_fc
,
tbf
:
item
.
formula_tax
.
value_tbf
}
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
...
@@ -140,7 +140,7 @@ export default class TaxPlanning extends Component {
...
@@ -140,7 +140,7 @@ export default class TaxPlanning extends Component {
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
type_report_tax
.
value_tbf
.
type_report_id
,
item
.
id
,
item
.
id
,
item
.
parent
,
item
.
parent
,
item
.
formula
,
{
tbc
:
item
.
formula_tax
.
value_tbc
,
fcp
:
item
.
formula_tax
.
value_fc
,
tbf
:
item
.
formula_tax
.
value_tbf
}
,
item
.
level
,
item
.
level
,
item
.
description
,
item
.
description
,
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
{
tbc
:
item
.
tax_planning
.
january
.
tbc
,
fcp
:
item
.
tax_planning
.
january
.
fcp
,
tbf
:
item
.
tax_planning
.
january
.
tbf
},
...
@@ -785,11 +785,68 @@ export default class TaxPlanning extends Component {
...
@@ -785,11 +785,68 @@ export default class TaxPlanning extends Component {
return
a
return
a
}
}
const
handleFormula
=
(
data
,
tableMeta
)
=>
{
const
handleFormula
=
(
data
,
tableMeta
,
month
,
rowColumn
)
=>
{
let
arrayFormula
=
tableMeta
.
rowData
[
6
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
rilFormula
=
String
(
rowColumn
==
0
?
tableMeta
.
rowData
[
6
].
tbc
:
tableMeta
.
rowData
[
6
].
tbf
)
if
(
rilFormula
.
includes
(
'#'
))
{
if
(
this
.
props
.
status
===
"not-yet"
)
{
let
splitOrder
=
String
(
rowColumn
==
0
?
tableMeta
.
rowData
[
6
].
tbc
:
tableMeta
.
rowData
[
6
].
tbf
).
split
(
'@'
)
for
(
let
index
=
0
;
index
<
splitOrder
.
length
;
index
++
)
{
if
(
splitOrder
[
index
]
===
""
)
{
}
else
{
if
(
splitOrder
[
index
].
includes
(
'#'
))
{
}
else
{
let
splitOperator
=
splitOrder
[
index
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
reg
=
/^
\d
+$/
splitOperator
.
map
((
item
)
=>
{
if
(
reg
.
test
(
item
)
===
true
)
{
let
i
=
dataTable2
.
findIndex
((
val
)
=>
val
[
23
]
==
item
)
if
(
i
>
0
)
{
rilFormula
=
rilFormula
.
replace
(
item
,
dataTable2
[
i
][
tableMeta
.
columnIndex
]
===
""
?
"0"
:
dataTable2
[
i
][
tableMeta
.
columnIndex
])
}
}
})
}
}
}
let
body
=
{
"submission_id"
:
null
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"report_id"
:
this
.
props
.
report_id
,
"year"
:
this
.
props
.
periode
,
"month"
:
month
,
"formula"
:
rilFormula
}
api
.
create
().
countingFormula
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
})
}
else
{
let
body
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"report_id"
:
this
.
props
.
report_id
,
"year"
:
this
.
props
.
periode
,
"month"
:
month
,
"formula"
:
rilFormula
}
api
.
create
().
countingFormula
(
body
).
then
(
response
=>
{
console
.
log
(
response
)
console
.
log
(
tableMeta
)
console
.
log
(
tableMeta
.
rowIndex
)
console
.
log
(
rowColumn
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
return
response
.
data
.
data
.
result
}
}
})
}
}
else
{
let
kondisi
=
rowColumn
==
0
?
tableMeta
.
rowData
[
6
].
tbc
:
tableMeta
.
rowData
[
6
].
tbf
let
arrayFormula
=
kondisi
.
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
let
arrayJumlah
=
[]
arrayFormula
.
map
((
item
,
indexs
)
=>
{
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
4
]
==
item
)
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
23
]
==
item
)
if
(
index
>
0
)
{
if
(
index
>
0
)
{
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
}
else
{
}
else
{
...
@@ -827,6 +884,7 @@ export default class TaxPlanning extends Component {
...
@@ -827,6 +884,7 @@ export default class TaxPlanning extends Component {
})
})
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
total
)
return
a
return
a
}
}
}
const
columns
=
[{
const
columns
=
[{
...
@@ -975,26 +1033,24 @@ export default class TaxPlanning extends Component {
...
@@ -975,26 +1033,24 @@ export default class TaxPlanning extends Component {
null
null
:
:
tableMeta
.
rowData
[
1
]
===
6
?
tableMeta
.
rowData
[
1
]
===
6
?
// <NumberFormat
<
NumberFormat
// thousandSeparator={true}
thousandSeparator
=
{
true
}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
// type="text"
type
=
"text"
// placeholder=""
placeholder
=
""
// disabled={true}
disabled
=
{
true
}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
1
,
0
)).
toFixed
(
1
)}
// />
/
>
null
:
:
tableMeta
.
rowData
[
1
]
===
5
?
tableMeta
.
rowData
[
1
]
===
5
?
// <NumberFormat
<
NumberFormat
// thousandSeparator={true}
thousandSeparator
=
{
true
}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
// type="text"
type
=
"text"
// placeholder=""
placeholder
=
""
// disabled={true}
disabled
=
{
false
}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
1
,
0
)).
toFixed
(
1
)}
// />
/
>
null
:
:
tableMeta
.
rowData
[
1
]
===
1
?
tableMeta
.
rowData
[
1
]
===
1
?
// value[0] === "" ?
// value[0] === "" ?
...
@@ -1131,26 +1187,24 @@ export default class TaxPlanning extends Component {
...
@@ -1131,26 +1187,24 @@ export default class TaxPlanning extends Component {
null
null
:
:
tableMeta
.
rowData
[
3
]
===
6
?
tableMeta
.
rowData
[
3
]
===
6
?
// <NumberFormat
<
NumberFormat
// thousandSeparator={true}
thousandSeparator
=
{
true
}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
// type="text"
type
=
"text"
// placeholder=""
placeholder
=
""
// disabled={true}
disabled
=
{
true
}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
1
,
2
)).
toFixed
(
1
)}
// />
/
>
null
:
:
tableMeta
.
rowData
[
3
]
===
5
?
tableMeta
.
rowData
[
3
]
===
5
?
// <NumberFormat
<
NumberFormat
// thousandSeparator={true}
thousandSeparator
=
{
true
}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
// type="text"
type
=
"text"
// placeholder=""
placeholder
=
""
// disabled={true}
disabled
=
{
false
}
// value={Number(handleFormula(value, tableMeta)).toFixed(1)}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
,
1
,
2
)).
toFixed
(
1
)}
// />
/
>
null
:
:
tableMeta
.
rowData
[
3
]
===
1
?
tableMeta
.
rowData
[
3
]
===
1
?
// value[2] === "" ?
// value[2] === "" ?
...
...
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