src-db/database/model/views/C_INVOICE_PRODMONTH.xml
author Jorge Garcia <jorge.garcia@openbravo.com>
Thu, 19 Feb 2015 15:56:38 +0100
changeset 9922 4a2e9dbecf82
parent 9911 444911e2b851
permissions -rw-r--r--
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
<?xml version="1.0"?>
  <database name="VIEW C_INVOICE_PRODMONTH">
    <view name="C_INVOICE_PRODMONTH"><![CDATA[SELECT il.ad_client_id, il.ad_org_id, il.m_product_category_id, TRUNC(il.dateinvoiced, 'MM') AS dateinvoiced, sum(il.linenetamt) AS linenetamt, sum(il.linelistamt) AS linelistamt, sum(il.linelimitamt) AS linelimitamt, sum(il.linediscountamt) AS linediscountamt, CASE sum(il.linelistamt) WHEN 0 THEN 0 ELSE round((sum(il.linelistamt) - sum(il.linenetamt)) / sum(il.linelistamt) * 100, 2) END AS linediscount, sum(il.lineoverlimitamt) AS lineoverlimitamt, CASE sum(il.linenetamt) WHEN 0 THEN 0 ELSE 100 - round((sum(il.linenetamt) - sum(il.lineoverlimitamt)) / sum(il.linenetamt) * 100, 2) END AS lineoverlimit, sum(il.qtyinvoiced) AS qtyinvoiced FROM c_invoiceline_v2 il GROUP BY il.ad_client_id, il.ad_org_id, il.m_product_category_id, TRUNC(il.dateinvoiced, 'MM')]]></view>
  </database>