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
1e5f5218
Commit
1e5f5218
authored
Jan 29, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update!
parent
825b54e0
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
118 additions
and
80 deletions
+118
-80
SubHolding.js
src/container/Laporan/SubHolding.js
+111
-59
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+7
-21
No files found.
src/container/Laporan/SubHolding.js
View file @
1e5f5218
This diff is collapsed.
Click to expand it.
src/container/Laporan/TableSubHolding.js
View file @
1e5f5218
...
@@ -1042,22 +1042,6 @@ export default class TableSubHolding extends Component {
...
@@ -1042,22 +1042,6 @@ export default class TableSubHolding extends Component {
return total
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 = [
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" }],
["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" }]
["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" }]
...
@@ -15052,7 +15036,7 @@ export default class TableSubHolding extends Component {
...
@@ -15052,7 +15036,7 @@ export default class TableSubHolding extends Component {
}
}
}
}
}, {
}, {
name: `MTD
2021
`,
name: `MTD
${this.props.periode}
`,
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#000', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#000', backgroundColor: '#07a7d0', top: 0, zIndex: 102, fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
...
@@ -15180,8 +15164,9 @@ export default class TableSubHolding extends Component {
...
@@ -15180,8 +15164,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 70, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
suffix={`%`}
disabled={true}
disabled={true}
value={Number(
handleMTDPercent(tableMeta, 1, 3)
).toFixed(1)}
value={Number(
tableMeta.rowData[9]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15228,8 +15213,9 @@ export default class TableSubHolding extends Component {
...
@@ -15228,8 +15213,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
type="text"
placeholder=""
placeholder=""
suffix={'%'}
disabled={true}
disabled={true}
value={Number(
handleMTDPercent(tableMeta, 2, 5)
).toFixed(1)}
value={Number(
tableMeta.rowData[11]
).toFixed(1)}
/>
/>
}
}
/>
/>
...
@@ -15266,7 +15252,7 @@ export default class TableSubHolding extends Component {
...
@@ -15266,7 +15252,7 @@ export default class TableSubHolding extends Component {
}
}
}
}
}, {
}, {
name:
"2022"
,
name:
`${(this.props.periode) + 1}`
,
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
...
@@ -15311,7 +15297,7 @@ export default class TableSubHolding extends Component {
...
@@ -15311,7 +15297,7 @@ export default class TableSubHolding extends Component {
}
}
}
}
}, {
}, {
name:
"2023"
,
name:
`${(this.props.periode) + 2}`
,
options: {
options: {
customHeadRender: (columnMeta) => (
customHeadRender: (columnMeta) => (
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
<th style={{ ...style2, color: '#fff', backgroundColor: '#07a7d0', fontSize: 13, top: 0, zIndex: 102, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)", padding: 0 }} >
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