Commit 132edc7b authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

issueeeeeeeeeeeee

See merge request !1247
parents 82626371 0805ec93
...@@ -279,6 +279,7 @@ const create = (type = "") => { ...@@ -279,6 +279,7 @@ const create = (type = "") => {
const getReportCFSumaMR = (body) => api.post('/transaction/summary_cash_flow/monthly_report/get_report_hierarki', body) const getReportCFSumaMR = (body) => api.post('/transaction/summary_cash_flow/monthly_report/get_report_hierarki', body)
const getReportCFSuma = (body) => api.post('/transaction/summary_cash_flow/summary/get_report_hierarki', body) const getReportCFSuma = (body) => api.post('/transaction/summary_cash_flow/summary/get_report_hierarki', body)
const getReportPLSuma = (body) => api.post('/transaction/summary_profit_loss/summary/get_report_hierarki', body) const getReportPLSuma = (body) => api.post('/transaction/summary_profit_loss/summary/get_report_hierarki', body)
const getReportPLSummary = (body) => api.post('/transaction/summary_profit_loss/summary/get_report_hierarki_summary', body)
const getReportFRSuma = (body) => api.post('/transaction/summary_ratio/summary/get_report_hierarki', body) const getReportFRSuma = (body) => api.post('/transaction/summary_ratio/summary/get_report_hierarki', body)
const getReportFRMB = (body) => api.post('/transaction/summary_ratio/master_budget/get_report_hierarki', body) const getReportFRMB = (body) => api.post('/transaction/summary_ratio/master_budget/get_report_hierarki', body)
const getReportFRMR = (body) => api.post('/transaction/summary_ratio/monthly_report/get_report_hierarki', body) const getReportFRMR = (body) => api.post('/transaction/summary_ratio/monthly_report/get_report_hierarki', body)
...@@ -660,6 +661,7 @@ const create = (type = "") => { ...@@ -660,6 +661,7 @@ const create = (type = "") => {
createReportCF, createReportCF,
getReportCFSuma, getReportCFSuma,
getReportPLSuma, getReportPLSuma,
getReportPLSummary,
getAllReportBS, getAllReportBS,
getAllReportPLDetail, getAllReportPLDetail,
getAllReportOI, getAllReportOI,
......
...@@ -1782,8 +1782,8 @@ export default class SubHolding extends Component { ...@@ -1782,8 +1782,8 @@ export default class SubHolding extends Component {
} else if (this.state.report.value === 8) { } else if (this.state.report.value === 8) {
let dbSumaPL = [] let dbSumaPL = []
let payloadPL = {...payload, report_id: 1, months: this.state.month.month_id, quarter: 0} let payloadPL = {...payload, report_id: 28, months: this.state.month.month_id, quarter: 0}
api.create().getReportPLSuma(payloadPL).then(response => { api.create().getReportPLSummary(payloadPL).then(response => {
console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
......
...@@ -105,7 +105,7 @@ export default class ProfitLossRO extends Component { ...@@ -105,7 +105,7 @@ export default class ProfitLossRO extends Component {
checkStatus = false checkStatus = false
} }
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev}) this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
} }
handleGetFor(type) { handleGetFor(type) {
...@@ -219,7 +219,7 @@ export default class ProfitLossRO extends Component { ...@@ -219,7 +219,7 @@ export default class ProfitLossRO extends Component {
}) })
} }
} else { } else {
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false}) this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, refresh: false })
} }
}) })
} }
...@@ -279,6 +279,7 @@ export default class ProfitLossRO extends Component { ...@@ -279,6 +279,7 @@ export default class ProfitLossRO extends Component {
} }
const handleValue = (value, data) => { const handleValue = (value, data) => {
console.log(data);
let total = 0 let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
if (data.rowData[1] == item[2]) { if (data.rowData[1] == item[2]) {
...@@ -491,7 +492,7 @@ export default class ProfitLossRO extends Component { ...@@ -491,7 +492,7 @@ export default class ProfitLossRO extends Component {
} }
} }
}, { }, {
name: `31 Dec ${Number(this.props.periode) - 1 } Actual`, name: `31 Dec ${Number(this.props.periode) - 1} Actual`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
...@@ -514,6 +515,57 @@ export default class ProfitLossRO extends Component { ...@@ -514,6 +515,57 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<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)}
// value={Number(handleValue(tableMeta, 0)).toFixed(1)}
/>
</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(handleFormula(tableMeta, 6)).toFixed(1)}
/>
}
/>
</div> :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -1153,7 +1205,7 @@ export default class ProfitLossRO extends Component { ...@@ -1153,7 +1205,7 @@ export default class ProfitLossRO extends Component {
<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%' }}>
{this.props.isApprover === true || this.state.get_for == 'view'? {this.props.isApprover === true || this.state.get_for == 'view' ?
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}> <div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download'} data-for="download"> <a data-tip={'Download'} data-for="download">
<button <button
...@@ -1280,7 +1332,7 @@ export default class ProfitLossRO extends Component { ...@@ -1280,7 +1332,7 @@ export default class ProfitLossRO extends Component {
outline: 'none', outline: 'none',
}} }}
onClick={() => { onClick={() => {
this.setState({loading: true}, () => { this.setState({ loading: true }, () => {
this.handleGetFor('edit') this.handleGetFor('edit')
}) })
}} }}
......
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