Skip to main content
Participant
January 26, 2024
Question

Adding 2% charge for Credit Transactions

  • January 26, 2024
  • 3 replies
  • 691 views

Hopefully, I am adding this to the correct forum.

 

Ok. So I've been tasked with updating our "pricing list" (which I have) and now they want me to add an option for Credit Card transactions to add a 2% cost.

 

I have added (what I believe) are the correct fields that I need. I have a checkbox labeled "Credit" and a box next to it called "CreditCharge". I have tried a few functions that other's have posted but it doesn't seem to be doing it correctly (even when I change the names to what they should be).

 

I know I need to do a "custom calculation scripts" but I can't for the life of me figure out what I need to put as the scripts.

 

To sum it up:
1. I need to add a checkable box.

    a. When checked it takes the subTotal and adds a 2% charge

    b. When not checked nothing is added.

This topic has been closed for replies.

3 replies

Nesa Nurani
Community Expert
Community Expert
January 26, 2024

You want to show 2% of "subTotal" in "CreditCharge" field if checkbox "Credit" is checked?

You can use this as custom calculation script of "CreditCharge" field:

var subT = Number(this.getField("subTotal").valueAsString);
var check = this.getField("Credit").valueAsString;
event.value = (check === "Off" || !subT) ? "" : subT*.02;
kglad
Community Expert
Community Expert
January 26, 2024

assuming this is an acrobat question.

Participant
January 26, 2024

This is in fact an Acrobat question. Thank you!

kglad
Community Expert
Community Expert
January 26, 2024

no problem 

kglad
Community Expert
Community Expert
January 26, 2024

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">