Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mjwshared
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
mjwshared
Commits
c4a671b5
Commit
c4a671b5
authored
4 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Change internal variable name in CRM.payment.getTotalAmount()
parent
166cbd03
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/crm.payment.js
+8
-8
8 additions, 8 deletions
js/crm.payment.js
with
8 additions
and
8 deletions
js/crm.payment.js
+
8
−
8
View file @
c4a671b5
...
...
@@ -9,32 +9,32 @@
* @returns {number}
*/
getTotalAmount
:
function
()
{
var
total
Fee
=
0.0
;
var
total
Amount
=
0.0
;
if
(
CRM
.
payment
.
isEventAdditionalParticipants
())
{
total
Fee
=
null
;
total
Amount
=
null
;
}
else
if
(
document
.
getElementById
(
'
totalTaxAmount
'
)
!==
null
)
{
total
Fee
=
parseFloat
(
this
.
calculateTaxAmount
());
total
Amount
=
parseFloat
(
this
.
calculateTaxAmount
());
this
.
debugging
(
this
.
scriptName
,
'
Calculated amount using internal calculateTaxAmount()
'
);
}
else
if
(
typeof
calculateTotalFee
==
'
function
'
)
{
// This is ONLY triggered in the following circumstances on a CiviCRM contribution page:
// - With a priceset that allows a 0 amount to be selected.
// - When Stripe is the ONLY payment processor configured on the page.
total
Fee
=
parseFloat
(
calculateTotalFee
());
total
Amount
=
parseFloat
(
calculateTotalFee
());
}
else
if
(
this
.
getIsDrupalWebform
())
{
// This is how webform civicrm calculates the amount in webform_civicrm_payment.js
$
(
'
.line-item:visible
'
,
'
#wf-crm-billing-items
'
).
each
(
function
()
{
total
Fee
+=
parseFloat
(
$
(
this
).
data
(
'
amount
'
));
total
Amount
+=
parseFloat
(
$
(
this
).
data
(
'
amount
'
));
});
}
else
if
(
document
.
getElementById
(
'
total_amount
'
))
{
// The input#total_amount field exists on backend contribution forms
total
Fee
=
parseFloat
(
document
.
getElementById
(
'
total_amount
'
).
value
);
total
Amount
=
parseFloat
(
document
.
getElementById
(
'
total_amount
'
).
value
);
}
this
.
debugging
(
this
.
scriptName
,
'
getTotalAmount:
'
+
total
Fee
);
return
total
Fee
;
this
.
debugging
(
this
.
scriptName
,
'
getTotalAmount:
'
+
total
Amount
);
return
total
Amount
;
},
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment