Commit fc60f1b9 by NitefullWind

1. 20积分抵扣1元。

parent 15076e58
...@@ -58,7 +58,7 @@ private: ...@@ -58,7 +58,7 @@ private:
this->_needPayStr = needPayStr; this->_needPayStr = needPayStr;
_amount = _amountStr.toInt() / 100.0; _amount = _amountStr.toInt() / 100.0;
_score = score / 100.0; _score = (score / 20)*100; // 20积分=1元钱
_needPay = _needPayStr.toInt() / 100.0; _needPay = _needPayStr.toInt() / 100.0;
_maxWillPay = _useScore = _couponAmount = 0; _maxWillPay = _useScore = _couponAmount = 0;
...@@ -77,7 +77,8 @@ private: ...@@ -77,7 +77,8 @@ private:
QString getScoreAmount() QString getScoreAmount()
{ {
return DOUBLE_STR(MIN(_score, _needPay)); int needPayAmount = (int)_needPay; // 取整
return DOUBLE_STR(MIN(_score, needPayAmount));
} }
QString getPayAmountStr(QString amountStr) QString getPayAmountStr(QString amountStr)
...@@ -102,7 +103,8 @@ private: ...@@ -102,7 +103,8 @@ private:
void setUseScore(bool isUse) void setUseScore(bool isUse)
{ {
if(isUse) { if(isUse) {
_useScore = MIN(_score, _needPay); int needPayAmount = (int)_needPay; // 取整
_useScore = MIN(_score, needPayAmount);
} else { } else {
_useScore = 0; _useScore = 0;
} }
......
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