You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2014/07/09 11:40:46 UTC

svn commit: r1609066 - in /ofbiz/branches/release13.07: ./ applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

Author: jacopoc
Date: Wed Jul  9 09:40:46 2014
New Revision: 1609066

URL: http://svn.apache.org/r1609066
Log:
Applied fix from trunk for revision: 1609065 
===

Fixed wrong tax adjustment types set by the "addtax" service used by the manual invoice editing screens; thanks to Aswath Satrasala for the bug report in OFBIZ-3255


Modified:
    ofbiz/branches/release13.07/   (props changed)
    ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml

Propchange: ofbiz/branches/release13.07/
------------------------------------------------------------------------------
  Merged /ofbiz/trunk:r1609065

Modified: ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml?rev=1609066&r1=1609065&r2=1609066&view=diff
==============================================================================
--- ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml (original)
+++ ofbiz/branches/release13.07/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml Wed Jul  9 09:40:46 2014
@@ -868,7 +868,12 @@ under the License.
                     <if-not-empty field="itemAdjustment">
                         <iterate list="itemAdjustment" entry="orderAdjustment">
                             <set field="createInvoiceItemContext.invoiceId" from-field="invoice.invoiceId"/>
-                            <set field="createInvoiceItemContext.invoiceItemTypeId" value="ITM_SALES_TAX"/>
+                            <if-compare field="invoice.invoiceTypeId" value="PURCHASE_INVOICE" operator="equals">
+                                <set field="createInvoiceItemContext.invoiceItemTypeId" value="PITM_SALES_TAX"/>
+                            <else>
+                                <set field="createInvoiceItemContext.invoiceItemTypeId" value="ITM_SALES_TAX"/>
+                            </else>
+                            </if-compare>
                             <set field="createInvoiceItemContext.overrideGlAccountId" from-field="orderAdjustment.overrideGlAccountId"/>
                             <set field="createInvoiceItemContext.productId" from-field="itemMap.productList[countItemId]"/>
                             <set field="createInvoiceItemContext.taxAuthPartyId" from-field="orderAdjustment.taxAuthPartyId"/>
@@ -886,7 +891,12 @@ under the License.
                 <iterate list="orderAdjustments" entry="Adjustment">
                     <if-not-empty field="Adjustment">
                         <set field="InvoiceItemContext.invoiceId" from-field="invoice.invoiceId"/>
-                        <set field="InvoiceItemContext.invoiceItemTypeId" value="ITM_SALES_TAX"/>
+                        <if-compare field="invoice.invoiceTypeId" value="PURCHASE_INVOICE" operator="equals">
+                            <set field="InvoiceItemContext.invoiceItemTypeId" value="PITM_SALES_TAX"/>
+                        <else>
+                            <set field="InvoiceItemContext.invoiceItemTypeId" value="ITM_SALES_TAX"/>
+                        </else>
+                        </if-compare>
                         <set field="InvoiceItemContext.overrideGlAccountId" from-field="Adjustment.overrideGlAccountId"/>
                         <set field="InvoiceItemContext.taxAuthPartyId" from-field="Adjustment.taxAuthPartyId"/>
                         <set field="InvoiceItemContext.taxAuthGeoId" from-field="Adjustment.taxAuthGeoId"/>