diff --git a/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java b/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
--- a/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
+++ b/src/org/openbravo/erpCommon/ad_process/ExpenseAPInvoice.java
@@ -312,8 +312,10 @@
           qty = new BigDecimal(data[i].qty);
           String strLine = ExpenseAPInvoiceData.selectLine(conn, this, strcInvoiceId);
           if (strLine.equals(""))
-            strLine = "10";
-          line += Integer.valueOf(strLine);
+            line = 10;
+          else {
+            line = Integer.valueOf(strLine) + 10;
+          }
 
           if (log4j.isDebugEnabled())
             log4j.debug("*****************+client: "
