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
31c9bb1e
Commit
31c9bb1e
authored
Dec 03, 2020
by
r.kurnia
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into rifka
parents
eece511f
2724d562
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
207 additions
and
72 deletions
+207
-72
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+62
-12
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+5
-5
OperatingIndicatorMR.js
src/container/MonthlyReport/OperatingIndicatorMR.js
+96
-11
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+3
-3
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+41
-41
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
31c9bb1e
...
...
@@ -292,6 +292,9 @@ export default class CashFlow extends Component {
let
res
=
await
fetch
(
this
.
props
.
submissionID
==
null
?
resNull
:
resReal
)
console
.
log
(
this
.
props
.
submissionID
);
console
.
log
(
resReal
)
console
.
log
(
resNull
)
res
=
await
res
.
blob
()
if
(
res
.
size
>
0
)
{
let
url
=
window
.
URL
.
createObjectURL
(
res
);
...
...
@@ -432,9 +435,11 @@ export default class CashFlow extends Component {
let
totalPrio
=
0
let
optPrio
=
""
let
prio
=
false
let
optPrev
=
""
anjay2
.
map
((
item
,
index
)
=>
{
if
(
Array
.
isArray
(
item
))
{
prio
=
true
optPrev
=
opt
item
.
map
((
items
,
indexs
)
=>
{
if
(
items
==
"+"
)
{
optPrio
=
"tambah"
...
...
@@ -476,7 +481,17 @@ export default class CashFlow extends Component {
if
(
item
==
"+"
)
{
opt
=
"tambah"
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if
(
optPrev
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
}
else
{
total
+=
Number
(
totalPrio
)
}
prio
=
false
totalPrio
=
0
optPrio
=
""
...
...
@@ -484,7 +499,17 @@ export default class CashFlow extends Component {
}
else
if
(
item
==
"-"
)
{
opt
=
"kurang"
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if
(
optPrev
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
}
else
{
total
+=
Number
(
totalPrio
)
}
prio
=
false
totalPrio
=
0
optPrio
=
""
...
...
@@ -492,7 +517,17 @@ export default class CashFlow extends Component {
}
else
if
(
item
==
"*"
)
{
opt
=
"kali"
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if
(
optPrev
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
}
else
{
total
+=
Number
(
totalPrio
)
}
prio
=
false
totalPrio
=
0
optPrio
=
""
...
...
@@ -500,7 +535,17 @@ export default class CashFlow extends Component {
}
else
if
(
item
==
"/"
)
{
opt
=
"bagi"
if
(
prio
)
{
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if
(
optPrev
==
"tambah"
)
{
total
=
Number
(
total
)
+
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kurang"
)
{
total
=
Number
(
total
)
-
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
totalPrio
)
}
else
if
(
optPrev
==
"bagi"
)
{
total
=
Number
(
total
)
/
Number
(
totalPrio
)
==
NaN
?
0
:
Number
(
total
)
/
Number
(
totalPrio
)
}
else
{
total
+=
Number
(
totalPrio
)
}
prio
=
false
totalPrio
=
0
optPrio
=
""
...
...
@@ -519,6 +564,11 @@ export default class CashFlow extends Component {
}
}
}
// if (String(tableMeta.rowData[5]).toLocaleUpperCase() == "4.0 CASH FLOW MOVEMENT" && column == 7) {
// console.log(item)
// console.log(totalPrio)
// console.log(total)
// }
})
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
total
...
...
@@ -527,7 +577,7 @@ export default class CashFlow extends Component {
// // console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == "1.5 Other non-current assets") {
// if (forecast !== undefined) {
// if (String(tableMeta.rowData[5]) == "Depreciation & amortisation"
) {
// if (String(tableMeta.rowData[5]).toLocaleUpperCase() == "4.0 CASH FLOW MOVEMENT" && column == 7
) {
// console.log(splitFormula)
// console.log(baru)
// console.log(anjay)
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
31c9bb1e
...
...
@@ -188,7 +188,7 @@ export default class ProfitLoss extends Component {
}
}
})
//
console.log(dataTable)
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
,
buttonError
:
true
,
editable
:
true
},
()
=>
{
})
}
else
{
...
...
@@ -540,8 +540,8 @@ export default class ProfitLoss extends Component {
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
tableMeta
.
rowData
[
2
])
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"sales price"
)
{
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
20
])
/
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
20
])
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
value
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
value
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
(
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
(
value
==
"-Infinity"
?
"0.0"
:
value
))
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
(
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
(
value
==
"-Infinity"
?
"0.0"
:
value
))
}
else
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"total man power"
)
{
let
totalTMP
=
dataTable2
[
tableMeta
.
rowIndex
][
20
]
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
return
totalTMP
...
...
@@ -633,13 +633,13 @@ export default class ProfitLoss extends Component {
}
else
if
(
opt
==
"kali"
)
{
total
=
Number
(
total
)
*
Number
(
item
)
}
else
if
(
opt
==
"bagi"
)
{
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
Infinity
)
?
'0'
:
Number
(
total
)
/
Number
(
item
)
total
=
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
NaN
)
?
'0'
:
(
R
.
equals
((
Number
(
total
)
/
Number
(
item
)),
Infinity
)
?
'0'
:
(
Number
(
total
)
/
Number
(
item
)
==
"-Infinity"
)
?
"0.0"
:
Number
(
total
)
/
Number
(
item
)
)
}
else
{
total
+=
Number
(
item
)
}
}
})
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
R
.
equals
(
total
,
Infinity
)
?
"0.0"
:
total
total
=
R
.
equals
(
total
,
NaN
)
?
"0.0"
:
(
R
.
equals
(
total
,
Infinity
)
?
"0.0"
:
(
total
==
"-Infinity"
?
"0.0"
:
total
))
// if (tableMeta.rowData[1] === 20092) {
// console.log(total);
// console.log(arrayJumlah);
...
...
src/container/MonthlyReport/OperatingIndicatorMR.js
View file @
31c9bb1e
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/ProfitLossMR.js
View file @
31c9bb1e
...
...
@@ -1436,7 +1436,7 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
1
9
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
19
])
>=
this
.
state
.
maxValue
?
Number
(
tableMeta
.
rowData
[
1
4
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
14
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -1491,7 +1491,7 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
20
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
20
])
>=
this
.
state
.
maxValue
?
Number
(
tableMeta
.
rowData
[
16
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
16
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
@@ -1546,7 +1546,7 @@ export default class ProfitLossMR extends Component {
{
tableMeta
.
rowData
[
0
]
===
4
||
tableMeta
.
rowData
[
0
]
===
1
?
null
:
Number
(
tableMeta
.
rowData
[
21
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
21
])
>=
this
.
state
.
maxValue
?
Number
(
tableMeta
.
rowData
[
18
])
<=
this
.
state
.
minValue
||
Number
(
tableMeta
.
rowData
[
18
])
>=
this
.
state
.
maxValue
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
31c9bb1e
...
...
@@ -89,45 +89,45 @@ export default class OperatingIndicator extends Component {
})
}
getMonth
()
{
api
.
create
().
getMonthTransaction
().
then
(
response
=>
{
console
.
log
(
response
);
let
dateNow
=
new
Date
let
month
=
format
(
dateNow
,
'MMMM'
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
);
let
data
=
response
.
data
.
data
let
monthData
=
data
.
map
((
item
)
=>
{
return
{
month_id
:
item
.
id
,
month_value
:
String
(
item
.
month_name
).
substr
(
0
,
3
)
}
})
let
defaultProps
=
{
options
:
monthData
,
getOptionLabel
:
(
option
)
=>
option
.
month_value
,
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
.
month_name
==
month
)
console
.
log
(
index
);
this
.
setState
({
listMonth
:
defaultProps
,
month
:
index
==
-
1
?
monthData
[
0
]
:
monthData
[
index
]
},
()
=>
{
this
.
getLastPeriod
()
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
})
}
//
getMonth() {
//
api.create().getMonthTransaction().then(response => {
//
console.log(response);
//
let dateNow = new Date
//
let month = format(dateNow, 'MMMM')
//
if (response.data) {
//
if (response.data.status === "success") {
//
console.log(response);
//
let data = response.data.data
//
let monthData = data.map((item) => {
//
return {
//
month_id: item.id,
//
month_value: String(item.month_name).substr(0, 3)
//
}
//
})
//
let defaultProps = {
//
options: monthData,
//
getOptionLabel: (option) => option.month_value,
//
};
//
let index = data.sort((a, b) => a - b).findIndex((val) => val.month_name == month)
//
console.log(index);
//
this.setState({ listMonth: defaultProps, month: index == -1 ? monthData[0] : monthData[index] }, () => {
//
this.getLastPeriod()
//
})
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }, () => {
//
if (response.data.message.includes("Someone Logged In")) {
//
setTimeout(() => {
//
localStorage.removeItem(Constant.TOKEN)
//
window.location.reload();
//
}, 1000);
//
}
//
})
//
}
//
} else {
//
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error' })
//
}
//
})
//
}
getReportAttachment
()
{
let
payload
=
{
...
...
@@ -233,7 +233,7 @@ export default class OperatingIndicator extends Component {
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
.
length
<
1
?
companyData
[
0
]
:
arrayBaru
[
0
]
},
()
=>
{
this
.
get
Month
()
this
.
get
LastPeriod
()
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
...
...
@@ -671,7 +671,7 @@ export default class OperatingIndicator extends Component {
data
=
{
this
.
state
.
dataDetail
}
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
month
=
{
this
.
state
.
month
}
//
month={this.state.month}
company
=
{
this
.
state
.
company
}
onClickClose
=
{()
=>
this
.
setState
({
visibleDetailMonthly
:
false
,
visibleOperatingIndicator
:
true
},
()
=>
{
this
.
getOperatingID
()
...
...
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