Commit 6289091c by ss.dai

Fix 1:小票取消优惠价

parent 77a92ab3
......@@ -124,6 +124,7 @@ bool FmPlugin::DoOrderEntry(const OrderObject *orderObject, const QString &cashi
qRequset.setUrl(url);
qRequset.setRawHeader("Content-Type","application/json;charset=utf-8");
qRequset.setRawHeader("Accept", "application/json;charset=utf-8");
error = _GetOrderEntryData(orderObject);
QNetworkReply *reply = manger.post(qRequset, _GetOrderEntryData(orderObject));
QEventLoop eventLoop;
QObject::connect(&manger, SIGNAL(networkAccessibleChanged(QNetworkAccessManager::NetworkAccessibility)), &eventLoop, SLOT(quit()));
......
......@@ -86,20 +86,9 @@ QString FmPrinter::_GetPrintData(OrderObject *pData)
// }
// else
// {
if(!pData->channel.compare("eleme"))
{
// 该商品应收的钱
float ys_fee = pData->proList[i]->price*pData->proList[i]->productAmount;
// 该商品实际收到的钱
float ss_fee = ys_fee*(1- ( (float)pData->dis_shop_fee )/pData->product_fee);
price = QString("%1 x%2 %3 优惠价 %4").arg(_Penny2Dollar(pData->proList[i]->price)).arg(pData->proList[i]->productAmount)
.arg(_Penny2Dollar(pData->proList[i]->price*pData->proList[i]->productAmount)).arg(_Penny2Dollar(ss_fee));
}else
{
price = QString("%1 x%2 %3").arg(_Penny2Dollar(pData->proList[i]->price)).arg(pData->proList[i]->productAmount)
price = QString("%1 x%2 %3").arg(_Penny2Dollar(pData->proList[i]->price)).arg(pData->proList[i]->productAmount)
.arg(_Penny2Dollar(pData->proList[i]->price*pData->proList[i]->productAmount));
}
str_comd_list.append(QString(name+"$"+price+"$"));
// }
......
......@@ -258,7 +258,7 @@ bool FlowControl::_PullOrder()
{
if(FmPlugin::GetInstance().DoOrderEntry(orderObject,"","","","",error))
{
QLOG_INFO() << QString("_PullOrder DoOrderEntry successful %1").arg(orderObject->order_id);
QLOG_INFO() << QString("_PullOrder DoOrderEntry successful %1 %2").arg(orderObject->order_id).arg(error);
this->_ReportBillEntryResult(orderObject->order_id, 1, QString("成功"));
break;
}else
......
......@@ -6,4 +6,4 @@ url1=http://123.207.193.166/api
port=34953
[HdServer]
url=http://122.224.171.126:8980/h4rest-server/rest/h5rest-server/core/wholesaleservice/wholesale
\ No newline at end of file
url=http://101.71.13.138:7782/h4rest2/rest/h5rest-server/core/wholesaleservice/wholesale
\ No newline at end of file
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