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

Affichage différent suivant le résultat

New Here ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

Bonjour,

Je en train de réaliser un formulaire dans lequel j'ai besoin de calculer les tranches d'imposition.

Dans ce formulaire je souhaite afficher la tranches d'imposition suivant le résultat du calcul de revenus imposable.

J'ai déjà le résultat de mon calcul imposable dans un champ cachée  nommé " RevImp "

Suivant le résultat obtenu dans le champ " RevImp " je doit afficher ceci dans un nouveau champ visible :

Mon résultat est inférieur à 9807 € j'affiche 0%

Mon résultat est compris entre 9807€ et 27086€ j'affiche 14%

Mon résultat est compris entre 37086€ et 72617€ j'affiche 30%

Mon résultat est compris entre 72617€ et 153783€ j'affiche 41%

Mon résultat est supérieur à 153783€ j'affiche 45%

J'ai cherché des solutions avec javascript, mais mes connaissances en la matière atteigne leur limite et je ne trouve rien sur le net qui pourrais m'aider.

Pouvez-vous m'aider à trouver une solution ?

Merci par avance.

TOPICS
Acrobat SDK and JavaScript , Windows

Views

342

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

correct answers 1 Correct answer

Community Expert , Mar 31, 2018 Mar 31, 2018

Use this script as the custom calculation script of the tax bracket field:

var taxAmount = Number(this.getField("RevImp").valueAsString);

if (taxAmount<9807) event.value = "0%";

else if (taxAmount<=27086) event.value = "14%";

else if (taxAmount<=72617) event.value = "30%";

else if (taxAmount<=153783) event.value = "41%";

else event.value = "45%";

Votes

Translate

Translate
Community Expert ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

Use this script as the custom calculation script of the tax bracket field:

var taxAmount = Number(this.getField("RevImp").valueAsString);

if (taxAmount<9807) event.value = "0%";

else if (taxAmount<=27086) event.value = "14%";

else if (taxAmount<=72617) event.value = "30%";

else if (taxAmount<=153783) event.value = "41%";

else event.value = "45%";

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
New Here ,
Mar 31, 2018 Mar 31, 2018

Copy link to clipboard

Copied

LATEST

Merci énormément, de votre réponse.

Enfin ça fonctionne parfaitement.

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