acr_invoice_hd_v.lwm 20.6 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2
<?xml version="1.0" encoding="UTF-8"?>
<!--
3 4 5 6
    $Author: DJ
    $Date: 2013-9-2 上午10:16:09
    $Revision: 1.0
    $Purpose:
Spencer Chang's avatar
Spencer Chang committed
7 8 9 10 11 12
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1"
          baseTable="ACR_INVOICE_HD_V" defaultOrderBy="">
    <bm:fields>
        <bm:field name="invoice_hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_HD_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
        <bm:field name="document_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_NUMBER" prompt="HLS.DOCUMENT_NUMBER"/>
        <bm:field name="document_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE" prompt="HLS.DOCUMENT_TYPE"/>
        <bm:field name="document_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_TYPE_DESC" prompt="HLS.DOCUMENT_TYPE_DESC"/>
        <bm:field name="document_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY" prompt="HLS.DOCUMENT_CATEGORY"/>
        <bm:field name="document_category_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DOCUMENT_CATEGORY_DESC" prompt="HLS.DOCUMENT_CATEGORY_DESC"/>
        <bm:field name="business_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE" prompt="HLS.BUSINESS_TYPE"/>
        <bm:field name="business_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BUSINESS_TYPE_DESC" prompt="HLS.BUSINESS_TYPE_DESC"/>
        <bm:field name="billing_method" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BILLING_METHOD" prompt="ACR.BILLING_METHOD"/>
        <bm:field name="billing_method_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BILLING_METHOD_DESC" prompt="ACR.BILLING_METHOD_DESC"/>
        <bm:field name="lease_organization" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION" prompt="HLS.LEASE_ORGANIZATION"/>
        <bm:field name="lease_organization_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ORGANIZATION_DESC" prompt="HLS.LEASE_ORGANIZATION_DESC"/>
        <bm:field name="lease_channel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL" prompt="HLS.LEASE_CHANNEL"/>
        <bm:field name="lease_channel_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_CHANNEL_DESC" prompt="HLS.LEASE_CHANNEL_DESC"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="HLS.DIVISION"/>
        <bm:field name="division_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION_DESC" prompt="HLS.DIVISION_DESC"/>
        <bm:field name="manual_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="MANUAL_INVOICE_FLAG" prompt="ACR.MANUAL_INVOICE_FLAG"/>
Spencer Chang's avatar
Spencer Chang committed
29
        <bm:field name="invoice_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_BP_ID"/>
30 31 32 33 34 35 36 37 38
        <bm:field name="invoice_bp_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_BP_CODE" prompt="ACR.INVOICE_BP_CODE"/>
        <bm:field name="invoice_bp_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_BP_NAME" prompt="ACR.INVOICE_BP_NAME"/>
        <bm:field name="invoice_title" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_TITLE" prompt="ACR.INVOICE_TITLE"/>
        <bm:field name="bp_tax_registry_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_TAX_REGISTRY_NUM" prompt="ACR.BP_TAX_REGISTRY_NUM"/>
        <bm:field name="bp_address_phone_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_ADDRESS_PHONE_NUM" prompt="ACR.BP_ADDRESS_PHONE_NUM"/>
        <bm:field name="bp_bank_account" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BP_BANK_ACCOUNT" prompt="ACR.BP_BANK_ACCOUNT"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DESCRIPTION"/>
        <bm:field name="total_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_AMOUNT" prompt="ACR.TOTAL_AMOUNT"/>
        <bm:field name="tax_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TAX_AMOUNT" prompt="ACR.TAX_AMOUNT"/>
