• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to add Dollar and Cent in separate Column and carry the whole dollar to dollar column?

New Here ,
Aug 19, 2024 Aug 19, 2024

Copy link to clipboard

Copied

I created a form version of our business bank deposit slip to easily enter cash and check information. I then auto calculated totals from each column (1 being dollars and 2 being cents). The problem I am facing is I can't figure out a way to carry over the total from cents to dollars when the cents column is more than 0.99. Is there a formula within adobe to carry this number over and "reset" at 0.00 when passing a full dollar in the cents column?

TOPICS
How to , PDF forms

Views

97

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 19, 2024 Aug 19, 2024

Copy link to clipboard

Copied

The easiest way is to make one field per row, formated as a 2 decimal number, right justify the fields, and line them up so the decimal is on top of the black vertical line separating dollars and cents:

 

PDFAutomationStation_0-1724146138099.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2024 Aug 19, 2024

Copy link to clipboard

Copied

Remove both calculations from "TOTAL" and "TOTAL CENTS" field, then use this as 'Custom calculation script' of "TOTAL" field:

var cents = 0, dollars = 0;

for(var i = 1; i <= 28; i++) {
 cents += Number(this.getField("Check Cents " + i).valueAsString) || 0;
 dollars += Number(this.getField("Check $ " + i).valueAsString) || 0;}

dollars += Math.floor(cents / 100);
var Rcents = cents % 100;

if (Rcents < 10)
 Rcents = "0" + Rcents;

event.value = dollars;
this.getField("TOTAL CENTS").value = Rcents;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

LATEST

Nice work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines