Commit 9dde23db authored by stone's avatar stone

【fix】销项发票罚息功能修改

 lsc文件需要注册
parent 0a50ba1f
-- Create table
create table CON_CONTRACT_IFRS9
(
ifrs_id NUMBER,
bp_code VARCHAR2(30),
bp_name VARCHAR2(100),
contract_number VARCHAR2(2000),
int_rate_display NUMBER,
lease_start_date DATE,
contract_amount NUMBER,
pre_pay_amount NUMBER,
contract_principal_amount NUMBER,
overdue_amount NUMBER,
max_overdue_days NUMBER,
rest_amount NUMBER,
pay_date DATE,
pay_amount NUMBER,
industry_belonged VARCHAR2(1000),
lease_item_location VARCHAR2(1000),
base_date DATE,
created_by NUMBER default -1,
creation_date DATE default SYSDATE,
last_updated_by NUMBER default -1,
last_update_date DATE default SYSDATE,
period_day VARCHAR2(200)
)
tablespace HL_CM_DEV
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
-- Add comments to the columns
comment on column CON_CONTRACT_IFRS9.period_day
is '期间';
alter table con_contract_ifrs9
add constraint CON_CONTRACT_IFRS9_PK primary key (ifrs_id);
CREATE SEQUENCE CON_CONTRACT_IFRS9_S;
......@@ -5,6 +5,8 @@
<bm:query-sql><![CDATA[
SELECT * FROM( select t1.spv_company_id,
NULL journal_header_id,
NULL journal_line_id,
t1.company_id,
t1.project_id,
t1.project_number,
......@@ -103,8 +105,98 @@
'250',
t1.inv_object_taxpayer_type,
t1.object_taxpayer_type) <> 'SMALL_SCALE_TAXPAYER' and
received_amount>0) OR 1=1 )
received_amount>0) OR (decode(t2.cf_item,
'250',
t1.inv_object_taxpayer_type,
t1.object_taxpayer_type)= 'SMALL_SCALE_TAXPAYER') )
UNION ALL
select t1.spv_company_id,
t2.journal_header_id,
t2.journal_line_id,
t1.company_id,
t1.project_id,
t1.project_number,
t1.project_name,
t1.contract_id,
t1.contract_number,
t1.contract_name,
t1.inception_of_lease,
t1.contract_status,
t1.contract_status_desc,
t1.billing_method,
t1.billing_method_desc,
t1.inv_object_taxpayer_type,
t1.inv_object_taxpayer_type_desc,
(t1.billing_object_id) billing_object_id,
(t1.billing_object_code) billing_object_code,
(t1.billing_object_name) billing_object_name,
(t1.object_taxpayer_type) object_taxpayer_type,
(t1.object_taxpayer_type_desc) object_taxpayer_type_desc,
-- t1.object_taxpayer_type_desc,
(t1.object_tax_registry_num) object_tax_registry_num,
(t1.bill_object_bp_class) bill_object_bp_class,
(t1.bill_object_bp_class_desc) bill_object_bp_class_desc,
t1.tax_type_vat,
t1.description,
(t1.invoice_title) invoice_title,
(t1.invoice_bp_address_phone_num) invoice_bp_address_phone_num,
(t1.invoice_bp_bank_account) invoice_bp_bank_account,
(t1.tax_registry_num) tax_registry_num,
t1.prj_search_term_1,
t1.prj_search_term_2,
t1.con_search_term_1,
t1.con_search_term_2,
t1.document_type,
t1.bp_name,
(t1.invoice_type_desc) invoice_type_desc,
NULL cashflow_id,
9 cf_item,
(SELECT t.description FROM hls_cashflow_item t WHERE t.cf_item=9) cf_item_desc,
null times,
t2.transaction_date last_received_date,
NULL due_date,
NULL due_amount,
(SELECT c.bp_bank_account_name
FROM csh_transaction c
WHERE c.transaction_id =t2.csh_transaction_id) account_name,
--NULL account_name,
NULL principal,
NULL interest,
NULL received_amount,
NULL received_principal,
NULL received_interest,
t2.amount_dr billing_amount,
NULL billing_principal,
NULL billing_interest,
NULL vat_due_amount,
NULL vat_principal,
NULL vat_interest,
NULL net_due_amount,
NULL net_principal,
NULL net_interest,
NULL currency,
NULL currency_desc,
NULL exchange_rate,
NULL exchange_rate_type,
NULL exchange_rate_type_desc,
NULL exchange_rate_quotation,
NULL exchange_rate_quotation_desc,
NULL overdue_status,
NULL write_off_flag,
NULL overdue_max_days,
t1.bp_id_agent_level1,
t1.bp_id_agent_level1_n,
t1.termination_date,
t1.lease_channel,
NULL cf_direction,
NULL billing_status,
NULL cf_status
from acr_invoice_contract_v t1, acr_invoice_penalty_v t2
where
t2.contract_id=t1.contract_id
and not exists (select 1
from acr_invoice_ln l
where l.ref_n03=t2.journal_header_id)
)vv
#WHERE_CLAUSE#
......@@ -113,6 +205,8 @@
</bm:operations>
<bm:fields>
<bm:field name="spv_company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SPV_COMPANY_ID"/>
<bm:field name="journal_header_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="journal_line_id" databaseType="NUMBER" datatype="java.lang.Long"/>
<bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" required="true"/>
<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"/>
......@@ -201,7 +295,9 @@
<bm:query-field name="bp_code_tenant_from" queryExpression="vv.billing_object_code &gt;=${@bp_code_tenant_from}"/>
<bm:query-field name="bp_code_tenant_to" queryExpression="vv.billing_object_code &lt;=${@bp_code_tenant_to}"/>
<bm:query-field name="lease_start_date_from" queryExpression="vv.inception_of_lease &gt;= to_date(${@lease_start_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="last_received_date_from" queryExpression="vv.last_received_date &gt;= to_date(${@last_received_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="lease_start_date_to" queryExpression="vv.inception_of_lease &lt;= to_date(${@lease_start_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="last_received_date_to" queryExpression="vv.last_received_date &lt;= to_date(${@last_received_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="document_type" queryExpression="vv.document_type=${@document_type}"/>
<bm:query-field name="billing_method" queryExpression="vv.billing_method=${@billing_method}"/>
<bm:query-field name="prj_search_term_1" queryExpression="vv.prj_search_term_1=${@prj_search_term_1}"/>
......
......@@ -98,6 +98,7 @@
begin
ACR_INVOICE_PKG.invoiceTmp_update(p_record_id => ${@record_id},
p_invoice_kind => ${@invoice_kind},
p_tax_amount => ${@tax_amount},
p_billing_amount => ${@billing_amount},
p_product_name => ${@product_name},
p_user_id => ${/session/@user_id});
......
......@@ -17,6 +17,8 @@
from sys_code_values_v v
where v.code = 'ACR510_GROUP_BILLING_METHOD'
and v.code_value_enabled_flag = 'Y'
AND v.code_value_enabled_flag='Y'
AND CODE_VALUE IN ('GROUP_BY_TIMES','GROUP_BY_CONTRACT')
order by decode(v.code_value,
'GROUP_BY_TIMES',
1,
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-6-19 下午12:44:44
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="code_value"/>
<bm:field name="code_value_name"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select v.code_value, v.code_value_name
from sys_code_values_v v
where v.code = 'ACR510_GROUP_BILLING_METHOD'
and v.code_value_enabled_flag = 'Y'
AND v.code_value_enabled_flag='Y'
AND CODE_VALUE IN ('NO_GROUP','GROUP_BY_CONTRACT')
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: DJ
$Date: 2013-7-4 下午5:06:06
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="record_id"/>
<!-- <bm:field name="cashflow_id"/>-->
<bm:field name="product_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRODUCT_NAME" prompt="ACR.PRODUCT_NAME"/>
<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="invoice_kind" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND"/>
<bm:field name="invoice_kind_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_DESC" prompt="ACR.INVOICE_TYPE"/>
<bm:field name="due_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DUE_AMOUNT" prompt="ACR.DUE_AMOUNT"/>
<bm:field name="tax_amount" databaseType="NUMBER" datatype="java.lang.Double"/>
<!-- <bm:field name="principal" databaseType="NUMBER" datatype="java.lang.Double" physicalName="PRINCIPAL" prompt="应收本金"/>-->
<!-- <bm:field name="interest" databaseType="NUMBER" datatype="java.lang.Double" physicalName="INTEREST" prompt="应收利息"/>-->
<bm:field name="cf_billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="CF_BILLING_AMOUNT" prompt="ACR.BILLING_AMOUNT"/>
<bm:field name="received_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="RECEIVED_AMOUNT" prompt="ACR.RECEIVED_AMOUNT"/>
<bm:field name="billing_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="BILLING_AMOUNT" prompt="ACR.THIS_BILLING_AMOUNT"/>
<!-- <bm:field name="times" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TIMES" prompt="HLS.PERIOD_NUMBER"/>-->
<!-- <bm:field name="last_received_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_RECEIVED_DATE" prompt="ACR.RECEIVED_DATE"/>-->
<bm:field name="transaction_date" databaseType="DATE" datatype="java.util.Date"/>
<bm:field name="cf_item" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CF_ITEM" prompt="HLS.RECEIVE_PROJECT"/>
<bm:field name="cf_item_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CF_ITEM_DESC" prompt="HLS.RECEIVE_PROJECT"/>
<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"/>
<bm:field name="exchange_rate" databaseType="NUMBER" datatype="java.lang.Double" physicalName="EXCHANGE_RATE" prompt="HLS.EXCHANGE_RATE"/>
<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="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select t.cashflow_id,
t.record_id,
t.billing_object,
(select c.code_value_name
from sys_code_values_v c
where c.code = 'ACR510_BILL_DETAIL_METHOD'
and c.code_value = t.billing_object) as billing_object_desc,
(select m.bp_name
from hls_bp_master_s_v m
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
--本次开票金额
t.due_amount received_amount,
t.due_amount billing_amount,
0 cf_billing_amount,
t.contract_id,
con.contract_number,
con.contract_name,
con.project_id,
con.project_number,
con.project_name,
t.invoice_kind,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'ACR510_INVOICE_KIND'
and v.code_value = t.invoice_kind) as invoice_kind_desc,
t.currency,
(select c.currency_name
from gld_currency_vl c
where c.currency_code = t.currency) as currency_desc,
1 as exchange_rate,
'MANUAL' as exchange_rate_type,
(select v.rate_type_desc
from gld_exchange_rate_type_v v
where v.rate_type_code = 'MANUAL') as exchange_rate_type_desc,
to_char(cf.transaction_date,'yyyy-mm-dd')transaction_date,
t.cf_item,
t.tax_amount,
'违约金' cf_item_desc,
'融资租赁费' as product_name
from acr_invoice_create_tmp t,
con_contract_v con,
ACR_INVOICE_PENALTY_V cf
where t.session_id = ${/session/@session_id}
and t.contract_id = con.contract_id
and t.contract_id = cf.contract_id
order by con.contract_id,t.cf_item
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.invoiceTmp_update(p_record_id => ${@record_id},
p_invoice_kind => ${@invoice_kind},
p_tax_amount => ${@tax_amount},
p_billing_amount => ${@billing_amount},
p_product_name => ${@product_name},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.create_penalty_invoice(p_session_id => ${/session/@session_id},
p_company_id => ${@company_id},
p_group_billing_method => ${@group_billing_method},
p_invoice_date => to_date(${@invoice_date},'yyyy-mm-dd'),
p_accounting_date => to_date(${@accounting_date},'yyyy-mm-dd'),
p_user_id => ${/session/@user_id},
p_role_id => ${/session/@role_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -34,5 +34,29 @@
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
ACR_INVOICE_PKG.split_penalty_cashflow(p_contract_id => ${@contract_id},
p_journal_header_id => ${@journal_header_id},
p_journal_line_id => ${@journal_line_id},
p_billing_amount =>${@billing_amount},
p_session_id => ${/session/@session_id},
p_bp_id => ${@billing_object_id},
p_bp_name => ${@billing_object_name},
p_invoice_title => ${@invoice_title},
p_invoice_bp_address_phone_num => ${@invoice_bp_address_phone_num},
p_invoice_bp_bank_account => ${@invoice_bp_bank_account},
p_invoice_bp_tax_registry_num => ${@object_tax_registry_num},
p_head_description => ${@description},
p_currency => 'CNY',
p_exchange_rate_type => ${@exchange_rate_type},
p_exchange_rate_quotation => ${@exchange_rate_quotation},
p_exchange_rate => ${@exchange_rate},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -89,6 +89,7 @@
<bm:query-field name="contract_number_t" queryExpression="t1.contract_number &lt;= ${@contract_number_t}"/>
<bm:query-field name="contract_name" queryExpression="t1.contract_name like ${@contract_name}"/>
<bm:query-field name="invoice_bp_name" queryExpression="t1.invoice_bp_name like ${@invoice_bp_name}"/>
<bm:query-field name="invoice_status" queryExpression="t1.invoice_status like ${@invoice_status}"/>
<bm:query-field name="invoice_date_f" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &gt;= to_date(${@invoice_date_f},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="invoice_date_t" queryExpression="to_date(t1.invoice_date,&apos;yyyy-mm-dd&apos;) &lt;= to_date(${@invoice_date_t},&apos;yyyy-mm-dd&apos;)"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<batch-apply sourcepath="/parameter">
<batch-apply sourcepath="/@current_parameter/line_info">
<a:model-update model="acr.ACR510.acr_invoice_create"/>
</batch-apply>
<a:model-execute model="acr.ACR510.acr_invoice_penalty_create"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
&author:DJ
$date:2013/05/08
$purpose:发票创建
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<a:model-query model="basic.sys_session_info" rootPath="default_value_record"/>
<a:model-query model="acr.ACR510.acr_invoice_group_penalty_billing_method" rootPath="group_billing_method_list"/>
</a:init-procedure>
<a:view>
<a:link id="svcLink_create_invoice" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_create.lsc"/>
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
<script><![CDATA[
function createScreen_close()
{
var win = $('acr_invoice_penalty_invoice');
win.close();
}
function colum_caculateTotal(data, name) {
var total = 0;
var length = data.length;
var value = 0;
for (var i = 0;i < length;i++) {
if (Ext.isEmpty(data[i].get(name))) {
value = 0;
} else {
value = data[i].get(name);
}
total = plus(total, value);
}
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function sum_foot(data, name) {
if (name == 'billing_amount') {
return colum_caculateTotal(data, name);
}
}
function createScreen_create()
{
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
if(!ds.validate(true))
{
Leaf.Masker.unmask(Ext.getBody());
return;
}
//判断本次开票金额是否为租金,本金,和利息之中某一个
//var selectedDs=$('selectedDs').getAll();
// for(var i=0;i<selectedDs.length;i++){
// var billing_amount=selectedDs[i].get('billing_amount');
// var due_amount=selectedDs[i].get('due_amount');
// var principal=selectedDs[i].get('principal');
// var interest=selectedDs[i].get('interest');
// var cf_billing_amount=selectedDs[i].get('cf_billing_amount');
//
//
// if(billing_amount!=due_amount &&billing_amount!=principal &&billing_amount!=interest){
// $L.showErrorMessage("提示","本次开票金额需与应收金额,应收本金,应收利息中的某一金额一致!");
// return;
// }
// if(billing_amount==cf_billing_amount){
// $L.showErrorMessage("提示","该金额已经开票过!");
// return;
// }
//
//
//
// }
var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认开票?',function()
{
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('svcLink_create_invoice').getUrl(),
para: datas,
success: function(res) {
Leaf.Masker.unmask(Ext.getBody());
createScreen_close();
contractDs_grid_query();
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
},function (){
Leaf.Masker.unmask(Ext.getBody());
});
}
function unSelect_selectedDs(ds,record){
record.dirty = false;
}
function onSelect_selectedDs(ds,record){
record.dirty = true;
}
function onLoad_selectedDs(ds)
{
ds.selectAll.defer(5,ds);
var records=ds.getAll();
for (var i=0;i<records.length;i++) {
if (records[i].get('invoice_kind') && records[i].get('invoice_kind')=='RECEIPT' && records[i].get('cf_item') && records[i].get('cf_item')=='51') {
records[i].set('product_name','保证金');
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="headDs" autoCreate="true">
<a:fields>
<a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
<a:field name="group_billing_method" defaultValue="NO_GROUP"/>
<a:field name="accounting_date" defaultValue="${/model/default_value_record/record/@today}" required="true"/>
<a:field name="invoice_date" defaultValue="${/model/default_value_record/record/@today}" required="true"/>
</a:fields>
</a:dataSet>
<a:dataSet id="selectedDs" autoQuery="true" bindName="line_info" bindTarget="headDs" fetchAll="true" model="acr.ACR510.acr_invoice_penalty_create" selectable="true">
<a:fields>
<a:field name="billing_amount" readOnly="true"/>
<a:field name="product_name" required="true"/>
<a:field name="invoice_kind"/>
<a:field name="invoice_kind_desc" displayField="code_value_name" options="invoiceKindDs" required="true" returnField="invoice_kind" valueField="code_value"/>
<a:field name="billing_object"/>
<a:field name="billing_object_name" prompt="开票对象名称"/>
</a:fields>
<a:events>
<a:event name="load" handler="onLoad_selectedDs"/>
<a:event name="select" handler="onSelect_selectedDs"/>
<a:event name="unselect" handler="unSelect_selectedDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton click="createScreen_close" text="HLS.CLOSE"/>
<a:gridButton click="createScreen_create" text="HLS.CREATE"/>
</a:screenTopToolbar>
<a:form column="3" labelWidth="120">
<a:datePicker name="invoice_date" bindTarget="headDs" prompt="开票申请日期"/>
<a:datePicker name="accounting_date" bindTarget="headDs" prompt="HLS.ACCOUNT_DATE"/>
</a:form>
<a:tabPanel marginHeight="220" marginWidth="30">
<a:tabs>
<a:tab prompt="ACR510.TAB.BILLING_INFO" width="100">
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="cf_item_desc"/>
<a:column name="product_name" editor="selectedDs_grid_editor_tf" width="150"/>
<a:column name="invoice_kind_desc" editor="selectedDs_grid_editor_comb"/>
<a:column name="billing_object_name" width="150"/>
<a:column name="currency_desc" align="center"/>
<!-- <a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>-->
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>
<!-- <a:column name="cf_billing_amount" align="right" renderer="Leaf.formatMoney"/>-->
<a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney" footerRenderer="sum_foot"/>
</a:columns>
<a:editors>
<a:comboBox id="selectedDs_grid_editor_comb"/>
<a:textField id="selectedDs_grid_editor_tf"/>
<a:numberField id="selectedDs_grid_editor_nf"/>
</a:editors>
</a:grid>
</a:tab>
<a:tab prompt="ACR510.TAB.ASSIST_INFO" width="100">
<a:grid id="selectedDs_grid_2" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="cf_item_desc"/>
<a:column name="contract_name" width="200"/>
<a:column name="project_number" width="150" prompt="报单编号"/>
<a:column name="project_name" width="200" prompt="报单名称"/>
<a:column name="transaction_date" renderer="Leaf.formatDate" width="80" prompt="收款日期"/>
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
<a:fieldSet title="ACR.GROUP_BILLING_METHOD">
<a:radio name="group_billing_method" bindTarget="headDs" labelField="code_value_name" options="/model/group_billing_method_list" prompt="" radioSeparator="" valueField="code_value" width="600"/>
</a:fieldSet>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-delete model="acr.ACR510.acr_invoice_selected_cashflow"/>
<!-- <batch-apply sourcepath="/parameter">
<batch-apply sourcepath="/@current_parameter/line_info">
<a:model-insert model="acr.ACR510.acr_invoice_selected_cashflow"/>
</batch-apply>
</batch-apply> -->
<batch-apply sourcepath="/parameter">
<a:model-update model="acr.ACR510.acr_invoice_selected_cashflow"/>
</batch-apply>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
......@@ -15,6 +15,7 @@
<a:link id="pageLink_invoice_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_create_invoice.lview"/>
<a:link id="pageLink_penalty_create" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_penalty_invoice.lview"/>
<a:link id="svcLink_save_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_selected.lsc"/>
<a:link id="svcLink_save_penalty_selected" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_save_penalty_selected.lsc"/>
<!--
<a:screen-include screen="modules/hls/hls_common_javascript.lview"/>
-->
......@@ -43,7 +44,7 @@
}
function contractDs_grid_query()
{
$('condition_queryForm').close();
// $('condition_queryForm').close();
$('ar510n_cashflow_ds').query();
}
......@@ -94,12 +95,7 @@
function winOpen_penalty_create()
{
var final_bill_flag = $('allConditionDs').getAt(0).get('final_bill_flag');
var group_billing_method;
if (final_bill_flag == 'Y'){
group_billing_method = 'GROUP_BY_CONTRACT';
}else{
group_billing_method = 'GROUP_BY_TIMES';
}
var group_billing_method='NO_GROUP';
var win = new Leaf.Window({
id: 'acr_invoice_penalty_invoice',
url: $('pageLink_penalty_create').getUrl(),
......@@ -133,6 +129,7 @@
Leaf.Masker.unmask(Ext.getBody());
return;
}
debugger
var datas = ds.getJsonData(true);
//判断是不是罚息
var first_cf_item=datas[0].cf_item;
......@@ -149,8 +146,28 @@
}
//跳转到新的页面
if(invoice_flag1){
for (var i = 0; i < datas.length; i++) {
datas[i].final_bill_flag = final_bill_flag;
datas[i].cat_ini_flag = cat_ini_flag;
}
Leaf.Masker.unmask(Ext.getBody());
Leaf.request({
url: $('svcLink_save_penalty_selected').getUrl(),
para: datas,
success: function (res) {
Leaf.Masker.unmask(Ext.getBody());
winOpen_penalty_create();
},
failure: function () {
Leaf.Masker.unmask(Ext.getBody());
},
error: function () {
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
}
}else {
var invoice_flag2 = true;
......@@ -358,28 +375,28 @@
<a:gridButton click="contractDs_grid_clear" text="ACR510.BUTTON.CLEAR_CONTRACT"/>
<a:gridButton click="invoiceHd_confirm" text="ACR510.BUTTON.COMFIRM"/>
</a:screenTopToolbar>
<a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false" resultTarget="contractDs">
<a:formToolBar labelWidth="80">
<a:form id="condition_queryForm" width="1300">
<a:hBox>
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象" width="95"/>
<a:lov name="billing_object_name" bindTarget="allConditionDs" prompt="开票对象"/>
<!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
-->
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号" width="95"/>
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/>
<!--
<a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/>
-->
<!-- <a:lov name="bp_id_agent_level1_n" bindTarget="allConditionDs" prompt="代理店"/>-->
<a:datePicker name="due_date_from" bindTarget="allConditionDs" prompt="应收日从" width="95"/>
<a:datePicker name="due_date_to" bindTarget="allConditionDs" prompt="应收日到" width="95"/>
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT" width="95"/>
<a:datePicker name="due_date_from" bindTarget="allConditionDs" prompt="应收日从"/>
<a:datePicker name="due_date_to" bindTarget="allConditionDs" prompt="应收日到"/>
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
</a:hBox>
<a:hBox>
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态" width="95"/>
<a:comboBox name="object_taxpayer_type_desc" bindTarget="allConditionDs" prompt="纳税人类型" width="95"/>
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
<a:comboBox name="object_taxpayer_type_desc" bindTarget="allConditionDs" prompt="纳税人类型"/>
<a:datePicker name="last_received_date_from" bindTarget="allConditionDs" prompt="收款日期从"/>
<a:datePicker name="last_received_date_to" bindTarget="allConditionDs" prompt="收款日期到"/>
</a:hBox>
</a:formToolBar>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
<a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/>
......@@ -403,10 +420,10 @@
&lt;!&ndash; <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/>
<a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>&ndash;&gt;
</a:formBody>-->
</a:queryForm>
</a:form>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50">
<a:tabs>
<a:tab prompt="开票信息">
<a:tab prompt="开票信息" width="150">
<a:grid id="cashflowDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70" navBar="true">
<a:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
......@@ -439,7 +456,7 @@
</a:columns>
</a:grid>
</a:tab>
<a:tab prompt="抬头信息">
<a:tab prompt="抬头信息" width="150">
<a:grid id="contractDs_grid" bindTarget="ar510n_cashflow_ds" marginHeight="170" marginWidth="70" navBar="true">
<a:columns>
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
......
......@@ -191,7 +191,7 @@
// message = '您确认行不合并吗';
// }
Leaf.showConfirm('提示', message, function() {
// Leaf.showConfirm('提示', message, function() {
Leaf.request({
url: $('acr512_invoice_ln_update_1_link').getUrl(),
para: {
......@@ -199,10 +199,10 @@
merge_flag: $(ds_id).getCurrentRecord().get('merge_flag')
},
success: function() {
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
$(ds_batch_id).query();
// $('${/parameter/@winid}').close();
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -221,10 +221,10 @@
scope: this
});
},function(){
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
});
// },function(){
// window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
//
// });
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -246,10 +246,12 @@
<a:datas dataSource="/model/acr512_business_type_list"/>
</a:dataSet>
<a:dataSet id="acr512_invoice_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr512_invoice_status_ds" lookupCode="ACR510_AR_INVOICE_STATUS"/>
<a:dataSet id="hls_lease_channel_ds" loadData="true" model="basic.hls_lease_channel_for_lov"/>
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds" returnField="currency" valueField="currency_code"/>
<a:field name="invoice_status_n" displayField="code_value_name" options="acr512_invoice_status_ds" returnField="invoice_status" valueField="code_value"/>
<a:field name="invoice_kind" />
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
......@@ -318,7 +320,7 @@
-->
</a:screenTopToolbar>
<a:form marginWidth="400" padding="0" title="应收发票维护">
<a:form marginWidth="200" padding="0" title="应收发票维护">
<a:hBox labelSeparator=" ">
<a:textField name="document_number_f" bindTarget="acr512_invoice_query_ds" prompt="HLS.DOCUMENT_NUMBER_FROM" width="135"/>
<!--
......@@ -366,6 +368,7 @@
<!-- <a:lov name="invoice_bp_code_t" bindTarget="acr512_invoice_query_ds" prompt="客户编号到" width="135"/>-->
<a:textField name="invoice_bp_name" bindTarget="acr512_invoice_query_ds" prompt="客户名称" width="135"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND" width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
</a:hBox>
</a:form>
<a:grid id="acr512_invoice_update_grid_ds" bindTarget="acr512_invoice_result_ds" marginHeight="250" marginWidth="30" navBar="true">
......
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