Commit 7c899035 authored by qorri_di's avatar qorri_di

Rollback CashFlowOLPA.js

parent 3b06cc2a
...@@ -173,7 +173,6 @@ export default class CashFlow extends Component { ...@@ -173,7 +173,6 @@ export default class CashFlow extends Component {
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december,
item.cash_flow.current_total,
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
...@@ -207,7 +206,6 @@ export default class CashFlow extends Component { ...@@ -207,7 +206,6 @@ export default class CashFlow extends Component {
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.october, formula: item.cash_flow.october_formula } : item.cash_flow.october,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.november, formula: item.cash_flow.november_formula } : item.cash_flow.november,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.cash_flow.december, formula: item.cash_flow.december_formula } : item.cash_flow.december,
item.cash_flow.current_total,
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
...@@ -330,7 +328,7 @@ export default class CashFlow extends Component { ...@@ -330,7 +328,7 @@ export default class CashFlow extends Component {
"october": String(item[15].value == undefined ? item[15] : Number(item[15].value).toFixed(1)), "october": String(item[15].value == undefined ? item[15] : Number(item[15].value).toFixed(1)),
"november": String(item[16].value == undefined ? item[16] : Number(item[16].value).toFixed(1)), "november": String(item[16].value == undefined ? item[16] : Number(item[16].value).toFixed(1)),
"december": String(item[17].value == undefined ? item[17] : Number(item[17].value).toFixed(1)), "december": String(item[17].value == undefined ? item[17] : Number(item[17].value).toFixed(1)),
"current_total": String(item[18].value == undefined ? item[18] : Number(item[18].value).toFixed(1)), "total_current_year": String(item[18]= '' ? Number(item[18]).toFixed(1) : item[19]),
} }
) )
}) })
...@@ -821,13 +819,14 @@ export default class CashFlow extends Component { ...@@ -821,13 +819,14 @@ export default class CashFlow extends Component {
<div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}> <div className="column-3" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"11"}</span> <span>{"11"}</span>
</div> </div>
<div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid" , backgroundColor: '#07a7d0' }}> <div className="column-4" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, borderRight: "1px #fff solid", backgroundColor: '#07a7d0' }}>
<span>{"12"}</span> <span>{"12"}</span>
</div> </div>
<div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}> <div className="column-5" style={{ placeSelf: 'center', textAlign: 'center', padding: 5, backgroundColor: '#07a7d0' }}>
<span>{"Current Total"}</span> <span>{"Current Total"}</span>
</div> </div>
</div> </div>
</div> </div>
</th> </th>
), ),
...@@ -835,7 +834,7 @@ export default class CashFlow extends Component { ...@@ -835,7 +834,7 @@ export default class CashFlow extends Component {
customBodyRender: (val, tableMeta, updateValue) => { customBodyRender: (val, tableMeta, updateValue) => {
return ( return (
<div> <div>
<div className="grid grid-4x content-center"> <div className="grid grid-3x content-center">
<div className="grid grid-4x content-center"> <div className="grid grid-4x content-center">
<div className="col-1"> <div className="col-1">
{ {
...@@ -1762,8 +1761,7 @@ export default class CashFlow extends Component { ...@@ -1762,8 +1761,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={Number(tableMeta.rowData[18]).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1775,12 +1773,11 @@ export default class CashFlow extends Component { ...@@ -1775,12 +1773,11 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={Number(tableMeta.rowData[18]).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 7 ?
((this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) >= Number(this.state.minValue) && (this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)) <= Number(this.state.maxValue)) ? ((Number(tableMeta.rowData[18]).toFixed(1))) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -1795,8 +1792,7 @@ export default class CashFlow extends Component { ...@@ -1795,8 +1792,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={Number(tableMeta.rowData[18]).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[23]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1813,8 +1809,7 @@ export default class CashFlow extends Component { ...@@ -1813,8 +1809,7 @@ export default class CashFlow extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[17].value).toFixed(1) : Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)} value={Number(tableMeta.rowData[18]).toFixed(1)}
// value={Number(handleValueFormula(tableMeta.rowData[17], tableMeta, 17)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
......
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