Commit f475437a authored by niminmin's avatar niminmin

发票限额调整

parent 4009b805
......@@ -5,7 +5,9 @@
<bm:query-sql><![CDATA[
SELECT *
FROM (select cc.company_id,
FROM (select t2.journal_line_id,
t2.journal_header_id,
cc.company_id,
cc.project_id,
cc.contract_id,
cc.contract_number,
......
......@@ -95,12 +95,12 @@
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
cus_acr_invoice_contract_v t1
hls_bp_master t1
where t.session_id = ${/session/@session_id}
and t.contract_id = con.contract_id
and t.cashflow_id = cf.cashflow_id
and t1.contract_id = t.contract_id
order by t1.bp_id_agent_level1_n,t1.billing_object_name,con.contract_number,cf.times
and t1.bp_id = t.bp_id
order by con.bp_id_agent_level1,t1.bp_id,con.contract_number,cf.times
]]></bm:query-sql>
</bm:operation>
......
......@@ -87,11 +87,11 @@
t.tax_amount,
'违约金' cf_item_desc,
'融资租赁费' AS product_name
FROM acr_invoice_create_tmp t, con_contract_v con,cus_acr_invoice_contract_v t1
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.contract_id = t.contract_id
ORDER BY t1.bp_id_agent_level1_n,t1.billing_object_name,con.contract_number,t.times
and t1.bp_id = t.bp_id
ORDER BY con.bp_id_agent_level1,t.bp_id,con.contract_number,t.times
]]></bm:query-sql>
</bm:operation>
......
......@@ -39,6 +39,8 @@
<bm:field name="phone" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PHONE" prompt="FND_COMPANIES.PHONE"/>
<bm:field name="bank_account_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BANK_ACCOUNT_ID" prompt="FND_COMPANIES.BANK_ACCOUNT_ID"/>
<bm:field name="bank_info" expression="(select a.bank_branch_name||&apos;-&apos;||a.bank_account_num from CSH_BANK_ACCOUNT_V a where a.bank_account_id=fc.bank_account_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ele_vat_invoice_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ELE_VAT_INVOICE_LIMIT"/>
<bm:field name="ele_invoice_limit" databaseType="NUMBER" datatype="java.lang.Double" physicalName="ELE_INVOICE_LIMIT"/>
</bm:fields>
<bm:primary-key>
<bm:pk-field name="company_id"/>
......
......@@ -9,7 +9,7 @@
<a:init-procedure><![CDATA[
]]></a:init-procedure>
<a:view>
<a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
<a:link id="acr513n_invoice_readonly_page" url="${/request/@context_path}/modules/acr/ACR512/acr_invoice_update_detail.lview"/>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="acr_invoice_account_link" model="acr.ACR310.acr_invoice_account" modelaction="execute"/>
<script><![CDATA[
......@@ -18,9 +18,9 @@
var param = record.data;
param['function_code'] = 'ACR513';
param['function_usage'] = 'QUERY';
param['maintain_type'] = 'UPDATE';
param['maintain_type'] = 'READONLY';
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr513n_invoice_readonly_page', ds_id);
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
......
......@@ -204,10 +204,10 @@
<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="project_name" width="200" prompt="报单名称"/>-->
<a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
</a:columns>
</a:grid>
</a:tab>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
&author:niminmin
&author:DJ
$date:2013/05/08
$purpose:罚息发票创建
$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_billing_method" rootPath="group_billing_method_list"/>
<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_create.lsc"/>
<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_create_invoice');
var win = $('acr_invoice_penalty_invoice');
win.close();
}
function colum_caculateTotal(data, name) {
......@@ -49,22 +49,21 @@
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');
var received_amount=selectedDs[i].get('received_amount');
var cf_billing_amount=selectedDs[i].get('cf_billing_amount')||0;
var temp_billing_amount=minus(received_amount,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("提示","该金额已经开票过!");
// if(billing_amount!=due_amount &&billing_amount!=principal &&billing_amount!=interest){
// $L.showErrorMessage("提示","本次开票金额需与应收金额,应收本金,应收利息中的某一金额一致!");
// return;
// }
if(billing_amount>temp_billing_amount){
$L.showErrorMessage("提示","开票金额填写有误!");
return;
}
......@@ -75,10 +74,13 @@
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();
},
......@@ -118,23 +120,18 @@
}
}
]]></script>
<style><![CDATA[
.item-radio-option {
margin-right: 50px;
}
]]></style>
<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="GROUP_BY_TIMES"/>
<a:field name="accounting_date" defaultValue="${/model/default_value_record/record/@today}" required="true"/>
<a:field name="group_billing_method" defaultValue="NO_GROUP"/>
<a:field name="accounting_date" defaultValue="${/model/default_value_record/record/@today}"/>
<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_create" selectable="true">
<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" required="true"/>
<a:field name="product_name" required="true"/>
......@@ -166,16 +163,13 @@
<a:grid id="selectedDs_grid" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="times" align="right" width="40"/>
<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="principal" align="right" renderer="Leaf.formatMoney"/>
<a:column name="interest" align="right" renderer="Leaf.formatMoney"/>
<!-- <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"/>
......@@ -191,14 +185,13 @@
<a:grid id="selectedDs_grid_2" bindTarget="selectedDs" marginHeight="270" marginWidth="60">
<a:columns>
<a:column name="contract_number" width="150"/>
<a:column name="times" align="right" width="40"/>
<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="last_received_date" renderer="Leaf.formatDate" width="80"/>
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
<!-- <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>
......
......@@ -115,9 +115,9 @@
$('acr512_invoice_query_ds').reset();
}
function acr512_grid_update(reocrd_id, invoice_hd_id, status) {
function acr512_grid_update(record_id, invoice_hd_id) {
var maintain_type = 'UPDATE';
var currency_reocrd = $('acr512_invoice_result_ds').findById(reocrd_id);
var currency_reocrd = $('acr512_invoice_result_ds').findById(record_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') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
return '<a style="color:red" href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
} else {
return '<a href="javascript:acr512_grid_update(' + record.id + ',' + record.get('invoice_hd_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
return '<a href="javascript:acr512_grid_update(\'' + record.id + '\',\'' + record.get('invoice_hd_id') + '\');">' + value + '</a>';
}
}
......
......@@ -172,13 +172,17 @@
<a:hBox labelSeparator=" " labelWidth="100">
<a:textField name="invoice_bp_bank_account" bindTarget="fnd_companies_update_ds" prompt="开户行及账号" width="408"/>
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="100">
<a:numberField name="vat_invoice_limit" allowDecimals="true" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
<a:numberField name="invoice_limit" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
<a:hBox labelSeparator=" " labelWidth="110">
<a:numberField name="vat_invoice_limit" prompt="纸质增税专票限额" allowDecimals="true" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
<a:numberField name="invoice_limit" prompt="纸质增税普票限额" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="100">
<a:hBox labelSeparator=" " labelWidth="110">
<a:numberField name="ele_vat_invoice_limit" prompt="电子增税专票限额" allowDecimals="true" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
<a:numberField name="ele_invoice_limit" prompt="电子增税普票限额" allowFormat="true" bindTarget="fnd_companies_update_ds"/>
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="110">
<a:textField name="tax_registry_num" bindTarget="fnd_companies_update_ds" prompt="统一社会信用代码"/>
<a:numberField name="sales_tax_invoice_limit" allowFormat="true" bindTarget="fnd_companies_update_ds" prompt="电子票限额"/>
<!-- <a:numberField name="sales_tax_invoice_limit" allowFormat="true" bindTarget="fnd_companies_update_ds" prompt="电子票限额"/>-->
</a:hBox>
</a:fieldSet>
<a:fieldSet column="1" title="FND_COMPANIES.AUTHORITY_CONTROL" width="550">
......
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