Commit 35ab553c authored by Riri Novita's avatar Riri Novita

fixnumber LOCF

parent 4d66d988
......@@ -623,7 +623,7 @@ export default class CreateParameter extends Component {
"end_date": this.state.tempData.end_date
}
console.log(body);
// this.props.updateParameter(body)
this.props.updateParameter(body)
}
createParameter() {
......@@ -644,7 +644,7 @@ export default class CreateParameter extends Component {
"end_date": this.state.endDate
}
console.log(body);
// this.props.createParameter(body)
this.props.createParameter(body)
}
render() {
......@@ -829,7 +829,7 @@ export default class CreateParameter extends Component {
<TextField
style={{ width: '100%' }}
id="value"
label= {this.state.enableReportName ? "Value IDR mn" : "Value"}
label= {"Value"}
value={this.state.tempData === null ? '' : this.state.tempData.value}
inputProps={{
min: 0,
......
......@@ -18,6 +18,7 @@ import MuiAlert from '@material-ui/lab/Alert';
import { makeStyles } from '@material-ui/core/styles';
import UploadFile from "../../library/Upload";
import { ExcelRenderer } from 'react-excel-renderer';
import { fixNumber, roundMath } from "../../library/Utils";
function Alert(props) {
return <MuiAlert elevation={6} variant="filled" {...props} />;
......@@ -458,15 +459,15 @@ export default class ListOfCreditFacilities extends Component {
"loan_maturity_date": i[5] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : null,
"interest": i[6],
"currency": i[7],
"loan_plafond_amount_ori": i[8],
"loan_plafond_amount_idr": i[9],
"out_loan_ki_amount_ori": i[10],
"out_loan_ki_amount_idr": i[11],
"out_loan_kmk_amount_ori": i[12],
"out_loan_kmk_amount_idr": i[13],
"loan_plafond_amount_ori": i[8] !== undefined ? Number(i[8]).toFixed(1) : i[8],
"loan_plafond_amount_idr": i[9] !== undefined ? Number(i[9]).toFixed(1) : i[9],
"out_loan_ki_amount_ori": i[10] !== undefined ? Number(i[10]).toFixed(1) : i[10],
"out_loan_ki_amount_idr": i[11] !== undefined ? Number(i[11]).toFixed(1) : i[11],
"out_loan_kmk_amount_ori": i[12] !== undefined ? Number(i[12]).toFixed(1) : i[12],
"out_loan_kmk_amount_idr": i[13] !== undefined ? Number(i[13]).toFixed(1) : i[13],
"out_loan_other_type": i[14],
"out_loan_other_amount_ori": i[15],
"out_loan_other_amount_idr": i[16],
"out_loan_other_amount_ori": i[15] !== undefined ? Number(i[15]).toFixed(1) : i[15],
"out_loan_other_amount_idr": i[16] !== undefined ? Number(i[16]).toFixed(1) : i[16],
// "total_out_loan_ori": i[18],
// "total_out_loan_idr": i[19],
// "remaining_plafond_ori": i[20],
......@@ -535,15 +536,15 @@ export default class ListOfCreditFacilities extends Component {
"loan_maturity_date": i[5] !== undefined ? tgl[2] + '-' + tgl[1] + '-' + tgl[0] : null,
"interest": i[6],
"currency": i[7],
"loan_plafond_amount_ori": i[8],
"loan_plafond_amount_idr": i[9],
"out_loan_ki_amount_ori": i[10],
"out_loan_ki_amount_idr": i[11],
"out_loan_kmk_amount_ori": i[12],
"out_loan_kmk_amount_idr": i[13],
"loan_plafond_amount_ori": i[8] !== undefined ? Number(i[8]).toFixed(1) : i[8],
"loan_plafond_amount_idr": i[9] !== undefined ? Number(i[9]).toFixed(1) : i[9],
"out_loan_ki_amount_ori": i[10] !== undefined ? Number(i[10]).toFixed(1) : i[10],
"out_loan_ki_amount_idr": i[11] !== undefined ? Number(i[11]).toFixed(1) : i[11],
"out_loan_kmk_amount_ori": i[12] !== undefined ? Number(i[12]).toFixed(1) : i[12],
"out_loan_kmk_amount_idr": i[13] !== undefined ? Number(i[13]).toFixed(1) : i[13],
"out_loan_other_type": i[14],
"out_loan_other_amount_ori": i[15],
"out_loan_other_amount_idr": i[16],
"out_loan_other_amount_ori": i[15] !== undefined ? Number(i[15]).toFixed(1) : i[15],
"out_loan_other_amount_idr": i[16] !== undefined ? Number(i[16]).toFixed(1) : i[16],
// "total_out_loan_ori": i[18],
// "total_out_loan_idr": i[19],
// "remaining_plafond_ori": i[20],
......@@ -1346,7 +1347,7 @@ export default class ListOfCreditFacilities extends Component {
dataGabung.map((items, index) => {
if (items[0] == 3) {
totalLoan += items[22]
this.props.defaultCurrency.id == 1 ? totalLoan += items[22] : totalLoan += items[21]
}
if (bankPrev != "") {
if (items[6].value !== bankPrev) {
......
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