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
a2446d77
Commit
a2446d77
authored
Nov 28, 2020
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
udah oke
parent
cfa0136f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+5
-4
No files found.
src/container/MonthlyReport/ProfitLossMR.js
View file @
a2446d77
...
@@ -343,7 +343,7 @@ export default class ProfitLossMR extends Component {
...
@@ -343,7 +343,7 @@ export default class ProfitLossMR extends Component {
item.mtd_vs_previous_month,
item.mtd_vs_previous_month,
item.mtd_vs_mb,
item.mtd_vs_mb,
item.mtd_vs_rb,
item.mtd_vs_rb,
item
.
order
,
item.order
s
,
item.error
item.error
]
]
})
})
...
@@ -356,6 +356,7 @@ export default class ProfitLossMR extends Component {
...
@@ -356,6 +356,7 @@ export default class ProfitLossMR extends Component {
})
})
// console.log(this.state.buttonError)
// console.log(this.state.buttonError)
})
})
console.log(dataTable);
}
}
}
}
})
})
...
@@ -366,7 +367,7 @@ export default class ProfitLossMR extends Component {
...
@@ -366,7 +367,7 @@ export default class ProfitLossMR extends Component {
this.state.dataTable.map(i => {
this.state.dataTable.map(i => {
data.push({
data.push({
item_report_id: i[1],
item_report_id: i[1],
notes
:
i
[
6
]
,
notes:
String(i[6])
,
rolling_outlook: String(Number(i[7]).toFixed(1)),
rolling_outlook: String(Number(i[7]).toFixed(1)),
master_budget: String(Number(i[8]).toFixed(1)),
master_budget: String(Number(i[8]).toFixed(1)),
rolling_budget: String(Number(i[9]).toFixed(1)),
rolling_budget: String(Number(i[9]).toFixed(1)),
...
@@ -385,7 +386,7 @@ export default class ProfitLossMR extends Component {
...
@@ -385,7 +386,7 @@ export default class ProfitLossMR extends Component {
})
})
})
})
let body = {
let body = {
//
submission_id: this.props.submissionID,
submission_id: this.props.submissionID,
company_id: this.props.company.company_id,
company_id: this.props.company.company_id,
periode: this.props.periode,
periode: this.props.periode,
report_id: this.props.report_id,
report_id: this.props.report_id,
...
@@ -448,7 +449,7 @@ export default class ProfitLossMR extends Component {
...
@@ -448,7 +449,7 @@ export default class ProfitLossMR extends Component {
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]) {
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
+ type] == undefined ? (Number(total) + 0) : (Number(total) + Number(String(item[data.columnIndex + type]).includes('-')? Number(String(item[data.columnIndex + type]).substr(1, String(item[data.columnIndex + type]).length)) * -1 : Number(item[data.columnIndex + type
])))
}
}
})
})
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2])
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2])
...
...
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