Removes nullpointerexception error from CI
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Fri, 25 Jul 2014 10:55:58 +0200
changeset 24121 547666a7b5ee
parent 24120 a0b47771f3be
child 24122 336a98b4d28e
Removes nullpointerexception error from CI
src/org/openbravo/erpCommon/ad_forms/DocInventory.java
--- a/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Fri Jul 25 14:05:53 2014 +0530
+++ b/src/org/openbravo/erpCommon/ad_forms/DocInventory.java	Fri Jul 25 10:55:58 2014 +0200
@@ -180,7 +180,8 @@
     int countInvLinesWithTrnCostZero = 0;
     for (int i = 0; i < p_lines.length; i++) {
       DocLine_Material line = (DocLine_Material) p_lines[i];
-      if (line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
+      if (line.transaction.getTransactionCost() != null
+          && line.transaction.getTransactionCost().compareTo(ZERO) == 0) {
         countInvLinesWithTrnCostZero++;
       }
     }