]> wagnertech.de Git - kivitendo-erp.git/blobdiff - SL/Form.pm
Form->format_amount: Warnung über negativen repeat count vermeiden
[kivitendo-erp.git] / SL / Form.pm
index c59669c41a77a075a8fe873f3e84b2783edbeaee..c29097289d0cae8d07eda6cfeff7daedb5fcbc8b 100644 (file)
@@ -839,7 +839,7 @@ sub format_amount {
   if ($places || $p[1]) {
     $amount .= $d[0]
             .  ( $p[1] || '' )
-            .  (0 x (abs($places || 0) - length ($p[1]||'')));           # pad the fraction
+            .  (0 x max(abs($places || 0) - length ($p[1]||''), 0));     # pad the fraction
   }
 
   $amount = do {