Copy link to clipboard
Copied
I am new to JS and have searched and used every calculation I can to no avail. I need to
Subtract
Deposit (which is 50% of the project) from
JobDepositAmt-->(aka previous deposits)) where in some cases the
JobDepositAmt may in fact be 0.
so if the job total is:
$100 and the client has already put down
$30, i need them to get to 50% down by paying
$20 more which would be the AmountDue
also note that Deposit is a field that already has a calculation of (JobGrandTotalAmt)*(.5)*(1000)
I tried simplified field as well as the custom script and it never returns. sometims it returns as 0, or it retuns with an error. Here is where i left off in the AmountDue field:
event.value=Number(this.getField("Deposit").value)-Number(this.getField("JobDepositAmt").value);
ive attached a photo for reference TIA!!
Copy link to clipboard
Copied
That script look ok. Can you share the actual file?
Copy link to clipboard
Copied
i included the snapshot above
Copy link to clipboard
Copied
Well, the script works fine for me. Check that other scripts don't interfere with that field.