Commit 02bdf788 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

Riri

See merge request !1523
parents 5087ad5d 8dc60625
...@@ -26031,6 +26031,28 @@ export default class TableSubHolding extends Component { ...@@ -26031,6 +26031,28 @@ export default class TableSubHolding extends Component {
</div> </div>
</div> </div>
: :
this.props.type === 7 || this.props.type === 8 ?
<div style={{ paddingLeft: 20, paddingBottom: 40 }}>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, textDecorationLine: 'underline' }}>Notes:</Typography>
</div>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold' }}>Rolling Outlook (Full Year) or Rolling Budget (RB)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jan-Mar = MB figures</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Apr-Jun = OL Q1 figures or MB figures (if OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jul-Sep = OL Q2 figures or OL Q1 (if OL Q2 not available) or MB (if OL Q2 and OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Oct-Dec = OL Q3 figures or OL Q2 (if OL Q3 not available) and consecutive to the MB</Typography>
</div>
</div>
:
null null
} }
</div> </div>
...@@ -2685,6 +2685,25 @@ export default class BalanceSheetMR extends Component { ...@@ -2685,6 +2685,25 @@ export default class BalanceSheetMR extends Component {
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Notes : {this.state.notes}</Typography>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, textDecorationLine: 'underline' }}>Notes:</Typography>
</div>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold' }}>Rolling Outlook (Full Year) or Rolling Budget (RB)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jan-Mar = MB figures</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Apr-Jun = OL Q1 figures or MB figures (if OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jul-Sep = OL Q2 figures or OL Q1 (if OL Q2 not available) or MB (if OL Q2 and OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Oct-Dec = OL Q3 figures or OL Q2 (if OL Q3 not available) and consecutive to the MB</Typography>
</div>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */} (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */}
...@@ -2713,7 +2732,7 @@ export default class BalanceSheetMR extends Component { ...@@ -2713,7 +2732,7 @@ export default class BalanceSheetMR extends Component {
<div className="col-2"> <div className="col-2">
</div> : </div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
{this.state.get_for == 'view' && <button {this.state.get_for == 'view' && this.state.viewOnly && <button
className="button" className="button"
type="button" type="button"
style={{ style={{
......
...@@ -817,10 +817,10 @@ export default class ProfitLossMR extends Component { ...@@ -817,10 +817,10 @@ export default class ProfitLossMR extends Component {
if (dex === 1) { if (dex === 1) {
let selisih = Number(dataTable2[tableMeta.rowIndex][13]) let selisih = Number(dataTable2[tableMeta.rowIndex][13])
let prevMonth = Number(dataTable2[tableMeta.rowIndex][12]) let prevMonth = Number(dataTable2[tableMeta.rowIndex][12])
total = R.equals(selisih/prevMonth, 0) total = R.equals(selisih / prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN) || R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity) || R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100 || R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
// total = Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12]) // total = Number(dataTable2[tableMeta.rowIndex][13]) / Number(dataTable2[tableMeta.rowIndex][12])
...@@ -834,10 +834,10 @@ export default class ProfitLossMR extends Component { ...@@ -834,10 +834,10 @@ export default class ProfitLossMR extends Component {
} else if (dex === 2) { } else if (dex === 2) {
let selisih = Number(dataTable2[tableMeta.rowIndex][15]) let selisih = Number(dataTable2[tableMeta.rowIndex][15])
let prevMonth = Number(dataTable2[tableMeta.rowIndex][8]) let prevMonth = Number(dataTable2[tableMeta.rowIndex][8])
total = R.equals(selisih/prevMonth, 0) total = R.equals(selisih / prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN) || R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity) || R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100 || R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
...@@ -847,10 +847,10 @@ export default class ProfitLossMR extends Component { ...@@ -847,10 +847,10 @@ export default class ProfitLossMR extends Component {
} else if (dex === 3) { } else if (dex === 3) {
let selisih = Number(dataTable2[tableMeta.rowIndex][17]) let selisih = Number(dataTable2[tableMeta.rowIndex][17])
let prevMonth = Number(dataTable2[tableMeta.rowIndex][9]) let prevMonth = Number(dataTable2[tableMeta.rowIndex][9])
total = R.equals(selisih/prevMonth, 0) total = R.equals(selisih / prevMonth, 0)
|| R.equals(selisih/prevMonth, NaN) || R.equals(selisih / prevMonth, NaN)
|| R.equals(selisih/prevMonth, Infinity) || R.equals(selisih / prevMonth, Infinity)
|| R.equals(selisih/prevMonth, '-Infinity') ? 0 : (selisih/prevMonth) * 100 || R.equals(selisih / prevMonth, '-Infinity') ? 0 : (selisih / prevMonth) * 100
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = String(selisih).includes('-') ? Number(total * -1).toFixed(1) : Number(total).toFixed(1)
// total = Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9]) // total = Number(dataTable2[tableMeta.rowIndex][17]) / Number(dataTable2[tableMeta.rowIndex][9])
...@@ -884,7 +884,7 @@ export default class ProfitLossMR extends Component { ...@@ -884,7 +884,7 @@ export default class ProfitLossMR extends Component {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "sales price") {
let value = Number(dataTable2[tableMeta.rowIndex - 2][11]) / Number(dataTable2[tableMeta.rowIndex - 1][11]) 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)) 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)) return R.equals(value, NaN) ? "0.0" : (R.equals(value, Infinity) ? "0.0" : (value == "-Infinity" ? "0.0" : value))
} else { } else {
dataTable2[tableMeta.rowIndex][11] = Number(total).toFixed(1) dataTable2[tableMeta.rowIndex][11] = Number(total).toFixed(1)
...@@ -2102,21 +2102,40 @@ export default class ProfitLossMR extends Component { ...@@ -2102,21 +2102,40 @@ export default class ProfitLossMR extends Component {
)} )}
</div> </div>
<div style={{display: 'flex'}}> <div style={{ display: 'flex' }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 20 }}>Last Updated by : </Typography>
<div style={{marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10}}> <div style={{ marginLeft: 10, overflowY: 'scroll', height: this.state.updateBy.length < 2 ? 25 : 75, marginTop: 10 }}>
{ {
this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => { this.state.updateBy.length > 0 ? this.state.updateBy.reverse().map((item, index) => {
return ( return (
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>{item.latest_update}</Typography>
) )
}) : }) :
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 10, marginRight: 5 }}>-</Typography>
} }
</div> </div>
</div> </div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5 }}>Notes : {this.state.notesUpdate}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5 }}>Notes : {this.state.notesUpdate}</Typography>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, textDecorationLine: 'underline' }}>Notes:</Typography>
</div>
<div style={{ display: 'flex', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 5, fontWeight: 'bold' }}>Rolling Outlook (Full Year) or Rolling Budget (RB)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jan-Mar = MB figures</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Apr-Jun = OL Q1 figures or MB figures (if OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Jul-Sep = OL Q2 figures or OL Q1 (if OL Q2 not available) or MB (if OL Q2 and OL Q1 not available)</Typography>
</div>
<div style={{ display: 'flex', paddingLeft: 10, justifyContent: 'space-between', maxWidth: '100%', paddingRight: 15 }}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b', marginTop: 0 }}>Period Oct-Dec = OL Q3 figures or OL Q2 (if OL Q3 not available) and consecutive to the MB</Typography>
</div>
</div> </div>
{/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null : {/* {this.props.isApprover === true || this.state.dataTable.length == 0 ? null :
(this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */} (this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? */}
...@@ -2145,27 +2164,27 @@ export default class ProfitLossMR extends Component { ...@@ -2145,27 +2164,27 @@ export default class ProfitLossMR extends Component {
<div className="col-2"> <div className="col-2">
</div> : </div> :
<div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}> <div className="col-2" style={{ display: 'flex', justifyContent: 'flex-end', maxWidth: '100%', paddingRight: 5 }}>
{this.state.get_for == 'view' && {this.state.get_for == 'view' && this.state.viewOnly &&
<button <button
className="button" className="button"
type="button" type="button"
style={{ style={{
backgroundColor: 'transparent', backgroundColor: 'transparent',
cursor: 'pointer', cursor: 'pointer',
borderColor: 'transparent', borderColor: 'transparent',
outline: 'none', outline: 'none',
marginRight: 20 marginRight: 20
}} }}
onClick={() => { onClick={() => {
this.setState({ loading: true, refresh: true }, () => { this.setState({ loading: true, refresh: true }, () => {
this.handleGetFor('edit') this.handleGetFor('edit')
}) })
}} }}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}> <div style={{ backgroundColor: '#fff', width: 105, height: 25, borderRadius: 3, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #354960' }}>
<Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography> <Typography style={{ fontSize: '11px', color: '#354960', textAlign: 'center' }}>Edit</Typography>
</div> </div>
</button> </button>
} }
{this.state.get_for == 'edit' && <button {this.state.get_for == 'edit' && <button
className="button" className="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