svn commit: r926491 - in /ofbiz/trunk/specialpurpose/ebaystore: config/ webapp/ebaystore/WEB-INF/ webapp/ebaystore/store/ widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r926491 - in /ofbiz/trunk/specialpurpose/ebaystore: config/ webapp/ebaystore/WEB-INF/ webapp/ebaystore/store/ widget/

hansbak-2
Author: hansbak
Date: Tue Mar 23 08:18:32 2010
New Revision: 926491

URL: http://svn.apache.org/viewvc?rev=926491&view=rev
Log:
ebayStore: Screen for Find/list orders which have been imported from the ebay site and add a condition to find orders from an ebay account.

Added:
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/orderImported.ftl
Modified:
    ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml
    ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml
    ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml
    ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml
    ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreMenus.xml

Modified: ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml?rev=926491&r1=926490&r2=926491&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/config/EbayStoreUiLabels.xml Tue Mar 23 08:18:32 2010
@@ -305,4 +305,10 @@
     <property key="EbayWaitingToShipping">
         <value xml:lang="en">Waiting to shipping</value>
     </property>
+    <property key="EbayListOrderImported">
+        <value xml:lang="en">List Orders Imported</value>
+    </property>
+    <property key="EbayNoOrderImported">
+        <value xml:lang="en">No orders imported found</value>
+    </property>
 </resource>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml?rev=926491&r1=926490&r2=926491&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/WEB-INF/controller.xml Tue Mar 23 08:18:32 2010
@@ -387,6 +387,17 @@
         <security auth="true" https="true"/>
         <response name="success" type="view" value="WaitingToShipping"/>
     </request-map>
+    <request-map uri="ordersImported">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="ordersImported"/>
+        <response name="error" type="view" value="ordersImported"/>
+    </request-map>
+    <request-map uri="searchOrdersImported">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="findOrders"/>
+        <response name="success" type="view" value="ordersImported"/>
+        <response name="error" type="view" value="ordersImported"/>
+    </request-map>
     <!-- end of request mappings -->
 
     <!-- View Mappings -->
@@ -429,5 +440,6 @@
     <view-map name="UnsoldListing" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#UnsoldListing"/>
     <!-- Waiting to shipping -->
     <view-map name="WaitingToShipping" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#WaitingToShipping"/>
+    <view-map name="ordersImported" type="screen" page="component://ebaystore/widget/EbaySellingManagerScreens.xml#ordersImported"/>
     <!-- end of view mappings -->
 </site-conf>

