[OFBiz] SVN: r6102 - trunk/framework/common/src/org/ofbiz/common
jaz at svn.ofbiz.org
jaz at svn.ofbiz.org
Wed Nov 9 19:26:44 EST 2005
Author: jaz
Date: 2005-11-09 18:26:43 -0600 (Wed, 09 Nov 2005)
New Revision: 6102
Modified:
trunk/framework/common/src/org/ofbiz/common/CommonServices.java
Log:
now accpets note date if passed in
Modified: trunk/framework/common/src/org/ofbiz/common/CommonServices.java
===================================================================
--- trunk/framework/common/src/org/ofbiz/common/CommonServices.java 2005-11-09 19:20:41 UTC (rev 6101)
+++ trunk/framework/common/src/org/ofbiz/common/CommonServices.java 2005-11-10 00:26:43 UTC (rev 6102)
@@ -142,12 +142,16 @@
public static Map createNote(DispatchContext ctx, Map context) {
GenericDelegator delegator = ctx.getDelegator();
GenericValue userLogin = (GenericValue) context.get("userLogin");
- Timestamp now = UtilDateTime.nowTimestamp();
+ Timestamp noteDate = (Timestamp) context.get("noteDate");
String partyId = (String) context.get("partyId");
String noteName = (String) context.get("noteName");
String note = (String) context.get("note");
String noteId = delegator.getNextSeqId("NoteData");
+ if (noteDate == null) {
+ noteDate = UtilDateTime.nowTimestamp();
+ }
+
// check for a party id
if (partyId == null) {
if (userLogin != null && userLogin.get("partyId") != null)
@@ -155,7 +159,7 @@
}
Map fields = UtilMisc.toMap("noteId", noteId, "noteName", noteName, "noteInfo", note,
- "noteParty", partyId, "noteDateTime", now);
+ "noteParty", partyId, "noteDateTime", noteDate);
try {
GenericValue newValue = delegator.makeValue("NoteData", fields);
@@ -218,7 +222,7 @@
}
public static Map forceGc(DispatchContext dctx, Map context) {
- System.gc();
+ System.gc();
return ServiceUtil.returnSuccess();
}
More information about the Svn
mailing list