Bugzilla – Attachment 24900 Details for
Bug 11644
Cannot update fund if total is equal to amount unallocated
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11644 - Cannot update fund if total is equal to amount unallocated
Bug-11644---Cannot-update-fund-if-total-is-equal-t.patch (text/plain), 1.43 KB, created by
Kyle M Hall (khall)
on 2014-01-30 17:44:23 UTC
(
hide
)
Description:
Bug 11644 - Cannot update fund if total is equal to amount unallocated
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-01-30 17:44:23 UTC
Size:
1.43 KB
patch
obsolete
>From e43fbcbcb41602177c033f086f5abc675d832b26 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 30 Jan 2014 12:39:19 -0500 >Subject: [PATCH] Bug 11644 - Cannot update fund if total is equal to amount unallocated > >When attempting to update a fund, if the amount unalloccated for the >fund is equal to the total, you can be prevented from saving. This is >due to imprecise floating point number comparison in >check_parent_total.pl > >Test Plan: >1) Create a fund where the amount unallocated is equal to the amount > unallocated for the budget period >2) Edit the fund, attempt to change the name of the fund >3) Note you recieve an error and cannot save >4) Apply this patch >5) Repeat step 2 >6) Note you can now update the fund >--- > admin/check_parent_total.pl | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/admin/check_parent_total.pl b/admin/check_parent_total.pl >index f0f8c9b..653a9f2 100755 >--- a/admin/check_parent_total.pl >+++ b/admin/check_parent_total.pl >@@ -96,6 +96,10 @@ else { > $budget_period_unalloc = $period->{'budget_period_total'} - $period_sum->{'sum'} if $period->{'budget_period_total'}; > } > >+$total = sprintf( "%.2f", $total ); >+$sub_unalloc = sprintf( "%.2f", $sub_unalloc ); >+$budget_period_unalloc = sprintf( "%.2f", $budget_period_unalloc ); >+ > if ( $parent_id) { > if ( ($total > $sub_unalloc ) && $sub_unalloc ) { > $returncode = 1; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11644
:
24900
|
24954
|
25348
|
25349