TOPIC:

Decimals 1 month 1 week ago #258466

  • Topic Author
  • Leni14
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 164
  • Thanks: 0
Hi,

I have set up my form and all works fine now. Only thing I am not able to manage for 3 fields is to show the value as decimals.

So if the user is adding 10 to the field it should convert to 10,00 after leaving the field. It should stay 10,23 for example, if the user enters 10,23 - of course :-)

It works perfectly for 2 fields but for other 3 fields it does not.

Can you help with this?

This message contains confidential information


I would appreciate your help.

Thx,
Leni

Please Log in or Create an account to join the conversation.

Decimals 1 month 1 week ago #258472

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi again,

in your code for calculation you have .toFixed(2); for those fields Betrag netto, 19% Umsatzsteuer and Rechnungsbetrag, but not for Tagessatz, Stundensatz and Auslagen.

Could you please add it in calculation for this fields?

If you get in stuck please let me know, I will get back to this a little later

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Decimals 1 month 1 week ago #258476

  • Topic Author
  • Leni14
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 164
  • Thanks: 0
I tried to add it to the form option skrip. But I could not get it to work. It would be great if you could help me. I am not familiar with ActionScript :-(

Please Log in or Create an account to join the conversation.

Decimals 1 month 1 week ago #258482

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi,

solved!

I modified your code a little.

Let me know if you need more help

Regards,
Tihana
The following user(s) said Thank You: Leni14

Please Log in or Create an account to join the conversation.

Decimals 1 month 1 week ago #258581

  • Topic Author
  • Leni14
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 164
  • Thanks: 0
Hi!

Thank you very much for adjusting the code. But now there are some bugs on calculation.

If you enter 12,5 for Tagessatz

a) 12,5 is not converting to 12,50 after leaving the field

b) same with field "Anzahl"

c) it is not calculating correctly anymore. For example if you put 12,50 in Tagessatz or Stundensatz and 10 in "Anzahl Stunden", "Betrag netto" should be 12,50x10,00 = 125,00 but it's showing 120,00 instead.

d) on change of any variable the calculating fields are not recalculating anymore. For example if I change Tagessatz or Stundensatz from 12,50 to 10 it remains with 120, but it should recalculate

e) if changing Tagessatz to Stundensatz or vice versa, it emptied all fields earlier. Now the old values are still there and are not recalculating on any change

Can you try to make this working again?

I would appreciate your help.

Thank you,
Leni

Please Log in or Create an account to join the conversation.

Decimals 1 month 1 week ago #258601

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6086
  • Karma: 3
  • Thanks: 429
Hi,

please test it again.

And if you have old code please post it here

Once again sorry for confusion

Regards,
Tihana
The following user(s) said Thank You: Leni14

Please Log in or Create an account to join the conversation.

Time to create page: 0.044 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!