<![CDATA[ SELECT t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t41.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t21.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t31.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM ACCOUNT_TAX t1 LEFT JOIN ACCOUNT_ACCOUNT t11 ON t1.CASH_BASIS_BASE_ACCOUNT_ID = t11.ID LEFT JOIN RES_COMPANY t21 ON t1.COMPANY_ID = t21.ID LEFT JOIN ACCOUNT_TAX_GROUP t31 ON t1.TAX_GROUP_ID = t31.ID LEFT JOIN RES_PARTNER t41 ON t21.PARTNER_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID
WHERE ( t1.TYPE_TAX_USE = 'purchase' )
]]>
</sql>
<!--数据查询[Sale]-->
<sqlid="Sale"databaseId="postgresql">
<![CDATA[ SELECT t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t41.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t81.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t21.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t31.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t61.NAME AS WRITE_UID_TEXT FROM ACCOUNT_TAX t1 LEFT JOIN ACCOUNT_ACCOUNT t11 ON t1.CASH_BASIS_BASE_ACCOUNT_ID = t11.ID LEFT JOIN RES_COMPANY t21 ON t1.COMPANY_ID = t21.ID LEFT JOIN ACCOUNT_TAX_GROUP t31 ON t1.TAX_GROUP_ID = t31.ID LEFT JOIN RES_PARTNER t41 ON t21.PARTNER_ID = t41.ID LEFT JOIN RES_USERS t51 ON t1.WRITE_UID = t51.ID LEFT JOIN RES_PARTNER t61 ON t51.PARTNER_ID = t61.ID LEFT JOIN RES_USERS t71 ON t1.CREATE_UID = t71.ID LEFT JOIN RES_PARTNER t81 ON t71.PARTNER_ID = t81.ID