Commit 0bcdddf7 authored by gzj34291's avatar gzj34291

发票创建新增收据类型

parent cff95230
......@@ -36,10 +36,11 @@
<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:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<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"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="full_elec_invoice_flag_n"/>
<bm:field name="business_type" />
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -68,6 +69,7 @@
con.project_id,
con.project_number,
con.project_name,
con.business_type,
t.invoice_kind,
(SELECT v.code_value_name
FROM sys_code_values_v v
......@@ -95,10 +97,9 @@
from sys_code_values_v v
where v.code = 'ACR512_INVOICE_KIND_TYPE'
and v.code_value = t.invoice_kind_type) invoice_kind_type_n,
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1
t.full_elec_invoice_flag,
(select v.code_value_name value_name from sys_code_values_v v where v.code = 'YES_NO' and v.code_value = t.full_elec_invoice_flag) full_elec_invoice_flag_n
FROM acr_invoice_create_tmp t, con_contract_v con,hls_bp_master t1
WHERE t.session_id = ${/session/@session_id}
AND t.contract_id = con.contract_id
and t1.bp_id = t.bp_id
......@@ -111,7 +112,7 @@
begin
ACR_INVOICE_PKG.invoiceTmp_update(p_record_id => ${@record_id},
p_invoice_kind => ${@invoice_kind},
p_invoice_kind_type => ${@invoice_kind_type},
p_invoice_kind_type => ${@invoice_kind_type},
p_tax_amount => ${@tax_amount},
p_billing_amount => ${@billing_amount},
p_product_name => ${@product_name},
......
......@@ -43,6 +43,7 @@
function createScreen_create()
{
debugger;
var message_flag =false;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
......@@ -73,11 +74,11 @@
//add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_type');
var kind_type=selectedDs[i].get('invoice_kind_type');
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL')){
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&kind_type!='ELECTRONIC_GENERAL'){
if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
......@@ -149,6 +150,11 @@
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','保证金');
}
if(records[i].get('invoice_kind_type')=='RECEIPT'){
records[i].getField('invoice_kind_type').setReadOnly(true);
records[i].getField('invoice_kind_type_n').setReadOnly(true);
}
}
}
......
......@@ -45,6 +45,8 @@
{
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
var message_flag =false;
debugger
if(!ds.validate(true))
{
Leaf.Masker.unmask(Ext.getBody());
......@@ -67,13 +69,30 @@
$L.showErrorMessage("提示","开票金额填写有误!");
return;
}
//add by gzj 售后回租只能开普票
var business_type= selectedDs[i].get('business_type');
var kind_type=selectedDs[i].get('invoice_kind_type');
if(business_type=='LEASEBACK'&&(kind_type!='PAPER_GENERAL'&&kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
Leaf.showMessage("提示","售后回租只能开普通发票!");
return;
}
if(business_type=='LEASEBACK'&&(kind_type!='ELECTRONIC_GENERAL'&&kind_type!='RECEIPT')){
message_flag =true;
// Leaf.showMessage("提示","回租建议选择增值税电子普票!");
}
}
var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认开票?',function()
var message_info;
if(message_flag==false){
message_info= '是否确认开票?';
}else {
message_info= "回租建议选择增值税电子普票!是否确认开票?";
}
Leaf.showConfirm('${l:HLS.PROMPT}',message_info,function()
{
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
......
......@@ -115,9 +115,9 @@
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(record_id, invoice_hd_id) {
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(record_id);
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var param = currency_reocrd.data;
param['function_code'] = 'ACR512';
param['winid'] = 'confirm_invoice_win';
......@@ -139,9 +139,9 @@
function acr512_document_number_render(value, record, name) {
if (name == 'document_number') {
if (record.get('compare_date_flag') == 'Y') {
return '<a style="color:red" href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
return '<a style="color:red" href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
}
}
......@@ -252,8 +252,9 @@
var saveData = [];
var invoice_hd_ids = '';
var invoice_kind = records[0].get('invoice_kind');
var invoice_type = records[0].get('invoice_type');
var full_elec_invoice_flag = records[0].get('full_elec_invoice_flag');
var invoice_type = records[0].get('invoice_type');
var full_elec_invoice_flag = records[0].get('full_elec_invoice_flag');
debugger
for (var i = 0; i < records.length; i++) {
var invoice_status = records[i].get('invoice_status');
if (invoice_status != 'NEW' && invoice_status != 'REJECT') {
......@@ -261,18 +262,23 @@
return;
}
if(invoice_kind != records[i].get('invoice_kind')){
$L.showErrorMessage("提示", '普票和专票不能同时勾选!');
return;
if(invoice_kind=='RECEIPT' || records[i].get('invoice_kind')=='RECEIPT'){
$L.showErrorMessage("提示", '收据和其它发票不能同时勾选!');
return;
}else{
$L.showErrorMessage("提示", '普票和专票不能同时勾选!');
return;
}
}
if(invoice_type != records[i].get('invoice_type')){
if(invoice_type != records[i].get('invoice_type')){
$L.showErrorMessage("提示", '纸质发票与电子发票不能同时勾选!');
return;
}
if(full_elec_invoice_flag != records[i].get('full_elec_invoice_flag')){
if(full_elec_invoice_flag != records[i].get('full_elec_invoice_flag')){
$L.showErrorMessage("提示", '全电发票与非全电发票不能同时勾选!');
return;
}
if (invoice_hd_ids == '') {
invoice_hd_ids = records[i].get('invoice_hd_id');
} else {
......@@ -334,25 +340,25 @@
<a:dataSet id="acr512_business_type_ds">
<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_kind_ds" lookupCode="ACR510_INVOICE_KIND"/>-->
<a:dataSet id="acr512_invoice_kind_type_ds" lookupCode="ACR512_INVOICE_KIND_TYPE"/>
<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="overdue_status_ds" lookupCode="YES_NO"/>
<a:dataSet id="overdue_status_ds" lookupCode="YES_NO"/>
<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="full_elec_invoice_flag"/>
<a:field name="full_elec_invoice_flag_n" displayField="code_value_name" options="overdue_status_ds"
<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_kind"/>-->
<a:field name="invoice_kind_type"/>
<a:field name="contract_name"/>
<a:field name="invoice_bp_name"/>
<!--<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"-->
<!--<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds"-->
<!--returnField="invoice_kind" valueField="code_value"/>-->
<a:field name="invoice_kind_type_n" displayField="code_value_name" options="acr512_invoice_kind_type_ds"
returnField="invoice_kind_type" valueField="code_value"/>
......@@ -464,7 +470,7 @@
<a:lov name="created_by_name" bindTarget="acr512_invoice_query_ds" prompt="创建人" width="135"/>
<a:textField name="invoice_title" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_TITLE"
width="135"/>
<a:comboBox name="full_elec_invoice_flag_n" bindTarget="acr512_invoice_query_ds" prompt="是否全电发票" width="135"/>
<a:comboBox name="full_elec_invoice_flag_n" bindTarget="acr512_invoice_query_ds" prompt="是否全电发票" width="135"/>
</a:hBox>
<a:hBox labelSeparator=" ">
......@@ -481,7 +487,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"-->
<!--<a:comboBox name="invoice_kind_desc" bindTarget="acr512_invoice_query_ds" prompt="ACR.INVOICE_KIND"-->
<!--width="135"/>-->
<a:comboBox name="invoice_kind_type_n" bindTarget="acr512_invoice_query_ds" prompt="发票种类" width="135"/>
<a:comboBox name="invoice_status_n" bindTarget="acr512_invoice_query_ds" prompt="发票状态" width="135"/>
......@@ -499,7 +505,7 @@
<!--
<a:column name="business_type_desc" prompt="HLS.BUSINESS_TYPE_DESC" width="80"/>
-->
<!--<a:column name="invoice_type_n" prompt="开票类型" width="100"/>-->
<!--<a:column name="invoice_type_n" prompt="开票类型" width="100"/>-->
<!--<a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>-->
<a:column name="invoice_kind_type_n" prompt="发票种类" width="200"/>
<!-- <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/> -->
......@@ -516,7 +522,8 @@
<a:column name="accounting_date" prompt="HLS.ACCOUNT_DATE" width="100"/>
<!-- <a:column name="compare_date_flag" prompt="比较日期" width="100"/> -->
<!-- <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/> -->
<a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" width="200"/>
<a:column name="full_elec_invoice_flag_n" prompt="是否全电发票" width="200"/>
</a:columns>
</a:grid>
</a:screenBody>
......
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