Commit 8438c40e authored by lizhe's avatar lizhe

申报月份

parent a3a14de7
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-9-2 上午10:16:09
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="acr630_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"/>
<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"/>
<bm:field name="invoice_bp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INVOICE_BP_ID"/>
<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"/>
<bm:field name="return_tax_amount" databaseType="NUMBER" datatype="java.lang.Double" prompt="金税返回税额"/>
<bm:field name="dif_tax_amount" prompt="税额差"/>
<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"/>
<bm:field name="project_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PROJECT_ID"/>
<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"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID"/>
<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"/>
<bm:field name="confirmed_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONFIRMED_BY"/>
<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"/>
<bm:field name="posted_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="POSTED_BY"/>
<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"/>
<bm:field name="vat_interface_status_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS_DESC" prompt="金税状态"/>
<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"/>
<bm:field name="owner_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="OWNER_USER_ID"/>
<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"/>
<bm:field name="express_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPRESS_BY"/>
<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="开票方式"/>
<bm:field name="invoice_apply_num" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="invoice_apply_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type" prompt="发票种类"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="invoice_kind_type_n" prompt="发票种类"/>
<bm:field name="full_elec_invoice_flag" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="full_elec_invoice_flag_n" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="je_month" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="je_sbo" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="line_total_amount" databaseType="NUMBER" datatype="java.lang.Double" prompt="现金流金额"/>
<bm:field name="line_tax_amount" databaseType="NUMBER" datatype="java.lang.Double" prompt="现金流税额"/>
<bm:field name="line_net_amount" databaseType="NUMBER" datatype="java.lang.Double" prompt="现金流不含税金额"/>
<bm:field name="je_num" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="je_month_f" queryExpression="t1.je_month &gt;= ${@je_month_f}"/>
<bm:query-field name="je_month_t" queryExpression="t1.je_month &lt;= ${@je_month_t}"/>
<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}"/>
<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;)"/>
<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}"/>
<bm:query-field name="vat_interface_status" queryExpression="t1.vat_interface_status = ${@vat_interface_status}"/>
<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}"/>
<bm:query-field name="received_flag" queryExpression="(nvl(t1.express_status,&apos;UNDELIVERED&apos;) !=&apos;RECEIVED&apos; or ${@received_flag}=&apos;Y&apos;)"/>
<bm:query-field name="express_status" queryExpression="t1.express_status = ${@express_status}"/>
<bm:query-field name="confirmed_by" queryExpression="t1.confirmed_by = ${@confirmed_by}"/>
<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))"/>
<bm:query-field name="invoice_apply_num" queryExpression="( exists(select 1 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 and ap.invoice_apply_num=${@invoice_apply_num}) or exists(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 = 'REVERSE' and ap.invoice_apply_id = aw.invoice_apply_id and aw.invoice_hd_id = t1.source_invoice_header_id and ap.invoice_apply_num=${@invoice_apply_num}) )"/>
<bm:query-field name="invoice_kind_type" queryExpression="t1.invoice_kind_type = ${@invoice_kind_type}"/>
<bm:query-field name="full_elec_invoice_flag" queryExpression="t1.full_elec_invoice_flag = ${@full_elec_invoice_flag}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t1.company_id = ${/session/@company_id} and t1.reversed_flag in( &apos;N&apos;,&apos;O&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;)"/>
</bm:data-filters>
<bm:features>
<f:standard-who/>
</bm:features>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-7-18 上午09:34:43
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true"
trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="acr630_currency_list"/>
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list"
rootPath="acr630_business_type_list"/>
</a:init-procedure>
<a:view>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script><![CDATA[
function acr630_invoice_query() {
$('acr630_invoiceVatDs').query();
}
function acr630_invoice_refresh() {
var ds = $('acr630_invoiceVatDs');
ds.query(ds.currentPage);
}
function acr630_invoice_reset() {
$('acr630_invoiceVatParaDs').reset();
}
function onUpdate_acr630_invoiceVatParaDs(ds, record, name, value, oldVlaue) {
if (name == 'document_number_f') {
if (Leaf.isEmpty(record.get('document_number_t'))) {
record.set('document_number_t', value);
}
} else if (name == 'project_number_f') {
if (Leaf.isEmpty(record.get('project_number_t'))) {
record.set('project_number_t', value);
}
} else if (name == 'invoice_number_f') {
if (Leaf.isEmpty(record.get('invoice_number_t'))) {
record.set('invoice_number_t', value);
}
} else if (name == 'contract_number_f') {
if (Leaf.isEmpty(record.get('contract_number_t'))) {
record.set('contract_number_t', value);
}
} else if (name == 'invoice_bp_code_f') {
if (Leaf.isEmpty(record.get('invoice_bp_code_t'))) {
record.set('invoice_bp_code_t', value);
}
} else if (name == 'total_amount_f') {
if (Leaf.isEmpty(record.get('total_amount_t'))) {
record.set('total_amount_t', value);
}
}else if (name == 'je_month_f') {
if (Leaf.isEmpty(record.get('je_month_t'))) {
record.set('je_month_t', value);
}
}
}
function onSubmitSuccess_acr630_invoiceVatDs(ds) {
acr630_invoice_refresh();
}
function summaryRenderer(datas, name) {
var sum = 0;
var sum1 = 0;
var sum2 = 0;
var sum3 = 0;
var sum4 = 0;
var sum5 = 0;
if (name == "invoice_title") {
return '合计:<font color="red"></font>';
}
if (name == "total_amount") {
for (var i = 0; i < datas.length; i++) {
var record = datas[i];
var payment_amount_vl = record.get("total_amount");
var payment_amount = parseFloat(payment_amount_vl);
if (!isNaN(payment_amount)) {
sum += payment_amount;
}
}
return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
}
if (name == "tax_amount") {
for (var j = 0; j < datas.length; j++) {
var record1 = datas[j];
var payment_amount_vl1 = record1.get("tax_amount");
var payment_amount1 = parseFloat(payment_amount_vl1);
if (!isNaN(payment_amount1)) {
sum1 += payment_amount1;
}
}
return '<font color="red">' + Leaf.formatNumber(sum1, 2) + '</font>';
}
if (name == "net_amount") {
for (var k = 0; k < datas.length; k++) {
var record2 = datas[k];
var payment_amount_vl2 = record2.get("net_amount");
var payment_amount2 = parseFloat(payment_amount_vl2);
if (!isNaN(payment_amount2)) {
sum2 += payment_amount2;
}
}
return '<font color="red">' + Leaf.formatNumber(sum2, 2) + '</font>';
}
if (name == "line_total_amount") {
for (var m = 0; m < datas.length; m++) {
var record3 = datas[m];
var payment_amount_vl3 = record3.get("line_total_amount");
var payment_amount3 = parseFloat(payment_amount_vl3);
if (!isNaN(payment_amount3)) {
sum3 += payment_amount3;
}
}
return '<font color="red">' + Leaf.formatNumber(sum3, 2) + '</font>';
}
if (name == "line_tax_amount") {
for (var n = 0; n < datas.length; n++) {
var record4 = datas[n];
var payment_amount_vl4 = record4.get("line_tax_amount");
var payment_amount4 = parseFloat(payment_amount_vl4);
if (!isNaN(payment_amount4)) {
sum4 += payment_amount4;
}
}
return '<font color="red">' + Leaf.formatNumber(sum4, 2) + '</font>';
}
if (name == "line_net_amount") {
for (var s = 0; s < datas.length; s++) {
var record5 = datas[s];
var payment_amount_vl5 = record5.get("line_net_amount");
var payment_amount5 = parseFloat(payment_amount_vl5);
if (!isNaN(payment_amount5)) {
sum5 += payment_amount5;
}
}
return '<font color="red">' + Leaf.formatNumber(sum5, 2) + '</font>';
}
}
function open_document_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'ACR513';
param['document_id'] = record.get('invoice_hd_id');
param['function_usage'] = 'QUERY';
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr513_invoice_readonly_page', 'acr630_invoiceVatDs');
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number' && value) {
return '<a href="javascript:open_document_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}
return value;
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<!--<a:dataSet id="acr630_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>-->
<a:dataSet id="acr630_invoiceKindDs" lookupCode="ACR512_INVOICE_KIND_TYPE"/>
<a:dataSet id="acr630_invoiceStatusDs" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="overdue_status_ds" lookupCode="YES_NO"/>
<a:dataSet id="acr630_express_status_ds" lookupCode="ACR518_EXPRESS_STATUS"/>
<a:dataSet id="acr630_vat_interface_status_ds" lookupCode="ACR515_VAT_INTERFACE_STATUS"/>
<a:dataSet id="acr630_businessTypeDs">
<a:datas dataSource="/model/acr630_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr630_currencyDs">
<a:datas dataSource="/model/acr630_currency_list"/>
</a:dataSet>
<a:dataSet id="acr630_invoiceVatParaDs" autoCreate="true" model="acr.ACR630.acr630_invoice_hd_v">
<a:fields>
<a:field name="currency_desc" displayField="currency_name" options="acr630_currencyDs"
returnField="currency" valueField="currency_code"/>
<!--<a:field name="invoice_kind"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr630_invoiceKindDs"
returnField="invoice_kind" valueField="code_value"/>-->
<a:field name="invoice_kind_type"/>
<a:field name="invoice_kind_type_n" displayField="code_value_name" options="acr630_invoiceKindDs"
returnField="invoice_kind_type" valueField="code_value"/>
<a:field name="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="full_elec_invoice_flag" valueField="code_value"/>
<a:field name="invoice_status_desc" displayField="code_value_name" options="acr630_invoiceStatusDs"
returnField="invoice_status" valueField="code_value"/>
<a:field name="vat_interface_status" defaultValue="UNTRANSFERED"/>
<a:field name="vat_interface_status_desc" defaultValue="未传金税" displayField="code_value_name"
options="acr630_vat_interface_status_ds" returnField="vat_interface_status"
valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc" options="acr630_businessTypeDs"
returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500"
title="ACR.CREATED_BY_NAME">
<a:mapping>
<a:map from="user_id" to="created_by"/>
<a:map from="description" to="created_by_name"/>
</a:mapping>
</a:field>
<a:field name="confirmed_by_name" lovGridHeight="320" lovHeight="500"
lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500"
title="ACR.CONFIRMED_BY_NAME">
<a:mapping>
<a:map from="user_id" to="confirmed_by"/>
<a:map from="description" to="confirmed_by_name"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500"
title="ACR.INVOICE_BP_CODE">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_f"/>
</a:mapping>
</a:field>
<a:field name="invoice_bp_code_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_bp_master_list" lovWidth="500"
title="ACR.INVOICE_BP_CODE">
<a:mapping>
<a:map from="bp_code" to="invoice_bp_code_t"/>
</a:mapping>
</a:field>
<a:field name="project_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500"
title="HLS.PROJECT_NUMBER_FROM">
<a:mapping>
<a:map from="project_number" to="project_number_f"/>
</a:mapping>
</a:field>
<a:field name="project_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_project_list" lovWidth="500"
title="HLS.PROJECT_NUMBER_FROM">
<a:mapping>
<a:map from="project_number" to="project_number_t"/>
</a:mapping>
</a:field>
<a:field name="contract_number_f" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500"
title="HLS.CONTRACT_NUMBER_FROM">
<a:mapping>
<a:map from="contract_number" to="contract_number_f"/>
</a:mapping>
</a:field>
<a:field name="contract_number_t" lovGridHeight="320" lovHeight="480"
lovService="acr.ACR512.acr_invoice_contract_list" lovWidth="500"
title="HLS.CONTRACT_NUMBER_FROM">
<a:mapping>
<a:map from="contract_number" to="contract_number_t"/>
</a:mapping>
</a:field>
<a:field name="received_flag" checkedValue="Y" defaultValue="N" uncheckedValue="N"/>
<a:field name="express_status_name" displayField="code_value_name"
options="acr630_express_status_ds" returnField="express_status" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_acr630_invoiceVatParaDs"/>
</a:events>
</a:dataSet>
<a:dataSet id="acr630_invoiceVatDs" autoPageSize="true" maxPageSize="10000" model="acr.ACR630.acr630_invoice_hd_v"
queryDataSet="acr630_invoiceVatParaDs" selectable="true">
<a:fields><![CDATA[
]]></a:fields>
<a:events>
<a:event name="submitsuccess" handler="onSubmitSuccess_acr630_invoiceVatDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="acr630_invoice_query" text="HLS.QUERY"/>
<a:gridButton click="acr630_invoice_reset" text="HLS.RESET"/>
</a:screenTopToolbar>
<a:form marginWidth="30" padding="0">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr630_invoiceVatParaDs"
prompt="HLS.DOCUMENT_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>
<a:textField name="document_number_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:lov name="contract_number_f" bindTarget="acr630_invoiceVatParaDs"
prompt="HLS.CONTRACT_NUMBER_FROM" width="150"/>
<div></div>
<a:lov name="contract_number_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:textField name="invoice_title" bindTarget="acr630_invoiceVatParaDs" width="150"/>
<a:lov name="confirmed_by_name" bindTarget="acr630_invoiceVatParaDs" width="150" prompt="确认人"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="invoice_date_f" bindTarget="acr630_invoiceVatParaDs"
prompt="ACR.INVOICE_DATE_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_DATE_TO}]]></div>
<a:datePicker name="invoice_date_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:textField name="invoice_number_f" bindTarget="acr630_invoiceVatParaDs"
prompt="ACR.INVOICE_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="invoice_number_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:comboBox name="invoice_status_desc" bindTarget="acr630_invoiceVatParaDs" width="150"/>
<a:comboBox name="vat_interface_status_desc" bindTarget="acr630_invoiceVatParaDs" width="150"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:datePicker name="accounting_date_f" bindTarget="acr630_invoiceVatParaDs"
prompt="HLS.ACCOUNT_DATE_FROM" width="150"/>
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
<a:datePicker name="accounting_date_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr630_invoiceVatParaDs"
prompt="发票金额从" width="150"/>
<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr630_invoiceVatParaDs"
prompt="" width="150"/>
<!--<a:comboBox name="invoice_kind_desc" bindTarget="acr630_invoiceVatParaDs" width="150"/>-->
<a:comboBox name="invoice_kind_type_n" bindTarget="acr630_invoiceVatParaDs" width="150" prompt="发票种类"/>
<a:lov name="created_by_name" bindTarget="acr630_invoiceVatParaDs" width="150" prompt="创建人"/>
</a:hBox>
<a:hBox labelSeparator=" ">
<a:textField name="je_month_f" bindTarget="acr630_invoiceVatParaDs"
prompt="申报月份从" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="je_month_t" bindTarget="acr630_invoiceVatParaDs" prompt="" width="150"/>
<a:lov name="invoice_bp_code_f" bindTarget="acr630_invoiceVatParaDs" prompt="客户编号" width="150"/>
<div><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]></div>
<a:textField name="invoice_apply_num" bindTarget="acr630_invoiceVatParaDs" prompt="申请编号"
width="150"/>
<a:comboBox name="full_elec_invoice_flag_n" bindTarget="acr630_invoiceVatParaDs" width="150" prompt="是否全电发票"/>
</a:hBox>
</a:form>
<a:grid id="acr630_invoiceVatDs_grid" bindTarget="acr630_invoiceVatDs" marginWidth="30" navBar="true"
marginHeight="200">
<a:columns>
<a:column name="document_number" lock="true" width="120" renderer="acr512_document_number_render"/>
<a:column name="invoice_apply_num" width="120" prompt="申请编号" lock="true"/>
<a:column name="contract_number" width="120"/>
<!-- <a:column name="business_type_desc" width="80"/>-->
<!-- <a:column name="billing_way_desc" width="80" prompt="开票方式"/>-->
<!-- <a:column name="invoice_kind_desc" width="100"/>-->
<a:column name="invoice_kind_type_n" width="200" prompt="发票种类"/>
<a:column name="invoice_number" width="120"/>
<a:column name="vat_invoice_code" width="120"/>
<a:column name="invoice_date" renderer="Leaf.formatDate" width="100"/>
<a:column name="invoice_bp_code" width="100"/>
<a:column name="invoice_bp_name" autoAdjust="false" showTitle="true" width="150"/>
<a:column name="invoice_title" autoAdjust="false" footerRenderer="summaryRenderer" showTitle="true"
width="150"/>
<a:column name="total_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="return_tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="dif_tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="net_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="je_month" prompt="申报月份" width="120"/>
<!-- <a:column name="total_amount" align="right" footerRenderer="summaryRenderer"-->
<!-- renderer="Leaf.formatMoney" width="100"/>-->
<!-- <a:column name="net_amount" align="right" footerRenderer="summaryRenderer"-->
<!-- renderer="Leaf.formatMoney" width="100"/>-->
<a:column name="line_total_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="line_tax_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="line_net_amount" align="right" footerRenderer="summaryRenderer"
renderer="Leaf.formatMoney" width="100"/>
<a:column name="je_num" prompt="凭证编号" width="120"/>
<a:column name="je_sbo" prompt="SBO凭证编号" width="120"/>
<a:column name="currency" width="80"/>
<a:column name="created_by_name" autoAdjust="false" showTitle="true" width="150" prompt="创建人"/>
<a:column name="confirmed_by_name" autoAdjust="false" showTitle="true" width="150" prompt="确认人"/>
<a:column name="invoice_status_desc" width="100"/>
<a:column name="vat_interface_status_desc" width="100"/>
<a:column name="accounting_date" renderer="Leaf.formatDate" width="100"/>
<!-- <a:column name="create_je_flag" width="60"/> -->
<a:column name="full_elec_invoice_flag_n" width="200" prompt="是否全电发票"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment