# HG changeset patch
# User Alejandro <alekosmp86@gmail.com>
# Date 1480444315 18000
#      Tue Nov 29 13:31:55 2016 -0500
# Node ID 82edb5ce82f7a95dbaa563c8519ea132fc0d5f04
# Parent  dfb7e6e434776a71768fd5a5ad0e7787070e5f92
Fixes issue 32236: Process Monitor Duration field shows wrong data

Process Monitor Duration field was showing wrong data if the process lasts more
than 24 hours. When calculating the amount of hours that a process lasted, the
formula was designed in such a way that when the hours were bigger than 24, it got
resseted to 0, so, for example, if the amount of hours were 30, it was showing
6 instead.

diff -r dfb7e6e43477 -r 82edb5ce82f7 src/org/openbravo/scheduling/ProcessMonitor.java
--- a/src/org/openbravo/scheduling/ProcessMonitor.java	Mon Nov 28 13:31:28 2016 +0100
+++ b/src/org/openbravo/scheduling/ProcessMonitor.java	Tue Nov 29 13:31:55 2016 -0500
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2015 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2016 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -421,11 +421,10 @@
    * @return a String representation of the duration
    */
   public static String getDuration(long duration) {
-
     final int milliseconds = (int) (duration % 1000);
     final int seconds = (int) ((duration / 1000) % 60);
     final int minutes = (int) ((duration / 60000) % 60);
-    final int hours = (int) ((duration / 3600000) % 24);
+    final int hours = (int) (duration / 3600000); 
 
     final String m = (milliseconds < 10 ? "00" : (milliseconds < 100 ? "0" : "")) + milliseconds;
     final String sec = (seconds < 10 ? "0" : "") + seconds;
