Quantcast
Channel: Microsoft Dynamics RMS Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4248

Post Closed Batch Issue (Urgent)

$
0
0

HI All

 

I facing an urgent case.

My customer failed to export batch to xml format.

Originally it will export Batch, TenderTotals, and Department record to xml file.

 

 

SELECT CASE TableName

   WHEN 'Batch'        THEN 1

   WHEN 'TenderTotals' THEN 2

   WHEN 'TaxTotals'    THEN 3

   WHEN 'Department'   THEN 4

   WHEN 'Category'     THEN 5

   ELSE 100 END AS RowOrder,

 * FROM Accounting

 WHERE StoreID = 35 ORDER BY RowOrder, Description

 

 

But since from yesterday, when user export the file. It only export Batch, and TenderTotals record.

 

Then I check the profiler it will run following script for each department.

But it stop after process few department then finish export.

exec sp_executesql N'SET NOCOUNT ON

SELECT

   CAST(ISNULL(SUM(TransactionEntry.Quantity * TransactionEntry.Price), 0) AS money) AS Sales,

   CAST(ISNULL(SUM(TransactionEntry.Quantity * TransactionEntry.Cost), 0) AS money) AS Cost,

   CAST(ISNULL(SUM(TransactionEntry.Commission), 0) AS money) AS Commission,

   CAST(ISNULL(SUM(TransactionEntry.SalesTax), 0) AS money) AS SalesTax

FROM

   Batch

      INNER JOIN [Transaction]  ON [Transaction].BatchNumber = Batch.BatchNumber

   AND [Transaction].StoreID = Batch.StoreID

      INNER JOIN TransactionEntry  ON TransactionEntry.TransactionNumber = [Transaction].TransactionNumber and TransactionEntry.ItemType<>9

   AND [Transaction].StoreID = TransactionEntry.StoreID

      LEFT OUTER JOIN Item ON TransactionEntry.ItemID = Item.ID

WHERE

   Batch.BatchNumber = @P1 AND

   Item.DepartmentID = @P2

   AND Batch.StoreID = 35

',N'@P1 int,@P2 int',158,29

 

Does anyone have face before?

Thank you for any suggestion.


Viewing all articles
Browse latest Browse all 4248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>