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
e24c6e5f
Commit
e24c6e5f
authored
Feb 04, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dah semua
parent
7d6e8282
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
10 deletions
+32
-10
BudgetTahunan.js
src/container/BudgetTahunan.js
+9
-5
SubHolding.js
src/container/Laporan/SubHolding.js
+17
-3
MonthlyReport.js
src/container/MonthlyReport.js
+6
-2
No files found.
src/container/BudgetTahunan.js
View file @
e24c6e5f
...
...
@@ -452,7 +452,9 @@ export default class BudgetTahunan extends Component {
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
))
:
this
.
state
.
lastPeriod
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
periode
)
// // console.log(this.props.location.state.rawData)
// console.log(this.state.lastPeriod)
console
.
log
(
this
.
state
.
lastPeriod
)
console
.
log
(
periode
)
console
.
log
(
index
)
// console.log(periodeData)
// // // console.log(index)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
...
...
@@ -1158,7 +1160,8 @@ export default class BudgetTahunan extends Component {
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
,
item
.
profit_detail
.
notes
])
if
(
item
.
children
!==
null
)
{
...
...
@@ -1196,7 +1199,8 @@ export default class BudgetTahunan extends Component {
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
item
.
profit_detail
.
forecast_formula
==
null
?
[]
:
item
.
profit_detail
.
forecast_formula
,
item
.
profit_detail
.
notes
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -1206,7 +1210,7 @@ export default class BudgetTahunan extends Component {
}
}
})
//
console.log(dataTable)
console
.
log
(
dataTable
)
this
.
setState
({
dbPL
:
dataTable
,
loading
:
false
},
()
=>
{
this
.
olahDataPL
(
this
.
state
.
dbPL
,
type
)
})
...
...
@@ -1545,7 +1549,7 @@ export default class BudgetTahunan extends Component {
"total_current_year"
:
String
(
item
[
19
]),
"total_next_year"
:
String
(
item
[
20
]
!=
''
?
Number
(
item
[
20
]).
toFixed
(
1
)
:
item
[
20
]),
"total_more_year"
:
String
(
item
[
21
]
!=
''
?
Number
(
item
[
21
]).
toFixed
(
1
)
:
item
[
21
]),
"notes"
:
""
,
"notes"
:
String
(
item
[
26
])
,
}
)
...
...
src/container/Laporan/SubHolding.js
View file @
e24c6e5f
...
...
@@ -165,18 +165,18 @@ export default class SubHolding extends Component {
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
))
:
this
.
state
.
lastPeriod
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
dateNow
=
new
Date
()
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
let
yearNow
=
dateNow
.
getFullYear
()
console
.
log
(
yearNow
)
console
.
log
(
periode
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
yearNow
:
periode
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
(
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
yearNow
:
periode
)
)
// console.log(data)
// console.log(this.state.latestPeriode)
// console.log(periodeData)
//
console.log(index)
console
.
log
(
index
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
// this.getDataTable()
// this.getSubmission()
...
...
@@ -266,6 +266,20 @@ export default class SubHolding extends Component {
}
getReportType
()
{
console
.
log
(
'sini deh'
)
let
data
=
this
.
state
.
listPeriode
.
options
let
currentYear
=
new
Date
().
getFullYear
()
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
lastPeriod
)
let
dateNow
=
new
Date
()
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
let
yearNow
=
dateNow
.
getFullYear
()
// console.log(data)
// console.log(yearNow)
// console.log(periode)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
.
periode
==
(
String
(
this
.
state
.
report
.
label
).
toLocaleLowerCase
().
includes
(
'summary'
)
?
yearNow
:
periode
))
// console.log(index)
this
.
setState
({
periode
:
data
[
index
]})
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
src/container/MonthlyReport.js
View file @
e24c6e5f
...
...
@@ -1467,6 +1467,7 @@ export default class MonthlyReport extends Component {
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
},
item
.
order
,
item
.
profit_detail
.
notes
])
}
if
(
item
.
children
!==
null
)
{
...
...
@@ -1509,6 +1510,7 @@ export default class MonthlyReport extends Component {
{
value
:
item
.
profit_detail
.
november
,
formula
:
item
.
profit_detail
.
november_formula
}
:
{
value
:
item
.
profit_detail
.
december
,
formula
:
item
.
profit_detail
.
december_formula
},
item
.
order
,
item
.
profit_detail
.
notes
])
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
...
...
@@ -1768,12 +1770,14 @@ export default class MonthlyReport extends Component {
item
[
6
].
value
=
this
.
handleValueFormulaDBPLMR
(
item
[
6
],
item
,
6
)
listPL
.
push
({
"item_report_id"
:
item
[
1
],
"actual"
:
item
[
0
]
==
1
?
""
:
Number
(
item
[
6
].
value
).
toFixed
(
1
)
"actual"
:
item
[
0
]
==
1
?
""
:
Number
(
item
[
6
].
value
).
toFixed
(
1
),
"notes"
:
item
[
8
]
})
}
else
{
listPL
.
push
({
"item_report_id"
:
item
[
1
],
"actual"
:
item
[
0
]
==
1
?
""
:
Number
(
item
[
6
].
value
).
toFixed
(
1
)
"actual"
:
item
[
0
]
==
1
?
""
:
Number
(
item
[
6
].
value
).
toFixed
(
1
),
"notes"
:
item
[
8
]
})
}
...
...
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