Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 999fedbd

Von Udo Spallek vor fast 19 Jahren hinzugefügt

  • ID 999fedbd9ddf7f73d468776559edfcc34f7aafdf
  • Vorgänger 1084d82b
  • Nachfolger 7e5216e8

sub round_amount schnedet nun anhängende Nullen automatisch ab.

Unterschiede anzeigen:

SL/Form.pm
614 614
  # Udo Spallek
615 615
  $amount       = $amount * (10 ** ($places));
616 616
  $round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
617
  
618
    do {
619
         $round_amount =~ s/(0|\.)$//g;
620
         $places--;
621
       } while ($places > 0);
617 622

  
618 623
  $main::lxdebug->leave_sub();
619 624

  

Auch abrufbar als: Unified diff