Author: nmalin
Date: Mon Jan 12 22:55:01 2015 New Revision: 1651222 URL: http://svn.apache.org/r1651222 Log: Convert Invoice entites CRUD service from simple to entity-auto (OFBIZ-5957) : convert only updateInvoiceItemType. Clean uneeded space end line. Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1651222&r1=1651221&r2=1651222&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Mon Jan 12 22:55:01 2015 @@ -45,14 +45,14 @@ under the License. <set field="customMethodName" value="invoiceSequenceRestart"/> </if-compare> </else> - </if-not-empty> + </if-not-empty> <if-not-empty field="customMethodName"> <set-service-fields service-name="${customMethodName}" map="parameters" to-map="customMethodMap"/> <set field="customMethodMap.partyAcctgPreference" from-field="partyAcctgPreference"/> <call-service service-name="${customMethodName}" in-map-name="customMethodMap"> <result-to-field result-name="invoiceId" field="invoiceIdTemp"/> - </call-service> + </call-service> <else> <log level="info" message="In createInvoice sequence enum Standard"/> <!-- default to the default sequencing: INVSQ_STANDARD --> @@ -172,7 +172,7 @@ under the License. <if-not-empty field="party.preferredCurrencyUomId"> <set field="parameters.currencyUomId" from-field="party.preferredCurrencyUomId"/> </if-not-empty> - + <set-nonpk-fields map="parameters" value-field="newEntity"/> <set-pk-fields map="parameters" value-field="newEntity"/> <create-value value-field="newEntity"/> @@ -610,12 +610,6 @@ under the License. <field-to-result field="contactMechId" result-name="invoiceContactMech"/> </simple-method> - <simple-method method-name="updateInvoiceItemType" short-description="Updates a InvoiceItemType Record"> - <entity-one entity-name="InvoiceItemType" value-field="lookedUpValue"/> - <set-nonpk-fields value-field="lookedUpValue" map="parameters"/> - <store-value value-field="lookedUpValue"/> - </simple-method> - <simple-method method-name="autoGenerateInvoiceFromExistingInvoice" short-description="Scheduled service to generate Invoice from an existing Invoice"> <entity-and entity-name="Invoice" list="invoices"> <field-map field-name="recurrenceInfoId" from-field="parameters.recurrenceInfoId"/> @@ -640,7 +634,7 @@ under the License. <call-service service-name="updateInvoice" in-map-name="updateInvoiceCtx"/> </iterate> </simple-method> - + <simple-method method-name="cancelInvoice" short-description="Service to cancel the Invoices"> <entity-one entity-name="Invoice" value-field="invoice"/> <if-empty field="invoice"> @@ -697,7 +691,7 @@ under the License. <set field="invoiceRunningTotal" value="${groovy:org.ofbiz.base.util.UtilFormatOut.formatCurrency(runningTotal, currencyUomId, parameters.locale)}"/> <field-to-result field="invoiceRunningTotal"/> </simple-method> - + <simple-method method-name="getInvoicesFilterByAssocType" short-description="Filter invoices by invoiceItemAssocTypeId"> <set field="invoiceList" from-field="parameters.invoiceList"/> <set field="invoiceItemAssocTypeId" from-field="parameters.invoiceItemAssocTypeId"/> @@ -1010,7 +1004,7 @@ under the License. <set-service-fields service-name="updateSimpleTextContent" map="parameters" to-map="updateSimpleText"/> <call-service service-name="updateSimpleTextContent" in-map-name="updateSimpleText"/> </simple-method> - + <simple-method method-name="isInvoiceInForeignCurrency" short-description="check if a invoice is in a foreign currency related to the accounting company."> <entity-one value-field="invoice" entity-name="InvoiceAndType"> <field-map field-name="invoiceId" from-field="parameters.invoiceId"/> @@ -1021,10 +1015,10 @@ under the License. </if-empty> <if-compare field="invoice.parentTypeId" operator="equals" value="PURCHASE_INVOICE"> <set field="pref.organizationPartyId" from-field="invoice.partyId"/> - </if-compare> + </if-compare> <if-compare field="invoice.parentTypeId" operator="equals" value="SALES_INVOICE"> <set field="pref.organizationPartyId" from-field="invoice.partyIdFrom"/> - </if-compare> + </if-compare> <call-service service-name="getPartyAccountingPreferences" in-map-name="pref"> <result-to-field result-name="partyAccountingPreference"/> </call-service> @@ -1036,5 +1030,5 @@ under the License. </if-compare-field> <field-to-result field="isForeign"/> </simple-method> - + </simple-methods> Modified: ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml?rev=1651222&r1=1651221&r2=1651222&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml (original) +++ ofbiz/trunk/applications/accounting/servicedef/services_invoice.xml Mon Jan 12 22:55:01 2015 @@ -298,8 +298,7 @@ under the License. <attribute name="invoicedTotal" type="BigDecimal" mode="OUT" optional="false"/> </service> - <service name="updateInvoiceItemType" engine="simple" default-entity-name="InvoiceItemType" - location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="updateInvoiceItemType"> + <service name="updateInvoiceItemType" default-entity-name="InvoiceItemType" engine="entity-auto" invoke="update"> <description>Update Invoice Item Type Record</description> <auto-attributes mode="IN" include="pk" optional="false"/> <auto-attributes mode="IN" include="nonpk" optional="true"/> @@ -309,14 +308,14 @@ under the License. <description>Scheduled service to generate Invoice from an existing Invoice</description> <attribute name="recurrenceInfoId" mode="IN" type="String" optional="false"/> </service> - + <service name="cancelInvoice" engine="simple" location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="cancelInvoice"> <description>Cancel Invoice</description> <attribute name="invoiceId" type="String" mode="IN" optional="false"/> <attribute name="invoiceTypeId" type="String" mode="OUT" optional="false"/> </service> - + <service name="getInvoiceRunningTotal" engine="simple" location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="getInvoiceRunningTotal" auth="true"> <description>calculate running total for selected Invoices</description> @@ -324,7 +323,7 @@ under the License. <attribute name="organizationPartyId" type="String" mode="IN" optional="true"/> <attribute name="invoiceRunningTotal" type="String" mode="OUT" optional="false"/> </service> - + <service name="addtax" engine="simple" location="component://accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml" invoke="addtax"> <description>Call Tax Calculate Service</description> |
Free forum by Nabble | Edit this page |