Commit 3e0f2c82 authored by d.arizona's avatar d.arizona

apdet gays

parent 92ff89be
......@@ -585,6 +585,7 @@ export default class BudgetTahunan extends Component {
}
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'),
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
}
......
......@@ -71,6 +71,18 @@ const theme = createMuiTheme({
},
});
const theme2 = createMuiTheme({
overrides: {
// Style sheet name ⚛️
MuiInputBase: {
input: {
color: '#5198ea',
textAlign: 'center'
}
}
},
});
export default class ListOfCreditFacilities extends Component {
constructor(props) {
super(props)
......@@ -316,7 +328,7 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable);
if (dataTable.length == 0 && this.state.get_for == 'edit') {
dataTable.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 0 ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -396,27 +408,27 @@ export default class ListOfCreditFacilities extends Component {
"out_loan_other_type": i[15],
"out_loan_other_amount_ori": i[16],
"out_loan_other_amount_idr": i[17],
"total_out_loan_ori": i[18],
"total_out_loan_idr": i[19],
"remaining_plafond_ori": i[20],
"remaining_plafond_idr": i[21],
"current_ratio_financial": i[22],
"der_financial": i[23],
"debt_to_ebitda_financial": i[24],
"ebitda_to_interest_financial": i[25],
"other_ratio1_ratio_name": i[26],
"other_ratio1_financial": i[27],
"other_ratio1_current": i[28],
"other_ratio2_ratio_name": i[29],
"other_ratio2_financial": i[30],
"other_ratio2_current": i[31],
"other_ratio3_ratio_name": i[32],
"other_ratio3_financial": i[33],
"other_ratio3_current": i[34],
"other_ratio4_ratio_name": i[35],
"other_ratio4_financial": i[36],
"other_ratio4_current": i[37],
"notes": i[38],
// "total_out_loan_ori": i[18],
// "total_out_loan_idr": i[19],
// "remaining_plafond_ori": i[20],
// "remaining_plafond_idr": i[21],
"current_ratio_financial": i[18],
"der_financial": i[19],
"debt_to_ebitda_financial": i[20],
"ebitda_to_interest_financial": i[21],
"other_ratio1_ratio_name": i[22],
"other_ratio1_financial": i[23],
"other_ratio1_current": i[24],
"other_ratio2_ratio_name": i[25],
"other_ratio2_financial": i[27],
"other_ratio2_current": i[28],
"other_ratio3_ratio_name": i[29],
"other_ratio3_financial": i[30],
"other_ratio3_current": i[31],
"other_ratio4_ratio_name": i[32],
"other_ratio4_financial": i[33],
"other_ratio4_current": i[34],
"notes": i[35],
})
}
})
......@@ -449,7 +461,7 @@ export default class ListOfCreditFacilities extends Component {
response.data.data.map((item, index) => {
if (index == response.data.data.length -1) {
dataTable.push([
item.type_report_id,
3,
item.item_report_id,
item.parent,
item.formula,
......@@ -463,13 +475,13 @@ export default class ListOfCreditFacilities extends Component {
item.currency === null || item.currency === "" ? "" : item.currency,
item.loan_plafond_amount_ori,
item.loan_plafond_amount_idr === null ? "0.0" : item.loan_plafond_amount_idr === "" ? "0.0" : item.loan_plafond_amount_idr,
item.out_loan_ki_amount_ori,
item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr,
item.out_loan_kmk_amount_ori,
item.out_loan_kmk_amount_idr === null ? "0.0" : item.out_loan_kmk_amount_idr === "" ? "0.0" : item.out_loan_kmk_amount_idr,
item.out_loan_other_type,
item.out_loan_other_amount_ori,
item.out_loan_other_amount_idr === null ? "0.0" : item.out_loan_other_amount_idr === "" ? "0.0" : item.out_loan_other_amount_idr,
item.type_of_credit == "Investment Loan"? item.out_loan_ki_amount_ori : "0.0",
item.type_of_credit == "Investment Loan"? (item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr) : "0.0",
item.type_of_credit == "Revolving Loan (KMK)"? item.out_loan_kmk_amount_ori : "0.0",
item.type_of_credit == "Revolving Loan (KMK)"? (item.out_loan_kmk_amount_idr === null ? "0.0" : item.out_loan_kmk_amount_idr === "" ? "0.0" : item.out_loan_kmk_amount_idr) : "0.0",
item.type_of_credit == "Others"? item.out_loan_other_type : "",
item.type_of_credit == "Others"? item.out_loan_other_amount_ori : "0.0",
item.type_of_credit == "Others"? (item.out_loan_other_amount_idr === null ? "0.0" : item.out_loan_other_amount_idr === "" ? "0.0" : item.out_loan_other_amount_idr) : "0.0",
item.total_out_loan_ori === null ? "0.0" : item.total_out_loan_ori === "" ? "0.0" : item.total_out_loan_ori,
item.total_out_loan_idr === null ? "0.0" : item.total_out_loan_idr === "" ? "0.0" : item.total_out_loan_idr,
item.remaining_plafond_ori === null ? "0.0" : item.remaining_plafond_ori === "" ? "0.0" : item.remaining_plafond_ori,
......@@ -500,7 +512,7 @@ export default class ListOfCreditFacilities extends Component {
)
} else {
dataTable.push([
item.type_report_id,
3,
item.item_report_id,
item.parent,
item.formula,
......@@ -514,13 +526,13 @@ export default class ListOfCreditFacilities extends Component {
item.currency === null || item.currency === "" ? "" : item.currency,
item.loan_plafond_amount_ori,
item.loan_plafond_amount_idr === null ? "0.0" : item.loan_plafond_amount_idr === "" ? "0.0" : item.loan_plafond_amount_idr,
item.out_loan_ki_amount_ori,
item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr,
item.out_loan_kmk_amount_ori,
item.out_loan_kmk_amount_idr === null ? "0.0" : item.out_loan_kmk_amount_idr === "" ? "0.0" : item.out_loan_kmk_amount_idr,
item.out_loan_other_type,
item.out_loan_other_amount_ori,
item.out_loan_other_amount_idr === null ? "0.0" : item.out_loan_other_amount_idr === "" ? "0.0" : item.out_loan_other_amount_idr,
item.type_of_credit == "Investment Loan"? item.out_loan_ki_amount_ori : "0.0",
item.type_of_credit == "Investment Loan"? (item.out_loan_ki_amount_idr === null ? "0.0" : item.out_loan_ki_amount_idr === "" ? "0.0" : item.out_loan_ki_amount_idr) : "0.0",
item.type_of_credit == "Revolving Loan (KMK)"? item.out_loan_kmk_amount_ori : "0.0",
item.type_of_credit == "Revolving Loan (KMK)"? (item.out_loan_kmk_amount_idr === null ? "0.0" : item.out_loan_kmk_amount_idr === "" ? "0.0" : item.out_loan_kmk_amount_idr) : "0.0",
item.type_of_credit == "Others"? item.out_loan_other_type : "",
item.type_of_credit == "Others"? item.out_loan_other_amount_ori : "0.0",
item.type_of_credit == "Others"? (item.out_loan_other_amount_idr === null ? "0.0" : item.out_loan_other_amount_idr === "" ? "0.0" : item.out_loan_other_amount_idr) : "0.0",
item.total_out_loan_ori === null ? "0.0" : item.total_out_loan_ori === "" ? "0.0" : item.total_out_loan_ori,
item.total_out_loan_idr === null ? "0.0" : item.total_out_loan_idr === "" ? "0.0" : item.total_out_loan_idr,
item.remaining_plafond_ori === null ? "0.0" : item.remaining_plafond_ori === "" ? "0.0" : item.remaining_plafond_ori,
......@@ -560,7 +572,7 @@ export default class ListOfCreditFacilities extends Component {
// console.log(dataTable);
if (dataTable.length == 0) {
dataTable.push(
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 0 ],
[3, "", "", "", "", this.props.company.company_name, null, null, "", this.state.currentDate, "0.00", "", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "", 0 ],
[9, "", "", "", "", "", {value: "Grand Total"}, null, "", "", "", "0", "", "0", "", "0", "", "0", "", "", "0", "0", "0", "0", "0", "", "0", "", "0", "", "0", "", "0", "", "", "", "", "", "", "", "", "", "", "", "", "notes", 999999 ],
)
}
......@@ -586,14 +598,14 @@ export default class ListOfCreditFacilities extends Component {
let error = false
this.state.dataTable.map(i => {
if (i[0] == 3) {
if (i[6].value == null || i[7].value == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
if (i[6] == null || i[7] == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
error = true
}
data.push({
"item_report_id": i[1],
"borrower_comp_name": i[5],
"bank_name": i[6].value,
"type_of_credit": i[7].value,
"bank_name": i[6] == null? i[6] : i[6].value,
"type_of_credit": i[7] == null? i[7] : i[7].value,
"remarks": i[8],
"loan_maturity_date": i[9],
"interest": i[10],
......@@ -648,9 +660,9 @@ export default class ListOfCreditFacilities extends Component {
"diff": this.state.diff,
"total_loan" : this.state.totalOutStand
}
// console.log(data);
if (error) {
this.setState({handleTekTekTek: 0, saveDraft: true, saveComp: true, loading: false})
console.log(JSON.stringify(body));
if (error && type == 'submitted') {
this.setState({handleTekTekTek: 0, saveDraft: false, saveComp: true, loading: false , snekbar: true, snekbarMsg: 'Data Incomplete', handleTekTekTek: 0})
} else {
api.create('UPLOAD').uploadMonthlyReportLOCF(body).then(response => {
console.log(response);
......@@ -672,10 +684,10 @@ export default class ListOfCreditFacilities extends Component {
// alert(response.data.status)
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
} else {
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false })
this.setState({ alert: true, messageAlert: response.problem, tipeAlert: 'error', loading: false, handleTekTekTek: 0 })
}
})
}
......@@ -844,7 +856,7 @@ export default class ListOfCreditFacilities extends Component {
}
api.create().getPerBSiMontlyReportLOCF(payload).then((response) => {
if (response.data.status == "success") {
this.setState({perBS: response.data.data.per_bs})
this.setState({perBS: response.data.data.per_bs == null || response.data.data.per_bs == ''? 0.0 : Number(response.data.data.per_bs).toFixed(1)})
}
})
}
......@@ -965,14 +977,14 @@ export default class ListOfCreditFacilities extends Component {
let error = false
this.state.dataTable.map(i => {
if (i[0] == 3) {
if (i[6].value == null || i[7].value == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
if (i[6] == null || i[7] == null || i[8] == "" || i[9] == "" || i[10] == "" || i[11] == "") {
error = true
}
data.push({
"item_report_id": i[1],
"borrower_comp_name": i[5],
"bank_name": i[6].value,
"type_of_credit": i[7].value,
"bank_name": i[6] == null? [6] : i[6].value,
"type_of_credit": i[7] == null? i[7] : i[7].value,
"remarks": i[8],
"loan_maturity_date": i[9],
"interest": i[10],
......@@ -1029,8 +1041,8 @@ export default class ListOfCreditFacilities extends Component {
}
console.log(JSON.stringify(payload))
if (error) {
this.setState({handleTekTekTek: 0, saveDraft: true, saveComp: true, loading: false})
if (error && type == 'submitted') {
this.setState({handleTekTekTek: 0, saveDraft: false, saveComp: true, loading: false, snekbar: true, snekbarMsg: 'Data Incomplete', handleTekTekTek: 0})
} else {
api.create('UPLOAD').createMonthlyReportLOCF(payload).then(response => {
console.log(response);
......@@ -1244,18 +1256,20 @@ export default class ListOfCreditFacilities extends Component {
}
})
} else {
if (this.state.get_for == 'edit') {
this.setState({snekbar: true, snekbarMsg: 'Bank Names Cannot be Empty'})
}
}
setTimeout(() => {
// console.log(dataCoba)
// console.log(dataGabung)
console.log(newData)
// console.log(dataTampungBank)
// console.log(totalLoan);
console.log(totalLoan);
// dataTable: newData, totalOutStand: newData[newData.length-1][22]
if (bankNameEmpty) {
this.setState({ loading: false, dataTable: this.state.dataTable, totalOutStand: 0, diff: Number(0 - this.state.perBS).toFixed(1), saveDraft: true, saveComp: true})
this.setState({ loading: false, dataTable: this.state.dataTable, totalOutStand: 0, diff: Number(0 - this.state.perBS).toFixed(1), saveDraft: false, saveComp: true})
} else {
this.setState({ loading: false, dataTable: newData, totalOutStand: Number(totalLoan).toFixed(1), diff: Number(totalLoan - this.state.perBS).toFixed(1), saveDraft: false, saveComp: Number(totalLoan - this.state.perBS) == 0? false : true })
}
......@@ -1631,7 +1645,7 @@ export default class ListOfCreditFacilities extends Component {
style={{ padding: 0, margin: 0}}
renderInput={(params) =>
<div ref={params.InputProps.ref} style={{ padding: 0, margin: 0 }}>
<textarea style={{ borderColor: 'white', width: 150, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea" }} type="text" {...params.inputProps} />
<textarea style={{ borderColor: 'white', width: 150, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: tableMeta.rowData[6] == null && this.state.get_for == 'edit'? '#ffac99' : 'white' }} type="text" {...params.inputProps} />
</div>
}
/>
......@@ -1666,7 +1680,7 @@ export default class ListOfCreditFacilities extends Component {
style={{ padding: 0, margin: 0 }}
renderInput={(params) =>
<div ref={params.InputProps.ref} style={{ padding: 0, margin: 0 }}>
<textarea style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea" }} type="text" {...params.inputProps} />
<textarea style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: tableMeta.rowData[7] == null && this.state.get_for == 'edit'? '#ffac99' : 'white' }} type="text" {...params.inputProps} />
</div>
}
/>
......@@ -1689,26 +1703,26 @@ export default class ListOfCreditFacilities extends Component {
<div style={{ textAlign: 'right', width: 90 }}>
{ tableMeta.rowData[0] === 8 || tableMeta.rowData[0] === 9?
null :
// <div style={{ padding: 0, margin: 0 }}>
// <textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea" }} type="text" defaultValue={tableMeta.rowData[8]}
// onBlur={(event) => handleChange(event.target.value, tableMeta, tableMeta.columnIndex)} />
// </div>
<Input
disableUnderline={true}
style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9 || this.state.get_for == 'view'? true : false}
defaultValue={tableMeta.rowData[8]}
// disabled={false}
multiline={true}
inputProps={{
style: {
color: this.state.get_for == 'view'? "black" : "#5198ea",
textAlign: 'center',
backgroundColor: 'white'
}
}}
/>
<div style={{ padding: 0, margin: 0 }}>
<textarea disabled={this.state.get_for == 'view'} style={{ borderColor: 'white', width: 96, textAlign: 'center', justifyContent:'center', padding: 0, margin: 0, color: this.state.get_for == 'view'? "black" : "#5198ea", backgroundColor: tableMeta.rowData[8] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }} type="text" defaultValue={tableMeta.rowData[8]}
onBlur={(event) => handleChange(event.target.value, tableMeta, tableMeta.columnIndex)} />
</div>
// <Input
// disableUnderline={true}
// style={{ fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// disabled={tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9 || this.state.get_for == 'view'? true : false}
// defaultValue={tableMeta.rowData[8]}
// // disabled={false}
// multiline={true}
// inputProps={{
// style: {
// color: this.state.get_for == 'view'? "black" : "#5198ea",
// textAlign: 'center',
// backgroundColor: 'white'
// }
// }}
// />
// <ThemeProvider theme={theme}>
......@@ -1767,6 +1781,7 @@ export default class ListOfCreditFacilities extends Component {
textAlign: 'center',
fontSize: 11,
fontFamily: 'Nunito Sans, sans-serif',
backgroundColor: (tableMeta.rowData[9] == null || tableMeta.rowData[9] == '') && this.state.get_for == 'edit'? '#ffac99' : 'white'
}
}}
InputLabelProps={{
......@@ -1795,16 +1810,16 @@ export default class ListOfCreditFacilities extends Component {
setCellProps: () => ({ style2 }),
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ flex: 1 }}>
<div style={{ display: 'flex' }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9?
null :
<FormControlLabel
style={{ margin: 0 }}
style={{ margin: 0, backgroundColor: (tableMeta.rowData[10] == '0.00' || tableMeta.rowData[10] == '') && this.state.get_for == 'edit'? '#ffac99' : 'white' }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96}}
type="text"
placeholder=""
value={Number(value).toFixed(2)}
......@@ -1835,13 +1850,13 @@ export default class ListOfCreditFacilities extends Component {
setCellProps: () => ({ style2 }),
customBodyRender: (val, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right', width: 90 }}>
<div style={{ display: 'flex'}}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] == 8 || tableMeta.rowData[0] == 9?
null :
<ThemeProvider theme={theme}>
<ThemeProvider theme={theme2}>
<Input
disableUnderline={true}
style={{ color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', marginBottom: -105 }}
style={{ width: 96, color: this.state.get_for == 'view'? "black" : "#5198ea", fontSize: 12, textAlign: 'center', borderColor: 'transparent', margin: 0, backgroundColor: 'transparent', backgroundColor: tableMeta.rowData[11] == '' && this.state.get_for == 'edit'? '#ffac99' : 'white' }}
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
......@@ -2699,7 +2714,7 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")).toFixed(1)}
value={Number(handleTableRatio(tableMeta.rowData[26], tableMeta, 26, "Current Ratio")).toFixed(2)}
/>
}
/>
......@@ -2779,7 +2794,7 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")).toFixed(1)}
value={Number(handleTableRatio(tableMeta.rowData[28], tableMeta, 28, "Debt to Equity Ratio")).toFixed(2)}
/>
}
/>
......@@ -2859,7 +2874,7 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")).toFixed(1)}
value={Number(handleTableRatio(tableMeta.rowData[30], tableMeta, 30, "Debt to EBITDA - YTD")).toFixed(2)}
/>
}
/>
......@@ -2939,7 +2954,7 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")).toFixed(1)}
value={Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")).toFixed(2)}
/>
}
/>
......@@ -3047,7 +3062,9 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
value={Number(tableMeta.rowData[35]).toFixed(1)}
fixedDecimalScale={2}
decimalScale={2}
value={Number(tableMeta.rowData[35]).toFixed(2)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 35)
}}
......@@ -3158,7 +3175,9 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
value={Number(tableMeta.rowData[38]).toFixed(1)}
fixedDecimalScale={2}
decimalScale={2}
value={Number(tableMeta.rowData[38]).toFixed(2)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 20)
}}
......@@ -3269,7 +3288,9 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
value={Number(tableMeta.rowData[41]).toFixed(1)}
fixedDecimalScale={2}
decimalScale={2}
value={Number(tableMeta.rowData[41]).toFixed(2)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 20)
}}
......@@ -3380,7 +3401,9 @@ export default class ListOfCreditFacilities extends Component {
type="text"
placeholder=""
disabled={this.state.get_for == 'view'}
value={Number(tableMeta.rowData[20]).toFixed(1)}
fixedDecimalScale={2}
decimalScale={2}
value={Number(tableMeta.rowData[44]).toFixed(2)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 20)
}}
......@@ -3425,6 +3448,12 @@ export default class ListOfCreditFacilities extends Component {
backgroundColor: 'white'
}
}}
onBlur={(event) => {
// // // console.log(event.target.value)
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 45)
// // // console.log(dataTable2)
}}
/>
// <ThemeProvider theme={theme}>
// <Input
......@@ -3686,7 +3715,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.totalOutStand)}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography>
</div>
</div>
</div>
......@@ -3698,7 +3727,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{padding: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography>
</div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end', backgroundColor: this.state.get_for == 'edit' && Number(this.state.diff) > 0? '#ffac99' : 'transparent'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.diff)}</Typography>
</div>
</div>
......@@ -3879,7 +3908,7 @@ export default class ListOfCreditFacilities extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Total Outstanding Loan</Typography>
</div>
<div style={{border: '1px solid black', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.totalOutStand)}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.perBS)}</Typography>
</div>
</div>
</div>
......@@ -3891,7 +3920,7 @@ export default class ListOfCreditFacilities extends Component {
<div style={{padding: 5}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Diff</Typography>
</div>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end'}}>
<div style={{borderStyle: 'solid', borderWidth: '0px 1px 1px 1px', padding: 5, minWidth: 200, display: 'flex', justifyContent: 'flex-end', backgroundColor: this.state.get_for == 'edit' && Number(this.state.diff) > 0? '#ffac99' : 'transparent'}}>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{formatSeparator(this.state.diff)}</Typography>
</div>
</div>
......@@ -4049,7 +4078,7 @@ export default class ListOfCreditFacilities extends Component {
onUpload={() => {
String(this.state.judulColumn).includes("TEMPLATE") && String(this.state.judulColumn).includes("UPLOAD") && String(this.state.judul).includes("LIST") && String(this.state.judul).includes("CREDIT") && String(this.state.judul).includes("MONTHLY") && String(this.state.judul).includes("REPORT") ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
this.setState({snekbar: true, snekbarMsg: 'Invalid Template', tipeAlert: 'warning'})
}}
/>
</div>
......
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