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

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


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

Modified Files:
	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.10
diff -u -w -d -r1.9 -r1.10
--- timeworked.html	24 May 2010 16:56:38 -0000	1.9
+++ timeworked.html	4 Oct 2011 06:49:06 -0000	1.10
@@ -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