svn commit: r569574 - /ofbiz/trunk/applications/content/entitydef/entitymodel.xml

2007-08-24 Thread adrianc
Author: adrianc
Date: Fri Aug 24 16:36:41 2007
New Revision: 569574

URL: http://svn.apache.org/viewvc?rev=569574&view=rev
Log:
Fixed entitydef comments per David's suggestion.

Modified:
ofbiz/trunk/applications/content/entitydef/entitymodel.xml

Modified: ofbiz/trunk/applications/content/entitydef/entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/entitydef/entitymodel.xml?rev=569574&r1=569573&r2=569574&view=diff
==
--- ofbiz/trunk/applications/content/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/content/entitydef/entitymodel.xml Fri Aug 24 
16:36:41 2007
@@ -187,7 +187,7 @@
 title="Content Entity">
   
   
-   
+  Used for permissions 
checking

   
   
@@ -311,8 +311,8 @@
 
-   
-   
+  "parent" 
content
+  "child" or "sub" 
content
   
   
   




svn commit: r569568 - in /ofbiz/trunk/applications/content: entitydef/entitymodel.xml src/org/ofbiz/content/ContentManagementServices.java widget/forum/ForumForms.xml widget/forum/ForumScreens.xml wid

2007-08-24 Thread adrianc
Author: adrianc
Date: Fri Aug 24 16:16:18 2007
New Revision: 569568

URL: http://svn.apache.org/viewvc?rev=569568&view=rev
Log:
More fixes in the forum feature in the content component. I also added a few 
comments to indicate what different fields are used for.

The eCommerce component organized forum data one way, and the content component 
organized it another way. After discussion on the dev ml, I determined that the 
content component was storing data incorrectly.

This commit is not backwards compatible with existing forum messages. Existing 
forum messages will have to have the contents of ContentAssoc.contentId and 
ContentAssoc.contentIdTo swapped before updating to this revision.

Modified:
ofbiz/trunk/applications/content/entitydef/entitymodel.xml

ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
ofbiz/trunk/applications/content/widget/forum/ForumForms.xml
ofbiz/trunk/applications/content/widget/forum/ForumScreens.xml
ofbiz/trunk/applications/content/widget/forum/ForumTrees.xml

Modified: ofbiz/trunk/applications/content/entitydef/entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/entitydef/entitymodel.xml?rev=569568&r1=569567&r2=569568&view=diff
==
--- ofbiz/trunk/applications/content/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/content/entitydef/entitymodel.xml Fri Aug 24 
16:16:18 2007
@@ -187,7 +187,7 @@
 title="Content Entity">
   
   
-  
+   

   
   
@@ -263,7 +263,7 @@
 
   
 
-
+
 
 
 
@@ -311,8 +311,8 @@
 
-  
-  
+   
+   
   
   
   
@@ -359,7 +359,7 @@
 
 
+title="Main Assoc From and DataResource View Entity">
   
   
   
@@ -402,7 +402,7 @@
 
 
+title="Main Assoc To and DataResource View Entity">
   
   
   
@@ -461,7 +461,7 @@
 

+title="Main Assoc From View Entity">
   
   
   
@@ -475,7 +475,7 @@
 
 
+title="Main Assoc To View Entity">
   
   
   
@@ -504,7 +504,7 @@
 
 
+title="Content and DataResource View Entity">
   
   
   
@@ -542,7 +542,7 @@
 
 
+title="CommEvent and Content and DataResource View Entity">
   
   
   
@@ -758,7 +758,7 @@
 
 
+title="Content and DataResource for SubContent View Entity">
   
   
   

Modified: 
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=569568&r1=569567&r2=569568&view=diff
==
--- 
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
 (original)
+++ 
ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
 Fri Aug 24 16:16:18 2007
