Hi Hans,

It's a little bit premature adding a birt view to the trunk isn't it?

Regards
Scott

HotWax Media
http://www.hotwaxmedia.com

On 25/11/2009, at 3:07 AM, [email protected] wrote:

Author: hansbak
Date: Tue Nov 24 14:07:47 2009
New Revision: 883699

URL: http://svn.apache.org/viewvc?rev=883699&view=rev
Log:
added the warehouse processing for the ordersales entities. Contribution by our Antwebsystems employee Tom

Added:
   ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/
ofbiz/trunk/applications/order/script/org/ofbiz/order/olap/ FactServices.xml (with props) ofbiz/trunk/applications/order/servicedef/secas_olap.xml (with props) ofbiz/trunk/applications/order/servicedef/services_olap.xml (with props) ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/ report/ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/ report/SalesReport.groovy (with props)
Modified:
   ofbiz/trunk/applications/order/data/OrderPortletData.xml
   ofbiz/trunk/applications/order/servicedef/secas.xml
   ofbiz/trunk/applications/order/servicedef/services.xml
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ controller.xml
   ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml
   ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml
   ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml


Added: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ actions/report/SalesReport.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/report/SalesReport.groovy?rev=883699&view=auto
= = = = = = = = ====================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/ report/SalesReport.groovy (added) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/ report/SalesReport.groovy Tue Nov 24 14:07:47 2009
@@ -0,0 +1,12 @@
+import org.ofbiz.base.util.*;
+
+fromDateStr = parameters.fromDate;
+thruDateStr = parameters.thruDate;
+
+birtParameters = [:];
+birtParameters.fromDate = UtilDateTime.toTimestamp(fromDateStr);
+birtParameters.thruDate = UtilDateTime.toTimestamp(thruDateStr);
+
+request.setAttribute("birtParameters", birtParameters);
+
+return "success";
\ No newline at end of file

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ actions/report/SalesReport.groovy
------------------------------------------------------------------------------
   svn:eol-style = native

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ actions/report/SalesReport.groovy
------------------------------------------------------------------------------
   svn:keywords = "Date Rev Author URL Id"

Propchange: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ actions/report/SalesReport.groovy
------------------------------------------------------------------------------
   svn:mime-type = text/plain

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ controller.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/controller.xml?rev=883699&r1=883698&r2=883699&view=diff
= = = = = = = = ====================================================================== --- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ controller.xml (original) +++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/ controller.xml Tue Nov 24 14:07:47 2009
@@ -30,6 +30,7 @@
<handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/> <handler name="bsf" type="request" class="org.ofbiz.webapp.event.BsfEventHandler"/> <handler name="jsonjava" type="request" class="org.ofbiz.webapp.event.JSONJavaEventHandler"/> + <handler name="birt" type="view" class="org.ofbiz.webapp.view.BirtViewHandler"/> <!-- Events to run on every request before security (chains exempt) -->
    <!--
    <preprocessor>
@@ -1082,6 +1083,10 @@
<request-map uri="PurchasesByOrganizationReport.pdf"><security https="true" auth="true"/> <response name="success" type="view" value="PurchasesByOrganizationReport"/>
    </request-map>
+ <request-map uri="SalesReport.pdf"><security https="true" auth="true"/> + <event type="groovy" path="component://order/webapp/ ordermgr/WEB-INF/actions/report/" invoke="SalesReport.groovy"/> + <response name="success" type="view" value="SalesOrderReport"/>
+    </request-map>

     <!-- Requirement request mappings -->
    <request-map uri="FindRequirements">
@@ -1760,6 +1765,7 @@
<view-map name="SalesByStoreReport" type="screenfop" page="component://order/widget/ordermgr/ ReportScreens.xml#SalesByStoreReport" content-type="application/pdf" encoding="none"/> <view-map name="OpenOrderItemsReport" type="screen" page="component://order/widget/ordermgr/ ReportScreens.xml#OpenOrderItemsReport"/> <view-map name="PurchasesByOrganizationReport" type="screenfop" page="component://order/widget/ordermgr/ ReportScreens.xml#PurchasesByOrganizationReport" content- type="application/pdf" encoding="none"/> + <view-map name="SalesOrderReport" type="birt" page="component:// birt/webapp/birt/report/SalesReport.rptdesign" content- type="application/pdf"/>

<view-map name="FindRequirements" type="screen" page="component://order/widget/ordermgr/ RequirementScreens.xml#FindRequirements"/> <view-map name="EditRequirement" type="screen" page="component:// order/widget/ordermgr/RequirementScreens.xml#EditRequirement"/>

Modified: ofbiz/trunk/applications/order/widget/ordermgr/ ReportForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml?rev=883699&r1=883698&r2=883699&view=diff
= = = = = = = = ====================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/ReportForms.xml Tue Nov 24 14:07:47 2009
@@ -195,4 +195,40 @@
<field name="thruOrderDate" title="$ {uiLabelMap.CommonThruDate}"><date-time type="timestamp"/></field> <field name="submitButton" title="${uiLabelMap.CommonRun}" widget-style="smallSubmit"><submit button-type="button"/></field>
    </form>
