Reversed invoice is create with invoice date (and InOut also)

http://sourceforge.net/tracker/?func=detail&atid=879332&aid=2839194&group_id=176962
Implement same logic to MInOut
This commit is contained in:
Carlos Ruiz 2009-08-24 23:05:26 +00:00
parent 11d9867a33
commit 7a5871cbaa
2 changed files with 32 additions and 12 deletions

View File

@ -54,7 +54,7 @@ public class MInOut extends X_M_InOut implements DocAction
/** /**
* *
*/ */
private static final long serialVersionUID = -1222763355238200128L; private static final long serialVersionUID = 1925611141368881643L;
/** /**
@ -167,7 +167,7 @@ public class MInOut extends X_M_InOut implements DocAction
* @param setOrder set the order link * @param setOrder set the order link
* @return Shipment * @return Shipment
*/ */
public static MInOut copyFrom (MInOut from, Timestamp dateDoc, public static MInOut copyFrom (MInOut from, Timestamp dateDoc, Timestamp dateAcct,
int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName, boolean setOrder) int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName, boolean setOrder)
{ {
MInOut to = new MInOut (from.getCtx(), 0, null); MInOut to = new MInOut (from.getCtx(), 0, null);
@ -196,7 +196,7 @@ public class MInOut extends X_M_InOut implements DocAction
// //
to.setDateOrdered (dateDoc); to.setDateOrdered (dateDoc);
to.setDateAcct (dateDoc); to.setDateAcct (dateAcct);
to.setMovementDate(dateDoc); to.setMovementDate(dateDoc);
to.setDatePrinted(null); to.setDatePrinted(null);
to.setIsPrinted (false); to.setIsPrinted (false);
@ -263,6 +263,27 @@ public class MInOut extends X_M_InOut implements DocAction
return to; return to;
} // copyFrom } // copyFrom
/**
* @deprecated
* Create new Shipment by copying
* @param from shipment
* @param dateDoc date of the document date
* @param C_DocType_ID doc type
* @param isSOTrx sales order
* @param counter create counter links
* @param trxName trx
* @param setOrder set the order link
* @return Shipment
*/
public static MInOut copyFrom (MInOut from, Timestamp dateDoc,
int C_DocType_ID, boolean isSOTrx, boolean counter, String trxName, boolean setOrder)
{
MInOut to = copyFrom ( from, dateDoc, dateDoc,
C_DocType_ID, isSOTrx, counter,
trxName, setOrder);
return to;
}
/************************************************************************** /**************************************************************************
* Standard Constructor * Standard Constructor
@ -1556,7 +1577,7 @@ public class MInOut extends X_M_InOut implements DocAction
} }
// Deep Copy // Deep Copy
MInOut dropShipment = copyFrom(this, getMovementDate(), MInOut dropShipment = copyFrom(this, getMovementDate(), getDateAcct(),
C_DocTypeTarget_ID, !isSOTrx(), false, get_TrxName(), true); C_DocTypeTarget_ID, !isSOTrx(), false, get_TrxName(), true);
int linkedOrderID = new MOrder (getCtx(), getC_Order_ID(), get_TrxName()).getLink_Order_ID(); int linkedOrderID = new MOrder (getCtx(), getC_Order_ID(), get_TrxName()).getLink_Order_ID();
@ -1774,7 +1795,7 @@ public class MInOut extends X_M_InOut implements DocAction
} }
// Deep Copy // Deep Copy
MInOut counter = copyFrom(this, getMovementDate(), MInOut counter = copyFrom(this, getMovementDate(), getDateAcct(),
C_DocTypeTarget_ID, !isSOTrx(), true, get_TrxName(), true); C_DocTypeTarget_ID, !isSOTrx(), true, get_TrxName(), true);
// //
@ -1944,7 +1965,7 @@ public class MInOut extends X_M_InOut implements DocAction
} }
// Deep Copy // Deep Copy
MInOut reversal = copyFrom (this, getMovementDate(), MInOut reversal = copyFrom (this, getMovementDate(), getDateAcct(),
getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true); getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true);
if (reversal == null) if (reversal == null)
{ {

View File

@ -57,11 +57,10 @@ import org.eevolution.model.MPPProductBOMLine;
*/ */
public class MInvoice extends X_C_Invoice implements DocAction public class MInvoice extends X_C_Invoice implements DocAction
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = -11169828430680188L; private static final long serialVersionUID = 5406556271212363271L;
/** /**
@ -165,7 +164,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
} }
/** /**
* @Deprecated * @deprecated
* Create new Invoice by copying * Create new Invoice by copying
* @param from invoice * @param from invoice
* @param dateDoc date of the document date * @param dateDoc date of the document date