<![CDATA[select t1.* from (SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t21.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t111.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t31.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t61.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t41.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t91.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 ACCOUNT_ACCOUNT t21 ON t1.CASH_BASIS_ACCOUNT_ID = t21.ID LEFT JOIN RES_COMPANY t31 ON t1.COMPANY_ID = t31.ID LEFT JOIN ACCOUNT_TAX_GROUP t41 ON t1.TAX_GROUP_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t31.PARTNER_ID = t51.ID LEFT JOIN ACCOUNT_ACCOUNT t61 ON t1.REFUND_ACCOUNT_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.CREATE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID ) t1 where id=#{id}]]>
<![CDATA[select t1.* from (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 ) t1 where id=#{id}]]>
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t21.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t111.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t31.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t61.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t41.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t91.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 ACCOUNT_ACCOUNT t21 ON t1.CASH_BASIS_ACCOUNT_ID = t21.ID LEFT JOIN RES_COMPANY t31 ON t1.COMPANY_ID = t31.ID LEFT JOIN ACCOUNT_TAX_GROUP t41 ON t1.TAX_GROUP_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t31.PARTNER_ID = t51.ID LEFT JOIN ACCOUNT_ACCOUNT t61 ON t1.REFUND_ACCOUNT_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.CREATE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID
<![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
]]>
</sql>
<!--数据查询[Purchase]-->
<sqlid="Purchase"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t21.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t111.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t31.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t61.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t41.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t91.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 ACCOUNT_ACCOUNT t21 ON t1.CASH_BASIS_ACCOUNT_ID = t21.ID LEFT JOIN RES_COMPANY t31 ON t1.COMPANY_ID = t31.ID LEFT JOIN ACCOUNT_TAX_GROUP t41 ON t1.TAX_GROUP_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t31.PARTNER_ID = t51.ID LEFT JOIN ACCOUNT_ACCOUNT t61 ON t1.REFUND_ACCOUNT_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.CREATE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID
<![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
]]>
</sql>
<!--数据查询[Sale]-->
<sqlid="Sale"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t21.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t111.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t31.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t61.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t41.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t91.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 ACCOUNT_ACCOUNT t21 ON t1.CASH_BASIS_ACCOUNT_ID = t21.ID LEFT JOIN RES_COMPANY t31 ON t1.COMPANY_ID = t31.ID LEFT JOIN ACCOUNT_TAX_GROUP t41 ON t1.TAX_GROUP_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t31.PARTNER_ID = t51.ID LEFT JOIN ACCOUNT_ACCOUNT t61 ON t1.REFUND_ACCOUNT_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.CREATE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID
<![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
]]>
</sql>
<!--数据查询[View]-->
<sqlid="View"databaseId="postgresql">
<![CDATA[ SELECT t1.ACCOUNT_ID, t71.NAME AS ACCOUNT_ID_TEXT, t1.ACTIVE, t1.AMOUNT, t1.AMOUNT_TYPE, t1.ANALYTIC, t1.CASH_BASIS_ACCOUNT_ID, t21.NAME AS CASH_BASIS_ACCOUNT_ID_TEXT, t1.CASH_BASIS_BASE_ACCOUNT_ID, t11.NAME AS CASH_BASIS_BASE_ACCOUNT_ID_TEXT, t1.COMPANY_ID, t51.NAME AS COMPANY_ID_TEXT, t1.CREATE_DATE, t1.CREATE_UID, t111.NAME AS CREATE_UID_TEXT, t1.DESCRIPTION, t31.TAX_EXIGIBILITY AS HIDE_TAX_EXIGIBILITY, t1.ID, t1.INCLUDE_BASE_AMOUNT, t1.NAME, t1.PRICE_INCLUDE, t1.REFUND_ACCOUNT_ID, t61.NAME AS REFUND_ACCOUNT_ID_TEXT, t1.SEQUENCE, t1.TAX_EXIGIBILITY, t1.TAX_GROUP_ID, t41.NAME AS TAX_GROUP_ID_TEXT, t1.TYPE_TAX_USE, t1.WRITE_DATE, t1.WRITE_UID, t91.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 ACCOUNT_ACCOUNT t21 ON t1.CASH_BASIS_ACCOUNT_ID = t21.ID LEFT JOIN RES_COMPANY t31 ON t1.COMPANY_ID = t31.ID LEFT JOIN ACCOUNT_TAX_GROUP t41 ON t1.TAX_GROUP_ID = t41.ID LEFT JOIN RES_PARTNER t51 ON t31.PARTNER_ID = t51.ID LEFT JOIN ACCOUNT_ACCOUNT t61 ON t1.REFUND_ACCOUNT_ID = t61.ID LEFT JOIN ACCOUNT_ACCOUNT t71 ON t1.ACCOUNT_ID = t71.ID LEFT JOIN RES_USERS t81 ON t1.WRITE_UID = t81.ID LEFT JOIN RES_PARTNER t91 ON t81.PARTNER_ID = t91.ID LEFT JOIN RES_USERS t101 ON t1.CREATE_UID = t101.ID LEFT JOIN RES_PARTNER t111 ON t101.PARTNER_ID = t111.ID
<![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