Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics RMS (Archived)

Detailed Sales -Error Report

(0) ShareShare
ReportReport
Posted on by 875

good Morning
while generate this report from Hq for month or 2 month  ago

  for all stores - total money be incorrect

 


*This post is locked for comments

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    Sorry I can not understand Archelle

  • Suggested answer
    archelle16 Profile Picture
    archelle16 1,735 on at
    RE: Detailed Sales -Error Report

    I honestly can't do it here on this conversation.

    pm me and lets see what i can do :D

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    I use version 2.0.2000

    Is this problem occurs for one before?

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    same problem - Error total sales

  • Suggested answer
    archelle16 Profile Picture
    archelle16 1,735 on at
    RE: Detailed Sales -Error Report

    download the report here

    www.sendspace.com/.../6v1zz9

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    could you send the default report  

  • Suggested answer
    archelle16 Profile Picture
    archelle16 1,735 on at
    RE: Detailed Sales -Error Report

    think i found your problem: oh, well

    revise the hq report:

    Change the tables queried properties into this:

    FROM        TransactionEntry

         INNER JOIN  [Transaction] WITH(NOLOCK)

                     ON TransactionEntry.TransactionNumber = [Transaction].TransactionNumber AND TransactionEntry.StoreID = [Transaction].StoreID

         INNER JOIN  Batch WITH(NOLOCK)

                     ON [Transaction].BatchNumber = Batch.BatchNumber AND [Transaction].StoreID = Batch.StoreID

         LEFT JOIN   Item WITH(NOLOCK)

                     ON TransactionEntry.ItemID = Item.ID

         LEFT JOIN   Department WITH(NOLOCK)

                     ON Item.DepartmentID = Department.ID

         LEFT JOIN   Category WITH(NOLOCK)

                     ON Item.CategoryID = Category.ID

         LEFT JOIN   Supplier WITH(NOLOCK)

                     ON Item.SupplierID = Supplier.ID

         LEFT JOIN   ReasonCode AS ReasonCodeDiscount WITH(NOLOCK)

                     ON TransactionEntry.DiscountReasonCodeID = ReasonCodeDiscount.ID

         LEFT JOIN   ReasonCode AS ReasonCodeTaxChange WITH(NOLOCK)

                     ON TransactionEntry.TaxChangeReasonCodeID = ReasonCodeTaxChange.ID

         LEFT JOIN   ReasonCode AS ReasonCodeReturn WITH(NOLOCK)

                     ON TransactionEntry.ReturnReasonCodeID = ReasonCodeReturn.ID

         LEFT JOIN   Store ON [Transaction].StoreID = Store.ID

    Like what i said before, the report you send me are different to rms hq default detailed reports.

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    Thank you for your effort with me archelle16  :D

    ------------------------------------------------------------------

    total sales are the same if i generate the code from  hq_sql and store_sql

    and total sales is correct if i generate the code from rms_store

    ------------------------------

    the problem is appear  when i generate the report from rms_hq for all stores

    -------------------------------

    No

    i Have not tried to update report sql queries

    -----------------------------------

  • Suggested answer
    archelle16 Profile Picture
    archelle16 1,735 on at
    RE: Detailed Sales -Error Report

    I wanna ask you few questions so that i can come up with the solution.

    1. Is hq sales greater than store sales or vice versa?

    2. Have you tried to update report sql queries? If yes, what for? 

    3. Have you tried to execute the sql by omitting the rest of the tables  for checking?

    Example:

    Execute the ff query in hq:

    Select SUM(TransactionEntry.Quantity * TransactionEntry.Price) as TotalSales

    from [Transaction]

    left join TransactionEntry on TransactionEntry.TransactionNumber = [Transaction].TransactionNumber AND TransactionEntry.StoreID = [Transaction].StoreID

    inner join Batch on Batch.BatchNumber = [Transaction].BatchNumber AND Batch.StoreID = [Transaction].StoreID

    left join Store on Store.ID = [Transaction].StoreID

    WHERE [Transaction].[Time] >= '2015-01-01 00:00:00' AND [Transaction].[Time] <=  '2015-01-31 23:59:59' AND Store.StoreCode = 'StoreCode here'

    Compare the result in store,

    if store and hq sales are not tally and hq sales is greater than store sales, check your batches. It might doubled upon sync. However,

    If hq sales is less than store sales, check your batches again, you might lost a single/multiple batch.

  • Saudi Market Profile Picture
    Saudi Market 875 on at
    RE: Detailed Sales -Error Report

    but when we run this report from sql server (the same criteria for details report)

    the result to be correct

    ----------------------------------

    select sum(TransactionEntry.Quantity  *TransactionEntry.Price )

     FROM        TransactionEntry

         INNER JOIN  [Transaction] WITH(NOLOCK)

                     ON TransactionEntry.TransactionNumber = [Transaction].TransactionNumber AND TransactionEntry.StoreID = [Transaction].StoreID

         INNER JOIN  Batch WITH(NOLOCK)

                     ON [Transaction].BatchNumber = Batch.BatchNumber AND [Transaction].StoreID = Batch.StoreID

         LEFT JOIN   Item WITH(NOLOCK)

                     ON TransactionEntry.ItemID = Item.ID

         LEFT JOIN   Department WITH(NOLOCK)

                     ON Item.DepartmentID = Department.ID

         LEFT JOIN   Category WITH(NOLOCK)

                     ON Item.CategoryID = Category.ID

         LEFT JOIN   Supplier WITH(NOLOCK)

                     ON Item.SupplierID = Supplier.ID

         LEFT JOIN   ReasonCode AS ReasonCodeDiscount WITH(NOLOCK)

                     ON TransactionEntry.DiscountReasonCodeID = ReasonCodeDiscount.ID

         LEFT JOIN   ReasonCode AS ReasonCodeTaxChange WITH(NOLOCK)

                     ON TransactionEntry.TaxChangeReasonCodeID = ReasonCodeTaxChange.ID

         LEFT JOIN   ReasonCode AS ReasonCodeReturn WITH(NOLOCK)

                     ON TransactionEntry.ReturnReasonCodeID = ReasonCodeReturn.ID

         LEFT JOIN   Store ON [Transaction].StoreID = Store.ID

         LEFT JOIN   cashier ON [Transaction].cashierID = cashier.ID and [Transaction].storeID=cashier.storeid

          WHERE     ([Transaction].Time  BETWEEN CONVERT    (DATETIME, '2015-01-01 00:00:00', 102)

          AND CONVERT    (DATETIME, '2015-01-31 23:59:59', 102))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,431 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,503 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans