[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[5990] trunk



Revision: 5990
          http://sourceforge.net/p/ledger-smb/code/5990
Author:   einhverfr
Date:     2013-08-30 04:04:53 +0000 (Fri, 30 Aug 2013)
Log Message:
-----------
handling nulls returned in numeric columns so we don't get is_zero errors.

Modified Paths:
--------------
    trunk/Changelog
    trunk/LedgerSMB/Form.pm
    trunk/LedgerSMB.pm

Modified: trunk/Changelog
===================================================================
--- trunk/Changelog	2013-08-29 18:11:49 UTC (rev 5989)
+++ trunk/Changelog	2013-08-30 04:04:53 UTC (rev 5990)
@@ -92,6 +92,7 @@
 * Fixed error in logs about failed login during initial login (Chris T, 858)
 * Updated gnome2 stylesheet (Pongracz I)
 * Updated Hungarian translation (Pongracz I)
+* Fixed is_zero error on inventory activity report (Chris T)
 
 
 Changelog for 1.3.34

Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2013-08-29 18:11:49 UTC (rev 5989)
+++ trunk/LedgerSMB/Form.pm	2013-08-30 04:04:53 UTC (rev 5990)
@@ -973,6 +973,8 @@
     for (0 .. $#names){
         #   numeric            float4/real
         if ($types[$_] == 3 or $types[$_] ==2) {
+            $arrayref->[$_] ||= 0 if defined $arrayref;
+            $hashref->{$names[$_]} ||=0 if defined $hashref;
             $arrayref->[$_] = Math::BigFloat->new($arrayref->[$_]) 
               if defined $arrayref;
             $hashref->{$names[$_]} = Math::BigFloat->new($hashref->{$names[$_]})

Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm	2013-08-29 18:11:49 UTC (rev 5989)
+++ trunk/LedgerSMB.pm	2013-08-30 04:04:53 UTC (rev 5990)
@@ -719,6 +719,7 @@
     while ( my $ref = $sth->fetchrow_hashref('NAME_lc') ) {
 	for (0 .. $#names){
             #   numeric            float4/real
+            $ref->{$names[$_]} ||=0;
             if ($types[$_] == 3 or $types[$_] == 2) {
                 $ref->{$names[$_]} = LedgerSMB::PGNumber->from_db($ref->{$names[$_]}, 'datetime') if defined $ref->{$names[$_]};
             }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits