[freeside-commits] freeside/httemplate/search timeworked.html, 1.9, 1.9.6.1

Ivan,,, ivan at wavetail.420.am
Mon Oct 3 23:49:09 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv10271

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	timeworked.html 
Log Message:
fix time worked search when someone edits a value back to blank

Index: timeworked.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/timeworked.html,v
retrieving revision 1.9
retrieving revision 1.9.6.1
diff -u -w -d -r1.9 -r1.9.6.1
--- timeworked.html	24 May 2010 16:56:38 -0000	1.9
+++ timeworked.html	4 Oct 2011 06:49:07 -0000	1.9.6.1
@@ -45,7 +45,9 @@
 
 my $transactiontime = "
   CASE Transactions.Type WHEN 'Set'
-    THEN (TO_NUMBER(NewValue,'999999')-TO_NUMBER(OldValue, '999999')) * 60
+    THEN (  CASE WHEN NewValue = '' THEN 0 ELSE TO_NUMBER(NewValue,'999999') END
+           -TO_NUMBER(OldValue, '999999')
+          ) * 60
     ELSE TimeTaken*60
   END
 ";



More information about the freeside-commits mailing list