Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 馃幐 Total Accumulator hook for totals row #55

Merged
merged 7 commits into from
Feb 12, 2019

Conversation

SaiFi0102
Copy link
Contributor

@SaiFi0102 SaiFi0102 commented Jan 18, 2019

Added the option to add an event "accumulator" which will be used to calculate the totals row.
See the referenced PR for frappe for screenshots.

DataTable looks for hooks.totalAccumulator. If it finds the function, it will call it otherwise it will use it's default accumulator logic.

If the accumulator event function returns a false, the DataTable's default accumulator logic will be used.

src/body-renderer.js Outdated Show resolved Hide resolved
and moved function to hooks.totalAccumulator
@SaiFi0102 SaiFi0102 changed the title feat: 馃幐 Accumulator event for totals row feat: 馃幐 Total Accumulator hook for totals row Jan 23, 2019
@netchampfaris netchampfaris merged commit 0f44a51 into frappe:master Feb 12, 2019
@netchampfaris
Copy link
Collaborator

馃帀 This PR is included in version 1.9.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

@SaiFi0102 SaiFi0102 deleted the Accumulator branch February 12, 2019 14:39
netchampfaris pushed a commit to frappe/frappe that referenced this pull request Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants