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
c875310d
Commit
c875310d
authored
Jan 22, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak
parent
217d2dea
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1686 additions
and
97 deletions
+1686
-97
index.js
src/api/index.js
+14
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+537
-5
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+10
-2
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+54
-54
FixedAssetsMovement.js
src/container/BudgetTahunan/FixedAssetsMovement.js
+10
-2
ProfitLoss.js
src/container/BudgetTahunan/ProfitLoss.js
+10
-2
SubHolding.js
src/container/Laporan/SubHolding.js
+168
-7
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+819
-1
MonthlyReport.js
src/container/MonthlyReport.js
+30
-14
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+10
-2
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+4
-3
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+10
-2
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+10
-2
No files found.
src/api/index.js
View file @
c875310d
...
...
@@ -233,6 +233,14 @@ const create = (type = "") => {
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/db_profit_loss_detail/get_report_hierarki'
,
body
)
const
getLastestUpdateMROI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/monthly_report/get_latest_update'
,
body
)
//REPORT NEW
const
getReportBSMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/master_budget/get_report_hierarki'
,
body
)
const
getReportBSMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/monthly_report/get_report_hierarki'
,
body
)
const
getReportPLDetailMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss_detail/master_budget/get_report_hierarki'
,
body
)
const
getReportPLDetailMR
=
(
body
)
=>
api
.
post
(
'/transaction/db_profit_loss_detail/monthly_report/get_report_hierarki'
,
body
)
const
getReportPLMB
=
(
body
)
=>
api
.
post
(
'/transaction/db_report_detail/get_report_hierarki'
,
body
)
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
...
...
@@ -572,7 +580,12 @@ const create = (type = "") => {
getListUserSubcoMB
,
getListUserSubcoMR
,
validateSubmitReportFAM
,
createMonthlyReportCF
createMonthlyReportCF
,
getReportBSMB
,
getReportBSMR
,
getReportPLDetailMB
,
getReportPLDetailMR
,
getReportPLMB
}
}
...
...
src/container/BudgetTahunan.js
View file @
c875310d
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/BalanceSheet.js
View file @
c875310d
...
...
@@ -264,7 +264,11 @@ export default class BalanceSheet extends Component {
}
// console.log(data);
this
.
setState
({
loading
:
false
})
this
.
props
.
saveToMasterBudget
(
payload
)
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payload
,
'BS'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
}
this
.
props
.
onClickClose
()
}
...
...
@@ -431,7 +435,11 @@ export default class BalanceSheet extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
getReport
(
'BS'
)
}
else
{
this
.
props
.
getReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
c875310d
This diff is collapsed.
Click to expand it.
src/container/BudgetTahunan/FixedAssetsMovement.js
View file @
c875310d
...
...
@@ -259,7 +259,11 @@ export default class FixedAssetsMovement extends Component {
"fixed_asset_movement"
:
data
}
// // console.log(data);
this
.
props
.
saveToMasterBudget
(
payload
)
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payload
,
'FAM'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
}
this
.
props
.
onClickClose
()
}
...
...
@@ -431,7 +435,11 @@ export default class FixedAssetsMovement extends Component {
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
getReport
(
'FAM'
)
}
else
{
this
.
props
.
getReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
src/container/BudgetTahunan/ProfitLoss.js
View file @
c875310d
...
...
@@ -272,7 +272,11 @@ export default class ProfitLoss extends Component {
}
// console.log(data);
this
.
setState
({
loading
:
false
})
this
.
props
.
saveToMasterBudget
(
payload
)
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payload
,
'PL'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payload
)
}
this
.
props
.
onClickClose
()
}
...
...
@@ -432,7 +436,11 @@ export default class ProfitLoss extends Component {
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
getReport
(
'PL'
)
}
else
{
this
.
props
.
getReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
src/container/Laporan/SubHolding.js
View file @
c875310d
This diff is collapsed.
Click to expand it.
src/container/Laporan/TableSubHolding.js
View file @
c875310d
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport.js
View file @
c875310d
...
...
@@ -70,7 +70,8 @@ export default class MonthlyReport extends Component {
detailRevisiCheck
:
[],
isApprovedMB
:
false
,
textRevision
:
''
,
dbCF
:
[]
dbCF
:
[],
PLBSFAMSubmitted
:
false
}
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -575,7 +576,7 @@ export default class MonthlyReport extends Component {
})
}
getMonthlyReportID
()
{
getMonthlyReportID
(
type
)
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
...
...
@@ -600,7 +601,7 @@ export default class MonthlyReport extends Component {
// // console.log(this.state.lastStatus);
this
.
historyApproval
()
this
.
getLatestPeriodSubmit
()
this
.
getCashFlow
()
this
.
getCashFlow
(
type
)
// this.getReport()
// this.getReportAttachment()
api
.
create
().
checkApproverMonthly
().
then
(
response
=>
{
...
...
@@ -674,7 +675,7 @@ export default class MonthlyReport extends Component {
})
}
saveToMonthlyReport
()
{
saveToMonthlyReport
(
type
)
{
this
.
setState
({
visibleMonthlyReport
:
true
,
visibleBS
:
false
,
...
...
@@ -685,7 +686,7 @@ export default class MonthlyReport extends Component {
visibleLOCF
:
false
,
visibleOI
:
false
,
},
()
=>
{
this
.
getMonthlyReportID
()
this
.
getMonthlyReportID
(
type
)
})
}
...
...
@@ -695,6 +696,7 @@ export default class MonthlyReport extends Component {
console
.
log
(
revision
)
console
.
log
(
item
)
let
items
=
''
let
PLBSFAMSubmitted
=
0
if
(
item
===
'Corporate Annual Target'
)
{
items
=
'CAT'
}
else
{
...
...
@@ -708,6 +710,11 @@ export default class MonthlyReport extends Component {
this
.
setState
({
prevRevision
:
false
})
}
}
if
(
String
(
i
.
report_name
).
toLocaleLowerCase
()
==
"profit loss"
||
String
(
i
.
report_name
).
toLocaleLowerCase
()
==
"balance sheet"
||
String
(
i
.
report_name
).
toLocaleLowerCase
()
==
"fixed assets movement"
)
{
if
(
String
(
i
.
current_status
).
toLocaleLowerCase
()
==
"submitted"
)
{
PLBSFAMSubmitted
+=
1
}
}
})
this
.
setState
({
report_id
:
id
,
...
...
@@ -810,6 +817,7 @@ export default class MonthlyReport extends Component {
visibleLOCF
:
false
,
visibleOI
:
false
,
visibleCF
:
true
,
PLBSFAMSubmitted
:
PLBSFAMSubmitted
==
3
?
true
:
false
})
}
})
...
...
@@ -993,14 +1001,11 @@ export default class MonthlyReport extends Component {
if
(
type
==
'revision'
)
{
api
.
create
().
createPeriodeRevisionMonthly
(
payload
).
then
((
res
))
}
if
(
type
==
"approve"
)
{
this
.
createCashFlow
()
}
this
.
getMonthlyReportID
()
})
}
getCashFlow
()
{
getCashFlow
(
type
)
{
let
payload
=
{
"report_id"
:
13
,
"revision"
:
Number
(
this
.
state
.
lastRevision
),
...
...
@@ -1061,7 +1066,7 @@ export default class MonthlyReport extends Component {
})
console
.
log
(
dataTable
)
this
.
setState
({
dbCF
:
dataTable
,
loading
:
false
},
()
=>
{
this
.
olahDataCashFlow
(
this
.
state
.
dbCF
)
this
.
olahDataCashFlow
(
this
.
state
.
dbCF
,
type
)
})
}
})
...
...
@@ -1290,7 +1295,7 @@ export default class MonthlyReport extends Component {
return
total
}
olahDataCashFlow
(
dbCF
)
{
olahDataCashFlow
(
dbCF
,
type
)
{
dbCF
.
map
((
item
,
index
)
=>
{
if
(
item
[
0
]
==
5
||
item
[
0
]
==
6
)
{
item
[
6
].
value
=
this
.
handleValueFormula
(
item
,
index
)
...
...
@@ -1298,11 +1303,11 @@ export default class MonthlyReport extends Component {
})
// console.log(dbCF)
this
.
setState
({
dbCF
},
()
=>
{
this
.
payloadCF
()
this
.
payloadCF
(
type
)
})
}
payloadCF
()
{
payloadCF
(
type
)
{
let
listCF
=
[]
this
.
state
.
dbCF
.
map
((
item
,
index
)
=>
{
if
(
item
[
6
].
value
==
""
||
item
[
6
].
value
==
0
||
item
[
6
].
value
==
"0.0"
)
{
...
...
@@ -1321,7 +1326,14 @@ export default class MonthlyReport extends Component {
})
// console.log(listCF)
this
.
setState
({
dbCF
:
listCF
})
this
.
setState
({
dbCF
:
listCF
}
,
()
=>
{
if
(
type
!=
undefined
)
{
if
(
type
==
'BS'
||
type
==
'FAM'
||
type
==
'PL'
)
{
console
.
log
(
'tarik sis'
)
this
.
createCashFlow
()
}
}
})
}
createCashFlow
()
{
...
...
@@ -2135,6 +2147,7 @@ export default class MonthlyReport extends Component {
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
createCF
=
{
this
.
createCashFlow
.
bind
(
this
)}
// getReport={this.getCompanyActive.bind(this)}
/
>
)}
...
...
@@ -2155,6 +2168,7 @@ export default class MonthlyReport extends Component {
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
createCF
=
{
this
.
createCashFlow
.
bind
(
this
)}
// getReport={this.getCompanyActive.bind(this)}
/
>
...
...
@@ -2197,6 +2211,7 @@ export default class MonthlyReport extends Component {
isApprover
=
{
this
.
state
.
isApprover
}
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
createCF
=
{
this
.
createCashFlow
.
bind
(
this
)}
prevRevision
=
{
this
.
state
.
isSubmit
?
this
.
state
.
prevRevision
:
true
}
/
>
)}
...
...
@@ -2271,6 +2286,7 @@ export default class MonthlyReport extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleCF
:
false
,
visibleMonthlyReport
:
true
})}
status
=
{
this
.
state
.
status
}
lastStatus
=
{
this
.
state
.
lastStatus
}
PLBSFAMSubmitted
=
{
this
.
state
.
PLBSFAMSubmitted
}
/
>
)}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
c875310d
...
...
@@ -468,7 +468,11 @@ export default class BalanceSheetMR extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// this.props.onClickClose()
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'BS'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
})
// this.props.getReport()
}
else
{
...
...
@@ -524,7 +528,11 @@ export default class BalanceSheetMR extends Component {
console
.
log
(
JSON
.
stringify
(
payload
))
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'BS'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
}
else
{
this
.
setState
({
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
this
.
props
.
saveToMonthlyReport
()
...
...
src/container/MonthlyReport/CashFlowMR.js
View file @
c875310d
...
...
@@ -53,6 +53,7 @@ export default class CashFlowMR extends Component {
componentDidMount
()
{
// this.getItemHierarki()
console
.
log
(
this
.
props
.
PLBSFAMSubmitted
)
this
.
getSettingControl
()
}
...
...
@@ -492,7 +493,7 @@ export default class CashFlowMR extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
props
.
status
==
'approved'
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
PLBSFAMSubmitted
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
/
>
<
/span>
:
...
...
@@ -522,7 +523,7 @@ export default class CashFlowMR extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
props
.
status
==
'approved'
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
PLBSFAMSubmitted
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
/>
:
<
LightTooltip
title
=
{
this
.
state
.
minValue
===
null
?
null
:
`Value Should be (
${
this
.
state
.
minValue
}
) up to (
${
this
.
state
.
maxValue
}
)`
}
arrow
>
<
NumberFormat
...
...
@@ -539,7 +540,7 @@ export default class CashFlowMR extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
this
.
props
.
status
==
'approved'
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
PLBSFAMSubmitted
?
Number
(
tableMeta
.
rowData
[
6
].
value
)
:
Number
(
handleValueFormula
(
tableMeta
,
6
)).
toFixed
(
1
)}
/
>
<
/LightTooltip
>
:
null
}
...
...
src/container/MonthlyReport/FixedAssetsMovementMR.js
View file @
c875310d
...
...
@@ -372,7 +372,11 @@ export default class FixedAssetsMovementMR extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
// this.props.onClickClose()
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'FAM'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -421,7 +425,11 @@ export default class FixedAssetsMovementMR extends Component {
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'FAM'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
}
else
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
props
.
saveToMonthlyReport
()
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
c875310d
...
...
@@ -409,7 +409,11 @@ export default class ProfitLossMR extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'PL'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleTekTekTek
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
...
...
@@ -563,7 +567,11 @@ export default class ProfitLossMR extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMonthlyReport
(
'PL'
)
}
else
{
this
.
props
.
saveToMonthlyReport
()
}
// this.props.onClickClose()
// this.props.getReport()
}
else
{
...
...
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