Author: jacopoc
Date: Fri Jun 19 10:15:01 2009 New Revision: 786438 URL: http://svn.apache.org/viewvc?rev=786438&view=rev Log: Added support for purpose type for currency rates when entering gl transactions in foreign currencies. Thank you to Sumit Pandit. Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml ofbiz/trunk/applications/accounting/servicedef/services_admin.xml ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml ofbiz/trunk/applications/accounting/widget/GlForms.xml ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml ofbiz/trunk/framework/common/servicedef/services.xml Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/admin/AcctgAdminServices.xml Fri Jun 19 10:15:01 2009 @@ -128,7 +128,9 @@ <!-- now create a new conversion relationship --> <set-service-fields to-map="createParams" service-name="createUomConversionDated" map="parameters"/> - <set from-field="nowTimestamp" field="createParams.fromDate"/> + <if-empty field="parameters.fromDate"> + <set field="createParams.fromDate" from-field="nowTimestamp"/> + </if-empty> <call-service service-name="createUomConversionDated" in-map-name="createParams"/> </simple-method> </simple-methods> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml Fri Jun 19 10:15:01 2009 @@ -96,6 +96,7 @@ <set field="convertUomInMap.originalValue" from-field="newEntity.origAmount" type="BigDecimal"/> <set field="convertUomInMap.uomId" from-field="newEntity.origCurrencyUomId"/> <set field="convertUomInMap.uomIdTo" from-field="newEntity.currencyUomId"/> + <set field="convertUomInMap.purposeEnumId" from-field="parameters.purposeEnumId"/> <!-- TODO: set the optional asOfDate input parameter --> <call-service service-name="convertUom" in-map-name="convertUomInMap"> <result-to-field result-name="convertedValue" field="newEntity.amount"/> Modified: ofbiz/trunk/applications/accounting/servicedef/services_admin.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_admin.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_admin.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_admin.xml Fri Jun 19 10:15:01 2009 @@ -72,6 +72,8 @@ <attribute type="BigDecimal" mode="IN" name="conversionFactor" optional="false"/> <attribute type="String" mode="IN" name="purposeEnumId" optional="true"/> <attribute type="Timestamp" mode="IN" name="asOfTimestamp" optional="true"/> + <attribute name="fromDate" mode="IN" type="Timestamp" optional="true"/> + <attribute name="thruDate" mode="IN" type="Timestamp" optional="true"/> </service> <service name="createGlAccountTypeDefault" engine="entity-auto" default-entity-name="GlAccountTypeDefault" invoke="create" auth="true"> Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Fri Jun 19 10:15:01 2009 @@ -236,6 +236,7 @@ <permission-service service-name="acctgTransactionPermissionCheck" main-action="CREATE"/> <implements service="interfaceAcctgTransEntry"/> <auto-attributes include="pk" mode="IN" optional="false"/> + <attribute name="purposeEnumId" mode="IN" type="String" optional="true"></attribute> <override name="acctgTransEntrySeqId" mode="OUT"/> </service> <service name="updateAcctgTransEntry" default-entity-name="AcctgTransEntry" engine="simple" Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlForms.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlForms.xml Fri Jun 19 10:15:01 2009 @@ -575,6 +575,14 @@ </entity-options> </drop-down> </field> + <field name="purposeEnumId" title="${uiLabelMap.CommonPurpose}"> + <drop-down allow-empty="true"> + <entity-options entity-name="Enumeration" description="${description}" key-field-name="enumId"> + <entity-constraint name="enumTypeId" operator="equals" value="CONVERSION_PURPOSE"/> + <entity-order-by field-name="sequenceId"/> + </entity-options> + </drop-down> + </field> <field name="voucherRef"><text size="30"/></field> <field name="partyId"><text size="30"/></field> <field name="productId"><text size="20"/></field> Modified: ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlSetupForms.xml Fri Jun 19 10:15:01 2009 @@ -333,6 +333,8 @@ </drop-down> </field> <field name="conversionFactor"><text/></field> + <field name="fromDate"><date-time/></field> + <field name="thruDate"><date-time/></field> <field name="submitButton" title="${uiLabelMap.AccountingUpdateFX}"><submit/></field> </form> Modified: ofbiz/trunk/framework/common/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services.xml?rev=786438&r1=786437&r2=786438&view=diff ============================================================================== --- ofbiz/trunk/framework/common/servicedef/services.xml (original) +++ ofbiz/trunk/framework/common/servicedef/services.xml Fri Jun 19 10:15:01 2009 @@ -293,6 +293,7 @@ <attribute name="asOfDate" mode="IN" type="Timestamp" optional="true"/> <attribute name="originalValue" mode="IN" type="BigDecimal" optional="false"/> <attribute name="conversionParameters" mode="IN" type="Map" optional="true"/> + <attribute name="purposeEnumId" mode="IN" type="String" optional="true"/> <attribute name="convertedValue" mode="OUT" type="BigDecimal" optional="true"/> </service> <service name="convertUomCustom" default-entity-name="UomConversion" engine="simple" |
Free forum by Nabble | Edit this page |