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

issue buton pl

parent ea1d8dea
...@@ -746,13 +746,19 @@ export default class ProfitLossMR extends Component { ...@@ -746,13 +746,19 @@ export default class ProfitLossMR extends Component {
const handleTotal = (value, tableMeta) => { const handleTotal = (value, tableMeta) => {
// console.log(tableMeta) // console.log(tableMeta)
let total = 0 let total = 0
dataTable2[tableMeta.rowIndex].map((item, index) => { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
if (index == 10) { let value = Number(dataTable2[tableMeta.rowIndex - 2][11]) / Number(dataTable2[tableMeta.rowIndex - 1][11])
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item dataTable2[tableMeta.rowIndex][11] = R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
total = Number(tableMeta.rowData[23]) + Number(itemActual) 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) => {
if (index == 10) {
let itemActual = item == undefined || item == "" || item == "undefined" ? 0.0 : item
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