+
+    <!--New From-->
+ <form name="SalesReport" type="single" target="SalesReport.pdf" title="" + header-row-style="header-row" default-table-style="basic- table">
+<!--        <field name="report">
+            <drop-down allow-empty="false">
+                <option key="BIC" description="BIC"/>
+                <option key="NBO" description="NBO"/>
+            </drop-down>
+        </field>-->
+<!--        <field name="productStoreId">
+            <drop-down allow-empty="false">
+ <option key="" description="- $ {uiLabelMap.CommonSelectAny} -"/> + <entity-options entity-name="ProductStore" description="${storeName} [${productStoreId}]">
+                    <entity-order-by field-name="storeName"/>
+                </entity-options>
+            </drop-down>
+        </field>-->
+<!--        <field name="orderTypeId">
+            <drop-down allow-empty="false">
+ <option key="SALES_ORDER" description="$ {uiLabelMap.OrderSalesOrder}"/> + <option key="PURCHASE_ORDER" description="$ {uiLabelMap.OrderPurchaseOrder}"/>
+            </drop-down>
+        </field>-->
+<!--        <field name="orderStatusId">
+            <drop-down allow-empty="false">
+ <option key="" description="- $ {uiLabelMap.CommonSelectAny} -"/> + <entity-options entity-name="StatusItem" description="${description}" key-field-name="statusId"> + <entity-constraint name="statusTypeId" operator="equals" value="ORDER_STATUS"/>
+                </entity-options>
+            </drop-down>
+        </field>-->
+ <field name="fromDate" title="$ {uiLabelMap.OrderReportFromDate}"><date-time type="timestamp"/></ field> + <field name="thruDate" title="$ {uiLabelMap.OrderReportThruDate}"><date-time type="timestamp"/></ field> + <field name="submitButton" title="${uiLabelMap.CommonRun}" widget-style="smallSubmit"><submit button-type="button"/></field>
+    </form>
</forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/order/widget/ordermgr/ ReportScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml?rev=883699&r1=883698&r2=883699&view=diff
= = = = = = = = ====================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/ReportScreens.xml Tue Nov 24 14:07:47 2009
@@ -96,6 +96,17 @@
            </widgets>
        </section>
    </screen>
+
+    <!--New Screen-->
+    <screen name="SalesReport">
+        <section>
+            <widgets>
+                <screenlet title="Sales Report">
+ <include-form name="SalesReport" location="component://order/widget/ordermgr/ReportForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>

    <screen name="OrderPurchaseReportPayment">
        <section>
@@ -280,4 +291,22 @@
            </widgets>
        </section>
    </screen>
+
+    <screen name="SalesOrderReport">
+        <section>
+  <!--          <actions>
+ <entity-condition entity- name="SalesOrderItemStarSchema" list="SalesReportList">
+                    <condition-list combine="and">
+ <condition-expr field-name="orderDate" operator="greater-equals" from-field="parameters.fromOrderDate" ignore-if-null="true"/> + <condition-expr field-name="orderDate" operator="less" from-field="parameters.thruOrderDate" ignore-if- null="true"/>
+                    </condition-list>
+                </entity-condition>
+                </actions>-->
+            <widgets>
+                <platform-specific>
+ <xml><html-template location="component://birt/ webapp/birt/report/SalesReport.rptdesign"/></xml>
+                </platform-specific>
+            </widgets>
+        </section>
+    </screen>
</screens>

Modified: ofbiz/trunk/framework/bi/script/org/ofbiz/bi/ DimensionServices.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/bi/script/org/ofbiz/bi/DimensionServices.xml?rev=883699&r1=883698&r2=883699&view=diff
= = = = = = = = ====================================================================== --- ofbiz/trunk/framework/bi/script/org/ofbiz/bi/ DimensionServices.xml (original) +++ ofbiz/trunk/framework/bi/script/org/ofbiz/bi/ DimensionServices.xml Tue Nov 24 14:07:47 2009
@@ -46,8 +46,25 @@
        <iterate list="invoices" entry="invoice">
            <clear-field field="inMap"/>
<set field="inMap.invoiceId" from- field="invoice.invoiceId"/> + <log level="always" message="===================inMap : ${inMap}"/> <call-service service-name="loadSalesInvoiceFact" in-map- name="inMap"/>
            <check-errors/>
        </iterate>
+
+ <!-- loads the order items in the SalesOrderItemFact fact entity --> + <entity-condition entity-name="OrderHeader" list="orderHeaders">
+            <condition-list>
+ <condition-expr field-name="orderTypeId" value="SALES_ORDER"/> + <condition-expr field-name="orderDate" operator="greater-equals" from-field="parameters.fromDate"/> + <condition-expr field-name="orderDate" operator="less-equals" from-field="parameters.thruDate"/>
+            </condition-list>
+        </entity-condition>
+        <iterate list="orderHeaders" entry="orderHeader">
+            <clear-field field="inMap"/>
+ <set field="inMap.orderId" from- field="orderHeader.orderId"/> + <log level="always" message="===================inMap : ${inMap}"/> + <call-service service-name="loadSalesOrderFact" in-map- name="inMap"></call-service>
+            <check-errors/>
+        </iterate>
    </simple-method>
</simple-methods>



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to