Commit 141b24be authored by d.arizona's avatar d.arizona

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into didam

parents 1f629803 38f11939
......@@ -158,9 +158,6 @@ export default class FixedAssetsMovementMR extends Component {
item.fixed_asset_movement.mtd_mb === "" ? "0.0" : item.fixed_asset_movement.mtd_mb,
item.fixed_asset_movement.mtd_rb === "" ? "0.0" : item.fixed_asset_movement.mtd_rb,
item.fixed_asset_movement.mtd_actual === "" ? "0.0" : item.fixed_asset_movement.mtd_actual,
// item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
// item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
// item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
item.fixed_asset_movement.act_vs_mb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_amount,
item.fixed_asset_movement.act_vs_mb_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_percent,
item.fixed_asset_movement.act_vs_rb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_rb_amount,
......@@ -188,9 +185,6 @@ export default class FixedAssetsMovementMR extends Component {
item.fixed_asset_movement.mtd_mb === "" ? "0.0" : item.fixed_asset_movement.mtd_mb,
item.fixed_asset_movement.mtd_rb === "" ? "0.0" : item.fixed_asset_movement.mtd_rb,
item.fixed_asset_movement.mtd_actual === "" ? "0.0" : item.fixed_asset_movement.mtd_actual,
// item.fixed_asset_movement.act_previous_month === "" ? "0.0" : item.fixed_asset_movement.act_previous_month,
// item.fixed_asset_movement.act_vs_prev_month_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_amount,
// item.fixed_asset_movement.act_vs_prev_month_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_prev_month_percent,
item.fixed_asset_movement.act_vs_mb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_amount,
item.fixed_asset_movement.act_vs_mb_percent === "" ? "0.0" : item.fixed_asset_movement.act_vs_mb_percent,
item.fixed_asset_movement.act_vs_rb_amount === "" ? "0.0" : item.fixed_asset_movement.act_vs_rb_amount,
......@@ -207,7 +201,7 @@ export default class FixedAssetsMovementMR extends Component {
}
})
console.log(dataTable);
this.setState({ dataTable, loading: false })
this.setState({ dataTable, loading: false, refresh: false })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In")) {
......@@ -219,7 +213,7 @@ export default class FixedAssetsMovementMR extends Component {
})
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false, refresh: false })
}
})
}
......@@ -309,9 +303,6 @@ export default class FixedAssetsMovementMR extends Component {
item.mtd_mb,
item.mtd_rb,
item.mtd_actual,
// item.act_previous_month,
// item.act_vs_prev_month_amount,
// item.act_vs_prev_month_percent,
item.act_vs_mb_amount,
item.act_vs_mb_percent,
item.act_vs_rb_amount,
......@@ -345,9 +336,6 @@ export default class FixedAssetsMovementMR extends Component {
mtd_mb: i[0] === 5 || i[0] === 6 ? String(Number(i[6]).toFixed(1)) : i[0] === 3 && i[6] === "" ? "0.0" : String(Number(i[6]).toFixed(1)),
mtd_rb: i[0] === 5 || i[0] === 6 ? String(Number(i[7]).toFixed(1)) : i[0] === 3 && i[7] === "" ? "0.0" : String(Number(i[7]).toFixed(1)),
mtd_actual: i[0] === 5 || i[0] === 6 ? String(Number(i[8]).toFixed(1)) : i[0] === 3 && i[8] === "" ? "0.0" : String(Number(i[8]).toFixed(1)),
// act_previous_month: i[0] === 5 || i[0] === 6 ? String(Number(i[9]).toFixed(1)) : i[0] === 3 && i[9] === "" ? "0.0" : String(Number(i[9]).toFixed(1)),
// act_vs_prev_month_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[10]).toFixed(1)) : i[0] === 3 && i[10] === "" ? "0.0" : String(Number(i[10]).toFixed(1)),
// act_vs_prev_month_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[11]).toFixed(1)) : i[0] === 3 && i[11] === "" ? "0.0" : String(Number(i[11]).toFixed(1)),
act_vs_mb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[9]).toFixed(1)) : i[0] === 3 && i[9] === "" ? "0.0" : String(Number(i[9]).toFixed(1)),
act_vs_mb_percent: i[0] === 5 || i[0] === 6 ? String(Number(i[10]).toFixed(1)) : i[0] === 3 && i[10] === "" ? "0.0" : String(Number(i[10]).toFixed(1)),
act_vs_rb_amount: i[0] === 5 || i[0] === 6 ? String(Number(i[11]).toFixed(1)) : i[0] === 3 && i[11] === "" ? "0.0" : String(Number(i[11]).toFixed(1)),
......@@ -397,9 +385,6 @@ export default class FixedAssetsMovementMR extends Component {
"mtd_mb": i[6],
"mtd_rb": i[7],
"mtd_actual": i[8],
// "act_previous_month": i[9],
// "act_vs_prev_month_amount": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]) ,
// "act_vs_prev_month_percent": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
"act_vs_mb_amount": String(i[9]) === 'NaN' || String(i[9]) === 'Infinity' || String(i[9]) === '-Infinity' ? '0.0' : String(i[9]),
"act_vs_mb_percent": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]),
"act_vs_rb_amount": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
......@@ -1329,7 +1314,7 @@ export default class FixedAssetsMovementMR extends Component {
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{!this.state.loading && (
{!this.state.loading && !this.state.refresh && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
data={dataTable2}
......@@ -1377,7 +1362,7 @@ export default class FixedAssetsMovementMR extends Component {
outline: 'none'
}}
onClick={() => {
this.setState({loading: true}, () => {
this.setState({loading: true, refresh: true}, () => {
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