Commit fbe1ef2f by NitefullWind

1. 修复应付金额Bug。

parent f58de8d8
......@@ -694,8 +694,8 @@ bool FMPePayPrivate::GetPayJson(const QString& sum, const QString& code)
transaction.insert(FMP_EPAY_TRANSTRACTION_CODE, code);
if (_is_api) {
QJsonObject origin_trans = _origin_request["transactions"].toObject();
transaction[FMP_EPAY_TRANSTRACTION_AMOUNT] = (int)(origin_trans["order_amount"].toDouble() + 0.005);
// QJsonObject origin_trans = _origin_request["transactions"].toObject();
transaction[FMP_EPAY_TRANSTRACTION_AMOUNT] = _payDialog->getPayAmount();
QJsonObject pos_trans = _origin_request["transactions"].toObject();
QJsonArray pos_products = pos_trans["products"].toArray();
QJsonArray products;
......
......@@ -175,6 +175,12 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
}
}
int FMPPayDialog::getPayAmount() const
{
int amount = ui->lineedit_num->text().toDouble() * 100;
return amount;
}
void FMPPayDialog::show()
{
......
......@@ -40,6 +40,8 @@ public:
~FMPPayDialog();
int getPayAmount() const;
public slots:
void showErrorMsg(QString errormsg);
......
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 19
#define VER_BUILD 20
//! Convert version numbers to string
#define _STR(S) #S
......
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