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
c12713d9
Commit
c12713d9
authored
Dec 18, 2020
by
Rifka Kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rifka' into 'master'
issuess See merge request
!823
parents
ff1c173f
07388a7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+3
-3
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+29
-5
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+3
-7
No files found.
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
c12713d9
...
@@ -98,7 +98,7 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -98,7 +98,7 @@ export default class FixedAssetsMovementMR extends Component {
}
}
api
.
create
().
getHierarkiMontlyReportFAM
(
payload
).
then
(
response
=>
{
api
.
create
().
getHierarkiMontlyReportFAM
(
payload
).
then
(
response
=>
{
// console.log(payload);
// console.log(payload);
//
console.log(response);
console
.
log
(
response
);
let
dataTable
=
[]
let
dataTable
=
[]
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
...
@@ -164,7 +164,7 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -164,7 +164,7 @@ export default class FixedAssetsMovementMR extends Component {
}
}
}
}
})
})
//
console.log(dataTable);
console
.
log
(
dataTable
);
this
.
setState
({
dataTable
,
loading
:
false
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
else
{
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
@@ -1476,7 +1476,7 @@ export default class FixedAssetsMovementMR extends Component {
...
@@ -1476,7 +1476,7 @@ export default class FixedAssetsMovementMR extends Component {
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
getItemHierarki
()
},
100
);
},
100
);
})}
})}
style
=
{{
style
=
{{
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
c12713d9
...
@@ -196,7 +196,7 @@ export default class ProfitLossMR extends Component {
...
@@ -196,7 +196,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
0
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
...
@@ -208,6 +208,7 @@ export default class ProfitLossMR extends Component {
...
@@ -208,6 +208,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
mtd_vs_mb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_mb
,
item
.
profit_loss
.
mtd_vs_mb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_mb
,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
order
,
item
.
order
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
])
])
}
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
...
@@ -231,7 +232,7 @@ export default class ProfitLossMR extends Component {
...
@@ -231,7 +232,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
master_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
master_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
master_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
rolling_budget
===
null
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
===
""
?
"0.0"
:
item
.
profit_loss
.
rolling_budget
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
actual
===
null
?
"0.0"
:
item
.
profit_loss
.
actual
===
""
?
"0.0"
:
item
.
profit_loss
.
actual
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
0
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
actual_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
actual_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
amount_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
amount_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
item
.
profit_loss
.
percent_act_vs_previous_month
===
null
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
===
""
?
"0.0"
:
item
.
profit_loss
.
percent_act_vs_previous_month
,
...
@@ -243,6 +244,7 @@ export default class ProfitLossMR extends Component {
...
@@ -243,6 +244,7 @@ export default class ProfitLossMR extends Component {
item
.
profit_loss
.
mtd_vs_mb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_mb
,
item
.
profit_loss
.
mtd_vs_mb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_mb
,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
profit_loss
.
mtd_vs_rb
===
null
?
""
:
item
.
profit_loss
.
mtd_vs_rb
,
item
.
order
,
item
.
order
,
item
.
profit_loss
.
ytd_actual
===
null
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
===
""
?
"0.0"
:
item
.
profit_loss
.
ytd_actual
,
])
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
if
(
item
.
children
.
length
>
0
)
{
...
@@ -398,7 +400,7 @@ export default class ProfitLossMR extends Component {
...
@@ -398,7 +400,7 @@ export default class ProfitLossMR extends Component {
item
.
master_budget
===
""
?
""
:
item
.
master_budget
,
item
.
master_budget
===
""
?
""
:
item
.
master_budget
,
item
.
rolling_budget
===
""
?
""
:
item
.
rolling_budget
,
item
.
rolling_budget
===
""
?
""
:
item
.
rolling_budget
,
item
.
actual
===
""
?
""
:
item
.
actual
,
item
.
actual
===
""
?
""
:
item
.
actual
,
item
.
ytd_actual
===
null
?
""
:
item
.
ytd_actual
===
""
?
""
:
item
.
ytd_actual
,
0
,
item
.
actual_previous_month
===
null
?
""
:
item
.
actual_previous_month
===
""
?
""
:
item
.
actual_previous_month
,
item
.
actual_previous_month
===
null
?
""
:
item
.
actual_previous_month
===
""
?
""
:
item
.
actual_previous_month
,
0
,
0
,
0
,
0
,
...
@@ -416,12 +418,13 @@ export default class ProfitLossMR extends Component {
...
@@ -416,12 +418,13 @@ export default class ProfitLossMR extends Component {
item
.
mtd_vs_mb
,
item
.
mtd_vs_mb
,
item
.
mtd_vs_rb
,
item
.
mtd_vs_rb
,
item
.
orders
,
item
.
orders
,
item
.
ytd_actual
===
null
?
""
:
item
.
ytd_actual
===
""
?
""
:
item
.
ytd_actual
,
item
.
error
item
.
error
]
]
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
2
3
].
length
>
0
)
{
if
(
item
[
2
4
].
length
>
0
)
{
// console.log('masuk')
// console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
}
}
...
@@ -738,6 +741,21 @@ export default class ProfitLossMR extends Component {
...
@@ -738,6 +741,21 @@ export default class ProfitLossMR extends Component {
return
total
return
total
}
}
const
handleTotal
=
(
value
,
tableMeta
)
=>
{
// console.log(tableMeta)
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
==
10
)
{
let
itemActual
=
item
==
undefined
||
item
==
""
||
item
==
"undefined"
?
0.0
:
item
total
=
Number
(
tableMeta
.
rowData
[
23
])
+
Number
(
itemActual
)
}
})
dataTable2
[
tableMeta
.
rowIndex
][
11
]
=
Number
(
total
).
toFixed
(
1
)
return
total
}
let
columns
=
[
let
columns
=
[
{
{
name
:
""
,
name
:
""
,
...
@@ -1194,7 +1212,7 @@ export default class ProfitLossMR extends Component {
...
@@ -1194,7 +1212,7 @@ export default class ProfitLossMR extends Component {
type
=
"text"
type
=
"text"
placeholder
=
""
placeholder
=
""
disabled
=
{
true
}
disabled
=
{
true
}
value
=
{
Number
(
tableMeta
.
rowData
[
11
]
).
toFixed
(
1
)}
value
=
{
Number
(
handleTotal
(
tableMeta
.
rowData
[
11
],
tableMeta
)
).
toFixed
(
1
)}
/
>
/
>
}
}
/
>
/
>
...
@@ -1739,6 +1757,12 @@ export default class ProfitLossMR extends Component {
...
@@ -1739,6 +1757,12 @@ export default class ProfitLossMR extends Component {
display
:
false
display
:
false
}
}
},
},
{
name
:
""
,
options
:
{
display
:
false
}
},
{
{
name
:
""
,
name
:
""
,
options
:
{
options
:
{
...
...
src/container/MonthlyReport/TaxPlanningMR.js
View file @
c12713d9
...
@@ -350,7 +350,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -350,7 +350,7 @@ export default class TaxPlanningMR extends Component {
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
saveDraft
:
true
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
,
saveDraft
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
1
8
].
length
>
0
)
{
if
(
item
[
1
7
].
length
>
0
)
{
// console.log('masuk')
// console.log('masuk')
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
,
saveDraft
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
,
saveDraft
:
true
})
}
}
...
@@ -531,7 +531,6 @@ export default class TaxPlanningMR extends Component {
...
@@ -531,7 +531,6 @@ export default class TaxPlanningMR extends Component {
}
}
let
totalShldBeNil
=
0
let
totalShldBeNil
=
0
console
.
log
(
baru
)
baru
.
map
((
item
,
index
)
=>
{
baru
.
map
((
item
,
index
)
=>
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
if
(
item
==
'-'
||
item
==
'+'
||
item
==
'/'
||
item
==
'*'
||
item
==
'('
||
item
==
')'
)
{
anjay
.
push
(
item
)
anjay
.
push
(
item
)
...
@@ -566,14 +565,11 @@ export default class TaxPlanningMR extends Component {
...
@@ -566,14 +565,11 @@ export default class TaxPlanningMR extends Component {
}
}
}
else
{
}
else
{
let
data
=
tableMeta
.
rowData
[
12
]
let
data
=
tableMeta
.
rowData
[
12
]
console
.
log
(
data
);
let
indexID
=
data
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
let
indexID
=
data
.
findIndex
((
val
)
=>
val
.
item_formula
==
String
(
`@
${
item
}
`
)
&&
val
.
periode
==
Number
(
this
.
props
.
periode
))
console
.
log
(
indexID
);
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
let
valuezz
=
data
[
indexID
].
value
let
valuezz
=
data
[
indexID
].
value
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
anjay
.
push
(
valuezz
==
""
?
0
:
valuezz
)
}
}
console
.
log
(
anjay
)
}
}
}
}
}
else
{
}
else
{
...
@@ -728,7 +724,7 @@ export default class TaxPlanningMR extends Component {
...
@@ -728,7 +724,7 @@ export default class TaxPlanningMR extends Component {
}
}
const
handleTotal
=
(
value
,
tableMeta
,
dex
)
=>
{
const
handleTotal
=
(
value
,
tableMeta
,
dex
)
=>
{
// console.log(tableMeta)
// console.log(tableMeta)
let
total
=
value
let
total
=
0
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
==
9
)
{
if
(
index
==
9
)
{
...
...
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