From 63cb62c5f5926076cb935ca3134fd9ab69742605 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 31 Jan 2007 05:36:30 +0000 Subject: [PATCH] Fix bug ID 1648458 - M_PriceList_Create throwing java.lang.NullPointerException --- .../compiere/process/M_PriceList_Create.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/base/src/org/compiere/process/M_PriceList_Create.java b/base/src/org/compiere/process/M_PriceList_Create.java index 9785361ee1..f70a65e7ad 100644 --- a/base/src/org/compiere/process/M_PriceList_Create.java +++ b/base/src/org/compiere/process/M_PriceList_Create.java @@ -145,7 +145,8 @@ public class M_PriceList_Create extends SvrProcess { totu += cntu; log.fine("Updated " + cntu); - DB.commit(true, get_TrxName()); + // let the commit for SvrProcess + // DB.commit(true, get_TrxName()); // // Make sure that we have only one active product @@ -173,7 +174,7 @@ public class M_PriceList_Create extends SvrProcess { // // Leave First // - Vend.next(); + while (Vend.next()) { sqlupd = "UPDATE M_Product_PO " + " SET IsCurrentVendor = 'N' " @@ -199,11 +200,7 @@ public class M_PriceList_Create extends SvrProcess { Cur_Duplicates.close(); Cur_Duplicates = null; - // - //Commit - // - - DB.commit(true, get_TrxName()); + // DB.commit(true, get_TrxName()); // // Delete Old Data @@ -687,8 +684,8 @@ public class M_PriceList_Create extends SvrProcess { // //commit; // - log.fine("Committing ..."); - DB.commit(true, get_TrxName()); + // log.fine("Committing ..."); + // DB.commit(true, get_TrxName()); } v.close(); @@ -700,7 +697,8 @@ public class M_PriceList_Create extends SvrProcess { } // del doIt private void raiseError(String string, String sql) throws Exception { - DB.rollback(false, get_TrxName()); + + // DB.rollback(false, get_TrxName()); String msg = string; ValueNamePair pp = CLogger.retrieveError(); if (pp != null)