projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix rounding error in CCH tax appropriation, RT#41610
[freeside.git]
/
httemplate
/
edit
/
elements
/
ApplicationCommon.html
diff --git
a/httemplate/edit/elements/ApplicationCommon.html
b/httemplate/edit/elements/ApplicationCommon.html
index
4595705
..
ffc303c
100644
(file)
--- a/
httemplate/edit/elements/ApplicationCommon.html
+++ b/
httemplate/edit/elements/ApplicationCommon.html
@@
-54,7
+54,7
@@
Examples:
<TR>
<TD ALIGN="right">Date: </TD>
<TR>
<TD ALIGN="right">Date: </TD>
- <TD><B><% time2str(
"%D"
, $src->_date) %></B></TD>
+ <TD><B><% time2str(
$date_format
, $src->_date) %></B></TD>
</TR>
<TR>
</TR>
<TR>
@@
-158,6
+158,7
@@
function changed(what) {
% }
% $desc .= ' (default)';
% }
% }
% $desc .= ' (default)';
% }
+% $total_owed = sprintf('%.2f', $total_owed + 0.00000001 ); #so 1.005 rounds to 1.01
% if ( $total_owed > 0 ) {
<% &{$row_generator}($key, $cbp, $desc, $total_owed, $amount, '') %>
% }
% if ( $total_owed > 0 ) {
<% &{$row_generator}($key, $cbp, $desc, $total_owed, $amount, '') %>
% }
@@
-354,7
+355,7
@@
function src_amount_changed () {
<OPTION VALUE="">Select <% $dst_thing %>
% foreach my $dst ( @dst ) {
<OPTION VALUE="">Select <% $dst_thing %>
% foreach my $dst ( @dst ) {
- <OPTION<% $dst->$dst_pkey eq $dst_pkeyvalue ? ' SELECTED' : '' %> VALUE="<% $dst->$dst_pkey %>">#<% $dst->$dst_pkey %> - <% time2str(
"%D"
, $dst->_date) %> - $<% $dst->$dst_unapplied %>
+ <OPTION<% $dst->$dst_pkey eq $dst_pkeyvalue ? ' SELECTED' : '' %> VALUE="<% $dst->$dst_pkey %>">#<% $dst->$dst_pkey %> - <% time2str(
$date_format
, $dst->_date) %> - $<% $dst->$dst_unapplied %>
% }
</SELECT>
% }
</SELECT>
@@
-399,7
+400,8
@@
function myOnLoadFunction () {
my %opt = @_;
my $conf = new FS::Conf;
my %opt = @_;
my $conf = new FS::Conf;
-my $money_char = $conf->config('money_char') || '$';
+my $money_char = $conf->config('money_char') || '$';
+my $date_format = $conf->config('date_format') || '%m/%d/%Y';
my $src_thing = ucfirst($opt{'src_thing'});
my $src_table = $opt{'src_table'};
my $src_thing = ucfirst($opt{'src_thing'});
my $src_table = $opt{'src_table'};