Fix [ 1890725 ] CopyOrder creating new order out of trx

This commit is contained in:
Carlos Ruiz 2008-02-10 19:05:34 +00:00
parent fbc9a8d7c4
commit 213ff5826a
1 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************** /******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution * * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it * * This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published * * under the terms version 2 of the GNU General Public License as published *
@ -64,7 +64,7 @@ public class CopyOrder extends SvrProcess
} // prepare } // prepare
/** /**
* Perrform process. * Perform process.
* @return Message (clear text) * @return Message (clear text)
* @throws Exception if not successful * @throws Exception if not successful
*/ */
@ -83,7 +83,7 @@ public class CopyOrder extends SvrProcess
// //
MOrder from = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); MOrder from = new MOrder (getCtx(), p_C_Order_ID, get_TrxName());
MOrder newOrder = MOrder.copyFrom (from, p_DateDoc, MOrder newOrder = MOrder.copyFrom (from, p_DateDoc,
dt.getC_DocType_ID(), dt.isSOTrx(), false, true, null); // copy ASI dt.getC_DocType_ID(), dt.isSOTrx(), false, true, get_TrxName()); // copy ASI
newOrder.setC_DocTypeTarget_ID(p_C_DocType_ID); newOrder.setC_DocTypeTarget_ID(p_C_DocType_ID);
boolean OK = newOrder.save(); boolean OK = newOrder.save();
if (!OK) if (!OK)
@ -105,4 +105,4 @@ public class CopyOrder extends SvrProcess
return dt.getName() + ": " + newOrder.getDocumentNo(); return dt.getName() + ": " + newOrder.getDocumentNo();
} // doIt } // doIt
} // CopyOrder } // CopyOrder