Commit 9395c753 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

db ratio

See merge request !1008
parents bfc78019 ae8a46c4
......@@ -648,18 +648,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz)
if (indexIDzz != -1) {
dataTable2.push([...dataTable[indexIDzz],
Number(items.ratio.monthly_january).toFixed(1),
Number(items.ratio.monthly_february).toFixed(1),
Number(items.ratio.monthly_march).toFixed(1),
Number(items.ratio.monthly_april).toFixed(1),
Number(items.ratio.monthly_may).toFixed(1),
Number(items.ratio.monthly_june).toFixed(1),
Number(items.ratio.monthly_july).toFixed(1),
Number(items.ratio.monthly_august).toFixed(1),
Number(items.ratio.monthly_september).toFixed(1),
Number(items.ratio.monthly_october).toFixed(1),
Number(items.ratio.monthly_november).toFixed(1),
Number(items.ratio.monthly_december).toFixed(1),
Number(items.ratio.monthly_january).toFixed(2),
Number(items.ratio.monthly_february).toFixed(2),
Number(items.ratio.monthly_march).toFixed(2),
Number(items.ratio.monthly_april).toFixed(2),
Number(items.ratio.monthly_may).toFixed(2),
Number(items.ratio.monthly_june).toFixed(2),
Number(items.ratio.monthly_july).toFixed(2),
Number(items.ratio.monthly_august).toFixed(2),
Number(items.ratio.monthly_september).toFixed(2),
Number(items.ratio.monthly_october).toFixed(2),
Number(items.ratio.monthly_november).toFixed(2),
Number(items.ratio.monthly_december).toFixed(2),
])
}
if (items.children !== null) {
......@@ -672,18 +672,18 @@ export default class SubHolding extends Component {
}
dataTable2.push([...dataTable[indexID],
Number(item.ratio.monthly_january).toFixed(1),
Number(item.ratio.monthly_february).toFixed(1),
Number(item.ratio.monthly_march).toFixed(1),
Number(item.ratio.monthly_april).toFixed(1),
Number(item.ratio.monthly_may).toFixed(1),
Number(item.ratio.monthly_june).toFixed(1),
Number(item.ratio.monthly_july).toFixed(1),
Number(item.ratio.monthly_august).toFixed(1),
Number(item.ratio.monthly_september).toFixed(1),
Number(item.ratio.monthly_october).toFixed(1),
Number(item.ratio.monthly_november).toFixed(1),
Number(item.ratio.monthly_december).toFixed(1),
Number(item.ratio.monthly_january).toFixed(2),
Number(item.ratio.monthly_february).toFixed(2),
Number(item.ratio.monthly_march).toFixed(2),
Number(item.ratio.monthly_april).toFixed(2),
Number(item.ratio.monthly_may).toFixed(2),
Number(item.ratio.monthly_june).toFixed(2),
Number(item.ratio.monthly_july).toFixed(2),
Number(item.ratio.monthly_august).toFixed(2),
Number(item.ratio.monthly_september).toFixed(2),
Number(item.ratio.monthly_october).toFixed(2),
Number(item.ratio.monthly_november).toFixed(2),
Number(item.ratio.monthly_december).toFixed(2),
])
if (item.children !== null) {
......
......@@ -502,7 +502,7 @@ export default class TableSubHolding extends Component {
}
const handleFormulaRatioMR = (value, tableMeta, month) => {
console.log(dataTable2)
// console.log(dataTable2)
let total = 0
if (month > 12) {
total = Number(dataTable2[35][21 + month])
......@@ -515,7 +515,7 @@ export default class TableSubHolding extends Component {
}
let hasil = Number(value) / total
// console.log(hasil, value, total);
return Number(hasil).toFixed(1)
return Number(hasil).toFixed(2)
}
const columnDBBS = [{
......@@ -3875,8 +3875,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[9], tableMeta, 2)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[23], tableMeta, 2)}
/>
}
/>
......@@ -3896,8 +3896,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[9]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[23]).toFixed(2)}
/>
}
/>
......@@ -3917,9 +3917,9 @@ export default class TableSubHolding extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 90, backgroundColor: 'transparent' }}
type="text"
placeholder=""
value={0.0}
// value={0.0}
disabled={true}
// value={handleFormulaRatio(tableMeta.rowData[10], tableMeta, 3)}
value={handleFormulaRatioMR(tableMeta.rowData[24], tableMeta, 3)}
/>
}
/>
......@@ -3939,8 +3939,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[10]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[24]).toFixed(2)}
/>
}
/>
......@@ -3961,8 +3961,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[11], tableMeta, 4)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[25], tableMeta, 4)}
/>
}
/>
......@@ -3982,8 +3982,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[11]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[25]).toFixed(2)}
/>
}
/>
......@@ -4006,8 +4006,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[12], tableMeta, 5)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[26], tableMeta, 5)}
/>
}
/>
......@@ -4027,8 +4027,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[12]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[26]).toFixed(2)}
/>
}
/>
......@@ -4049,8 +4049,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[13], tableMeta, 6)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[27], tableMeta, 6)}
/>
}
/>
......@@ -4070,8 +4070,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[13]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[27]).toFixed(2)}
/>
}
/>
......@@ -4092,8 +4092,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[14], tableMeta, 7)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[28], tableMeta, 7)}
/>
}
/>
......@@ -4113,8 +4113,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[14]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[28]).toFixed(2)}
/>
}
/>
......@@ -4135,8 +4135,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[15], tableMeta, 8)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[29], tableMeta, 8)}
/>
}
/>
......@@ -4156,8 +4156,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[15]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[29]).toFixed(2)}
/>
}
/>
......@@ -4180,8 +4180,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[16], tableMeta, 9)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[30], tableMeta, 9)}
/>
}
/>
......@@ -4201,8 +4201,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[16]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[30]).toFixed(2)}
/>
}
/>
......@@ -4223,8 +4223,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[17], tableMeta, 10)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[31], tableMeta, 10)}
/>
}
/>
......@@ -4244,8 +4244,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[17]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[31]).toFixed(2)}
/>
}
/>
......@@ -4266,8 +4266,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[18], tableMeta, 11)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[32], tableMeta, 11)}
/>
}
/>
......@@ -4287,8 +4287,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[18]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[32]).toFixed(2)}
/>
}
/>
......@@ -4309,8 +4309,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={handleFormulaRatio(tableMeta.rowData[19], tableMeta, 12)}
// value={0.0}
value={handleFormulaRatioMR(tableMeta.rowData[33], tableMeta, 12)}
/>
}
/>
......@@ -4330,8 +4330,8 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={0.0}
// value={Number(tableMeta.rowData[19]).toFixed(1)}
// value={0.0}
value={Number(tableMeta.rowData[33]).toFixed(2)}
/>
}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment