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
01971cb0
Commit
01971cb0
authored
Mar 06, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
formula
parent
7b42938f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
20 deletions
+43
-20
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+14
-5
CashFlowRO.js
src/container/RollingOutlook/CashFlowRO.js
+25
-13
RollingOutlook.js
src/container/RollingOutlook/RollingOutlook.js
+4
-2
No files found.
src/container/BudgetTahunan/CashFlow.js
View file @
01971cb0
...
...
@@ -739,7 +739,7 @@ export default class CashFlow extends Component {
return
total
}
const
handleFYTotal
=
(
val
,
tableMeta
)
=>
{
const
handleFYTotal
=
(
tableMeta
)
=>
{
let
total
=
0
// dataTable2[tableMeta.rowIndex].map((item, index) => {
// if (index == 18) {
...
...
@@ -762,8 +762,17 @@ export default class CashFlow extends Component {
let
totalBeginning
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
dataTable2
[
tableMeta
.
rowIndex
][
7
].
value
return
totalBeginning
}
else
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"cash at the end of the period"
)
{
let
totalEnd
=
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
dataTable2
[
tableMeta
.
rowIndex
][
18
].
value
return
totalEnd
console
.
log
(
tableMeta
.
rowIndex
);
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
19
])
+
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
19
])
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
()
==
"control (should be nil)"
)
{
let
cashOfTheEndFy
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
3
][
19
])
+
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
4
][
19
])
let
cahsOfTheEndDec
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
19
])
// console.log(cashOfTheEndFy);
// console.log(cahsOfTheEndDec);
let
value
=
Number
(
cashOfTheEndFy
)
-
Number
(
cahsOfTheEndDec
);
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
19
]);
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
(
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
(
value
==
"-Infinity"
?
"0.0"
:
value
))
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
19
]
=
total
return
total
...
...
@@ -3043,9 +3052,9 @@ export default class CashFlow extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
// value={Number(handleFYTotal(value,
tableMeta)).toFixed(1)}
value
=
{
Number
(
handleFYTotal
(
tableMeta
)).
toFixed
(
1
)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
value
=
{
value
}
//
value={value}
/
>
}
/
>
...
...
src/container/RollingOutlook/CashFlowRO.js
View file @
01971cb0
...
...
@@ -712,17 +712,8 @@ export default class CashFlow extends Component {
loading
=
false
return
total
}
const
handleTotal
=
(
val
,
tableMeta
)
=>
{
const
handleTotal
=
(
val
,
tableMeta
,
column
)
=>
{
let
total
=
0
// dataTable2[tableMeta.rowIndex].map((item, index) => {
// if (index == 18) {
// if (index >= 6 && index <= 17) {
// let valItem = item.value == undefined || item.value == "" ? 0 : item.value
// total += Number(valItem)
// }
// }
// })
dataTable2
[
tableMeta
.
rowIndex
].
map
((
item
,
index
)
=>
{
if
(
index
>=
6
&&
index
<=
17
)
{
...
...
@@ -735,13 +726,34 @@ export default class CashFlow extends Component {
let
totalBeginning
=
dataTable2
[
tableMeta
.
rowIndex
][
18
]
=
dataTable2
[
tableMeta
.
rowIndex
][
6
].
value
return
totalBeginning
}
else
if
(
String
(
tableMeta
.
rowData
[
5
]).
toLocaleLowerCase
()
==
"cash at the end of the period"
)
{
let
totalEnd
=
dataTable2
[
tableMeta
.
rowIndex
][
18
]
=
dataTable2
[
tableMeta
.
rowIndex
][
17
].
value
return
totalEnd
console
.
log
(
tableMeta
.
rowIndex
);
let
value
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
1
][
18
])
+
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
18
])
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
()
==
"control (should be nil)"
)
{
console
.
log
(
tableMeta
);
let
cashOfTheEndFy
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
3
][
18
])
+
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
4
][
18
])
let
cahsOfTheEndDec
=
Number
(
dataTable2
[
tableMeta
.
rowIndex
-
2
][
18
])
// console.log(cashOfTheEndFy);
// console.log(cahsOfTheEndDec);
let
value
=
Number
(
cashOfTheEndFy
)
-
Number
(
cahsOfTheEndDec
);
// console.log(tablSeMeta.rowIndex);
return
R
.
equals
(
value
,
NaN
)
?
"0.0"
:
(
R
.
equals
(
value
,
Infinity
)
?
"0.0"
:
(
value
==
"-Infinity"
?
"0.0"
:
value
))
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
18
]
=
total
return
total
}
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the beginning period") {
// let totalBeginning = dataTable2[tableMeta.rowIndex][18] = dataTable2[tableMeta.rowIndex][6].value
// return totalBeginning
// } else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "cash at the end of the period") {
// let totalEnd = dataTable2[tableMeta.rowIndex][18] = dataTable2[tableMeta.rowIndex][17].value
// return totalEnd
// } else {
// dataTable2[tableMeta.rowIndex][18] = total
// return total
// }
// console.log(total);
}
let
columns
=
[
...
...
@@ -1768,7 +1780,7 @@ export default class CashFlow extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(tableMeta.rowData[18]).toFixed(1)}
value
=
{
this
.
props
.
PLBSFAMSubmitted
?
Number
(
tableMeta
.
rowData
[
18
]).
toFixed
(
1
)
:
Number
(
handleTotal
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
PLBSFAMSubmitted
?
Number
(
tableMeta
.
rowData
[
18
]).
toFixed
(
1
)
:
Number
(
handleTotal
(
tableMeta
.
rowData
[
18
],
tableMeta
,
18
)).
toFixed
(
1
)}
/
>
<
/span
>
...
...
src/container/RollingOutlook/RollingOutlook.js
View file @
01971cb0
...
...
@@ -1533,13 +1533,15 @@ export default class RollingOutlook extends Component {
let
urlReport
=
items
===
14
?
"profit_loss"
:
items
===
15
?
"tax_planning"
:
items
===
16
?
"balance_sheet"
:
items
===
17
?
"cash_flow"
:
items
===
37
?
"cat"
:
null
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&quartal=
${
quarter
.
value
}
&&download_file_report_id=
${
downloadedFileReportId
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
}
&report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportId
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
===
null
?
""
:
rollingOutlookID
}
&
&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&quartal=
${
quarter
.
value
}
&
&download_file_report_id=
${
downloadedFileReportId
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/
${
urlReport
}
/rolling_outlook/export_rolling_outlook?rolling_outlook_id=
${
rollingOutlookID
===
null
?
""
:
rollingOutlookID
}
&
report_id=
${
report
[
4
]}
&company_id=
${
company
.
company_id
}
&year=
${
periode
.
periode
}
&revision=
${
report
[
2
]}
&quartal=
${
quarter
.
value
}
&download_file_report_id=
${
downloadedFileReportId
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
console
.
log
(
result
);
}
}
...
...
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