You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/11/27 11:59:24 UTC
svn commit: r1039651 [18/38] - in /ofbiz/branches/jquery: ./
applications/accounting/config/
applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/
applications/commonext/config/ applications/content/config/
applications/content/w...
Propchange: ofbiz/branches/jquery/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Nov 27 10:59:21 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CheckoutMapProcs.xml:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:921280-927264
-/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1036339
+/ofbiz/trunk/applications/order/script/org/ofbiz/order/customer/CheckoutMapProcs.xml:951708-1039648
Modified: ofbiz/branches/jquery/applications/order/servicedef/services_cart.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/servicedef/services_cart.xml?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/servicedef/services_cart.xml (original)
+++ ofbiz/branches/jquery/applications/order/servicedef/services_cart.xml Sat Nov 27 10:59:21 2010
@@ -130,6 +130,7 @@ under the License.
<description>Create a ShoppingCart Object based on an existing shopping list.</description>
<attribute name="shoppingListId" type="String" mode="IN" optional="false"/>
<attribute name="applyStorePromotions" type="String" mode="IN" optional="true"/>
+ <attribute name="orderPartyId" type="String" mode="IN" optional="true"/>
<attribute name="shoppingCart" type="org.ofbiz.order.shoppingcart.ShoppingCart" mode="OUT" optional="false"/>
</service>
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/order/OrderServices.java Sat Nov 27 10:59:21 2010
@@ -295,6 +295,8 @@ public class OrderServices {
return ServiceUtil.returnError(UtilProperties.getMessage(resource_error,"OrderErrorTheProductStoreIdCanOnlyBeNullForPurchaseOrders",locale));
}
+ Timestamp orderDate = (Timestamp) context.get("orderDate");
+
Iterator normalizedIter = normalizedItemQuantities.keySet().iterator();
while (normalizedIter.hasNext()) {
// lookup the product entity for each normalized item; error on products not found
@@ -331,8 +333,15 @@ public class OrderServices {
}
if ("SALES_ORDER".equals(orderTypeId)) {
+ boolean salesDiscontinuationFlag = false;
+ // When past orders are imported, they should be imported even if sales discontinuation date is in the past but if the order date was before it
+ if (orderDate != null && product.get("salesDiscontinuationDate") != null) {
+ salesDiscontinuationFlag = orderDate.after(product.getTimestamp("salesDiscontinuationDate")) && nowTimestamp.after(product.getTimestamp("salesDiscontinuationDate"));
+ } else if (product.get("salesDiscontinuationDate") != null) {
+ salesDiscontinuationFlag = nowTimestamp.after(product.getTimestamp("salesDiscontinuationDate"));
+ }
// check to see if salesDiscontinuationDate has passed
- if (product.get("salesDiscontinuationDate") != null && nowTimestamp.after(product.getTimestamp("salesDiscontinuationDate"))) {
+ if (salesDiscontinuationFlag) {
String excMsg = UtilProperties.getMessage(resource_error, "product.no_longer_for_sale",
new Object[] { getProductName(product, itemName), product.getString("productId") }, locale);
Debug.logWarning(excMsg, module);
@@ -457,7 +466,6 @@ public class OrderServices {
}
String billingAccountId = (String) context.get("billingAccountId");
- Timestamp orderDate = (Timestamp) context.get("orderDate");
if (orderDate == null) {
orderDate = nowTimestamp;
}
Modified: ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java (original)
+++ ofbiz/branches/jquery/applications/order/src/org/ofbiz/order/shoppingcart/ShoppingCartServices.java Sat Nov 27 10:59:21 2010
@@ -892,6 +892,7 @@ public class ShoppingCartServices {
GenericValue userLogin = (GenericValue) context.get("userLogin");
String shoppingListId = (String) context.get("shoppingListId");
+ String orderPartyId = (String) context.get("orderPartyId");
Locale locale = (Locale) context.get("locale");
// get the shopping list header
@@ -934,7 +935,11 @@ public class ShoppingCartServices {
}
// set the role information
- cart.setOrderPartyId(shoppingList.getString("partyId"));
+ if (UtilValidate.isNotEmpty(orderPartyId)) {
+ cart.setOrderPartyId(orderPartyId);
+ } else {
+ cart.setOrderPartyId(shoppingList.getString("partyId"));
+ }
List<GenericValue>shoppingListItems = null;
try {
Modified: ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordernotes.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordernotes.ftl?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordernotes.ftl (original)
+++ ofbiz/branches/jquery/applications/order/webapp/ordermgr/order/ordernotes.ftl Sat Nov 27 10:59:21 2010
@@ -44,7 +44,7 @@ under the License.
<div> <span class="label">${uiLabelMap.CommonAt}</span> ${note.noteDateTime?string?if_exists}</div>
</td>
<td valign="top" width="50%">
- ${note.noteInfo?if_exists}
+ ${note.noteInfo?replace("\n", "<br/>")}
</td>
<td align="right" valign="top" width="15%">
<#if note.internalNote?if_exists == "N">
Modified: ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml (original)
+++ ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryCatalogScreens.xml Sat Nov 27 10:59:21 2010
@@ -89,7 +89,7 @@ under the License.
<screen name="category">
<section>
<actions>
- <set field="title-property" value="PageTitleCategoryPage"/>
+ <set field="titleProperty" value="PageTitleCategoryPage"/>
</actions>
<widgets>
<decorator-screen name="CommonOrderCatalogDecorator" location="component://order/widget/ordermgr/OrderEntryCommonScreens.xml">
@@ -135,7 +135,7 @@ under the License.
<screen name="product">
<section>
<actions>
- <set field="title-property" value="PageTitleProductPage"/>
+ <set field="titleProperty" value="PageTitleProductPage"/>
<set field="configproductdetailScreen" value="component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#configproductdetail"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/Product.groovy"/>
</actions>
@@ -205,7 +205,7 @@ under the License.
<screen name="keywordsearch">
<section>
<actions>
- <set field="title-property" value="PageTitleSearchResults"/>
+ <set field="titleProperty" value="PageTitleSearchResults"/>
<set field="productsummaryScreen" value="component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productsummary"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/KeywordSearch.groovy"/>
</actions>
@@ -221,7 +221,7 @@ under the License.
<screen name="advancedsearch">
<section>
<actions>
- <set field="title-property" value="PageTitleAdvancedSearch"/>
+ <set field="titleProperty" value="PageTitleAdvancedSearch"/>
<set field="headerItem" value="Advanced Search"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/AdvancedSearchOptions.groovy"/>
@@ -244,7 +244,7 @@ under the License.
<screen name="quickadd">
<section>
<actions>
- <set field="title-property" value="PageTitleQuickAdd"/>
+ <set field="titleProperty" value="PageTitleQuickAdd"/>
<set field="quickaddsummaryScreen" value="component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#quickaddsummary"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/QuickAdd.groovy"/>
</actions>
Modified: ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml?rev=1039651&r1=1039650&r2=1039651&view=diff
==============================================================================
--- ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml (original)
+++ ofbiz/branches/jquery/applications/order/widget/ordermgr/OrderEntryOrderScreens.xml Sat Nov 27 10:59:21 2010
@@ -49,7 +49,7 @@ under the License.
<section>
<actions>
<set field="headerItem" value="orderentry"/>
- <set field="title-property" value="PageTitleCheckoutOptions"/>
+ <set field="titleProperty" value="PageTitleCheckoutOptions"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutOptions.groovy"/>
<script location="component://order/webapp/ordermgr/WEB-INF/actions/entry/StorePaymentOptions.groovy"/>