39 40
        <bm:field name="return_tax_amount" databaseType="NUMBER" datatype="java.lang.Double"  prompt="金税返回税额"/>
        <bm:field name="dif_tax_amount"  prompt="税额差"/>
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
        <bm:field name="net_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="NET_AMOUNT" prompt="不含税金额"/>
        <bm:field name="currency" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY" prompt="HLS.CURRENCY"/>
        <bm:field name="currency_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_DESC" prompt="HLS.CURRENCY_DESC"/>
        <bm:field name="exchange_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE" prompt="HLS.EXCHANGE_RATE_TYPE"/>
        <bm:field name="exchange_rate_type_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_TYPE_DESC" prompt="HLS.EXCHANGE_RATE_TYPE_DESC"/>
        <bm:field name="exchange_rate_quotation" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXCHANGE_RATE_QUOTATION" prompt="ACR.EXCHANGE_RATE_QUOTATION"/>
        <bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
        <bm:field name="distribution_set_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISTRIBUTION_SET_ID"/>
        <bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM" prompt="ACR.INTERNAL_PERIOD_NUM"/>
        <bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME" prompt="HLS.PERIOD_NAME"/>
        <bm:field name="accounting_date" databaseType="DATE" datatype="java.util.Date" physicalName="ACCOUNTING_DATE" prompt="ACR.ACCOUNTING_DATE"/>
        <bm:field name="invoice_date" databaseType="DATE" datatype="java.util.Date" physicalName="INVOICE_DATE" prompt="ACR.INVOICE_DATE"/>
        <bm:field name="invoice_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_NUMBER" prompt="ACR.INVOICE_NUMBER"/>
        <bm:field name="invoice_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_STATUS" prompt="ACR.INVOICE_STATUS"/>
        <bm:field name="invoice_status_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_STATUS_DESC" prompt="ACR.INVOICE_STATUS"/>
Spencer Chang's avatar
Spencer Chang committed
56
        <bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
57 58
        <bm:field name="project_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NUMBER" prompt="HLS.PROJECT_NUMBER"/>
        <bm:field name="project_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROJECT_NAME" prompt="HLS.PROJECT_NAME"/>
Spencer Chang's avatar
Spencer Chang committed
59
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
60 61 62 63 64 65 66
        <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NUMBER" prompt="HLS.CONTRACT_NUMBER"/>
        <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONTRACT_NAME" prompt="HLS.CONTRACT_NAME"/>
        <bm:field name="reversed_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REVERSED_FLAG" prompt="ACR.REVERSED_FLAG"/>
        <bm:field name="source_invoice_header_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SOURCE_INVOICE_HEADER_ID"/>
        <bm:field name="create_je_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATE_JE_FLAG" prompt="ACR.CREATE_JE_FLAG"/>
        <bm:field name="gld_interface_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="GLD_INTERFACE_FLAG" prompt="ACR.GLD_INTERFACE_FLAG"/>
        <bm:field name="confirmed_date" databaseType="DATE" datatype="java.util.Date" physicalName="CONFIRMED_DATE" prompt="ACR.CONFIRMED_DATE"/>
Spencer Chang's avatar
Spencer Chang committed
67
        <bm:field name="confirmed_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIRMED_BY"/>
68 69
        <bm:field name="confirmed_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CONFIRMED_BY_NAME" prompt="ACR.CONFIRMED_BY_NAME"/>
        <bm:field name="posted_date" databaseType="DATE" datatype="java.util.Date" physicalName="POSTED_DATE" prompt="ACR.POSTED_DATE"/>
Spencer Chang's avatar
Spencer Chang committed
70
        <bm:field name="posted_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POSTED_BY"/>
71 72 73 74 75
        <bm:field name="posted_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="POSTED_BY_NAME" prompt="ACR.POSTED_BY_NAME"/>
        <bm:field name="created_by_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CREATED_BY_NAME" prompt="ACR.CREATED_BY_NAME"/>
        <bm:field name="invoice_kind" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND" prompt="ACR.INVOICE_KIND"/>
        <bm:field name="invoice_kind_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_DESC" prompt="ACR.INVOICE_KIND_DESC"/>
        <bm:field name="vat_interface_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS" prompt="ACR.VAT_INTERFACE_STATUS"/>
