Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HDMall-iOS
Project
Project
Details
Activity
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
张杰
HDMall-iOS
Commits
0b3dbc4d
Commit
0b3dbc4d
authored
7 years ago
by
Sandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉负值冲账
parent
6231ba9d
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
SaleInputAddViewController.m
...ss/SaleInput/ViewControllers/SaleInputAddViewController.m
+8
-6
No files found.
HDMall/CodeClass/Business/SaleInput/ViewControllers/SaleInputAddViewController.m
View file @
0b3dbc4d
...
...
@@ -105,12 +105,14 @@
WS
(
weakSelf
);
//赋值
kCanNotBeNil
(
self
.
viewModel
.
request
.
contract
,
@"请选择合同!"
);
NSDecimalNumber
*
limit
=
[
CalculateHelper
sub
:
@0
num2
:
self
.
topView
.
labelTodayTotal
.
text
];
NSDecimalNumber
*
billTotal
=
[
CalculateHelper
decimalNumber
:
self
.
totalView
.
labelTotal
.
text
];
if
([
billTotal
compare
:
limit
]
==
NSOrderedAscending
)
{
[
MBProgressHUD
j_warningMessage
:[
NSString
stringWithFormat
:
@"本单合计必须小于%@元"
,
limit
.
stringValue
]];
return
;
}
//负值冲账校验
// NSDecimalNumber *limit = [CalculateHelper sub:@0 num2:self.topView.labelTodayTotal.text];
// NSDecimalNumber *billTotal = [CalculateHelper decimalNumber:self.totalView.labelTotal.text];
// if ([billTotal compare:limit] == NSOrderedAscending) {
// [MBProgressHUD j_warningMessage:[NSString stringWithFormat:@"本单合计必须大于%@元", limit.stringValue]];
// return;
// }
NSString
*
msg
=
[
NSString
stringWithFormat
:
@"销售日期:%@
\n
总金额: %@
\n\n
确认提交?"
,
self
.
topView
.
textFieldDate
.
text
,
self
.
totalView
.
labelTotal
.
text
];
[
self
alertTitle
:
@"温馨提示"
msg
:
msg
okAction
:^
(
UIAlertAction
*
_Nullable
action
)
{
...
...
This diff is collapsed.
Click to expand it.
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