Added: ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/orderImported.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/orderImported.ftl?rev=926491&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/orderImported.ftl (added)
+++ ofbiz/trunk/specialpurpose/ebaystore/webapp/ebaystore/store/orderImported.ftl Tue Mar 23 08:18:32 2010
@@ -0,0 +1,131 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<script language="JavaScript" type="text/javascript">
+<!-- //
+function uploadTrackingCode(orderId, productStoreId) {
+    document.uploadTracking.orderId.value = orderId;
+    document.uploadTracking.productStoreId.value = productStoreId;
+    document.uploadTracking.submit();
+}
+// -->
+</script>
+<div id="findOrdersList" class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+        <li class="h3">${uiLabelMap.EbayListOrderImported}</li>
+    </ul>
+  </div>
+  <div class="screenlet-body">
+  <form name="uploadTracking" action="<@ofbizUrl>uploadTrackingCodeBack</@ofbizUrl>" method="post">
+      <input type="hidden" name="orderId" value=""/>
+      <input type="hidden" name="productStoreId" value=""/>
+  </form>
+  <form name="listOrdersImported" method="post">
+      <input type="hidden" name="viewSize"/>
+      <input type="hidden" name="viewIndex"/>
+      <table class="basic-table hover-bar" cellspacing='0'>
+        <tr class="header-row">
+          <td width="5%">${uiLabelMap.OrderOrderType}</td>
+          <td width="5%">${uiLabelMap.OrderOrderId}</td>
+          <td width="20%">${uiLabelMap.PartyName}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderSurvey}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsOrdered}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsBackOrdered}</td>
+          <td width="5%" align="right">${uiLabelMap.OrderItemsReturned}</td>
+          <td width="10%" align="right">${uiLabelMap.OrderRemainingSubTotal}</td>
+          <td width="10%" align="right">${uiLabelMap.OrderOrderTotal}</td>
+          <td width="5%">&nbsp;</td>
+            <#if (requestParameters.filterInventoryProblems?default("N") == "Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+              <td width="15%">${uiLabelMap.CommonStatus}</td>
+              <td width="5%">${uiLabelMap.CommonFilter}</td>
+            <#else>
+              <td width="20%">${uiLabelMap.CommonStatus}</td>
+            </#if>
+          <td width="20%">${uiLabelMap.CommonDate}</td>
+        </tr>
+        <#if orderList?has_content>
+          <#assign alt_row = false>
+          <#list orderList as orderHeader>
+            <#assign orh = Static["org.ofbiz.order.order.OrderReadHelper"].getHelper(orderHeader)>
+            <#assign statusItem = orderHeader.getRelatedOneCache("StatusItem")>
+            <#assign orderType = orderHeader.getRelatedOneCache("OrderType")>
+            <#if orderType.orderTypeId == "PURCHASE_ORDER">
+              <#assign displayParty = orh.getSupplierAgent()?if_exists>
+            <#else>
+              <#assign displayParty = orh.getPlacingParty()?if_exists>
+            </#if>
+            <#assign partyId = displayParty.partyId?default("_NA_")>
+            <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
+              <td>${orderType.get("description",locale)?default(orderType.orderTypeId?default(""))}</td>
+              <td><a href="#" onclick="javascript:uploadTrackingCode('${orderHeader.orderId}','${productStoreId}')" class='buttontext'>${orderHeader.orderId}</a></td>
+              <td>
+                <div>
+                  <#if displayParty?has_content>
+                      <#assign displayPartyNameResult = dispatcher.runSync("getPartyNameForDate", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", displayParty.partyId, "compareDate", orderHeader.orderDate, "userLogin", userLogin))/>
+                      ${displayPartyNameResult.fullName?default("[${uiLabelMap.OrderPartyNameNotFound}]")}
+                  <#else>
+                    ${uiLabelMap.CommonNA}
+                  </#if>
+                  </div>
+              </td>
+              <td align="right">${orh.hasSurvey()?string.number}</td>
+              <td align="right">${orh.getTotalOrderItemsQuantity()?string.number}</td>
+              <td align="right">${orh.getOrderBackorderQuantity()?string.number}</td>
+              <td align="right">${orh.getOrderReturnedQuantity()?string.number}</td>
+              <td align="right"><@ofbizCurrency amount=orderHeader.remainingSubTotal isoCode=orh.getCurrency()/></td>
+              <td align="right"><@ofbizCurrency amount=orderHeader.grandTotal isoCode=orh.getCurrency()/></td>
+
+              <td>&nbsp;</td>
+              <td>${statusItem.get("description",locale)?default(statusItem.statusId?default("N/A"))}</td>
+              </td>
+              <#if (requestParameters.filterInventoryProblems?default("N") == "Y") || (requestParameters.filterPOsOpenPastTheirETA?default("N") == "Y") || (requestParameters.filterPOsWithRejectedItems?default("N") == "Y") || (requestParameters.filterPartiallyReceivedPOs?default("N") == "Y")>
+                  <td>
+                      <#if filterInventoryProblems.contains(orderHeader.orderId)>
+                        Inv&nbsp;
+                      </#if>
+                      <#if filterPOsOpenPastTheirETA.contains(orderHeader.orderId)>
+                        ETA&nbsp;
+                      </#if>
+                      <#if filterPOsWithRejectedItems.contains(orderHeader.orderId)>
+                        Rej&nbsp;
+                      </#if>
+                      <#if filterPartiallyReceivedPOs.contains(orderHeader.orderId)>
+                        Part&nbsp;
+                      </#if>
+                  </td>
+              </#if>
+              <td>${orderHeader.getString("orderDate")}</td>
+            </tr>
+            <#-- toggle the row color -->
+            <#assign alt_row = !alt_row>
+          </#list>
+        <#else>
+          <tr>
+            <td colspan='4'><h3>${uiLabelMap.EbayNoOrderImported}.</h3></td>
+          </tr>
+        </#if>
+        <#if lookupErrorMessage?exists>
+          <tr>
+            <td colspan='4'><h3>${lookupErrorMessage}</h3></td>
+          </tr>
+        </#if>
+      </table>
+  </form>
+  </div>
+</div>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml?rev=926491&r1=926490&r2=926491&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerForms.xml Tue Mar 23 08:18:32 2010
@@ -508,4 +508,44 @@ value="${bsh:billingAccount != null ? or
         <field name="buyerId"><text/></field>
         <field name="submitButton" title="${uiLabelMap.CommonSearch}"><submit/></field>
     </form>
