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
5390f937
Commit
5390f937
authored
Jan 20, 2021
by
rifkaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tbsubhold
parent
bf35abb2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+19
-1
No files found.
src/container/Laporan/TableSubHolding.js
View file @
5390f937
...
...
@@ -485,6 +485,7 @@ export default class TableSubHolding extends Component {
}
const handleFormulaRatio = (value, tableMeta, month) => {
// console.log(dataTable2)
let total = 0
if (month > 12) {
total = Number(dataTable2[35][7 + month])
...
...
@@ -500,6 +501,23 @@ export default class TableSubHolding extends Component {
return Number(hasil).toFixed(1)
}
const handleFormulaRatioMR = (value, tableMeta, month) => {
console.log(dataTable2)
let total = 0
if (month > 12) {
total = Number(dataTable2[35][21 + month])
} else {
for (let index = 0; index < month; index++) {
total += Number(dataTable2[35][22 + index])
// console.log(index);
}
total = total/month
}
let hasil = Number(value) / total
// console.log(hasil, value, total);
return Number(hasil).toFixed(1)
}
const columnDBBS = [{
name: "",
options: {
...
...
@@ -3816,7 +3834,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value
=
{
handleFormulaRatio
(
tableMeta
.
rowData
[
22
],
tableMeta
,
1
)}
value={handleFormulaRatio
MR
(tableMeta.rowData[22], tableMeta, 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