Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
leaf-hlcm
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hlcm
leaf-hlcm
Commits
dca24e16
Commit
dca24e16
authored
Jul 16, 2024
by
18083
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
I-19051 【建机】月初营业月结前,跨月的收款核销、保证金抵扣、保证金划转的凭证日期提示
parent
68935b9d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
7 deletions
+192
-7
get_trans_review_status.lwm
...pp/WEB-INF/classes/csh/CSH531/get_trans_review_status.lwm
+2
-1
csh_data_confirm.lwm
...n/webapp/WEB-INF/classes/csh/CSH531N/csh_data_confirm.lwm
+19
-0
csh_write_off_interface.lview
.../webapp/modules/csh/CSH531N/csh_write_off_interface.lview
+94
-1
csh_transaction_deposit_transfer_detail.lview
..._DEPOSIT102/csh_transaction_deposit_transfer_detail.lview
+77
-5
No files found.
src/main/webapp/WEB-INF/classes/csh/CSH531/get_trans_review_status.lwm
View file @
dca24e16
...
...
@@ -12,7 +12,8 @@
select count(1) trans_review_number
from csh_transaction_contemp t,con_contract cc
where (t.trans_review_status ='REVIEWING'
or t.trans_review_status ='REVIEWING1')
or t.trans_review_status ='REVIEWING1'
or t.trans_review_status ='REVIEWING_OP')
and cc.contract_id = t.source_contract_id
and cc.data_class = 'NORMAL'
]]>
</bm:query-sql>
...
...
src/main/webapp/WEB-INF/classes/csh/CSH531N/csh_data_confirm.lwm
View file @
dca24e16
...
...
@@ -34,5 +34,24 @@
end;
]]>
</bm:update-sql>
</bm:operation>
<bm:operation
name=
"query"
>
<bm:query-sql>
<![CDATA[
Select decode(Count(t1.transaction_id), Count(t1.csh_confirm), 'Y', 'N') As csh_confirm_flag
From (Select t.transaction_date,
t.transaction_id,
(Select c2.transaction_id
From csh_transaction c2
Where c2.transaction_id = t.transaction_id
And nvl(c2.business_monthly_flag, 'N') = 'Y') As csh_confirm
From csh_transaction t
Where t.confirmed_flag in
('ACCAUDITED', 'APPROVED', 'WF_REJECTED', 'WF_APPROVING')
And t.transaction_type not in ('DEPOSIT', 'PAYMENT')
And t.returned_flag not in ('RETURN', 'FULL')
And nvl(t.reversed_flag, 'N') = 'N') t1
Where to_char(t1.transaction_date, 'yyyymm') =
to_char(to_date(${@transaction_date},'yyyy/mm/dd'), 'yyyymm')
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
src/main/webapp/modules/csh/CSH531N/csh_write_off_interface.lview
View file @
dca24e16
...
...
@@ -680,6 +680,59 @@
}
}
}
//获取当前日期的上一个月
function getPreMonth(date) {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中月的天数
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 > days2) {
day2 = days2;
}
if (month2
< 10
)
{
month2 =
'0'
+
month2;
}
var
t2 =
year2
+
'-'
+
month2
+
'-'
+
day2;
return
t2;
}
//获取月结期间是否关闭
function
get_period_closed(date){
var
csh_confirm_flag;
$L.request({
url:
'${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
para:
{
transaction_date:
date
},
sync:
true,
success:
function
(res)
{
csh_confirm_flag=
res.result.record.csh_confirm_flag;
},
error:
function
()
{
},
failure:
function
()
{
},
scope:
this,
sync:
true,
});
if(
csh_confirm_flag=
'N'
){
return
false;
}
return
true;
}
function
csh531n_write_off_submit()
{
var
returning_amount =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('returning_amount')
||
0;
...
...
@@ -732,11 +785,51 @@
Leaf.showInfoMessage('提示', '经营性租赁合同收款核销当天的系统日期不得早于应收日!');
return;
}
//收款核销为融租保证金和经租保证金时:校验收款日期和核销日期存在跨月且收款日期所在月份的营业月结未确认时 18083 2024/7/15
var depositRs_date_count=0;
var operatRs_date_count=0;
var interfaceRs_date_count=0;
var transaction_date = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_date');
var transaction_type = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord().get('transaction_type');
//核销为融租保证金
for(var j=0;j
<depositRs.length
;j++){
if((depositRs[j].get('write_off_date').getFullYear()
!=transaction_date.getFullYear())
||(depositRs[j].get('write_off_date').getMonth()+1
!=transaction_date.getMonth()+1)){
depositRs_date_count =
plus(depositRs_date_count,
1);
}
}
//核销为经租保证金
for(var
j=
0;j<operatRs.length;j++){
if((operatRs[j].get('write_off_date').getFullYear()
!=transaction_date.getFullYear())
||(operatRs[j].get('write_off_date').getMonth()+1
!=transaction_date.getMonth()+1)){
operatRs_date_count =
plus(operatRs_date_count,
1);
}
}
//保证金抵扣为债券
if(
transaction_type =
=
'DEPOSIT'){
for(var
j=
0;j<interfaceRs.length;j++){
var
interfaceRs_date =
getPreMonth(Leaf.formatDate(interfaceRs[j].get('write_off_date')));
if(!get_period_closed(interfaceRs_date)){
interfaceRs_date_count =
plus(interfaceRs_date_count,
1);
break;
}
}
}
var
promt;
if(!get_period_closed(transaction_date)
&&
(depositRs_date_count
>
0 ||operatRs_date_count>0)){
promt =transaction_date.getFullYear()+'-'+(transaction_date.getMonth()+1)+'月营业月结未确认,收款日期为'+Leaf.formatDate(transaction_date)+',与当前选择保证金的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
}else if(interfaceRs_date_count>0){
promt = interfaceRs_date.split('-')[0]+'-'+interfaceRs_date.split('-')[1]+'月营业月结未确认,与当前选择的核销日期存在跨月,会影响会计凭证日期,确认要提交吗?'
}else{
promt = '确认提交复核吗?'
}
var createConfirm = Leaf.showConfirm('提示',
'确认提交复核吗'
, function () {
var createConfirm = Leaf.showConfirm('提示',
promt
, function () {
$('csh531n_write_off_submit_btn_id').disable();
csh511_save_all();
});
}
function csh531_add_fun(ds, record, index) {
...
...
src/main/webapp/modules/cus_deposit/CUS_DEPOSIT102/csh_transaction_deposit_transfer_detail.lview
View file @
dca24e16
...
...
@@ -17,6 +17,64 @@
$('${/parameter/@winId}').close();
}
//获取当前日期的上一个月
function getPreMonth(date) {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中月的天数
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 >
days2) {
day2 = days2;
}
if (month2
< 10
)
{
month2 =
'0'
+
month2;
}
var
t2 =
year2
+
'-'
+
month2
+
'-'
+
day2;
return
t2;
}
//校验保证金划转是否存在跨月:经济业务发生日与经济业务发生日的前一个月比较
18083
2024/7/15
function
check_extend_month(){
var
csh_confirm_flag;
var
deposit_records =
$('deposit_transfer_detail_result_ds').getAll();
var
je_date =
deposit_records[0].get('je_date');
var
last_je_date =
getPreMonth(je_date.format('yyyy-mm-dd'));
$L.request({
url:
'${/request/@context_path}/autocrud/csh.CSH531N.csh_data_confirm/query',
para:
{
transaction_date:
last_je_date
},
sync:
true,
success:
function
(res)
{
csh_confirm_flag=
res.result.record.csh_confirm_flag;
},
error:
function
()
{
},
failure:
function
()
{
},
scope:
this,
sync:
true,
});
if(
csh_confirm_flag =
='N'){
//&&
(last_je_date.split('-')[0]!=je_date.getFullYear()
||last_je_date.split('-')[1]!=je_date.getMonth()+1)){
return
false;
}
return
true;
}
function
cshdeposit102_transfer_submit()
{
if
($('deposit_transfer_detail_result_ds').validate())
{
if($('deposit_transfer_detail_result_ds').isModified()){
...
...
@@ -61,8 +119,8 @@
}
//融租划转到经租,提交经租副部长审批
if(head_record.get('business_type')
!=
'LEASEOPERAT'){
for(var
i= 0; i<deposit_records.length; i
++){
if(deposit_records[
i].get('business_type') == 'Y' || deposit_records[i
].get('business_type') == 'LEASEOPERAT'){
for(var
j=
0;
j<deposit_records.length;
j
++){
if(deposit_records[
j].get('business_type')
==
'Y'
||
deposit_records[j
].get('business_type')
==
'LEASEOPERAT'){
check_flag =
false;
break;
}
...
...
@@ -105,8 +163,15 @@
var
flag=
false;
}
}
if
(flag){
Leaf.showConfirm('${l:PROMPT}',
'确定提交保证金划转?',
function
()
{
if
(flag){
if(!check_extend_month()){
var
je_date_year =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var
je_date_month =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var
promt =
je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生日存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var
promt =
'确定提交保证金划转?'
}
Leaf.showConfirm('${l:PROMPT}',promt,
function
()
{
Leaf.Masker.mask($('${/parameter/@winId}').wrap,
"正在执行划转。。。");
Leaf.request({
url:
$('csh_review_transfer_link_id').getUrl(),
...
...
@@ -131,7 +196,14 @@
Leaf.Masker.unmask($('${/parameter/@winId}').wrap);
},
null,
null);
}else{
Leaf.showConfirm('${l:PROMPT}',
'是否确认在不同代理店之间进行划转?',
function
()
{
if(!check_extend_month()){
var
je_date_year =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[0];
var
je_date_month =
getPreMonth(deposit_records[0].get('je_date').format('yyyy-mm-dd')).split('-')[1];
var
promt =
je_date_year+'-'+je_date_month+'月营业月结未确认,与当前选择的经济业务发生日存在跨月,会影响会计凭证日期,确认要提交吗?';
}else{
var
promt =
'确定提交保证金划转?'
}
Leaf.showConfirm('${l:PROMPT}',promt,
function
()
{
Leaf.Masker.mask($('${/parameter/@winId}').wrap,
"正在执行划转。。。");
Leaf.request({
url:
$('csh_review_transfer_link_id').getUrl(),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment