Commit ba5e4559 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'didam' of http://103.44.149.204/d.arizona/tia-dev into deni-dev(pc)

parents cd80763b 49e23dea
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -463,9 +463,9 @@ export default class TaxPlanning extends Component {
item.orders,
{ tbc: item.condition_it_should_be.tbc, fcp: item.condition_it_should_be.fcp, tbf: item.condition_it_should_be.tbf },
{ tbc: item.condition_if_wrong.tbc, fcp: item.condition_if_wrong.fcp, tbf: item.condition_if_wrong.tbf },
item.tax_planning.forecast_tbc_formula,
item.tax_planning.forecast_fcp_formula,
item.tax_planning.forecast_tbf_formula,
item.forecast_tbc_formula,
item.forecast_fcp_formula,
item.forecast_tbf_formula,
item.error
]
})
......@@ -748,8 +748,25 @@ export default class TaxPlanning extends Component {
}
})
if (tableMeta.rowData[8] == "Under payment /(Over Payment ) Income Tax Art. 29") {
// form.replace("(", "")
// form.replace(")", "")
let opgab = []
baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*') {
if( item.length > 1 && (item.includes("+") || item.includes("-") || item.includes("*") || item.includes("/"))){
opgab.push(String(item).substr(0, Number(String(item).length) - 1))
opgab.push(String(item).substr(Number(String(item).length) - 1, 1))
} else {
opgab.push(item)
}
})
if(opgab.length > 0){
baru = opgab
}
}
baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') {
anjay.push(item)
} else {
if (String(item).includes('#')) {
......@@ -803,16 +820,55 @@ export default class TaxPlanning extends Component {
})
let total = 0
let total2 = 0
let opt = ""
let opt2 = ""
let prio = false
let simpen2 = ""
anjay.map((item, index) => {
if (item == "+") {
if (prio) {
opt2 = "tambah"
} else {
opt = "tambah"
}
} else if (item == "-") {
if (prio) {
opt2 = "kurang"
} else {
opt = "kurang"
}
} else if (item == "*") {
if (prio) {
opt2 = "kali"
} else {
opt = "kali"
}
} else if (item == "/") {
if (prio) {
opt2 = "bagi"
} else {
opt = "bagi"
}
} else if (item == "(") {
prio = true
simpen2 = "active"
} else if (item == ")") {
prio = false
}
else {
if (prio) {
if (opt2 == "tambah") {
total2 = Number(total2) + Number(item)
} else if (opt2 == "kurang") {
total2 = Number(total2) - Number(item)
} else if (opt2 == "kali") {
total2 = Number(total2) * Number(item)
} else if (opt2 == "bagi") {
total2 = Number(total2) / Number(item) == NaN ? 0 : Number(total2) / Number(item)
} else {
total2 += Number(item)
}
} else {
if (opt == "tambah") {
total = Number(total) + Number(item)
......@@ -826,40 +882,56 @@ export default class TaxPlanning extends Component {
total += Number(item)
}
}
}
})
if(simpen2 == "active") {
if (opt == "tambah") {
total = Number(total) + Number(total2)
} else if (opt == "kurang") {
total = Number(total) - Number(total2)
} else if (opt == "kali") {
total = Number(total) * Number(total2)
} else if (opt == "bagi") {
total = Number(total) / Number(total2) == NaN ? 0 : Number(total) / Number(total2)
}
}
total = R.equals(total, NaN) ? "0.0" : total
// console.log(tableMeta.rowData[8])
// if (xntd !== undefined) {
// console.log(tableMeta.rowData[8])
// console.log(xntd)
// console.log(baru)
// console.log(anjay)
// console.log(total)
// }
if (xntd !== undefined && tableMeta.rowData[8] == "Under payment /(Over Payment ) Income Tax Art. 29") {
console.log(tableMeta.rowData[8])
// console.log(splitFormula)
console.log(xntd)
console.log(baru)
console.log(anjay)
console.log(total)
console.log(total2)
console.log(opt)
}
// let dataSub = dex == 1? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc : dex == 2? dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp : dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf
if (dex == 1) {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc = Number(total).toFixed(1)
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbc.value = Number(total).toFixed(1)
}
} else if (dex == 2) {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp = Number(total).toFixed(1)
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].fcp.value = Number(total).toFixed(1)
}
} else {
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value == undefined) {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf = Number(total).toFixed(1)
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = total
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].tbf.value = Number(total).toFixed(1)
}
}
return total
return Number(total).toFixed(1)
}
const handleForecast = (tableMeta, periode, dex) => {
......@@ -6523,6 +6595,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[1] === 7 ?
// Number(handleValueFormula(value, tableMeta, 1)).toFixed(1) === Number(tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// /> : tableMeta.rowData[26].tbc === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
</div>
......@@ -6601,6 +6728,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[2] === 7 ?
// Number(handleValueFormula(value, tableMeta, 2)).toFixed(1) === Number(tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> : tableMeta.rowData[26].fcp === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
</div>
......@@ -6678,6 +6860,61 @@ export default class TaxPlanning extends Component {
// />
null
:
tableMeta.rowData[3] === 7 ?
Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1) === Number(tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/> : tableMeta.rowData[26].tbf === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/>
</LightTooltip>
:
null
}
</div>
......@@ -6788,6 +7025,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[1] === 7 ?
// Number(handleValueFormula(value, tableMeta, 1)).toFixed(1) === Number(tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// /> : tableMeta.rowData[26].tbc === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbc === "" ? "0" : tableMeta.rowData[25].tbc}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
</div>
......@@ -6866,6 +7158,61 @@ export default class TaxPlanning extends Component {
// />
null
:
// tableMeta.rowData[2] === 7 ?
// Number(handleValueFormula(value, tableMeta, 2)).toFixed(1) === Number(tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp).toFixed(1) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// /> : tableMeta.rowData[26].fcp === "STOPPER" ?
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip> :
// <LightTooltip title={`Value Should be ${tableMeta.rowData[25].fcp === "" ? "0" : tableMeta.rowData[25].fcp}`} arrow>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 2)).toFixed(1)}
// />
// </LightTooltip>
// :
null
}
</div>
......@@ -6943,6 +7290,61 @@ export default class TaxPlanning extends Component {
// />
null
:
tableMeta.rowData[3] === 7 ?
Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1) === Number(tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf).toFixed(1) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/> : tableMeta.rowData[26].tbf === "STOPPER" ?
<LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/>
</LightTooltip> :
<LightTooltip title={`Value Should be ${tableMeta.rowData[25].tbf === "" ? "0" : tableMeta.rowData[25].tbf}`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, Number(this.props.periode)+2, 3)).toFixed(1)}
/>
</LightTooltip>
:
null
}
</div>
......@@ -7246,7 +7648,7 @@ export default class TaxPlanning extends Component {
type="button"
style={{
backgroundColor: 'transparent',
cursor: this.state.buttonError === true ? 'default' : 'pointer',
cursor: 'pointer',
borderColor: 'transparent',
outline: 'none',
marginRight: 20
......
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