Commit 61b9db66 authored by ardiansyah's avatar ardiansyah

get latest update

parents 4bfafc7a 80d48939
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
background-color: #0b6b24 !important; background-color: #0b6b24 !important;
} */ } */
/* .main-color{
background-color: #1474CA !important;
} */
.sub-color{ .sub-color{
background-color: #f0f1f3 !important; background-color: #f0f1f3 !important;
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -721,7 +721,7 @@ export default class ProfitLoss extends Component { ...@@ -721,7 +721,7 @@ export default class ProfitLoss extends Component {
const handleValue = (value, data) => { const handleValue = (value, data) => {
let total = 0 let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
if (data.rowData[1] == item[2]) { if (data.rowData[1] == item[2] && item[5] !== "-") {
total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(String(item[data.columnIndex]).includes('-') ? Number(String(item[data.columnIndex]).substr(1, String(item[data.columnIndex]).length)) * -1 : Number(item[data.columnIndex]))) total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(String(item[data.columnIndex]).includes('-') ? Number(String(item[data.columnIndex]).substr(1, String(item[data.columnIndex]).length)) * -1 : Number(item[data.columnIndex])))
} }
}) })
......
...@@ -871,7 +871,7 @@ export default class MasterDataCAT extends Component { ...@@ -871,7 +871,7 @@ export default class MasterDataCAT extends Component {
</span> </span>
} }
{this.state.buttonDelete && {this.state.buttonDelete &&
<span> <span>
<a data-tip={'Delete'} data-for="delete"> <a data-tip={'Delete'} data-for="delete">
<button <button
style={{ style={{
......
...@@ -8,6 +8,7 @@ import * as R from 'ramda' ...@@ -8,6 +8,7 @@ import * as R from 'ramda'
import Images from '../../../assets/Images'; import Images from '../../../assets/Images';
import Constant from '../../../library/Constant'; import Constant from '../../../library/Constant';
import PopUpInformation from '../../../library/PopUpInformation'; import PopUpInformation from '../../../library/PopUpInformation';
import { fixNumber, roundMath } from '../../../library/Utils';
export default class CreateParameter extends Component { export default class CreateParameter extends Component {
constructor(props) { constructor(props) {
...@@ -1731,7 +1732,7 @@ export default class CreateParameter extends Component { ...@@ -1731,7 +1732,7 @@ export default class CreateParameter extends Component {
id="value" id="value"
label={"Value"} label={"Value"}
// get data IDR by IDR mn // get data IDR by IDR mn
value={this.state.tempData === null ? '' : this.state.tempData.setting_group === "CURRENCY" ? Number(this.state.tempData.value) * 1000 : this.state.tempData.value} value={this.state.tempData === null ? '' : this.state.tempData.setting_group === "CURRENCY" ? fixNumber(Number(this.state.tempData.value) * 1000) : this.state.tempData.value}
inputProps={{ inputProps={{
min: 0, min: 0,
style: { style: {
......
...@@ -14,6 +14,7 @@ import Constant from '../../../library/Constant'; ...@@ -14,6 +14,7 @@ import Constant from '../../../library/Constant';
import PopUpDelete from '../../../library/PopUpDelete'; import PopUpDelete from '../../../library/PopUpDelete';
import { css } from "@emotion/core"; import { css } from "@emotion/core";
import PropagateLoader from "react-spinners/PropagateLoader" import PropagateLoader from "react-spinners/PropagateLoader"
import { fixNumber, roundMath } from '../../../library/Utils';
const LightTooltip = withStyles((theme) => ({ const LightTooltip = withStyles((theme) => ({
tooltip: { tooltip: {
...@@ -119,7 +120,7 @@ export default class Parameter extends Component { ...@@ -119,7 +120,7 @@ export default class Parameter extends Component {
item.company_name, item.company_name,
item.description, item.description,
item.order, item.order,
item.setting_group === "CURRENCY" ? Number(item.value) * 1000 : item.value, // convert IDR mn to IDR item.setting_group === "CURRENCY" ? fixNumber(Number(item.value) * 1000) : item.value, // convert IDR mn to IDR
item.min_value, item.min_value,
item.max_value, item.max_value,
item.status item.status
......
...@@ -149,7 +149,7 @@ export default class LOCF extends Component { ...@@ -149,7 +149,7 @@ export default class LOCF extends Component {
if (this.props.dataTablelocf !== prevProps.dataTablelocf) { if (this.props.dataTablelocf !== prevProps.dataTablelocf) {
let array = this.props.dataTablelocf let array = this.props.dataTablelocf
let datas = array[array.length - 1] let datas = array[array.length - 1]
this.setState({ dataTable: this.props.dataTablelocf, diff: datas[47], loanTotal: datas[48], perBS: datas[49] }) this.setState({ dataTable: this.props.dataTablelocf, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(datas[47]), 1) : datas[47], loanTotal: datas[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(datas[49]), 1) : datas[49] })
} }
if (this.props.loadingChild !== prevProps.loadingChild) { if (this.props.loadingChild !== prevProps.loadingChild) {
this.setState({ loading: this.props.loadingChild }) this.setState({ loading: this.props.loadingChild })
...@@ -353,7 +353,7 @@ export default class LOCF extends Component { ...@@ -353,7 +353,7 @@ export default class LOCF extends Component {
// let sortingTable = dataTable.sort((a, b) => a[6].value - b[6].value) // let sortingTable = dataTable.sort((a, b) => a[6].value - b[6].value)
// console.log(sortingTable); // console.log(sortingTable);
let lastArray = dataTable[res.length - 1] let lastArray = dataTable[res.length - 1]
this.setState({ dataTable, diff: lastArray[47], loanTotal: lastArray[48], perBS: lastArray[49], loading: false, visibleLOCFMR: true }, () => { this.setState({ dataTable, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[47]), 1) : lastArray[47], loanTotal: lastArray[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[49]), 1) : lastArray[49], loading: false, visibleLOCFMR: true }, () => {
this.props.sendToParent(dataTable, lastArray, 'LOCF') this.props.sendToParent(dataTable, lastArray, 'LOCF')
}) })
} }
...@@ -565,10 +565,8 @@ export default class LOCF extends Component { ...@@ -565,10 +565,8 @@ export default class LOCF extends Component {
console.log(dataTable); console.log(dataTable);
let lastArray = dataTable[dataTable.length - 1] let lastArray = dataTable[dataTable.length - 1]
console.log(lastArray); this.setState({ dataTable, diff: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[47]), 1) : lastArray[47], loanTotal: lastArray[48], perBS: this.props.defaultCurrency.id == 1 ? fixNumber(Number(lastArray[49]), 1) : lastArray[49], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => {
this.setState({ dataTable, diff: lastArray[47], loanTotal: lastArray[48], perBS: lastArray[49], dataLoaded: true, loading: false, buttonError: false, dataDelete: [] }, () => { this.props.sendToParent(dataTable, lastArray, 'LOCF', 'upload', this.state.visibleLOCFMR)
console.log(this.state.visibleLOCFMR);
this.props.sendToParent(dataTable, lastArray , 'LOCF', 'upload', this.state.visibleLOCFMR)
}) })
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => { this.setState({ alert: true, messageAlert: response.data.message, typeAlert: 'warning', loading: false }, () => {
...@@ -970,7 +968,7 @@ export default class LOCF extends Component { ...@@ -970,7 +968,7 @@ export default class LOCF extends Component {
} }
const handleValueDropDown = (value, type, tableMeta) => { const handleValueDropDown = (value, type, tableMeta) => {
let data = type == 'bankName' ? this.state.bankNameList.options : type == 'typeOfCreditList' ? this.state.typeOfCreditList.options : this.state.businessBankList.options let data = type == 'bankName' ? this.state.bankNameList.options : type == 'typeOfCreditList' ? this.state.typeOfCreditList.options : this.state.businessBankList.options
let index = 0 let index = 0
if (type == 'bankName' && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != null && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != "") { if (type == 'bankName' && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != null && dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] != "") {
indexNyasar = true indexNyasar = true
...@@ -3619,7 +3617,7 @@ export default class LOCF extends Component { ...@@ -3619,7 +3617,7 @@ export default class LOCF extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography> <Typography style={{ fontSize: '12px', color: '#4b4b4b' }}>Diff</Typography>
</div> </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' }}>
<Typography style={{ fontSize: '14px', color: Number(this.state.diff) > 0 ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography> <Typography style={{ fontSize: '14px', color: Number(this.state.diff) > '0.0' || Number(this.state.diff) < '0.0' ? 'red' : '#4b4b4b' }}><NumberFormat value={this.state.diff == 0 ? "0.0" : this.state.diff} displayType={'text'} thousandSeparator={true} prefix={''} /></Typography>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -100,6 +100,7 @@ class ReportProgress extends Component { ...@@ -100,6 +100,7 @@ class ReportProgress extends Component {
MB.push({ name: String(i + 1), value: i + 1}) MB.push({ name: String(i + 1), value: i + 1})
} }
} }
console.log(MB);
let defaultPropsMB = { let defaultPropsMB = {
options: MB, options: MB,
......
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