Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
b83c98ea
Commit
b83c98ea
authored
Jan 26, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into didam
parents
c2c26692
b3763a9c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
154 additions
and
91 deletions
+154
-91
SubHolding.js
src/container/Laporan/SubHolding.js
+75
-77
TableSubHolding.js
src/container/Laporan/TableSubHolding.js
+79
-14
No files found.
src/container/Laporan/SubHolding.js
View file @
b83c98ea
...
...
@@ -814,9 +814,10 @@ export default class SubHolding extends Component {
}
}
})
this
.
setState
({
dataTable
,
loading
:
false
,
previewTable
:
true
,
previewDownload
:
true
},
()
=>
{
console
.
log
(
this
.
state
.
dataTable
)
// this.getTaxPlanMR(payload)
console
.
log
(
dataTable
)
// this.setState({ dataTable, previewTable: true, loading: false, previewDownload: true })
this
.
setState
({
dataTable
},
()
=>
{
this
.
getTaxPlanMR
(
payload
)
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -1726,86 +1727,83 @@ export default class SubHolding extends Component {
}
getTaxPlanMR
(
payload
)
{
let
payloadLast
=
{
"report_id"
:
this
.
state
.
report
.
value
,
"revision"
:
this
.
state
.
revisionType
,
"periode"
:
Number
(
this
.
state
.
periode
.
periode
)
-
1
,
"company_id"
:
this
.
state
.
company
.
company_id
,
"submission_id"
:
this
.
state
.
submissionID
}
api
.
create
().
getReportTPMR
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
console
.
log
(
response
);
let
dataTable
=
this
.
state
.
dataTable
// let dataTable2 = []
// if (response.data) {
// let res = response.data.data
// res.map((item,index) => {
// let indexID = dataTable.findIndex((val) => val[1] == item.id)
// if (indexID != -1) {
// const handlePushChild = (items) => {
// let indexIDzz = dataTable.findIndex((val) => val[1] === items.id)
// // console.log(indexIDzz)
// if (indexIDzz != -1) {
// dataTable2.push([...dataTable[indexIDzz],
// Number(items.balance_sheet.january).toFixed(1),
// Number(items.balance_sheet.february).toFixed(1),
// Number(items.balance_sheet.march).toFixed(1),
// Number(items.balance_sheet.april).toFixed(1),
// Number(items.balance_sheet.may).toFixed(1),
// Number(items.balance_sheet.june).toFixed(1),
// Number(items.balance_sheet.july).toFixed(1),
// Number(items.balance_sheet.august).toFixed(1),
// Number(items.balance_sheet.september).toFixed(1),
// Number(items.balance_sheet.october).toFixed(1),
// Number(items.balance_sheet.november).toFixed(1),
// Number(items.balance_sheet.december).toFixed(1),
// ])
// }
// if (items.children !== null) {
// if (items.children.length > 0) {
// items.children.map((itemss, indexss) => {
// handlePushChild(itemss)
// })
// }
// }
// }
console
.
log
(
dataTable
)
let
dataTable2
=
[]
if
(
response
.
data
)
{
let
res
=
response
.
data
.
data
res
.
map
((
item
,
index
)
=>
{
let
indexID
=
dataTable
.
findIndex
((
val
)
=>
val
[
4
]
==
item
.
id
)
console
.
log
(
indexID
)
if
(
indexID
!=
-
1
)
{
const
handlePushChild
=
(
items
)
=>
{
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
4
]
===
items
.
id
)
// console.log(indexIDzz)
if
(
indexIDzz
!=
-
1
)
{
dataTable2
.
push
([...
dataTable
[
indexIDzz
],
Number
(
items
.
tax_planning_report
.
january
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
february
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
march
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
april
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
may
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
june
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
july
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
august
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
september
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
october
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
november
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
december
).
toFixed
(
1
),
Number
(
items
.
tax_planning_report
.
total_actual_before
).
toFixed
(
1
),
])
}
if
(
items
.
children
!==
null
)
{
if
(
items
.
children
.
length
>
0
)
{
items
.
children
.
map
((
itemss
,
indexss
)
=>
{
handlePushChild
(
itemss
)
})
}
}
}
// dataTable2.push([...dataTable[indexID],
// Number(item.balance_sheet.january).toFixed(1),
// Number(item.balance_sheet.february).toFixed(1),
// Number(item.balance_sheet.march).toFixed(1),
// Number(item.balance_sheet.april).toFixed(1),
// Number(item.balance_sheet.may).toFixed(1),
// Number(item.balance_sheet.june).toFixed(1),
// Number(item.balance_sheet.july).toFixed(1),
// Number(item.balance_sheet.august).toFixed(1),
// Number(item.balance_sheet.september).toFixed(1),
// Number(item.balance_sheet.october).toFixed(1),
// Number(item.balance_sheet.november).toFixed(1),
// Number(item.balance_sheet.december).toFixed(1),
// ])
dataTable2
.
push
([...
dataTable
[
indexID
],
Number
(
item
.
tax_planning_report
.
january
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
february
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
march
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
april
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
may
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
june
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
july
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
august
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
september
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
october
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
november
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
december
).
toFixed
(
1
),
Number
(
item
.
tax_planning_report
.
total_actual_before
).
toFixed
(
1
),
])
//
if (item.children !== null) {
//
if (item.children.length > 0) {
//
item.children.map((items, indexs) => {
//
handlePushChild(items)
//
})
//
}
//
}
if
(
item
.
children
!==
null
)
{
if
(
item
.
children
.
length
>
0
)
{
item
.
children
.
map
((
items
,
indexs
)
=>
{
handlePushChild
(
items
)
})
}
}
//
}
}
//
})
//
console.log(dataTable2)
// //
this.setState({ dataTable: dataTable2, previewTable: true, loading: false, previewDownload: true })
})
console
.
log
(
dataTable2
)
this
.
setState
({
dataTable
:
dataTable2
,
previewTable
:
true
,
loading
:
false
,
previewDownload
:
true
})
// this.setState({ dataTable2 }, () => {
// // console.log(this.state.dataTable2)
// this.getTaxPlanLastMR(payloadLast)
// })
//
} else {
//
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
//
}
}
else
{
this
.
setState
({
dataTable
:
[],
previewTable
:
false
,
loading
:
false
,
previewDownload
:
false
})
}
})
}
...
...
src/container/Laporan/TableSubHolding.js
View file @
b83c98ea
...
...
@@ -9991,7 +9991,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
1
).toFixed(1)}
value={Number(
tableMeta.rowData[22]
).toFixed(1)}
/>
}
/>
...
...
@@ -10014,7 +10014,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
2
).toFixed(1)}
value={Number(
tableMeta.rowData[23]
).toFixed(1)}
/>
}
/>
...
...
@@ -10037,7 +10037,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
3
).toFixed(1)}
value={Number(
tableMeta.rowData[24]
).toFixed(1)}
/>
}
/>
...
...
@@ -10060,7 +10060,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
4
).toFixed(1)}
value={Number(
tableMeta.rowData[25]
).toFixed(1)}
/>
}
/>
...
...
@@ -10085,7 +10085,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
5
).toFixed(1)}
value={Number(
tableMeta.rowData[26]
).toFixed(1)}
/>
}
/>
...
...
@@ -10108,7 +10108,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
6
).toFixed(1)}
value={Number(
tableMeta.rowData[27]
).toFixed(1)}
/>
}
/>
...
...
@@ -10131,7 +10131,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
7
).toFixed(1)}
value={Number(
tableMeta.rowData[28]
).toFixed(1)}
/>
}
/>
...
...
@@ -10154,7 +10154,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
8
).toFixed(1)}
value={Number(
tableMeta.rowData[29]
).toFixed(1)}
/>
}
/>
...
...
@@ -10179,7 +10179,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
9
).toFixed(1)}
value={Number(
tableMeta.rowData[30]
).toFixed(1)}
/>
}
/>
...
...
@@ -10202,7 +10202,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
10
).toFixed(1)}
value={Number(
tableMeta.rowData[31]
).toFixed(1)}
/>
}
/>
...
...
@@ -10225,7 +10225,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
11
).toFixed(1)}
value={Number(
tableMeta.rowData[32]
).toFixed(1)}
/>
}
/>
...
...
@@ -10248,7 +10248,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
12
).toFixed(1)}
value={Number(
tableMeta.rowData[33]
).toFixed(1)}
/>
}
/>
...
...
@@ -10271,7 +10271,7 @@ export default class TableSubHolding extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(
13
).toFixed(1)}
value={Number(
tableMeta.rowData[34]
).toFixed(1)}
/>
}
/>
...
...
@@ -10284,7 +10284,72 @@ export default class TableSubHolding extends Component {
)
}
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},{
name: "",
options: {
display: false
}
},
]
const columnDBOI = [
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment