ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaco...@apache.org
Subject svn commit: r885723 - in /ofbiz/trunk/applications/accounting: webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy webapp/accounting/reports/CostCentersReport.ftl widget/ReportFinancialSummaryForms.xml widget/ReportFinancialSummaryScreens.xml
Date Tue, 01 Dec 2009 10:30:34 GMT
Author: jacopoc
Date: Tue Dec  1 10:30:33 2009
New Revision: 885723

URL: http://svn.apache.org/viewvc?rev=885723&view=rev
Log:
Added default from/thru date values for income statement and cost center report; removed time
period selection from cost center report because the report should not be based on this (still
we have to improve the logic there).


Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy
    ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
    ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy?rev=885723&r1=885722&r2=885723&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy
(original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy
Tue Dec  1 10:30:33 2009
@@ -24,18 +24,6 @@
 import org.ofbiz.entity.condition.EntityCondition;
 
 if (organizationPartyId) {
-
-    customTimePeriods = delegator.findByAnd("CustomTimePeriod", [organizationPartyId : organizationPartyId,
periodTypeId : "FISCAL_YEAR"]);
-    if (UtilValidate.isNotEmpty(customTimePeriods)) {
-        context.customTimePeriods = customTimePeriods;
-    }
-    onlyIncludePeriodTypeIdList = [];
-    onlyIncludePeriodTypeIdList.add("FISCAL_YEAR");
-    customTimePeriodResults = dispatcher.runSync("findCustomTimePeriods", [findDate : UtilDateTime.nowTimestamp(),
organizationPartyId : organizationPartyId, onlyIncludePeriodTypeIdList : onlyIncludePeriodTypeIdList,
userLogin : userLogin]);
-    customTimePeriodList = customTimePeriodResults.customTimePeriodList;
-    if (UtilValidate.isNotEmpty(customTimePeriodList)) {
-        context.timePeriod = (EntityUtil.getFirst(customTimePeriodList)).customTimePeriodId;
-    }
     resultFromPartyAcctgPref = dispatcher.runSync("getPartyAccountingPreferences", [organizationPartyId
: organizationPartyId, userLogin : request.getAttribute("userLogin")]);
     partyAcctgPreference = resultFromPartyAcctgPref.partyAccountingPreference;
     context.currencyUomId = partyAcctgPreference.baseCurrencyUomId;

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl?rev=885723&r1=885722&r2=885723&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/reports/CostCentersReport.ftl Tue
Dec  1 10:30:33 2009
@@ -22,7 +22,6 @@
     <input type="hidden" name="organizationPartyId" value="${parameters.organizationPartyId}"/>
     <input type="hidden" name="fromDate" value="${parameters.fromDate}"/>
     <input type="hidden" name="thruDate" value="${parameters.thruDate}"/>
-    <input type="hidden" name="timePeriod" value="${parameters.timePeriod}"/>
     <a href="javascript:document.costCentersReportPdfForm.submit();" class="buttontext">${uiLabelMap.AccountingExportAsPdf}</a>
   </form>
   <table class="basic-table hover-bar" cellspacing="0">

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=885723&r1=885722&r2=885723&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Tue Dec  1
10:30:33 2009
@@ -409,11 +409,6 @@
         <field name="organizationPartyId"><hidden/></field>
         <field name="fromDate" required-field="false"><date-time type="timestamp"/></field>
         <field name="thruDate" required-field="false"><date-time type="timestamp"/></field>
-        <field name="timePeriod" required-field="false">
-            <drop-down>
-                <list-options list-name="customTimePeriods" key-name="customTimePeriodId"
description="${fromDate} - ${thruDate}"/>
-            </drop-down>
-        </field>
         <field name="submitButton" title="${uiLabelMap.CommonSubmit}" widget-style="smallSubmit"
tooltip="Please enter From and Thru date or select financial time period in fields above"><submit
button-type="button"/></field>
     </form>
 

Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml?rev=885723&r1=885722&r2=885723&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryScreens.xml Tue Dec 
1 10:30:33 2009
@@ -285,6 +285,14 @@
                 </service>
                 <set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/>
                 <set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
+                <!-- Get a default fromDate -->
+                <set field="findLastClosedDateInMap.organizationPartyId" from-field="organizationPartyId"/>
+                <service service-name="findLastClosedDate" in-map-name="findLastClosedDateInMap">
+                    <result-to-field result-name="lastClosedDate"/>
+                    <result-to-field result-name="lastClosedTimePeriod"/>
+                </service>
+                <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"
default-value="${lastClosedDate}"/>
+                <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"
default-value="${nowTimestamp}"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/MonthlyTrialBalance.groovy"/>
             </actions>
             <widgets>
@@ -957,6 +965,15 @@
                 <set field="tabButtonItem" value="OrganizationAccountingReports"/>
                 <set field="tabButtonItem2" value="CostCenterReport"/>
                 <set field="organizationPartyId" from-field="parameters.organizationPartyId"
type="String"/>
+                <!-- Get a default fromDate -->
+                <set field="findLastClosedDateInMap.organizationPartyId" from-field="organizationPartyId"/>
+                <service service-name="findLastClosedDate" in-map-name="findLastClosedDateInMap">
+                    <result-to-field result-name="lastClosedDate"/>
+                    <result-to-field result-name="lastClosedTimePeriod"/>
+                </service>
+                <set field="fromDate" from-field="parameters.fromDate" type="Timestamp"
default-value="${lastClosedDate}"/>
+                <set field="thruDate" from-field="parameters.thruDate" type="Timestamp"
default-value="${nowTimestamp}"/>
+
                 <set field="glAcctgOrgAndCostCenterList" from-field="parameters.glAcctgOrgAndCostCenterList"
type="List"/>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/reports/CostCenters.groovy"/>
             </actions>
@@ -969,7 +986,6 @@
                         <section>
                             <condition>
                                 <or>
-                                    <not><if-empty field="parameters.timePeriod"/></not>
                                     <not><if-empty field="parameters.fromDate"/></not>
                                     <not><if-empty field="glAcctgOrgAndCostCenterMapList"/></not>
                                 </or>



Mime
View raw message