Commit 37c8407d authored by rifkaki's avatar rifkaki

actual last year pl belum fix

parent 07d96fb9
...@@ -30,6 +30,8 @@ export default class SubHolding extends Component { ...@@ -30,6 +30,8 @@ export default class SubHolding extends Component {
{ value: 3, label: 'DB Profit & Loss' }, { value: 3, label: 'DB Profit & Loss' },
{ value: 1, label: 'DB Profit & Loss Detail' }, { value: 1, label: 'DB Profit & Loss Detail' },
{ value: 4, label: 'DB Ratio' }, { value: 4, label: 'DB Ratio' },
{ value: 5, label: 'DB Tax Planning' },
{ value: 21, label: 'DB Operating Indicator' },
], ],
report: null, report: null,
loading: false, loading: false,
...@@ -192,6 +194,14 @@ export default class SubHolding extends Component { ...@@ -192,6 +194,14 @@ export default class SubHolding extends Component {
}) })
} }
}) })
} else if (this.state.report.value === 5) {
response.data.data.map((item, index) => {
if (item.report_name === 'Tax Planning') {
this.setState({ revisionType: item.revision }, ()=> {
this.getSubmission()
})
}
})
} else { } else {
this.setState({ revisionType: 0 }, ()=> { this.setState({ revisionType: 0 }, ()=> {
this.getSubmission() this.getSubmission()
...@@ -823,18 +833,19 @@ export default class SubHolding extends Component { ...@@ -823,18 +833,19 @@ export default class SubHolding extends Component {
// console.log(indexIDzz) // console.log(indexIDzz)
if (indexIDzz != -1) { if (indexIDzz != -1) {
dataTable2.push([...dataTable[indexIDzz], dataTable2.push([...dataTable[indexIDzz],
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january, items.formula,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.january, formula: items.profit_detail.january_formula } : items.profit_detail.january,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.february, formula: items.profit_detail.february_formula } : items.profit_detail.february,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.april, formula: item.profit_detail.april_formula } : item.profit_detail.april, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.march, formula: items.profit_detail.march_formula } : items.profit_detail.march,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.may, formula: item.profit_detail.may_formula } : item.profit_detail.may, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.april, formula: items.profit_detail.april_formula } : items.profit_detail.april,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.june, formula: item.profit_detail.june_formula } : item.profit_detail.june, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.may, formula: items.profit_detail.may_formula } : items.profit_detail.may,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.july, formula: item.profit_detail.july_formula } : item.profit_detail.july, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.june, formula: items.profit_detail.june_formula } : items.profit_detail.june,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.august, formula: item.profit_detail.august_formula } : item.profit_detail.august, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.july, formula: items.profit_detail.july_formula } : items.profit_detail.july,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.september, formula: item.profit_detail.september_formula } : item.profit_detail.september, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.august, formula: items.profit_detail.august_formula } : items.profit_detail.august,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.october, formula: item.profit_detail.october_formula } : item.profit_detail.october, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.september, formula: items.profit_detail.september_formula } : items.profit_detail.september,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.november, formula: item.profit_detail.november_formula } : item.profit_detail.november, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.october, formula: items.profit_detail.october_formula } : items.profit_detail.october,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.december, formula: item.profit_detail.december_formula } : item.profit_detail.december, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.november, formula: items.profit_detail.november_formula } : items.profit_detail.november,
items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.december, formula: items.profit_detail.december_formula } : items.profit_detail.december,
]) ])
} }
if (items.children !== null) { if (items.children !== null) {
...@@ -847,6 +858,7 @@ export default class SubHolding extends Component { ...@@ -847,6 +858,7 @@ export default class SubHolding extends Component {
} }
dataTable2.push([...dataTable[indexID], dataTable2.push([...dataTable[indexID],
item.formula,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march, item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march,
...@@ -900,18 +912,18 @@ export default class SubHolding extends Component { ...@@ -900,18 +912,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz) // console.log(indexIDzz)
if (indexIDzz != -1) { if (indexIDzz != -1) {
dataTable3.push([...dataTable2[indexIDzz], dataTable3.push([...dataTable2[indexIDzz],
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.january, formula: item.profit_detail.january_formula } : item.profit_detail.january, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.january, formula: items.profit_detail.january_formula } : items.profit_detail.january,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.february, formula: item.profit_detail.february_formula } : item.profit_detail.february, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.february, formula: items.profit_detail.february_formula } : items.profit_detail.february,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.march, formula: item.profit_detail.march_formula } : item.profit_detail.march, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.march, formula: items.profit_detail.march_formula } : items.profit_detail.march,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.april, formula: item.profit_detail.april_formula } : item.profit_detail.april, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.april, formula: items.profit_detail.april_formula } : items.profit_detail.april,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.may, formula: item.profit_detail.may_formula } : item.profit_detail.may, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.may, formula: items.profit_detail.may_formula } : items.profit_detail.may,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.june, formula: item.profit_detail.june_formula } : item.profit_detail.june, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.june, formula: items.profit_detail.june_formula } : items.profit_detail.june,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.july, formula: item.profit_detail.july_formula } : item.profit_detail.july, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.july, formula: items.profit_detail.july_formula } : items.profit_detail.july,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.august, formula: item.profit_detail.august_formula } : item.profit_detail.august, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.august, formula: items.profit_detail.august_formula } : items.profit_detail.august,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.september, formula: item.profit_detail.september_formula } : item.profit_detail.september, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.september, formula: items.profit_detail.september_formula } : items.profit_detail.september,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.october, formula: item.profit_detail.october_formula } : item.profit_detail.october, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.october, formula: items.profit_detail.october_formula } : items.profit_detail.october,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.november, formula: item.profit_detail.november_formula } : item.profit_detail.november, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.november, formula: items.profit_detail.november_formula } : items.profit_detail.november,
item.type_report_id == 5 || item.type_report_id == 6 || item.type_report_id == 7 ? { value: item.profit_detail.december, formula: item.profit_detail.december_formula } : item.profit_detail.december, items.type_report_id == 5 || items.type_report_id == 6 || items.type_report_id == 7 ? { value: items.profit_detail.december, formula: items.profit_detail.december_formula } : items.profit_detail.december,
]) ])
} }
if (items.children !== null) { if (items.children !== null) {
...@@ -980,18 +992,18 @@ export default class SubHolding extends Component { ...@@ -980,18 +992,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz) // console.log(indexIDzz)
if (indexIDzz != -1) { if (indexIDzz != -1) {
dataTable2.push([...dataTable[indexIDzz], dataTable2.push([...dataTable[indexIDzz],
item.profit_loss.january, items.profit_loss.january,
item.profit_loss.february, items.profit_loss.february,
item.profit_loss.march, items.profit_loss.march,
item.profit_loss.april, items.profit_loss.april,
item.profit_loss.may, items.profit_loss.may,
item.profit_loss.june, items.profit_loss.june,
item.profit_loss.july, items.profit_loss.july,
item.profit_loss.august, items.profit_loss.august,
item.profit_loss.september, items.profit_loss.september,
item.profit_loss.october, items.profit_loss.october,
item.profit_loss.november, items.profit_loss.november,
item.profit_loss.december, items.profit_loss.december,
]) ])
} }
if (items.children !== null) { if (items.children !== null) {
...@@ -1057,18 +1069,18 @@ export default class SubHolding extends Component { ...@@ -1057,18 +1069,18 @@ export default class SubHolding extends Component {
// console.log(indexIDzz) // console.log(indexIDzz)
if (indexIDzz != -1) { if (indexIDzz != -1) {
dataTable3.push([...dataTable2[indexIDzz], dataTable3.push([...dataTable2[indexIDzz],
item.profit_loss.january, items.profit_loss.january,
item.profit_loss.february, items.profit_loss.february,
item.profit_loss.march, items.profit_loss.march,
item.profit_loss.april, items.profit_loss.april,
item.profit_loss.may, items.profit_loss.may,
item.profit_loss.june, items.profit_loss.june,
item.profit_loss.july, items.profit_loss.july,
item.profit_loss.august, items.profit_loss.august,
item.profit_loss.september, items.profit_loss.september,
item.profit_loss.october, items.profit_loss.october,
item.profit_loss.november, items.profit_loss.november,
item.profit_loss.december, items.profit_loss.december,
]) ])
} }
if (items.children !== null) { if (items.children !== null) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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