Commit 5b703adf authored by Riri Novita's avatar Riri Novita

Merge branch 'ENV-DEV' into 'ENV-STAGING'

full amount

See merge request !2036
parents 4fa4d1d7 f36aeab0
...@@ -189,6 +189,7 @@ const create = (type = "") => { ...@@ -189,6 +189,7 @@ const create = (type = "") => {
const searchParameter = (body) => api.post('setting/search_setting', body) const searchParameter = (body) => api.post('setting/search_setting', body)
const deleteParameter = (id) => api.post(`setting/delete_setting/${id}`) const deleteParameter = (id) => api.post(`setting/delete_setting/${id}`)
const getDataReport = () => api.get('setting_type/get_all_setting_type_by_report_submit_period_group') const getDataReport = () => api.get('setting_type/get_all_setting_type_by_report_submit_period_group')
const getFormatValue = () => api.get('setting_type/get_all_setting_type_by_money_format_group')
// MASTER DATA - CAT // MASTER DATA - CAT
const getAllMasterDataCat = () => api.get('item_report_company/get_all_item_report_company') const getAllMasterDataCat = () => api.get('item_report_company/get_all_item_report_company')
...@@ -649,6 +650,7 @@ const create = (type = "") => { ...@@ -649,6 +650,7 @@ const create = (type = "") => {
deleteUnitBisnis, deleteUnitBisnis,
deleteParameter, deleteParameter,
getDataReport, getDataReport,
getFormatValue,
deletePerusahaan, deletePerusahaan,
getDataCurrency, getDataCurrency,
deleteReportItems, deleteReportItems,
......
...@@ -58,6 +58,7 @@ const Images = { ...@@ -58,6 +58,7 @@ const Images = {
zip: require('./zip.png'), zip: require('./zip.png'),
warning: require('./warning.png'), warning: require('./warning.png'),
simulasiUpload: require('./upload-simulasi.png'), simulasiUpload: require('./upload-simulasi.png'),
information: require('./information.png'),
} }
export default Images export default Images
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -10,6 +10,7 @@ import { PropagateLoader } from 'react-spinners'; ...@@ -10,6 +10,7 @@ import { PropagateLoader } from 'react-spinners';
import { ExcelRenderer } from 'react-excel-renderer'; import { ExcelRenderer } from 'react-excel-renderer';
import Constant from '../../library/Constant'; import Constant from '../../library/Constant';
import UploadFile from "../../library/Upload"; import UploadFile from "../../library/Upload";
import { fixNumber } from '../../library/Utils';
const LightTooltip = withStyles((theme) => ({ const LightTooltip = withStyles((theme) => ({
tooltip: { tooltip: {
...@@ -96,7 +97,7 @@ export default class CashFlowMR extends Component { ...@@ -96,7 +97,7 @@ export default class CashFlowMR extends Component {
componentDidMount() { componentDidMount() {
// this.getItemHierarki() // this.getItemHierarki()
console.log(this.props.PLBSFAMSubmitted) console.log(this.props.PLBSFAMSubmitted)
// this.handleViewOnly() this.handleViewOnly()
this.getSettingControl() this.getSettingControl()
} }
...@@ -222,7 +223,7 @@ export default class CashFlowMR extends Component { ...@@ -222,7 +223,7 @@ export default class CashFlowMR extends Component {
// item[6].value = this.handleValueFormula(item, index) // item[6].value = this.handleValueFormula(item, index)
listCF.push({ listCF.push({
"item_report_id": item[1], "item_report_id": item[1],
"actual": item[0] == 1 ? "" : Number(item[6].value).toFixed(1) "actual": item[0] == 1 ? "" : this.props.defaultCurrency.id == 1 ? fixNumber(Number(item[6].value), 1) : Number(item[6].value)
}) })
// } else { // } else {
// listCF.push({ // listCF.push({
...@@ -609,7 +610,7 @@ export default class CashFlowMR extends Component { ...@@ -609,7 +610,7 @@ export default class CashFlowMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta, 6)).toFixed(1)} value={this.props.defaultCurrency.id == 1 ? (this.props.PLBSFAMSubmitted ? fixNumber(Number(tableMeta.rowData[6].value), 1) : fixNumber(Number(handleValueFormula(tableMeta, 6)), 1)) : this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value) : Number(handleValueFormula(tableMeta, 6))}
/> />
</span> </span>
: :
...@@ -624,7 +625,8 @@ export default class CashFlowMR extends Component { ...@@ -624,7 +625,8 @@ export default class CashFlowMR extends Component {
// value={Number(handleValueFormula(tableMeta, 6)).toFixed(1)} // value={Number(handleValueFormula(tableMeta, 6)).toFixed(1)}
// /> // />
// </span> // </span>
(Number(handleValueFormula(tableMeta, 6)).toFixed(1) > Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 6)).toFixed(1) < Number(this.state.maxValue)) ? this.props.defaultCurrency.id == 1 ?
(fixNumber(Number(handleValueFormula(tableMeta, 6)), 1) > Number(this.state.minValue) && fixNumber(Number(handleValueFormula(tableMeta, 6)), 1) < Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -639,7 +641,7 @@ export default class CashFlowMR extends Component { ...@@ -639,7 +641,7 @@ export default class CashFlowMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta, 6)).toFixed(1)} value={this.props.PLBSFAMSubmitted ? fixNumber(Number(tableMeta.rowData[6].value), 1) : fixNumber(Number(handleValueFormula(tableMeta, 6)), 1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? null : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? null : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -656,7 +658,43 @@ export default class CashFlowMR extends Component { ...@@ -656,7 +658,43 @@ export default class CashFlowMR extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value).toFixed(1) : Number(handleValueFormula(tableMeta, 6)).toFixed(1)} value={this.props.PLBSFAMSubmitted ? fixNumber(Number(tableMeta.rowData[6].value), 1) : fixNumber(Number(handleValueFormula(tableMeta, 6)), 1)}
/>
</LightTooltip>
:
(Number(handleValueFormula(tableMeta, 6)) > Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 6)) < Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value) : Number(handleValueFormula(tableMeta, 6))}
/> :
<LightTooltip title={this.state.minValue === null ? null : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={this.props.PLBSFAMSubmitted ? Number(tableMeta.rowData[6].value) : Number(handleValueFormula(tableMeta, 6))}
/> />
</LightTooltip> </LightTooltip>
: null} : null}
......
...@@ -1531,8 +1531,23 @@ export default class MonthlyReport extends Component { ...@@ -1531,8 +1531,23 @@ export default class MonthlyReport extends Component {
createCashFlow(payload) { createCashFlow(payload) {
console.log(JSON.stringify(payload)) console.log(JSON.stringify(payload))
api.create().createMonthlyReportCF(payload).then((res) => { api.create().createMonthlyReportCF(payload).then((res) => {
if (res.data.status === "success") {
this.saveToMonthlyReport() this.saveToMonthlyReport()
console.log(res) console.log(res)
} else {
if (res.data?.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ alert: true, messageAlert: res.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (res.data.message.includes("Someone Logged In") || res.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
}
}) })
} }
...@@ -3763,7 +3778,7 @@ export default class MonthlyReport extends Component { ...@@ -3763,7 +3778,7 @@ export default class MonthlyReport extends Component {
marginRight: 20, marginRight: 20,
borderRadius: 9 borderRadius: 9
}} }}
onClick={() => this.setState({ visibleAlertSave: false })} onClick={() => this.setState({ visibleAlertSave: false, loading: false })}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}> <div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography> <Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
This diff is collapsed.
...@@ -1290,7 +1290,7 @@ export default class OperatingIndicator extends Component { ...@@ -1290,7 +1290,7 @@ export default class OperatingIndicator extends Component {
marginRight: 20, marginRight: 20,
borderRadius: 9 borderRadius: 9
}} }}
onClick={() => this.setState({ visibleAlertSave: false, handleDoubleClick: 0 })} onClick={() => this.setState({ visibleAlertSave: false, handleDoubleClick: 0, loading: false })}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}> <div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography> <Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -841,21 +841,21 @@ export default class SubHolding extends Component { ...@@ -841,21 +841,21 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before, item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
Number(item.balance_sheet.january).toFixed(1), Number(item.balance_sheet.january),
Number(item.balance_sheet.february).toFixed(1), Number(item.balance_sheet.february),
Number(item.balance_sheet.march).toFixed(1), Number(item.balance_sheet.march),
Number(item.balance_sheet.april).toFixed(1), Number(item.balance_sheet.april),
Number(item.balance_sheet.may).toFixed(1), Number(item.balance_sheet.may),
Number(item.balance_sheet.june).toFixed(1), Number(item.balance_sheet.june),
Number(item.balance_sheet.july).toFixed(1), Number(item.balance_sheet.july),
Number(item.balance_sheet.august).toFixed(1), Number(item.balance_sheet.august),
Number(item.balance_sheet.september).toFixed(1), Number(item.balance_sheet.september),
Number(item.balance_sheet.october).toFixed(1), Number(item.balance_sheet.october),
Number(item.balance_sheet.november).toFixed(1), Number(item.balance_sheet.november),
Number(item.balance_sheet.december).toFixed(1), Number(item.balance_sheet.december),
Number(item.balance_sheet.total_current_year).toFixed(1), Number(item.balance_sheet.total_current_year),
Number(item.balance_sheet.total_next_year).toFixed(1), Number(item.balance_sheet.total_next_year),
Number(item.balance_sheet.total_more_year).toFixed(1), Number(item.balance_sheet.total_more_year),
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
...@@ -975,21 +975,21 @@ export default class SubHolding extends Component { ...@@ -975,21 +975,21 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before, item.balance_sheet.total_actual_before === null ? "0.0" : item.balance_sheet.total_actual_before === "" ? "0.0" : item.balance_sheet.total_actual_before,
Number(item.balance_sheet.january).toFixed(1), Number(item.balance_sheet.january),
Number(item.balance_sheet.february).toFixed(1), Number(item.balance_sheet.february),
Number(item.balance_sheet.march).toFixed(1), Number(item.balance_sheet.march),
Number(item.balance_sheet.april).toFixed(1), Number(item.balance_sheet.april),
Number(item.balance_sheet.may).toFixed(1), Number(item.balance_sheet.may),
Number(item.balance_sheet.june).toFixed(1), Number(item.balance_sheet.june),
Number(item.balance_sheet.july).toFixed(1), Number(item.balance_sheet.july),
Number(item.balance_sheet.august).toFixed(1), Number(item.balance_sheet.august),
Number(item.balance_sheet.september).toFixed(1), Number(item.balance_sheet.september),
Number(item.balance_sheet.october).toFixed(1), Number(item.balance_sheet.october),
Number(item.balance_sheet.november).toFixed(1), Number(item.balance_sheet.november),
Number(item.balance_sheet.december).toFixed(1), Number(item.balance_sheet.december),
Number(item.balance_sheet.total_current_year).toFixed(1), Number(item.balance_sheet.total_current_year),
Number(item.balance_sheet.total_next_year).toFixed(1), Number(item.balance_sheet.total_next_year),
Number(item.balance_sheet.total_more_year).toFixed(1), Number(item.balance_sheet.total_more_year),
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
...@@ -1905,8 +1905,8 @@ export default class SubHolding extends Component { ...@@ -1905,8 +1905,8 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.uom, item.uom,
item.master_budget.total_actual_before == "" ? item.master_budget.total_actual_before : String(item.master_budget.total_actual_before).indexOf(".") == -1 ? Number(item.master_budget.total_actual_before) : Number(item.master_budget.total_actual_before).toFixed(1), item.master_budget.total_actual_before == "" ? item.master_budget.total_actual_before : String(item.master_budget.total_actual_before).indexOf(".") == -1 ? Number(item.master_budget.total_actual_before) : Number(item.master_budget.total_actual_before),
item.master_budget.january == "" ? item.master_budget.january : String(item.master_budget.january).indexOf(".") == -1 ? Number(item.master_budget.january) : Number(item.master_budget.january).toFixed(1), item.master_budget.january == "" ? item.master_budget.january : String(item.master_budget.january).indexOf(".") == -1 ? Number(item.master_budget.january) : Number(item.master_budget.january),
item.master_budget.february == "" ? item.master_budget.february : String(item.master_budget.february).indexOf(".") == -1 ? Number(item.master_budget.february) : Number(item.master_budget.february).toFixed(1), item.master_budget.february == "" ? item.master_budget.february : String(item.master_budget.february).indexOf(".") == -1 ? Number(item.master_budget.february) : Number(item.master_budget.february).toFixed(1),
item.master_budget.march == "" ? item.master_budget.march : String(item.master_budget.march).indexOf(".") == -1 ? Number(item.master_budget.march) : Number(item.master_budget.march).toFixed(1), item.master_budget.march == "" ? item.master_budget.march : String(item.master_budget.march).indexOf(".") == -1 ? Number(item.master_budget.march) : Number(item.master_budget.march).toFixed(1),
item.master_budget.april == "" ? item.master_budget.april : String(item.master_budget.april).indexOf(".") == -1 ? Number(item.master_budget.april) : Number(item.master_budget.april).toFixed(1), item.master_budget.april == "" ? item.master_budget.april : String(item.master_budget.april).indexOf(".") == -1 ? Number(item.master_budget.april) : Number(item.master_budget.april).toFixed(1),
...@@ -1951,8 +1951,8 @@ export default class SubHolding extends Component { ...@@ -1951,8 +1951,8 @@ export default class SubHolding extends Component {
item.level, item.level,
item.description, item.description,
item.uom, item.uom,
item.master_budget.total_actual_before == "" ? item.master_budget.total_actual_before : String(item.master_budget.total_actual_before).indexOf(".") == -1 ? Number(item.master_budget.total_actual_before) : Number(item.master_budget.total_actual_before).toFixed(1), item.master_budget.total_actual_before == "" ? item.master_budget.total_actual_before : String(item.master_budget.total_actual_before).indexOf(".") == -1 ? Number(item.master_budget.total_actual_before) : Number(item.master_budget.total_actual_before),
item.master_budget.january == "" ? item.master_budget.january : String(item.master_budget.january).indexOf(".") == -1 ? Number(item.master_budget.january) : Number(item.master_budget.january).toFixed(1), item.master_budget.january == "" ? item.master_budget.january : String(item.master_budget.january).indexOf(".") == -1 ? Number(item.master_budget.january) : Number(item.master_budget.january),
item.master_budget.february == "" ? item.master_budget.february : String(item.master_budget.february).indexOf(".") == -1 ? Number(item.master_budget.february) : Number(item.master_budget.february).toFixed(1), item.master_budget.february == "" ? item.master_budget.february : String(item.master_budget.february).indexOf(".") == -1 ? Number(item.master_budget.february) : Number(item.master_budget.february).toFixed(1),
item.master_budget.march == "" ? item.master_budget.march : String(item.master_budget.march).indexOf(".") == -1 ? Number(item.master_budget.march) : Number(item.master_budget.march).toFixed(1), item.master_budget.march == "" ? item.master_budget.march : String(item.master_budget.march).indexOf(".") == -1 ? Number(item.master_budget.march) : Number(item.master_budget.march).toFixed(1),
item.master_budget.april == "" ? item.master_budget.april : String(item.master_budget.april).indexOf(".") == -1 ? Number(item.master_budget.april) : Number(item.master_budget.april).toFixed(1), item.master_budget.april == "" ? item.master_budget.april : String(item.master_budget.april).indexOf(".") == -1 ? Number(item.master_budget.april) : Number(item.master_budget.april).toFixed(1),
......
This diff is collapsed.
This diff is collapsed.
...@@ -2760,7 +2760,7 @@ export default class RollingOutlook extends Component { ...@@ -2760,7 +2760,7 @@ export default class RollingOutlook extends Component {
marginRight: 20, marginRight: 20,
borderRadius: 9 borderRadius: 9
}} }}
onClick={() => this.setState({ visibleAlertSave: false })} onClick={() => this.setState({ visibleAlertSave: false, loading: false })}
> >
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}> <div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography> <Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
This diff is collapsed.
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