svn commit: r558463 - in /ofbiz/trunk: applications/product/entitydef/ specialpurpose/oagis/config/ specialpurpose/oagis/src/org/ofbiz/oagis/ specialpurpose/oagis/templates/ specialpurpose/oagis/templates/email/ specialpurpose/oagis/webapp/oagis/messag...

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

svn commit: r558463 - in /ofbiz/trunk: applications/product/entitydef/ specialpurpose/oagis/config/ specialpurpose/oagis/src/org/ofbiz/oagis/ specialpurpose/oagis/templates/ specialpurpose/oagis/templates/email/ specialpurpose/oagis/webapp/oagis/messag...

apatel-2
Author: apatel
Date: Sat Jul 21 22:32:01 2007
New Revision: 558463

URL: http://svn.apache.org/viewvc?view=rev&rev=558463
Log:
moving to next step in syncInventory.

Added:
    ofbiz/trunk/specialpurpose/oagis/templates/
    ofbiz/trunk/specialpurpose/oagis/templates/email/
    ofbiz/trunk/specialpurpose/oagis/templates/email/InventoryNoticeEmail.ftl
Modified:
    ofbiz/trunk/applications/product/entitydef/entitygroup.xml
    ofbiz/trunk/applications/product/entitydef/entitymodel.xml
    ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.properties
    ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
    ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/oagisEmailNotification.ftl
    ofbiz/trunk/specialpurpose/oagis/widget/EmailOagisMessageScreens.xml

Modified: ofbiz/trunk/applications/product/entitydef/entitygroup.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitygroup.xml?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitygroup.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitygroup.xml Sat Jul 21 22:32:01 2007
@@ -117,6 +117,7 @@
     <entity-group group="org.ofbiz" entity="PhysicalInventory" />
     <entity-group group="org.ofbiz" entity="PhysicalInventoryAndVariance" />
     <entity-group group="org.ofbiz" entity="VarianceReason" />
+    <entity-group group="org.ofbiz" entity="InventoryItemAndDetail" />
 
   <!-- ========================================================= -->
   <!-- org.ofbiz.product.location -->
@@ -331,4 +332,5 @@
     <entity-group group="org.ofbiz" entity="ShippingDocument" />
     <entity-group group="org.ofbiz" entity="PackedQtyVsOrderItemQuantity" />
 </entitygroup>
+
 

Modified: ofbiz/trunk/applications/product/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/entitydef/entitymodel.xml?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/applications/product/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/product/entitydef/entitymodel.xml Sat Jul 21 22:32:01 2007
@@ -1524,6 +1524,21 @@
       <field name="description" type="description"></field>
       <prim-key field="varianceReasonId"/>
     </entity>
+    <view-entity entity-name="InventoryItemAndDetail"
+            package-name="org.ofbiz.product.inventory"
+            title="Inventory Item  And Inventory Item Detail View Entity">
+      <member-entity entity-alias="II" entity-name="InventoryItem"/>        
+      <member-entity entity-alias="IID" entity-name="InventoryItemDetail"/>
+      <alias entity-alias="II" name="inventoryItemId"/>
+      <alias entity-alias="II" name="productId"/>
+      <alias entity-alias="IID" name="inventoryItemDetailSeqId"/>  
+      <alias entity-alias="IID" name="effectiveDate"/>  
+      <alias entity-alias="IID" name="quantityOnHandDiff"/>
+      <view-link entity-alias="II" rel-entity-alias="IID">
+          <key-map field-name="inventoryItemId"/>
+      </view-link>
+    </view-entity>
+
   <!-- ========================================================= -->
   <!-- org.ofbiz.product.location -->
   <!-- ========================================================= -->

Modified: ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.properties?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.properties (original)
+++ ofbiz/trunk/specialpurpose/oagis/config/OagisUiLabels.properties Sat Jul 21 22:32:01 2007
@@ -30,3 +30,6 @@
 OagisNewMessageErrorInfo = New Message Error Info
 OagisErrorInCreatingDataForOagisMessageInfoEntity = Error in creating data for OagisMessageInfo Entity
 OagisErrorInExportingMessageFromScreen = Error in exporting message from screen
