[freeside-commits] freeside/httemplate/edit/process tax_rate.html, 1.1, 1.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Sun Apr 6 09:12:48 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv8622/httemplate/edit/process
Modified Files:
tax_rate.html
Log Message:
new tax rating engine
Index: tax_rate.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/tax_rate.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- tax_rate.html 1 Apr 2008 00:54:43 -0000 1.1
+++ tax_rate.html 6 Apr 2008 16:12:46 -0000 1.2
@@ -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;
More information about the freeside-commits
mailing list