Commit 4e1e24f7 authored by Riri Novita's avatar Riri Novita

issue buton pl

parent ea1d8dea
...@@ -747,12 +747,18 @@ export default class ProfitLossMR extends Component { ...@@ -747,12 +747,18 @@ export default class ProfitLossMR extends Component {
// console.log(tableMeta) // console.log(tableMeta)
let total = 0 let total = 0
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
let value = Number(dataTable2[tableMeta.rowIndex - 2][11]) / Number(dataTable2[tableMeta.rowIndex - 1][11])
dataTable2[tableMeta.rowIndex][11] = R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
} else {
dataTable2[tableMeta.rowIndex].map((item, index) => { dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index == 10) { if (index == 10) {
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item
total = Number(tableMeta.rowData[23]) + Number(itemActual) total = Number(tableMeta.rowData[23]) + Number(itemActual)
} }
}) })
}
dataTable2[tableMeta.rowIndex][11] = Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][11] = Number(total).toFixed(1)
return total return total
...@@ -1805,7 +1811,7 @@ export default class ProfitLossMR extends Component { ...@@ -1805,7 +1811,7 @@ export default class ProfitLossMR extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
...@@ -2007,7 +2013,7 @@ export default class ProfitLossMR extends Component { ...@@ -2007,7 +2013,7 @@ export default class ProfitLossMR extends Component {
<div style={{ padding: 20 }}> <div style={{ padding: 20 }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}> <div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
...@@ -2022,7 +2028,7 @@ export default class ProfitLossMR extends Component { ...@@ -2022,7 +2028,7 @@ export default class ProfitLossMR extends Component {
)} )}
</div> </div>
<div className="grid grid-2x" style={{ marginTop: 20 }}> <div className="grid grid-2x" style={{ marginTop: 20 }}>
<div className="col-1"> <div className="col-1" style={{ paddingLeft: 0}}>
<button <button
type="button" type="button"
onClick={() => this.setState({ loading: true, visiblePLMR: true }, () => { onClick={() => this.setState({ loading: true, visiblePLMR: true }, () => {
...@@ -2042,7 +2048,7 @@ export default class ProfitLossMR extends Component { ...@@ -2042,7 +2048,7 @@ export default class ProfitLossMR extends Component {
</div> </div>
</button> </button>
</div> </div>
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%' }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
<button <button
className="button" className="button"
type="button" type="button"
......
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