Commit 026e1e52 authored by niminmin's avatar niminmin

Merge branch 'feature/收款核销修改罚息' into develop

parents 4530c395 3b56e5d4
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -94,12 +94,12 @@
'250',
t1.inv_object_taxpayer_type,
t1.object_taxpayer_type) = 'SMALL_SCALE_TAXPAYER' and
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or t2.write_off_flag = 'FULL')
to_char(t2.due_date,'yyyy-mm') <= to_char(SYSDATE,'yyyy-mm')) or (t2.write_off_flag = 'FULL' and t1.contract_status not in('REPURING','REPUR')) or(nvl(t2.write_off_flag,'NOT')='FULL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item<>1) or (nvl(t2.write_off_flag,'NOT')='PARTIAL' and t1.contract_status in('REPURING','REPUR') and t2.cf_item=1 ) )
AND cf_item<> 9
AND cf_status='RELEASE'
AND ((t2.cf_status='RELEASE' and t1.contract_status not in('REPURING','REPUR') and t2.cf_direction='INFLOW') or(t1.contract_status in ('REPURING','REPUR') and t2.cf_item=250 and t2.cf_status='RELEASE' )or ( t2.cf_status in('BLOCK') and nvl(t2.write_off_flag,'NOT')='PARTIAL' and nvl(t2.billing_status,'NOT') != 'FULL' and t1.contract_status in ('REPURING','REPUR') and t2.cf_item =1 and t2.cf_direction='NONCASH' and nvl(t2.billing_amount,0) <> t2.received_amount))
and t2.cashflow_id not in (20265,34267,24445)
and nvl(t2.billing_status,'NOT') != 'FULL'
and t2.cf_direction='INFLOW'
--and t2.cf_direction='INFLOW'
and ((decode(t2.cf_item,
'250',
t1.inv_object_taxpayer_type,
......@@ -165,7 +165,9 @@
t2.amount_dr received_amount,
NULL received_principal,
NULL received_interest,
0 billing_amount,
nvl((SELECT SUM(l.total_amount)
FROM acr_invoice_ln l
WHERE l.ref_n04 = t2.journal_line_id),0) billing_amount,
NULL billing_principal,
NULL billing_interest,
NULL vat_due_amount,
......@@ -198,7 +200,7 @@
FROM acr_invoice_ln l
WHERE l.ref_n04 = t2.journal_line_id
GROUP BY journal_line_id
HAVING SUM(l.total_amount)>0 )
HAVING SUM(l.total_amount)=t2.amount_dr)
)
)vv
......
......@@ -34,6 +34,8 @@
<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="contract_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="cf_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
</bm:fields>
<bm:operations>
......@@ -51,7 +53,12 @@
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
t.billing_amount,
-- t.billing_amount,
(case when cf.cf_item= 1 and cf.cf_status='BLOCK' then
t.received_amount-nvl(t.cf_billing_amount,0)
else
t.due_amount-nvl(t.cf_billing_amount,0)
end )billing_amount,
t.cf_billing_amount,
t.received_amount,
t.contract_id,
......@@ -82,7 +89,9 @@
(select i.description
from hls_cashflow_item i
where i.cf_item = t.cf_item) as cf_item_desc,
'融资租赁费' as product_name
'融资租赁费' as product_name,
con.contract_status contract_status,
cf.cf_status cf_status
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf
......
......@@ -52,8 +52,13 @@
t.due_amount,
--本次开票金额
t.due_amount received_amount,
t.due_amount billing_amount,
0 cf_billing_amount,
t.due_amount-nvl((SELECT SUM(l.total_amount)
FROM acr_invoice_ln l
WHERE l.ref_n04 = t.journal_line_id),0) billing_amount,
--0 cf_billing_amount,
nvl((SELECT SUM(l.total_amount)
FROM acr_invoice_ln l
WHERE l.ref_n04 = t.journal_line_id),0) cf_billing_amount,
t.contract_id,
con.contract_number,
con.contract_name,
......
......@@ -9,10 +9,19 @@
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=> ${@invoice_hd_ids},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
begin
acr_invoice_pkg.acr_invoice_status_change(p_invoice_hd=>${@invoice_hd_id},
acr_invoice_pkg.acr_invoice_status_reject(p_invoice_hd_id=> ${@invoice_hd_id},
p_want_status=>${@want_status},
p_user_id=>${/session/@user_id} );
end;
......
......@@ -42,6 +42,7 @@
function createScreen_create()
{
debugger;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
if(!ds.validate(true))
......@@ -57,17 +58,23 @@
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');
if(billing_amount!=due_amount &&billing_amount!=principal &&billing_amount!=interest){
$L.showErrorMessage("提示","本次开票金额需与应收金额,应收本金,应收利息中的某一金额一致!");
return;
}
// if(billing_amount!=due_amount &&billing_amount!=principal &&billing_amount!=interest){
// $L.showErrorMessage("提示","本次开票金额需与应收金额,应收本金,应收利息中的某一金额一致!");
// return;
// }
if(billing_amount==cf_billing_amount){
$L.showErrorMessage("提示","该金额已经开票过!");
return;
}
if(received_amount<plus(cf_billing_amount,billing_amount)&&selectedDs[i].get('cf_item')==1&&selectedDs[i].get('cf_status')=='BLOCK'&&selectedDs[i].get('contract_status')=='REPURING'){
$L.showErrorMessage("提示","本次开票金额+已开票金额不能超过已核销金额!");
return;
}
}
......@@ -75,10 +82,12 @@
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();
},
......
......@@ -49,28 +49,27 @@
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 selectedDs=$('selectedDs').getAll();
for(var i=0;i<selectedDs.length;i++){
var billing_amount=selectedDs[i].get('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>temp_billing_amount){
$L.showErrorMessage("提示","开票金额填写有误!");
return;
}
}
var datas = ds.getJsonData();
Leaf.showConfirm('${l:HLS.PROMPT}', '是否确认开票?',function()
......@@ -134,7 +133,7 @@
<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="billing_amount" required="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"/>
......@@ -172,7 +171,7 @@
<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="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>
......
......@@ -20,8 +20,7 @@
url="${/request/@context_path}/modules/prj/PRJ312/dmegc_emp_loan_cn_print.lview"/>
<a:link id="cash_deposit_printt_link"
url="${/request/@context_path}/modules/acr/ACR513/cash_deposit_print.lview"/>
<a:link id="acr512_invoice_status_change" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_status_change.lsc"/>
<a:link id="acr512_invoice_status_change_new" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_status_change.lsc"/>
<script type="text/javascript"><![CDATA[
function acr513_invoice_query() {
$('acr513_invoice_result_ds').query();
......@@ -164,10 +163,9 @@
});
}
param['details'] = saveDate;
console.log(param);
Leaf.showConfirm("提示",'确认退回所选择的单据?',function(){
Leaf.request({
url: $('acr512_invoice_status_change').getUrl(),
url: $('acr512_invoice_status_change_new').getUrl(),
para: param,
success: function() {
Leaf.Masker.unmask(detail_mask);
......
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