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
2d1e99ba
Commit
2d1e99ba
authored
Jan 09, 2020
by
Darming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]核销js小数精度问题
parent
72d3db5f
Pipeline
#4553
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
csh_write_off_interface.lview
.../webapp/modules/csh/CSH531N/csh_write_off_interface.lview
+8
-7
No files found.
src/main/webapp/modules/csh/CSH531N/csh_write_off_interface.lview
View file @
2d1e99ba
...
@@ -376,21 +376,21 @@
...
@@ -376,21 +376,21 @@
for (var i = 0; i
< write_off_recs.length
;
i++)
{
for (var i = 0; i
< write_off_recs.length
;
i++)
{
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
var
advanced_recs =
$('csh_transaction_advanced_ds').getAll();
var
advanced_recs =
$('csh_transaction_advanced_ds').getAll();
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
var
h_record =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var
h_record =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
...
@@ -539,23 +539,24 @@
...
@@ -539,23 +539,24 @@
for (var i = 0; i
< write_off_recs.length
;
i++)
{
for (var i = 0; i
< write_off_recs.length
;
i++)
{
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
var
t =
parseFloat(write_off_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
var
deposit_recs =
$('csh_transaction_deposit_ds').getAll();
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
for
(var
i =
0;
i
<
deposit_recs.length;
i++)
{
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
var
t =
parseFloat(deposit_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
var
advanced_recs =
$('csh_transaction_advanced_ds').getAll();
var
advanced_recs =
$('csh_transaction_advanced_ds').getAll();
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
for
(var
i =
0;
i
<
advanced_recs.length;
i++)
{
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
var
t =
parseFloat(advanced_recs[i].get('write_off_amount'));
if
(!isNaN(t))
{
if
(!isNaN(t))
{
sum
+=
t
;
sum
=
plus(sum,t)
;
}
}
}
}
debugger;
var
header_rec =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var
header_rec =
$('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
if
(sum
>
header_rec.get('unwrite_off_amount')) {
if
(sum
>
header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
...
@@ -644,7 +645,7 @@
...
@@ -644,7 +645,7 @@
//
Leaf.showInfoMessage("提示",
"存在未保存数据,请先保存再进行提交操作!");
//
Leaf.showInfoMessage("提示",
"存在未保存数据,请先保存再进行提交操作!");
//
return;
//
return;
//
}
//
}
sum
+=
allRs[i].get('write_off_amount')
||
0
;
sum
=
plus(sum,allRs[i].get('write_off_amount')
||
0)
;
}
}
if
(
sum =
=
0)
{
if
(
sum =
=
0)
{
...
...
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