Author: jacopoc
Date: Mon Jan 2 09:06:54 2012 New Revision: 1226378 URL: http://svn.apache.org/viewvc?rev=1226378&view=rev Log: Fixed tests that were going to fail after the new year switch; with this fix the tests will work until 2020. Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Modified: ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml?rev=1226378&r1=1226377&r2=1226378&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml (original) +++ ofbiz/trunk/applications/accounting/data/DemoGlSetupData.xml Mon Jan 2 09:06:54 2012 @@ -393,16 +393,16 @@ under the License. <VarianceReasonGlAccount organizationPartyId="Company" varianceReasonId="VAR_SAMPLE" glAccountId="625000"/> <!-- Some Sample Time Periods, two Years with Quarters --> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6010" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01" thruDate="2012-01-01" isClosed="N" periodNum="1" periodName="2011"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6011" periodTypeId="FISCAL_QUARTER" fromDate="2011-01-01" thruDate="2011-04-01" isClosed="N" periodNum="2" periodName="2011/Q1" parentPeriodId="6010"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6012" periodTypeId="FISCAL_QUARTER" fromDate="2011-04-01" thruDate="2011-07-01" isClosed="N" periodNum="3" periodName="2011/Q2" parentPeriodId="6010"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6013" periodTypeId="FISCAL_QUARTER" fromDate="2011-07-01" thruDate="2011-10-01" isClosed="N" periodNum="4" periodName="2011/Q3" parentPeriodId="6010"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6014" periodTypeId="FISCAL_QUARTER" fromDate="2011-10-01" thruDate="2012-01-01" isClosed="N" periodNum="5" periodName="2011/Q4" parentPeriodId="6010"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2012-01-01" thruDate="2013-01-01" isClosed="N" periodNum="1" periodName="2012"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6016" periodTypeId="FISCAL_QUARTER" fromDate="2012-01-01" thruDate="2012-04-01" isClosed="N" periodNum="2" periodName="2012/Q1" parentPeriodId="6015"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6017" periodTypeId="FISCAL_QUARTER" fromDate="2012-04-01" thruDate="2012-07-01" isClosed="N" periodNum="3" periodName="2012/Q2" parentPeriodId="6015"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6018" periodTypeId="FISCAL_QUARTER" fromDate="2012-07-01" thruDate="2012-10-01" isClosed="N" periodNum="4" periodName="2012/Q3" parentPeriodId="6015"/> - <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6019" periodTypeId="FISCAL_QUARTER" fromDate="2012-10-01" thruDate="2013-01-01" isClosed="N" periodNum="5" periodName="2012/Q4" parentPeriodId="6015"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6010" periodTypeId="FISCAL_YEAR" fromDate="2010-01-01" thruDate="2011-01-01" isClosed="N" periodNum="1" periodName="2010"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6011" periodTypeId="FISCAL_QUARTER" fromDate="2010-01-01" thruDate="2010-04-01" isClosed="N" periodNum="2" periodName="2010/Q1" parentPeriodId="6010"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6012" periodTypeId="FISCAL_QUARTER" fromDate="2010-04-01" thruDate="2010-07-01" isClosed="N" periodNum="3" periodName="2010/Q2" parentPeriodId="6010"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6013" periodTypeId="FISCAL_QUARTER" fromDate="2010-07-01" thruDate="2010-10-01" isClosed="N" periodNum="4" periodName="2010/Q3" parentPeriodId="6010"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6014" periodTypeId="FISCAL_QUARTER" fromDate="2010-10-01" thruDate="2011-01-01" isClosed="N" periodNum="5" periodName="2010/Q4" parentPeriodId="6010"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01" thruDate="2020-01-01" isClosed="N" periodNum="1" periodName="2011-2020"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6016" periodTypeId="FISCAL_QUARTER" fromDate="2011-01-01" thruDate="2011-04-01" isClosed="N" periodNum="2" periodName="2011/Q1" parentPeriodId="6015"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6017" periodTypeId="FISCAL_QUARTER" fromDate="2011-04-01" thruDate="2011-07-01" isClosed="N" periodNum="3" periodName="2011/Q2" parentPeriodId="6015"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6018" periodTypeId="FISCAL_QUARTER" fromDate="2011-07-01" thruDate="2011-10-01" isClosed="N" periodNum="4" periodName="2011/Q3" parentPeriodId="6015"/> + <CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6019" periodTypeId="FISCAL_QUARTER" fromDate="2011-10-01" thruDate="2012-01-01" isClosed="N" periodNum="5" periodName="2011/Q4" parentPeriodId="6015"/> <!-- to convert demo invoice --> <UomConversionDated uomId="USD" uomIdTo="EUR" fromDate="2001-01-01 00:00:00.0" conversionFactor="0.7"/> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml?rev=1226378&r1=1226377&r2=1226378&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoInvoiceTests.xml Mon Jan 2 09:06:54 2012 @@ -173,19 +173,23 @@ under the License. * ACCOUNTS PAYABLE 210000 - debitTotal $351.41 ; creditTotal:$1651.7 ; debitCreditDifference : $ -1300 * UNINVOICED ITEM RECEIPTS 214000 - debitTotal :$408 ; creditTotal:$96 ; debitCreditDifference : $312 --> - - <!-- IF EVER THIS TEST FAILS WITH NO REASONS (notably when passing to 2020), - CHECK THIS MAIL http://markmail.org/message/m34hv2rv6lululuo - (if it still exist, else looks for "the failure could be related to the year switch" on the Net) - --> - <entity-one entity-name="UserLogin" value-field="userLogin"> <field-map field-name="userLoginId" value="system"/> </entity-one> + + <now-timestamp field="nowTimestamp"/> + <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/> + <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/> + <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/> + <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap"> + <result-to-field result-name="customTimePeriodList"/> + </call-service> + <first-from-list list="customTimePeriodList" entry="customTimePeriod"/> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2012-01-01 16:55:01.0" type="Timestamp"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2012-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/> <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/> <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> <result-to-field result-name="debitTotal" field="payableDebitTotal"/> @@ -250,10 +254,20 @@ under the License. <entity-one entity-name="UserLogin" value-field="userLogin"> <field-map field-name="userLoginId" value="system"/> </entity-one> + + <now-timestamp field="nowTimestamp"/> + <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/> + <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/> + <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/> + <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap"> + <result-to-field result-name="customTimePeriodList"/> + </call-service> + <first-from-list list="customTimePeriodList" entry="customTimePeriod"/> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2012-01-01 16:55:01.0" type="Timestamp"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2012-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/> <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/> <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> <result-to-field result-name="debitTotal" field="payableDebitTotal"/> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml?rev=1226378&r1=1226377&r2=1226378&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/test/AutoPaymentTests.xml Mon Jan 2 09:06:54 2012 @@ -348,10 +348,20 @@ under the License. <entity-one entity-name="UserLogin" value-field="userLogin"> <field-map field-name="userLoginId" value="system"/> </entity-one> + + <now-timestamp field="nowTimestamp"/> + <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/> + <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/> + <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/> + <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap"> + <result-to-field result-name="customTimePeriodList"/> + </call-service> + <first-from-list list="customTimePeriodList" entry="customTimePeriod"/> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2012-01-01 16:55:01.0" type="Timestamp"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2012-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/> <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="120000"/> <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> <result-to-field result-name="debitTotal" field="receivableDebitTotal"/> @@ -420,10 +430,20 @@ under the License. <entity-one entity-name="UserLogin" value-field="userLogin"> <field-map field-name="userLoginId" value="system"/> </entity-one> + + <now-timestamp field="nowTimestamp"/> + <set field="findCustomTimePeriodsMap.userLogin" from-field="userLogin"/> + <set field="findCustomTimePeriodsMap.findDate" from-field="nowTimestamp" type="Timestamp"/> + <set field="findCustomTimePeriodsMap.organizationPartyId" value="Company"/> + <call-service service-name="findCustomTimePeriods" in-map-name="findCustomTimePeriodsMap"> + <result-to-field result-name="customTimePeriodList"/> + </call-service> + <first-from-list list="customTimePeriodList" entry="customTimePeriod"/> + <set field="getAcctgTransEntriesAndTransTotalMap.userLogin" from-field="userLogin"/> <set field="getAcctgTransEntriesAndTransTotalMap.organizationPartyId" value="Company"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" value="2012-01-01 16:55:01.0" type="Timestamp"/> - <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" value="2012-12-31 16:55:01.0" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodStartDate" from-field="customTimePeriod.fromDate" type="Timestamp"/> + <set field="getAcctgTransEntriesAndTransTotalMap.customTimePeriodEndDate" from-field="customTimePeriod.thruDate" type="Timestamp"/> <set field="getAcctgTransEntriesAndTransTotalMap.glAccountId" value="210000"/> <call-service service-name="getAcctgTransEntriesAndTransTotal" in-map-name="getAcctgTransEntriesAndTransTotalMap"> <result-to-field result-name="debitTotal" field="payableDebitTotal"/> |
Free forum by Nabble | Edit this page |