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
43490a74
Commit
43490a74
authored
Dec 05, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ketinggalan
parent
f325b20e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
6 deletions
+50
-6
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+50
-6
No files found.
src/container/MonthlyReport/BalanceSheetMR.js
View file @
43490a74
...
@@ -520,9 +520,11 @@ export default class BalanceSheetMR extends Component {
...
@@ -520,9 +520,11 @@ export default class BalanceSheetMR extends Component {
if (String(item).includes('#')) {
if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) {
if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
let tst = String(item).replace('[M-1]', '')
let
indexID
=
dataTable2
.
findIndex
((
val
)
=>
val
[
21
]
==
tst
)
// let indexID = dataTable2.findIndex((val) => val[21] == tst)
let data = tableMeta.rowData[20]
let indexID = data.findIndex((val) => val.item_formula == String(`@${item}`))
if (indexID !== -1) {
if (indexID !== -1) {
let
valuezz
=
data
Table2
[
indexID
][
9
]
let valuezz = data
[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz)
anjay.push(valuezz == "" ? 0 : valuezz)
}
}
} else {
} else {
...
@@ -584,9 +586,11 @@ export default class BalanceSheetMR extends Component {
...
@@ -584,9 +586,11 @@ export default class BalanceSheetMR extends Component {
let totalPrio = 0
let totalPrio = 0
let optPrio = ""
let optPrio = ""
let prio = false
let prio = false
let optPrev = ""
anjay2.map((item, index) => {
anjay2.map((item, index) => {
if (Array.isArray(item)) {
if (Array.isArray(item)) {
prio = true
prio = true
optPrev = opt
item.map((items, indexs) => {
item.map((items, indexs) => {
if (items == "+") {
if (items == "+") {
optPrio = "tambah"
optPrio = "tambah"
...
@@ -628,7 +632,17 @@ export default class BalanceSheetMR extends Component {
...
@@ -628,7 +632,17 @@ export default class BalanceSheetMR extends Component {
if (item == "+") {
if (item == "+") {
opt = "tambah"
opt = "tambah"
if (prio) {
if (prio) {
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
prio = false
totalPrio = 0
totalPrio = 0
optPrio = ""
optPrio = ""
...
@@ -636,7 +650,17 @@ export default class BalanceSheetMR extends Component {
...
@@ -636,7 +650,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "-") {
} else if (item == "-") {
opt = "kurang"
opt = "kurang"
if (prio) {
if (prio) {
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
prio = false
totalPrio = 0
totalPrio = 0
optPrio = ""
optPrio = ""
...
@@ -644,7 +668,17 @@ export default class BalanceSheetMR extends Component {
...
@@ -644,7 +668,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "*") {
} else if (item == "*") {
opt = "kali"
opt = "kali"
if (prio) {
if (prio) {
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
prio = false
totalPrio = 0
totalPrio = 0
optPrio = ""
optPrio = ""
...
@@ -652,7 +686,17 @@ export default class BalanceSheetMR extends Component {
...
@@ -652,7 +686,17 @@ export default class BalanceSheetMR extends Component {
} else if (item == "/") {
} else if (item == "/") {
opt = "bagi"
opt = "bagi"
if (prio) {
if (prio) {
total
=
Number
(
Number
(
totalPrio
)
+
Number
(
total
))
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
prio = false
totalPrio = 0
totalPrio = 0
optPrio = ""
optPrio = ""
...
...
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