+
+OagisInventoryDescription=Inventory Description
+PageTitleOagisInventoryMismatchNotice=Inventory Mismatch Notice

Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Sat Jul 21 22:32:01 2007
@@ -47,6 +47,7 @@
 import org.ofbiz.entity.GenericDelegator;
 import org.ofbiz.entity.GenericEntityException;
 import org.ofbiz.entity.GenericValue;
+import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityConditionList;
 import org.ofbiz.entity.condition.EntityExpr;
 import org.ofbiz.entity.condition.EntityOperator;
@@ -72,7 +73,6 @@
         GenericDelegator delegator = ctx.getDelegator();
         LocalDispatcher dispatcher = ctx.getDispatcher();
         Locale locale = (Locale) context.get("locale");
-        Map receiveInventoryCtx = FastMap.newInstance();
         List errorMapList = FastList.newInstance();
         
         if (userLogin == null) {
@@ -130,10 +130,10 @@
             
         String itemQtyStr = UtilXml.childElementValue(dataAreaQuantityElement, "N2:VALUE");
         double itemQty = Double.parseDouble(itemQtyStr);
-        String sign = UtilXml.childElementValue(dataAreaQuantityElement, "N2:SIGN");
-        String uom = UtilXml.childElementValue(dataAreaQuantityElement, "N2:UOM");
+        // String sign = UtilXml.childElementValue(dataAreaQuantityElement, "N2:SIGN");
+        // String uom = UtilXml.childElementValue(dataAreaQuantityElement, "N2:UOM");
         String productId = UtilXml.childElementValue(dataAreaQuantityElement, "N2:ITEM");
-        String itemStatus = UtilXml.childElementValue(dataAreaQuantityElement, "N2:ITEMSTATUS");
+        // String itemStatus = UtilXml.childElementValue(dataAreaQuantityElement, "N2:ITEMSTATUS");
         
         String datetimeReceived = UtilXml.childElementValue(dataAreaInventoryElement, "N1:DATETIMEANY");
         
@@ -143,100 +143,108 @@
         Timestamp timestamp = null;
         try {        
             timestamp = new Timestamp(sdf.parse(datetimeReceived).getTime());
-            receiveInventoryCtx.put("datetimeReceived", timestamp);
         } catch (ParseException e) {
             String errMsg = "Error parsing Date: " + e.toString();
             errorMapList.add(UtilMisc.toMap("reasonCode", "ParseException", "description", errMsg));
             Debug.logError(e, errMsg, module);
         }
-        
-        String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId");
-        receiveInventoryCtx.put("facilityId", facilityId);
-        
-        receiveInventoryCtx.put("productId", productId);
-        receiveInventoryCtx.put("statusId", itemStatus);
-        receiveInventoryCtx.put("currencyUomId", uom);
-        receiveInventoryCtx.put("userLogin", userLogin);  
-        
-        // check whether product is serialized or non-serialized
-        try {
-            GenericValue inventoryItem = EntityUtil.getFirst(delegator.findByAnd("InventoryItem", UtilMisc.toMap("productId", productId)));
-            String inventoryItemTypeId = inventoryItem.getString("inventoryItemTypeId");
-            if (inventoryItemTypeId.equals("SERIALIZED_INV_ITEM")) {
-                receiveInventoryCtx.put("inventoryItemTypeId","SERIALIZED_INV_ITEM");
-            } else {
-                receiveInventoryCtx.put("inventoryItemTypeId", "NON_SERIAL_INV_ITEM");
+        // get quantity on hand diff  
+        double quantityOnHandDiff = 0.0;
+        List invItemAndDetails = null;
+        EntityCondition condition = new EntityConditionList(UtilMisc.toList(
+                new EntityExpr("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, timestamp), new EntityExpr("productId", EntityOperator.EQUALS, productId)), EntityOperator.AND);
+        try {
+            invItemAndDetails = delegator.findByCondition("InventoryItemAndDetail", condition, null, UtilMisc.toList("inventoryItemId"));
+            Iterator invItemAndDetailIter = invItemAndDetails.iterator();
+            while (invItemAndDetailIter.hasNext()) {
+                GenericValue InventoryItemAndDetail = (GenericValue) invItemAndDetailIter.next();
+                quantityOnHandDiff = quantityOnHandDiff + Double.parseDouble(InventoryItemAndDetail.getString("quantityOnHandDiff"));
             }
         } catch (GenericEntityException e) {
-            String errMsg = "Error Getting Inventory Item: " + e.toString();
+            String errMsg = "Error Getting Inventory Item And Detail: " + e.toString();
             errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
             Debug.logError(e, errMsg, module);
         }
         
-/*      // get quantity on hand total using service getProductInventoryAvailable
-        Map gpiaResult = FastMap.newInstance();
-        try {
-            gpiaResult = dispatcher.runSync("getProductInventoryAvailable", UtilMisc.toMap("productId", productId) );
-            if (ServiceUtil.isError(gpiaResult)) {
-                String errMsg = ServiceUtil.getErrorMessage(gpiaResult);
-                errorMapList.add(UtilMisc.toMap("reasonCode", "GetProductInventoryAvailableServiceError", "description", errMsg));
+        // check for mismatch in quantity to send a mail to facility
+        if (itemQty != quantityOnHandDiff) {
+            double quantityDiff = Math.abs((itemQty - quantityOnHandDiff));
+            
+            // prepare information to send mail
+            Map sendMap = FastMap.newInstance();
+    
+            // get facility email address
+            List facilityContactMechs = null;
+            GenericValue contactMech = null;
+            String facilityId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryFacilityId");
+            try {
+                facilityContactMechs = delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId));    
+            } catch (GenericEntityException e) {
+                String errMsg = "Error Getting FacilityContactMech: " + e.toString();
+                errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
+                Debug.logError(e, errMsg, module);
+            }
+            Iterator fcmIter  = facilityContactMechs.iterator();
+            while(fcmIter.hasNext()) {
+                GenericValue facilityContactMech = (GenericValue) fcmIter.next();
+                String contactMechId = facilityContactMech.getString("contactMechId");
+                try {
+                    contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
+                } catch (GenericEntityException e) {
+                    String errMsg = "Error Getting ContactMech: " + e.toString();
+                    errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
+                    Debug.logError(e, errMsg, module);
+                }
+                String contactMechTypeId = contactMech.getString("contactMechTypeId");
+                if (contactMechTypeId.equals("EMAIL_ADDRESS")) {
+                    String emailString = contactMech.getString("infoString");
+                    sendMap.put("sendTo", emailString);
+                }
             }
-        } catch (GenericServiceException e) {
-            String errMsg = "Error running service getProductInventoryAvailable: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericServiceException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
-        }
             
-        double quantityOnHandTotal = ((Double) gpiaResult.get("quantityOnHandTotal")).doubleValue();
-*/    
-        // get quantity on hand total  
-        double quantityOnHandTotal = 0.0;
-        List inventoryItems = null;
-        List exprs = FastList.newInstance();
-        try {
-            exprs.add(new EntityExpr("datetimeReceived", EntityOperator.LESS_THAN_EQUAL_TO, timestamp));
-            exprs.add(new EntityExpr("productId", EntityOperator.EQUALS, productId));
-            inventoryItems = delegator.findByCondition("InventoryItem", new EntityConditionList(exprs, EntityOperator.OR), null, UtilMisc.toList("inventoryItemId"));
-            Iterator invItemIter = inventoryItems.iterator();
-            while (invItemIter.hasNext()) {
-                GenericValue inventoryItem = (GenericValue) invItemIter.next();
-                quantityOnHandTotal = quantityOnHandTotal + Double.parseDouble(inventoryItem.getString("quantityOnHandTotal"));
+            GenericValue productStoreEmail = null;
+            String productStoreId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId");
+            try {
+                productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", "PRDS_OAGIS_CONFIRM"));
+            } catch (GenericEntityException e) {
+                String errMsg = "Error Getting Entity ProductStoreEmailSetting: " + e.toString();
+                errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
+                Debug.logError(e, errMsg, module);
             }
-        } catch (GenericEntityException e) {
-            String errMsg = "Error Getting Inventory Item: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
-        }
+            if (productStoreEmail != null) {
+                String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
+                sendMap.put("bodyScreenUri", bodyScreenLocation);
+            } else {
+                sendMap.put("bodyScreenUri", "component://oagis/widget/EmailOagisMessageScreens.xml#InventoryMismatchNotice");
+            }
+            if (locale == null) {
+                locale = Locale.getDefault();
+            }
+            sendMap.put("subject", productStoreEmail.getString("subject"));
+            sendMap.put("sendFrom", productStoreEmail.getString("fromAddress"));
+            sendMap.put("sendCc", productStoreEmail.getString("ccAddress"));
+            sendMap.put("sendBcc", productStoreEmail.getString("bccAddress"));
+            sendMap.put("contentType", productStoreEmail.getString("contentType"));
+            
+            Map bodyParameters = UtilMisc.toMap("quantityOnHandDiff", String.valueOf(quantityOnHandDiff), "quantityFromMessage", itemQtyStr, "quantityDiff", String.valueOf(quantityDiff), "productId", productId,  "locale", locale);
+            sendMap.put("bodyParameters", bodyParameters);
+            sendMap.put("userLogin", userLogin);
 
-        // sign handling    
-        double quantityAccepted ;
-        double quantityRejected ;
-            
-        if ( sign.equals("+")) {
-            quantityAccepted = itemQty - quantityOnHandTotal; // take difference to get mismatch quantity value
-            quantityRejected = 0.0 ;
-        } else {
-            quantityRejected = itemQty;
-            quantityAccepted = 0.0;
-        }
-        receiveInventoryCtx.put("quantityAccepted", new Double(quantityAccepted));
-        receiveInventoryCtx.put("quantityRejected", new Double(quantityRejected));
-        
-        // if qoh from message and inventory matches, nothing is done and if not than create inventory  
-        try {
-            if (itemQty != quantityOnHandTotal) {  
-                Map ripResult = dispatcher.runSync("receiveInventoryProduct", receiveInventoryCtx );
-                if (ServiceUtil.isError(ripResult)) {
-                    String errMsg = ServiceUtil.getErrorMessage(ripResult);
-                    errorMapList.add(UtilMisc.toMap("reasonCode", "ReceiveInventoryServiceError", "description", errMsg));
+            // send the notification
+            Map sendResp = null;
+            try {
+                sendResp = dispatcher.runSync("sendMailFromScreen", sendMap);
+                if (ServiceUtil.isError(sendResp)){
+                    String errMsg = ServiceUtil.getErrorMessage(sendResp);
+                    errorMapList.add(UtilMisc.toMap("reasonCode", "SendMailServiceError", "description", errMsg));
                 }
-            }
-        } catch(GenericServiceException e) {
-            String errMsg = "Error running service receiveInventoryProduct: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericServiceException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
+            } catch(GenericServiceException e) {
+                String errMsg = "Error Running Service sendMailFromScreen: " + e.toString();
+                errorMapList.add(UtilMisc.toMap("reasonCode", "GenericServiceException", "description", errMsg));
+                Debug.logError(e, errMsg, module);
+            }
         }
-
+      
         // create oagis message info
         Map comiCtx= FastMap.newInstance();
         comiCtx.put("logicalId", logicalId);
@@ -262,79 +270,7 @@
             errorMapList.add(UtilMisc.toMap("reasonCode", "CreateOagisMessageInfoError", "description", errMsg));
             Debug.logError(e, errMsg, module);
         }
-        // prepare information to send mail
-        Map sendMap = FastMap.newInstance();
-
-        // get facility email address
-        List facilityContactMechs = null;
-        GenericValue contactMech = null;
-        try {
-            facilityContactMechs = delegator.findByAnd("FacilityContactMech", UtilMisc.toMap("facilityId", facilityId));    
-        } catch (GenericEntityException e) {
-            String errMsg = "Error Getting FacilityContactMech: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
-        }
-        Iterator fcmIter  = facilityContactMechs.iterator();
-        while(fcmIter.hasNext()) {
-            GenericValue facilityContactMech = (GenericValue) fcmIter.next();
-            String contactMechId = facilityContactMech.getString("contactMechId");
-            try {
-                contactMech = delegator.findByPrimaryKey("ContactMech", UtilMisc.toMap("contactMechId", contactMechId));
-            } catch (GenericEntityException e) {
-                String errMsg = "Error Getting ContactMech: " + e.toString();
-                errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
-                Debug.logError(e, errMsg, module);
-            }
-            String contactMechTypeId = contactMech.getString("contactMechTypeId");
-            if (contactMechTypeId.equals("EMAIL_ADDRESS")) {
-                String emailString = contactMech.getString("infoString");
-                sendMap.put("sendTo", emailString);
-            }
-        }
-        
-        GenericValue productStoreEmail = null;
-        String productStoreId = UtilProperties.getPropertyValue("oagis.properties", "Oagis.Warehouse.SyncInventoryProductStoreId");
-        try {
-            productStoreEmail = delegator.findByPrimaryKey("ProductStoreEmailSetting", UtilMisc.toMap("productStoreId", productStoreId, "emailType", "PRDS_OAGIS_CONFIRM"));
-        } catch (GenericEntityException e) {
-            String errMsg = "Error Getting Entity ProductStoreEmailSetting: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericEntityException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
-        }
-        if (productStoreEmail != null) {
-            String bodyScreenLocation = productStoreEmail.getString("bodyScreenLocation");
-            sendMap.put("bodyScreenUri", bodyScreenLocation);
-        } else {
-            sendMap.put("bodyScreenUri", "component://oagis/widget/EmailOagisMessageScreens.xml#EmailOagisMessageNotification");
-        }
-        if (locale == null) {
-            locale = Locale.getDefault();
-        }
-        sendMap.put("subject", productStoreEmail.getString("subject"));
-        sendMap.put("sendFrom", productStoreEmail.getString("fromAddress"));
-        sendMap.put("sendCc", productStoreEmail.getString("ccAddress"));
-        sendMap.put("sendBcc", productStoreEmail.getString("bccAddress"));
-        sendMap.put("contentType", productStoreEmail.getString("contentType"));
         
-        Map bodyParameters = UtilMisc.toMap("quantityOnHandTotal", String.valueOf(quantityOnHandTotal), "itemQtyFrmMessage", String.valueOf(itemQty), "locale", locale);
-        sendMap.put("bodyParameters", bodyParameters);
-        sendMap.put("userLogin", userLogin);
-        
-        // send the notification
-        Map sendResp = null;
-        try {
-            sendResp = dispatcher.runSync("sendMailFromScreen", sendMap);
-            if (ServiceUtil.isError(sendResp)){
-                String errMsg = ServiceUtil.getErrorMessage(sendResp);
-                errorMapList.add(UtilMisc.toMap("reasonCode", "SendMailServiceError", "description", errMsg));
-            }
-        } catch(GenericServiceException e) {
-            String errMsg = "Error Running Service sendMailFromScreen: " + e.toString();
-            errorMapList.add(UtilMisc.toMap("reasonCode", "GenericServiceException", "description", errMsg));
-            Debug.logError(e, errMsg, module);
-        }
-
         Map result = FastMap.newInstance();
         result.put("contentType", "text/plain");
 

Added: ofbiz/trunk/specialpurpose/oagis/templates/email/InventoryNoticeEmail.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/templates/email/InventoryNoticeEmail.ftl?view=auto&rev=558463
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/templates/email/InventoryNoticeEmail.ftl (added)
+++ ofbiz/trunk/specialpurpose/oagis/templates/email/InventoryNoticeEmail.ftl Sat Jul 21 22:32:01 2007
@@ -0,0 +1,55 @@
+<#--
+    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.
+-->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+    <title>${title}</title>
+    <#-- this needs to be fully qualified to appear in email; the server must also be available -->
+    <link rel="stylesheet" href="${baseUrl}/images/maincss.css" type="text/css"/>
+  </head>
+
+  <body>
+    <div class="head1">${title}</div>
+    <#-- custom logo or text can be inserted here -->
+    <br/>
+    <div class="screenlet-header">  
+      <div class="boxhead">${uiLabelMap.OagisInventoryDescription}<b></b></div>
+    </div>  
+    <div class="screenlet-body">
+      <table width="100%" border="0" cellpadding="0">
+        <tr align="left" valign="bottom">
+          <td width="10%" align="left"><span class="tableheadtext"><b>${uiLabelMap.EcommerceProduct}</b></span></td>              
+          <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.OrderQuantity} (Inventory)</b></span></td>
+          <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.OrderQuantity} (Message)</b></span></td>
+          <td width="10%" align="right"><span class="tableheadtext"><b>${uiLabelMap.CommonDiff}.</b></span></td>
+        </tr>
+        <tr><td colspan="10"><hr class="sepbar"/></td></tr>
+        <tr>
+          <td align="left" valign="top"> ${productId?if_exists}</td>  
+          <td align="right" valign="top"> ${quantityOnHandDiff?if_exists?if_exists}</td>  
+          <td align="right" valign="top"> ${quantityFromMessage?if_exists?if_exists}</td>  
+          <td align="right" valign="top"> ${quantityDiff?if_exists?if_exists}</td>  
+        </tr>
+        <tr><td colspan="10"><hr class="sepbar"/></td></tr>
+      </table>
+    </div>
+  </body>
+</html>

Modified: ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/oagisEmailNotification.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/oagisEmailNotification.ftl?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/oagisEmailNotification.ftl (original)
+++ ofbiz/trunk/specialpurpose/oagis/webapp/oagis/message/oagisEmailNotification.ftl Sat Jul 21 22:32:01 2007
@@ -1,35 +0,0 @@
-<#--
-    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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-    <head>
-        <title>Oagis Recieve Inventory Email Notification</title>
-        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
-
-    </head>
-    <body>
-        <div class="email_wrapper">
-            <p>
-                <a href="#">Available Quantity On Hand </a>
-            </p>
-            <div style="clear:both">${quantityOnHandTotal?if_exists}</div>
-            <div style="height:600px"></div>
-        </div>
-    </body>
-</html>

Modified: ofbiz/trunk/specialpurpose/oagis/widget/EmailOagisMessageScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/widget/EmailOagisMessageScreens.xml?view=diff&rev=558463&r1=558462&r2=558463
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/widget/EmailOagisMessageScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/oagis/widget/EmailOagisMessageScreens.xml Sat Jul 21 22:32:01 2007
@@ -19,16 +19,21 @@
 -->
 <screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
-    <screen name="EmailOagisMessageNotification">
+    <screen name="InventoryMismatchNotice">
         <section>
+            <actions>
+                <property-map resource="OagisUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="title" value="${uiLabelMap.PageTitleOagisInventoryMismatchNotice}"/>
+            </actions>              
             <widgets>
                 <platform-specific>
                     <html>
-                        <html-template location="component://oagis/webapp/oagis//message/oagisEmailNotification.ftl"/>
+                        <html-template location="component://oagis/templates/email/InventoryNoticeEmail.ftl"/>
                     </html>
                 </platform-specific>
             </widgets>
         </section>
     </screen>
-    
 </screens>