Commit a28b8883 authored by faisalhamdi's avatar faisalhamdi

update sore 210920

parent 3d807c6e
...@@ -661,8 +661,7 @@ export default class BudgetTahunan extends Component { ...@@ -661,8 +661,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleFAM: false, visibleBudgetTahunan: true })}
getReport={this.getReport.bind(this)} getReport={this.getCompanyActive.bind(this)}
getReportAttachment={this.getReportAttachment.bind(this)}
/> />
)} )}
{this.state.visibleCAT && ( {this.state.visibleCAT && (
...@@ -677,8 +676,7 @@ export default class BudgetTahunan extends Component { ...@@ -677,8 +676,7 @@ export default class BudgetTahunan extends Component {
submissionID={this.state.submissionID} submissionID={this.state.submissionID}
saveToMasterBudget={this.saveToMasterBudget.bind(this)} saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })} onClickClose={() => this.setState({ visibleCAT: false, visibleBudgetTahunan: true })}
getReport={this.getReport.bind(this)} getReport={this.getCompanyActive.bind(this)}
getReportAttachment={this.getReportAttachment.bind(this)}
/> />
)} )}
</div > </div >
......
...@@ -237,7 +237,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -237,7 +237,7 @@ export default class FixedAssetsMovement extends Component {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
console.log(resp.rows[2]); console.log(resp.rows[2]);
let payload = [] let payload = []
let reg = /^\d+$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
if (i.length > 0) { if (i.length > 0) {
payload.push({ payload.push({
...@@ -276,7 +276,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -276,7 +276,7 @@ export default class FixedAssetsMovement extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
...@@ -358,7 +358,6 @@ export default class FixedAssetsMovement extends Component { ...@@ -358,7 +358,6 @@ export default class FixedAssetsMovement extends Component {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
this.props.getReport() this.props.getReport()
this.props.getReportAttachment()
} else { } else {
alert(response.data.status) alert(response.data.status)
} }
...@@ -386,17 +385,21 @@ export default class FixedAssetsMovement extends Component { ...@@ -386,17 +385,21 @@ export default class FixedAssetsMovement extends Component {
render() { render() {
let dataTable2 = this.state.dataTable let dataTable2 = this.state.dataTable
const handleChange = (value, tableMeta) => { const handleChange = (value, tableMeta, type) => {
let val = String(value).split(",").join("") let val = String(value).split(",").join("")
// let data = this.state.dataTable2 // let data = this.state.dataTable2
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) if (type === "actual") {
if (indexParent > 0) { dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
// console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) {
// console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
} }
} }
const handleValue = (data) => { const handleValue = (data) => {
...@@ -481,7 +484,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -481,7 +484,7 @@ export default class FixedAssetsMovement extends Component {
display: false display: false
} }
}, { }, {
name: "Account", name: this.state.judulColumn !== null ? this.state.judulColumn[1] : "Account",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300 }}> <TableCell key={columnMeta.index} style={{ ...style, top: 0, zIndex: 102, backgroundColor: '#1c71b8', width: 300 }}>
...@@ -494,21 +497,34 @@ export default class FixedAssetsMovement extends Component { ...@@ -494,21 +497,34 @@ export default class FixedAssetsMovement extends Component {
<div style={{ width: 300 }}> <div style={{ width: 300 }}>
{/* {console.log(val)} */} {/* {console.log(val)} */}
{/* {console.log(tableMeta)} */} {/* {console.log(tableMeta)} */}
{tableMeta.rowData[4] == 0 ? {tableMeta.rowData[22] ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span> tableMeta.rowData[22].length > 0 ?
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<LightTooltip title={"Report Items Not Registered"} arrow>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</LightTooltip>
</div>
:
tableMeta.rowData[4] == 0 ?
<span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
:
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
<span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
: :
<div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}> tableMeta.rowData[4] == 0 ?
<LightTooltip title={"Report Items Not Registered"} arrow> <span style={{ fontSize: 12, fontWeight: 'bold' }}>{String(tableMeta.rowData[0] === 4 ? "" : val).toUpperCase()}</span>
<span style={{ fontSize: 12, color: 'red' }}>{tableMeta.rowData[0] === 4 ? "" : val}</span> :
</LightTooltip> <div style={{ paddingLeft: 20 * Number(tableMeta.rowData[4]) }}>
</div> <span style={{ fontSize: 12 }}>{tableMeta.rowData[0] === 4 ? "" : val}</span>
</div>
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "31 Dec 2020 Actual", name: this.state.judulColumn !== null ? this.state.judulColumn[2] : `31 Dec ${Number(this.props.periode) - 1} Actual`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -519,7 +535,9 @@ export default class FixedAssetsMovement extends Component { ...@@ -519,7 +535,9 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 3 ? {tableMeta.rowData[0] === 4 ?
null
:
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -527,74 +545,22 @@ export default class FixedAssetsMovement extends Component { ...@@ -527,74 +545,22 @@ export default class FixedAssetsMovement extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true}
value={value} value={value}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
console.log(dataTable2)
}}
/> />
} }
/> />
</div> : </div>
tableMeta.rowData[0] === 5 ?
<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={handleValue(tableMeta)}
/>
</span>
:
tableMeta.rowData[0] === 4 ?
null
:
tableMeta.rowData[0] === 6 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 5 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={handleFormula(value, tableMeta)}
/>
:
tableMeta.rowData[0] === 1 ?
value === "" ?
null :
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value)}
/>
:
<span>-</span>
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Jan 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[3] : `Jan ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -618,7 +584,6 @@ export default class FixedAssetsMovement extends Component { ...@@ -618,7 +584,6 @@ export default class FixedAssetsMovement extends Component {
placeholder="" placeholder=""
value={value} value={value}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
console.log(dataTable2) console.log(dataTable2)
}} }}
...@@ -662,25 +627,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -662,25 +627,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Feb 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[4] : `Feb ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -748,25 +714,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -748,25 +714,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Mar 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[5] : `Mar ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -834,25 +801,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -834,25 +801,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Apr 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[6] : `Apr ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -920,25 +888,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -920,25 +888,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "May 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[7] : `May ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1006,25 +975,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1006,25 +975,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Jun 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[8] : `Jun ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1092,25 +1062,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1092,25 +1062,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Jul 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[9] : `Jul ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1178,25 +1149,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1178,25 +1149,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Aug 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[10] : `Aug ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1264,25 +1236,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1264,25 +1236,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Sep 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[11] : `Sep ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1350,25 +1323,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1350,25 +1323,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Oct 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[12] : `Oct ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1436,25 +1410,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1436,25 +1410,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Nov 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[13] : `Nov ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1522,25 +1497,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1522,25 +1497,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Dec 2021", name: this.state.judulColumn !== null ? this.state.judulColumn[14] : `Dec ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
...@@ -1608,25 +1584,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1608,25 +1584,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "Current Total", name: this.state.judulColumn !== null ? this.state.judulColumn[15] : "Current Total",
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -1694,25 +1671,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1694,25 +1671,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "31 Dec 2022 Total", name: this.state.judulColumn !== null ? this.state.judulColumn[16] : `31 Dec ${Number(this.props.periode) + 1} Total`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -1780,25 +1758,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -1780,25 +1758,26 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </div>
) )
} }
} }
}, { }, {
name: "31 Dec 2023 Total", name: this.state.judulColumn !== null ? this.state.judulColumn[17] : `31 Dec ${Number(this.props.periode) + 2} Total`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#37b5e6', width: 96 }}>
...@@ -1866,18 +1845,19 @@ export default class FixedAssetsMovement extends Component { ...@@ -1866,18 +1845,19 @@ export default class FixedAssetsMovement extends Component {
/> />
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
value === "" ? // value === "" ?
null : // null :
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
value={Number(value)} // value={Number(value)}
/> // />
null
: :
<span>-</span> null
} }
</div> </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