Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions Interfaces/AAA/intfAccountingBasedModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,7 @@ Targoman::API::AAA::stuPreVoucher IMPL_REST_POST(intfAccountingBasedModule, addT
//-- --------------------------------
stuVoucherItem PreVoucherItem;



// QJsonArray JSAPendingVouchers;
// foreach (auto PendingVoucher, AssetItem.PendingVouchers)
// JSAPendingVouchers.append(PendingVoucher.toJson());
QJsonDocument JSDPendingVouchers = QJsonDocument();
// JSDPendingVouchers.setArray(JSAPendingVouchers);
// PreVoucherItem.PendingVouchers = simpleCryptInstance()->encryptToString(JSDPendingVouchers.toJson(QJsonDocument::Compact));
JSDPendingVouchers.setObject(AssetItem.Private.toJson());
PreVoucherItem.Private = simpleCryptInstance()->encryptToString(JSDPendingVouchers.toJson(QJsonDocument::Compact));

Expand Down Expand Up @@ -751,10 +744,7 @@ Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::internalUpdateBaske
AssetItem.Saleable.fromJson(QJsonObject::fromVariantMap(UserAssetInfo));

//-- --------------------------------
// AssetItem.PendingVouchers.clear();
QString StrPrivate = simpleCryptInstance()->decryptToString(_voucherItem.Private);
// foreach (auto I, QJsonDocument().fromJson(StrPendingVouchers.toLatin1()).array())
// AssetItem.PendingVouchers.append(stuPendingVoucher().fromJson(I.toObject()));
AssetItem.Private.fromJson(QJsonDocument().fromJson(StrPrivate.toLatin1()).object());

//-- --------------------------------
Expand Down Expand Up @@ -811,12 +801,7 @@ Targoman::API::AAA::stuPreVoucher intfAccountingBasedModule::internalUpdateBaske
} else { //update
FinalPrice += AssetItem.TotalPrice;

// QJsonArray JSAPendingVouchers;
// foreach (auto PendingVoucher, AssetItem.PendingVouchers)
// JSAPendingVouchers.append(PendingVoucher.toJson());
QJsonDocument JSDPendingVouchers = QJsonDocument();
// JSDPendingVouchers.setArray(JSAPendingVouchers);
// _voucherItem.PendingVouchers = simpleCryptInstance()->encryptToString(JSDPendingVouchers.toJson(QJsonDocument::Compact));
JSDPendingVouchers.setObject(AssetItem.Private.toJson());
_voucherItem.Private = simpleCryptInstance()->encryptToString(JSDPendingVouchers.toJson(QJsonDocument::Compact));

Expand Down
5 changes: 4 additions & 1 deletion Interfaces/DBM/QueryBuilders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1492,6 +1492,9 @@ itmplDerived& tmplQueryJoinTrait<itmplDerived>::join(enuJoinType::Type _joinType
if (_alias.length())
this->JoinTraitData->Owner->Data->BaseQueryPreparedItems.RenamedCols.append(_alias);

//for preventing to adding limit in nested queries
_nestedQuery.pageSize(0);

QString joinBody = _nestedQuery.buildQueryString({}, false, false, true);

if (SQLPrettyLen)
Expand Down Expand Up @@ -2622,7 +2625,7 @@ QString SelectQuery::buildQueryString(QVariantMap _args, bool _selectOne, bool _
+ sLimit);
}
}
} else {
} else if (this->Data->PageSize > 0) { //for preventing to adding limit in nested queries
if (SQLPrettyLen)
QueryParts.append(QString("LIMIT").rightJustified(SQLPrettyLen)
+ " "
Expand Down