Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
2f3191e0
Commit
2f3191e0
authored
Aug 03, 2017
by
Alexander.Trofimov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update grand totals
parent
891215e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
cell/model/PivotTables.js
cell/model/PivotTables.js
+7
-7
No files found.
cell/model/PivotTables.js
View file @
2f3191e0
...
...
@@ -2775,11 +2775,11 @@ CT_pivotTableDefinition.prototype.asc_set = function (api, newVal) {
var
t
=
this
;
api
.
_changePivotStyle
(
this
,
function
(
ws
)
{
ws
.
clearPivotRable
(
t
);
if
(
t
.
rowGrandTotals
!==
newVal
.
rowGrandTotals
)
{
t
.
asc_setRowGrandTotals
(
newVal
.
rowGrandTotals
);
if
(
t
.
asc_getRowGrandTotals
()
!==
newVal
.
rowGrandTotals
)
{
t
.
asc_setRowGrandTotals
(
newVal
.
rowGrandTotals
?
null
:
false
);
}
if
(
t
.
colGrandTotals
!==
newVal
.
colGrandTotals
)
{
t
.
asc_setColGrandTotals
(
newVal
.
colGrandTotals
);
if
(
t
.
asc_getColGrandTotals
()
!==
newVal
.
colGrandTotals
)
{
t
.
asc_setColGrandTotals
(
newVal
.
colGrandTotals
?
null
:
false
);
}
ws
.
updatePivotTable
(
t
);
});
...
...
@@ -2787,14 +2787,14 @@ CT_pivotTableDefinition.prototype.asc_set = function (api, newVal) {
CT_pivotTableDefinition
.
prototype
.
asc_setRowGrandTotals
=
function
(
newVal
)
{
var
res
;
this
.
rowGrandTotals
=
newVal
;
if
(
res
=
this
.
changeGrandTotals
(
this
.
col
Items
,
newVal
))
{
if
(
res
=
this
.
changeGrandTotals
(
this
.
row
Items
,
newVal
))
{
this
.
getRange
().
setOffsetLast
(
new
AscCommonExcel
.
CRangeOffset
(
res
,
0
));
}
};
CT_pivotTableDefinition
.
prototype
.
asc_setColGrandTotals
=
function
(
newVal
)
{
var
res
;
this
.
colGrandTotals
=
newVal
;
if
(
res
=
this
.
changeGrandTotals
(
this
.
row
Items
,
newVal
))
{
if
(
res
=
this
.
changeGrandTotals
(
this
.
col
Items
,
newVal
))
{
this
.
getRange
().
setOffsetLast
(
new
AscCommonExcel
.
CRangeOffset
(
0
,
res
));
}
};
...
...
@@ -2859,7 +2859,7 @@ CT_pivotTableDefinition.prototype.changeGrandTotals = function (items, newVal) {
if
(
items
&&
0
<
l
)
{
i
=
items
.
i
;
last
=
i
[
l
-
1
];
if
(
newVal
)
{
if
(
n
ull
===
n
ewVal
)
{
// Add
if
(
AscCommonExcel
.
c_oAscItemType
.
Grand
!==
last
.
t
)
{
last
=
new
CT_I
();
...
...
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