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
70c9eb69
Commit
70c9eb69
authored
May 06, 2021
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bs
parent
143ad8d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
28 deletions
+35
-28
BalanceSheetRO.js
src/container/RollingOutlook/BalanceSheetRO.js
+35
-28
No files found.
src/container/RollingOutlook/BalanceSheetRO.js
View file @
70c9eb69
...
@@ -206,19 +206,18 @@ export default class BalanceSheetRO extends Component {
...
@@ -206,19 +206,18 @@ export default class BalanceSheetRO extends Component {
item.level,
item.level,
item.description,
item.description,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
january
,
formula
:
item
.
balance_sheet
.
january_formula
}
:
Number
(
item
.
balance_sheet
.
january
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.january).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
february
,
formula
:
item
.
balance_sheet
.
february_formula
}
:
Number
(
item
.
balance_sheet
.
february
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.february).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
march
,
formula
:
item
.
balance_sheet
.
march_formula
}
:
Number
(
item
.
balance_sheet
.
march
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.march).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
april
,
formula
:
item
.
balance_sheet
.
april_formula
}
:
Number
(
item
.
balance_sheet
.
april
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.april).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
may
,
formula
:
item
.
balance_sheet
.
may_formula
}
:
Number
(
item
.
balance_sheet
.
may
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.may).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
june
,
formula
:
item
.
balance_sheet
.
june_formula
}
:
Number
(
item
.
balance_sheet
.
june
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.june).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
july
,
formula
:
item
.
balance_sheet
.
july_formula
}
:
Number
(
item
.
balance_sheet
.
july
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.july).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
august
,
formula
:
item
.
balance_sheet
.
august_formula
}
:
Number
(
item
.
balance_sheet
.
august
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.august).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
september
,
formula
:
item
.
balance_sheet
.
september_formula
}
:
Number
(
item
.
balance_sheet
.
september
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.september).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.october).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
november
,
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.november).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
item
.
balance_sheet
.
total_current_year
===
""
?
"0"
:
item
.
balance_sheet
.
total_current_year
,
item.order,
item.order,
item.condition_it_should_be,
item.condition_it_should_be,
item.condition_if_wrong,
item.condition_if_wrong,
...
@@ -242,18 +241,18 @@ export default class BalanceSheetRO extends Component {
...
@@ -242,18 +241,18 @@ export default class BalanceSheetRO extends Component {
item.level,
item.level,
item.description,
item.description,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
january
,
formula
:
item
.
balance_sheet
.
january_formula
}
:
Number
(
item
.
balance_sheet
.
january
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.january).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
february
,
formula
:
item
.
balance_sheet
.
february_formula
}
:
Number
(
item
.
balance_sheet
.
february
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.february).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
march
,
formula
:
item
.
balance_sheet
.
march_formula
}
:
Number
(
item
.
balance_sheet
.
march
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.march).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
april
,
formula
:
item
.
balance_sheet
.
april_formula
}
:
Number
(
item
.
balance_sheet
.
april
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.april).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
may
,
formula
:
item
.
balance_sheet
.
may_formula
}
:
Number
(
item
.
balance_sheet
.
may
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.may).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
june
,
formula
:
item
.
balance_sheet
.
june_formula
}
:
Number
(
item
.
balance_sheet
.
june
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.june).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
july
,
formula
:
item
.
balance_sheet
.
july_formula
}
:
Number
(
item
.
balance_sheet
.
july
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.july).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
august
,
formula
:
item
.
balance_sheet
.
august_formula
}
:
Number
(
item
.
balance_sheet
.
august
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.august).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
september
,
formula
:
item
.
balance_sheet
.
september_formula
}
:
Number
(
item
.
balance_sheet
.
september
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.september).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
october
,
formula
:
item
.
balance_sheet
.
october_formula
}
:
Number
(
item
.
balance_sheet
.
october
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.october).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
november
,
formula
:
item
.
balance_sheet
.
november_formula
}
:
Number
(
item
.
balance_sheet
.
november
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.november).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
String
(
item
.
description
).
toLocaleLowerCase
()
==
"profit (loss) mtd"
?
{
value
:
item
.
balance_sheet
.
december
,
formula
:
item
.
balance_sheet
.
december_formula
}
:
Number
(
item
.
balance_sheet
.
december
).
toFixed
(
1
),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).toFixed(1) : item.type_report_id == 5 || item.type_report_id == 6
? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order,
item.order,
item.condition_it_should_be,
item.condition_it_should_be,
...
@@ -634,11 +633,19 @@ export default class BalanceSheetRO extends Component {
...
@@ -634,11 +633,19 @@ export default class BalanceSheetRO extends Component {
const handleValue = (data) => {
const handleValue = (data) => {
let total = 0
let total = 0
if (data.rowData[5] == "Cash and cash equivalent" && data.columnIndex == 19) {
console.log(data.rowData[19]);
}
dataTable2.map((item, index) => {
dataTable2.map((item, index) => {
// if (data.rowData[5] == 'Retained Earnings') {
// if (data.rowData[5] == 'Retained Earnings') {
// console.log(item[data.columnIndex].value)
// console.log(item[data.columnIndex].value)
// }
// }
if (data.rowData[1] === item[2]) {
if (data.rowData[1] === item[2]) {
if(item[data.columnIndex] == undefined ) {
console.log(item);
}
let itemVal = item[data.columnIndex].value !== undefined ? Number(item[data.columnIndex].value) : Number(item[data.columnIndex])
let itemVal = item[data.columnIndex].value !== undefined ? Number(item[data.columnIndex].value) : Number(item[data.columnIndex])
total = item[data.columnIndex] === undefined ? Number(total) + 0 : Number(total) + itemVal
total = item[data.columnIndex] === undefined ? Number(total) + 0 : Number(total) + itemVal
}
}
...
@@ -676,7 +683,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -676,7 +683,7 @@ export default class BalanceSheetRO extends Component {
let total = 0
let total = 0
// console.log(tableMeta.rowData)
// console.log(tableMeta.rowData)
console
.
log
(
dataTable2
[
tableMeta
.
rowIndex
][
23
])
//
console.log( dataTable2[tableMeta.rowIndex][23])
// console.log(total)
// console.log(total)
// dataTable2[tableMeta.rowIndex][column] = total
// dataTable2[tableMeta.rowIndex][column] = total
if (column == 19 && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
if (column == 19 && String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
...
@@ -737,7 +744,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -737,7 +744,7 @@ export default class BalanceSheetRO extends Component {
}
}
} else {
} else {
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
console
.
log
(
indexID
)
//
console.log(indexID)
if (indexID !== -1) {
if (indexID !== -1) {
// console.log(value.formula[indexID].value)
// console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value
let valuezz = value.formula[indexID].value
...
@@ -2322,7 +2329,7 @@ export default class BalanceSheetRO extends Component {
...
@@ -2322,7 +2329,7 @@ export default class BalanceSheetRO extends Component {
type="text"
type="text"
placeholder=""
placeholder=""
disabled={true}
disabled={true}
value
=
{
Number
(
handle
ValueFormula
(
val
,
tableMeta
)).
toFixed
(
1
)}
value={Number(handle
Forecast(tableMeta, `${Number(this.props.periode)}`, 19
)).toFixed(1)}
/>
/>
}
}
/>
/>
...
...
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