76
        <bm:field name="vat_interface_status_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS_DESC" prompt="金税状态"/>
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
        <bm:field name="vat_invoice_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INVOICE_CODE" prompt="ACR.VAT_INVOICE_CODE"/>
        <bm:field name="vat_invoice_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INVOICE_STATUS"/>
        <bm:field name="vat_red_notice_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_RED_NOTICE_NUM"/>
        <bm:field name="ref_vat_invoice_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_VAT_INVOICE_CODE"/>
        <bm:field name="ref_invoice_number" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_INVOICE_NUMBER"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="ACR_INVOICE_HD_V.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="ACR_INVOICE_HD_V.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="ACR_INVOICE_HD_V.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="ACR_INVOICE_HD_V.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="ACR_INVOICE_HD_V.REF_V05"/>
        <bm:field name="ref_v06" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V06" prompt="ACR_INVOICE_HD_V.REF_V06"/>
        <bm:field name="ref_v07" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V07" prompt="ACR_INVOICE_HD_V.REF_V07"/>
        <bm:field name="ref_v08" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V08" prompt="ACR_INVOICE_HD_V.REF_V08"/>
        <bm:field name="ref_v09" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V09" prompt="ACR_INVOICE_HD_V.REF_V09"/>
        <bm:field name="ref_v10" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V10" prompt="ACR_INVOICE_HD_V.REF_V10"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="ACR_INVOICE_HD_V.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="ACR_INVOICE_HD_V.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="ACR_INVOICE_HD_V.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="ACR_INVOICE_HD_V.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="ACR_INVOICE_HD_V.REF_N05"/>
        <bm:field name="ref_n06" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N06" prompt="ACR_INVOICE_HD_V.REF_N06"/>
        <bm:field name="ref_n07" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N07" prompt="ACR_INVOICE_HD_V.REF_N07"/>
        <bm:field name="ref_n08" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N08" prompt="ACR_INVOICE_HD_V.REF_N08"/>
        <bm:field name="ref_n09" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N09" prompt="ACR_INVOICE_HD_V.REF_N09"/>
        <bm:field name="ref_n10" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N10" prompt="ACR_INVOICE_HD_V.REF_N10"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="ACR_INVOICE_HD_V.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="ACR_INVOICE_HD_V.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="ACR_INVOICE_HD_V.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="ACR_INVOICE_HD_V.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="ACR_INVOICE_HD_V.REF_D05"/>
Spencer Chang's avatar
Spencer Chang committed
107
        <bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID"/>
108 109 110 111 112
        <bm:field name="owner_user_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="OWNER_USER_NAME" prompt="ACR.OWNER_USER_NAME"/>
        <bm:field name="express_date" databaseType="DATE" datatype="java.util.Date" physicalName="EXPRESS_DATE" prompt="ACR.EXPRESS_DATE"/>
        <bm:field name="express_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPRESS_STATUS" prompt="ACR.EXPRESS_STATUS"/>
        <bm:field name="express_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPRESS_NUM" prompt="ACR.EXPRESS_NUM"/>
        <bm:field name="express_company" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPRESS_COMPANY" prompt="ACR.EXPRESS_COMPANY"/>
Spencer Chang's avatar
Spencer Chang committed
113
        <bm:field name="express_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPRESS_BY"/>
114 115
        <bm:field name="express_note" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPRESS_NOTE" prompt="ACR.EXPRESS_NOTE"/>
        <bm:field name="billing_way_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="billing_way_desc" prompt="开票方式"/>
116 117 118 119
        <bm:field name="invoice_apply_num" expression="(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw  where ap.wfl_apply_status='APPROVED' and ap.apply_mode='APPLY' and ap.invoice_apply_id=aw.invoice_apply_id
and aw.invoice_hd_id=t1.invoice_hd_id)"/>
        <bm:field name="invoice_apply_id" expression="(select ap.invoice_apply_id from acr_invoice_apply ap, acr_invoice_hd_wfl aw  where ap.wfl_apply_status='APPROVED' and ap.apply_mode='APPLY' and ap.invoice_apply_id=aw.invoice_apply_id
and aw.invoice_hd_id=t1.invoice_hd_id)"/>
120
 <bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type" prompt="发票种类"/>
121
        <bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/>
Spencer Chang's avatar
Spencer Chang committed
122 123 124 125 126 127 128 129
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="document_number_f" queryExpression="t1.document_number &gt;= ${@document_number_f}"/>
        <bm:query-field name="document_number_t" queryExpression="t1.document_number &lt;= ${@document_number_t}"/>
        <bm:query-field name="contract_number_f" queryExpression="t1.contract_number &gt;= ${@contract_number_f}"/>
        <bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
        <bm:query-field name="invoice_number_f" queryExpression="t1.invoice_number &gt;= ${@invoice_number_f}"/>
        <bm:query-field name="invoice_number_t" queryExpression="t1.invoice_number &lt;= ${@invoice_number_t}"/>