@@ -148,13 +148,13 @@
 
 /**
  * persistContentAndAssoc
- * A combination method that will create or update all or one of the 
following
- * a Content entity, a ContentAssoc related to the Content and 
+ * A combination method that will create or update all or one of the 
following:
+ * a Content entity, a ContentAssoc related to the Content, and 
  * the ElectronicText that may be associated with the Content.
  * The keys for determining if each entity is created is the presence
  * of the contentTypeId, contentAssocTypeId and dataResourceTypeId.
- * This service tries to handle DataResource and ContentAssoc fields with 
and
- * without "dr" and "ca" prefixes.
+ * This service tries to handle DataResource fields with and
+ * without "dr" prefixes.
  * Assumes binary data is always in field, "imageData".
  * 
  * This service does not accept straight ContentAssoc parameters. They 
must be prefaced with "ca" + cap first letter
@@ -213,7 +213,13 @@
 if (Debug.infoOn()) Debug.logInfo("in persist... dataResourceId(0):" + 
dataResourceId, null);
 
 GenericValue contentAssoc = delegator.makeValue("ContentAssoc", null);
+String contentAssocTypeId = (String)context.get("contentAssocTypeId");
+if (UtilValidate.isNotEmpty(contentAssocTypeId)) {
+context.put("caContentAssocTypeId", contentAssocTypeId);
+}
+contentAssocTypeId = (String)context.get("caContentAssocTypeId");
 contentAssoc.setAllFields(context, false, "ca", null);
+contentAssoc.put("contentId", context.get("caContentId"));
 context.putAll(contentAssoc);
 
 GenericValue electronicText = delegator.makeValue("ElectronicText", 
null);
@@ -296,7 +302,7 @@
   

Re: svn commit: r569467 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

2007-08-24 Thread Si Chen
I thought you were ok with commenting it out based on your comment on 
jira, but if not I'll revert it.


David E Jones wrote:


I thought this was supposed to be configurable (with an option on the 
Facility if I remember the discussion right)?


-David


[EMAIL PROTECTED] wrote:

Author: sichen
Date: Fri Aug 24 10:59:04 2007
New Revision: 569467

URL: http://svn.apache.org/viewvc?rev=569467&view=rev
Log:
comment out workefforts related to shpiment schedule/arrival ofbiz-1207

Modified:

ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml 



Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml 

URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=569467&r1=569466&r2=569467&view=diff 

== 

--- 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml 
(original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml 
Fri Aug 24 10:59:04 2007

@@ -46,6 +46,7 @@
 
 
 
+
 
+
 
 
 
@@ -131,6 +134,7 @@

 
 
 

+
+ 

 
 







Re: svn commit: r569467 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

2007-08-24 Thread David E Jones


I thought this was supposed to be configurable (with an option on the Facility 
if I remember the discussion right)?

-David


[EMAIL PROTECTED] wrote:

Author: sichen
Date: Fri Aug 24 10:59:04 2007
New Revision: 569467

URL: http://svn.apache.org/viewvc?rev=569467&view=rev
Log:
comment out workefforts related to shpiment schedule/arrival ofbiz-1207

Modified:

ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=569467&r1=569466&r2=569467&view=diff
==
--- 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
 (original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
 Fri Aug 24 10:59:04 2007
@@ -46,6 +46,7 @@
 
 
 
+
 
+
 
 
 
@@ -131,6 +134,7 @@

 
 
 

+
+
 

 
 




svn commit: r569467 - /ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

2007-08-24 Thread sichen
Author: sichen
Date: Fri Aug 24 10:59:04 2007
New Revision: 569467

URL: http://svn.apache.org/viewvc?rev=569467&view=rev
Log:
comment out workefforts related to shpiment schedule/arrival ofbiz-1207

Modified:

ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml

Modified: 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml?rev=569467&r1=569466&r2=569467&view=diff
==
--- 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
 (original)
+++ 
ofbiz/trunk/applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
 Fri Aug 24 10:59:04 2007
@@ -46,6 +46,7 @@
 
 
 
+
 
+
 
 
 
@@ -131,6 +134,7 @@
 
 
 
+
+
 
 
 




svn commit: r569456 - /ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

2007-08-24 Thread jonesde
Author: jonesde
Date: Fri Aug 24 10:01:15 2007
New Revision: 569456

URL: http://svn.apache.org/viewvc?rev=569456&view=rev
Log:
Changed to only request a returnlabel if it is a cross-ship replacement

Modified:

ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java

Modified: 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java?rev=569456&r1=569455&r2=569456&view=diff
==
--- 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java 
(original)
+++ 
ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisShipmentServices.java 
Fri Aug 24 10:01:15 2007
@@ -657,12 +657,33 @@
 // Check if order was a return replacement order 
(associated with return)
 GenericValue returnItemResponse = 
EntityUtil.getFirst(delegator.findByAnd("ReturnItemResponse", 
UtilMisc.toMap("replacementOrderId", orderId)));
 if (returnItemResponse != null) {
-bodyParameters.put("shipnotes", "RETURNLABEL");
+boolean includeReturnLabel = false;
 
 // Get the associated return Id (replaceReturnId)
 String returnItemResponseId = 
returnItemResponse.getString("returnItemResponseId");
-GenericValue returnItem = 
EntityUtil.getFirst(delegator.findByAnd("ReturnItem", 
UtilMisc.toMap("returnItemResponseId", returnItemResponseId)));
-bodyParameters.put("replacementReturnId", 
returnItem.getString("returnId"));
+List returnItemList = 
delegator.findByAnd("ReturnItem", UtilMisc.toMap("returnItemResponseId", 
returnItemResponseId));
+GenericValue firstReturnItem = 
EntityUtil.getFirst(returnItemList);
+if (firstReturnItem != null) {
+bodyParameters.put("replacementReturnId", 
firstReturnItem.getString("returnId"));
+} else {
+Debug.logWarning("Could not find a ReturnItem for 
returnItemResponseId [" + returnItemResponseId + "]; this really shouldn't 
happen but isn't a real error either. It means a ReturnItemResponse was created 
but not attached to any item!", module);
+}
+
+// return label should only be sent when we want a 
return label to be included; this would be for a cross-ship replacement type 
ReturnItem
+
+// go through the returnItemList and if any are 
cross-ship replacement, then include a label (not for wait replacement in other 
words)
+Iterator returnItemIter = returnItemList.iterator();
+while (returnItemIter.hasNext()) {
+GenericValue returnItem = (GenericValue) 
returnItemIter.next();
+if 
("returnTypeId".equals(returnItem.getString("RTN_CSREPLACE"))) {
+includeReturnLabel = true;
+}
+}
+
+if (includeReturnLabel) {
+bodyParameters.put("shipnotes", "RETURNLABEL");
+}
+
 }
 // tracking shipper account, other Party info
 String partyId = shipment.getString("partyIdTo");




svn commit: r569454 - /ofbiz/trunk/framework/common/data/GeoData.xml

2007-08-24 Thread sichen
Author: sichen
Date: Fri Aug 24 09:47:14 2007
New Revision: 569454

URL: http://svn.apache.org/viewvc?rev=569454&view=rev
Log:
Not a political statement, but mail will not get there

Modified:
ofbiz/trunk/framework/common/data/GeoData.xml

Modified: ofbiz/trunk/framework/common/data/GeoData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/data/GeoData.xml?rev=569454&r1=569453&r2=569454&view=diff
==
--- ofbiz/trunk/framework/common/data/GeoData.xml (original)
+++ ofbiz/trunk/framework/common/data/GeoData.xml Fri Aug 24 09:47:14 2007
@@ -69,7 +69,7 @@
 
 
 
-
+
 
 
 




svn commit: r569386 - in /ofbiz/trunk/applications/order: entitydef/entitymodel.xml servicedef/services_return.xml src/org/ofbiz/order/order/OrderReturnServices.java

2007-08-24 Thread jonesde
Author: jonesde
Date: Fri Aug 24 06:49:21 2007
New Revision: 569386

URL: http://svn.apache.org/viewvc?rev=569386&view=rev
Log:
A bit of refactoring, but mostly implemented feature only previously implied to 
save the replacementOrderId on ReturnItemResponse, and attach to relevant 
ReturnItems

Modified:
ofbiz/trunk/applications/order/entitydef/entitymodel.xml
ofbiz/trunk/applications/order/servicedef/services_return.xml

ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java

Modified: ofbiz/trunk/applications/order/entitydef/entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/entitydef/entitymodel.xml?rev=569386&r1=569385&r2=569386&view=diff
==
--- ofbiz/trunk/applications/order/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/order/entitydef/entitymodel.xml Fri Aug 24 
06:49:21 2007
@@ -2346,7 +2346,7 @@
 
 
 
-
+
 
 
 

Modified: ofbiz/trunk/applications/order/servicedef/services_return.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/servicedef/services_return.xml?rev=569386&r1=569385&r2=569386&view=diff
==
--- ofbiz/trunk/applications/order/servicedef/services_return.xml (original)
+++ ofbiz/trunk/applications/order/servicedef/services_return.xml Fri Aug 24 
06:49:21 2007
@@ -107,8 +107,8 @@
 
 
-Creates PaymentApplications for each return item 
billing related to the return response until the responseAmount is reached or
-all items are paid.
+Creates PaymentApplications for each return item 
billing related to the return response until 
+the responseAmount is reached or all items are 
paid.
 
 
 http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java?rev=569386&r1=569385&r2=569386&view=diff
==
--- 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 (original)
+++ 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderReturnServices.java
 Fri Aug 24 06:49:21 2007
@@ -1338,6 +1338,7 @@
 String returnTypeId = (String) context.get("returnTypeId");
 GenericValue userLogin = (GenericValue) context.get("userLogin");
 Locale locale = (Locale) context.get("locale");
+Timestamp nowTimestamp = UtilDateTime.nowTimestamp();
 
 GenericValue returnHeader = null;
 List returnItems = null;
@@ -1353,17 +1354,17 @@
 
 List createdOrderIds = new ArrayList();
 if (returnHeader != null && returnItems != null && returnItems.size() 
> 0) {
-Map itemsByOrder = new HashMap();
+Map returnItemsByOrderId = new HashMap();
 Map totalByOrder = new HashMap();
-groupReturnItemsByOrder(returnItems, itemsByOrder, totalByOrder, 
delegator, returnId, returnTypeId);
+groupReturnItemsByOrder(returnItems, returnItemsByOrderId, 
totalByOrder, delegator, returnId, returnTypeId);
 
 // process each one by order
-Set itemSet = itemsByOrder.entrySet();
-Iterator itemByOrderIt = itemSet.iterator();
-while (itemByOrderIt.hasNext()) {
-Map.Entry entry = (Map.Entry) itemByOrderIt.next();
+Set returnItemsByOrderIdEntrySet = returnItemsByOrderId.entrySet();
+Iterator returnItemsByOrderIdEntryIter = 
returnItemsByOrderIdEntrySet.iterator();
+while (returnItemsByOrderIdEntryIter.hasNext()) {
+Map.Entry entry = (Map.Entry) 
returnItemsByOrderIdEntryIter.next();
 String orderId = (String) entry.getKey();
-List items = (List) entry.getValue();
+List returnItemList = (List) entry.getValue();
 
 // get order header & payment prefs
 GenericValue orderHeader = null;
@@ -1430,17 +1431,17 @@
  */
 
 // make the order items
