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:13 UTC
svn commit: r1609065 -
/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.xml
Author: jacopoc
Date: Wed Jul 9 09:40:13 2014
New Revision: 1609065
URL: http://svn.apache.org/r1609065
Log:
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/trunk/applications/accounting/script/org/ofbiz/accounting/invoice/InvoiceServices.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=1609065&r1=1609064&r2=1609065&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 Wed Jul 9 09:40:13 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"/>