svn commit: r719715 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r719715 - in /ofbiz/trunk/applications/accounting: config/AccountingUiLabels.xml script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml

jleroux@apache.org
Author: jleroux
Date: Fri Nov 21 13:09:15 2008
New Revision: 719715

URL: http://svn.apache.org/viewvc?rev=719715&view=rev
Log:
This was annoying
+ a comment on a change that will come later

Modified:
    ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml

Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=719715&r1=719714&r2=719715&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original)
+++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Fri Nov 21 13:09:15 2008
@@ -6445,6 +6445,10 @@
         <value xml:lang="th">กลุ่มภาษี</value>
         <value xml:lang="zh">税务机关会员</value>
     </property>
+    <property key="AccountingTaxAuthorityRateProductUseThisProductCategory">
+        <value xml:lang="en">At least one Product Rate uses this Category</value>
+        <value xml:lang="fr">Au moins un taux applicable aux produits utilise cette catégorie</value>
+    </property>    
     <property key="AccountingTaxSummary">
         <value xml:lang="ar">تقرير ملخص الضريبة</value>
         <value xml:lang="en">Tax Summary Report</value>

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml?rev=719715&r1=719714&r2=719715&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/tax/TaxAuthorityServices.xml Fri Nov 21 13:09:15 2008
@@ -105,8 +105,20 @@
         <check-permission permission="ACCOUNTING" action="${securityAction}"><fail-property resource="AccountingUiLabels" property="AccountingPermissionError"/></check-permission>
         <check-errors/>
         
-        <entity-one entity-name="TaxAuthorityCategory" value-name="lookedUpValue"/>
-        <remove-value value-name="lookedUpValue"/>
+        <set field="taxAuthorityRateProductMap.taxAuthGeoId" from-field="parameters.taxAuthGeoId"/>
+        <set field="taxAuthorityRateProductMap.taxAuthPartyId" from-field="parameters.taxAuthPartyId"/>
+        <set field="taxAuthorityRateProductMap.productCategoryId" from-field="parameters.productCategoryId"/>
+        <find-by-and entity-name="TaxAuthorityRateProduct" map-name="taxAuthorityRateProductMap" list-name="taxAuthorityRateProductList"/>
+        <if-empty field="taxAuthorityRateProductList">
+            <entity-one entity-name="TaxAuthorityCategory" value-name="lookedUpValue"/>
+            <remove-value value-name="lookedUpValue"/>
+            <else>
+                <add-error>
+                    <fail-property resource="AccountingUiLabels" property="AccountingTaxAuthorityRateProductUseThisProductCategory"/>
+                </add-error>
+            </else>
+        </if-empty>
+        <check-errors/>
     </simple-method>
     
     <!-- TaxAuthorityGlAccount methods -->
@@ -202,6 +214,7 @@
     </simple-method>
     <simple-method method-name="validatePartyTaxIdInline" short-description="validatePartyTaxIdInline">
         <!-- validate the partyTaxId based on TaxAuthority.taxIdFormatPattern if not empty -->
+        <!-- If the party validated is in the UE, we could to a better job using the SOAP service from http://ec.europa.eu/taxation_customs/vies/faqvies.do#item16 -->  
         <entity-one entity-name="TaxAuthority" value-name="taxAuthority"/>
         <if>
             <condition>