+    <form name="findOrdersImported" type="single" target="searchOrdersImported">
+        <actions>
+            <entity-and entity-name="ProductStoreRole" list="storeList">
+                <field-map field-name="productStoreId" from-field="parameters.productStoreId"/>
+                <field-map field-name="roleTypeId" value="EBAY_ACCOUNT"/>
+            </entity-and>
+            <set field="partyId" value="${bsh:
+                import org.ofbiz.entity.util.EntityUtil;
+                GenericValue partyStore = EntityUtil.getFirst(storeList);
+                if(partyStore!=null) partyId = partyStore.getString(&quot;partyId&quot;);
+                return partyId;
+                }"/>
+        </actions>
+        <field name="productStoreId"><hidden value="10000"/></field>
+        <field name="viewSize"><hidden value="20"/></field>
+        <field name="viewIndex"><hidden value="1"/></field>
+        <!--field name="partyId"><hidden value="${partyId}"/></field-->
+        <field name="salesChannelEnumId"><hidden value="EBAY_SALES_CHANNEL"/></field>
+        <field name="countryGeoId"><hidden value="USA"/></field>
+        <field name="includeCountry"><hidden value="N"/></field>
+        <field name="orderId" title="Order Id"><text size="25"></text></field>
+        <field name="productId" title="Product Id"><text size="25"></text></field>
+        <field name="orderTypeId" title="Order Type">
+            <drop-down>
+                <option key="" description="Any Order Type"/>
+                <option key="PURCHASE_ORDER" description="Purchase Order"/>
+                <option key="SALES_ORDER" description="Sales Order"/>
+            </drop-down>
+        </field>
+        <field name="statusId" title="Status">
+            <drop-down>
+                <option key="" description="All Status"/>
+                <entity-options entity-name="StatusItem" description="${description}">
+                    <entity-constraint name="statusTypeId" operator="equals" value="ORDER_STATUS"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit/></field>
+    </form>
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml?rev=926491&r1=926490&r2=926491&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbaySellingManagerScreens.xml Tue Mar 23 08:18:32 2010
@@ -530,4 +530,29 @@
             </widgets>
         </section>
     </screen>
+    <screen name="ordersImported">
+        <section>
+            <actions>
+                <set field="headerItem" value="ebayStore"/>
+                <set field="sellingManagerItem" value="ordersImported"/>
+                <script location="component://order/webapp/ordermgr/WEB-INF/actions/order/FindOrders.groovy"/>
+                <set field="orderList" value="${orderList}" type="List"/>
+                <set field="productStoreId" from-field="parameters.productStoreId"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="SellingManagerDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <screenlet title="Find Orders Imported">
+                            <include-form name="findOrdersImported" location="component://ebaystore/widget/EbaySellingManagerForms.xml"/>
+                        </screenlet>
+                        <platform-specific>
+                            <html>
+                                <html-template location="component://ebaystore/webapp/ebaystore/store/orderImported.ftl"/>
+                            </html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreMenus.xml?rev=926491&r1=926490&r2=926491&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreMenus.xml (original)
+++ ofbiz/trunk/specialpurpose/ebaystore/widget/EbayStoreMenus.xml Tue Mar 23 08:18:32 2010
@@ -86,6 +86,11 @@
                 <parameter param-name="productStoreId" value="${parameters.productStoreId}"/>
             </link>
         </menu-item>
+        <menu-item name="ordersImported" title="Orders Imported">
+            <link target="ordersImported">
+                <parameter param-name="productStoreId" value="${parameters.productStoreId}"/>
+            </link>
+        </menu-item>
     </menu>
     <menu name="EbayAccountTabBar" selected-menuitem-context-field-name="accountItem" type="simple"
         default-selected-style="selected" menu-container-style="button-bar button-style-2">