Commit 3e9838f2 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

Riri

See merge request !1462
parents 523d6da8 143ad8d0
...@@ -1385,7 +1385,7 @@ export default class SubHolding extends Component { ...@@ -1385,7 +1385,7 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.uom, item.uom,
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before, 0,
item.ratio.january, item.ratio.january,
item.ratio.february, item.ratio.february,
item.ratio.march, item.ratio.march,
...@@ -1424,6 +1424,77 @@ export default class SubHolding extends Component { ...@@ -1424,6 +1424,77 @@ export default class SubHolding extends Component {
item.ratio.monthly_last_year_october, item.ratio.monthly_last_year_october,
item.ratio.monthly_last_year_november, item.ratio.monthly_last_year_november,
item.ratio.monthly_last_year_december, item.ratio.monthly_last_year_december,
item.ratio.ro_ol_january,
item.ratio.ro_ol_february,
item.ratio.ro_ol_march,
item.ratio.ro_ol_april,
item.ratio.ro_ol_may,
item.ratio.ro_ol_june,
item.ratio.ro_ol_july,
item.ratio.ro_ol_august,
item.ratio.ro_ol_september,
item.ratio.ro_ol_october,
item.ratio.ro_ol_november,
item.ratio.ro_ol_december,
item.ratio.q1_january,
item.ratio.q1_february,
item.ratio.q1_march,
item.ratio.q1_april,
item.ratio.q1_may,
item.ratio.q1_june,
item.ratio.q1_july,
item.ratio.q1_august,
item.ratio.q1_september,
item.ratio.q1_october,
item.ratio.q1_november,
item.ratio.q1_december,
item.ratio.q2_january,
item.ratio.q2_february,
item.ratio.q2_march,
item.ratio.q2_april,
item.ratio.q2_may,
item.ratio.q2_june,
item.ratio.q2_july,
item.ratio.q2_august,
item.ratio.q2_september,
item.ratio.q2_october,
item.ratio.q2_november,
item.ratio.q2_december,
item.ratio.q3_january,
item.ratio.q3_february,
item.ratio.q3_march,
item.ratio.q3_april,
item.ratio.q3_may,
item.ratio.q3_june,
item.ratio.q3_july,
item.ratio.q3_august,
item.ratio.q3_september,
item.ratio.q3_october,
item.ratio.q3_november,
item.ratio.q3_december,
item.ratio.ol_january,
item.ratio.ol_february,
item.ratio.ol_march,
item.ratio.ol_april,
item.ratio.ol_may,
item.ratio.ol_june,
item.ratio.ol_july,
item.ratio.ol_august,
item.ratio.ol_september,
item.ratio.ol_october,
item.ratio.ol_november,
item.ratio.ol_december,
item.ratio.history_last_nine_year,
item.ratio.history_last_eight_year,
item.ratio.history_last_seven_year,
item.ratio.history_last_six_year,
item.ratio.history_last_five_year,
item.ratio.history_last_four_year,
item.ratio.history_last_three_year,
item.ratio.history_last_two_year,
item.ratio.history_last_year,
item.ratio.history_current_year,
]) ])
} }
if (item.children !== null) { if (item.children !== null) {
...@@ -1443,7 +1514,7 @@ export default class SubHolding extends Component { ...@@ -1443,7 +1514,7 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.oum, item.oum,
item.ratio.total_actual_before === null ? "0.0" : item.ratio.total_actual_before === "" ? "0.0" : item.ratio.total_actual_before, 0,
item.ratio.january, item.ratio.january,
item.ratio.february, item.ratio.february,
item.ratio.march, item.ratio.march,
...@@ -1482,6 +1553,76 @@ export default class SubHolding extends Component { ...@@ -1482,6 +1553,76 @@ export default class SubHolding extends Component {
item.ratio.monthly_last_year_october, item.ratio.monthly_last_year_october,
item.ratio.monthly_last_year_november, item.ratio.monthly_last_year_november,
item.ratio.monthly_last_year_december, item.ratio.monthly_last_year_december,
item.ratio.ro_ol_january,
item.ratio.ro_ol_february,
item.ratio.ro_ol_march,
item.ratio.ro_ol_april,
item.ratio.ro_ol_may,
item.ratio.ro_ol_june,
item.ratio.ro_ol_july,
item.ratio.ro_ol_august,
item.ratio.ro_ol_september,
item.ratio.ro_ol_october,
item.ratio.ro_ol_november,
item.ratio.ro_ol_december,
item.ratio.q1_january,
item.ratio.q1_february,
item.ratio.q1_march,
item.ratio.q1_april,
item.ratio.q1_may,
item.ratio.q1_june,
item.ratio.q1_july,
item.ratio.q1_august,
item.ratio.q1_september,
item.ratio.q1_october,
item.ratio.q1_november,
item.ratio.q1_december,
item.ratio.q2_january,
item.ratio.q2_february,
item.ratio.q2_march,
item.ratio.q2_april,
item.ratio.q2_may,
item.ratio.q2_june,
item.ratio.q2_july,
item.ratio.q2_august,
item.ratio.q2_september,
item.ratio.q2_october,
item.ratio.q2_november,
item.ratio.q2_december,
item.ratio.q3_january,
item.ratio.q3_february,
item.ratio.q3_march,
item.ratio.q3_april,
item.ratio.q3_may,
item.ratio.q3_june,
item.ratio.q3_july,
item.ratio.q3_august,
item.ratio.q3_september,
item.ratio.q3_october,
item.ratio.q3_november,
item.ratio.q3_december,
item.ratio.ol_january,
item.ratio.ol_february,
item.ratio.ol_march,
item.ratio.ol_april,
item.ratio.ol_may,
item.ratio.ol_june,
item.ratio.ol_july,
item.ratio.ol_august,
item.ratio.ol_september,
item.ratio.ol_october,
item.ratio.ol_november,
item.ratio.ol_december,
item.ratio.history_last_nine_year,
item.ratio.history_last_eight_year,
item.ratio.history_last_seven_year,
item.ratio.history_last_six_year,
item.ratio.history_last_five_year,
item.ratio.history_last_four_year,
item.ratio.history_last_three_year,
item.ratio.history_last_two_year,
item.ratio.history_last_year,
item.ratio.history_current_year,
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -221,7 +221,8 @@ export default class BalanceSheetRO extends Component { ...@@ -221,7 +221,8 @@ export default class BalanceSheetRO extends Component {
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year, item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong item.condition_if_wrong,
item.balance_sheet.forecast_formula == null ? [] : item.balance_sheet.forecast_formula
]) ])
} }
if (item.children !== null) { if (item.children !== null) {
...@@ -256,7 +257,8 @@ export default class BalanceSheetRO extends Component { ...@@ -256,7 +257,8 @@ export default class BalanceSheetRO extends Component {
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year, item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong item.condition_if_wrong,
item.balance_sheet.forecast_formula == null ? [] : item.balance_sheet.forecast_formula
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -670,6 +672,23 @@ export default class BalanceSheetRO extends Component { ...@@ -670,6 +672,23 @@ export default class BalanceSheetRO extends Component {
return total return total
} }
const handleForecast = (tableMeta, periode, column) => {
let total = 0
// console.log(tableMeta.rowData)
console.log( dataTable2[tableMeta.rowIndex][23])
// console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total
if (column == 19 && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
total = tableMeta.rowData[7].value
dataTable2[tableMeta.rowIndex][column] = tableMeta.rowData[7].value
} else {
total = handleValueFormula(dataTable2[tableMeta.rowIndex][column], tableMeta, column, periode, dataTable2[tableMeta.rowIndex][23])
}
// console.log(total)
return total
}
const handleValueFormula = (value, tableMeta, colIdx) => { const handleValueFormula = (value, tableMeta, colIdx) => {
let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/) let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/)
let baru = [] let baru = []
...@@ -718,7 +737,7 @@ export default class BalanceSheetRO extends Component { ...@@ -718,7 +737,7 @@ export default class BalanceSheetRO extends Component {
} }
} else { } else {
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode)) let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
// console.log(indexID) console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
// console.log(value.formula[indexID].value) // console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value let valuezz = value.formula[indexID].value
...@@ -2258,6 +2277,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2258,6 +2277,7 @@ export default class BalanceSheetRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
...@@ -2265,9 +2285,100 @@ export default class BalanceSheetRO extends Component { ...@@ -2265,9 +2285,100 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleTotal(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/> />
</span> </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div> :
tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -2286,6 +2397,24 @@ export default class BalanceSheetRO extends Component { ...@@ -2286,6 +2397,24 @@ export default class BalanceSheetRO extends Component {
display: false display: false
} }
}, },
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{ {
name: "", name: "",
options: { options: {
......
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