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
d9749012
Commit
d9749012
authored
Jan 26, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update BS Summary
parent
0b4a2308
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
SubHolding.js
src/container/Laporan/SubHolding.js
+1
-1
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+18
-7
No files found.
src/container/Laporan/SubHolding.js
View file @
d9749012
...
...
@@ -1308,7 +1308,7 @@ export default class SubHolding extends Component {
"report_id"
:
this
.
state
.
report
.
value
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"months"
:
"1"
"months"
:
this
.
state
.
month
.
month_id
}
api
.
create
().
getReportBSSuma
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
...
...
src/container/Laporan/TableSubHolding.js
View file @
d9749012
...
...
@@ -1029,16 +1029,27 @@ export default class TableSubHolding extends Component {
return total
}
const handleMTDPercent = (tableMeta, dex, type) => {
let total = 0
// if (tableMeta.rowData[5] === "Cash and cash equivalent" ) {
// console.log(tableMeta);
// console.log(dataTable2);
// }
if (dex === 1) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][8])), NaN) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][8])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][8])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][8])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
} else if (dex === 2) {
total = R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][10])), NaN) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][10])), Infinity) ? "0" : R.equals((Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][10])), -Infinity) ? "0" : Number(dataTable2[tableMeta.rowIndex][7]) / Number(dataTable2[tableMeta.rowIndex][10])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = Number(total).toFixed(1)
}
return total
}
let datas = [
["ABCD", "Testing", { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }],
["Total Assets", "Notes", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
]
let dataSummaryBS = [
["ABCD", { a: "0", b: "0", c: "0", d: "0" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }],
["Total Assets", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
]
let dataSummaryPL = [
["ABCD", { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }, { a: "2", b: "3", c: "4", d: "5" }],
["Total Assets", { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }, { a: "6", b: "7", c: "8", d: "9" }]
...
...
@@ -15097,7 +15108,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
tableMeta.rowData[9]
).toFixed(1)}
value={Number(
handleMTDPercent(tableMeta, 1, 3)
).toFixed(1)}
/>
}
/>
...
...
@@ -15145,7 +15156,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
value={Number(
handleMTDPercent(tableMeta, 2, 5)
).toFixed(1)}
/>
}
/>
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