while select sum(Qty), inventTransId from transactionSalesTrans group by #RetailSalesLineAggregationGroup where transactionSalesTrans.TransactionStatus == RetailEntryStatus::None && transactionSalesTrans.transactionCode == RetailItemTransactionCode::ItemOnFile && // <GEERU> (!param.ProcessGiftCardsAsPrepayments_RU || !transactionSalesTrans.SkipSalesLine_RU) && // </GEERU> ( // <GEERU> (countryRegion_W && !aggregated) || // </GEERU> (_forSales && transactionSalesTrans.Qty <= 0) || (!_forSales && transactionSalesTrans.Qty > 0)) join transactionTable where transactionTable.transactionId == transactionSalesTrans.transactionId // FIX by VK && transactionTable.store == transactionSalesTrans.store && transactionTable.terminal == transactionSalesTrans.terminalId // FIX by VK && transactionTable.type != RetailTransactionType::CustomerOrder && transactionTable.type != RetailTransactionType::AsyncCustomerOrder exists join tmpSalesTrans where transactionSalesTrans.RecId == tmpSalesTrans.RefRecId && !tmpSalesTrans.SkipAggregation
while select forupdate salesTrans where !salesTrans.inventTransId && salesTrans.transactionStatus == RetailEntryStatus::None // <GEERU> && (!param.ProcessGiftCardsAsPrepayments_RU || !salesTrans.SkipSalesLine_RU) // </GEERU> join transactionTable where salesTrans.transactionId == transactionTable.transactionId // FIX by VK && salesTrans.store == transactionTable.store && salesTrans.terminalId == transactionTable.terminal // FIX by VK && transactionTable.type != RetailTransactionType::CustomerOrder && transactionTable.type != RetailTransactionType::AsyncCustomerOrder join tmpSalesTrans where salesTrans.RecId == tmpSalesTrans.RefRecId && (!_handleSkipAggregationTrans || tmpSalesTrans.SkipAggregation == _handleSkipAggregationTrans)
DaxOnline.org is free platform that allows you to quickly store and reuse snippets, notes, articles related to Dynamics AX.
Authors are allowed to set their own AdSense units.
Join us.