130 131 132 133
        <bm:query-field name="invoice_date_f" queryExpression="t1.invoice_date &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="invoice_date_t" queryExpression="t1.invoice_date &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="accounting_date_f" queryExpression="t1.accounting_date &gt;= to_date(${@accounting_date_f},&apos;yyyy-mm-dd&apos;)"/>
        <bm:query-field name="accounting_date_t" queryExpression="t1.accounting_date &lt;= to_date(${@accounting_date_t},&apos;yyyy-mm-dd&apos;)"/>
Spencer Chang's avatar
Spencer Chang committed
134 135 136 137 138 139
        <bm:query-field name="total_amount_f" queryExpression="t1.total_amount &gt;= ${@total_amount_f}"/>
        <bm:query-field name="total_amount_t" queryExpression="t1.total_amount &lt;= ${@total_amount_t}"/>
        <bm:query-field name="invoice_bp_code_f" queryExpression="t1.invoice_bp_code &gt;= ${@invoice_bp_code_f}"/>
        <bm:query-field name="invoice_bp_code_t" queryExpression="t1.invoice_bp_code &lt;= ${@invoice_bp_code_t}"/>
        <bm:query-field name="currency" queryExpression="t1.currency = ${@currency}"/>
        <bm:query-field name="invoice_status" queryExpression="t1.invoice_status = ${@invoice_status}"/>
140
        <bm:query-field name="vat_interface_status" queryExpression="t1.vat_interface_status = ${@vat_interface_status}"/>
Spencer Chang's avatar
Spencer Chang committed
141 142 143 144
        <bm:query-field name="business_type" queryExpression="t1.business_type = ${@business_type}"/>
        <bm:query-field name="invoice_kind" queryExpression="t1.invoice_kind = ${@invoice_kind}"/>
        <bm:query-field name="invoice_title" queryExpression="t1.invoice_title like ${@invoice_title}"/>
        <bm:query-field name="created_by" queryExpression="t1.created_by = ${@created_by}"/>
145
        <bm:query-field name="received_flag" queryExpression="(nvl(t1.express_status,&apos;UNDELIVERED&apos;) !=&apos;RECEIVED&apos; or ${@received_flag}=&apos;Y&apos;)"/>
Spencer Chang's avatar
Spencer Chang committed
146 147
        <bm:query-field name="express_status" queryExpression="t1.express_status = ${@express_status}"/>
        <bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/>
148 149
        <bm:query-field name="query_contract_number" queryExpression="exists     (select 1            from hls_document_flow_all_v df, con_contract cc           where df.contract_id = cc.contract_id             and df.ar_invoice_hd_id = t1.invoice_hd_id             and cc.contract_number between nvl(${@contract_number_f}, cc.contract_number) and nvl(${@contract_number_t}, cc.contract_number))"/>
        <bm:query-field name="query_project_number" queryExpression="exists     (select 1           from hls_document_flow_all_v df, prj_project pp          where df.ar_invoice_hd_id = t1.invoice_hd_id            and df.project_id = pp.project_id            and pp.project_number between nvl(${@project_number_f}, pp.project_number) and nvl(${@project_number_t}, pp.project_number))"/>
150 151
        <bm:query-field name="invoice_apply_num" queryExpression="${@invoice_apply_num}=(select ap.invoice_apply_num from acr_invoice_apply ap, acr_invoice_hd_wfl aw  where ap.wfl_apply_status='APPROVED' and ap.apply_mode='APPLY' and ap.invoice_apply_id=aw.invoice_apply_id
and aw.invoice_hd_id=t1.invoice_hd_id)"/>
152
        <bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
Spencer Chang's avatar
Spencer Chang committed
153 154 155

    </bm:query-fields>
    <bm:data-filters>
156 157 158
        <bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id} and t1.reversed_flag = &apos;N&apos;"/>
        <bm:data-filter enforceOperations="query" expression="(t1.invoice_status=&apos;CONFIRM&apos; OR t1.invoice_status=&apos;POST&apos;)"/>
        <bm:data-filter enforceOperations="query" expression="(t1.invoice_kind = &apos;0&apos; or t1.invoice_kind = &apos;2&apos;)"/>
Spencer Chang's avatar
Spencer Chang committed
159 160 161 162 163
    </bm:data-filters>
    <bm:features>
        <f:standard-who/>
    </bm:features>
</bm:model>