summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/tax_rate.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/tax_rate.html')
-rw-r--r--httemplate/edit/process/tax_rate.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/httemplate/edit/process/tax_rate.html b/httemplate/edit/process/tax_rate.html
new file mode 100644
index 0000000..431e542
--- /dev/null
+++ b/httemplate/edit/process/tax_rate.html
@@ -0,0 +1,22 @@
+<% 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;
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>