-double itemTotal = 0.00;
+double orderPriceTotal = 0.00;
 double additionalItemTotal = 0.00;
 List orderItems = new ArrayList();
 List orderItemShipGroupInfo = new ArrayList();
 List orderItemShipGroupIds = new ArrayList(); // this is used 
to store the ship group ids of the groups already added to the 
orderItemShipGroupInfo list
 List orderItemAssocs = new ArrayList();
-if (items != null) {
-Iterator ri = items.iterator();
+if (returnItemList != null) {
+Iterator returnItemIter = returnItemList.iterator();
 int itemCount =

svn commit: r569385 - /ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl

2007-08-24 Thread jonesde
Author: jonesde
Date: Fri Aug 24 06:46:21 2007
New Revision: 569385

URL: http://svn.apache.org/viewvc?rev=569385&view=rev
Log:
Small fix for certain funny orders with minimal item information

Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl

Modified: 
ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl?rev=569385&r1=569384&r2=569385&view=diff
==
--- ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl 
(original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/return/returnItemInc.ftl Fri 
Aug 24 06:46:21 2007
@@ -92,7 +92,7 @@
 
 <#else>
 <#-- this is an order item -->
-<#assign returnItemType = 
returnItemTypeMap.get(returnableItems.get(orderItem).get("itemTypeKey"))/>
+<#assign returnItemType = 
(returnItemTypeMap.get(returnableItems.get(orderItem).get("itemTypeKey")))?if_exists/>