import torrus 1.0.9
[freeside.git] / httemplate / edit / process / tax_rate.html
index 933bf07..431e542 100644 (file)
@@ -1,9 +1,18 @@
 <% include( 'elements/process.html',
               'table' => 'tax_rate',
+              'value_callback' => $value_callback,
               'popup_reload' => 'Tax changed', #a popup "parent reload" for now
               #someday change the individual element and go away instead
           )
 %>
+<%once>
+
+my $value_callback = sub { my ($field, $value) = @_;
+                           ($field =~ /^(tax|excessrate|usetax|useexcessrate)$/)
+                             ? $value/100
+                             : $value
+                         };
+</%once>
 <%init>
 
 my $conf = new FS::Conf;