Fixed issue 28818: Not possible to apply taxes dataset in 2.50 default tip
authorJorge Garcia <jorge.garcia@openbravo.com>
Thu, 19 Feb 2015 15:56:38 +0100
changeset 9922 4a2e9dbecf82
parent 9921 416da0ef63d4
Fixed issue 28818: Not possible to apply taxes dataset in 2.50

This issue is related with the Openbravo ERP 2.50

When installing the 'Taxes: Configuration for Spain (Impuestos para España)'
and trying to apply taxes dataset in the enterprise module management
window this error appears in the window: isCashVat property does not exist.

The solution is to add this column to the core of Openbravo. To match the
Openbravo ERP 3 definition, the definition was copied from that version
and transplanted to the Openbravo ERP 2.50.

This three xml files had changed:
src-db/database/model/tables/C_TAX.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml

In those files, we had set the definition of the new column.

Now, the dataset of the 'Taxes: Configuration for Spain (Impuestos para
España)' is applied correctly in Openbravo 2.50
src-db/database/model/tables/C_TAX.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
--- a/src-db/database/model/tables/C_TAX.xml	Tue Sep 10 11:38:37 2013 +0200
+++ b/src-db/database/model/tables/C_TAX.xml	Thu Feb 19 15:56:38 2015 +0100
@@ -145,6 +145,10 @@
         <default><![CDATA[D]]></default>
         <onCreateDefault/>
       </column>
+      <column name="ISCASHVAT" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="C_COUNTRY" name="C_COUNTRY_C_TAX">
         <reference local="C_COUNTRY_ID" foreign="C_COUNTRY_ID"/>
       </foreign-key>
@@ -182,6 +186,7 @@
         <unique-column name="PARENT_TAX_ID"/>
       </unique>
       <check name="C_TAX_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="C_TAX_ISCASHVAT_WH_CH"><![CDATA[((ISCASHVAT = 'Y') AND (ISWITHHOLDINGTAX = 'N')) OR (ISCASHVAT = 'N')]]></check>
       <check name="C_TAX_ISTAXDEDUCTABLE"><![CDATA[ISTAXDEDUCTABLE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Sep 10 11:38:37 2013 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Feb 19 15:56:38 2015 +0100
@@ -315201,6 +315201,40 @@
 <!--CED586E8663E4BB9A1DCF43DF890868D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--CED586E8663E4BB9A1DCF43DF890868D--></AD_COLUMN>
 
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B--><AD_COLUMN>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_COLUMN_ID><![CDATA[D0C775ACDFFE43E0B9ECE73CEBE31D4B]]></AD_COLUMN_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <NAME><![CDATA[IsCashVAT]]></NAME>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <DESCRIPTION><![CDATA[Cash VAT tax rate]]></DESCRIPTION>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <HELP><![CDATA[Cash VAT tax rate]]></HELP>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <COLUMNNAME><![CDATA[IsCashVAT]]></COLUMNNAME>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_TABLE_ID><![CDATA[261]]></AD_TABLE_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <SEQNO><![CDATA[161]]></SEQNO>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_ELEMENT_ID><![CDATA[87C35496422E4C7CB9AE1C517E320017]]></AD_ELEMENT_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <POSITION><![CDATA[37]]></POSITION>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--D0C775ACDFFE43E0B9ECE73CEBE31D4B--></AD_COLUMN>
+
 <!--D160BFBF2CD74DAEB9FF7C425874E282--><AD_COLUMN>
 <!--D160BFBF2CD74DAEB9FF7C425874E282-->  <AD_COLUMN_ID><![CDATA[D160BFBF2CD74DAEB9FF7C425874E282]]></AD_COLUMN_ID>
 <!--D160BFBF2CD74DAEB9FF7C425874E282-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Sep 10 11:38:37 2013 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Feb 19 15:56:38 2015 +0100
@@ -26995,6 +26995,19 @@
 <!--877E302527991536E040007F010060E9-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--877E302527991536E040007F010060E9--></AD_ELEMENT>
 
+<!--87C35496422E4C7CB9AE1C517E320017--><AD_ELEMENT>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <AD_ELEMENT_ID><![CDATA[87C35496422E4C7CB9AE1C517E320017]]></AD_ELEMENT_ID>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <COLUMNNAME><![CDATA[IsCashVAT]]></COLUMNNAME>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <NAME><![CDATA[Cash VAT]]></NAME>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <PRINTNAME><![CDATA[Cash VAT]]></PRINTNAME>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <DESCRIPTION><![CDATA[Cash VAT tax rate]]></DESCRIPTION>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <HELP><![CDATA[Cash VAT tax rate]]></HELP>
+<!--87C35496422E4C7CB9AE1C517E320017-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--87C35496422E4C7CB9AE1C517E320017--></AD_ELEMENT>
+
 <!--8A19431CC0E020DBE040007F01013CCA--><AD_ELEMENT>
 <!--8A19431CC0E020DBE040007F01013CCA-->  <AD_ELEMENT_ID><![CDATA[8A19431CC0E020DBE040007F01013CCA]]></AD_ELEMENT_ID>
 <!--8A19431CC0E020DBE040007F01013CCA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>